diff --git a/sdk/support/Azure.ResourceManager.Support/api/Azure.ResourceManager.Support.netstandard2.0.cs b/sdk/support/Azure.ResourceManager.Support/api/Azure.ResourceManager.Support.netstandard2.0.cs index 2fdf0b2d9d64..e38a5fbf28f8 100644 --- a/sdk/support/Azure.ResourceManager.Support/api/Azure.ResourceManager.Support.netstandard2.0.cs +++ b/sdk/support/Azure.ResourceManager.Support/api/Azure.ResourceManager.Support.netstandard2.0.cs @@ -41,6 +41,8 @@ public partial class ProblemClassificationData : Azure.ResourceManager.Models.Re { internal ProblemClassificationData() { } public string DisplayName { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } + public Azure.ResourceManager.Support.ProblemClassificationData ParentProblemClassification { get { throw null; } } public System.Collections.Generic.IReadOnlyList SecondaryConsentEnabled { get { throw null; } } Azure.ResourceManager.Support.ProblemClassificationData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -156,6 +158,7 @@ public partial class SupportAzureServiceData : Azure.ResourceManager.Models.Reso { internal SupportAzureServiceData() { } public string DisplayName { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Metadata { get { throw null; } } public System.Collections.Generic.IReadOnlyList ResourceTypes { get { throw null; } } Azure.ResourceManager.Support.SupportAzureServiceData System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -169,6 +172,8 @@ public partial class SupportAzureServiceResource : Azure.ResourceManager.ArmReso protected SupportAzureServiceResource() { } public virtual Azure.ResourceManager.Support.SupportAzureServiceData Data { get { throw null; } } public virtual bool HasData { get { throw null; } } + public virtual Azure.Response ClassifyServiceProblem(Azure.ResourceManager.Support.Models.ServiceProblemClassificationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ClassifyServiceProblemAsync(Azure.ResourceManager.Support.Models.ServiceProblemClassificationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string serviceName) { throw null; } public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -187,6 +192,12 @@ public static partial class SupportExtensions public static System.Threading.Tasks.Task> CheckNameAvailabilitySupportTicketsNoSubscriptionAsync(this Azure.ResourceManager.Resources.TenantResource tenantResource, Azure.ResourceManager.Support.Models.SupportNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response CheckSupportTicketNameAvailability(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.Support.Models.SupportNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> CheckSupportTicketNameAvailabilityAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.Support.Models.SupportNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response ClassifyServiceProblem(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string problemServiceName, Azure.ResourceManager.Support.Models.ServiceProblemClassificationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> ClassifyServiceProblemAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string problemServiceName, Azure.ResourceManager.Support.Models.ServiceProblemClassificationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response ClassifyServicesServiceClassification(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.Support.Models.ServiceClassificationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> ClassifyServicesServiceClassificationAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.Support.Models.ServiceClassificationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Response ClassifyServicesServiceClassificationsNoSubscription(this Azure.ResourceManager.Resources.TenantResource tenantResource, Azure.ResourceManager.Support.Models.ServiceClassificationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> ClassifyServicesServiceClassificationsNoSubscriptionAsync(this Azure.ResourceManager.Resources.TenantResource tenantResource, Azure.ResourceManager.Support.Models.ServiceClassificationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.Support.ProblemClassificationResource GetProblemClassificationResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetSubscriptionFileWorkspace(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string fileWorkspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetSubscriptionFileWorkspaceAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string fileWorkspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -214,6 +225,8 @@ public static partial class SupportExtensions public static System.Threading.Tasks.Task> GetTenantSupportTicketAsync(this Azure.ResourceManager.Resources.TenantResource tenantResource, string supportTicketName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.Support.TenantSupportTicketResource GetTenantSupportTicketResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.Support.TenantSupportTicketCollection GetTenantSupportTickets(this Azure.ResourceManager.Resources.TenantResource tenantResource) { throw null; } + public static Azure.Response LookUpResourceId(this Azure.ResourceManager.Resources.TenantResource tenantResource, Azure.ResourceManager.Support.Models.LookUpResourceIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static System.Threading.Tasks.Task> LookUpResourceIdAsync(this Azure.ResourceManager.Resources.TenantResource tenantResource, Azure.ResourceManager.Support.Models.LookUpResourceIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class SupportFileDetailData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -277,7 +290,7 @@ protected SupportTicketCommunicationCollection() { } } public partial class SupportTicketCommunicationData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public SupportTicketCommunicationData(string subject, string body) { } + public SupportTicketCommunicationData() { } public string Body { get { throw null; } set { } } public Azure.ResourceManager.Support.Models.SupportTicketCommunicationDirection? CommunicationDirection { get { throw null; } } public Azure.ResourceManager.Support.Models.SupportTicketCommunicationType? CommunicationType { get { throw null; } } @@ -309,8 +322,8 @@ protected SupportTicketCommunicationResource() { } } public partial class SupportTicketData : Azure.ResourceManager.Models.ResourceData, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public SupportTicketData(string description, string problemClassificationId, Azure.ResourceManager.Support.Models.SupportSeverityLevel severity, Azure.ResourceManager.Support.Models.AdvancedDiagnosticConsent advancedDiagnosticConsent, Azure.ResourceManager.Support.Models.SupportContactProfile contactDetails, string title, string serviceId) { } - public Azure.ResourceManager.Support.Models.AdvancedDiagnosticConsent AdvancedDiagnosticConsent { get { throw null; } set { } } + public SupportTicketData() { } + public Azure.ResourceManager.Support.Models.AdvancedDiagnosticConsent? AdvancedDiagnosticConsent { get { throw null; } set { } } public Azure.ResourceManager.Support.Models.SupportContactProfile ContactDetails { get { throw null; } set { } } public System.DateTimeOffset? CreatedOn { get { throw null; } } public string Description { get { throw null; } set { } } @@ -328,7 +341,7 @@ public SupportTicketData(string description, string problemClassificationId, Azu public string ServiceDisplayName { get { throw null; } } public string ServiceId { get { throw null; } set { } } public Azure.ResourceManager.Support.Models.SupportServiceLevelAgreement ServiceLevelAgreement { get { throw null; } set { } } - public Azure.ResourceManager.Support.Models.SupportSeverityLevel Severity { get { throw null; } set { } } + public Azure.ResourceManager.Support.Models.SupportSeverityLevel? Severity { get { throw null; } set { } } public string Status { get { throw null; } } public string SupportEngineerEmailAddress { get { throw null; } } public string SupportPlanDisplayName { get { throw null; } } @@ -577,6 +590,10 @@ public partial class MockableSupportSubscriptionResource : Azure.ResourceManager protected MockableSupportSubscriptionResource() { } public virtual Azure.Response CheckSupportTicketNameAvailability(Azure.ResourceManager.Support.Models.SupportNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CheckSupportTicketNameAvailabilityAsync(Azure.ResourceManager.Support.Models.SupportNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ClassifyServiceProblem(string problemServiceName, Azure.ResourceManager.Support.Models.ServiceProblemClassificationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ClassifyServiceProblemAsync(string problemServiceName, Azure.ResourceManager.Support.Models.ServiceProblemClassificationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ClassifyServicesServiceClassification(Azure.ResourceManager.Support.Models.ServiceClassificationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ClassifyServicesServiceClassificationAsync(Azure.ResourceManager.Support.Models.ServiceClassificationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetSubscriptionFileWorkspace(string fileWorkspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetSubscriptionFileWorkspaceAsync(string fileWorkspaceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.Support.SubscriptionFileWorkspaceCollection GetSubscriptionFileWorkspaces() { throw null; } @@ -589,6 +606,8 @@ public partial class MockableSupportTenantResource : Azure.ResourceManager.ArmRe protected MockableSupportTenantResource() { } public virtual Azure.Response CheckNameAvailabilitySupportTicketsNoSubscription(Azure.ResourceManager.Support.Models.SupportNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> CheckNameAvailabilitySupportTicketsNoSubscriptionAsync(Azure.ResourceManager.Support.Models.SupportNameAvailabilityContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response ClassifyServicesServiceClassificationsNoSubscription(Azure.ResourceManager.Support.Models.ServiceClassificationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ClassifyServicesServiceClassificationsNoSubscriptionAsync(Azure.ResourceManager.Support.Models.ServiceClassificationContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response GetSupportAzureService(string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetSupportAzureServiceAsync(string serviceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.Support.SupportAzureServiceCollection GetSupportAzureServices() { throw null; } @@ -598,6 +617,8 @@ protected MockableSupportTenantResource() { } public virtual Azure.Response GetTenantSupportTicket(string supportTicketName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetTenantSupportTicketAsync(string supportTicketName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.Support.TenantSupportTicketCollection GetTenantSupportTickets() { throw null; } + public virtual Azure.Response LookUpResourceId(Azure.ResourceManager.Support.Models.LookUpResourceIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> LookUpResourceIdAsync(Azure.ResourceManager.Support.Models.LookUpResourceIdContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } } namespace Azure.ResourceManager.Support.Models @@ -624,19 +645,30 @@ public static partial class ArmSupportModelFactory { public static Azure.ResourceManager.Support.ChatTranscriptDetailData ChatTranscriptDetailData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.Collections.Generic.IEnumerable messages = null, System.DateTimeOffset? startOn = default(System.DateTimeOffset?)) { throw null; } public static Azure.ResourceManager.Support.Models.ChatTranscriptMessageProperties ChatTranscriptMessageProperties(Azure.ResourceManager.Support.Models.TranscriptContentType? contentType = default(Azure.ResourceManager.Support.Models.TranscriptContentType?), Azure.ResourceManager.Support.Models.SupportTicketCommunicationDirection? communicationDirection = default(Azure.ResourceManager.Support.Models.SupportTicketCommunicationDirection?), string sender = null, string body = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?)) { throw null; } + public static Azure.ResourceManager.Support.Models.ClassificationService ClassificationService(Azure.Core.ResourceIdentifier serviceId = null, string displayName = null, System.Collections.Generic.IEnumerable resourceTypes = null) { throw null; } public static Azure.ResourceManager.Support.FileWorkspaceDetailData FileWorkspaceDetailData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? expireOn = default(System.DateTimeOffset?)) { throw null; } - public static Azure.ResourceManager.Support.ProblemClassificationData ProblemClassificationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string displayName = null, System.Collections.Generic.IEnumerable secondaryConsentEnabled = null) { throw null; } + public static Azure.ResourceManager.Support.Models.LookUpResourceIdResult LookUpResourceIdResult(Azure.Core.ResourceIdentifier resourceId = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.Support.ProblemClassificationData ProblemClassificationData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, string displayName, System.Collections.Generic.IEnumerable secondaryConsentEnabled) { throw null; } + public static Azure.ResourceManager.Support.ProblemClassificationData ProblemClassificationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string displayName = null, System.Collections.Generic.IEnumerable secondaryConsentEnabled = null, System.Collections.Generic.IReadOnlyDictionary metadata = null, Azure.ResourceManager.Support.ProblemClassificationData parentProblemClassification = null) { throw null; } public static Azure.ResourceManager.Support.Models.SecondaryConsentEnabled SecondaryConsentEnabled(string description = null, string secondaryConsentEnabledType = null) { throw null; } - public static Azure.ResourceManager.Support.SupportAzureServiceData SupportAzureServiceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string displayName = null, System.Collections.Generic.IEnumerable resourceTypes = null) { throw null; } + public static Azure.ResourceManager.Support.Models.ServiceClassificationAnswer ServiceClassificationAnswer(Azure.Core.ResourceIdentifier serviceId = null, string displayName = null, System.Collections.Generic.IEnumerable resourceTypes = null, Azure.ResourceManager.Support.Models.ClassificationService childService = null) { throw null; } + public static Azure.ResourceManager.Support.Models.ServiceClassificationOutput ServiceClassificationOutput(System.Collections.Generic.IEnumerable serviceClassificationResults = null) { throw null; } + public static Azure.ResourceManager.Support.Models.ServiceProblemClassificationContent ServiceProblemClassificationContent(string issueSummary = null, Azure.Core.ResourceIdentifier resourceId = null) { throw null; } + public static Azure.ResourceManager.Support.Models.ServiceProblemClassificationListResult ServiceProblemClassificationListResult(System.Collections.Generic.IEnumerable problemClassificationResults = null) { throw null; } + public static Azure.ResourceManager.Support.Models.ServiceProblemClassificationResult ServiceProblemClassificationResult(string problemId = null, string title = null, string description = null, Azure.Core.ResourceIdentifier serviceId = null, string problemClassificationId = null, Azure.Core.ResourceIdentifier relatedServiceId = null, string displayName = null, System.Collections.Generic.IEnumerable resourceTypes = null) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public static Azure.ResourceManager.Support.SupportAzureServiceData SupportAzureServiceData(Azure.Core.ResourceIdentifier id, string name, Azure.Core.ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, string displayName, System.Collections.Generic.IEnumerable resourceTypes) { throw null; } + public static Azure.ResourceManager.Support.SupportAzureServiceData SupportAzureServiceData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string displayName = null, System.Collections.Generic.IEnumerable resourceTypes = null, System.Collections.Generic.IReadOnlyDictionary metadata = null) { throw null; } public static Azure.ResourceManager.Support.SupportFileDetailData SupportFileDetailData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), int? chunkSize = default(int?), int? fileSize = default(int?), int? numberOfChunks = default(int?)) { throw null; } public static Azure.ResourceManager.Support.Models.SupportNameAvailabilityResult SupportNameAvailabilityResult(bool? isNameAvailable = default(bool?), string reason = null, string message = null) { throw null; } public static Azure.ResourceManager.Support.Models.SupportServiceLevelAgreement SupportServiceLevelAgreement(System.DateTimeOffset? startOn = default(System.DateTimeOffset?), System.DateTimeOffset? expireOn = default(System.DateTimeOffset?), int? slaInMinutes = default(int?)) { throw null; } public static Azure.ResourceManager.Support.SupportTicketCommunicationData SupportTicketCommunicationData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, Azure.ResourceManager.Support.Models.SupportTicketCommunicationType? communicationType = default(Azure.ResourceManager.Support.Models.SupportTicketCommunicationType?), Azure.ResourceManager.Support.Models.SupportTicketCommunicationDirection? communicationDirection = default(Azure.ResourceManager.Support.Models.SupportTicketCommunicationDirection?), string sender = null, string subject = null, string body = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?)) { throw null; } - public static Azure.ResourceManager.Support.SupportTicketData SupportTicketData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string supportTicketId = null, string description = null, string problemClassificationId = null, string problemClassificationDisplayName = null, Azure.ResourceManager.Support.Models.SupportSeverityLevel severity = default(Azure.ResourceManager.Support.Models.SupportSeverityLevel), string enrollmentId = null, bool? require24X7Response = default(bool?), Azure.ResourceManager.Support.Models.AdvancedDiagnosticConsent advancedDiagnosticConsent = default(Azure.ResourceManager.Support.Models.AdvancedDiagnosticConsent), string problemScopingQuestions = null, string supportPlanId = null, Azure.ResourceManager.Support.Models.SupportContactProfile contactDetails = null, Azure.ResourceManager.Support.Models.SupportServiceLevelAgreement serviceLevelAgreement = null, string supportEngineerEmailAddress = null, string supportPlanType = null, string supportPlanDisplayName = null, string title = null, System.DateTimeOffset? problemStartOn = default(System.DateTimeOffset?), string serviceId = null, string serviceDisplayName = null, string status = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? modifiedOn = default(System.DateTimeOffset?), string fileWorkspaceName = null, Azure.ResourceManager.Support.Models.IsTemporaryTicket? isTemporaryTicket = default(Azure.ResourceManager.Support.Models.IsTemporaryTicket?), Azure.Core.ResourceIdentifier technicalTicketDetailsResourceId = null, Azure.ResourceManager.Support.Models.QuotaTicketDetails quotaTicketDetails = null, System.Collections.Generic.IEnumerable secondaryConsent = null) { throw null; } + public static Azure.ResourceManager.Support.SupportTicketData SupportTicketData(Azure.Core.ResourceIdentifier id = null, string name = null, Azure.Core.ResourceType resourceType = default(Azure.Core.ResourceType), Azure.ResourceManager.Models.SystemData systemData = null, string supportTicketId = null, string description = null, string problemClassificationId = null, string problemClassificationDisplayName = null, Azure.ResourceManager.Support.Models.SupportSeverityLevel? severity = default(Azure.ResourceManager.Support.Models.SupportSeverityLevel?), string enrollmentId = null, bool? require24X7Response = default(bool?), Azure.ResourceManager.Support.Models.AdvancedDiagnosticConsent? advancedDiagnosticConsent = default(Azure.ResourceManager.Support.Models.AdvancedDiagnosticConsent?), string problemScopingQuestions = null, string supportPlanId = null, Azure.ResourceManager.Support.Models.SupportContactProfile contactDetails = null, Azure.ResourceManager.Support.Models.SupportServiceLevelAgreement serviceLevelAgreement = null, string supportEngineerEmailAddress = null, string supportPlanType = null, string supportPlanDisplayName = null, string title = null, System.DateTimeOffset? problemStartOn = default(System.DateTimeOffset?), string serviceId = null, string serviceDisplayName = null, string status = null, System.DateTimeOffset? createdOn = default(System.DateTimeOffset?), System.DateTimeOffset? modifiedOn = default(System.DateTimeOffset?), string fileWorkspaceName = null, Azure.ResourceManager.Support.Models.IsTemporaryTicket? isTemporaryTicket = default(Azure.ResourceManager.Support.Models.IsTemporaryTicket?), Azure.Core.ResourceIdentifier technicalTicketDetailsResourceId = null, Azure.ResourceManager.Support.Models.QuotaTicketDetails quotaTicketDetails = null, System.Collections.Generic.IEnumerable secondaryConsent = null) { throw null; } } public partial class ChatTranscriptMessageProperties : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public ChatTranscriptMessageProperties() { } + public ChatTranscriptMessageProperties(string body) { } public string Body { get { throw null; } set { } } public Azure.ResourceManager.Support.Models.SupportTicketCommunicationDirection? CommunicationDirection { get { throw null; } } public Azure.ResourceManager.Support.Models.TranscriptContentType? ContentType { get { throw null; } } @@ -648,6 +680,18 @@ public ChatTranscriptMessageProperties() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ClassificationService : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ClassificationService() { } + public string DisplayName { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ResourceTypes { get { throw null; } } + public Azure.Core.ResourceIdentifier ServiceId { get { throw null; } } + Azure.ResourceManager.Support.Models.ClassificationService System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.ClassificationService System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct IsTemporaryTicket : System.IEquatable { @@ -666,6 +710,27 @@ public ChatTranscriptMessageProperties() { } public static bool operator !=(Azure.ResourceManager.Support.Models.IsTemporaryTicket left, Azure.ResourceManager.Support.Models.IsTemporaryTicket right) { throw null; } public override string ToString() { throw null; } } + public partial class LookUpResourceIdContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public LookUpResourceIdContent() { } + public string Identifier { get { throw null; } set { } } + public Azure.ResourceManager.Support.Models.SupportResourceTypeName? ResourceType { get { throw null; } set { } } + Azure.ResourceManager.Support.Models.LookUpResourceIdContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.LookUpResourceIdContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class LookUpResourceIdResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal LookUpResourceIdResult() { } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } } + Azure.ResourceManager.Support.Models.LookUpResourceIdResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.LookUpResourceIdResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct PreferredContactMethod : System.IEquatable { @@ -718,6 +783,76 @@ internal SecondaryConsentEnabled() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ServiceClassificationAnswer : Azure.ResourceManager.Support.Models.ClassificationService, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ServiceClassificationAnswer() { } + public Azure.ResourceManager.Support.Models.ClassificationService ChildService { get { throw null; } } + Azure.ResourceManager.Support.Models.ServiceClassificationAnswer System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.ServiceClassificationAnswer System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ServiceClassificationContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ServiceClassificationContent() { } + public string AdditionalContext { get { throw null; } set { } } + public string IssueSummary { get { throw null; } set { } } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + Azure.ResourceManager.Support.Models.ServiceClassificationContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.ServiceClassificationContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ServiceClassificationOutput : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ServiceClassificationOutput() { } + public System.Collections.Generic.IReadOnlyList ServiceClassificationResults { get { throw null; } } + Azure.ResourceManager.Support.Models.ServiceClassificationOutput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.ServiceClassificationOutput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ServiceProblemClassificationContent : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ServiceProblemClassificationContent(string issueSummary) { } + public string IssueSummary { get { throw null; } } + public Azure.Core.ResourceIdentifier ResourceId { get { throw null; } set { } } + Azure.ResourceManager.Support.Models.ServiceProblemClassificationContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.ServiceProblemClassificationContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ServiceProblemClassificationListResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ServiceProblemClassificationListResult() { } + public System.Collections.Generic.IReadOnlyList ProblemClassificationResults { get { throw null; } } + Azure.ResourceManager.Support.Models.ServiceProblemClassificationListResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.ServiceProblemClassificationListResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ServiceProblemClassificationResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ServiceProblemClassificationResult() { } + public string Description { get { throw null; } } + public string DisplayName { get { throw null; } } + public string ProblemClassificationId { get { throw null; } } + public string ProblemId { get { throw null; } } + public Azure.Core.ResourceIdentifier RelatedServiceId { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ResourceTypes { get { throw null; } } + public Azure.Core.ResourceIdentifier ServiceId { get { throw null; } } + public string Title { get { throw null; } } + Azure.ResourceManager.Support.Models.ServiceProblemClassificationResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.ResourceManager.Support.Models.ServiceProblemClassificationResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class SupportContactProfile : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SupportContactProfile(string firstName, string lastName, Azure.ResourceManager.Support.Models.PreferredContactMethod preferredContactMethod, string primaryEmailAddress, string preferredTimeZone, string country, string preferredSupportLanguage) { } @@ -793,6 +928,23 @@ public enum SupportResourceType MicrosoftSupportSupportTickets = 0, MicrosoftSupportCommunications = 1, } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SupportResourceTypeName : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SupportResourceTypeName(string value) { throw null; } + public static Azure.ResourceManager.Support.Models.SupportResourceTypeName MicrosoftSupportSupportTickets { get { throw null; } } + public bool Equals(Azure.ResourceManager.Support.Models.SupportResourceTypeName other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Support.Models.SupportResourceTypeName left, Azure.ResourceManager.Support.Models.SupportResourceTypeName right) { throw null; } + public static implicit operator Azure.ResourceManager.Support.Models.SupportResourceTypeName (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Support.Models.SupportResourceTypeName left, Azure.ResourceManager.Support.Models.SupportResourceTypeName right) { throw null; } + public override string ToString() { throw null; } + } public partial class SupportServiceLevelAgreement : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public SupportServiceLevelAgreement() { } diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_ProblemClassificationCollection.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_ProblemClassificationCollection.cs index f5818d89acf4..39e1c7e3bb26 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_ProblemClassificationCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_ProblemClassificationCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_ProblemClassificationCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetsListOfProblemClassificationsForAServiceForWhichASupportTicketCanBeCreated() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListProblemClassifications.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListProblemClassifications.json // this example is just showing the usage of "ProblemClassifications_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task GetAll_GetsListOfProblemClassificationsForAServiceForWhichASup [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsDetailsOfProblemClassificationForAzureService() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetProblemClassification.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetProblemClassification.json // this example is just showing the usage of "ProblemClassifications_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -87,7 +87,7 @@ public async Task Get_GetsDetailsOfProblemClassificationForAzureService() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetsDetailsOfProblemClassificationForAzureService() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetProblemClassification.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetProblemClassification.json // this example is just showing the usage of "ProblemClassifications_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -116,7 +116,7 @@ public async Task Exists_GetsDetailsOfProblemClassificationForAzureService() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetsDetailsOfProblemClassificationForAzureService() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetProblemClassification.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetProblemClassification.json // this example is just showing the usage of "ProblemClassifications_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_ProblemClassificationResource.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_ProblemClassificationResource.cs index bc0b07b7e6ec..535136481c60 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_ProblemClassificationResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_ProblemClassificationResource.cs @@ -9,17 +9,49 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Identity; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.Support.Models; namespace Azure.ResourceManager.Support.Samples { public partial class Sample_ProblemClassificationResource { + // Classify list of problemClassifications for a specified Azure service for a subscription + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task ClassifyServiceProblem_ClassifyListOfProblemClassificationsForASpecifiedAzureServiceForASubscription() + { + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ClassifyProblemClassificationsForSubscription.json + // this example is just showing the usage of "ProblemClassifications_classifyProblems" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + string problemServiceName = "serviceId1"; + ServiceProblemClassificationContent content = new ServiceProblemClassificationContent("Can not connect to Windows VM") + { + ResourceId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/vmname"), + }; + ServiceProblemClassificationListResult result = await subscriptionResource.ClassifyServiceProblemAsync(problemServiceName, content); + + Console.WriteLine($"Succeeded: {result}"); + } + // Gets details of problemClassification for Azure service [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsDetailsOfProblemClassificationForAzureService() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetProblemClassification.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetProblemClassification.json // this example is just showing the usage of "ProblemClassifications_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SubscriptionFileWorkspaceCollection.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SubscriptionFileWorkspaceCollection.cs index e6b5d39e7ac8..44ab520de86c 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SubscriptionFileWorkspaceCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SubscriptionFileWorkspaceCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_SubscriptionFileWorkspaceCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDetailsOfASubscriptionFileWorkspace() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetFileWorkspaceDetailsForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetFileWorkspaceDetailsForSubscription.json // this example is just showing the usage of "FileWorkspaces_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task Get_GetDetailsOfASubscriptionFileWorkspace() // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -53,7 +53,7 @@ public async Task Get_GetDetailsOfASubscriptionFileWorkspace() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetDetailsOfASubscriptionFileWorkspace() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetFileWorkspaceDetailsForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetFileWorkspaceDetailsForSubscription.json // this example is just showing the usage of "FileWorkspaces_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -63,7 +63,7 @@ public async Task Exists_GetDetailsOfASubscriptionFileWorkspace() // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -82,7 +82,7 @@ public async Task Exists_GetDetailsOfASubscriptionFileWorkspace() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetDetailsOfASubscriptionFileWorkspace() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetFileWorkspaceDetailsForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetFileWorkspaceDetailsForSubscription.json // this example is just showing the usage of "FileWorkspaces_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -92,7 +92,7 @@ public async Task GetIfExists_GetDetailsOfASubscriptionFileWorkspace() // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -118,12 +118,12 @@ public async Task GetIfExists_GetDetailsOfASubscriptionFileWorkspace() } } - // Create a file workspace for a subscription + // Create a subscription scoped file workspace [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_CreateAFileWorkspaceForASubscription() + public async Task CreateOrUpdate_CreateASubscriptionScopedFileWorkspace() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateFileWorkspaceForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateFileWorkspaceForSubscription.json // this example is just showing the usage of "FileWorkspaces_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -133,7 +133,7 @@ public async Task CreateOrUpdate_CreateAFileWorkspaceForASubscription() // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SubscriptionFileWorkspaceResource.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SubscriptionFileWorkspaceResource.cs index 6a0aecced7f1..7b97f7b8187a 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SubscriptionFileWorkspaceResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SubscriptionFileWorkspaceResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SubscriptionFileWorkspaceResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDetailsOfASubscriptionFileWorkspace() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetFileWorkspaceDetailsForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetFileWorkspaceDetailsForSubscription.json // this example is just showing the usage of "FileWorkspaces_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -29,7 +29,7 @@ public async Task Get_GetDetailsOfASubscriptionFileWorkspace() // this example assumes you already have this SubscriptionFileWorkspaceResource created on azure // for more information of creating SubscriptionFileWorkspaceResource, please refer to the document of SubscriptionFileWorkspaceResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string fileWorkspaceName = "testworkspace"; ResourceIdentifier subscriptionFileWorkspaceResourceId = SubscriptionFileWorkspaceResource.CreateResourceIdentifier(subscriptionId, fileWorkspaceName); SubscriptionFileWorkspaceResource subscriptionFileWorkspace = client.GetSubscriptionFileWorkspaceResource(subscriptionFileWorkspaceResourceId); @@ -44,12 +44,12 @@ public async Task Get_GetDetailsOfASubscriptionFileWorkspace() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // Create a file workspace for a subscription + // Create a subscription scoped file workspace [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_CreateAFileWorkspaceForASubscription() + public async Task Update_CreateASubscriptionScopedFileWorkspace() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateFileWorkspaceForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateFileWorkspaceForSubscription.json // this example is just showing the usage of "FileWorkspaces_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -59,7 +59,7 @@ public async Task Update_CreateAFileWorkspaceForASubscription() // this example assumes you already have this SubscriptionFileWorkspaceResource created on azure // for more information of creating SubscriptionFileWorkspaceResource, please refer to the document of SubscriptionFileWorkspaceResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string fileWorkspaceName = "testworkspace"; ResourceIdentifier subscriptionFileWorkspaceResourceId = SubscriptionFileWorkspaceResource.CreateResourceIdentifier(subscriptionId, fileWorkspaceName); SubscriptionFileWorkspaceResource subscriptionFileWorkspace = client.GetSubscriptionFileWorkspaceResource(subscriptionFileWorkspaceResourceId); diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs new file mode 100644 index 000000000000..2e59c5837dc3 --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SubscriptionResourceExtensions.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Resources; +using Azure.ResourceManager.Support.Models; + +namespace Azure.ResourceManager.Support.Samples +{ + public partial class Sample_SubscriptionResourceExtensions + { + // Classify list of Azure services for a subscription + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task ClassifyServicesServiceClassification_ClassifyListOfAzureServicesForASubscription() + { + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ClassifyServicesForSubscription.json + // this example is just showing the usage of "ServiceClassifications_classifyServices" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SubscriptionResource created on azure + // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource + string subscriptionId = "00000000-0000-0000-0000-000000000000"; + ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); + SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); + + // invoke the operation + ServiceClassificationContent content = new ServiceClassificationContent() + { + IssueSummary = "Can not connect to Windows VM", + ResourceId = new ResourceIdentifier("/subscriptions/76cb77fa-8b17-4eab-9493-b65dace99813/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/vmname"), + }; + ServiceClassificationOutput result = await subscriptionResource.ClassifyServicesServiceClassificationAsync(content); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SubscriptionSupportTicketCollection.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SubscriptionSupportTicketCollection.cs index 639bc7dee98b..2acf9f1e06ae 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SubscriptionSupportTicketCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SubscriptionSupportTicketCollection.cs @@ -21,7 +21,7 @@ public partial class Sample_SubscriptionSupportTicketCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListSupportTicketsCreatedOnOrAfterACertainDateAndInOpenStateForASubscription() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListSupportTicketsCreatedOnOrAfterAndInOpenStateBySubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListSupportTicketsCreatedOnOrAfterAndInOpenStateBySubscription.json // this example is just showing the usage of "SupportTickets_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -31,7 +31,7 @@ public async Task GetAll_ListSupportTicketsCreatedOnOrAfterACertainDateAndInOpen // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -57,7 +57,7 @@ public async Task GetAll_ListSupportTicketsCreatedOnOrAfterACertainDateAndInOpen [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListSupportTicketsCreatedOnOrAfterACertainDateAndInUpdatingStateForASubscription() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListSupportTicketsCreatedOnOrAfterAndInUpdatingStateBySubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListSupportTicketsCreatedOnOrAfterAndInUpdatingStateBySubscription.json // this example is just showing the usage of "SupportTickets_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -67,7 +67,7 @@ public async Task GetAll_ListSupportTicketsCreatedOnOrAfterACertainDateAndInUpda // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -93,7 +93,7 @@ public async Task GetAll_ListSupportTicketsCreatedOnOrAfterACertainDateAndInUpda [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListSupportTicketsForASubscription() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListSupportTicketsBySubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListSupportTicketsBySubscription.json // this example is just showing the usage of "SupportTickets_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -103,7 +103,7 @@ public async Task GetAll_ListSupportTicketsForASubscription() // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -128,7 +128,7 @@ public async Task GetAll_ListSupportTicketsForASubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListSupportTicketsInOpenStateForASubscription() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListSupportTicketsInOpenStateBySubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListSupportTicketsInOpenStateBySubscription.json // this example is just showing the usage of "SupportTickets_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -138,7 +138,7 @@ public async Task GetAll_ListSupportTicketsInOpenStateForASubscription() // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -164,7 +164,7 @@ public async Task GetAll_ListSupportTicketsInOpenStateForASubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListSupportTicketsInUpdatingStateForASubscription() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListSupportTicketsInUpdatingStateBySubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListSupportTicketsInUpdatingStateBySubscription.json // this example is just showing the usage of "SupportTickets_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -174,7 +174,7 @@ public async Task GetAll_ListSupportTicketsInUpdatingStateForASubscription() // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -200,7 +200,7 @@ public async Task GetAll_ListSupportTicketsInUpdatingStateForASubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListSupportTicketsWithACertainProblemClassificationIdForASubscription() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListSupportTicketsProblemClassificationIdEqualsForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListSupportTicketsProblemClassificationIdEqualsForSubscription.json // this example is just showing the usage of "SupportTickets_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -210,7 +210,7 @@ public async Task GetAll_ListSupportTicketsWithACertainProblemClassificationIdFo // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -236,7 +236,7 @@ public async Task GetAll_ListSupportTicketsWithACertainProblemClassificationIdFo [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListSupportTicketsWithACertainServiceIdForASubscription() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListSupportTicketsServiceIdEqualsForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListSupportTicketsServiceIdEqualsForSubscription.json // this example is just showing the usage of "SupportTickets_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -246,7 +246,7 @@ public async Task GetAll_ListSupportTicketsWithACertainServiceIdForASubscription // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -272,7 +272,7 @@ public async Task GetAll_ListSupportTicketsWithACertainServiceIdForASubscription [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDetailsOfASubscriptionTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetSubscriptionSupportTicketDetails.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetSubscriptionSupportTicketDetails.json // this example is just showing the usage of "SupportTickets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -282,7 +282,7 @@ public async Task Get_GetDetailsOfASubscriptionTicket() // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -305,7 +305,7 @@ public async Task Get_GetDetailsOfASubscriptionTicket() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetDetailsOfASubscriptionTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetSubscriptionSupportTicketDetails.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetSubscriptionSupportTicketDetails.json // this example is just showing the usage of "SupportTickets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -315,7 +315,7 @@ public async Task Exists_GetDetailsOfASubscriptionTicket() // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -334,7 +334,7 @@ public async Task Exists_GetDetailsOfASubscriptionTicket() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetDetailsOfASubscriptionTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetSubscriptionSupportTicketDetails.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetSubscriptionSupportTicketDetails.json // this example is just showing the usage of "SupportTickets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -344,7 +344,7 @@ public async Task GetIfExists_GetDetailsOfASubscriptionTicket() // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -370,12 +370,12 @@ public async Task GetIfExists_GetDetailsOfASubscriptionTicket() } } - // Create a ticket for Billing related issues + // Create a subscription scoped ticket for Billing related issues [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_CreateATicketForBillingRelatedIssues() + public async Task CreateOrUpdate_CreateASubscriptionScopedTicketForBillingRelatedIssues() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateBillingSupportTicketForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateBillingSupportTicketForSubscription.json // this example is just showing the usage of "SupportTickets_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -385,7 +385,7 @@ public async Task CreateOrUpdate_CreateATicketForBillingRelatedIssues() // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -394,9 +394,15 @@ public async Task CreateOrUpdate_CreateATicketForBillingRelatedIssues() // invoke the operation string supportTicketName = "testticket"; - SupportTicketData data = new SupportTicketData("my description", "/providers/Microsoft.Support/services/billing_service_guid/problemClassifications/billing_problemClassification_guid", SupportSeverityLevel.Moderate, AdvancedDiagnosticConsent.No, new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), "my title", "/providers/Microsoft.Support/services/billing_service_guid") + SupportTicketData data = new SupportTicketData() { + Description = "my description", + ProblemClassificationId = "/providers/Microsoft.Support/services/billing_service_guid/problemClassifications/billing_problemClassification_guid", + Severity = SupportSeverityLevel.Moderate, SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + ContactDetails = new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), + Title = "my title", + ServiceId = "/providers/Microsoft.Support/services/billing_service_guid", FileWorkspaceName = "6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066", }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data); @@ -409,12 +415,12 @@ public async Task CreateOrUpdate_CreateATicketForBillingRelatedIssues() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // Create a ticket for Subscription Management related issues for a subscription + // Create a subscription scoped ticket for Subscription Management related issues [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_CreateATicketForSubscriptionManagementRelatedIssuesForASubscription() + public async Task CreateOrUpdate_CreateASubscriptionScopedTicketForSubscriptionManagementRelatedIssues() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateSubMgmtSupportTicketForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateSubMgmtSupportTicketForSubscription.json // this example is just showing the usage of "SupportTickets_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -424,7 +430,7 @@ public async Task CreateOrUpdate_CreateATicketForSubscriptionManagementRelatedIs // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -433,9 +439,15 @@ public async Task CreateOrUpdate_CreateATicketForSubscriptionManagementRelatedIs // invoke the operation string supportTicketName = "testticket"; - SupportTicketData data = new SupportTicketData("my description", "/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/subscription_management_problemClassification_guid", SupportSeverityLevel.Moderate, AdvancedDiagnosticConsent.No, new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), "my title", "/providers/Microsoft.Support/services/subscription_management_service_guid") + SupportTicketData data = new SupportTicketData() { + Description = "my description", + ProblemClassificationId = "/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/subscription_management_problemClassification_guid", + Severity = SupportSeverityLevel.Moderate, SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + ContactDetails = new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), + Title = "my title", + ServiceId = "/providers/Microsoft.Support/services/subscription_management_service_guid", FileWorkspaceName = "6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066", }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data); @@ -448,12 +460,12 @@ public async Task CreateOrUpdate_CreateATicketForSubscriptionManagementRelatedIs Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // Create a ticket for Technical issue related to a specific resource for a subscription + // Create a subscription scoped ticket for Technical issue related to a specific resource [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_CreateATicketForTechnicalIssueRelatedToASpecificResourceForASubscription() + public async Task CreateOrUpdate_CreateASubscriptionScopedTicketForTechnicalIssueRelatedToASpecificResource() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateTechnicalSupportTicketForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateTechnicalSupportTicketForSubscription.json // this example is just showing the usage of "SupportTickets_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -463,7 +475,7 @@ public async Task CreateOrUpdate_CreateATicketForTechnicalIssueRelatedToASpecifi // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -472,12 +484,19 @@ public async Task CreateOrUpdate_CreateATicketForTechnicalIssueRelatedToASpecifi // invoke the operation string supportTicketName = "testticket"; - SupportTicketData data = new SupportTicketData("my description", "/providers/Microsoft.Support/services/virtual_machine_running_linux_service_guid/problemClassifications/problemClassification_guid", SupportSeverityLevel.Moderate, AdvancedDiagnosticConsent.Yes, new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), "my title", "/providers/Microsoft.Support/services/cddd3eb5-1830-b494-44fd-782f691479dc") + SupportTicketData data = new SupportTicketData() { + Description = "my description", + ProblemClassificationId = "/providers/Microsoft.Support/services/virtual_machine_running_linux_service_guid/problemClassifications/problemClassification_guid", + Severity = SupportSeverityLevel.Moderate, + AdvancedDiagnosticConsent = AdvancedDiagnosticConsent.Yes, ProblemScopingQuestions = "{\"articleId\":\"076846c1-4c0b-4b21-91c6-1a30246b3867\",\"scopingDetails\":[{\"question\":\"When did the problem begin?\",\"controlId\":\"problem_start_time\",\"orderId\":1,\"inputType\":\"static\",\"answer\":{\"displayValue\":\"2023-08-31T18:55:00.739Z\",\"value\":\"2023-08-31T18:55:00.739Z\",\"type\":\"datetime\"}},{\"question\":\"API Type of the Cosmos DB account\",\"controlId\":\"api_type\",\"orderId\":2,\"inputType\":\"static\",\"answer\":{\"displayValue\":\"Table\",\"value\":\"tables\",\"type\":\"string\"}},{\"question\":\"Table name\",\"controlId\":\"collection_name_table\",\"orderId\":11,\"inputType\":\"nonstatic\",\"answer\":{\"displayValue\":\"Select Table Name\",\"value\":\"dont_know_answer\",\"type\":\"string\"}},{\"question\":\"Provide additional details about the issue you're facing\",\"controlId\":\"problem_description\",\"orderId\":12,\"inputType\":\"nonstatic\",\"answer\":{\"displayValue\":\"test ticket, please ignore and close\",\"value\":\"test ticket, please ignore and close\",\"type\":\"string\"}}]}", SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + ContactDetails = new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), + Title = "my title", + ServiceId = "/providers/Microsoft.Support/services/cddd3eb5-1830-b494-44fd-782f691479dc", FileWorkspaceName = "6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066", - TechnicalTicketDetailsResourceId = new ResourceIdentifier("/subscriptions/132d901f-189d-4381-9214-fe68e27e05a1/resourceGroups/test/providers/Microsoft.Compute/virtualMachines/testserver"), + TechnicalTicketDetailsResourceId = new ResourceIdentifier("/subscriptions/subid/resourceGroups/test/providers/Microsoft.Compute/virtualMachines/testserver"), SecondaryConsent = { new SecondaryConsent() @@ -502,7 +521,7 @@ public async Task CreateOrUpdate_CreateATicketForTechnicalIssueRelatedToASpecifi [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForActiveJobsAndJobSchedulesForABatchAccount() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateBatchQuotaTicketForSpecificBatchAccountForActiveJobs.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateBatchQuotaTicketForSpecificBatchAccountForActiveJobs.json // this example is just showing the usage of "SupportTickets_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -512,7 +531,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForActiveJob // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -521,9 +540,16 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForActiveJob // invoke the operation string supportTicketName = "testticket"; - SupportTicketData data = new SupportTicketData("my description", "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid", SupportSeverityLevel.Moderate, AdvancedDiagnosticConsent.Yes, new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), "my title", "/providers/Microsoft.Support/services/quota_service_guid") + SupportTicketData data = new SupportTicketData() { + Description = "my description", + ProblemClassificationId = "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid", + Severity = SupportSeverityLevel.Moderate, + AdvancedDiagnosticConsent = AdvancedDiagnosticConsent.Yes, SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + ContactDetails = new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), + Title = "my title", + ServiceId = "/providers/Microsoft.Support/services/quota_service_guid", QuotaTicketDetails = new QuotaTicketDetails() { QuotaChangeRequestSubType = "Account", @@ -553,7 +579,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForActiveJob [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForAzureSQLManagedInstance() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateSqlManagedInstanceQuotaTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateSqlManagedInstanceQuotaTicket.json // this example is just showing the usage of "SupportTickets_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -563,7 +589,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForAzureSQLM // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -572,9 +598,16 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForAzureSQLM // invoke the operation string supportTicketName = "testticket"; - SupportTicketData data = new SupportTicketData("my description", "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_managedinstance_problemClassification_guid", SupportSeverityLevel.Moderate, AdvancedDiagnosticConsent.Yes, new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), "my title", "/providers/Microsoft.Support/services/quota_service_guid") + SupportTicketData data = new SupportTicketData() { + Description = "my description", + ProblemClassificationId = "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_managedinstance_problemClassification_guid", + Severity = SupportSeverityLevel.Moderate, + AdvancedDiagnosticConsent = AdvancedDiagnosticConsent.Yes, SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + ContactDetails = new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), + Title = "my title", + ServiceId = "/providers/Microsoft.Support/services/quota_service_guid", QuotaTicketDetails = new QuotaTicketDetails() { QuotaChangeRequestSubType = "SQLMI", @@ -608,7 +641,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForAzureSQLM [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForBatchAccountsForASubscription() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateBatchQuotaTicketForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateBatchQuotaTicketForSubscription.json // this example is just showing the usage of "SupportTickets_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -618,7 +651,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForBatchAcco // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -627,9 +660,16 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForBatchAcco // invoke the operation string supportTicketName = "testticket"; - SupportTicketData data = new SupportTicketData("my description", "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid", SupportSeverityLevel.Moderate, AdvancedDiagnosticConsent.Yes, new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), "my title", "/providers/Microsoft.Support/services/quota_service_guid") + SupportTicketData data = new SupportTicketData() { + Description = "my description", + ProblemClassificationId = "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid", + Severity = SupportSeverityLevel.Moderate, + AdvancedDiagnosticConsent = AdvancedDiagnosticConsent.Yes, SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + ContactDetails = new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), + Title = "my title", + ServiceId = "/providers/Microsoft.Support/services/quota_service_guid", QuotaTicketDetails = new QuotaTicketDetails() { QuotaChangeRequestSubType = "Subscription", @@ -659,7 +699,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForBatchAcco [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForComputeVMCores() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateCoresQuotaTicketForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateCoresQuotaTicketForSubscription.json // this example is just showing the usage of "SupportTickets_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -669,7 +709,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForComputeVM // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -678,9 +718,16 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForComputeVM // invoke the operation string supportTicketName = "testticket"; - SupportTicketData data = new SupportTicketData("my description", "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/cores_problemClassification_guid", SupportSeverityLevel.Moderate, AdvancedDiagnosticConsent.Yes, new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), "my title", "/providers/Microsoft.Support/services/quota_service_guid") + SupportTicketData data = new SupportTicketData() { + Description = "my description", + ProblemClassificationId = "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/cores_problemClassification_guid", + Severity = SupportSeverityLevel.Moderate, + AdvancedDiagnosticConsent = AdvancedDiagnosticConsent.Yes, SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + ContactDetails = new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), + Title = "my title", + ServiceId = "/providers/Microsoft.Support/services/quota_service_guid", QuotaTicketDetails = new QuotaTicketDetails() { QuotaChangeRequestVersion = "1.0", @@ -709,7 +756,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForComputeVM [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForDTUsForAzureSynapseAnalytics() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateSqlDatawarehouseQuotaTicketForDTUs.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateSqlDatawarehouseQuotaTicketForDTUs.json // this example is just showing the usage of "SupportTickets_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -719,7 +766,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForDTUsForAz // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -728,9 +775,16 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForDTUsForAz // invoke the operation string supportTicketName = "testticket"; - SupportTicketData data = new SupportTicketData("my description", "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_datawarehouse_problemClassification_guid", SupportSeverityLevel.Moderate, AdvancedDiagnosticConsent.Yes, new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), "my title", "/providers/Microsoft.Support/services/quota_service_guid") + SupportTicketData data = new SupportTicketData() { + Description = "my description", + ProblemClassificationId = "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_datawarehouse_problemClassification_guid", + Severity = SupportSeverityLevel.Moderate, + AdvancedDiagnosticConsent = AdvancedDiagnosticConsent.Yes, SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + ContactDetails = new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), + Title = "my title", + ServiceId = "/providers/Microsoft.Support/services/quota_service_guid", QuotaTicketDetails = new QuotaTicketDetails() { QuotaChangeRequestSubType = "DTUs", @@ -760,7 +814,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForDTUsForAz [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForDTUsForSQLDatabase() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateSqlDatabaseQuotaTicketForDTUs.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateSqlDatabaseQuotaTicketForDTUs.json // this example is just showing the usage of "SupportTickets_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -770,7 +824,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForDTUsForSQ // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -779,9 +833,16 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForDTUsForSQ // invoke the operation string supportTicketName = "testticket"; - SupportTicketData data = new SupportTicketData("my description", "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_database_problemClassification_guid", SupportSeverityLevel.Moderate, AdvancedDiagnosticConsent.Yes, new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), "my title", "/providers/Microsoft.Support/services/quota_service_guid") + SupportTicketData data = new SupportTicketData() { + Description = "my description", + ProblemClassificationId = "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_database_problemClassification_guid", + Severity = SupportSeverityLevel.Moderate, + AdvancedDiagnosticConsent = AdvancedDiagnosticConsent.Yes, SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + ContactDetails = new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), + Title = "my title", + ServiceId = "/providers/Microsoft.Support/services/quota_service_guid", QuotaTicketDetails = new QuotaTicketDetails() { QuotaChangeRequestSubType = "DTUs", @@ -811,7 +872,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForDTUsForSQ [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForLowPriorityCoresForMachineLearningService() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateMachineLearningQuotaTicketForLowPriorityCores.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateMachineLearningQuotaTicketForLowPriorityCores.json // this example is just showing the usage of "SupportTickets_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -821,7 +882,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForLowPriori // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -830,9 +891,16 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForLowPriori // invoke the operation string supportTicketName = "testticket"; - SupportTicketData data = new SupportTicketData("my description", "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/machine_learning_service_problemClassification_guid", SupportSeverityLevel.Moderate, AdvancedDiagnosticConsent.Yes, new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), "my title", "/providers/Microsoft.Support/services/quota_service_guid") + SupportTicketData data = new SupportTicketData() { + Description = "my description", + ProblemClassificationId = "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/machine_learning_service_problemClassification_guid", + Severity = SupportSeverityLevel.Moderate, + AdvancedDiagnosticConsent = AdvancedDiagnosticConsent.Yes, SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + ContactDetails = new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), + Title = "my title", + ServiceId = "/providers/Microsoft.Support/services/quota_service_guid", QuotaTicketDetails = new QuotaTicketDetails() { QuotaChangeRequestSubType = "BatchAml", @@ -862,7 +930,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForLowPriori [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForLowPriorityCoresForABatchAccount() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateBatchQuotaTicketForSpecificBatchAccountForLowPriorityCores.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateBatchQuotaTicketForSpecificBatchAccountForLowPriorityCores.json // this example is just showing the usage of "SupportTickets_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -872,7 +940,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForLowPriori // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -881,9 +949,16 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForLowPriori // invoke the operation string supportTicketName = "testticket"; - SupportTicketData data = new SupportTicketData("my description", "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid", SupportSeverityLevel.Moderate, AdvancedDiagnosticConsent.Yes, new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), "my title", "/providers/Microsoft.Support/services/quota_service_guid") + SupportTicketData data = new SupportTicketData() { + Description = "my description", + ProblemClassificationId = "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid", + Severity = SupportSeverityLevel.Moderate, + AdvancedDiagnosticConsent = AdvancedDiagnosticConsent.Yes, SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + ContactDetails = new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), + Title = "my title", + ServiceId = "/providers/Microsoft.Support/services/quota_service_guid", QuotaTicketDetails = new QuotaTicketDetails() { QuotaChangeRequestSubType = "Account", @@ -913,7 +988,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForLowPriori [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForPoolsForABatchAccount() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateBatchQuotaTicketForSpecificBatchAccountForPools.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateBatchQuotaTicketForSpecificBatchAccountForPools.json // this example is just showing the usage of "SupportTickets_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -923,7 +998,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForPoolsForA // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -932,9 +1007,16 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForPoolsForA // invoke the operation string supportTicketName = "testticket"; - SupportTicketData data = new SupportTicketData("my description", "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid", SupportSeverityLevel.Moderate, AdvancedDiagnosticConsent.Yes, new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), "my title", "/providers/Microsoft.Support/services/quota_service_guid") + SupportTicketData data = new SupportTicketData() { + Description = "my description", + ProblemClassificationId = "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid", + Severity = SupportSeverityLevel.Moderate, + AdvancedDiagnosticConsent = AdvancedDiagnosticConsent.Yes, SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + ContactDetails = new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), + Title = "my title", + ServiceId = "/providers/Microsoft.Support/services/quota_service_guid", QuotaTicketDetails = new QuotaTicketDetails() { QuotaChangeRequestSubType = "Account", @@ -964,7 +1046,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForPoolsForA [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForServersForAzureSynapseAnalytics() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateSqlDatawarehouseQuotaTicketForServers.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateSqlDatawarehouseQuotaTicketForServers.json // this example is just showing the usage of "SupportTickets_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -974,7 +1056,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForServersFo // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -983,9 +1065,16 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForServersFo // invoke the operation string supportTicketName = "testticket"; - SupportTicketData data = new SupportTicketData("my description", "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_datawarehouse_problemClassification_guid", SupportSeverityLevel.Moderate, AdvancedDiagnosticConsent.Yes, new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), "my title", "/providers/Microsoft.Support/services/quota_service_guid") + SupportTicketData data = new SupportTicketData() { + Description = "my description", + ProblemClassificationId = "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_datawarehouse_problemClassification_guid", + Severity = SupportSeverityLevel.Moderate, + AdvancedDiagnosticConsent = AdvancedDiagnosticConsent.Yes, SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + ContactDetails = new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), + Title = "my title", + ServiceId = "/providers/Microsoft.Support/services/quota_service_guid", QuotaTicketDetails = new QuotaTicketDetails() { QuotaChangeRequestSubType = "Servers", @@ -1015,7 +1104,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForServersFo [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForServersForSQLDatabase() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateSqlDatabaseQuotaTicketForServers.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateSqlDatabaseQuotaTicketForServers.json // this example is just showing the usage of "SupportTickets_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1025,7 +1114,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForServersFo // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -1034,9 +1123,16 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForServersFo // invoke the operation string supportTicketName = "testticket"; - SupportTicketData data = new SupportTicketData("my description", "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_database_problemClassification_guid", SupportSeverityLevel.Moderate, AdvancedDiagnosticConsent.Yes, new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), "my title", "/providers/Microsoft.Support/services/quota_service_guid") + SupportTicketData data = new SupportTicketData() { + Description = "my description", + ProblemClassificationId = "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/sql_database_problemClassification_guid", + Severity = SupportSeverityLevel.Moderate, + AdvancedDiagnosticConsent = AdvancedDiagnosticConsent.Yes, SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + ContactDetails = new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), + Title = "my title", + ServiceId = "/providers/Microsoft.Support/services/quota_service_guid", QuotaTicketDetails = new QuotaTicketDetails() { QuotaChangeRequestSubType = "Servers", @@ -1066,7 +1162,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForServersFo [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForServicesThatDoNotRequireAdditionalDetailsInTheQuotaTicketDetailsObject() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateGenericQuotaTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateGenericQuotaTicket.json // this example is just showing the usage of "SupportTickets_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1076,7 +1172,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForServicesT // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -1085,7 +1181,15 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForServicesT // invoke the operation string supportTicketName = "testticket"; - SupportTicketData data = new SupportTicketData("Increase the maximum throughput per container limit to 10000 for account foo bar", "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/cosmosdb_problemClassification_guid", SupportSeverityLevel.Moderate, AdvancedDiagnosticConsent.Yes, new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), "my title", "/providers/Microsoft.Support/services/quota_service_guid"); + SupportTicketData data = new SupportTicketData() + { + Description = "Increase the maximum throughput per container limit to 10000 for account foo bar", + ProblemClassificationId = "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/cosmosdb_problemClassification_guid", + Severity = SupportSeverityLevel.Moderate, + ContactDetails = new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), + Title = "my title", + ServiceId = "/providers/Microsoft.Support/services/quota_service_guid", + }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data); SubscriptionSupportTicketResource result = lro.Value; @@ -1101,7 +1205,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForServicesT [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForSpecificVMFamilyCoresForMachineLearningService() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateMachineLearningQuotaTicketForDedicatedCores.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateMachineLearningQuotaTicketForDedicatedCores.json // this example is just showing the usage of "SupportTickets_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1111,7 +1215,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForSpecificV // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -1120,9 +1224,16 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForSpecificV // invoke the operation string supportTicketName = "testticket"; - SupportTicketData data = new SupportTicketData("my description", "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/machine_learning_service_problemClassification_guid", SupportSeverityLevel.Moderate, AdvancedDiagnosticConsent.Yes, new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), "my title", "/providers/Microsoft.Support/services/quota_service_guid") + SupportTicketData data = new SupportTicketData() { + Description = "my description", + ProblemClassificationId = "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/machine_learning_service_problemClassification_guid", + Severity = SupportSeverityLevel.Moderate, + AdvancedDiagnosticConsent = AdvancedDiagnosticConsent.Yes, SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + ContactDetails = new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), + Title = "my title", + ServiceId = "/providers/Microsoft.Support/services/quota_service_guid", QuotaTicketDetails = new QuotaTicketDetails() { QuotaChangeRequestSubType = "BatchAml", @@ -1152,7 +1263,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForSpecificV [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForSpecificVMFamilyCoresForABatchAccount() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateBatchQuotaTicketForSpecificBatchAccountForDedicatedCores.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateBatchQuotaTicketForSpecificBatchAccountForDedicatedCores.json // this example is just showing the usage of "SupportTickets_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -1162,7 +1273,7 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForSpecificV // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -1171,9 +1282,16 @@ public async Task CreateOrUpdate_CreateATicketToRequestQuotaIncreaseForSpecificV // invoke the operation string supportTicketName = "testticket"; - SupportTicketData data = new SupportTicketData("my description", "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid", SupportSeverityLevel.Moderate, AdvancedDiagnosticConsent.Yes, new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), "my title", "/providers/Microsoft.Support/services/quota_service_guid") + SupportTicketData data = new SupportTicketData() { + Description = "my description", + ProblemClassificationId = "/providers/Microsoft.Support/services/quota_service_guid/problemClassifications/batch_problemClassification_guid", + Severity = SupportSeverityLevel.Moderate, + AdvancedDiagnosticConsent = AdvancedDiagnosticConsent.Yes, SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + ContactDetails = new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), + Title = "my title", + ServiceId = "/providers/Microsoft.Support/services/quota_service_guid", QuotaTicketDetails = new QuotaTicketDetails() { QuotaChangeRequestSubType = "Account", diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SubscriptionSupportTicketResource.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SubscriptionSupportTicketResource.cs index 03e8e9a882f5..7d9847afde07 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SubscriptionSupportTicketResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SubscriptionSupportTicketResource.cs @@ -16,12 +16,12 @@ namespace Azure.ResourceManager.Support.Samples { public partial class Sample_SubscriptionSupportTicketResource { - // Checks whether name is available for a subscription support ticket resource + // Checks whether name is available for subscription scoped SupportTicket resource [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CheckSupportTicketNameAvailability_ChecksWhetherNameIsAvailableForASubscriptionSupportTicketResource() + public async Task CheckSupportTicketNameAvailability_ChecksWhetherNameIsAvailableForSubscriptionScopedSupportTicketResource() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CheckNameAvailabilityWithSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CheckNameAvailabilityWithSubscription.json // this example is just showing the usage of "SupportTickets_CheckNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -31,7 +31,7 @@ public async Task CheckSupportTicketNameAvailability_ChecksWhetherNameIsAvailabl // this example assumes you already have this SubscriptionResource created on azure // for more information of creating SubscriptionResource, please refer to the document of SubscriptionResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); @@ -47,7 +47,7 @@ public async Task CheckSupportTicketNameAvailability_ChecksWhetherNameIsAvailabl [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDetailsOfASubscriptionTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetSubscriptionSupportTicketDetails.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetSubscriptionSupportTicketDetails.json // this example is just showing the usage of "SupportTickets_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -57,7 +57,7 @@ public async Task Get_GetDetailsOfASubscriptionTicket() // this example assumes you already have this SubscriptionSupportTicketResource created on azure // for more information of creating SubscriptionSupportTicketResource, please refer to the document of SubscriptionSupportTicketResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string supportTicketName = "testticket"; ResourceIdentifier subscriptionSupportTicketResourceId = SubscriptionSupportTicketResource.CreateResourceIdentifier(subscriptionId, supportTicketName); SubscriptionSupportTicketResource subscriptionSupportTicket = client.GetSubscriptionSupportTicketResource(subscriptionSupportTicketResourceId); @@ -72,12 +72,12 @@ public async Task Get_GetDetailsOfASubscriptionTicket() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // Update advanced diagnostic consent of a subscription support ticket + // Update advanced diagnostic consent of a support ticket [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_UpdateAdvancedDiagnosticConsentOfASubscriptionSupportTicket() + public async Task Update_UpdateAdvancedDiagnosticConsentOfASupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/UpdateAdvancedDiagnosticConsentOfSupportTicketForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/UpdateAdvancedDiagnosticConsentOfSupportTicketForSubscription.json // this example is just showing the usage of "SupportTickets_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -87,7 +87,7 @@ public async Task Update_UpdateAdvancedDiagnosticConsentOfASubscriptionSupportTi // this example assumes you already have this SubscriptionSupportTicketResource created on azure // for more information of creating SubscriptionSupportTicketResource, please refer to the document of SubscriptionSupportTicketResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string supportTicketName = "testticket"; ResourceIdentifier subscriptionSupportTicketResourceId = SubscriptionSupportTicketResource.CreateResourceIdentifier(subscriptionId, supportTicketName); SubscriptionSupportTicketResource subscriptionSupportTicket = client.GetSubscriptionSupportTicketResource(subscriptionSupportTicketResourceId); @@ -106,12 +106,12 @@ public async Task Update_UpdateAdvancedDiagnosticConsentOfASubscriptionSupportTi Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // Update contact details of a subscription support ticket + // Update contact details of a subscription scoped support ticket [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_UpdateContactDetailsOfASubscriptionSupportTicket() + public async Task Update_UpdateContactDetailsOfASubscriptionScopedSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/UpdateContactDetailsOfSupportTicketForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/UpdateContactDetailsOfSupportTicketForSubscription.json // this example is just showing the usage of "SupportTickets_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -121,7 +121,7 @@ public async Task Update_UpdateContactDetailsOfASubscriptionSupportTicket() // this example assumes you already have this SubscriptionSupportTicketResource created on azure // for more information of creating SubscriptionSupportTicketResource, please refer to the document of SubscriptionSupportTicketResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string supportTicketName = "testticket"; ResourceIdentifier subscriptionSupportTicketResourceId = SubscriptionSupportTicketResource.CreateResourceIdentifier(subscriptionId, supportTicketName); SubscriptionSupportTicketResource subscriptionSupportTicket = client.GetSubscriptionSupportTicketResource(subscriptionSupportTicketResourceId); @@ -154,12 +154,12 @@ public async Task Update_UpdateContactDetailsOfASubscriptionSupportTicket() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // Update severity of a subscription support ticket + // Update severity of a subscription scoped support ticket [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_UpdateSeverityOfASubscriptionSupportTicket() + public async Task Update_UpdateSeverityOfASubscriptionScopedSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/UpdateSeverityOfSupportTicketForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/UpdateSeverityOfSupportTicketForSubscription.json // this example is just showing the usage of "SupportTickets_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -169,7 +169,7 @@ public async Task Update_UpdateSeverityOfASubscriptionSupportTicket() // this example assumes you already have this SubscriptionSupportTicketResource created on azure // for more information of creating SubscriptionSupportTicketResource, please refer to the document of SubscriptionSupportTicketResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string supportTicketName = "testticket"; ResourceIdentifier subscriptionSupportTicketResourceId = SubscriptionSupportTicketResource.CreateResourceIdentifier(subscriptionId, supportTicketName); SubscriptionSupportTicketResource subscriptionSupportTicket = client.GetSubscriptionSupportTicketResource(subscriptionSupportTicketResourceId); @@ -188,12 +188,12 @@ public async Task Update_UpdateSeverityOfASubscriptionSupportTicket() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // Update status of a subscription support ticket + // Update status of a subscription scoped support ticket [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_UpdateStatusOfASubscriptionSupportTicket() + public async Task Update_UpdateStatusOfASubscriptionScopedSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/UpdateStatusOfSupportTicketForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/UpdateStatusOfSupportTicketForSubscription.json // this example is just showing the usage of "SupportTickets_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -203,7 +203,7 @@ public async Task Update_UpdateStatusOfASubscriptionSupportTicket() // this example assumes you already have this SubscriptionSupportTicketResource created on azure // for more information of creating SubscriptionSupportTicketResource, please refer to the document of SubscriptionSupportTicketResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string supportTicketName = "testticket"; ResourceIdentifier subscriptionSupportTicketResourceId = SubscriptionSupportTicketResource.CreateResourceIdentifier(subscriptionId, supportTicketName); SubscriptionSupportTicketResource subscriptionSupportTicket = client.GetSubscriptionSupportTicketResource(subscriptionSupportTicketResourceId); @@ -222,12 +222,12 @@ public async Task Update_UpdateStatusOfASubscriptionSupportTicket() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // Checks whether name is available for Communication resource for a subscription support ticket + // Checks whether name is available for subscription scoped Communication resource [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CheckCommunicationNameAvailability_ChecksWhetherNameIsAvailableForCommunicationResourceForASubscriptionSupportTicket() + public async Task CheckCommunicationNameAvailability_ChecksWhetherNameIsAvailableForSubscriptionScopedCommunicationResource() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CheckNameAvailabilityForSupportTicketCommunication.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CheckNameAvailabilityForSupportTicketCommunication.json // this example is just showing the usage of "Communications_CheckNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -237,7 +237,7 @@ public async Task CheckCommunicationNameAvailability_ChecksWhetherNameIsAvailabl // this example assumes you already have this SubscriptionSupportTicketResource created on azure // for more information of creating SubscriptionSupportTicketResource, please refer to the document of SubscriptionSupportTicketResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string supportTicketName = "testticket"; ResourceIdentifier subscriptionSupportTicketResourceId = SubscriptionSupportTicketResource.CreateResourceIdentifier(subscriptionId, supportTicketName); SubscriptionSupportTicketResource subscriptionSupportTicket = client.GetSubscriptionSupportTicketResource(subscriptionSupportTicketResourceId); diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportAzureServiceCollection.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportAzureServiceCollection.cs index fff040d45420..29ca8d1c8736 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportAzureServiceCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportAzureServiceCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SupportAzureServiceCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_GetsListOfServicesForWhichASupportTicketCanBeCreated() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListServices.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListServices.json // this example is just showing the usage of "Services_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -52,7 +52,7 @@ public async Task GetAll_GetsListOfServicesForWhichASupportTicketCanBeCreated() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsDetailsOfTheAzureService() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetService.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetService.json // this example is just showing the usage of "Services_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -83,7 +83,7 @@ public async Task Get_GetsDetailsOfTheAzureService() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetsDetailsOfTheAzureService() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetService.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetService.json // this example is just showing the usage of "Services_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -110,7 +110,7 @@ public async Task Exists_GetsDetailsOfTheAzureService() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetsDetailsOfTheAzureService() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetService.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetService.json // this example is just showing the usage of "Services_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportAzureServiceResource.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportAzureServiceResource.cs index f89647472372..a03f9f12f10c 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportAzureServiceResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportAzureServiceResource.cs @@ -9,6 +9,7 @@ using System.Threading.Tasks; using Azure.Core; using Azure.Identity; +using Azure.ResourceManager.Support.Models; namespace Azure.ResourceManager.Support.Samples { @@ -19,7 +20,7 @@ public partial class Sample_SupportAzureServiceResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetsDetailsOfTheAzureService() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetService.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetService.json // this example is just showing the usage of "Services_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -42,5 +43,31 @@ public async Task Get_GetsDetailsOfTheAzureService() // for demo we just print out the id Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } + + // Classify list of problemClassifications for a specified Azure service + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task ClassifyServiceProblem_ClassifyListOfProblemClassificationsForASpecifiedAzureService() + { + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ClassifyProblemClassifications.json + // this example is just showing the usage of "ProblemClassificationsNoSubscription_classifyProblems" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this SupportAzureServiceResource created on azure + // for more information of creating SupportAzureServiceResource, please refer to the document of SupportAzureServiceResource + string problemServiceName = "serviceId1"; + ResourceIdentifier supportAzureServiceResourceId = SupportAzureServiceResource.CreateResourceIdentifier(problemServiceName); + SupportAzureServiceResource supportAzureService = client.GetSupportAzureServiceResource(supportAzureServiceResourceId); + + // invoke the operation + ServiceProblemClassificationContent content = new ServiceProblemClassificationContent("Can not connect to Windows VM"); + ServiceProblemClassificationListResult result = await supportAzureService.ClassifyServiceProblemAsync(content); + + Console.WriteLine($"Succeeded: {result}"); + } } } diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketChatTranscriptCollection.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketChatTranscriptCollection.cs index 1be5def6724a..28f0f9c63642 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketChatTranscriptCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketChatTranscriptCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SupportTicketChatTranscriptCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListChatTranscriptsForASubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListChatTranscriptsForSubscriptionSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListChatTranscriptsForSubscriptionSupportTicket.json // this example is just showing the usage of "ChatTranscripts_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -29,7 +29,7 @@ public async Task GetAll_ListChatTranscriptsForASubscriptionSupportTicket() // this example assumes you already have this SubscriptionSupportTicketResource created on azure // for more information of creating SubscriptionSupportTicketResource, please refer to the document of SubscriptionSupportTicketResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string supportTicketName = "testticket"; ResourceIdentifier subscriptionSupportTicketResourceId = SubscriptionSupportTicketResource.CreateResourceIdentifier(subscriptionId, supportTicketName); SubscriptionSupportTicketResource subscriptionSupportTicket = client.GetSubscriptionSupportTicketResource(subscriptionSupportTicketResourceId); @@ -55,7 +55,7 @@ public async Task GetAll_ListChatTranscriptsForASubscriptionSupportTicket() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetChatTranscriptDetailsForASubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetchatTranscriptDetailsForSubscriptionSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetchatTranscriptDetailsForSubscriptionSupportTicket.json // this example is just showing the usage of "ChatTranscripts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -65,7 +65,7 @@ public async Task Get_GetChatTranscriptDetailsForASubscriptionSupportTicket() // this example assumes you already have this SubscriptionSupportTicketResource created on azure // for more information of creating SubscriptionSupportTicketResource, please refer to the document of SubscriptionSupportTicketResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string supportTicketName = "testticket"; ResourceIdentifier subscriptionSupportTicketResourceId = SubscriptionSupportTicketResource.CreateResourceIdentifier(subscriptionId, supportTicketName); SubscriptionSupportTicketResource subscriptionSupportTicket = client.GetSubscriptionSupportTicketResource(subscriptionSupportTicketResourceId); @@ -89,7 +89,7 @@ public async Task Get_GetChatTranscriptDetailsForASubscriptionSupportTicket() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetChatTranscriptDetailsForASubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetchatTranscriptDetailsForSubscriptionSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetchatTranscriptDetailsForSubscriptionSupportTicket.json // this example is just showing the usage of "ChatTranscripts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -99,7 +99,7 @@ public async Task Exists_GetChatTranscriptDetailsForASubscriptionSupportTicket() // this example assumes you already have this SubscriptionSupportTicketResource created on azure // for more information of creating SubscriptionSupportTicketResource, please refer to the document of SubscriptionSupportTicketResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string supportTicketName = "testticket"; ResourceIdentifier subscriptionSupportTicketResourceId = SubscriptionSupportTicketResource.CreateResourceIdentifier(subscriptionId, supportTicketName); SubscriptionSupportTicketResource subscriptionSupportTicket = client.GetSubscriptionSupportTicketResource(subscriptionSupportTicketResourceId); @@ -119,7 +119,7 @@ public async Task Exists_GetChatTranscriptDetailsForASubscriptionSupportTicket() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetChatTranscriptDetailsForASubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetchatTranscriptDetailsForSubscriptionSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetchatTranscriptDetailsForSubscriptionSupportTicket.json // this example is just showing the usage of "ChatTranscripts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task GetIfExists_GetChatTranscriptDetailsForASubscriptionSupportTic // this example assumes you already have this SubscriptionSupportTicketResource created on azure // for more information of creating SubscriptionSupportTicketResource, please refer to the document of SubscriptionSupportTicketResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string supportTicketName = "testticket"; ResourceIdentifier subscriptionSupportTicketResourceId = SubscriptionSupportTicketResource.CreateResourceIdentifier(subscriptionId, supportTicketName); SubscriptionSupportTicketResource subscriptionSupportTicket = client.GetSubscriptionSupportTicketResource(subscriptionSupportTicketResourceId); diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketChatTranscriptResource.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketChatTranscriptResource.cs index 81494b02de5d..251f28a20172 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketChatTranscriptResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketChatTranscriptResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SupportTicketChatTranscriptResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetChatTranscriptDetailsForASubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetchatTranscriptDetailsForSubscriptionSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetchatTranscriptDetailsForSubscriptionSupportTicket.json // this example is just showing the usage of "ChatTranscripts_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -29,7 +29,7 @@ public async Task Get_GetChatTranscriptDetailsForASubscriptionSupportTicket() // this example assumes you already have this SupportTicketChatTranscriptResource created on azure // for more information of creating SupportTicketChatTranscriptResource, please refer to the document of SupportTicketChatTranscriptResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string supportTicketName = "testticket"; string chatTranscriptName = "69586795-45e9-45b5-bd9e-c9bb237d3e44"; ResourceIdentifier supportTicketChatTranscriptResourceId = SupportTicketChatTranscriptResource.CreateResourceIdentifier(subscriptionId, supportTicketName, chatTranscriptName); diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketCommunicationCollection.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketCommunicationCollection.cs index a7c4a7b95835..fdb9f20af522 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketCommunicationCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketCommunicationCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SupportTicketCommunicationCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListCommunicationsForASubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListCommunicationsForSubscriptionSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListCommunicationsForSubscriptionSupportTicket.json // this example is just showing the usage of "Communications_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -29,7 +29,7 @@ public async Task GetAll_ListCommunicationsForASubscriptionSupportTicket() // this example assumes you already have this SubscriptionSupportTicketResource created on azure // for more information of creating SubscriptionSupportTicketResource, please refer to the document of SubscriptionSupportTicketResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string supportTicketName = "testticket"; ResourceIdentifier subscriptionSupportTicketResourceId = SubscriptionSupportTicketResource.CreateResourceIdentifier(subscriptionId, supportTicketName); SubscriptionSupportTicketResource subscriptionSupportTicket = client.GetSubscriptionSupportTicketResource(subscriptionSupportTicketResourceId); @@ -55,7 +55,7 @@ public async Task GetAll_ListCommunicationsForASubscriptionSupportTicket() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListWebCommunicationCreatedOnOrAfterASpecificDateForASubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListWebCommunicationsForSubscriptionSupportTicketCreatedOnOrAfter.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListWebCommunicationsForSubscriptionSupportTicketCreatedOnOrAfter.json // this example is just showing the usage of "Communications_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -65,7 +65,7 @@ public async Task GetAll_ListWebCommunicationCreatedOnOrAfterASpecificDateForASu // this example assumes you already have this SubscriptionSupportTicketResource created on azure // for more information of creating SubscriptionSupportTicketResource, please refer to the document of SubscriptionSupportTicketResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string supportTicketName = "testticket"; ResourceIdentifier subscriptionSupportTicketResourceId = SubscriptionSupportTicketResource.CreateResourceIdentifier(subscriptionId, supportTicketName); SubscriptionSupportTicketResource subscriptionSupportTicket = client.GetSubscriptionSupportTicketResource(subscriptionSupportTicketResourceId); @@ -92,7 +92,7 @@ public async Task GetAll_ListWebCommunicationCreatedOnOrAfterASpecificDateForASu [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListWebCommunicationsForASubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListWebCommunicationsForSubscriptionSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListWebCommunicationsForSubscriptionSupportTicket.json // this example is just showing the usage of "Communications_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -102,7 +102,7 @@ public async Task GetAll_ListWebCommunicationsForASubscriptionSupportTicket() // this example assumes you already have this SubscriptionSupportTicketResource created on azure // for more information of creating SubscriptionSupportTicketResource, please refer to the document of SubscriptionSupportTicketResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string supportTicketName = "testticket"; ResourceIdentifier subscriptionSupportTicketResourceId = SubscriptionSupportTicketResource.CreateResourceIdentifier(subscriptionId, supportTicketName); SubscriptionSupportTicketResource subscriptionSupportTicket = client.GetSubscriptionSupportTicketResource(subscriptionSupportTicketResourceId); @@ -129,7 +129,7 @@ public async Task GetAll_ListWebCommunicationsForASubscriptionSupportTicket() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetCommunicationDetailsForASubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetCommunicationDetailsForSubscriptionSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetCommunicationDetailsForSubscriptionSupportTicket.json // this example is just showing the usage of "Communications_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -139,7 +139,7 @@ public async Task Get_GetCommunicationDetailsForASubscriptionSupportTicket() // this example assumes you already have this SubscriptionSupportTicketResource created on azure // for more information of creating SubscriptionSupportTicketResource, please refer to the document of SubscriptionSupportTicketResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string supportTicketName = "testticket"; ResourceIdentifier subscriptionSupportTicketResourceId = SubscriptionSupportTicketResource.CreateResourceIdentifier(subscriptionId, supportTicketName); SubscriptionSupportTicketResource subscriptionSupportTicket = client.GetSubscriptionSupportTicketResource(subscriptionSupportTicketResourceId); @@ -163,7 +163,7 @@ public async Task Get_GetCommunicationDetailsForASubscriptionSupportTicket() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetCommunicationDetailsForASubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetCommunicationDetailsForSubscriptionSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetCommunicationDetailsForSubscriptionSupportTicket.json // this example is just showing the usage of "Communications_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -173,7 +173,7 @@ public async Task Exists_GetCommunicationDetailsForASubscriptionSupportTicket() // this example assumes you already have this SubscriptionSupportTicketResource created on azure // for more information of creating SubscriptionSupportTicketResource, please refer to the document of SubscriptionSupportTicketResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string supportTicketName = "testticket"; ResourceIdentifier subscriptionSupportTicketResourceId = SubscriptionSupportTicketResource.CreateResourceIdentifier(subscriptionId, supportTicketName); SubscriptionSupportTicketResource subscriptionSupportTicket = client.GetSubscriptionSupportTicketResource(subscriptionSupportTicketResourceId); @@ -193,7 +193,7 @@ public async Task Exists_GetCommunicationDetailsForASubscriptionSupportTicket() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetCommunicationDetailsForASubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetCommunicationDetailsForSubscriptionSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetCommunicationDetailsForSubscriptionSupportTicket.json // this example is just showing the usage of "Communications_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -203,7 +203,7 @@ public async Task GetIfExists_GetCommunicationDetailsForASubscriptionSupportTick // this example assumes you already have this SubscriptionSupportTicketResource created on azure // for more information of creating SubscriptionSupportTicketResource, please refer to the document of SubscriptionSupportTicketResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string supportTicketName = "testticket"; ResourceIdentifier subscriptionSupportTicketResourceId = SubscriptionSupportTicketResource.CreateResourceIdentifier(subscriptionId, supportTicketName); SubscriptionSupportTicketResource subscriptionSupportTicket = client.GetSubscriptionSupportTicketResource(subscriptionSupportTicketResourceId); @@ -235,7 +235,7 @@ public async Task GetIfExists_GetCommunicationDetailsForASubscriptionSupportTick [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_AddCommunicationToSubscriptionTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateSupportTicketCommunication.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateSupportTicketCommunication.json // this example is just showing the usage of "Communications_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -245,7 +245,7 @@ public async Task CreateOrUpdate_AddCommunicationToSubscriptionTicket() // this example assumes you already have this SubscriptionSupportTicketResource created on azure // for more information of creating SubscriptionSupportTicketResource, please refer to the document of SubscriptionSupportTicketResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string supportTicketName = "testticket"; ResourceIdentifier subscriptionSupportTicketResourceId = SubscriptionSupportTicketResource.CreateResourceIdentifier(subscriptionId, supportTicketName); SubscriptionSupportTicketResource subscriptionSupportTicket = client.GetSubscriptionSupportTicketResource(subscriptionSupportTicketResourceId); @@ -255,9 +255,11 @@ public async Task CreateOrUpdate_AddCommunicationToSubscriptionTicket() // invoke the operation string communicationName = "testcommunication"; - SupportTicketCommunicationData data = new SupportTicketCommunicationData("This is a test message from a customer!", "This is a test message from a customer!") + SupportTicketCommunicationData data = new SupportTicketCommunicationData() { Sender = "user@contoso.com", + Subject = "This is a test message from a customer!", + Body = "This is a test message from a customer!", }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, communicationName, data); SupportTicketCommunicationResource result = lro.Value; diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketCommunicationResource.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketCommunicationResource.cs index 151fe1d9977b..b73cc71f17f9 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketCommunicationResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketCommunicationResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SupportTicketCommunicationResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetCommunicationDetailsForASubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetCommunicationDetailsForSubscriptionSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetCommunicationDetailsForSubscriptionSupportTicket.json // this example is just showing the usage of "Communications_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -29,7 +29,7 @@ public async Task Get_GetCommunicationDetailsForASubscriptionSupportTicket() // this example assumes you already have this SupportTicketCommunicationResource created on azure // for more information of creating SupportTicketCommunicationResource, please refer to the document of SupportTicketCommunicationResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string supportTicketName = "testticket"; string communicationName = "testmessage"; ResourceIdentifier supportTicketCommunicationResourceId = SupportTicketCommunicationResource.CreateResourceIdentifier(subscriptionId, supportTicketName, communicationName); @@ -50,7 +50,7 @@ public async Task Get_GetCommunicationDetailsForASubscriptionSupportTicket() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_AddCommunicationToSubscriptionTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateSupportTicketCommunication.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateSupportTicketCommunication.json // this example is just showing the usage of "Communications_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -60,16 +60,18 @@ public async Task Update_AddCommunicationToSubscriptionTicket() // this example assumes you already have this SupportTicketCommunicationResource created on azure // for more information of creating SupportTicketCommunicationResource, please refer to the document of SupportTicketCommunicationResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string supportTicketName = "testticket"; string communicationName = "testcommunication"; ResourceIdentifier supportTicketCommunicationResourceId = SupportTicketCommunicationResource.CreateResourceIdentifier(subscriptionId, supportTicketName, communicationName); SupportTicketCommunicationResource supportTicketCommunication = client.GetSupportTicketCommunicationResource(supportTicketCommunicationResourceId); // invoke the operation - SupportTicketCommunicationData data = new SupportTicketCommunicationData("This is a test message from a customer!", "This is a test message from a customer!") + SupportTicketCommunicationData data = new SupportTicketCommunicationData() { Sender = "user@contoso.com", + Subject = "This is a test message from a customer!", + Body = "This is a test message from a customer!", }; ArmOperation lro = await supportTicketCommunication.UpdateAsync(WaitUntil.Completed, data); SupportTicketCommunicationResource result = lro.Value; diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketFileCollection.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketFileCollection.cs index be68f933fa04..c8c608c01bd9 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketFileCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketFileCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SupportTicketFileCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListFilesUnderAWorkspaceForASubscription() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListFilesForSubscriptionUnderFileWorkspace.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListFilesForSubscriptionUnderFileWorkspace.json // this example is just showing the usage of "Files_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -29,7 +29,7 @@ public async Task GetAll_ListFilesUnderAWorkspaceForASubscription() // this example assumes you already have this SubscriptionFileWorkspaceResource created on azure // for more information of creating SubscriptionFileWorkspaceResource, please refer to the document of SubscriptionFileWorkspaceResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string fileWorkspaceName = "testworkspace"; ResourceIdentifier subscriptionFileWorkspaceResourceId = SubscriptionFileWorkspaceResource.CreateResourceIdentifier(subscriptionId, fileWorkspaceName); SubscriptionFileWorkspaceResource subscriptionFileWorkspace = client.GetSubscriptionFileWorkspaceResource(subscriptionFileWorkspaceResourceId); @@ -55,7 +55,7 @@ public async Task GetAll_ListFilesUnderAWorkspaceForASubscription() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDetailsOfASubscriptionFile() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetFileDetailsForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetFileDetailsForSubscription.json // this example is just showing the usage of "Files_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -65,7 +65,7 @@ public async Task Get_GetDetailsOfASubscriptionFile() // this example assumes you already have this SubscriptionFileWorkspaceResource created on azure // for more information of creating SubscriptionFileWorkspaceResource, please refer to the document of SubscriptionFileWorkspaceResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string fileWorkspaceName = "testworkspace"; ResourceIdentifier subscriptionFileWorkspaceResourceId = SubscriptionFileWorkspaceResource.CreateResourceIdentifier(subscriptionId, fileWorkspaceName); SubscriptionFileWorkspaceResource subscriptionFileWorkspace = client.GetSubscriptionFileWorkspaceResource(subscriptionFileWorkspaceResourceId); @@ -89,7 +89,7 @@ public async Task Get_GetDetailsOfASubscriptionFile() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetDetailsOfASubscriptionFile() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetFileDetailsForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetFileDetailsForSubscription.json // this example is just showing the usage of "Files_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -99,7 +99,7 @@ public async Task Exists_GetDetailsOfASubscriptionFile() // this example assumes you already have this SubscriptionFileWorkspaceResource created on azure // for more information of creating SubscriptionFileWorkspaceResource, please refer to the document of SubscriptionFileWorkspaceResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string fileWorkspaceName = "testworkspace"; ResourceIdentifier subscriptionFileWorkspaceResourceId = SubscriptionFileWorkspaceResource.CreateResourceIdentifier(subscriptionId, fileWorkspaceName); SubscriptionFileWorkspaceResource subscriptionFileWorkspace = client.GetSubscriptionFileWorkspaceResource(subscriptionFileWorkspaceResourceId); @@ -119,7 +119,7 @@ public async Task Exists_GetDetailsOfASubscriptionFile() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetDetailsOfASubscriptionFile() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetFileDetailsForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetFileDetailsForSubscription.json // this example is just showing the usage of "Files_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -129,7 +129,7 @@ public async Task GetIfExists_GetDetailsOfASubscriptionFile() // this example assumes you already have this SubscriptionFileWorkspaceResource created on azure // for more information of creating SubscriptionFileWorkspaceResource, please refer to the document of SubscriptionFileWorkspaceResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string fileWorkspaceName = "testworkspace"; ResourceIdentifier subscriptionFileWorkspaceResourceId = SubscriptionFileWorkspaceResource.CreateResourceIdentifier(subscriptionId, fileWorkspaceName); SubscriptionFileWorkspaceResource subscriptionFileWorkspace = client.GetSubscriptionFileWorkspaceResource(subscriptionFileWorkspaceResourceId); @@ -156,12 +156,12 @@ public async Task GetIfExists_GetDetailsOfASubscriptionFile() } } - // Create a file under a subscription workspace + // Create a subscription scoped file [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_CreateAFileUnderASubscriptionWorkspace() + public async Task CreateOrUpdate_CreateASubscriptionScopedFile() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateFileForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateFileForSubscription.json // this example is just showing the usage of "Files_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -171,7 +171,7 @@ public async Task CreateOrUpdate_CreateAFileUnderASubscriptionWorkspace() // this example assumes you already have this SubscriptionFileWorkspaceResource created on azure // for more information of creating SubscriptionFileWorkspaceResource, please refer to the document of SubscriptionFileWorkspaceResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string fileWorkspaceName = "testworkspace"; ResourceIdentifier subscriptionFileWorkspaceResourceId = SubscriptionFileWorkspaceResource.CreateResourceIdentifier(subscriptionId, fileWorkspaceName); SubscriptionFileWorkspaceResource subscriptionFileWorkspace = client.GetSubscriptionFileWorkspaceResource(subscriptionFileWorkspaceResourceId); diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketFileResource.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketFileResource.cs index 70ebcd9b77b8..cd7c147f3f41 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketFileResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketFileResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SupportTicketFileResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDetailsOfASubscriptionFile() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetFileDetailsForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetFileDetailsForSubscription.json // this example is just showing the usage of "Files_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -30,7 +30,7 @@ public async Task Get_GetDetailsOfASubscriptionFile() // this example assumes you already have this SupportTicketFileResource created on azure // for more information of creating SupportTicketFileResource, please refer to the document of SupportTicketFileResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string fileWorkspaceName = "testworkspace"; string fileName = "test.txt"; ResourceIdentifier supportTicketFileResourceId = SupportTicketFileResource.CreateResourceIdentifier(subscriptionId, fileWorkspaceName, fileName); @@ -46,12 +46,12 @@ public async Task Get_GetDetailsOfASubscriptionFile() Console.WriteLine($"Succeeded on id: {resourceData.Id}"); } - // Create a file under a subscription workspace + // Create a subscription scoped file [NUnit.Framework.Test] [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_CreateAFileUnderASubscriptionWorkspace() + public async Task Update_CreateASubscriptionScopedFile() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateFileForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateFileForSubscription.json // this example is just showing the usage of "Files_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -61,7 +61,7 @@ public async Task Update_CreateAFileUnderASubscriptionWorkspace() // this example assumes you already have this SupportTicketFileResource created on azure // for more information of creating SupportTicketFileResource, please refer to the document of SupportTicketFileResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string fileWorkspaceName = "testworkspace"; string fileName = "test.txt"; ResourceIdentifier supportTicketFileResourceId = SupportTicketFileResource.CreateResourceIdentifier(subscriptionId, fileWorkspaceName, fileName); @@ -89,7 +89,7 @@ public async Task Update_CreateAFileUnderASubscriptionWorkspace() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Upload_UploadFileForSubscription() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/UploadFileForSubscription.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/UploadFileForSubscription.json // this example is just showing the usage of "Files_Upload" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -99,7 +99,7 @@ public async Task Upload_UploadFileForSubscription() // this example assumes you already have this SupportTicketFileResource created on azure // for more information of creating SupportTicketFileResource, please refer to the document of SupportTicketFileResource - string subscriptionId = "132d901f-189d-4381-9214-fe68e27e05a1"; + string subscriptionId = "subid"; string fileWorkspaceName = "testworkspaceName"; string fileName = "test.txt"; ResourceIdentifier supportTicketFileResourceId = SupportTicketFileResource.CreateResourceIdentifier(subscriptionId, fileWorkspaceName, fileName); diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubChatTranscriptCollection.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubChatTranscriptCollection.cs index 5f3a8636bc1d..d2414e6d980c 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubChatTranscriptCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubChatTranscriptCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SupportTicketNoSubChatTranscriptCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListChatTranscriptsForANoSubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListChatTranscriptsForSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListChatTranscriptsForSupportTicket.json // this example is just showing the usage of "ChatTranscriptsNoSubscription_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task GetAll_ListChatTranscriptsForANoSubscriptionSupportTicket() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetChatTranscriptDetailsForASubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetchatTranscriptDetailsForSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetchatTranscriptDetailsForSupportTicket.json // this example is just showing the usage of "ChatTranscriptsNoSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -87,7 +87,7 @@ public async Task Get_GetChatTranscriptDetailsForASubscriptionSupportTicket() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetChatTranscriptDetailsForASubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetchatTranscriptDetailsForSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetchatTranscriptDetailsForSupportTicket.json // this example is just showing the usage of "ChatTranscriptsNoSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -116,7 +116,7 @@ public async Task Exists_GetChatTranscriptDetailsForASubscriptionSupportTicket() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetChatTranscriptDetailsForASubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetchatTranscriptDetailsForSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetchatTranscriptDetailsForSupportTicket.json // this example is just showing the usage of "ChatTranscriptsNoSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubChatTranscriptResource.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubChatTranscriptResource.cs index 36837595a69c..158c7086f7d6 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubChatTranscriptResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubChatTranscriptResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SupportTicketNoSubChatTranscriptResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetChatTranscriptDetailsForASubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetchatTranscriptDetailsForSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetchatTranscriptDetailsForSupportTicket.json // this example is just showing the usage of "ChatTranscriptsNoSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubCommunicationCollection.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubCommunicationCollection.cs index 98ecf0387878..4660afec42f7 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubCommunicationCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubCommunicationCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SupportTicketNoSubCommunicationCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListCommunicationsForANoSubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListCommunicationsForSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListCommunicationsForSupportTicket.json // this example is just showing the usage of "CommunicationsNoSubscription_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task GetAll_ListCommunicationsForANoSubscriptionSupportTicket() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListWebCommunicationCreatedOnOrAfterASpecificDateForANoSubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListWebCommunicationsForSupportTicketCreatedOnOrAfter.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListWebCommunicationsForSupportTicketCreatedOnOrAfter.json // this example is just showing the usage of "CommunicationsNoSubscription_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -90,7 +90,7 @@ public async Task GetAll_ListWebCommunicationCreatedOnOrAfterASpecificDateForANo [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListWebCommunicationsForANoSubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListWebCommunicationsForSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListWebCommunicationsForSupportTicket.json // this example is just showing the usage of "CommunicationsNoSubscription_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -126,7 +126,7 @@ public async Task GetAll_ListWebCommunicationsForANoSubscriptionSupportTicket() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetCommunicationDetailsForANoSubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetCommunicationDetailsForSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetCommunicationDetailsForSupportTicket.json // this example is just showing the usage of "CommunicationsNoSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -159,7 +159,7 @@ public async Task Get_GetCommunicationDetailsForANoSubscriptionSupportTicket() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetCommunicationDetailsForANoSubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetCommunicationDetailsForSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetCommunicationDetailsForSupportTicket.json // this example is just showing the usage of "CommunicationsNoSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -188,7 +188,7 @@ public async Task Exists_GetCommunicationDetailsForANoSubscriptionSupportTicket( [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetCommunicationDetailsForANoSubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetCommunicationDetailsForSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetCommunicationDetailsForSupportTicket.json // this example is just showing the usage of "CommunicationsNoSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -229,7 +229,7 @@ public async Task GetIfExists_GetCommunicationDetailsForANoSubscriptionSupportTi [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_AddCommunicationToNoSubscriptionTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateNoSubscriptionSupportTicketCommunication.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateNoSubscriptionSupportTicketCommunication.json // this example is just showing the usage of "CommunicationsNoSubscription_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -248,9 +248,11 @@ public async Task CreateOrUpdate_AddCommunicationToNoSubscriptionTicket() // invoke the operation string communicationName = "testcommunication"; - SupportTicketCommunicationData data = new SupportTicketCommunicationData("This is a test message from a customer!", "This is a test message from a customer!") + SupportTicketCommunicationData data = new SupportTicketCommunicationData() { Sender = "user@contoso.com", + Subject = "This is a test message from a customer!", + Body = "This is a test message from a customer!", }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, communicationName, data); SupportTicketNoSubCommunicationResource result = lro.Value; diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubCommunicationResource.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubCommunicationResource.cs index 7a5db63f4aaa..67a1f91f2dc1 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubCommunicationResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubCommunicationResource.cs @@ -19,7 +19,7 @@ public partial class Sample_SupportTicketNoSubCommunicationResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetCommunicationDetailsForANoSubscriptionSupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetCommunicationDetailsForSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetCommunicationDetailsForSupportTicket.json // this example is just showing the usage of "CommunicationsNoSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -49,7 +49,7 @@ public async Task Get_GetCommunicationDetailsForANoSubscriptionSupportTicket() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_AddCommunicationToNoSubscriptionTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateNoSubscriptionSupportTicketCommunication.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateNoSubscriptionSupportTicketCommunication.json // this example is just showing the usage of "CommunicationsNoSubscription_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -65,9 +65,11 @@ public async Task Update_AddCommunicationToNoSubscriptionTicket() SupportTicketNoSubCommunicationResource supportTicketNoSubCommunication = client.GetSupportTicketNoSubCommunicationResource(supportTicketNoSubCommunicationResourceId); // invoke the operation - SupportTicketCommunicationData data = new SupportTicketCommunicationData("This is a test message from a customer!", "This is a test message from a customer!") + SupportTicketCommunicationData data = new SupportTicketCommunicationData() { Sender = "user@contoso.com", + Subject = "This is a test message from a customer!", + Body = "This is a test message from a customer!", }; ArmOperation lro = await supportTicketNoSubCommunication.UpdateAsync(WaitUntil.Completed, data); SupportTicketNoSubCommunicationResource result = lro.Value; diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubFileCollection.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubFileCollection.cs index 59d992b887fa..9a1cea9c42af 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubFileCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubFileCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_SupportTicketNoSubFileCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListFilesUnderAWorkspace() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListFilesUnderFileWorkspace.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListFilesUnderFileWorkspace.json // this example is just showing the usage of "FilesNoSubscription_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -54,7 +54,7 @@ public async Task GetAll_ListFilesUnderAWorkspace() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDetailsOfASubscriptionFile() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetFileDetails.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetFileDetails.json // this example is just showing the usage of "FilesNoSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -87,7 +87,7 @@ public async Task Get_GetDetailsOfASubscriptionFile() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetDetailsOfASubscriptionFile() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetFileDetails.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetFileDetails.json // this example is just showing the usage of "FilesNoSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -116,7 +116,7 @@ public async Task Exists_GetDetailsOfASubscriptionFile() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetDetailsOfASubscriptionFile() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetFileDetails.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetFileDetails.json // this example is just showing the usage of "FilesNoSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -157,7 +157,7 @@ public async Task GetIfExists_GetDetailsOfASubscriptionFile() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateAFileWorkspace() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateFile.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateFile.json // this example is just showing the usage of "FilesNoSubscription_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubFileResource.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubFileResource.cs index 9c1e7738e9d6..9badc15f90d6 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubFileResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_SupportTicketNoSubFileResource.cs @@ -20,7 +20,7 @@ public partial class Sample_SupportTicketNoSubFileResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDetailsOfASubscriptionFile() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetFileDetails.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetFileDetails.json // this example is just showing the usage of "FilesNoSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task Get_GetDetailsOfASubscriptionFile() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateAFileWorkspace() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateFile.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateFile.json // this example is just showing the usage of "FilesNoSubscription_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -87,7 +87,7 @@ public async Task Update_CreateAFileWorkspace() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Upload_UploadFile() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/UploadFile.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/UploadFile.json // this example is just showing the usage of "FilesNoSubscription_Upload" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_TenantFileWorkspaceCollection.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_TenantFileWorkspaceCollection.cs index f07997216716..daf7c45fabe6 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_TenantFileWorkspaceCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_TenantFileWorkspaceCollection.cs @@ -19,7 +19,7 @@ public partial class Sample_TenantFileWorkspaceCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDetailsOfAFileWorkspace() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetFileWorkspaceDetails.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetFileWorkspaceDetails.json // this example is just showing the usage of "FileWorkspacesNoSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -50,7 +50,7 @@ public async Task Get_GetDetailsOfAFileWorkspace() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetDetailsOfAFileWorkspace() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetFileWorkspaceDetails.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetFileWorkspaceDetails.json // this example is just showing the usage of "FileWorkspacesNoSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -77,7 +77,7 @@ public async Task Exists_GetDetailsOfAFileWorkspace() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetDetailsOfAFileWorkspace() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetFileWorkspaceDetails.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetFileWorkspaceDetails.json // this example is just showing the usage of "FileWorkspacesNoSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -116,7 +116,7 @@ public async Task GetIfExists_GetDetailsOfAFileWorkspace() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateAFileWorkspace() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateFileWorkspace.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateFileWorkspace.json // this example is just showing the usage of "FileWorkspacesNoSubscription_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_TenantFileWorkspaceResource.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_TenantFileWorkspaceResource.cs index 5152d7f332f1..749b45c012cd 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_TenantFileWorkspaceResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_TenantFileWorkspaceResource.cs @@ -19,7 +19,7 @@ public partial class Sample_TenantFileWorkspaceResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDetailsOfAFileWorkspace() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetFileWorkspaceDetails.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetFileWorkspaceDetails.json // this example is just showing the usage of "FileWorkspacesNoSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -48,7 +48,7 @@ public async Task Get_GetDetailsOfAFileWorkspace() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_CreateAFileWorkspace() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateFileWorkspace.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateFileWorkspace.json // this example is just showing the usage of "FileWorkspacesNoSubscription_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_TenantResourceExtensions.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_TenantResourceExtensions.cs new file mode 100644 index 000000000000..ad78302808dc --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_TenantResourceExtensions.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using Azure.ResourceManager.Support.Models; + +namespace Azure.ResourceManager.Support.Samples +{ + public partial class Sample_TenantResourceExtensions + { + // Classify list of Azure services + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task ClassifyServicesServiceClassificationsNoSubscription_ClassifyListOfAzureServices() + { + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ClassifyServices.json + // this example is just showing the usage of "ServiceClassificationsNoSubscription_classifyServices" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this TenantResource created on azure + // for more information of creating TenantResource, please refer to the document of TenantResource + var tenantResource = client.GetTenants().GetAllAsync().GetAsyncEnumerator().Current; + + // invoke the operation + ServiceClassificationContent content = new ServiceClassificationContent() + { + IssueSummary = "Can not connect to Windows VM", + ResourceId = new ResourceIdentifier("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/vmname"), + }; + ServiceClassificationOutput result = await tenantResource.ClassifyServicesServiceClassificationsNoSubscriptionAsync(content); + + Console.WriteLine($"Succeeded: {result}"); + } + + // Look up resource id of support resource type + [NUnit.Framework.Test] + [NUnit.Framework.Ignore("Only verifying that the sample builds")] + public async Task LookUpResourceId_LookUpResourceIdOfSupportResourceType() + { + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/LookUpResourceId.json + // this example is just showing the usage of "LookUpResourceId_Post" operation, for the dependent resources, they will have to be created separately. + + // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line + TokenCredential cred = new DefaultAzureCredential(); + // authenticate your client + ArmClient client = new ArmClient(cred); + + // this example assumes you already have this TenantResource created on azure + // for more information of creating TenantResource, please refer to the document of TenantResource + var tenantResource = client.GetTenants().GetAllAsync().GetAsyncEnumerator().Current; + + // invoke the operation + LookUpResourceIdContent content = new LookUpResourceIdContent() + { + Identifier = "1234668596", + ResourceType = SupportResourceTypeName.MicrosoftSupportSupportTickets, + }; + LookUpResourceIdResult result = await tenantResource.LookUpResourceIdAsync(content); + + Console.WriteLine($"Succeeded: {result}"); + } + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_TenantSupportTicketCollection.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_TenantSupportTicketCollection.cs index 810ed4aac294..db55ca6159eb 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_TenantSupportTicketCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_TenantSupportTicketCollection.cs @@ -20,7 +20,7 @@ public partial class Sample_TenantSupportTicketCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListSupportTickets() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListSupportTickets.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListSupportTickets.json // this example is just showing the usage of "SupportTicketsNoSubscription_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -53,7 +53,7 @@ public async Task GetAll_ListSupportTickets() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListSupportTicketsCreatedOnOrAfterACertainDateAndInOpenState() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListSupportTicketsCreatedOnOrAfterAndInOpenState.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListSupportTicketsCreatedOnOrAfterAndInOpenState.json // this example is just showing the usage of "SupportTicketsNoSubscription_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -87,7 +87,7 @@ public async Task GetAll_ListSupportTicketsCreatedOnOrAfterACertainDateAndInOpen [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListSupportTicketsCreatedOnOrAfterACertainDateAndInUpdatingState() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListSupportTicketsCreatedOnOrAfterAndInUpdatingState.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListSupportTicketsCreatedOnOrAfterAndInUpdatingState.json // this example is just showing the usage of "SupportTicketsNoSubscription_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -121,7 +121,7 @@ public async Task GetAll_ListSupportTicketsCreatedOnOrAfterACertainDateAndInUpda [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListSupportTicketsInOpenState() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListSupportTicketsInOpenState.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListSupportTicketsInOpenState.json // this example is just showing the usage of "SupportTicketsNoSubscription_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -155,7 +155,7 @@ public async Task GetAll_ListSupportTicketsInOpenState() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListSupportTicketsInUpdatingState() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListSupportTicketsInUpdatingState.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListSupportTicketsInUpdatingState.json // this example is just showing the usage of "SupportTicketsNoSubscription_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -189,7 +189,7 @@ public async Task GetAll_ListSupportTicketsInUpdatingState() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListSupportTicketsWithACertainProblemClassificationId() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListSupportTicketsProblemClassificationIdEquals.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListSupportTicketsProblemClassificationIdEquals.json // this example is just showing the usage of "SupportTicketsNoSubscription_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -223,7 +223,7 @@ public async Task GetAll_ListSupportTicketsWithACertainProblemClassificationId() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_ListSupportTicketsWithACertainServiceId() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/ListSupportTicketsServiceIdEquals.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/ListSupportTicketsServiceIdEquals.json // this example is just showing the usage of "SupportTicketsNoSubscription_List" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -257,7 +257,7 @@ public async Task GetAll_ListSupportTicketsWithACertainServiceId() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDetailsOfATicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetSupportTicketDetails.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetSupportTicketDetails.json // this example is just showing the usage of "SupportTicketsNoSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -288,7 +288,7 @@ public async Task Get_GetDetailsOfATicket() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_GetDetailsOfATicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetSupportTicketDetails.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetSupportTicketDetails.json // this example is just showing the usage of "SupportTicketsNoSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -315,7 +315,7 @@ public async Task Exists_GetDetailsOfATicket() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_GetDetailsOfATicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetSupportTicketDetails.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetSupportTicketDetails.json // this example is just showing the usage of "SupportTicketsNoSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -354,7 +354,7 @@ public async Task GetIfExists_GetDetailsOfATicket() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateATicketForBillingRelatedIssues() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateBillingSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateBillingSupportTicket.json // this example is just showing the usage of "SupportTicketsNoSubscription_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -371,9 +371,15 @@ public async Task CreateOrUpdate_CreateATicketForBillingRelatedIssues() // invoke the operation string supportTicketName = "testticket"; - SupportTicketData data = new SupportTicketData("my description", "/providers/Microsoft.Support/services/billing_service_guid/problemClassifications/billing_problemClassification_guid", SupportSeverityLevel.Moderate, AdvancedDiagnosticConsent.No, new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), "my title", "/providers/Microsoft.Support/services/billing_service_guid") + SupportTicketData data = new SupportTicketData() { + Description = "my description", + ProblemClassificationId = "/providers/Microsoft.Support/services/billing_service_guid/problemClassifications/billing_problemClassification_guid", + Severity = SupportSeverityLevel.Moderate, SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + ContactDetails = new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), + Title = "my title", + ServiceId = "/providers/Microsoft.Support/services/billing_service_guid", FileWorkspaceName = "6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066", }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data); @@ -391,7 +397,7 @@ public async Task CreateOrUpdate_CreateATicketForBillingRelatedIssues() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateATicketForSubscriptionManagementRelatedIssues() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateSubMgmtSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateSubMgmtSupportTicket.json // this example is just showing the usage of "SupportTicketsNoSubscription_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -408,9 +414,15 @@ public async Task CreateOrUpdate_CreateATicketForSubscriptionManagementRelatedIs // invoke the operation string supportTicketName = "testticket"; - SupportTicketData data = new SupportTicketData("my description", "/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/subscription_management_problemClassification_guid", SupportSeverityLevel.Moderate, AdvancedDiagnosticConsent.Yes, new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), "my title", "/providers/Microsoft.Support/services/subscription_management_service_guid") + SupportTicketData data = new SupportTicketData() { + Description = "my description", + ProblemClassificationId = "/providers/Microsoft.Support/services/subscription_management_service_guid/problemClassifications/subscription_management_problemClassification_guid", + Severity = SupportSeverityLevel.Moderate, SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + ContactDetails = new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), + Title = "my title", + ServiceId = "/providers/Microsoft.Support/services/subscription_management_service_guid", FileWorkspaceName = "6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066", }; ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, supportTicketName, data); @@ -428,7 +440,7 @@ public async Task CreateOrUpdate_CreateATicketForSubscriptionManagementRelatedIs [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_CreateATicketForTechnicalIssueRelatedToASpecificResource() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CreateTechnicalSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CreateTechnicalSupportTicket.json // this example is just showing the usage of "SupportTicketsNoSubscription_Create" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -445,10 +457,17 @@ public async Task CreateOrUpdate_CreateATicketForTechnicalIssueRelatedToASpecifi // invoke the operation string supportTicketName = "testticket"; - SupportTicketData data = new SupportTicketData("my description", "/providers/Microsoft.Support/services/virtual_machine_running_linux_service_guid/problemClassifications/problemClassification_guid", SupportSeverityLevel.Moderate, AdvancedDiagnosticConsent.Yes, new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), "my title", "/providers/Microsoft.Support/services/cddd3eb5-1830-b494-44fd-782f691479dc") + SupportTicketData data = new SupportTicketData() { + Description = "my description", + ProblemClassificationId = "/providers/Microsoft.Support/services/virtual_machine_running_linux_service_guid/problemClassifications/problemClassification_guid", + Severity = SupportSeverityLevel.Moderate, + AdvancedDiagnosticConsent = AdvancedDiagnosticConsent.Yes, ProblemScopingQuestions = "{\"articleId\":\"076846c1-4c0b-4b21-91c6-1a30246b3867\",\"scopingDetails\":[{\"question\":\"When did the problem begin?\",\"controlId\":\"problem_start_time\",\"orderId\":1,\"inputType\":\"static\",\"answer\":{\"displayValue\":\"2023-08-31T18:55:00.739Z\",\"value\":\"2023-08-31T18:55:00.739Z\",\"type\":\"datetime\"}},{\"question\":\"API Type of the Cosmos DB account\",\"controlId\":\"api_type\",\"orderId\":2,\"inputType\":\"static\",\"answer\":{\"displayValue\":\"Table\",\"value\":\"tables\",\"type\":\"string\"}},{\"question\":\"Table name\",\"controlId\":\"collection_name_table\",\"orderId\":11,\"inputType\":\"nonstatic\",\"answer\":{\"displayValue\":\"Select Table Name\",\"value\":\"dont_know_answer\",\"type\":\"string\"}},{\"question\":\"Provide additional details about the issue you're facing\",\"controlId\":\"problem_description\",\"orderId\":12,\"inputType\":\"nonstatic\",\"answer\":{\"displayValue\":\"test ticket, please ignore and close\",\"value\":\"test ticket, please ignore and close\",\"type\":\"string\"}}]}", SupportPlanId = "U291cmNlOlNDTSxDbGFyaWZ5SW5zdGFsbGF0aW9uU2l0ZUlkOjcsTGluZUl0ZW1JZDo5ODY1NzIyOSxDb250cmFjdElkOjk4NjU5MTk0LFN1YnNjcmlwdGlvbklkOjc2Y2I3N2ZhLThiMTctNGVhYi05NDkzLWI2NWRhY2U5OTgxMyw=", + ContactDetails = new SupportContactProfile("abc", "xyz", PreferredContactMethod.Email, "abc@contoso.com", "Pacific Standard Time", "usa", "en-US"), + Title = "my title", + ServiceId = "/providers/Microsoft.Support/services/cddd3eb5-1830-b494-44fd-782f691479dc", FileWorkspaceName = "6f16735c-1530836f-e9970f1a-2e49-47b7-96cd-9746b83aa066", SecondaryConsent = { diff --git a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_TenantSupportTicketResource.cs b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_TenantSupportTicketResource.cs index f50e3d37b631..db878fcbd00f 100644 --- a/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_TenantSupportTicketResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/samples/Generated/Samples/Sample_TenantSupportTicketResource.cs @@ -20,7 +20,7 @@ public partial class Sample_TenantSupportTicketResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CheckNameAvailabilitySupportTicketsNoSubscription_ChecksWhetherNameIsAvailableForSupportTicketResource() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CheckNameAvailability.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CheckNameAvailability.json // this example is just showing the usage of "SupportTicketsNoSubscription_CheckNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -44,7 +44,7 @@ public async Task CheckNameAvailabilitySupportTicketsNoSubscription_ChecksWhethe [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_GetDetailsOfATicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/GetSupportTicketDetails.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/GetSupportTicketDetails.json // this example is just showing the usage of "SupportTicketsNoSubscription_Get" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -73,7 +73,7 @@ public async Task Get_GetDetailsOfATicket() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateAdvancedDiagnosticConsentOfASupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/UpdateAdvancedDiagnosticConsentOfSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/UpdateAdvancedDiagnosticConsentOfSupportTicket.json // this example is just showing the usage of "SupportTicketsNoSubscription_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -106,7 +106,7 @@ public async Task Update_UpdateAdvancedDiagnosticConsentOfASupportTicket() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateContactDetailsOfASupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/UpdateContactDetailsOfSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/UpdateContactDetailsOfSupportTicket.json // this example is just showing the usage of "SupportTicketsNoSubscription_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -153,7 +153,7 @@ public async Task Update_UpdateContactDetailsOfASupportTicket() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateSeverityOfASupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/UpdateSeverityOfSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/UpdateSeverityOfSupportTicket.json // this example is just showing the usage of "SupportTicketsNoSubscription_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -186,7 +186,7 @@ public async Task Update_UpdateSeverityOfASupportTicket() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_UpdateStatusOfASupportTicket() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/UpdateStatusOfSupportTicket.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/UpdateStatusOfSupportTicket.json // this example is just showing the usage of "SupportTicketsNoSubscription_Update" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line @@ -219,7 +219,7 @@ public async Task Update_UpdateStatusOfASupportTicket() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CheckNameAvailabilityCommunicationsNoSubscription_ChecksWhetherNameIsAvailableForCommunicationResource() { - // Generated from example definition: specification/support/resource-manager/Microsoft.Support/stable/2024-04-01/examples/CheckNameAvailabilityForNoSubscriptionSupportTicketCommunication.json + // Generated from example definition: specification/support/resource-manager/Microsoft.Support/preview/2023-06-01-preview/examples/CheckNameAvailabilityForNoSubscriptionSupportTicketCommunication.json // this example is just showing the usage of "CommunicationsNoSubscription_CheckNameAvailability" operation, for the dependent resources, they will have to be created separately. // get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/ArmSupportModelFactory.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/ArmSupportModelFactory.cs index ff20fff925be..a5ce3da6af27 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/ArmSupportModelFactory.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/ArmSupportModelFactory.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using Azure.Core; using Azure.ResourceManager.Models; @@ -23,10 +24,12 @@ public static partial class ArmSupportModelFactory /// The systemData. /// Localized name of the Azure service. /// ARM Resource types. + /// Metadata about the service, only visible for 1P clients. /// A new instance for mocking. - public static SupportAzureServiceData SupportAzureServiceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, IEnumerable resourceTypes = null) + public static SupportAzureServiceData SupportAzureServiceData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, IEnumerable resourceTypes = null, IReadOnlyDictionary metadata = null) { resourceTypes ??= new List(); + metadata ??= new Dictionary(); return new SupportAzureServiceData( id, @@ -35,6 +38,87 @@ public static SupportAzureServiceData SupportAzureServiceData(ResourceIdentifier systemData, displayName, resourceTypes?.ToList(), + metadata, + serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Set of problem classification objects classified. + /// A new instance for mocking. + public static ServiceClassificationOutput ServiceClassificationOutput(IEnumerable serviceClassificationResults = null) + { + serviceClassificationResults ??= new List(); + + return new ServiceClassificationOutput(serviceClassificationResults?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Azure resource Id of the service. + /// Localized name of the azure service. + /// List of applicable ARM resource types for this service. + /// Child service. + /// A new instance for mocking. + public static ServiceClassificationAnswer ServiceClassificationAnswer(ResourceIdentifier serviceId = null, string displayName = null, IEnumerable resourceTypes = null, ClassificationService childService = null) + { + resourceTypes ??= new List(); + + return new ServiceClassificationAnswer(serviceId, displayName, resourceTypes?.ToList(), serializedAdditionalRawData: null, childService); + } + + /// Initializes a new instance of . + /// Azure resource Id of the service. + /// Localized name of the azure service. + /// List of applicable ARM resource types for this service. + /// A new instance for mocking. + public static ClassificationService ClassificationService(ResourceIdentifier serviceId = null, string displayName = null, IEnumerable resourceTypes = null) + { + resourceTypes ??= new List(); + + return new ClassificationService(serviceId, displayName, resourceTypes?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Natural language description of the customer’s issue. + /// ARM resource Id of the resource that is having the issue. + /// A new instance for mocking. + public static ServiceProblemClassificationContent ServiceProblemClassificationContent(string issueSummary = null, ResourceIdentifier resourceId = null) + { + return new ServiceProblemClassificationContent(issueSummary, resourceId, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Set of problem classification objects classified. + /// A new instance for mocking. + public static ServiceProblemClassificationListResult ServiceProblemClassificationListResult(IEnumerable problemClassificationResults = null) + { + problemClassificationResults ??= new List(); + + return new ServiceProblemClassificationListResult(problemClassificationResults?.ToList(), serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// Identifier that may be used for solution discovery or some other purposes. + /// Title of the problem classification result. + /// Description of the problem classification result. + /// Identifier of the service associated with this problem classification result. + /// Identifier that may be used for support ticket creation. + /// Azure resource Id of the service. + /// Localized name of the azure service. + /// List of applicable ARM resource types for this service. + /// A new instance for mocking. + public static ServiceProblemClassificationResult ServiceProblemClassificationResult(string problemId = null, string title = null, string description = null, ResourceIdentifier serviceId = null, string problemClassificationId = null, ResourceIdentifier relatedServiceId = null, string displayName = null, IEnumerable resourceTypes = null) + { + resourceTypes ??= new List(); + + return new ServiceProblemClassificationResult( + problemId, + title, + description, + serviceId, + problemClassificationId, + relatedServiceId, + displayName, + resourceTypes?.ToList(), serializedAdditionalRawData: null); } @@ -45,10 +129,13 @@ public static SupportAzureServiceData SupportAzureServiceData(ResourceIdentifier /// The systemData. /// Localized name of problem classification. /// This property indicates whether secondary consent is present for problem classification. + /// String-to-string dictionary for additional metadata. + /// Reference to the parent problem classification which has same structure as problem classification. /// A new instance for mocking. - public static ProblemClassificationData ProblemClassificationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, IEnumerable secondaryConsentEnabled = null) + public static ProblemClassificationData ProblemClassificationData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string displayName = null, IEnumerable secondaryConsentEnabled = null, IReadOnlyDictionary metadata = null, ProblemClassificationData parentProblemClassification = null) { secondaryConsentEnabled ??= new List(); + metadata ??= new Dictionary(); return new ProblemClassificationData( id, @@ -57,6 +144,8 @@ public static ProblemClassificationData ProblemClassificationData(ResourceIdenti systemData, displayName, secondaryConsentEnabled?.ToList(), + metadata, + parentProblemClassification, serializedAdditionalRawData: null); } @@ -112,7 +201,7 @@ public static SupportNameAvailabilityResult SupportNameAvailabilityResult(bool? /// Additional ticket details associated with a quota support ticket request. /// This property indicates secondary consents for the support ticket. /// A new instance for mocking. - public static SupportTicketData SupportTicketData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string supportTicketId = null, string description = null, string problemClassificationId = null, string problemClassificationDisplayName = null, SupportSeverityLevel severity = default, string enrollmentId = null, bool? require24X7Response = null, AdvancedDiagnosticConsent advancedDiagnosticConsent = default, string problemScopingQuestions = null, string supportPlanId = null, SupportContactProfile contactDetails = null, SupportServiceLevelAgreement serviceLevelAgreement = null, string supportEngineerEmailAddress = null, string supportPlanType = null, string supportPlanDisplayName = null, string title = null, DateTimeOffset? problemStartOn = null, string serviceId = null, string serviceDisplayName = null, string status = null, DateTimeOffset? createdOn = null, DateTimeOffset? modifiedOn = null, string fileWorkspaceName = null, IsTemporaryTicket? isTemporaryTicket = null, ResourceIdentifier technicalTicketDetailsResourceId = null, QuotaTicketDetails quotaTicketDetails = null, IEnumerable secondaryConsent = null) + public static SupportTicketData SupportTicketData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, string supportTicketId = null, string description = null, string problemClassificationId = null, string problemClassificationDisplayName = null, SupportSeverityLevel? severity = null, string enrollmentId = null, bool? require24X7Response = null, AdvancedDiagnosticConsent? advancedDiagnosticConsent = null, string problemScopingQuestions = null, string supportPlanId = null, SupportContactProfile contactDetails = null, SupportServiceLevelAgreement serviceLevelAgreement = null, string supportEngineerEmailAddress = null, string supportPlanType = null, string supportPlanDisplayName = null, string title = null, DateTimeOffset? problemStartOn = null, string serviceId = null, string serviceDisplayName = null, string status = null, DateTimeOffset? createdOn = null, DateTimeOffset? modifiedOn = null, string fileWorkspaceName = null, IsTemporaryTicket? isTemporaryTicket = null, ResourceIdentifier technicalTicketDetailsResourceId = null, QuotaTicketDetails quotaTicketDetails = null, IEnumerable secondaryConsent = null) { secondaryConsent ??= new List(); @@ -255,9 +344,9 @@ public static FileWorkspaceDetailData FileWorkspaceDetailData(ResourceIdentifier /// The resourceType. /// The systemData. /// Time in UTC (ISO 8601 format) when file workspace was created. - /// Size of each chunk. The size of each chunk should be provided in bytes and must not exceed 2.5 megabytes (MB). - /// Size of the file to be uploaded. The file size must not exceed 5 MB and should be provided in bytes. - /// Number of chunks to be uploaded. The maximum number of allowed chunks is 2. + /// Size of each chunk. + /// Size of the file to be uploaded. + /// Number of chunks to be uploaded. /// A new instance for mocking. public static SupportFileDetailData SupportFileDetailData(ResourceIdentifier id = null, string name = null, ResourceType resourceType = default, SystemData systemData = null, DateTimeOffset? createdOn = null, int? chunkSize = null, int? fileSize = null, int? numberOfChunks = null) { @@ -272,5 +361,41 @@ public static SupportFileDetailData SupportFileDetailData(ResourceIdentifier id numberOfChunks, serializedAdditionalRawData: null); } + + /// Initializes a new instance of . + /// The resource Id of support resource type. + /// A new instance for mocking. + public static LookUpResourceIdResult LookUpResourceIdResult(ResourceIdentifier resourceId = null) + { + return new LookUpResourceIdResult(resourceId, serializedAdditionalRawData: null); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Localized name of the Azure service. + /// ARM Resource types. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static SupportAzureServiceData SupportAzureServiceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string displayName, IEnumerable resourceTypes) + { + return SupportAzureServiceData(id: id, name: name, resourceType: resourceType, systemData: systemData, displayName: displayName, resourceTypes: resourceTypes, metadata: default); + } + + /// Initializes a new instance of . + /// The id. + /// The name. + /// The resourceType. + /// The systemData. + /// Localized name of problem classification. + /// This property indicates whether secondary consent is present for problem classification. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static ProblemClassificationData ProblemClassificationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string displayName, IEnumerable secondaryConsentEnabled) + { + return ProblemClassificationData(id: id, name: name, resourceType: resourceType, systemData: systemData, displayName: displayName, secondaryConsentEnabled: secondaryConsentEnabled, metadata: default, parentProblemClassification: default); + } } } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Extensions/MockableSupportSubscriptionResource.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Extensions/MockableSupportSubscriptionResource.cs index 3393b0f9da72..ec95edfe6906 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/Extensions/MockableSupportSubscriptionResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Extensions/MockableSupportSubscriptionResource.cs @@ -17,6 +17,10 @@ namespace Azure.ResourceManager.Support.Mocking /// A class to add extension methods to SubscriptionResource. public partial class MockableSupportSubscriptionResource : ArmResource { + private ClientDiagnostics _serviceClassificationsClientDiagnostics; + private ServiceClassificationsRestOperations _serviceClassificationsRestClient; + private ClientDiagnostics _problemClassificationClientDiagnostics; + private ProblemClassificationsRestOperations _problemClassificationRestClient; private ClientDiagnostics _subscriptionSupportTicketSupportTicketsClientDiagnostics; private SupportTicketsRestOperations _subscriptionSupportTicketSupportTicketsRestClient; @@ -32,6 +36,10 @@ internal MockableSupportSubscriptionResource(ArmClient client, ResourceIdentifie { } + private ClientDiagnostics ServiceClassificationsClientDiagnostics => _serviceClassificationsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Support", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private ServiceClassificationsRestOperations ServiceClassificationsRestClient => _serviceClassificationsRestClient ??= new ServiceClassificationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + private ClientDiagnostics ProblemClassificationClientDiagnostics => _problemClassificationClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Support", ProblemClassificationResource.ResourceType.Namespace, Diagnostics); + private ProblemClassificationsRestOperations ProblemClassificationRestClient => _problemClassificationRestClient ??= new ProblemClassificationsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ProblemClassificationResource.ResourceType)); private ClientDiagnostics SubscriptionSupportTicketSupportTicketsClientDiagnostics => _subscriptionSupportTicketSupportTicketsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Support", SubscriptionSupportTicketResource.ResourceType.Namespace, Diagnostics); private SupportTicketsRestOperations SubscriptionSupportTicketSupportTicketsRestClient => _subscriptionSupportTicketSupportTicketsRestClient ??= new SupportTicketsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(SubscriptionSupportTicketResource.ResourceType)); @@ -61,7 +69,7 @@ public virtual SubscriptionSupportTicketCollection GetSubscriptionSupportTickets /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -92,7 +100,7 @@ public virtual async Task> GetSubscr /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -130,7 +138,7 @@ public virtual SubscriptionFileWorkspaceCollection GetSubscriptionFileWorkspaces /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -161,7 +169,7 @@ public virtual async Task> GetSubscr /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -179,6 +187,172 @@ public virtual Response GetSubscriptionFileWo return GetSubscriptionFileWorkspaces().Get(fileWorkspaceName, cancellationToken); } + /// + /// Classify the list of right Azure services. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Support/classifyServices + /// + /// + /// Operation Id + /// ServiceClassifications_classifyServices + /// + /// + /// Default Api Version + /// 2023-06-01-preview + /// + /// + /// + /// Input to check. + /// The cancellation token to use. + /// is null. + public virtual async Task> ClassifyServicesServiceClassificationAsync(ServiceClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ServiceClassificationsClientDiagnostics.CreateScope("MockableSupportSubscriptionResource.ClassifyServicesServiceClassification"); + scope.Start(); + try + { + var response = await ServiceClassificationsRestClient.ClassifyServicesAsync(Id.SubscriptionId, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Classify the list of right Azure services. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Support/classifyServices + /// + /// + /// Operation Id + /// ServiceClassifications_classifyServices + /// + /// + /// Default Api Version + /// 2023-06-01-preview + /// + /// + /// + /// Input to check. + /// The cancellation token to use. + /// is null. + public virtual Response ClassifyServicesServiceClassification(ServiceClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ServiceClassificationsClientDiagnostics.CreateScope("MockableSupportSubscriptionResource.ClassifyServicesServiceClassification"); + scope.Start(); + try + { + var response = ServiceClassificationsRestClient.ClassifyServices(Id.SubscriptionId, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Classify the right problem classifications (categories) available for a specific Azure service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Support/services/{problemServiceName}/classifyProblems + /// + /// + /// Operation Id + /// ProblemClassifications_classifyProblems + /// + /// + /// Default Api Version + /// 2023-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Azure service for which the problem classifications need to be retrieved. + /// Input to check. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> ClassifyServiceProblemAsync(string problemServiceName, ServiceProblemClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(problemServiceName, nameof(problemServiceName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ProblemClassificationClientDiagnostics.CreateScope("MockableSupportSubscriptionResource.ClassifyServiceProblem"); + scope.Start(); + try + { + var response = await ProblemClassificationRestClient.ClassifyProblemsAsync(Id.SubscriptionId, problemServiceName, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Classify the right problem classifications (categories) available for a specific Azure service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Support/services/{problemServiceName}/classifyProblems + /// + /// + /// Operation Id + /// ProblemClassifications_classifyProblems + /// + /// + /// Default Api Version + /// 2023-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Name of the Azure service for which the problem classifications need to be retrieved. + /// Input to check. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual Response ClassifyServiceProblem(string problemServiceName, ServiceProblemClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(problemServiceName, nameof(problemServiceName)); + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ProblemClassificationClientDiagnostics.CreateScope("MockableSupportSubscriptionResource.ClassifyServiceProblem"); + scope.Start(); + try + { + var response = ProblemClassificationRestClient.ClassifyProblems(Id.SubscriptionId, problemServiceName, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Check the availability of a resource name. This API should be used to check the uniqueness of the name for support ticket creation for the selected subscription. /// @@ -192,7 +366,7 @@ public virtual Response GetSubscriptionFileWo /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -234,7 +408,7 @@ public virtual async Task> CheckSupportT /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Extensions/MockableSupportTenantResource.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Extensions/MockableSupportTenantResource.cs index 47b3a7075fa1..f7b107135a2e 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/Extensions/MockableSupportTenantResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Extensions/MockableSupportTenantResource.cs @@ -17,8 +17,12 @@ namespace Azure.ResourceManager.Support.Mocking /// A class to add extension methods to TenantResource. public partial class MockableSupportTenantResource : ArmResource { + private ClientDiagnostics _serviceClassificationsNoSubscriptionClientDiagnostics; + private ServiceClassificationsNoSubscriptionRestOperations _serviceClassificationsNoSubscriptionRestClient; private ClientDiagnostics _tenantSupportTicketSupportTicketsNoSubscriptionClientDiagnostics; private SupportTicketsNoSubscriptionRestOperations _tenantSupportTicketSupportTicketsNoSubscriptionRestClient; + private ClientDiagnostics _lookUpResourceIdClientDiagnostics; + private LookUpResourceIdRestOperations _lookUpResourceIdRestClient; /// Initializes a new instance of the class for mocking. protected MockableSupportTenantResource() @@ -32,8 +36,12 @@ internal MockableSupportTenantResource(ArmClient client, ResourceIdentifier id) { } + private ClientDiagnostics ServiceClassificationsNoSubscriptionClientDiagnostics => _serviceClassificationsNoSubscriptionClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Support", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private ServiceClassificationsNoSubscriptionRestOperations ServiceClassificationsNoSubscriptionRestClient => _serviceClassificationsNoSubscriptionRestClient ??= new ServiceClassificationsNoSubscriptionRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private ClientDiagnostics TenantSupportTicketSupportTicketsNoSubscriptionClientDiagnostics => _tenantSupportTicketSupportTicketsNoSubscriptionClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Support", TenantSupportTicketResource.ResourceType.Namespace, Diagnostics); private SupportTicketsNoSubscriptionRestOperations TenantSupportTicketSupportTicketsNoSubscriptionRestClient => _tenantSupportTicketSupportTicketsNoSubscriptionRestClient ??= new SupportTicketsNoSubscriptionRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(TenantSupportTicketResource.ResourceType)); + private ClientDiagnostics LookUpResourceIdClientDiagnostics => _lookUpResourceIdClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Support", ProviderConstants.DefaultProviderNamespace, Diagnostics); + private LookUpResourceIdRestOperations LookUpResourceIdRestClient => _lookUpResourceIdRestClient ??= new LookUpResourceIdRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); private string GetApiVersionOrNull(ResourceType resourceType) { @@ -61,7 +69,7 @@ public virtual SupportAzureServiceCollection GetSupportAzureServices() /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -69,7 +77,7 @@ public virtual SupportAzureServiceCollection GetSupportAzureServices() /// /// /// - /// Name of the Azure service. + /// Name of the Azure service for which the problem classifications need to be retrieved. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -92,7 +100,7 @@ public virtual async Task> GetSupportAzure /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -100,7 +108,7 @@ public virtual async Task> GetSupportAzure /// /// /// - /// Name of the Azure service. + /// Name of the Azure service for which the problem classifications need to be retrieved. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -130,7 +138,7 @@ public virtual TenantSupportTicketCollection GetTenantSupportTickets() /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -161,7 +169,7 @@ public virtual async Task> GetTenantSuppor /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -199,7 +207,7 @@ public virtual TenantFileWorkspaceCollection GetTenantFileWorkspaces() /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -230,7 +238,7 @@ public virtual async Task> GetTenantFileWo /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -248,6 +256,82 @@ public virtual Response GetTenantFileWorkspace(stri return GetTenantFileWorkspaces().Get(fileWorkspaceName, cancellationToken); } + /// + /// Classify the list of right Azure services. + /// + /// + /// Request Path + /// /providers/Microsoft.Support/classifyServices + /// + /// + /// Operation Id + /// ServiceClassificationsNoSubscription_classifyServices + /// + /// + /// Default Api Version + /// 2023-06-01-preview + /// + /// + /// + /// Input to check. + /// The cancellation token to use. + /// is null. + public virtual async Task> ClassifyServicesServiceClassificationsNoSubscriptionAsync(ServiceClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ServiceClassificationsNoSubscriptionClientDiagnostics.CreateScope("MockableSupportTenantResource.ClassifyServicesServiceClassificationsNoSubscription"); + scope.Start(); + try + { + var response = await ServiceClassificationsNoSubscriptionRestClient.ClassifyServicesAsync(content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Classify the list of right Azure services. + /// + /// + /// Request Path + /// /providers/Microsoft.Support/classifyServices + /// + /// + /// Operation Id + /// ServiceClassificationsNoSubscription_classifyServices + /// + /// + /// Default Api Version + /// 2023-06-01-preview + /// + /// + /// + /// Input to check. + /// The cancellation token to use. + /// is null. + public virtual Response ClassifyServicesServiceClassificationsNoSubscription(ServiceClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = ServiceClassificationsNoSubscriptionClientDiagnostics.CreateScope("MockableSupportTenantResource.ClassifyServicesServiceClassificationsNoSubscription"); + scope.Start(); + try + { + var response = ServiceClassificationsNoSubscriptionRestClient.ClassifyServices(content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Check the availability of a resource name. This API should be used to check the uniqueness of the name for support ticket creation for the selected subscription. /// @@ -261,7 +345,7 @@ public virtual Response GetTenantFileWorkspace(stri /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -303,7 +387,7 @@ public virtual async Task> CheckNameAvai /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -331,5 +415,81 @@ public virtual Response CheckNameAvailabilitySupp throw; } } + + /// + /// This operation fetches ARM resource id of support resource type. + /// + /// + /// Request Path + /// /providers/Microsoft.Support/lookUpResourceId + /// + /// + /// Operation Id + /// LookUpResourceId_Post + /// + /// + /// Default Api Version + /// 2023-06-01-preview + /// + /// + /// + /// Look up resource id request body. + /// The cancellation token to use. + /// is null. + public virtual async Task> LookUpResourceIdAsync(LookUpResourceIdContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = LookUpResourceIdClientDiagnostics.CreateScope("MockableSupportTenantResource.LookUpResourceId"); + scope.Start(); + try + { + var response = await LookUpResourceIdRestClient.PostAsync(content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// This operation fetches ARM resource id of support resource type. + /// + /// + /// Request Path + /// /providers/Microsoft.Support/lookUpResourceId + /// + /// + /// Operation Id + /// LookUpResourceId_Post + /// + /// + /// Default Api Version + /// 2023-06-01-preview + /// + /// + /// + /// Look up resource id request body. + /// The cancellation token to use. + /// is null. + public virtual Response LookUpResourceId(LookUpResourceIdContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = LookUpResourceIdClientDiagnostics.CreateScope("MockableSupportTenantResource.LookUpResourceId"); + scope.Start(); + try + { + var response = LookUpResourceIdRestClient.Post(content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } } } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Extensions/SupportExtensions.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Extensions/SupportExtensions.cs index ff09d24dca18..32341d52ca56 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/Extensions/SupportExtensions.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Extensions/SupportExtensions.cs @@ -291,7 +291,7 @@ public static SubscriptionSupportTicketCollection GetSubscriptionSupportTickets( /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -329,7 +329,7 @@ public static async Task> GetSubscri /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -384,7 +384,7 @@ public static SubscriptionFileWorkspaceCollection GetSubscriptionFileWorkspaces( /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -422,7 +422,7 @@ public static async Task> GetSubscri /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -447,6 +447,146 @@ public static Response GetSubscriptionFileWor return GetMockableSupportSubscriptionResource(subscriptionResource).GetSubscriptionFileWorkspace(fileWorkspaceName, cancellationToken); } + /// + /// Classify the list of right Azure services. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Support/classifyServices + /// + /// + /// Operation Id + /// ServiceClassifications_classifyServices + /// + /// + /// Default Api Version + /// 2023-06-01-preview + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Input to check. + /// The cancellation token to use. + /// or is null. + public static async Task> ClassifyServicesServiceClassificationAsync(this SubscriptionResource subscriptionResource, ServiceClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableSupportSubscriptionResource(subscriptionResource).ClassifyServicesServiceClassificationAsync(content, cancellationToken).ConfigureAwait(false); + } + + /// + /// Classify the list of right Azure services. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Support/classifyServices + /// + /// + /// Operation Id + /// ServiceClassifications_classifyServices + /// + /// + /// Default Api Version + /// 2023-06-01-preview + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Input to check. + /// The cancellation token to use. + /// or is null. + public static Response ClassifyServicesServiceClassification(this SubscriptionResource subscriptionResource, ServiceClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableSupportSubscriptionResource(subscriptionResource).ClassifyServicesServiceClassification(content, cancellationToken); + } + + /// + /// Classify the right problem classifications (categories) available for a specific Azure service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Support/services/{problemServiceName}/classifyProblems + /// + /// + /// Operation Id + /// ProblemClassifications_classifyProblems + /// + /// + /// Default Api Version + /// 2023-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of the Azure service for which the problem classifications need to be retrieved. + /// Input to check. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// , or is null. + public static async Task> ClassifyServiceProblemAsync(this SubscriptionResource subscriptionResource, string problemServiceName, ServiceProblemClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return await GetMockableSupportSubscriptionResource(subscriptionResource).ClassifyServiceProblemAsync(problemServiceName, content, cancellationToken).ConfigureAwait(false); + } + + /// + /// Classify the right problem classifications (categories) available for a specific Azure service. + /// + /// + /// Request Path + /// /subscriptions/{subscriptionId}/providers/Microsoft.Support/services/{problemServiceName}/classifyProblems + /// + /// + /// Operation Id + /// ProblemClassifications_classifyProblems + /// + /// + /// Default Api Version + /// 2023-06-01-preview + /// + /// + /// Resource + /// + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Name of the Azure service for which the problem classifications need to be retrieved. + /// Input to check. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// , or is null. + public static Response ClassifyServiceProblem(this SubscriptionResource subscriptionResource, string problemServiceName, ServiceProblemClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); + + return GetMockableSupportSubscriptionResource(subscriptionResource).ClassifyServiceProblem(problemServiceName, content, cancellationToken); + } + /// /// Check the availability of a resource name. This API should be used to check the uniqueness of the name for support ticket creation for the selected subscription. /// @@ -460,7 +600,7 @@ public static Response GetSubscriptionFileWor /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -496,7 +636,7 @@ public static async Task> CheckSupportTi /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -549,7 +689,7 @@ public static SupportAzureServiceCollection GetSupportAzureServices(this TenantR /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -562,7 +702,7 @@ public static SupportAzureServiceCollection GetSupportAzureServices(this TenantR /// /// /// The instance the method will execute against. - /// Name of the Azure service. + /// Name of the Azure service for which the problem classifications need to be retrieved. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -587,7 +727,7 @@ public static async Task> GetSupportAzureS /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -600,7 +740,7 @@ public static async Task> GetSupportAzureS /// /// /// The instance the method will execute against. - /// Name of the Azure service. + /// Name of the Azure service for which the problem classifications need to be retrieved. /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. @@ -642,7 +782,7 @@ public static TenantSupportTicketCollection GetTenantSupportTickets(this TenantR /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -680,7 +820,7 @@ public static async Task> GetTenantSupport /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -735,7 +875,7 @@ public static TenantFileWorkspaceCollection GetTenantFileWorkspaces(this TenantR /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -773,7 +913,7 @@ public static async Task> GetTenantFileWor /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -798,6 +938,70 @@ public static Response GetTenantFileWorkspace(this return GetMockableSupportTenantResource(tenantResource).GetTenantFileWorkspace(fileWorkspaceName, cancellationToken); } + /// + /// Classify the list of right Azure services. + /// + /// + /// Request Path + /// /providers/Microsoft.Support/classifyServices + /// + /// + /// Operation Id + /// ServiceClassificationsNoSubscription_classifyServices + /// + /// + /// Default Api Version + /// 2023-06-01-preview + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Input to check. + /// The cancellation token to use. + /// or is null. + public static async Task> ClassifyServicesServiceClassificationsNoSubscriptionAsync(this TenantResource tenantResource, ServiceClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tenantResource, nameof(tenantResource)); + + return await GetMockableSupportTenantResource(tenantResource).ClassifyServicesServiceClassificationsNoSubscriptionAsync(content, cancellationToken).ConfigureAwait(false); + } + + /// + /// Classify the list of right Azure services. + /// + /// + /// Request Path + /// /providers/Microsoft.Support/classifyServices + /// + /// + /// Operation Id + /// ServiceClassificationsNoSubscription_classifyServices + /// + /// + /// Default Api Version + /// 2023-06-01-preview + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Input to check. + /// The cancellation token to use. + /// or is null. + public static Response ClassifyServicesServiceClassificationsNoSubscription(this TenantResource tenantResource, ServiceClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tenantResource, nameof(tenantResource)); + + return GetMockableSupportTenantResource(tenantResource).ClassifyServicesServiceClassificationsNoSubscription(content, cancellationToken); + } + /// /// Check the availability of a resource name. This API should be used to check the uniqueness of the name for support ticket creation for the selected subscription. /// @@ -811,7 +1015,7 @@ public static Response GetTenantFileWorkspace(this /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -847,7 +1051,7 @@ public static async Task> CheckNameAvail /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -869,5 +1073,69 @@ public static Response CheckNameAvailabilitySuppo return GetMockableSupportTenantResource(tenantResource).CheckNameAvailabilitySupportTicketsNoSubscription(content, cancellationToken); } + + /// + /// This operation fetches ARM resource id of support resource type. + /// + /// + /// Request Path + /// /providers/Microsoft.Support/lookUpResourceId + /// + /// + /// Operation Id + /// LookUpResourceId_Post + /// + /// + /// Default Api Version + /// 2023-06-01-preview + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Look up resource id request body. + /// The cancellation token to use. + /// or is null. + public static async Task> LookUpResourceIdAsync(this TenantResource tenantResource, LookUpResourceIdContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tenantResource, nameof(tenantResource)); + + return await GetMockableSupportTenantResource(tenantResource).LookUpResourceIdAsync(content, cancellationToken).ConfigureAwait(false); + } + + /// + /// This operation fetches ARM resource id of support resource type. + /// + /// + /// Request Path + /// /providers/Microsoft.Support/lookUpResourceId + /// + /// + /// Operation Id + /// LookUpResourceId_Post + /// + /// + /// Default Api Version + /// 2023-06-01-preview + /// + /// + /// + /// Mocking + /// To mock this method, please mock instead. + /// + /// + /// The instance the method will execute against. + /// Look up resource id request body. + /// The cancellation token to use. + /// or is null. + public static Response LookUpResourceId(this TenantResource tenantResource, LookUpResourceIdContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tenantResource, nameof(tenantResource)); + + return GetMockableSupportTenantResource(tenantResource).LookUpResourceId(content, cancellationToken); + } } } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ChatTranscriptMessageProperties.Serialization.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ChatTranscriptMessageProperties.Serialization.cs index 2756d6300e5f..40c9210537f1 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ChatTranscriptMessageProperties.Serialization.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ChatTranscriptMessageProperties.Serialization.cs @@ -41,11 +41,8 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mo writer.WritePropertyName("sender"u8); writer.WriteStringValue(Sender); } - if (Optional.IsDefined(Body)) - { - writer.WritePropertyName("body"u8); - writer.WriteStringValue(Body); - } + writer.WritePropertyName("body"u8); + writer.WriteStringValue(Body); if (options.Format != "W" && Optional.IsDefined(CreatedOn)) { writer.WritePropertyName("createdDate"u8); diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ChatTranscriptMessageProperties.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ChatTranscriptMessageProperties.cs index 2fc008785816..58a04a958520 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ChatTranscriptMessageProperties.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ChatTranscriptMessageProperties.cs @@ -46,8 +46,13 @@ public partial class ChatTranscriptMessageProperties private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - public ChatTranscriptMessageProperties() + /// Body of the communication. + /// is null. + public ChatTranscriptMessageProperties(string body) { + Argument.AssertNotNull(body, nameof(body)); + + Body = body; } /// Initializes a new instance of . @@ -67,6 +72,11 @@ internal ChatTranscriptMessageProperties(TranscriptContentType? contentType, Sup _serializedAdditionalRawData = serializedAdditionalRawData; } + /// Initializes a new instance of for deserialization. + internal ChatTranscriptMessageProperties() + { + } + /// Content type. public TranscriptContentType? ContentType { get; } /// Direction of communication. diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ClassificationService.Serialization.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ClassificationService.Serialization.cs new file mode 100644 index 000000000000..5fa83e60592d --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ClassificationService.Serialization.cs @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Support.Models +{ + public partial class ClassificationService : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ClassificationService)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(ServiceId)) + { + writer.WritePropertyName("serviceId"u8); + writer.WriteStringValue(ServiceId); + } + if (options.Format != "W" && Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (Optional.IsCollectionDefined(ResourceTypes)) + { + writer.WritePropertyName("resourceTypes"u8); + writer.WriteStartArray(); + foreach (var item in ResourceTypes) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ClassificationService IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ClassificationService)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeClassificationService(document.RootElement, options); + } + + internal static ClassificationService DeserializeClassificationService(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier serviceId = default; + string displayName = default; + IReadOnlyList resourceTypes = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("serviceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null || property.Value.ValueKind == JsonValueKind.String && property.Value.GetString().Length == 0) + { + continue; + } + serviceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceTypes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new ResourceType(item.GetString())); + } + resourceTypes = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ClassificationService(serviceId, displayName, resourceTypes ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ClassificationService)} does not support writing '{options.Format}' format."); + } + } + + ClassificationService IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeClassificationService(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ClassificationService)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ClassificationService.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ClassificationService.cs new file mode 100644 index 000000000000..3bf6d735065f --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ClassificationService.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.Support.Models +{ + /// Service Classification result object. + public partial class ClassificationService + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private protected IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ClassificationService() + { + ResourceTypes = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Azure resource Id of the service. + /// Localized name of the azure service. + /// List of applicable ARM resource types for this service. + /// Keeps track of any properties unknown to the library. + internal ClassificationService(ResourceIdentifier serviceId, string displayName, IReadOnlyList resourceTypes, IDictionary serializedAdditionalRawData) + { + ServiceId = serviceId; + DisplayName = displayName; + ResourceTypes = resourceTypes; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Azure resource Id of the service. + public ResourceIdentifier ServiceId { get; } + /// Localized name of the azure service. + public string DisplayName { get; } + /// List of applicable ARM resource types for this service. + public IReadOnlyList ResourceTypes { get; } + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/LookUpResourceIdContent.Serialization.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/LookUpResourceIdContent.Serialization.cs new file mode 100644 index 000000000000..da0668cddfc8 --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/LookUpResourceIdContent.Serialization.cs @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Support.Models +{ + public partial class LookUpResourceIdContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LookUpResourceIdContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(Identifier)) + { + writer.WritePropertyName("identifier"u8); + writer.WriteStringValue(Identifier); + } + if (Optional.IsDefined(ResourceType)) + { + writer.WritePropertyName("type"u8); + writer.WriteStringValue(ResourceType.Value.ToString()); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + LookUpResourceIdContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LookUpResourceIdContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeLookUpResourceIdContent(document.RootElement, options); + } + + internal static LookUpResourceIdContent DeserializeLookUpResourceIdContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string identifier = default; + SupportResourceTypeName? type = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("identifier"u8)) + { + identifier = property.Value.GetString(); + continue; + } + if (property.NameEquals("type"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + type = new SupportResourceTypeName(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new LookUpResourceIdContent(identifier, type, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(LookUpResourceIdContent)} does not support writing '{options.Format}' format."); + } + } + + LookUpResourceIdContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeLookUpResourceIdContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(LookUpResourceIdContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/LookUpResourceIdContent.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/LookUpResourceIdContent.cs new file mode 100644 index 000000000000..5e971952cb15 --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/LookUpResourceIdContent.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Support.Models +{ + /// The look up resource Id request body. + public partial class LookUpResourceIdContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public LookUpResourceIdContent() + { + } + + /// Initializes a new instance of . + /// The System generated Id that is unique. Use supportTicketId property for Microsoft.Support/supportTickets resource type. + /// The type of resource. + /// Keeps track of any properties unknown to the library. + internal LookUpResourceIdContent(string identifier, SupportResourceTypeName? resourceType, IDictionary serializedAdditionalRawData) + { + Identifier = identifier; + ResourceType = resourceType; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The System generated Id that is unique. Use supportTicketId property for Microsoft.Support/supportTickets resource type. + public string Identifier { get; set; } + /// The type of resource. + public SupportResourceTypeName? ResourceType { get; set; } + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/LookUpResourceIdResult.Serialization.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/LookUpResourceIdResult.Serialization.cs new file mode 100644 index 000000000000..7bc8bc5c97ba --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/LookUpResourceIdResult.Serialization.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Support.Models +{ + public partial class LookUpResourceIdResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LookUpResourceIdResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(ResourceId)) + { + writer.WritePropertyName("resourceId"u8); + writer.WriteStringValue(ResourceId); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + LookUpResourceIdResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(LookUpResourceIdResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeLookUpResourceIdResult(document.RootElement, options); + } + + internal static LookUpResourceIdResult DeserializeLookUpResourceIdResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ResourceIdentifier resourceId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("resourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null || property.Value.ValueKind == JsonValueKind.String && property.Value.GetString().Length == 0) + { + continue; + } + resourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new LookUpResourceIdResult(resourceId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(LookUpResourceIdResult)} does not support writing '{options.Format}' format."); + } + } + + LookUpResourceIdResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeLookUpResourceIdResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(LookUpResourceIdResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/LookUpResourceIdResult.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/LookUpResourceIdResult.cs new file mode 100644 index 000000000000..b1de510f96bd --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/LookUpResourceIdResult.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.Support.Models +{ + /// The look up resource id response. + public partial class LookUpResourceIdResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal LookUpResourceIdResult() + { + } + + /// Initializes a new instance of . + /// The resource Id of support resource type. + /// Keeps track of any properties unknown to the library. + internal LookUpResourceIdResult(ResourceIdentifier resourceId, IDictionary serializedAdditionalRawData) + { + ResourceId = resourceId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// The resource Id of support resource type. + public ResourceIdentifier ResourceId { get; } + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceClassificationAnswer.Serialization.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceClassificationAnswer.Serialization.cs new file mode 100644 index 000000000000..68881eebdc79 --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceClassificationAnswer.Serialization.cs @@ -0,0 +1,177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Support.Models +{ + public partial class ServiceClassificationAnswer : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ServiceClassificationAnswer)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(ChildService)) + { + writer.WritePropertyName("childService"u8); + writer.WriteObjectValue(ChildService, options); + } + if (options.Format != "W" && Optional.IsDefined(ServiceId)) + { + writer.WritePropertyName("serviceId"u8); + writer.WriteStringValue(ServiceId); + } + if (options.Format != "W" && Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (Optional.IsCollectionDefined(ResourceTypes)) + { + writer.WritePropertyName("resourceTypes"u8); + writer.WriteStartArray(); + foreach (var item in ResourceTypes) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ServiceClassificationAnswer IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ServiceClassificationAnswer)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeServiceClassificationAnswer(document.RootElement, options); + } + + internal static ServiceClassificationAnswer DeserializeServiceClassificationAnswer(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ClassificationService childService = default; + ResourceIdentifier serviceId = default; + string displayName = default; + IReadOnlyList resourceTypes = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("childService"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + childService = DeserializeClassificationService(property.Value, options); + continue; + } + if (property.NameEquals("serviceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + serviceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("displayName"u8)) + { + displayName = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceTypes"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(new ResourceType(item.GetString())); + } + resourceTypes = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ServiceClassificationAnswer(serviceId, displayName, resourceTypes ?? new ChangeTrackingList(), serializedAdditionalRawData, childService); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ServiceClassificationAnswer)} does not support writing '{options.Format}' format."); + } + } + + ServiceClassificationAnswer IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeServiceClassificationAnswer(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ServiceClassificationAnswer)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceClassificationAnswer.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceClassificationAnswer.cs new file mode 100644 index 000000000000..c6fd225c16f1 --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceClassificationAnswer.cs @@ -0,0 +1,36 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.Support.Models +{ + /// Service Classification result object. + public partial class ServiceClassificationAnswer : ClassificationService + { + /// Initializes a new instance of . + internal ServiceClassificationAnswer() + { + } + + /// Initializes a new instance of . + /// Azure resource Id of the service. + /// Localized name of the azure service. + /// List of applicable ARM resource types for this service. + /// Keeps track of any properties unknown to the library. + /// Child service. + internal ServiceClassificationAnswer(ResourceIdentifier serviceId, string displayName, IReadOnlyList resourceTypes, IDictionary serializedAdditionalRawData, ClassificationService childService) : base(serviceId, displayName, resourceTypes, serializedAdditionalRawData) + { + ChildService = childService; + } + + /// Child service. + public ClassificationService ChildService { get; } + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceClassificationContent.Serialization.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceClassificationContent.Serialization.cs new file mode 100644 index 000000000000..8223471b6191 --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceClassificationContent.Serialization.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Support.Models +{ + public partial class ServiceClassificationContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ServiceClassificationContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsDefined(IssueSummary)) + { + writer.WritePropertyName("issueSummary"u8); + writer.WriteStringValue(IssueSummary); + } + if (Optional.IsDefined(ResourceId)) + { + writer.WritePropertyName("resourceId"u8); + writer.WriteStringValue(ResourceId); + } + if (Optional.IsDefined(AdditionalContext)) + { + writer.WritePropertyName("additionalContext"u8); + writer.WriteStringValue(AdditionalContext); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ServiceClassificationContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ServiceClassificationContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeServiceClassificationContent(document.RootElement, options); + } + + internal static ServiceClassificationContent DeserializeServiceClassificationContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string issueSummary = default; + ResourceIdentifier resourceId = default; + string additionalContext = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("issueSummary"u8)) + { + issueSummary = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("additionalContext"u8)) + { + additionalContext = property.Value.GetString(); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ServiceClassificationContent(issueSummary, resourceId, additionalContext, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ServiceClassificationContent)} does not support writing '{options.Format}' format."); + } + } + + ServiceClassificationContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeServiceClassificationContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ServiceClassificationContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceClassificationContent.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceClassificationContent.cs new file mode 100644 index 000000000000..21c0abdecb51 --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceClassificationContent.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.Support.Models +{ + /// Input to problem classification Classification API. + public partial class ServiceClassificationContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + public ServiceClassificationContent() + { + } + + /// Initializes a new instance of . + /// Natural language description of the customer’s issue. + /// ARM resource Id of the resource that is having the issue. + /// Additional information in the form of a string. + /// Keeps track of any properties unknown to the library. + internal ServiceClassificationContent(string issueSummary, ResourceIdentifier resourceId, string additionalContext, IDictionary serializedAdditionalRawData) + { + IssueSummary = issueSummary; + ResourceId = resourceId; + AdditionalContext = additionalContext; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Natural language description of the customer’s issue. + public string IssueSummary { get; set; } + /// ARM resource Id of the resource that is having the issue. + public ResourceIdentifier ResourceId { get; set; } + /// Additional information in the form of a string. + public string AdditionalContext { get; set; } + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceClassificationOutput.Serialization.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceClassificationOutput.Serialization.cs new file mode 100644 index 000000000000..88000eb9cd32 --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceClassificationOutput.Serialization.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Support.Models +{ + public partial class ServiceClassificationOutput : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ServiceClassificationOutput)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(ServiceClassificationResults)) + { + writer.WritePropertyName("serviceClassificationResults"u8); + writer.WriteStartArray(); + foreach (var item in ServiceClassificationResults) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ServiceClassificationOutput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ServiceClassificationOutput)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeServiceClassificationOutput(document.RootElement, options); + } + + internal static ServiceClassificationOutput DeserializeServiceClassificationOutput(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList serviceClassificationResults = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("serviceClassificationResults"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ServiceClassificationAnswer.DeserializeServiceClassificationAnswer(item, options)); + } + serviceClassificationResults = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ServiceClassificationOutput(serviceClassificationResults ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ServiceClassificationOutput)} does not support writing '{options.Format}' format."); + } + } + + ServiceClassificationOutput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeServiceClassificationOutput(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ServiceClassificationOutput)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceClassificationOutput.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceClassificationOutput.cs new file mode 100644 index 000000000000..a9d28c2dc711 --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceClassificationOutput.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Support.Models +{ + /// Output of the service classification API. + public partial class ServiceClassificationOutput + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ServiceClassificationOutput() + { + ServiceClassificationResults = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Set of problem classification objects classified. + /// Keeps track of any properties unknown to the library. + internal ServiceClassificationOutput(IReadOnlyList serviceClassificationResults, IDictionary serializedAdditionalRawData) + { + ServiceClassificationResults = serviceClassificationResults; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Set of problem classification objects classified. + public IReadOnlyList ServiceClassificationResults { get; } + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceProblemClassificationContent.Serialization.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceProblemClassificationContent.Serialization.cs new file mode 100644 index 000000000000..b08d31928f09 --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceProblemClassificationContent.Serialization.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Support.Models +{ + public partial class ServiceProblemClassificationContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ServiceProblemClassificationContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("issueSummary"u8); + writer.WriteStringValue(IssueSummary); + if (Optional.IsDefined(ResourceId)) + { + writer.WritePropertyName("resourceId"u8); + writer.WriteStringValue(ResourceId); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ServiceProblemClassificationContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ServiceProblemClassificationContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeServiceProblemClassificationContent(document.RootElement, options); + } + + internal static ServiceProblemClassificationContent DeserializeServiceProblemClassificationContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string issueSummary = default; + ResourceIdentifier resourceId = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("issueSummary"u8)) + { + issueSummary = property.Value.GetString(); + continue; + } + if (property.NameEquals("resourceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + resourceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ServiceProblemClassificationContent(issueSummary, resourceId, serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ServiceProblemClassificationContent)} does not support writing '{options.Format}' format."); + } + } + + ServiceProblemClassificationContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeServiceProblemClassificationContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ServiceProblemClassificationContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceProblemClassificationContent.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceProblemClassificationContent.cs new file mode 100644 index 000000000000..a04052bb8f76 --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceProblemClassificationContent.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.Support.Models +{ + /// Input to problem classification Classification API. + public partial class ServiceProblemClassificationContent + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + /// Natural language description of the customer’s issue. + /// is null. + public ServiceProblemClassificationContent(string issueSummary) + { + Argument.AssertNotNull(issueSummary, nameof(issueSummary)); + + IssueSummary = issueSummary; + } + + /// Initializes a new instance of . + /// Natural language description of the customer’s issue. + /// ARM resource Id of the resource that is having the issue. + /// Keeps track of any properties unknown to the library. + internal ServiceProblemClassificationContent(string issueSummary, ResourceIdentifier resourceId, IDictionary serializedAdditionalRawData) + { + IssueSummary = issueSummary; + ResourceId = resourceId; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Initializes a new instance of for deserialization. + internal ServiceProblemClassificationContent() + { + } + + /// Natural language description of the customer’s issue. + public string IssueSummary { get; } + /// ARM resource Id of the resource that is having the issue. + public ResourceIdentifier ResourceId { get; set; } + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceProblemClassificationListResult.Serialization.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceProblemClassificationListResult.Serialization.cs new file mode 100644 index 000000000000..cc21a63c5946 --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceProblemClassificationListResult.Serialization.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Support.Models +{ + public partial class ServiceProblemClassificationListResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ServiceProblemClassificationListResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (Optional.IsCollectionDefined(ProblemClassificationResults)) + { + writer.WritePropertyName("problemClassificationResults"u8); + writer.WriteStartArray(); + foreach (var item in ProblemClassificationResults) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ServiceProblemClassificationListResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ServiceProblemClassificationListResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeServiceProblemClassificationListResult(document.RootElement, options); + } + + internal static ServiceProblemClassificationListResult DeserializeServiceProblemClassificationListResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IReadOnlyList problemClassificationResults = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("problemClassificationResults"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(ServiceProblemClassificationResult.DeserializeServiceProblemClassificationResult(item, options)); + } + problemClassificationResults = array; + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ServiceProblemClassificationListResult(problemClassificationResults ?? new ChangeTrackingList(), serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ServiceProblemClassificationListResult)} does not support writing '{options.Format}' format."); + } + } + + ServiceProblemClassificationListResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeServiceProblemClassificationListResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ServiceProblemClassificationListResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceProblemClassificationListResult.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceProblemClassificationListResult.cs new file mode 100644 index 000000000000..07d4f1089685 --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceProblemClassificationListResult.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.ResourceManager.Support.Models +{ + /// Output of the problem classification Classification API. + public partial class ServiceProblemClassificationListResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ServiceProblemClassificationListResult() + { + ProblemClassificationResults = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Set of problem classification objects classified. + /// Keeps track of any properties unknown to the library. + internal ServiceProblemClassificationListResult(IReadOnlyList problemClassificationResults, IDictionary serializedAdditionalRawData) + { + ProblemClassificationResults = problemClassificationResults; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Set of problem classification objects classified. + public IReadOnlyList ProblemClassificationResults { get; } + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceProblemClassificationResult.Serialization.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceProblemClassificationResult.Serialization.cs new file mode 100644 index 000000000000..085493c4cfe1 --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceProblemClassificationResult.Serialization.cs @@ -0,0 +1,245 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.ResourceManager.Support.Models +{ + public partial class ServiceProblemClassificationResult : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ServiceProblemClassificationResult)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(ProblemId)) + { + writer.WritePropertyName("problemId"u8); + writer.WriteStringValue(ProblemId); + } + if (options.Format != "W" && Optional.IsDefined(Title)) + { + writer.WritePropertyName("title"u8); + writer.WriteStringValue(Title); + } + if (options.Format != "W" && Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (options.Format != "W" && Optional.IsDefined(ServiceId)) + { + writer.WritePropertyName("serviceId"u8); + writer.WriteStringValue(ServiceId); + } + if (options.Format != "W" && Optional.IsDefined(ProblemClassificationId)) + { + writer.WritePropertyName("problemClassificationId"u8); + writer.WriteStringValue(ProblemClassificationId); + } + writer.WritePropertyName("relatedService"u8); + writer.WriteStartObject(); + if (options.Format != "W" && Optional.IsDefined(RelatedServiceId)) + { + writer.WritePropertyName("serviceId"u8); + writer.WriteStringValue(RelatedServiceId); + } + if (options.Format != "W" && Optional.IsDefined(DisplayName)) + { + writer.WritePropertyName("displayName"u8); + writer.WriteStringValue(DisplayName); + } + if (Optional.IsCollectionDefined(ResourceTypes)) + { + writer.WritePropertyName("resourceTypes"u8); + writer.WriteStartArray(); + foreach (var item in ResourceTypes) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + } + writer.WriteEndObject(); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ServiceProblemClassificationResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ServiceProblemClassificationResult)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeServiceProblemClassificationResult(document.RootElement, options); + } + + internal static ServiceProblemClassificationResult DeserializeServiceProblemClassificationResult(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string problemId = default; + string title = default; + string description = default; + ResourceIdentifier serviceId = default; + string problemClassificationId = default; + ResourceIdentifier serviceId0 = default; + string displayName = default; + IReadOnlyList resourceTypes = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("problemId"u8)) + { + problemId = property.Value.GetString(); + continue; + } + if (property.NameEquals("title"u8)) + { + title = property.Value.GetString(); + continue; + } + if (property.NameEquals("description"u8)) + { + description = property.Value.GetString(); + continue; + } + if (property.NameEquals("serviceId"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null || property.Value.ValueKind == JsonValueKind.String && property.Value.GetString().Length == 0) + { + continue; + } + serviceId = new ResourceIdentifier(property.Value.GetString()); + continue; + } + if (property.NameEquals("problemClassificationId"u8)) + { + problemClassificationId = property.Value.GetString(); + continue; + } + if (property.NameEquals("relatedService"u8)) + { + if (property.Value.ValueKind == JsonValueKind.Null) + { + property.ThrowNonNullablePropertyIsNull(); + continue; + } + foreach (var property0 in property.Value.EnumerateObject()) + { + if (property0.NameEquals("serviceId"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null || property0.Value.ValueKind == JsonValueKind.String && property0.Value.GetString().Length == 0) + { + continue; + } + serviceId0 = new ResourceIdentifier(property0.Value.GetString()); + continue; + } + if (property0.NameEquals("displayName"u8)) + { + displayName = property0.Value.GetString(); + continue; + } + if (property0.NameEquals("resourceTypes"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in property0.Value.EnumerateArray()) + { + array.Add(new ResourceType(item.GetString())); + } + resourceTypes = array; + continue; + } + } + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ServiceProblemClassificationResult( + problemId, + title, + description, + serviceId, + problemClassificationId, + serviceId0, + displayName, + resourceTypes ?? new ChangeTrackingList(), + serializedAdditionalRawData); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ServiceProblemClassificationResult)} does not support writing '{options.Format}' format."); + } + } + + ServiceProblemClassificationResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeServiceProblemClassificationResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ServiceProblemClassificationResult)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceProblemClassificationResult.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceProblemClassificationResult.cs new file mode 100644 index 000000000000..b7a14c2a9d82 --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/ServiceProblemClassificationResult.cs @@ -0,0 +1,95 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.Core; + +namespace Azure.ResourceManager.Support.Models +{ + /// ProblemClassification Classification result object. + public partial class ServiceProblemClassificationResult + { + /// + /// Keeps track of any properties unknown to the library. + /// + /// To assign an object to the value of this property use . + /// + /// + /// To assign an already formatted json string to this property use . + /// + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\"") + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }) + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}") + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + private IDictionary _serializedAdditionalRawData; + + /// Initializes a new instance of . + internal ServiceProblemClassificationResult() + { + ResourceTypes = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// Identifier that may be used for solution discovery or some other purposes. + /// Title of the problem classification result. + /// Description of the problem classification result. + /// Identifier of the service associated with this problem classification result. + /// Identifier that may be used for support ticket creation. + /// Azure resource Id of the service. + /// Localized name of the azure service. + /// List of applicable ARM resource types for this service. + /// Keeps track of any properties unknown to the library. + internal ServiceProblemClassificationResult(string problemId, string title, string description, ResourceIdentifier serviceId, string problemClassificationId, ResourceIdentifier relatedServiceId, string displayName, IReadOnlyList resourceTypes, IDictionary serializedAdditionalRawData) + { + ProblemId = problemId; + Title = title; + Description = description; + ServiceId = serviceId; + ProblemClassificationId = problemClassificationId; + RelatedServiceId = relatedServiceId; + DisplayName = displayName; + ResourceTypes = resourceTypes; + _serializedAdditionalRawData = serializedAdditionalRawData; + } + + /// Identifier that may be used for solution discovery or some other purposes. + public string ProblemId { get; } + /// Title of the problem classification result. + public string Title { get; } + /// Description of the problem classification result. + public string Description { get; } + /// Identifier of the service associated with this problem classification result. + public ResourceIdentifier ServiceId { get; } + /// Identifier that may be used for support ticket creation. + public string ProblemClassificationId { get; } + /// Azure resource Id of the service. + public ResourceIdentifier RelatedServiceId { get; } + /// Localized name of the azure service. + public string DisplayName { get; } + /// List of applicable ARM resource types for this service. + public IReadOnlyList ResourceTypes { get; } + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/SupportResourceTypeName.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/SupportResourceTypeName.cs new file mode 100644 index 000000000000..9e0697ff6321 --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/SupportResourceTypeName.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.ResourceManager.Support.Models +{ + /// The type of resource. + public readonly partial struct SupportResourceTypeName : IEquatable + { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public SupportResourceTypeName(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string MicrosoftSupportSupportTicketsValue = "Microsoft.Support/supportTickets"; + + /// Microsoft.Support/supportTickets. + public static SupportResourceTypeName MicrosoftSupportSupportTickets { get; } = new SupportResourceTypeName(MicrosoftSupportSupportTicketsValue); + /// Determines if two values are the same. + public static bool operator ==(SupportResourceTypeName left, SupportResourceTypeName right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(SupportResourceTypeName left, SupportResourceTypeName right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator SupportResourceTypeName(string value) => new SupportResourceTypeName(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SupportResourceTypeName other && Equals(other); + /// + public bool Equals(SupportResourceTypeName other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/UpdateSupportTicket.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/UpdateSupportTicket.cs index 360a8e225223..dfc25c290b6a 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/UpdateSupportTicket.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/Models/UpdateSupportTicket.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Support.Models { - /// Updates severity, ticket status, contact details, advanced diagnostic consent and secondary consent in the support ticket. + /// Updates severity, ticket status, and contact details in the support ticket. public partial class UpdateSupportTicket { /// diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/ProblemClassificationCollection.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/ProblemClassificationCollection.cs index 5e678671d6dc..ec94ae3002c2 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/ProblemClassificationCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/ProblemClassificationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsync(stri /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string problemClassif /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -183,7 +183,7 @@ public virtual AsyncPageable GetAllAsync(Cancella /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -212,7 +212,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -255,7 +255,7 @@ public virtual async Task> ExistsAsync(string problemClassificati /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -298,7 +298,7 @@ public virtual Response Exists(string problemClassificationName, Cancellat /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -343,7 +343,7 @@ public virtual async Task> GetIf /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/ProblemClassificationData.Serialization.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/ProblemClassificationData.Serialization.cs index 2fcbfe373e9f..6381a63155f9 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/ProblemClassificationData.Serialization.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/ProblemClassificationData.Serialization.cs @@ -65,6 +65,22 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelRea } writer.WriteEndArray(); } + if (options.Format != "W" && Optional.IsCollectionDefined(Metadata)) + { + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (Optional.IsDefined(ParentProblemClassification)) + { + writer.WritePropertyName("parentProblemClassification"u8); + writer.WriteObjectValue(ParentProblemClassification, options); + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -110,6 +126,8 @@ internal static ProblemClassificationData DeserializeProblemClassificationData(J SystemData systemData = default; string displayName = default; IReadOnlyList secondaryConsentEnabled = default; + IReadOnlyDictionary metadata = default; + ProblemClassificationData parentProblemClassification = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -166,6 +184,29 @@ internal static ProblemClassificationData DeserializeProblemClassificationData(J secondaryConsentEnabled = array; continue; } + if (property0.NameEquals("metadata"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + dictionary.Add(property1.Name, property1.Value.GetString()); + } + metadata = dictionary; + continue; + } + if (property0.NameEquals("parentProblemClassification"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + parentProblemClassification = DeserializeProblemClassificationData(property0.Value, options); + continue; + } } continue; } @@ -182,6 +223,8 @@ internal static ProblemClassificationData DeserializeProblemClassificationData(J systemData, displayName, secondaryConsentEnabled ?? new ChangeTrackingList(), + metadata ?? new ChangeTrackingDictionary(), + parentProblemClassification, serializedAdditionalRawData); } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/ProblemClassificationData.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/ProblemClassificationData.cs index 426da075e1e3..acaf6a8a5994 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/ProblemClassificationData.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/ProblemClassificationData.cs @@ -55,6 +55,7 @@ public partial class ProblemClassificationData : ResourceData internal ProblemClassificationData() { SecondaryConsentEnabled = new ChangeTrackingList(); + Metadata = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -64,11 +65,15 @@ internal ProblemClassificationData() /// The systemData. /// Localized name of problem classification. /// This property indicates whether secondary consent is present for problem classification. + /// String-to-string dictionary for additional metadata. + /// Reference to the parent problem classification which has same structure as problem classification. /// Keeps track of any properties unknown to the library. - internal ProblemClassificationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string displayName, IReadOnlyList secondaryConsentEnabled, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal ProblemClassificationData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string displayName, IReadOnlyList secondaryConsentEnabled, IReadOnlyDictionary metadata, ProblemClassificationData parentProblemClassification, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { DisplayName = displayName; SecondaryConsentEnabled = secondaryConsentEnabled; + Metadata = metadata; + ParentProblemClassification = parentProblemClassification; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -76,5 +81,9 @@ internal ProblemClassificationData(ResourceIdentifier id, string name, ResourceT public string DisplayName { get; } /// This property indicates whether secondary consent is present for problem classification. public IReadOnlyList SecondaryConsentEnabled { get; } + /// String-to-string dictionary for additional metadata. + public IReadOnlyDictionary Metadata { get; } + /// Reference to the parent problem classification which has same structure as problem classification. + public ProblemClassificationData ParentProblemClassification { get; } } } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/ProblemClassificationResource.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/ProblemClassificationResource.cs index c77d5efa7c7d..216d92b0e363 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/ProblemClassificationResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/ProblemClassificationResource.cs @@ -99,7 +99,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> GetAsync(Canc /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ChatTranscriptsNoSubscriptionRestOperations.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ChatTranscriptsNoSubscriptionRestOperations.cs index d8950b09d4e2..ee8166287c96 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ChatTranscriptsNoSubscriptionRestOperations.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ChatTranscriptsNoSubscriptionRestOperations.cs @@ -32,7 +32,7 @@ public ChatTranscriptsNoSubscriptionRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-04-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ChatTranscriptsRestOperations.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ChatTranscriptsRestOperations.cs index b4e7d56e80df..04012fd1de2c 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ChatTranscriptsRestOperations.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ChatTranscriptsRestOperations.cs @@ -32,7 +32,7 @@ public ChatTranscriptsRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-04-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/CommunicationsNoSubscriptionRestOperations.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/CommunicationsNoSubscriptionRestOperations.cs index ea9bfce5d969..059a2b461fc1 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/CommunicationsNoSubscriptionRestOperations.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/CommunicationsNoSubscriptionRestOperations.cs @@ -32,7 +32,7 @@ public CommunicationsNoSubscriptionRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-04-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/CommunicationsRestOperations.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/CommunicationsRestOperations.cs index 503b8189093f..b3f0eaee5a2f 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/CommunicationsRestOperations.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/CommunicationsRestOperations.cs @@ -32,7 +32,7 @@ public CommunicationsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-04-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/FileWorkspacesNoSubscriptionRestOperations.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/FileWorkspacesNoSubscriptionRestOperations.cs index 326e598975cd..5fb1ce136aa6 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/FileWorkspacesNoSubscriptionRestOperations.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/FileWorkspacesNoSubscriptionRestOperations.cs @@ -31,7 +31,7 @@ public FileWorkspacesNoSubscriptionRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-04-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/FileWorkspacesRestOperations.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/FileWorkspacesRestOperations.cs index d7347a9c621a..a0dff1fa4f73 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/FileWorkspacesRestOperations.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/FileWorkspacesRestOperations.cs @@ -31,7 +31,7 @@ public FileWorkspacesRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-04-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/FilesNoSubscriptionRestOperations.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/FilesNoSubscriptionRestOperations.cs index b4c6c6b7554d..3a39edd70b23 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/FilesNoSubscriptionRestOperations.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/FilesNoSubscriptionRestOperations.cs @@ -32,7 +32,7 @@ public FilesNoSubscriptionRestOperations(HttpPipeline pipeline, string applicati { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-04-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/FilesRestOperations.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/FilesRestOperations.cs index b2e61e17b04f..f50600e95ed9 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/FilesRestOperations.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/FilesRestOperations.cs @@ -32,7 +32,7 @@ public FilesRestOperations(HttpPipeline pipeline, string applicationId, Uri endp { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-04-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/LookUpResourceIdRestOperations.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/LookUpResourceIdRestOperations.cs new file mode 100644 index 000000000000..6310d5cddf04 --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/LookUpResourceIdRestOperations.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Support.Models; + +namespace Azure.ResourceManager.Support +{ + internal partial class LookUpResourceIdRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of LookUpResourceIdRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public LookUpResourceIdRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-06-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreatePostRequestUri(LookUpResourceIdContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/providers/Microsoft.Support/lookUpResourceId", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreatePostRequest(LookUpResourceIdContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/providers/Microsoft.Support/lookUpResourceId", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// This operation fetches ARM resource id of support resource type. + /// Look up resource id request body. + /// The cancellation token to use. + /// is null. + public async Task> PostAsync(LookUpResourceIdContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreatePostRequest(content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + LookUpResourceIdResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = LookUpResourceIdResult.DeserializeLookUpResourceIdResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// This operation fetches ARM resource id of support resource type. + /// Look up resource id request body. + /// The cancellation token to use. + /// is null. + public Response Post(LookUpResourceIdContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreatePostRequest(content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + LookUpResourceIdResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = LookUpResourceIdResult.DeserializeLookUpResourceIdResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ProblemClassificationsNoSubscriptionRestOperations.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ProblemClassificationsNoSubscriptionRestOperations.cs new file mode 100644 index 000000000000..1f0ab09c6475 --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ProblemClassificationsNoSubscriptionRestOperations.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Support.Models; + +namespace Azure.ResourceManager.Support +{ + internal partial class ProblemClassificationsNoSubscriptionRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ProblemClassificationsNoSubscriptionRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ProblemClassificationsNoSubscriptionRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-06-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateClassifyProblemsRequestUri(string problemServiceName, ServiceProblemClassificationContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/providers/Microsoft.Support/services/", false); + uri.AppendPath(problemServiceName, true); + uri.AppendPath("/classifyProblems", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateClassifyProblemsRequest(string problemServiceName, ServiceProblemClassificationContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/providers/Microsoft.Support/services/", false); + uri.AppendPath(problemServiceName, true); + uri.AppendPath("/classifyProblems", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Classify the right problem classifications (categories) available for a specific Azure service. + /// Name of the Azure service for which the problem classifications need to be retrieved. + /// Input to check. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ClassifyProblemsAsync(string problemServiceName, ServiceProblemClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(problemServiceName, nameof(problemServiceName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateClassifyProblemsRequest(problemServiceName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ServiceProblemClassificationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ServiceProblemClassificationListResult.DeserializeServiceProblemClassificationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Classify the right problem classifications (categories) available for a specific Azure service. + /// Name of the Azure service for which the problem classifications need to be retrieved. + /// Input to check. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ClassifyProblems(string problemServiceName, ServiceProblemClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(problemServiceName, nameof(problemServiceName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateClassifyProblemsRequest(problemServiceName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ServiceProblemClassificationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ServiceProblemClassificationListResult.DeserializeServiceProblemClassificationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ProblemClassificationsRestOperations.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ProblemClassificationsRestOperations.cs index 33264031be06..0c13b4c4bc0c 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ProblemClassificationsRestOperations.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ProblemClassificationsRestOperations.cs @@ -32,10 +32,104 @@ public ProblemClassificationsRestOperations(HttpPipeline pipeline, string applic { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-04-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } + internal RequestUriBuilder CreateClassifyProblemsRequestUri(string subscriptionId, string problemServiceName, ServiceProblemClassificationContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Support/services/", false); + uri.AppendPath(problemServiceName, true); + uri.AppendPath("/classifyProblems", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateClassifyProblemsRequest(string subscriptionId, string problemServiceName, ServiceProblemClassificationContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Support/services/", false); + uri.AppendPath(problemServiceName, true); + uri.AppendPath("/classifyProblems", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Classify the right problem classifications (categories) available for a specific Azure service. + /// The ID of the target subscription. The value must be an UUID. + /// Name of the Azure service for which the problem classifications need to be retrieved. + /// Input to check. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public async Task> ClassifyProblemsAsync(string subscriptionId, string problemServiceName, ServiceProblemClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(problemServiceName, nameof(problemServiceName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateClassifyProblemsRequest(subscriptionId, problemServiceName, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ServiceProblemClassificationListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ServiceProblemClassificationListResult.DeserializeServiceProblemClassificationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Classify the right problem classifications (categories) available for a specific Azure service. + /// The ID of the target subscription. The value must be an UUID. + /// Name of the Azure service for which the problem classifications need to be retrieved. + /// Input to check. + /// The cancellation token to use. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + public Response ClassifyProblems(string subscriptionId, string problemServiceName, ServiceProblemClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(problemServiceName, nameof(problemServiceName)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateClassifyProblemsRequest(subscriptionId, problemServiceName, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ServiceProblemClassificationListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ServiceProblemClassificationListResult.DeserializeServiceProblemClassificationListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + internal RequestUriBuilder CreateListRequestUri(string serviceName) { var uri = new RawRequestUriBuilder(); @@ -145,7 +239,7 @@ internal HttpMessage CreateGetRequest(string serviceName, string problemClassifi } /// Get problem classification details for a specific Azure service. - /// Name of the Azure service available for support. + /// Name of the Azure service for which the problem classifications need to be retrieved. /// Name of problem classification. /// The cancellation token to use. /// or is null. @@ -174,7 +268,7 @@ public async Task> GetAsync(string serviceNa } /// Get problem classification details for a specific Azure service. - /// Name of the Azure service available for support. + /// Name of the Azure service for which the problem classifications need to be retrieved. /// Name of problem classification. /// The cancellation token to use. /// or is null. diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ServiceClassificationsNoSubscriptionRestOperations.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ServiceClassificationsNoSubscriptionRestOperations.cs new file mode 100644 index 000000000000..58314d42e4e3 --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ServiceClassificationsNoSubscriptionRestOperations.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Support.Models; + +namespace Azure.ResourceManager.Support +{ + internal partial class ServiceClassificationsNoSubscriptionRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ServiceClassificationsNoSubscriptionRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ServiceClassificationsNoSubscriptionRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-06-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateClassifyServicesRequestUri(ServiceClassificationContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/providers/Microsoft.Support/classifyServices", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateClassifyServicesRequest(ServiceClassificationContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/providers/Microsoft.Support/classifyServices", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Classify the list of right Azure services. + /// Input to check. + /// The cancellation token to use. + /// is null. + public async Task> ClassifyServicesAsync(ServiceClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateClassifyServicesRequest(content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ServiceClassificationOutput value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ServiceClassificationOutput.DeserializeServiceClassificationOutput(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Classify the list of right Azure services. + /// Input to check. + /// The cancellation token to use. + /// is null. + public Response ClassifyServices(ServiceClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateClassifyServicesRequest(content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ServiceClassificationOutput value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ServiceClassificationOutput.DeserializeServiceClassificationOutput(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ServiceClassificationsRestOperations.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ServiceClassificationsRestOperations.cs new file mode 100644 index 000000000000..9b7035ae6f7a --- /dev/null +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ServiceClassificationsRestOperations.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager.Support.Models; + +namespace Azure.ResourceManager.Support +{ + internal partial class ServiceClassificationsRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of ServiceClassificationsRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public ServiceClassificationsRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2023-06-01-preview"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal RequestUriBuilder CreateClassifyServicesRequestUri(string subscriptionId, ServiceClassificationContent content) + { + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Support/classifyServices", false); + uri.AppendQuery("api-version", _apiVersion, true); + return uri; + } + + internal HttpMessage CreateClassifyServicesRequest(string subscriptionId, ServiceClassificationContent content) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Post; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/providers/Microsoft.Support/classifyServices", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content0 = new Utf8JsonRequestContent(); + content0.JsonWriter.WriteObjectValue(content, ModelSerializationExtensions.WireOptions); + request.Content = content0; + _userAgent.Apply(message); + return message; + } + + /// Classify the list of right Azure services. + /// The ID of the target subscription. The value must be an UUID. + /// Input to check. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public async Task> ClassifyServicesAsync(string subscriptionId, ServiceClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateClassifyServicesRequest(subscriptionId, content); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ServiceClassificationOutput value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ServiceClassificationOutput.DeserializeServiceClassificationOutput(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Classify the list of right Azure services. + /// The ID of the target subscription. The value must be an UUID. + /// Input to check. + /// The cancellation token to use. + /// or is null. + /// is an empty string, and was expected to be non-empty. + public Response ClassifyServices(string subscriptionId, ServiceClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNull(content, nameof(content)); + + using var message = CreateClassifyServicesRequest(subscriptionId, content); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ServiceClassificationOutput value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ServiceClassificationOutput.DeserializeServiceClassificationOutput(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ServicesRestOperations.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ServicesRestOperations.cs index f2ac51f7b6c2..5fd6a86c31c5 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ServicesRestOperations.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/ServicesRestOperations.cs @@ -32,7 +32,7 @@ public ServicesRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-04-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -127,7 +127,7 @@ internal HttpMessage CreateGetRequest(string serviceName) } /// Gets a specific Azure service for support ticket creation. - /// Name of the Azure service. + /// Name of the Azure service for which the problem classifications need to be retrieved. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. @@ -154,7 +154,7 @@ public async Task> GetAsync(string serviceName } /// Gets a specific Azure service for support ticket creation. - /// Name of the Azure service. + /// Name of the Azure service for which the problem classifications need to be retrieved. /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/SupportTicketsNoSubscriptionRestOperations.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/SupportTicketsNoSubscriptionRestOperations.cs index 422895f3b559..5a1aa98e4910 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/SupportTicketsNoSubscriptionRestOperations.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/SupportTicketsNoSubscriptionRestOperations.cs @@ -32,7 +32,7 @@ public SupportTicketsNoSubscriptionRestOperations(HttpPipeline pipeline, string { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-04-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/SupportTicketsRestOperations.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/SupportTicketsRestOperations.cs index 2859611f8e8b..6d9ef4ca2378 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/SupportTicketsRestOperations.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/RestOperations/SupportTicketsRestOperations.cs @@ -32,7 +32,7 @@ public SupportTicketsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2024-04-01"; + _apiVersion = apiVersion ?? "2023-06-01-preview"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SubscriptionFileWorkspaceCollection.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SubscriptionFileWorkspaceCollection.cs index 31b0cd2b481c..64022de9e61a 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SubscriptionFileWorkspaceCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SubscriptionFileWorkspaceCollection.cs @@ -62,7 +62,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -111,7 +111,7 @@ public virtual async Task> Creat /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -160,7 +160,7 @@ public virtual ArmOperation CreateOrUpdate(Wa /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -205,7 +205,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -250,7 +250,7 @@ public virtual Response Get(string fileWorksp /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -293,7 +293,7 @@ public virtual async Task> ExistsAsync(string fileWorkspaceName, /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -336,7 +336,7 @@ public virtual Response Exists(string fileWorkspaceName, CancellationToken /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -381,7 +381,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SubscriptionFileWorkspaceResource.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SubscriptionFileWorkspaceResource.cs index a5d4c5dd5b7a..e93f071e89e1 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SubscriptionFileWorkspaceResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SubscriptionFileWorkspaceResource.cs @@ -107,7 +107,7 @@ public virtual SupportTicketFileCollection GetSupportTicketFiles() /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -138,7 +138,7 @@ public virtual async Task> GetSupportTicketF /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -169,7 +169,7 @@ public virtual Response GetSupportTicketFile(string f /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -209,7 +209,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -249,7 +249,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -293,7 +293,7 @@ public virtual async Task> Updat /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SubscriptionSupportTicketCollection.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SubscriptionSupportTicketCollection.cs index 0273ae0f655f..d4b7bdc35318 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SubscriptionSupportTicketCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SubscriptionSupportTicketCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> Creat /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(Wa /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string supportTic /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(int? /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Pageable GetAll(int? top = nul /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> ExistsAsync(string supportTicketName, /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string supportTicketName, CancellationToken /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -448,7 +448,7 @@ public virtual async Task> G /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SubscriptionSupportTicketResource.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SubscriptionSupportTicketResource.cs index c899d282e939..b551e8ca3f48 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SubscriptionSupportTicketResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SubscriptionSupportTicketResource.cs @@ -113,7 +113,7 @@ public virtual SupportTicketCommunicationCollection GetSupportTicketCommunicatio /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -144,7 +144,7 @@ public virtual async Task> GetSuppo /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -182,7 +182,7 @@ public virtual SupportTicketChatTranscriptCollection GetSupportTicketChatTranscr /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -213,7 +213,7 @@ public virtual async Task> GetSupp /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -244,7 +244,7 @@ public virtual Response GetSupportTicketCha /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -284,7 +284,7 @@ public virtual async Task> GetAsync( /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -324,7 +324,7 @@ public virtual Response Get(CancellationToken /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -366,7 +366,7 @@ public virtual async Task> UpdateAsy /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -408,7 +408,7 @@ public virtual Response Update(UpdateSupportT /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -450,7 +450,7 @@ public virtual async Task> CheckCommunic /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportAzureServiceCollection.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportAzureServiceCollection.cs index 9c1bccf98e1f..5ea3c7c42534 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportAzureServiceCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportAzureServiceCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -73,7 +73,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// - /// Name of the Azure service. + /// Name of the Azure service for which the problem classifications need to be retrieved. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -110,7 +110,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -118,7 +118,7 @@ public virtual async Task> GetAsync(string /// /// /// - /// Name of the Azure service. + /// Name of the Azure service for which the problem classifications need to be retrieved. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -155,7 +155,7 @@ public virtual Response Get(string serviceName, Can /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Cancellati /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -213,7 +213,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -221,7 +221,7 @@ public virtual Pageable GetAll(CancellationToken ca /// /// /// - /// Name of the Azure service. + /// Name of the Azure service for which the problem classifications need to be retrieved. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -256,7 +256,7 @@ public virtual async Task> ExistsAsync(string serviceName, Cancel /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -264,7 +264,7 @@ public virtual async Task> ExistsAsync(string serviceName, Cancel /// /// /// - /// Name of the Azure service. + /// Name of the Azure service for which the problem classifications need to be retrieved. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -299,7 +299,7 @@ public virtual Response Exists(string serviceName, CancellationToken cance /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -307,7 +307,7 @@ public virtual Response Exists(string serviceName, CancellationToken cance /// /// /// - /// Name of the Azure service. + /// Name of the Azure service for which the problem classifications need to be retrieved. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. @@ -344,7 +344,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -352,7 +352,7 @@ public virtual async Task> GetIfEx /// /// /// - /// Name of the Azure service. + /// Name of the Azure service for which the problem classifications need to be retrieved. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. /// is null. diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportAzureServiceData.Serialization.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportAzureServiceData.Serialization.cs index 42cda57b2d20..3498a5ff8379 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportAzureServiceData.Serialization.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportAzureServiceData.Serialization.cs @@ -64,6 +64,17 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReade } writer.WriteEndArray(); } + if (options.Format != "W" && Optional.IsCollectionDefined(Metadata)) + { + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) + { + writer.WritePropertyName(item.Key); + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } writer.WriteEndObject(); if (options.Format != "W" && _serializedAdditionalRawData != null) { @@ -109,6 +120,7 @@ internal static SupportAzureServiceData DeserializeSupportAzureServiceData(JsonE SystemData systemData = default; string displayName = default; IReadOnlyList resourceTypes = default; + IReadOnlyDictionary metadata = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -165,6 +177,20 @@ internal static SupportAzureServiceData DeserializeSupportAzureServiceData(JsonE resourceTypes = array; continue; } + if (property0.NameEquals("metadata"u8)) + { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var property1 in property0.Value.EnumerateObject()) + { + dictionary.Add(property1.Name, property1.Value.GetString()); + } + metadata = dictionary; + continue; + } } continue; } @@ -181,6 +207,7 @@ internal static SupportAzureServiceData DeserializeSupportAzureServiceData(JsonE systemData, displayName, resourceTypes ?? new ChangeTrackingList(), + metadata ?? new ChangeTrackingDictionary(), serializedAdditionalRawData); } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportAzureServiceData.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportAzureServiceData.cs index 6fc3f05cc6e9..c0261220b2a8 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportAzureServiceData.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportAzureServiceData.cs @@ -54,6 +54,7 @@ public partial class SupportAzureServiceData : ResourceData internal SupportAzureServiceData() { ResourceTypes = new ChangeTrackingList(); + Metadata = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -63,11 +64,13 @@ internal SupportAzureServiceData() /// The systemData. /// Localized name of the Azure service. /// ARM Resource types. + /// Metadata about the service, only visible for 1P clients. /// Keeps track of any properties unknown to the library. - internal SupportAzureServiceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string displayName, IReadOnlyList resourceTypes, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal SupportAzureServiceData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string displayName, IReadOnlyList resourceTypes, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { DisplayName = displayName; ResourceTypes = resourceTypes; + Metadata = metadata; _serializedAdditionalRawData = serializedAdditionalRawData; } @@ -75,5 +78,7 @@ internal SupportAzureServiceData(ResourceIdentifier id, string name, ResourceTyp public string DisplayName { get; } /// ARM Resource types. public IReadOnlyList ResourceTypes { get; } + /// Metadata about the service, only visible for 1P clients. + public IReadOnlyDictionary Metadata { get; } } } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportAzureServiceResource.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportAzureServiceResource.cs index e40a05014b6b..c192022c0c01 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportAzureServiceResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportAzureServiceResource.cs @@ -12,6 +12,7 @@ using Azure.Core; using Azure.Core.Pipeline; using Azure.ResourceManager.Resources; +using Azure.ResourceManager.Support.Models; namespace Azure.ResourceManager.Support { @@ -33,6 +34,8 @@ public static ResourceIdentifier CreateResourceIdentifier(string serviceName) private readonly ClientDiagnostics _supportAzureServiceServicesClientDiagnostics; private readonly ServicesRestOperations _supportAzureServiceServicesRestClient; + private readonly ClientDiagnostics _problemClassificationsNoSubscriptionClientDiagnostics; + private readonly ProblemClassificationsNoSubscriptionRestOperations _problemClassificationsNoSubscriptionRestClient; private readonly SupportAzureServiceData _data; /// Gets the resource type for the operations. @@ -60,6 +63,8 @@ internal SupportAzureServiceResource(ArmClient client, ResourceIdentifier id) : _supportAzureServiceServicesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Support", ResourceType.Namespace, Diagnostics); TryGetApiVersion(ResourceType, out string supportAzureServiceServicesApiVersion); _supportAzureServiceServicesRestClient = new ServicesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, supportAzureServiceServicesApiVersion); + _problemClassificationsNoSubscriptionClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Support", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _problemClassificationsNoSubscriptionRestClient = new ProblemClassificationsNoSubscriptionRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); #if DEBUG ValidateResourceId(Id); #endif @@ -106,7 +111,7 @@ public virtual ProblemClassificationCollection GetProblemClassifications() /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -137,7 +142,7 @@ public virtual async Task> GetProblemCla /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -168,7 +173,7 @@ public virtual Response GetProblemClassification( /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -208,7 +213,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -234,5 +239,81 @@ public virtual Response Get(CancellationToken cance throw; } } + + /// + /// Classify the right problem classifications (categories) available for a specific Azure service. + /// + /// + /// Request Path + /// /providers/Microsoft.Support/services/{problemServiceName}/classifyProblems + /// + /// + /// Operation Id + /// ProblemClassificationsNoSubscription_classifyProblems + /// + /// + /// Default Api Version + /// 2023-06-01-preview + /// + /// + /// + /// Input to check. + /// The cancellation token to use. + /// is null. + public virtual async Task> ClassifyServiceProblemAsync(ServiceProblemClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _problemClassificationsNoSubscriptionClientDiagnostics.CreateScope("SupportAzureServiceResource.ClassifyServiceProblem"); + scope.Start(); + try + { + var response = await _problemClassificationsNoSubscriptionRestClient.ClassifyProblemsAsync(Id.Name, content, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Classify the right problem classifications (categories) available for a specific Azure service. + /// + /// + /// Request Path + /// /providers/Microsoft.Support/services/{problemServiceName}/classifyProblems + /// + /// + /// Operation Id + /// ProblemClassificationsNoSubscription_classifyProblems + /// + /// + /// Default Api Version + /// 2023-06-01-preview + /// + /// + /// + /// Input to check. + /// The cancellation token to use. + /// is null. + public virtual Response ClassifyServiceProblem(ServiceProblemClassificationContent content, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(content, nameof(content)); + + using var scope = _problemClassificationsNoSubscriptionClientDiagnostics.CreateScope("SupportAzureServiceResource.ClassifyServiceProblem"); + scope.Start(); + try + { + var response = _problemClassificationsNoSubscriptionRestClient.ClassifyProblems(Id.Name, content, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } } } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportFileDetailData.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportFileDetailData.cs index 1a0c1e991d6c..5ca2fb72f24e 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportFileDetailData.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportFileDetailData.cs @@ -61,9 +61,9 @@ public SupportFileDetailData() /// The resourceType. /// The systemData. /// Time in UTC (ISO 8601 format) when file workspace was created. - /// Size of each chunk. The size of each chunk should be provided in bytes and must not exceed 2.5 megabytes (MB). - /// Size of the file to be uploaded. The file size must not exceed 5 MB and should be provided in bytes. - /// Number of chunks to be uploaded. The maximum number of allowed chunks is 2. + /// Size of each chunk. + /// Size of the file to be uploaded. + /// Number of chunks to be uploaded. /// Keeps track of any properties unknown to the library. internal SupportFileDetailData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, DateTimeOffset? createdOn, int? chunkSize, int? fileSize, int? numberOfChunks, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { @@ -76,11 +76,11 @@ internal SupportFileDetailData(ResourceIdentifier id, string name, ResourceType /// Time in UTC (ISO 8601 format) when file workspace was created. public DateTimeOffset? CreatedOn { get; } - /// Size of each chunk. The size of each chunk should be provided in bytes and must not exceed 2.5 megabytes (MB). + /// Size of each chunk. public int? ChunkSize { get; set; } - /// Size of the file to be uploaded. The file size must not exceed 5 MB and should be provided in bytes. + /// Size of the file to be uploaded. public int? FileSize { get; set; } - /// Number of chunks to be uploaded. The maximum number of allowed chunks is 2. + /// Number of chunks to be uploaded. public int? NumberOfChunks { get; set; } } } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketChatTranscriptCollection.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketChatTranscriptCollection.cs index 2c3f5c4ca769..d09353c6b227 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketChatTranscriptCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketChatTranscriptCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string chatTran /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsync(Ca /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(Cancellation /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string chatTranscriptName, /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string chatTranscriptName, CancellationToke /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketChatTranscriptResource.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketChatTranscriptResource.cs index 2f123fe93697..74023948918a 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketChatTranscriptResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketChatTranscriptResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetAsyn /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketCommunicationCollection.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketCommunicationCollection.cs index 1f8407a61be8..be56867194bf 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketCommunicationCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketCommunicationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> Crea /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpdate(W /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string communica /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -284,7 +284,7 @@ public virtual AsyncPageable GetAllAsync(int /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(int? top = nu /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string communicationName, /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string communicationName, CancellationToken /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketCommunicationData.Serialization.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketCommunicationData.Serialization.cs index d96e78f63110..8729208f98bf 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketCommunicationData.Serialization.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketCommunicationData.Serialization.cs @@ -65,10 +65,16 @@ void IJsonModel.Write(Utf8JsonWriter writer, Mod writer.WritePropertyName("sender"u8); writer.WriteStringValue(Sender); } - writer.WritePropertyName("subject"u8); - writer.WriteStringValue(Subject); - writer.WritePropertyName("body"u8); - writer.WriteStringValue(Body); + if (Optional.IsDefined(Subject)) + { + writer.WritePropertyName("subject"u8); + writer.WriteStringValue(Subject); + } + if (Optional.IsDefined(Body)) + { + writer.WritePropertyName("body"u8); + writer.WriteStringValue(Body); + } if (options.Format != "W" && Optional.IsDefined(CreatedOn)) { writer.WritePropertyName("createdDate"u8); diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketCommunicationData.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketCommunicationData.cs index f0ef7e1ffaad..9f80ba2ee56d 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketCommunicationData.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketCommunicationData.cs @@ -52,16 +52,8 @@ public partial class SupportTicketCommunicationData : ResourceData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Subject of the communication. - /// Body of the communication. - /// or is null. - public SupportTicketCommunicationData(string subject, string body) + public SupportTicketCommunicationData() { - Argument.AssertNotNull(subject, nameof(subject)); - Argument.AssertNotNull(body, nameof(body)); - - Subject = subject; - Body = body; } /// Initializes a new instance of . @@ -87,11 +79,6 @@ internal SupportTicketCommunicationData(ResourceIdentifier id, string name, Reso _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal SupportTicketCommunicationData() - { - } - /// Communication type. public SupportTicketCommunicationType? CommunicationType { get; } /// Direction of communication. diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketCommunicationResource.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketCommunicationResource.cs index a4d0fd568d78..3b308ada29b3 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketCommunicationResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketCommunicationResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetAsync /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -180,7 +180,7 @@ public virtual Response Get(CancellationToke /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -226,7 +226,7 @@ public virtual async Task> Upda /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketData.Serialization.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketData.Serialization.cs index 2618104e1534..6bd4dbb66436 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketData.Serialization.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketData.Serialization.cs @@ -55,17 +55,26 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WritePropertyName("supportTicketId"u8); writer.WriteStringValue(SupportTicketId); } - writer.WritePropertyName("description"u8); - writer.WriteStringValue(Description); - writer.WritePropertyName("problemClassificationId"u8); - writer.WriteStringValue(ProblemClassificationId); + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(ProblemClassificationId)) + { + writer.WritePropertyName("problemClassificationId"u8); + writer.WriteStringValue(ProblemClassificationId); + } if (options.Format != "W" && Optional.IsDefined(ProblemClassificationDisplayName)) { writer.WritePropertyName("problemClassificationDisplayName"u8); writer.WriteStringValue(ProblemClassificationDisplayName); } - writer.WritePropertyName("severity"u8); - writer.WriteStringValue(Severity.ToString()); + if (Optional.IsDefined(Severity)) + { + writer.WritePropertyName("severity"u8); + writer.WriteStringValue(Severity.Value.ToString()); + } if (Optional.IsDefined(EnrollmentId)) { writer.WritePropertyName("enrollmentId"u8); @@ -76,8 +85,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WritePropertyName("require24X7Response"u8); writer.WriteBooleanValue(Require24X7Response.Value); } - writer.WritePropertyName("advancedDiagnosticConsent"u8); - writer.WriteStringValue(AdvancedDiagnosticConsent.ToString()); + if (Optional.IsDefined(AdvancedDiagnosticConsent)) + { + writer.WritePropertyName("advancedDiagnosticConsent"u8); + writer.WriteStringValue(AdvancedDiagnosticConsent.Value.ToString()); + } if (Optional.IsDefined(ProblemScopingQuestions)) { writer.WritePropertyName("problemScopingQuestions"u8); @@ -88,8 +100,11 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WritePropertyName("supportPlanId"u8); writer.WriteStringValue(SupportPlanId); } - writer.WritePropertyName("contactDetails"u8); - writer.WriteObjectValue(ContactDetails, options); + if (Optional.IsDefined(ContactDetails)) + { + writer.WritePropertyName("contactDetails"u8); + writer.WriteObjectValue(ContactDetails, options); + } if (Optional.IsDefined(ServiceLevelAgreement)) { writer.WritePropertyName("serviceLevelAgreement"u8); @@ -110,15 +125,21 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWrite writer.WritePropertyName("supportPlanDisplayName"u8); writer.WriteStringValue(SupportPlanDisplayName); } - writer.WritePropertyName("title"u8); - writer.WriteStringValue(Title); + if (Optional.IsDefined(Title)) + { + writer.WritePropertyName("title"u8); + writer.WriteStringValue(Title); + } if (Optional.IsDefined(ProblemStartOn)) { writer.WritePropertyName("problemStartTime"u8); writer.WriteStringValue(ProblemStartOn.Value, "O"); } - writer.WritePropertyName("serviceId"u8); - writer.WriteStringValue(ServiceId); + if (Optional.IsDefined(ServiceId)) + { + writer.WritePropertyName("serviceId"u8); + writer.WriteStringValue(ServiceId); + } if (options.Format != "W" && Optional.IsDefined(ServiceDisplayName)) { writer.WritePropertyName("serviceDisplayName"u8); @@ -216,10 +237,10 @@ internal static SupportTicketData DeserializeSupportTicketData(JsonElement eleme string description = default; string problemClassificationId = default; string problemClassificationDisplayName = default; - SupportSeverityLevel severity = default; + SupportSeverityLevel? severity = default; string enrollmentId = default; bool? require24X7Response = default; - AdvancedDiagnosticConsent advancedDiagnosticConsent = default; + AdvancedDiagnosticConsent? advancedDiagnosticConsent = default; string problemScopingQuestions = default; string supportPlanId = default; SupportContactProfile contactDetails = default; @@ -298,6 +319,10 @@ internal static SupportTicketData DeserializeSupportTicketData(JsonElement eleme } if (property0.NameEquals("severity"u8)) { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } severity = new SupportSeverityLevel(property0.Value.GetString()); continue; } @@ -317,6 +342,10 @@ internal static SupportTicketData DeserializeSupportTicketData(JsonElement eleme } if (property0.NameEquals("advancedDiagnosticConsent"u8)) { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } advancedDiagnosticConsent = new AdvancedDiagnosticConsent(property0.Value.GetString()); continue; } @@ -332,6 +361,10 @@ internal static SupportTicketData DeserializeSupportTicketData(JsonElement eleme } if (property0.NameEquals("contactDetails"u8)) { + if (property0.Value.ValueKind == JsonValueKind.Null) + { + continue; + } contactDetails = SupportContactProfile.DeserializeSupportContactProfile(property0.Value, options); continue; } diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketData.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketData.cs index a0f36f8a21f6..f11bf47c1020 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketData.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketData.cs @@ -52,29 +52,8 @@ public partial class SupportTicketData : ResourceData private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// Detailed description of the question or issue. - /// Each Azure service has its own set of issue categories, also known as problem classification. This parameter is the unique Id for the type of problem you are experiencing. - /// A value that indicates the urgency of the case, which in turn determines the response time according to the service level agreement of the technical support plan you have with Azure. Note: 'Highest critical impact', also known as the 'Emergency - Severe impact' level in the Azure portal is reserved only for our Premium customers. - /// Advanced diagnostic consent to be updated on the support ticket. - /// Contact information of the user requesting to create a support ticket. - /// Title of the support ticket. - /// This is the resource Id of the Azure service resource associated with the support ticket. - /// , , , or is null. - public SupportTicketData(string description, string problemClassificationId, SupportSeverityLevel severity, AdvancedDiagnosticConsent advancedDiagnosticConsent, SupportContactProfile contactDetails, string title, string serviceId) + public SupportTicketData() { - Argument.AssertNotNull(description, nameof(description)); - Argument.AssertNotNull(problemClassificationId, nameof(problemClassificationId)); - Argument.AssertNotNull(contactDetails, nameof(contactDetails)); - Argument.AssertNotNull(title, nameof(title)); - Argument.AssertNotNull(serviceId, nameof(serviceId)); - - Description = description; - ProblemClassificationId = problemClassificationId; - Severity = severity; - AdvancedDiagnosticConsent = advancedDiagnosticConsent; - ContactDetails = contactDetails; - Title = title; - ServiceId = serviceId; SecondaryConsent = new ChangeTrackingList(); } @@ -111,7 +90,7 @@ public SupportTicketData(string description, string problemClassificationId, Sup /// Additional ticket details associated with a quota support ticket request. /// This property indicates secondary consents for the support ticket. /// Keeps track of any properties unknown to the library. - internal SupportTicketData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string supportTicketId, string description, string problemClassificationId, string problemClassificationDisplayName, SupportSeverityLevel severity, string enrollmentId, bool? require24X7Response, AdvancedDiagnosticConsent advancedDiagnosticConsent, string problemScopingQuestions, string supportPlanId, SupportContactProfile contactDetails, SupportServiceLevelAgreement serviceLevelAgreement, SupportEngineer supportEngineer, string supportPlanType, string supportPlanDisplayName, string title, DateTimeOffset? problemStartOn, string serviceId, string serviceDisplayName, string status, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, string fileWorkspaceName, IsTemporaryTicket? isTemporaryTicket, TechnicalTicketDetails technicalTicketDetails, QuotaTicketDetails quotaTicketDetails, IList secondaryConsent, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) + internal SupportTicketData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string supportTicketId, string description, string problemClassificationId, string problemClassificationDisplayName, SupportSeverityLevel? severity, string enrollmentId, bool? require24X7Response, AdvancedDiagnosticConsent? advancedDiagnosticConsent, string problemScopingQuestions, string supportPlanId, SupportContactProfile contactDetails, SupportServiceLevelAgreement serviceLevelAgreement, SupportEngineer supportEngineer, string supportPlanType, string supportPlanDisplayName, string title, DateTimeOffset? problemStartOn, string serviceId, string serviceDisplayName, string status, DateTimeOffset? createdOn, DateTimeOffset? modifiedOn, string fileWorkspaceName, IsTemporaryTicket? isTemporaryTicket, TechnicalTicketDetails technicalTicketDetails, QuotaTicketDetails quotaTicketDetails, IList secondaryConsent, IDictionary serializedAdditionalRawData) : base(id, name, resourceType, systemData) { SupportTicketId = supportTicketId; Description = description; @@ -143,11 +122,6 @@ internal SupportTicketData(ResourceIdentifier id, string name, ResourceType reso _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal SupportTicketData() - { - } - /// System generated support ticket Id that is unique. public string SupportTicketId { get; set; } /// Detailed description of the question or issue. @@ -157,13 +131,13 @@ internal SupportTicketData() /// Localized name of problem classification. public string ProblemClassificationDisplayName { get; } /// A value that indicates the urgency of the case, which in turn determines the response time according to the service level agreement of the technical support plan you have with Azure. Note: 'Highest critical impact', also known as the 'Emergency - Severe impact' level in the Azure portal is reserved only for our Premium customers. - public SupportSeverityLevel Severity { get; set; } + public SupportSeverityLevel? Severity { get; set; } /// Enrollment Id associated with the support ticket. public string EnrollmentId { get; set; } /// Indicates if this requires a 24x7 response from Azure. public bool? Require24X7Response { get; set; } /// Advanced diagnostic consent to be updated on the support ticket. - public AdvancedDiagnosticConsent AdvancedDiagnosticConsent { get; set; } + public AdvancedDiagnosticConsent? AdvancedDiagnosticConsent { get; set; } /// Problem scoping questions associated with the support ticket. public string ProblemScopingQuestions { get; set; } /// Support plan id associated with the support ticket. diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketFileCollection.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketFileCollection.cs index e7a465100317..379b18c25acd 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketFileCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketFileCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOrUpdat /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(string f /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string fileName, Cancella /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(Cancellation /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(CancellationToken canc /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string fileName, Cancellat /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string fileName, CancellationToken cancella /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> GetIfExis /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketFileResource.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketFileResource.cs index 3170ca8aa341..7a7947843d2e 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketFileResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketFileResource.cs @@ -101,7 +101,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -141,7 +141,7 @@ public virtual async Task> GetAsync(Cancella /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual Response Get(CancellationToken cancell /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -229,7 +229,7 @@ public virtual async Task> UpdateAsync(W /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -277,7 +277,7 @@ public virtual ArmOperation Update(WaitUntil waitUnti /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -319,7 +319,7 @@ public virtual async Task UploadAsync(UploadFileContent content, Cance /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubChatTranscriptCollection.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubChatTranscriptCollection.cs index 44efbbbe1551..ede1d7d2b9d5 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubChatTranscriptCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubChatTranscriptCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -109,7 +109,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -154,7 +154,7 @@ public virtual Response Get(string cha /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -184,7 +184,7 @@ public virtual AsyncPageable GetAllAsy /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -214,7 +214,7 @@ public virtual Pageable GetAll(Cancell /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -257,7 +257,7 @@ public virtual async Task> ExistsAsync(string chatTranscriptName, /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -300,7 +300,7 @@ public virtual Response Exists(string chatTranscriptName, CancellationToke /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -345,7 +345,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubChatTranscriptResource.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubChatTranscriptResource.cs index 30d0f0af44f2..a562d6314bed 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubChatTranscriptResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubChatTranscriptResource.cs @@ -99,7 +99,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubCommunicationCollection.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubCommunicationCollection.cs index 63e1582114ae..7e2171220b0c 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubCommunicationCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubCommunicationCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -113,7 +113,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -162,7 +162,7 @@ public virtual ArmOperation CreateOrUpd /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -207,7 +207,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -252,7 +252,7 @@ public virtual Response Get(string comm /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -284,7 +284,7 @@ public virtual AsyncPageable GetAllAsyn /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(int? top /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string communicationName, /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string communicationName, CancellationToken /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubCommunicationResource.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubCommunicationResource.cs index fe6fa9fa5fe6..86ffa820e88f 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubCommunicationResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubCommunicationResource.cs @@ -99,7 +99,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -139,7 +139,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -179,7 +179,7 @@ public virtual Response Get(Cancellatio /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -225,7 +225,7 @@ public virtual async Task> /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubFileCollection.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubFileCollection.cs index e64dc57708c8..125a01c65a22 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubFileCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubFileCollection.cs @@ -64,7 +64,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -115,7 +115,7 @@ public virtual async Task> CreateOr /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -166,7 +166,7 @@ public virtual ArmOperation CreateOrUpdate(WaitU /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -211,7 +211,7 @@ public virtual async Task> GetAsync(str /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -256,7 +256,7 @@ public virtual Response Get(string fileName, Can /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -286,7 +286,7 @@ public virtual AsyncPageable GetAllAsync(Cancell /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -316,7 +316,7 @@ public virtual Pageable GetAll(CancellationToken /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -359,7 +359,7 @@ public virtual async Task> ExistsAsync(string fileName, Cancellat /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -402,7 +402,7 @@ public virtual Response Exists(string fileName, CancellationToken cancella /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -447,7 +447,7 @@ public virtual async Task> GetI /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubFileResource.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubFileResource.cs index 1f420ac8a35e..e44b8bea9d43 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubFileResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/SupportTicketNoSubFileResource.cs @@ -100,7 +100,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -140,7 +140,7 @@ public virtual async Task> GetAsync(Can /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -180,7 +180,7 @@ public virtual Response Get(CancellationToken ca /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -228,7 +228,7 @@ public virtual async Task> UpdateAs /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -276,7 +276,7 @@ public virtual ArmOperation Update(WaitUntil wai /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -318,7 +318,7 @@ public virtual async Task UploadAsync(UploadFileContent content, Cance /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/TenantFileWorkspaceCollection.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/TenantFileWorkspaceCollection.cs index 741c6644e1de..8ff86bf6e8fe 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/TenantFileWorkspaceCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/TenantFileWorkspaceCollection.cs @@ -62,7 +62,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -111,7 +111,7 @@ public virtual async Task> CreateOrUpd /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -160,7 +160,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -205,7 +205,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -250,7 +250,7 @@ public virtual Response Get(string fileWorkspaceNam /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -293,7 +293,7 @@ public virtual async Task> ExistsAsync(string fileWorkspaceName, /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -336,7 +336,7 @@ public virtual Response Exists(string fileWorkspaceName, CancellationToken /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -381,7 +381,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/TenantFileWorkspaceResource.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/TenantFileWorkspaceResource.cs index c3cf32a835b8..0e345fa01510 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/TenantFileWorkspaceResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/TenantFileWorkspaceResource.cs @@ -106,7 +106,7 @@ public virtual SupportTicketNoSubFileCollection GetSupportTicketNoSubFiles() /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -137,7 +137,7 @@ public virtual async Task> GetSupportTi /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -168,7 +168,7 @@ public virtual Response GetSupportTicketNoSubFil /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -248,7 +248,7 @@ public virtual Response Get(CancellationToken cance /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -292,7 +292,7 @@ public virtual async Task> UpdateAsync /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/TenantSupportTicketCollection.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/TenantSupportTicketCollection.cs index 8fe321bbfd72..e767d1fac0c0 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/TenantSupportTicketCollection.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/TenantSupportTicketCollection.cs @@ -65,7 +65,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -114,7 +114,7 @@ public virtual async Task> CreateOrUpd /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -163,7 +163,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUnti /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -208,7 +208,7 @@ public virtual async Task> GetAsync(string /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -253,7 +253,7 @@ public virtual Response Get(string supportTicketNam /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -285,7 +285,7 @@ public virtual AsyncPageable GetAllAsync(int? top = /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -317,7 +317,7 @@ public virtual Pageable GetAll(int? top = null, str /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -360,7 +360,7 @@ public virtual async Task> ExistsAsync(string supportTicketName, /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -403,7 +403,7 @@ public virtual Response Exists(string supportTicketName, CancellationToken /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -448,7 +448,7 @@ public virtual async Task> GetIfEx /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/Generated/TenantSupportTicketResource.cs b/sdk/support/Azure.ResourceManager.Support/src/Generated/TenantSupportTicketResource.cs index 99646f4df32a..55fb10b838bd 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/Generated/TenantSupportTicketResource.cs +++ b/sdk/support/Azure.ResourceManager.Support/src/Generated/TenantSupportTicketResource.cs @@ -112,7 +112,7 @@ public virtual SupportTicketNoSubCommunicationCollection GetSupportTicketNoSubCo /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -143,7 +143,7 @@ public virtual async Task> Get /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -181,7 +181,7 @@ public virtual SupportTicketNoSubChatTranscriptCollection GetSupportTicketNoSubC /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -212,7 +212,7 @@ public virtual async Task> Ge /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -243,7 +243,7 @@ public virtual Response GetSupportTick /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -283,7 +283,7 @@ public virtual async Task> GetAsync(Cancel /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -323,7 +323,7 @@ public virtual Response Get(CancellationToken cance /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -365,7 +365,7 @@ public virtual async Task> UpdateAsync(Upd /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -407,7 +407,7 @@ public virtual Response Update(UpdateSupportTicket /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource @@ -449,7 +449,7 @@ public virtual async Task> CheckNameAvai /// /// /// Default Api Version - /// 2024-04-01 + /// 2023-06-01-preview /// /// /// Resource diff --git a/sdk/support/Azure.ResourceManager.Support/src/autorest.md b/sdk/support/Azure.ResourceManager.Support/src/autorest.md index 365e4f42b23a..f8f592275e9c 100644 --- a/sdk/support/Azure.ResourceManager.Support/src/autorest.md +++ b/sdk/support/Azure.ResourceManager.Support/src/autorest.md @@ -7,7 +7,7 @@ azure-arm: true csharp: true library-name: Support namespace: Azure.ResourceManager.Support -require: https://github.com/Azure/azure-rest-api-specs/blob/a013dabbe84aeb3f5d48b0e30d15fdfbb6a8d062/specification/support/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/support/resource-manager/readme.md #tag: package-preview-2024-04 output-folder: $(this-folder)/Generated clear-output-folder: true