diff --git a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/api/Azure.ResourceManager.ApplicationInsights.netstandard2.0.cs b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/api/Azure.ResourceManager.ApplicationInsights.netstandard2.0.cs index 8dc3b2c66b4d7..5ccd697b91b7e 100644 --- a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/api/Azure.ResourceManager.ApplicationInsights.netstandard2.0.cs +++ b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/api/Azure.ResourceManager.ApplicationInsights.netstandard2.0.cs @@ -162,12 +162,6 @@ public static partial class ApplicationInsightsExtensions public static Azure.ResourceManager.ApplicationInsights.ComponentLinkedStorageAccountResource GetComponentLinkedStorageAccountResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.Response GetLiveToken(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetLiveTokenAsync(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Response GetMyWorkbook(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string resourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static System.Threading.Tasks.Task> GetMyWorkbookAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string resourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.ResourceManager.ApplicationInsights.MyWorkbookResource GetMyWorkbookResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.ApplicationInsights.MyWorkbookCollection GetMyWorkbooks(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } - public static Azure.Pageable GetMyWorkbooks(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.ApplicationInsights.Models.CategoryType category, System.Collections.Generic.IEnumerable tags = null, bool? canFetchContent = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetMyWorkbooksAsync(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, Azure.ResourceManager.ApplicationInsights.Models.CategoryType category, System.Collections.Generic.IEnumerable tags = null, bool? canFetchContent = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Response GetWebTest(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string webTestName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static System.Threading.Tasks.Task> GetWebTestAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string webTestName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.ApplicationInsights.WebTestResource GetWebTestResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } @@ -217,54 +211,6 @@ protected ComponentLinkedStorageAccountResource() { } public virtual Azure.Response Update(Azure.ResourceManager.ApplicationInsights.Models.ComponentLinkedStorageAccountPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.ApplicationInsights.Models.ComponentLinkedStorageAccountPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class MyWorkbookCollection : Azure.ResourceManager.ArmCollection - { - protected MyWorkbookCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string resourceName, Azure.ResourceManager.ApplicationInsights.MyWorkbookData data, string sourceId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string resourceName, Azure.ResourceManager.ApplicationInsights.MyWorkbookData data, string sourceId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Exists(string resourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> ExistsAsync(string resourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string resourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(Azure.ResourceManager.ApplicationInsights.Models.CategoryType category, System.Collections.Generic.IEnumerable tags = null, string sourceId = null, bool? canFetchContent = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(Azure.ResourceManager.ApplicationInsights.Models.CategoryType category, System.Collections.Generic.IEnumerable tags = null, string sourceId = null, bool? canFetchContent = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string resourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.NullableResponse GetIfExists(string resourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string resourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class MyWorkbookData : Azure.ResourceManager.ApplicationInsights.Models.MyWorkbookResourceContent - { - public MyWorkbookData() { } - public string Category { get { throw null; } set { } } - public string DisplayName { get { throw null; } set { } } - public Azure.ResourceManager.ApplicationInsights.Models.ApplicationInsightsKind? Kind { get { throw null; } set { } } - public string SerializedData { get { throw null; } set { } } - public string SourceId { get { throw null; } set { } } - public System.Uri StorageUri { get { throw null; } set { } } - public Azure.ResourceManager.Models.SystemData SystemData { get { throw null; } } - public string TimeModified { get { throw null; } } - public string UserId { get { throw null; } } - public string Version { get { throw null; } set { } } - } - public partial class MyWorkbookResource : Azure.ResourceManager.ArmResource - { - public static readonly Azure.Core.ResourceType ResourceType; - protected MyWorkbookResource() { } - public virtual Azure.ResourceManager.ApplicationInsights.MyWorkbookData Data { get { throw null; } } - public virtual bool HasData { get { throw null; } } - public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string resourceName) { throw null; } - public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { 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; } - public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Update(Azure.ResourceManager.ApplicationInsights.MyWorkbookData data, string sourceId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.ApplicationInsights.MyWorkbookData data, string sourceId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } public partial class WebTestCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected WebTestCollection() { } @@ -455,7 +401,6 @@ protected MockableApplicationInsightsArmClient() { } public virtual Azure.ResourceManager.ApplicationInsights.ComponentLinkedStorageAccountResource GetComponentLinkedStorageAccountResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.Response GetLiveToken(Azure.Core.ResourceIdentifier scope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetLiveTokenAsync(Azure.Core.ResourceIdentifier scope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ApplicationInsights.MyWorkbookResource GetMyWorkbookResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApplicationInsights.WebTestResource GetWebTestResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApplicationInsights.WorkbookResource GetWorkbookResource(Azure.Core.ResourceIdentifier id) { throw null; } public virtual Azure.ResourceManager.ApplicationInsights.WorkbookRevisionResource GetWorkbookRevisionResource(Azure.Core.ResourceIdentifier id) { throw null; } @@ -467,9 +412,6 @@ protected MockableApplicationInsightsResourceGroupResource() { } public virtual Azure.Response GetApplicationInsightsComponent(string resourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetApplicationInsightsComponentAsync(string resourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ApplicationInsights.ApplicationInsightsComponentCollection GetApplicationInsightsComponents() { throw null; } - public virtual Azure.Response GetMyWorkbook(string resourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetMyWorkbookAsync(string resourceName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.ResourceManager.ApplicationInsights.MyWorkbookCollection GetMyWorkbooks() { throw null; } public virtual Azure.Response GetWebTest(string webTestName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetWebTestAsync(string webTestName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.ApplicationInsights.WebTestCollection GetWebTests() { throw null; } @@ -485,8 +427,6 @@ public partial class MockableApplicationInsightsSubscriptionResource : Azure.Res protected MockableApplicationInsightsSubscriptionResource() { } public virtual Azure.Pageable GetApplicationInsightsComponents(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetApplicationInsightsComponentsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetMyWorkbooks(Azure.ResourceManager.ApplicationInsights.Models.CategoryType category, System.Collections.Generic.IEnumerable tags = null, bool? canFetchContent = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetMyWorkbooksAsync(Azure.ResourceManager.ApplicationInsights.Models.CategoryType category, System.Collections.Generic.IEnumerable tags = null, bool? canFetchContent = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetWebTests(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetWebTestsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Pageable GetWorkbooks(Azure.ResourceManager.ApplicationInsights.Models.CategoryType category, System.Collections.Generic.IEnumerable tags = null, bool? canFetchContent = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -686,24 +626,6 @@ internal ApplicationInsightsComponentWebTestLocation() { } public string Tag { get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct ApplicationInsightsKind : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public ApplicationInsightsKind(string value) { throw null; } - public static Azure.ResourceManager.ApplicationInsights.Models.ApplicationInsightsKind Shared { get { throw null; } } - public static Azure.ResourceManager.ApplicationInsights.Models.ApplicationInsightsKind User { get { throw null; } } - public bool Equals(Azure.ResourceManager.ApplicationInsights.Models.ApplicationInsightsKind 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.ApplicationInsights.Models.ApplicationInsightsKind left, Azure.ResourceManager.ApplicationInsights.Models.ApplicationInsightsKind right) { throw null; } - public static implicit operator Azure.ResourceManager.ApplicationInsights.Models.ApplicationInsightsKind (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ApplicationInsights.Models.ApplicationInsightsKind left, Azure.ResourceManager.ApplicationInsights.Models.ApplicationInsightsKind right) { throw null; } - public override string ToString() { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ApplicationType : System.IEquatable { private readonly object _dummy; @@ -739,8 +661,6 @@ public static partial class ArmApplicationInsightsModelFactory public static Azure.ResourceManager.ApplicationInsights.Models.ComponentPurgeResponse ComponentPurgeResponse(string operationId = null) { throw null; } public static Azure.ResourceManager.ApplicationInsights.Models.ComponentPurgeStatusResponse ComponentPurgeStatusResponse(Azure.ResourceManager.ApplicationInsights.Models.PurgeState status = default(Azure.ResourceManager.ApplicationInsights.Models.PurgeState)) { throw null; } public static Azure.ResourceManager.ApplicationInsights.Models.LiveTokenResponse LiveTokenResponse(string liveToken = null) { throw null; } - public static Azure.ResourceManager.ApplicationInsights.MyWorkbookData MyWorkbookData(Azure.ResourceManager.ApplicationInsights.Models.MyWorkbookManagedIdentity identity = null, string id = null, string name = null, string resourceType = null, Azure.Core.AzureLocation? location = default(Azure.Core.AzureLocation?), System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary etag = null, Azure.ResourceManager.ApplicationInsights.Models.ApplicationInsightsKind? kind = default(Azure.ResourceManager.ApplicationInsights.Models.ApplicationInsightsKind?), Azure.ResourceManager.Models.SystemData systemData = null, string displayName = null, string serializedData = null, string version = null, string timeModified = null, string category = null, string userId = null, string sourceId = null, System.Uri storageUri = null) { throw null; } - public static Azure.ResourceManager.ApplicationInsights.Models.MyWorkbookUserAssignedIdentities MyWorkbookUserAssignedIdentities(string principalId = null, System.Guid? tenantId = default(System.Guid?)) { throw null; } public static Azure.ResourceManager.ApplicationInsights.Models.PrivateLinkScopedResourceContent PrivateLinkScopedResourceContent(string resourceId = null, string scopeId = null) { throw null; } public static Azure.ResourceManager.ApplicationInsights.WebTestData WebTestData(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.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), Azure.ResourceManager.ApplicationInsights.Models.WebTestKind? kind = default(Azure.ResourceManager.ApplicationInsights.Models.WebTestKind?), string syntheticMonitorId = null, string webTestName = null, string description = null, bool? isEnabled = default(bool?), int? frequencyInSeconds = default(int?), int? timeoutInSeconds = default(int?), Azure.ResourceManager.ApplicationInsights.Models.WebTestKind? webTestKind = default(Azure.ResourceManager.ApplicationInsights.Models.WebTestKind?), bool? isRetryEnabled = default(bool?), System.Collections.Generic.IEnumerable locations = null, string webTest = null, string provisioningState = null, Azure.ResourceManager.ApplicationInsights.Models.WebTestPropertiesRequest request = null, Azure.ResourceManager.ApplicationInsights.Models.WebTestPropertiesValidationRules validationRules = null) { throw null; } public static Azure.ResourceManager.ApplicationInsights.WorkbookData WorkbookData(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.IDictionary tags = null, Azure.Core.AzureLocation location = default(Azure.Core.AzureLocation), string displayName = null, string serializedData = null, string version = null, System.DateTimeOffset? modifiedOn = default(System.DateTimeOffset?), string category = null, string userId = null, string sourceId = null, System.Uri storageUri = null, string description = null, string revision = null, Azure.ResourceManager.Models.ManagedServiceIdentity identity = null, Azure.ResourceManager.ApplicationInsights.Models.WorkbookSharedTypeKind? kind = default(Azure.ResourceManager.ApplicationInsights.Models.WorkbookSharedTypeKind?), Azure.ETag? etag = default(Azure.ETag?)) { throw null; } @@ -954,47 +874,6 @@ public partial class LiveTokenResponse internal LiveTokenResponse() { } public string LiveToken { get { throw null; } } } - public partial class MyWorkbookManagedIdentity - { - public MyWorkbookManagedIdentity() { } - public Azure.ResourceManager.ApplicationInsights.Models.MyWorkbookManagedIdentityType? IdentityType { get { throw null; } set { } } - public Azure.ResourceManager.ApplicationInsights.Models.MyWorkbookUserAssignedIdentities UserAssignedIdentities { get { throw null; } set { } } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct MyWorkbookManagedIdentityType : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public MyWorkbookManagedIdentityType(string value) { throw null; } - public static Azure.ResourceManager.ApplicationInsights.Models.MyWorkbookManagedIdentityType None { get { throw null; } } - public static Azure.ResourceManager.ApplicationInsights.Models.MyWorkbookManagedIdentityType UserAssigned { get { throw null; } } - public bool Equals(Azure.ResourceManager.ApplicationInsights.Models.MyWorkbookManagedIdentityType 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.ApplicationInsights.Models.MyWorkbookManagedIdentityType left, Azure.ResourceManager.ApplicationInsights.Models.MyWorkbookManagedIdentityType right) { throw null; } - public static implicit operator Azure.ResourceManager.ApplicationInsights.Models.MyWorkbookManagedIdentityType (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.ApplicationInsights.Models.MyWorkbookManagedIdentityType left, Azure.ResourceManager.ApplicationInsights.Models.MyWorkbookManagedIdentityType right) { throw null; } - public override string ToString() { throw null; } - } - public partial class MyWorkbookResourceContent - { - public MyWorkbookResourceContent() { } - public System.Collections.Generic.IDictionary ETag { get { throw null; } } - public string Id { get { throw null; } set { } } - public Azure.ResourceManager.ApplicationInsights.Models.MyWorkbookManagedIdentity Identity { get { throw null; } set { } } - public Azure.Core.AzureLocation? Location { get { throw null; } set { } } - public string Name { get { throw null; } set { } } - public string ResourceType { get { throw null; } set { } } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } - } - public partial class MyWorkbookUserAssignedIdentities - { - public MyWorkbookUserAssignedIdentities() { } - public string PrincipalId { get { throw null; } } - public System.Guid? TenantId { get { throw null; } } - } public partial class PrivateLinkScopedResourceContent { internal PrivateLinkScopedResourceContent() { } diff --git a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/samples/Generated/Samples/Sample_MyWorkbookCollection.cs b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/samples/Generated/Samples/Sample_MyWorkbookCollection.cs deleted file mode 100644 index 74e5073c0710c..0000000000000 --- a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/samples/Generated/Samples/Sample_MyWorkbookCollection.cs +++ /dev/null @@ -1,253 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.ApplicationInsights; -using Azure.ResourceManager.ApplicationInsights.Models; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.ApplicationInsights.Samples -{ - public partial class Sample_MyWorkbookCollection - { - // WorkbooksList - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_WorkbooksList() - { - // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbooksList.json - // this example is just showing the usage of "MyWorkbooks_ListByResourceGroup" 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 ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "6b643656-33eb-422f-aee8-3ac145d124af"; - string resourceGroupName = "my-resource-group"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this MyWorkbookResource - MyWorkbookCollection collection = resourceGroupResource.GetMyWorkbooks(); - - // invoke the operation and iterate over the result - CategoryType category = CategoryType.Workbook; - await foreach (MyWorkbookResource item in collection.GetAllAsync(category)) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - MyWorkbookData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } - - // WorkbooksList2 - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetAll_WorkbooksList2() - { - // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbooksList2.json - // this example is just showing the usage of "MyWorkbooks_ListByResourceGroup" 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 ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "6b643656-33eb-422f-aee8-3ac145d124af"; - string resourceGroupName = "my-resource-group"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this MyWorkbookResource - MyWorkbookCollection collection = resourceGroupResource.GetMyWorkbooks(); - - // invoke the operation and iterate over the result - CategoryType category = CategoryType.Workbook; - await foreach (MyWorkbookResource item in collection.GetAllAsync(category)) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - MyWorkbookData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } - - // WorkbookGet - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_WorkbookGet() - { - // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbookGet.json - // this example is just showing the usage of "MyWorkbooks_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "6b643656-33eb-422f-aee8-3ac145d124af"; - string resourceGroupName = "my-resource-group"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this MyWorkbookResource - MyWorkbookCollection collection = resourceGroupResource.GetMyWorkbooks(); - - // invoke the operation - string resourceName = "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"; - MyWorkbookResource result = await collection.GetAsync(resourceName); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - MyWorkbookData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // WorkbookGet - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Exists_WorkbookGet() - { - // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbookGet.json - // this example is just showing the usage of "MyWorkbooks_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "6b643656-33eb-422f-aee8-3ac145d124af"; - string resourceGroupName = "my-resource-group"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this MyWorkbookResource - MyWorkbookCollection collection = resourceGroupResource.GetMyWorkbooks(); - - // invoke the operation - string resourceName = "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"; - bool result = await collection.ExistsAsync(resourceName); - - Console.WriteLine($"Succeeded: {result}"); - } - - // WorkbookGet - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetIfExists_WorkbookGet() - { - // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbookGet.json - // this example is just showing the usage of "MyWorkbooks_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "6b643656-33eb-422f-aee8-3ac145d124af"; - string resourceGroupName = "my-resource-group"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this MyWorkbookResource - MyWorkbookCollection collection = resourceGroupResource.GetMyWorkbooks(); - - // invoke the operation - string resourceName = "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"; - NullableResponse response = await collection.GetIfExistsAsync(resourceName); - MyWorkbookResource result = response.HasValue ? response.Value : null; - - if (result == null) - { - Console.WriteLine($"Succeeded with null as result"); - } - else - { - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - MyWorkbookData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } - - // WorkbookAdd - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task CreateOrUpdate_WorkbookAdd() - { - // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbookAdd.json - // this example is just showing the usage of "MyWorkbooks_CreateOrUpdate" 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 ResourceGroupResource created on azure - // for more information of creating ResourceGroupResource, please refer to the document of ResourceGroupResource - string subscriptionId = "00000000-0000-0000-0000-00000000"; - string resourceGroupName = "my-resource-group"; - ResourceIdentifier resourceGroupResourceId = ResourceGroupResource.CreateResourceIdentifier(subscriptionId, resourceGroupName); - ResourceGroupResource resourceGroupResource = client.GetResourceGroupResource(resourceGroupResourceId); - - // get the collection of this MyWorkbookResource - MyWorkbookCollection collection = resourceGroupResource.GetMyWorkbooks(); - - // invoke the operation - string resourceName = "deadb33f-8bee-4d3b-a059-9be8dac93960"; - MyWorkbookData data = new MyWorkbookData() - { - Kind = ApplicationInsightsKind.User, - DisplayName = "Blah Blah Blah", - SerializedData = "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}", - Category = "workbook", - SourceId = "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", - Id = "c0deea5e-3344-40f2-96f8-6f8e1c3b5722", - Name = "deadb33f-8bee-4d3b-a059-9be8dac93960", - Location = new AzureLocation("west us"), - Tags = -{ -["0"] = "TagSample01", -["1"] = "TagSample02", -}, - }; - ArmOperation lro = await collection.CreateOrUpdateAsync(WaitUntil.Completed, resourceName, data); - MyWorkbookResource result = lro.Value; - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - MyWorkbookData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/samples/Generated/Samples/Sample_MyWorkbookResource.cs b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/samples/Generated/Samples/Sample_MyWorkbookResource.cs deleted file mode 100644 index ecb7a88d0d82f..0000000000000 --- a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/samples/Generated/Samples/Sample_MyWorkbookResource.cs +++ /dev/null @@ -1,194 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Identity; -using Azure.ResourceManager; -using Azure.ResourceManager.ApplicationInsights; -using Azure.ResourceManager.ApplicationInsights.Models; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.ApplicationInsights.Samples -{ - public partial class Sample_MyWorkbookResource - { - // WorkbooksList - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetMyWorkbooks_WorkbooksList() - { - // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbooksList.json - // this example is just showing the usage of "MyWorkbooks_ListBySubscription" 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 = "6b643656-33eb-422f-aee8-3ac145d124af"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // invoke the operation and iterate over the result - CategoryType category = CategoryType.Workbook; - await foreach (MyWorkbookResource item in subscriptionResource.GetMyWorkbooksAsync(category)) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - MyWorkbookData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } - - // WorkbooksList2 - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task GetMyWorkbooks_WorkbooksList2() - { - // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbooksList2.json - // this example is just showing the usage of "MyWorkbooks_ListBySubscription" 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 = "6b643656-33eb-422f-aee8-3ac145d124af"; - ResourceIdentifier subscriptionResourceId = SubscriptionResource.CreateResourceIdentifier(subscriptionId); - SubscriptionResource subscriptionResource = client.GetSubscriptionResource(subscriptionResourceId); - - // invoke the operation and iterate over the result - CategoryType category = CategoryType.Workbook; - await foreach (MyWorkbookResource item in subscriptionResource.GetMyWorkbooksAsync(category)) - { - // the variable item is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - MyWorkbookData resourceData = item.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - Console.WriteLine($"Succeeded"); - } - - // WorkbookGet - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Get_WorkbookGet() - { - // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbookGet.json - // this example is just showing the usage of "MyWorkbooks_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this MyWorkbookResource created on azure - // for more information of creating MyWorkbookResource, please refer to the document of MyWorkbookResource - string subscriptionId = "6b643656-33eb-422f-aee8-3ac145d124af"; - string resourceGroupName = "my-resource-group"; - string resourceName = "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"; - ResourceIdentifier myWorkbookResourceId = MyWorkbookResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, resourceName); - MyWorkbookResource myWorkbook = client.GetMyWorkbookResource(myWorkbookResourceId); - - // invoke the operation - MyWorkbookResource result = await myWorkbook.GetAsync(); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - MyWorkbookData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - - // WorkbookDelete - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Delete_WorkbookDelete() - { - // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbookDelete.json - // this example is just showing the usage of "MyWorkbooks_Delete" 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 MyWorkbookResource created on azure - // for more information of creating MyWorkbookResource, please refer to the document of MyWorkbookResource - string subscriptionId = "subid"; - string resourceGroupName = "my-resource-group"; - string resourceName = "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"; - ResourceIdentifier myWorkbookResourceId = MyWorkbookResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, resourceName); - MyWorkbookResource myWorkbook = client.GetMyWorkbookResource(myWorkbookResourceId); - - // invoke the operation - await myWorkbook.DeleteAsync(WaitUntil.Completed); - - Console.WriteLine($"Succeeded"); - } - - // WorkbookUpdate - [NUnit.Framework.Test] - [NUnit.Framework.Ignore("Only verifying that the sample builds")] - public async Task Update_WorkbookUpdate() - { - // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2021-03-08/examples/MyWorkbookUpdate.json - // this example is just showing the usage of "MyWorkbooks_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 - TokenCredential cred = new DefaultAzureCredential(); - // authenticate your client - ArmClient client = new ArmClient(cred); - - // this example assumes you already have this MyWorkbookResource created on azure - // for more information of creating MyWorkbookResource, please refer to the document of MyWorkbookResource - string subscriptionId = "6b643656-33eb-422f-aee8-3ac145d124af"; - string resourceGroupName = "my-resource-group"; - string resourceName = "deadb33f-5e0d-4064-8ebb-1a4ed0313eb2"; - ResourceIdentifier myWorkbookResourceId = MyWorkbookResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, resourceName); - MyWorkbookResource myWorkbook = client.GetMyWorkbookResource(myWorkbookResourceId); - - // invoke the operation - MyWorkbookData data = new MyWorkbookData() - { - Kind = ApplicationInsightsKind.User, - DisplayName = "Blah Blah Blah", - SerializedData = "{\"version\":\"Notebook/1.0\",\"items\":[{\"type\":1,\"content\":\"{\"json\":\"## New workbook\\r\\n---\\r\\n\\r\\nWelcome to your new workbook. This area will display text formatted as markdown.\\r\\n\\r\\n\\r\\nWe've included a basic analytics query to get you started. Use the `Edit` button below each section to configure it or add more sections.\"}\",\"halfWidth\":null,\"conditionalVisibility\":null},{\"type\":3,\"content\":\"{\"version\":\"KqlItem/1.0\",\"query\":\"union withsource=TableName *\\n| summarize Count=count() by TableName\\n| render barchart\",\"showQuery\":false,\"size\":1,\"aggregation\":0,\"showAnnotations\":false}\",\"halfWidth\":null,\"conditionalVisibility\":null}],\"isLocked\":false}", - Version = "ME", - Category = "workbook", - SourceId = "/subscriptions/00000000-0000-0000-0000-00000000/resourceGroups/MyGroup/providers/Microsoft.Web/sites/MyTestApp-CodeLens", - StorageUri = null, - Name = "deadb33f-8bee-4d3b-a059-9be8dac93960", - Location = new AzureLocation("west us"), - Tags = -{ -["0"] = "TagSample01", -["1"] = "TagSample02", -}, - }; - MyWorkbookResource result = await myWorkbook.UpdateAsync(data); - - // the variable result is a resource, you could call other operations on this instance as well - // but just for demo, we get its data from this resource instance - MyWorkbookData resourceData = result.Data; - // for demo we just print out the id - Console.WriteLine($"Succeeded on id: {resourceData.Id}"); - } - } -} diff --git a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/samples/Generated/Samples/Sample_WorkbookCollection.cs b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/samples/Generated/Samples/Sample_WorkbookCollection.cs index 702f94c837212..c435a865a120b 100644 --- a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/samples/Generated/Samples/Sample_WorkbookCollection.cs +++ b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/samples/Generated/Samples/Sample_WorkbookCollection.cs @@ -25,7 +25,7 @@ public partial class Sample_WorkbookCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_WorkbooksList() { - // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbooksList.json + // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2023-06-01/examples/WorkbooksList.json // this example is just showing the usage of "Workbooks_ListByResourceGroup" 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 GetAll_WorkbooksList() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_WorkbooksManagedList() { - // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbooksManagedList.json + // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2023-06-01/examples/WorkbooksManagedList.json // this example is just showing the usage of "Workbooks_ListByResourceGroup" 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 @@ -101,7 +101,7 @@ public async Task GetAll_WorkbooksManagedList() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_WorkbookGet() { - // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookGet.json + // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2023-06-01/examples/WorkbookGet.json // this example is just showing the usage of "Workbooks_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 @@ -135,7 +135,7 @@ public async Task Get_WorkbookGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_WorkbookGet() { - // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookGet.json + // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2023-06-01/examples/WorkbookGet.json // this example is just showing the usage of "Workbooks_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 @@ -165,7 +165,7 @@ public async Task Exists_WorkbookGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_WorkbookGet() { - // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookGet.json + // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2023-06-01/examples/WorkbookGet.json // this example is just showing the usage of "Workbooks_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 @@ -207,7 +207,7 @@ public async Task GetIfExists_WorkbookGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_WorkbookGet1() { - // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookGet1.json + // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2023-06-01/examples/WorkbookGet1.json // this example is just showing the usage of "Workbooks_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 @@ -241,7 +241,7 @@ public async Task Get_WorkbookGet1() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_WorkbookGet1() { - // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookGet1.json + // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2023-06-01/examples/WorkbookGet1.json // this example is just showing the usage of "Workbooks_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 @@ -271,7 +271,7 @@ public async Task Exists_WorkbookGet1() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_WorkbookGet1() { - // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookGet1.json + // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2023-06-01/examples/WorkbookGet1.json // this example is just showing the usage of "Workbooks_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 @@ -313,7 +313,7 @@ public async Task GetIfExists_WorkbookGet1() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_WorkbookManagedGet() { - // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookManagedGet.json + // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2023-06-01/examples/WorkbookManagedGet.json // this example is just showing the usage of "Workbooks_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 @@ -347,7 +347,7 @@ public async Task Get_WorkbookManagedGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_WorkbookManagedGet() { - // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookManagedGet.json + // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2023-06-01/examples/WorkbookManagedGet.json // this example is just showing the usage of "Workbooks_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 @@ -377,7 +377,7 @@ public async Task Exists_WorkbookManagedGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_WorkbookManagedGet() { - // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookManagedGet.json + // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2023-06-01/examples/WorkbookManagedGet.json // this example is just showing the usage of "Workbooks_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 @@ -419,7 +419,7 @@ public async Task GetIfExists_WorkbookManagedGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_WorkbookAdd() { - // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookAdd.json + // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2023-06-01/examples/WorkbookAdd.json // this example is just showing the usage of "Workbooks_CreateOrUpdate" 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 @@ -468,7 +468,7 @@ public async Task CreateOrUpdate_WorkbookAdd() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task CreateOrUpdate_WorkbookManagedAdd() { - // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookManagedAdd.json + // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2023-06-01/examples/WorkbookManagedAdd.json // this example is just showing the usage of "Workbooks_CreateOrUpdate" 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/applicationinsights/Azure.ResourceManager.ApplicationInsights/samples/Generated/Samples/Sample_WorkbookResource.cs b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/samples/Generated/Samples/Sample_WorkbookResource.cs index 68e28a0167418..e5da8aa5ab98c 100644 --- a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/samples/Generated/Samples/Sample_WorkbookResource.cs +++ b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/samples/Generated/Samples/Sample_WorkbookResource.cs @@ -24,7 +24,7 @@ public partial class Sample_WorkbookResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetWorkbooks_WorkbooksList2() { - // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbooksList2.json + // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2023-06-01/examples/WorkbooksList2.json // this example is just showing the usage of "Workbooks_ListBySubscription" 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 GetWorkbooks_WorkbooksList2() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetWorkbooks_WorkbooksListSub() { - // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbooksListSub.json + // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2023-06-01/examples/WorkbooksListSub.json // this example is just showing the usage of "Workbooks_ListBySubscription" 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 GetWorkbooks_WorkbooksListSub() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_WorkbookGet() { - // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookGet.json + // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2023-06-01/examples/WorkbookGet.json // this example is just showing the usage of "Workbooks_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 @@ -121,7 +121,7 @@ public async Task Get_WorkbookGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_WorkbookGet1() { - // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookGet1.json + // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2023-06-01/examples/WorkbookGet1.json // this example is just showing the usage of "Workbooks_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 @@ -152,7 +152,7 @@ public async Task Get_WorkbookGet1() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_WorkbookManagedGet() { - // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookManagedGet.json + // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2023-06-01/examples/WorkbookManagedGet.json // this example is just showing the usage of "Workbooks_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 @@ -183,7 +183,7 @@ public async Task Get_WorkbookManagedGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Delete_WorkbookDelete() { - // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookDelete.json + // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2023-06-01/examples/WorkbookDelete.json // this example is just showing the usage of "Workbooks_Delete" 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 Delete_WorkbookDelete() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_WorkbookManagedUpdate() { - // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookManagedUpdate.json + // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2023-06-01/examples/WorkbookManagedUpdate.json // this example is just showing the usage of "Workbooks_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 @@ -243,7 +243,7 @@ public async Task Update_WorkbookManagedUpdate() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Update_WorkbookUpdate() { - // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookUpdate.json + // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2023-06-01/examples/WorkbookUpdate.json // this example is just showing the usage of "Workbooks_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 diff --git a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/samples/Generated/Samples/Sample_WorkbookRevisionCollection.cs b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/samples/Generated/Samples/Sample_WorkbookRevisionCollection.cs index 80809374c2bd5..0ed6bd35bbce3 100644 --- a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/samples/Generated/Samples/Sample_WorkbookRevisionCollection.cs +++ b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/samples/Generated/Samples/Sample_WorkbookRevisionCollection.cs @@ -22,7 +22,7 @@ public partial class Sample_WorkbookRevisionCollection [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetAll_WorkbookRevisionsList() { - // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookRevisionsList.json + // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2023-06-01/examples/WorkbookRevisionsList.json // this example is just showing the usage of "Workbooks_RevisionsList" 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 GetAll_WorkbookRevisionsList() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_WorkbookRevisionGet() { - // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookRevisionGet.json + // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2023-06-01/examples/WorkbookRevisionGet.json // this example is just showing the usage of "Workbooks_RevisionGet" 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 @@ -94,7 +94,7 @@ public async Task Get_WorkbookRevisionGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Exists_WorkbookRevisionGet() { - // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookRevisionGet.json + // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2023-06-01/examples/WorkbookRevisionGet.json // this example is just showing the usage of "Workbooks_RevisionGet" 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 @@ -125,7 +125,7 @@ public async Task Exists_WorkbookRevisionGet() [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task GetIfExists_WorkbookRevisionGet() { - // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookRevisionGet.json + // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2023-06-01/examples/WorkbookRevisionGet.json // this example is just showing the usage of "Workbooks_RevisionGet" 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/applicationinsights/Azure.ResourceManager.ApplicationInsights/samples/Generated/Samples/Sample_WorkbookRevisionResource.cs b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/samples/Generated/Samples/Sample_WorkbookRevisionResource.cs index 2b3c837cd3aa0..139ebd8195708 100644 --- a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/samples/Generated/Samples/Sample_WorkbookRevisionResource.cs +++ b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/samples/Generated/Samples/Sample_WorkbookRevisionResource.cs @@ -21,7 +21,7 @@ public partial class Sample_WorkbookRevisionResource [NUnit.Framework.Ignore("Only verifying that the sample builds")] public async Task Get_WorkbookRevisionGet() { - // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2022-04-01/examples/WorkbookRevisionGet.json + // Generated from example definition: specification/applicationinsights/resource-manager/Microsoft.Insights/stable/2023-06-01/examples/WorkbookRevisionGet.json // this example is just showing the usage of "Workbooks_RevisionGet" 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/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/ArmApplicationInsightsModelFactory.cs b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/ArmApplicationInsightsModelFactory.cs index 41e335930f479..dcde47948d2e0 100644 --- a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/ArmApplicationInsightsModelFactory.cs +++ b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/ArmApplicationInsightsModelFactory.cs @@ -330,42 +330,6 @@ public static WorkbookTemplateData WorkbookTemplateData(ResourceIdentifier id = return new WorkbookTemplateData(id, name, resourceType, systemData, tags, location, priority, author, templateData, galleries?.ToList(), localizedGalleries); } - /// Initializes a new instance of . - /// Identity used for BYOS. - /// Azure resource Id. - /// Azure resource name. - /// Azure resource type. - /// Resource location. - /// Resource tags. - /// Resource etag. - /// The kind of workbook. Choices are user and shared. - /// Metadata pertaining to creation and last modification of the resource. - /// The user-defined name of the private workbook. - /// Configuration of this particular private workbook. Configuration data is a string containing valid JSON. - /// This instance's version of the data model. This can change as new features are added that can be marked private workbook. - /// Date and time in UTC of the last modification that was made to this private workbook definition. - /// Workbook category, as defined by the user at creation time. - /// Unique user id of the specific user that owns this private workbook. - /// Optional resourceId for a source resource. - /// BYOS Storage Account URI. - /// A new instance for mocking. - public static MyWorkbookData MyWorkbookData(MyWorkbookManagedIdentity identity = null, string id = null, string name = null, string resourceType = null, AzureLocation? location = null, IDictionary tags = null, IDictionary etag = null, ApplicationInsightsKind? kind = null, SystemData systemData = null, string displayName = null, string serializedData = null, string version = null, string timeModified = null, string category = null, string userId = null, string sourceId = null, Uri storageUri = null) - { - tags ??= new Dictionary(); - etag ??= new Dictionary(); - - return new MyWorkbookData(identity, id, name, resourceType, location, tags, etag, kind, systemData, displayName, serializedData, version, timeModified, category, userId, sourceId, storageUri); - } - - /// Initializes a new instance of . - /// The principal ID of resource identity. - /// The tenant ID of resource. - /// A new instance for mocking. - public static MyWorkbookUserAssignedIdentities MyWorkbookUserAssignedIdentities(string principalId = null, Guid? tenantId = null) - { - return new MyWorkbookUserAssignedIdentities(principalId, tenantId); - } - /// Initializes a new instance of . /// The id. /// The name. diff --git a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Extensions/ApplicationInsightsExtensions.cs b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Extensions/ApplicationInsightsExtensions.cs index 8eb56520fe73b..0f7f2c85c485c 100644 --- a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Extensions/ApplicationInsightsExtensions.cs +++ b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Extensions/ApplicationInsightsExtensions.cs @@ -149,25 +149,6 @@ public static WorkbookTemplateResource GetWorkbookTemplateResource(this ArmClien return GetMockableApplicationInsightsArmClient(client).GetWorkbookTemplateResource(id); } - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// is null. - /// Returns a object. - public static MyWorkbookResource GetMyWorkbookResource(this ArmClient client, ResourceIdentifier id) - { - Argument.AssertNotNull(client, nameof(client)); - - return GetMockableApplicationInsightsArmClient(client).GetMyWorkbookResource(id); - } - /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. @@ -456,83 +437,6 @@ public static Response GetWorkbookTemplate(this Resour return GetMockableApplicationInsightsResourceGroupResource(resourceGroupResource).GetWorkbookTemplate(resourceName, cancellationToken); } - /// - /// Gets a collection of MyWorkbookResources in the ResourceGroupResource. - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// is null. - /// An object representing collection of MyWorkbookResources and their operations over a MyWorkbookResource. - public static MyWorkbookCollection GetMyWorkbooks(this ResourceGroupResource resourceGroupResource) - { - Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - - return GetMockableApplicationInsightsResourceGroupResource(resourceGroupResource).GetMyWorkbooks(); - } - - /// - /// Get a single private workbook by its resourceName. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName} - /// - /// - /// Operation Id - /// MyWorkbooks_Get - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The name of the Application Insights component resource. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public static async Task> GetMyWorkbookAsync(this ResourceGroupResource resourceGroupResource, string resourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - - return await GetMockableApplicationInsightsResourceGroupResource(resourceGroupResource).GetMyWorkbookAsync(resourceName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get a single private workbook by its resourceName. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName} - /// - /// - /// Operation Id - /// MyWorkbooks_Get - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// The name of the Application Insights component resource. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public static Response GetMyWorkbook(this ResourceGroupResource resourceGroupResource, string resourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(resourceGroupResource, nameof(resourceGroupResource)); - - return GetMockableApplicationInsightsResourceGroupResource(resourceGroupResource).GetMyWorkbook(resourceName, cancellationToken); - } - /// /// Gets a collection of WorkbookResources in the ResourceGroupResource. /// @@ -568,7 +472,7 @@ public static WorkbookCollection GetWorkbooks(this ResourceGroupResource resourc /// /// /// The instance the method will execute against. - /// The name of the resource. + /// The name of the workbook resource. The value must be an UUID. /// Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks. /// The cancellation token to use. /// or is null. @@ -599,7 +503,7 @@ public static async Task> GetWorkbookAsync(this Resou /// /// /// The instance the method will execute against. - /// The name of the resource. + /// The name of the workbook resource. The value must be an UUID. /// Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks. /// The cancellation token to use. /// or is null. @@ -724,68 +628,6 @@ public static Pageable GetWebTests(this SubscriptionResource su return GetMockableApplicationInsightsSubscriptionResource(subscriptionResource).GetWebTests(cancellationToken); } - /// - /// Get all private workbooks defined within a specified subscription and category. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Insights/myWorkbooks - /// - /// - /// Operation Id - /// MyWorkbooks_ListBySubscription - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// Category of workbook to return. - /// Tags presents on each workbook returned. - /// Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks. - /// The cancellation token to use. - /// is null. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetMyWorkbooksAsync(this SubscriptionResource subscriptionResource, CategoryType category, IEnumerable tags = null, bool? canFetchContent = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - - return GetMockableApplicationInsightsSubscriptionResource(subscriptionResource).GetMyWorkbooksAsync(category, tags, canFetchContent, cancellationToken); - } - - /// - /// Get all private workbooks defined within a specified subscription and category. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Insights/myWorkbooks - /// - /// - /// Operation Id - /// MyWorkbooks_ListBySubscription - /// - /// - /// - /// Mocking - /// To mock this method, please mock instead. - /// - /// - /// The instance the method will execute against. - /// Category of workbook to return. - /// Tags presents on each workbook returned. - /// Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks. - /// The cancellation token to use. - /// is null. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetMyWorkbooks(this SubscriptionResource subscriptionResource, CategoryType category, IEnumerable tags = null, bool? canFetchContent = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(subscriptionResource, nameof(subscriptionResource)); - - return GetMockableApplicationInsightsSubscriptionResource(subscriptionResource).GetMyWorkbooks(category, tags, canFetchContent, cancellationToken); - } - /// /// Get all Workbooks defined within a specified subscription and category. /// diff --git a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Extensions/MockableApplicationInsightsArmClient.cs b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Extensions/MockableApplicationInsightsArmClient.cs index 714e2d015c627..0e72f02853599 100644 --- a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Extensions/MockableApplicationInsightsArmClient.cs +++ b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Extensions/MockableApplicationInsightsArmClient.cs @@ -151,18 +151,6 @@ public virtual WorkbookTemplateResource GetWorkbookTemplateResource(ResourceIden return new WorkbookTemplateResource(Client, id); } - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The resource ID of the resource to get. - /// Returns a object. - public virtual MyWorkbookResource GetMyWorkbookResource(ResourceIdentifier id) - { - MyWorkbookResource.ValidateResourceId(id); - return new MyWorkbookResource(Client, id); - } - /// /// Gets an object representing a along with the instance operations that can be performed on it but with no data. /// You can use to create a from its components. diff --git a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Extensions/MockableApplicationInsightsResourceGroupResource.cs b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Extensions/MockableApplicationInsightsResourceGroupResource.cs index 07a98a3f058c3..64f30b3f7dbd6 100644 --- a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Extensions/MockableApplicationInsightsResourceGroupResource.cs +++ b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Extensions/MockableApplicationInsightsResourceGroupResource.cs @@ -195,59 +195,6 @@ public virtual Response GetWorkbookTemplate(string res return GetWorkbookTemplates().Get(resourceName, cancellationToken); } - /// Gets a collection of MyWorkbookResources in the ResourceGroupResource. - /// An object representing collection of MyWorkbookResources and their operations over a MyWorkbookResource. - public virtual MyWorkbookCollection GetMyWorkbooks() - { - return GetCachedClient(client => new MyWorkbookCollection(client, Id)); - } - - /// - /// Get a single private workbook by its resourceName. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName} - /// - /// - /// Operation Id - /// MyWorkbooks_Get - /// - /// - /// - /// The name of the Application Insights component resource. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual async Task> GetMyWorkbookAsync(string resourceName, CancellationToken cancellationToken = default) - { - return await GetMyWorkbooks().GetAsync(resourceName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get a single private workbook by its resourceName. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName} - /// - /// - /// Operation Id - /// MyWorkbooks_Get - /// - /// - /// - /// The name of the Application Insights component resource. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - [ForwardsClientCalls] - public virtual Response GetMyWorkbook(string resourceName, CancellationToken cancellationToken = default) - { - return GetMyWorkbooks().Get(resourceName, cancellationToken); - } - /// Gets a collection of WorkbookResources in the ResourceGroupResource. /// An object representing collection of WorkbookResources and their operations over a WorkbookResource. public virtual WorkbookCollection GetWorkbooks() @@ -268,7 +215,7 @@ public virtual WorkbookCollection GetWorkbooks() /// /// /// - /// The name of the resource. + /// The name of the workbook resource. The value must be an UUID. /// Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks. /// The cancellation token to use. /// is null. @@ -292,7 +239,7 @@ public virtual async Task> GetWorkbookAsync(string re /// /// /// - /// The name of the resource. + /// The name of the workbook resource. The value must be an UUID. /// Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks. /// The cancellation token to use. /// is null. diff --git a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Extensions/MockableApplicationInsightsSubscriptionResource.cs b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Extensions/MockableApplicationInsightsSubscriptionResource.cs index 75c3e1c401fc3..02e1ff963d37f 100644 --- a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Extensions/MockableApplicationInsightsSubscriptionResource.cs +++ b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Extensions/MockableApplicationInsightsSubscriptionResource.cs @@ -24,8 +24,6 @@ public partial class MockableApplicationInsightsSubscriptionResource : ArmResour private ComponentsRestOperations _applicationInsightsComponentComponentsRestClient; private ClientDiagnostics _webTestClientDiagnostics; private WebTestsRestOperations _webTestRestClient; - private ClientDiagnostics _myWorkbookClientDiagnostics; - private MyWorkbooksRestOperations _myWorkbookRestClient; private ClientDiagnostics _workbookClientDiagnostics; private WorkbooksRestOperations _workbookRestClient; @@ -45,8 +43,6 @@ internal MockableApplicationInsightsSubscriptionResource(ArmClient client, Resou private ComponentsRestOperations ApplicationInsightsComponentComponentsRestClient => _applicationInsightsComponentComponentsRestClient ??= new ComponentsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(ApplicationInsightsComponentResource.ResourceType)); private ClientDiagnostics WebTestClientDiagnostics => _webTestClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ApplicationInsights", WebTestResource.ResourceType.Namespace, Diagnostics); private WebTestsRestOperations WebTestRestClient => _webTestRestClient ??= new WebTestsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(WebTestResource.ResourceType)); - private ClientDiagnostics MyWorkbookClientDiagnostics => _myWorkbookClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ApplicationInsights", MyWorkbookResource.ResourceType.Namespace, Diagnostics); - private MyWorkbooksRestOperations MyWorkbookRestClient => _myWorkbookRestClient ??= new MyWorkbooksRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(MyWorkbookResource.ResourceType)); private ClientDiagnostics WorkbookClientDiagnostics => _workbookClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.ApplicationInsights", WorkbookResource.ResourceType.Namespace, Diagnostics); private WorkbooksRestOperations WorkbookRestClient => _workbookRestClient ??= new WorkbooksRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(WorkbookResource.ResourceType)); @@ -144,56 +140,6 @@ public virtual Pageable GetWebTests(CancellationToken cancellat return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new WebTestResource(Client, WebTestData.DeserializeWebTestData(e)), WebTestClientDiagnostics, Pipeline, "MockableApplicationInsightsSubscriptionResource.GetWebTests", "value", "nextLink", cancellationToken); } - /// - /// Get all private workbooks defined within a specified subscription and category. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Insights/myWorkbooks - /// - /// - /// Operation Id - /// MyWorkbooks_ListBySubscription - /// - /// - /// - /// Category of workbook to return. - /// Tags presents on each workbook returned. - /// Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks. - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetMyWorkbooksAsync(CategoryType category, IEnumerable tags = null, bool? canFetchContent = null, CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => MyWorkbookRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, category, tags, canFetchContent); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => MyWorkbookRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, category, tags, canFetchContent); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new MyWorkbookResource(Client, MyWorkbookData.DeserializeMyWorkbookData(e)), MyWorkbookClientDiagnostics, Pipeline, "MockableApplicationInsightsSubscriptionResource.GetMyWorkbooks", "value", "nextLink", cancellationToken); - } - - /// - /// Get all private workbooks defined within a specified subscription and category. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/providers/Microsoft.Insights/myWorkbooks - /// - /// - /// Operation Id - /// MyWorkbooks_ListBySubscription - /// - /// - /// - /// Category of workbook to return. - /// Tags presents on each workbook returned. - /// Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetMyWorkbooks(CategoryType category, IEnumerable tags = null, bool? canFetchContent = null, CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => MyWorkbookRestClient.CreateListBySubscriptionRequest(Id.SubscriptionId, category, tags, canFetchContent); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => MyWorkbookRestClient.CreateListBySubscriptionNextPageRequest(nextLink, Id.SubscriptionId, category, tags, canFetchContent); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MyWorkbookResource(Client, MyWorkbookData.DeserializeMyWorkbookData(e)), MyWorkbookClientDiagnostics, Pipeline, "MockableApplicationInsightsSubscriptionResource.GetMyWorkbooks", "value", "nextLink", cancellationToken); - } - /// /// Get all Workbooks defined within a specified subscription and category. /// diff --git a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Models/ApplicationInsightsKind.cs b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Models/ApplicationInsightsKind.cs deleted file mode 100644 index ae7a4964d16ab..0000000000000 --- a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Models/ApplicationInsightsKind.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.ApplicationInsights.Models -{ - /// The kind of workbook. Choices are user and shared. - public readonly partial struct ApplicationInsightsKind : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public ApplicationInsightsKind(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string UserValue = "user"; - private const string SharedValue = "shared"; - - /// user. - public static ApplicationInsightsKind User { get; } = new ApplicationInsightsKind(UserValue); - /// shared. - public static ApplicationInsightsKind Shared { get; } = new ApplicationInsightsKind(SharedValue); - /// Determines if two values are the same. - public static bool operator ==(ApplicationInsightsKind left, ApplicationInsightsKind right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(ApplicationInsightsKind left, ApplicationInsightsKind right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator ApplicationInsightsKind(string value) => new ApplicationInsightsKind(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is ApplicationInsightsKind other && Equals(other); - /// - public bool Equals(ApplicationInsightsKind 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/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Models/MyWorkbookData.Serialization.cs b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Models/MyWorkbookData.Serialization.cs deleted file mode 100644 index 38297af894e0e..0000000000000 --- a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Models/MyWorkbookData.Serialization.cs +++ /dev/null @@ -1,294 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.ApplicationInsights.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.ApplicationInsights -{ - public partial class MyWorkbookData : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Kind)) - { - writer.WritePropertyName("kind"u8); - writer.WriteStringValue(Kind.Value.ToString()); - } - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - writer.WriteObjectValue(Identity); - } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStartObject(); - foreach (var item in ETag) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WritePropertyName("properties"u8); - writer.WriteStartObject(); - if (Optional.IsDefined(DisplayName)) - { - writer.WritePropertyName("displayName"u8); - writer.WriteStringValue(DisplayName); - } - if (Optional.IsDefined(SerializedData)) - { - if (SerializedData != null) - { - writer.WritePropertyName("serializedData"u8); - writer.WriteStringValue(SerializedData); - } - else - { - writer.WriteNull("serializedData"); - } - } - if (Optional.IsDefined(Version)) - { - writer.WritePropertyName("version"u8); - writer.WriteStringValue(Version); - } - if (Optional.IsDefined(Category)) - { - writer.WritePropertyName("category"u8); - writer.WriteStringValue(Category); - } - if (Optional.IsDefined(SourceId)) - { - writer.WritePropertyName("sourceId"u8); - writer.WriteStringValue(SourceId); - } - if (Optional.IsDefined(StorageUri)) - { - if (StorageUri != null) - { - writer.WritePropertyName("storageUri"u8); - writer.WriteStringValue(StorageUri.AbsoluteUri); - } - else - { - writer.WriteNull("storageUri"); - } - } - writer.WriteEndObject(); - writer.WriteEndObject(); - } - - internal static MyWorkbookData DeserializeMyWorkbookData(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional kind = default; - Optional systemData = default; - Optional identity = default; - Optional id = default; - Optional name = default; - Optional type = default; - Optional location = default; - Optional> tags = default; - Optional> etag = default; - Optional displayName = default; - Optional serializedData = default; - Optional version = default; - Optional timeModified = default; - Optional category = default; - Optional userId = default; - Optional sourceId = default; - Optional storageUri = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("kind"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - kind = new ApplicationInsightsKind(property.Value.GetString()); - continue; - } - if (property.NameEquals("systemData"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - systemData = JsonSerializer.Deserialize(property.Value.GetRawText()); - continue; - } - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - identity = MyWorkbookManagedIdentity.DeserializeMyWorkbookManagedIdentity(property.Value); - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("location"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - location = new AzureLocation(property.Value.GetString()); - continue; - } - if (property.NameEquals("tags"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (property.NameEquals("etag"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - etag = dictionary; - continue; - } - if (property.NameEquals("properties"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - foreach (var property0 in property.Value.EnumerateObject()) - { - if (property0.NameEquals("displayName"u8)) - { - displayName = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("serializedData"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - serializedData = null; - continue; - } - serializedData = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("version"u8)) - { - version = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("timeModified"u8)) - { - timeModified = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("category"u8)) - { - category = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("userId"u8)) - { - userId = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("sourceId"u8)) - { - sourceId = property0.Value.GetString(); - continue; - } - if (property0.NameEquals("storageUri"u8)) - { - if (property0.Value.ValueKind == JsonValueKind.Null) - { - storageUri = null; - continue; - } - storageUri = new Uri(property0.Value.GetString()); - continue; - } - } - continue; - } - } - return new MyWorkbookData(identity.Value, id.Value, name.Value, type.Value, Optional.ToNullable(location), Optional.ToDictionary(tags), Optional.ToDictionary(etag), Optional.ToNullable(kind), systemData, displayName.Value, serializedData.Value, version.Value, timeModified.Value, category.Value, userId.Value, sourceId.Value, storageUri.Value); - } - } -} diff --git a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Models/MyWorkbookManagedIdentity.Serialization.cs b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Models/MyWorkbookManagedIdentity.Serialization.cs deleted file mode 100644 index ffedb679fd38d..0000000000000 --- a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Models/MyWorkbookManagedIdentity.Serialization.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.ApplicationInsights.Models -{ - public partial class MyWorkbookManagedIdentity : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(UserAssignedIdentities)) - { - writer.WritePropertyName("userAssignedIdentities"u8); - writer.WriteObjectValue(UserAssignedIdentities); - } - if (Optional.IsDefined(IdentityType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(IdentityType.Value.ToString()); - } - writer.WriteEndObject(); - } - - internal static MyWorkbookManagedIdentity DeserializeMyWorkbookManagedIdentity(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional userAssignedIdentities = default; - Optional type = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("userAssignedIdentities"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - userAssignedIdentities = MyWorkbookUserAssignedIdentities.DeserializeMyWorkbookUserAssignedIdentities(property.Value); - continue; - } - if (property.NameEquals("type"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - type = new MyWorkbookManagedIdentityType(property.Value.GetString()); - continue; - } - } - return new MyWorkbookManagedIdentity(userAssignedIdentities.Value, Optional.ToNullable(type)); - } - } -} diff --git a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Models/MyWorkbookManagedIdentity.cs b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Models/MyWorkbookManagedIdentity.cs deleted file mode 100644 index 0afee8b604e35..0000000000000 --- a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Models/MyWorkbookManagedIdentity.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.ApplicationInsights.Models -{ - /// Customer Managed Identity. - public partial class MyWorkbookManagedIdentity - { - /// Initializes a new instance of . - public MyWorkbookManagedIdentity() - { - } - - /// Initializes a new instance of . - /// Customer Managed Identity. - /// The identity type. - internal MyWorkbookManagedIdentity(MyWorkbookUserAssignedIdentities userAssignedIdentities, MyWorkbookManagedIdentityType? identityType) - { - UserAssignedIdentities = userAssignedIdentities; - IdentityType = identityType; - } - - /// Customer Managed Identity. - public MyWorkbookUserAssignedIdentities UserAssignedIdentities { get; set; } - /// The identity type. - public MyWorkbookManagedIdentityType? IdentityType { get; set; } - } -} diff --git a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Models/MyWorkbookManagedIdentityType.cs b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Models/MyWorkbookManagedIdentityType.cs deleted file mode 100644 index c5718a538e8ef..0000000000000 --- a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Models/MyWorkbookManagedIdentityType.cs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.ApplicationInsights.Models -{ - /// The identity type. - public readonly partial struct MyWorkbookManagedIdentityType : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public MyWorkbookManagedIdentityType(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string UserAssignedValue = "UserAssigned"; - private const string NoneValue = "None"; - - /// UserAssigned. - public static MyWorkbookManagedIdentityType UserAssigned { get; } = new MyWorkbookManagedIdentityType(UserAssignedValue); - /// None. - public static MyWorkbookManagedIdentityType None { get; } = new MyWorkbookManagedIdentityType(NoneValue); - /// Determines if two values are the same. - public static bool operator ==(MyWorkbookManagedIdentityType left, MyWorkbookManagedIdentityType right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(MyWorkbookManagedIdentityType left, MyWorkbookManagedIdentityType right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator MyWorkbookManagedIdentityType(string value) => new MyWorkbookManagedIdentityType(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is MyWorkbookManagedIdentityType other && Equals(other); - /// - public bool Equals(MyWorkbookManagedIdentityType 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/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Models/MyWorkbookResourceContent.Serialization.cs b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Models/MyWorkbookResourceContent.Serialization.cs deleted file mode 100644 index e592aff9a1ed6..0000000000000 --- a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Models/MyWorkbookResourceContent.Serialization.cs +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.ApplicationInsights.Models -{ - public partial class MyWorkbookResourceContent : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - if (Optional.IsDefined(Identity)) - { - writer.WritePropertyName("identity"u8); - writer.WriteObjectValue(Identity); - } - if (Optional.IsDefined(Id)) - { - writer.WritePropertyName("id"u8); - writer.WriteStringValue(Id); - } - if (Optional.IsDefined(Name)) - { - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); - } - if (Optional.IsDefined(ResourceType)) - { - writer.WritePropertyName("type"u8); - writer.WriteStringValue(ResourceType); - } - if (Optional.IsDefined(Location)) - { - writer.WritePropertyName("location"u8); - writer.WriteStringValue(Location.Value); - } - if (Optional.IsCollectionDefined(Tags)) - { - writer.WritePropertyName("tags"u8); - writer.WriteStartObject(); - foreach (var item in Tags) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - if (Optional.IsCollectionDefined(ETag)) - { - writer.WritePropertyName("etag"u8); - writer.WriteStartObject(); - foreach (var item in ETag) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - writer.WriteEndObject(); - } - - internal static MyWorkbookResourceContent DeserializeMyWorkbookResourceContent(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional identity = default; - Optional id = default; - Optional name = default; - Optional type = default; - Optional location = default; - Optional> tags = default; - Optional> etag = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("identity"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - identity = MyWorkbookManagedIdentity.DeserializeMyWorkbookManagedIdentity(property.Value); - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (property.NameEquals("name"u8)) - { - name = property.Value.GetString(); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("location"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - location = new AzureLocation(property.Value.GetString()); - continue; - } - if (property.NameEquals("tags"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - tags = dictionary; - continue; - } - if (property.NameEquals("etag"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - etag = dictionary; - continue; - } - } - return new MyWorkbookResourceContent(identity.Value, id.Value, name.Value, type.Value, Optional.ToNullable(location), Optional.ToDictionary(tags), Optional.ToDictionary(etag)); - } - } -} diff --git a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Models/MyWorkbookResourceContent.cs b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Models/MyWorkbookResourceContent.cs deleted file mode 100644 index 943f83c762457..0000000000000 --- a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Models/MyWorkbookResourceContent.cs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; - -namespace Azure.ResourceManager.ApplicationInsights.Models -{ - /// An azure resource object. - public partial class MyWorkbookResourceContent - { - /// Initializes a new instance of . - public MyWorkbookResourceContent() - { - Tags = new ChangeTrackingDictionary(); - ETag = new ChangeTrackingDictionary(); - } - - /// Initializes a new instance of . - /// Identity used for BYOS. - /// Azure resource Id. - /// Azure resource name. - /// Azure resource type. - /// Resource location. - /// Resource tags. - /// Resource etag. - internal MyWorkbookResourceContent(MyWorkbookManagedIdentity identity, string id, string name, string resourceType, AzureLocation? location, IDictionary tags, IDictionary etag) - { - Identity = identity; - Id = id; - Name = name; - ResourceType = resourceType; - Location = location; - Tags = tags; - ETag = etag; - } - - /// Identity used for BYOS. - public MyWorkbookManagedIdentity Identity { get; set; } - /// Azure resource Id. - public string Id { get; set; } - /// Azure resource name. - public string Name { get; set; } - /// Azure resource type. - public string ResourceType { get; set; } - /// Resource location. - public AzureLocation? Location { get; set; } - /// Resource tags. - public IDictionary Tags { get; } - /// Resource etag. - public IDictionary ETag { get; } - } -} diff --git a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Models/MyWorkbookUserAssignedIdentities.Serialization.cs b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Models/MyWorkbookUserAssignedIdentities.Serialization.cs deleted file mode 100644 index f6641cd38c538..0000000000000 --- a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Models/MyWorkbookUserAssignedIdentities.Serialization.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.ApplicationInsights.Models -{ - public partial class MyWorkbookUserAssignedIdentities : IUtf8JsonSerializable - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) - { - writer.WriteStartObject(); - writer.WriteEndObject(); - } - - internal static MyWorkbookUserAssignedIdentities DeserializeMyWorkbookUserAssignedIdentities(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional principalId = default; - Optional tenantId = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("principalId"u8)) - { - principalId = property.Value.GetString(); - continue; - } - if (property.NameEquals("tenantId"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - tenantId = property.Value.GetGuid(); - continue; - } - } - return new MyWorkbookUserAssignedIdentities(principalId.Value, Optional.ToNullable(tenantId)); - } - } -} diff --git a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Models/MyWorkbookUserAssignedIdentities.cs b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Models/MyWorkbookUserAssignedIdentities.cs deleted file mode 100644 index e1f25618182a5..0000000000000 --- a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Models/MyWorkbookUserAssignedIdentities.cs +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.ApplicationInsights.Models -{ - /// Customer Managed Identity. - public partial class MyWorkbookUserAssignedIdentities - { - /// Initializes a new instance of . - public MyWorkbookUserAssignedIdentities() - { - } - - /// Initializes a new instance of . - /// The principal ID of resource identity. - /// The tenant ID of resource. - internal MyWorkbookUserAssignedIdentities(string principalId, Guid? tenantId) - { - PrincipalId = principalId; - TenantId = tenantId; - } - - /// The principal ID of resource identity. - public string PrincipalId { get; } - /// The tenant ID of resource. - public Guid? TenantId { get; } - } -} diff --git a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Models/MyWorkbooksListResult.Serialization.cs b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Models/MyWorkbooksListResult.Serialization.cs deleted file mode 100644 index c7ebec13dc1ac..0000000000000 --- a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Models/MyWorkbooksListResult.Serialization.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; -using Azure.ResourceManager.ApplicationInsights; - -namespace Azure.ResourceManager.ApplicationInsights.Models -{ - internal partial class MyWorkbooksListResult - { - internal static MyWorkbooksListResult DeserializeMyWorkbooksListResult(JsonElement element) - { - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - Optional> value = default; - Optional nextLink = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("value"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(MyWorkbookData.DeserializeMyWorkbookData(item)); - } - value = array; - continue; - } - if (property.NameEquals("nextLink"u8)) - { - nextLink = property.Value.GetString(); - continue; - } - } - return new MyWorkbooksListResult(Optional.ToList(value), nextLink.Value); - } - } -} diff --git a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Models/MyWorkbooksListResult.cs b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Models/MyWorkbooksListResult.cs deleted file mode 100644 index 7c8de459242b9..0000000000000 --- a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/Models/MyWorkbooksListResult.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.ApplicationInsights; - -namespace Azure.ResourceManager.ApplicationInsights.Models -{ - /// Workbook list result. - internal partial class MyWorkbooksListResult - { - /// Initializes a new instance of . - internal MyWorkbooksListResult() - { - Value = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// An array of private workbooks. - /// - internal MyWorkbooksListResult(IReadOnlyList value, string nextLink) - { - Value = value; - NextLink = nextLink; - } - - /// An array of private workbooks. - public IReadOnlyList Value { get; } - /// Gets the next link. - public string NextLink { get; } - } -} diff --git a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/MyWorkbookCollection.cs b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/MyWorkbookCollection.cs deleted file mode 100644 index e76843741902c..0000000000000 --- a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/MyWorkbookCollection.cs +++ /dev/null @@ -1,411 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Autorest.CSharp.Core; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -using Azure.ResourceManager.ApplicationInsights.Models; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.ApplicationInsights -{ - /// - /// A class representing a collection of and their operations. - /// Each in the collection will belong to the same instance of . - /// To get a instance call the GetMyWorkbooks method from an instance of . - /// - public partial class MyWorkbookCollection : ArmCollection - { - private readonly ClientDiagnostics _myWorkbookClientDiagnostics; - private readonly MyWorkbooksRestOperations _myWorkbookRestClient; - - /// Initializes a new instance of the class for mocking. - protected MyWorkbookCollection() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the parent resource that is the target of operations. - internal MyWorkbookCollection(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _myWorkbookClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApplicationInsights", MyWorkbookResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(MyWorkbookResource.ResourceType, out string myWorkbookApiVersion); - _myWorkbookRestClient = new MyWorkbooksRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, myWorkbookApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceGroupResource.ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceGroupResource.ResourceType), nameof(id)); - } - - /// - /// Create a new private workbook. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName} - /// - /// - /// Operation Id - /// MyWorkbooks_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the Application Insights component resource. - /// Properties that need to be specified to create a new private workbook. - /// Azure Resource Id that will fetch all linked workbooks. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string resourceName, MyWorkbookData data, string sourceId = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _myWorkbookClientDiagnostics.CreateScope("MyWorkbookCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = await _myWorkbookRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, resourceName, data, sourceId, cancellationToken).ConfigureAwait(false); - var operation = new ApplicationInsightsArmOperation(Response.FromValue(new MyWorkbookResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Create a new private workbook. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName} - /// - /// - /// Operation Id - /// MyWorkbooks_CreateOrUpdate - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the Application Insights component resource. - /// Properties that need to be specified to create a new private workbook. - /// Azure Resource Id that will fetch all linked workbooks. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string resourceName, MyWorkbookData data, string sourceId = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _myWorkbookClientDiagnostics.CreateScope("MyWorkbookCollection.CreateOrUpdate"); - scope.Start(); - try - { - var response = _myWorkbookRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, resourceName, data, sourceId, cancellationToken); - var operation = new ApplicationInsightsArmOperation(Response.FromValue(new MyWorkbookResource(Client, response), response.GetRawResponse())); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletion(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get a single private workbook by its resourceName. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName} - /// - /// - /// Operation Id - /// MyWorkbooks_Get - /// - /// - /// - /// The name of the Application Insights component resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetAsync(string resourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - - using var scope = _myWorkbookClientDiagnostics.CreateScope("MyWorkbookCollection.Get"); - scope.Start(); - try - { - var response = await _myWorkbookRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, resourceName, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new MyWorkbookResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get a single private workbook by its resourceName. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName} - /// - /// - /// Operation Id - /// MyWorkbooks_Get - /// - /// - /// - /// The name of the Application Insights component resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Get(string resourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - - using var scope = _myWorkbookClientDiagnostics.CreateScope("MyWorkbookCollection.Get"); - scope.Start(); - try - { - var response = _myWorkbookRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, resourceName, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new MyWorkbookResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get all private workbooks defined within a specified resource group and category. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks - /// - /// - /// Operation Id - /// MyWorkbooks_ListByResourceGroup - /// - /// - /// - /// Category of workbook to return. - /// Tags presents on each workbook returned. - /// Azure Resource Id that will fetch all linked workbooks. - /// Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks. - /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CategoryType category, IEnumerable tags = null, string sourceId = null, bool? canFetchContent = null, CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _myWorkbookRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, category, tags, sourceId, canFetchContent); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _myWorkbookRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, category, tags, sourceId, canFetchContent); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => new MyWorkbookResource(Client, MyWorkbookData.DeserializeMyWorkbookData(e)), _myWorkbookClientDiagnostics, Pipeline, "MyWorkbookCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Get all private workbooks defined within a specified resource group and category. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks - /// - /// - /// Operation Id - /// MyWorkbooks_ListByResourceGroup - /// - /// - /// - /// Category of workbook to return. - /// Tags presents on each workbook returned. - /// Azure Resource Id that will fetch all linked workbooks. - /// Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks. - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CategoryType category, IEnumerable tags = null, string sourceId = null, bool? canFetchContent = null, CancellationToken cancellationToken = default) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => _myWorkbookRestClient.CreateListByResourceGroupRequest(Id.SubscriptionId, Id.ResourceGroupName, category, tags, sourceId, canFetchContent); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => _myWorkbookRestClient.CreateListByResourceGroupNextPageRequest(nextLink, Id.SubscriptionId, Id.ResourceGroupName, category, tags, sourceId, canFetchContent); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => new MyWorkbookResource(Client, MyWorkbookData.DeserializeMyWorkbookData(e)), _myWorkbookClientDiagnostics, Pipeline, "MyWorkbookCollection.GetAll", "value", "nextLink", cancellationToken); - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName} - /// - /// - /// Operation Id - /// MyWorkbooks_Get - /// - /// - /// - /// The name of the Application Insights component resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> ExistsAsync(string resourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - - using var scope = _myWorkbookClientDiagnostics.CreateScope("MyWorkbookCollection.Exists"); - scope.Start(); - try - { - var response = await _myWorkbookRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, resourceName, cancellationToken: cancellationToken).ConfigureAwait(false); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Checks to see if the resource exists in azure. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName} - /// - /// - /// Operation Id - /// MyWorkbooks_Get - /// - /// - /// - /// The name of the Application Insights component resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual Response Exists(string resourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - - using var scope = _myWorkbookClientDiagnostics.CreateScope("MyWorkbookCollection.Exists"); - scope.Start(); - try - { - var response = _myWorkbookRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, resourceName, cancellationToken: cancellationToken); - return Response.FromValue(response.Value != null, response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName} - /// - /// - /// Operation Id - /// MyWorkbooks_Get - /// - /// - /// - /// The name of the Application Insights component resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual async Task> GetIfExistsAsync(string resourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - - using var scope = _myWorkbookClientDiagnostics.CreateScope("MyWorkbookCollection.GetIfExists"); - scope.Start(); - try - { - var response = await _myWorkbookRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, resourceName, cancellationToken: cancellationToken).ConfigureAwait(false); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new MyWorkbookResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Tries to get details for this resource from the service. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName} - /// - /// - /// Operation Id - /// MyWorkbooks_Get - /// - /// - /// - /// The name of the Application Insights component resource. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - public virtual NullableResponse GetIfExists(string resourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - - using var scope = _myWorkbookClientDiagnostics.CreateScope("MyWorkbookCollection.GetIfExists"); - scope.Start(); - try - { - var response = _myWorkbookRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, resourceName, cancellationToken: cancellationToken); - if (response.Value == null) - return new NoValueResponse(response.GetRawResponse()); - return Response.FromValue(new MyWorkbookResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/MyWorkbookData.cs b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/MyWorkbookData.cs deleted file mode 100644 index 954b8fe9d32be..0000000000000 --- a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/MyWorkbookData.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using Azure.Core; -using Azure.ResourceManager.ApplicationInsights.Models; -using Azure.ResourceManager.Models; - -namespace Azure.ResourceManager.ApplicationInsights -{ - /// - /// A class representing the MyWorkbook data model. - /// An Application Insights private workbook definition. - /// - public partial class MyWorkbookData : MyWorkbookResourceContent - { - /// Initializes a new instance of . - public MyWorkbookData() - { - } - - /// Initializes a new instance of . - /// Identity used for BYOS. - /// Azure resource Id. - /// Azure resource name. - /// Azure resource type. - /// Resource location. - /// Resource tags. - /// Resource etag. - /// The kind of workbook. Choices are user and shared. - /// Metadata pertaining to creation and last modification of the resource. - /// The user-defined name of the private workbook. - /// Configuration of this particular private workbook. Configuration data is a string containing valid JSON. - /// This instance's version of the data model. This can change as new features are added that can be marked private workbook. - /// Date and time in UTC of the last modification that was made to this private workbook definition. - /// Workbook category, as defined by the user at creation time. - /// Unique user id of the specific user that owns this private workbook. - /// Optional resourceId for a source resource. - /// BYOS Storage Account URI. - internal MyWorkbookData(MyWorkbookManagedIdentity identity, string id, string name, string resourceType, AzureLocation? location, IDictionary tags, IDictionary etag, ApplicationInsightsKind? kind, SystemData systemData, string displayName, string serializedData, string version, string timeModified, string category, string userId, string sourceId, Uri storageUri) : base(identity, id, name, resourceType, location, tags, etag) - { - Kind = kind; - SystemData = systemData; - DisplayName = displayName; - SerializedData = serializedData; - Version = version; - TimeModified = timeModified; - Category = category; - UserId = userId; - SourceId = sourceId; - StorageUri = storageUri; - } - - /// The kind of workbook. Choices are user and shared. - public ApplicationInsightsKind? Kind { get; set; } - /// Metadata pertaining to creation and last modification of the resource. - public SystemData SystemData { get; } - /// The user-defined name of the private workbook. - public string DisplayName { get; set; } - /// Configuration of this particular private workbook. Configuration data is a string containing valid JSON. - public string SerializedData { get; set; } - /// This instance's version of the data model. This can change as new features are added that can be marked private workbook. - public string Version { get; set; } - /// Date and time in UTC of the last modification that was made to this private workbook definition. - public string TimeModified { get; } - /// Workbook category, as defined by the user at creation time. - public string Category { get; set; } - /// Unique user id of the specific user that owns this private workbook. - public string UserId { get; } - /// Optional resourceId for a source resource. - public string SourceId { get; set; } - /// BYOS Storage Account URI. - public Uri StorageUri { get; set; } - } -} diff --git a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/MyWorkbookResource.cs b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/MyWorkbookResource.cs deleted file mode 100644 index 69ec887be3aae..0000000000000 --- a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/MyWorkbookResource.cs +++ /dev/null @@ -1,606 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.ApplicationInsights -{ - /// - /// A Class representing a MyWorkbook along with the instance operations that can be performed on it. - /// If you have a you can construct a - /// from an instance of using the GetMyWorkbookResource method. - /// Otherwise you can get one from its parent resource using the GetMyWorkbook method. - /// - public partial class MyWorkbookResource : ArmResource - { - /// Generate the resource identifier of a instance. - /// The subscriptionId. - /// The resourceGroupName. - /// The resourceName. - public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string resourceName) - { - var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName}"; - return new ResourceIdentifier(resourceId); - } - - private readonly ClientDiagnostics _myWorkbookClientDiagnostics; - private readonly MyWorkbooksRestOperations _myWorkbookRestClient; - private readonly MyWorkbookData _data; - - /// Gets the resource type for the operations. - public static readonly ResourceType ResourceType = "Microsoft.Insights/myWorkbooks"; - - /// Initializes a new instance of the class for mocking. - protected MyWorkbookResource() - { - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The resource that is the target of operations. - internal MyWorkbookResource(ArmClient client, MyWorkbookData data) : this(client, new ResourceIdentifier(data.Id)) - { - HasData = true; - _data = data; - } - - /// Initializes a new instance of the class. - /// The client parameters to use in these operations. - /// The identifier of the resource that is the target of operations. - internal MyWorkbookResource(ArmClient client, ResourceIdentifier id) : base(client, id) - { - _myWorkbookClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.ApplicationInsights", ResourceType.Namespace, Diagnostics); - TryGetApiVersion(ResourceType, out string myWorkbookApiVersion); - _myWorkbookRestClient = new MyWorkbooksRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, myWorkbookApiVersion); -#if DEBUG - ValidateResourceId(Id); -#endif - } - - /// Gets whether or not the current instance has data. - public virtual bool HasData { get; } - - /// Gets the data representing this Feature. - /// Throws if there is no data loaded in the current instance. - public virtual MyWorkbookData Data - { - get - { - if (!HasData) - throw new InvalidOperationException("The current instance does not have data, you must call Get first."); - return _data; - } - } - - internal static void ValidateResourceId(ResourceIdentifier id) - { - if (id.ResourceType != ResourceType) - throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); - } - - /// - /// Get a single private workbook by its resourceName. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName} - /// - /// - /// Operation Id - /// MyWorkbooks_Get - /// - /// - /// - /// The cancellation token to use. - public virtual async Task> GetAsync(CancellationToken cancellationToken = default) - { - using var scope = _myWorkbookClientDiagnostics.CreateScope("MyWorkbookResource.Get"); - scope.Start(); - try - { - var response = await _myWorkbookRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new MyWorkbookResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Get a single private workbook by its resourceName. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName} - /// - /// - /// Operation Id - /// MyWorkbooks_Get - /// - /// - /// - /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) - { - using var scope = _myWorkbookClientDiagnostics.CreateScope("MyWorkbookResource.Get"); - scope.Start(); - try - { - var response = _myWorkbookRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - if (response.Value == null) - throw new RequestFailedException(response.GetRawResponse()); - return Response.FromValue(new MyWorkbookResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete a private workbook. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName} - /// - /// - /// Operation Id - /// MyWorkbooks_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _myWorkbookClientDiagnostics.CreateScope("MyWorkbookResource.Delete"); - scope.Start(); - try - { - var response = await _myWorkbookRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new ApplicationInsightsArmOperation(response); - if (waitUntil == WaitUntil.Completed) - await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Delete a private workbook. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName} - /// - /// - /// Operation Id - /// MyWorkbooks_Delete - /// - /// - /// - /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The cancellation token to use. - public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) - { - using var scope = _myWorkbookClientDiagnostics.CreateScope("MyWorkbookResource.Delete"); - scope.Start(); - try - { - var response = _myWorkbookRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new ApplicationInsightsArmOperation(response); - if (waitUntil == WaitUntil.Completed) - operation.WaitForCompletionResponse(cancellationToken); - return operation; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Updates a private workbook that has already been added. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName} - /// - /// - /// Operation Id - /// MyWorkbooks_Update - /// - /// - /// - /// Properties that need to be specified to create a new private workbook. - /// Azure Resource Id that will fetch all linked workbooks. - /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(MyWorkbookData data, string sourceId = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _myWorkbookClientDiagnostics.CreateScope("MyWorkbookResource.Update"); - scope.Start(); - try - { - var response = await _myWorkbookRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, data, sourceId, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new MyWorkbookResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Updates a private workbook that has already been added. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName} - /// - /// - /// Operation Id - /// MyWorkbooks_Update - /// - /// - /// - /// Properties that need to be specified to create a new private workbook. - /// Azure Resource Id that will fetch all linked workbooks. - /// The cancellation token to use. - /// is null. - public virtual Response Update(MyWorkbookData data, string sourceId = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(data, nameof(data)); - - using var scope = _myWorkbookClientDiagnostics.CreateScope("MyWorkbookResource.Update"); - scope.Start(); - try - { - var response = _myWorkbookRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, data, sourceId, cancellationToken); - return Response.FromValue(new MyWorkbookResource(Client, response.Value), response.GetRawResponse()); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName} - /// - /// - /// Operation Id - /// MyWorkbooks_Get - /// - /// - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _myWorkbookClientDiagnostics.CreateScope("MyWorkbookResource.AddTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues[key] = value; - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _myWorkbookRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new MyWorkbookResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new MyWorkbookData(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags[key] = value; - var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return result; - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Add a tag to the current resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName} - /// - /// - /// Operation Id - /// MyWorkbooks_Get - /// - /// - /// - /// The key for the tag. - /// The value for the tag. - /// The cancellation token to use. - /// or is null. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - Argument.AssertNotNull(value, nameof(value)); - - using var scope = _myWorkbookClientDiagnostics.CreateScope("MyWorkbookResource.AddTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues[key] = value; - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _myWorkbookRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new MyWorkbookResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new MyWorkbookData(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags[key] = value; - var result = Update(patch, cancellationToken: cancellationToken); - return result; - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName} - /// - /// - /// Operation Id - /// MyWorkbooks_Get - /// - /// - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _myWorkbookClientDiagnostics.CreateScope("MyWorkbookResource.SetTags"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _myWorkbookRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new MyWorkbookResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new MyWorkbookData(); - patch.Tags.ReplaceWith(tags); - var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return result; - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Replace the tags on the resource with the given set. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName} - /// - /// - /// Operation Id - /// MyWorkbooks_Get - /// - /// - /// - /// The set of tags to use as replacement. - /// The cancellation token to use. - /// is null. - public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(tags, nameof(tags)); - - using var scope = _myWorkbookClientDiagnostics.CreateScope("MyWorkbookResource.SetTags"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.ReplaceWith(tags); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _myWorkbookRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new MyWorkbookResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new MyWorkbookData(); - patch.Tags.ReplaceWith(tags); - var result = Update(patch, cancellationToken: cancellationToken); - return result; - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName} - /// - /// - /// Operation Id - /// MyWorkbooks_Get - /// - /// - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _myWorkbookClientDiagnostics.CreateScope("MyWorkbookResource.RemoveTag"); - scope.Start(); - try - { - if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) - { - var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); - originalTags.Value.Data.TagValues.Remove(key); - await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _myWorkbookRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new MyWorkbookResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new MyWorkbookData(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags.Remove(key); - var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); - return result; - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Removes a tag by key from the resource. - /// - /// - /// Request Path - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/myWorkbooks/{resourceName} - /// - /// - /// Operation Id - /// MyWorkbooks_Get - /// - /// - /// - /// The key for the tag. - /// The cancellation token to use. - /// is null. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(key, nameof(key)); - - using var scope = _myWorkbookClientDiagnostics.CreateScope("MyWorkbookResource.RemoveTag"); - scope.Start(); - try - { - if (CanUseTagResource(cancellationToken: cancellationToken)) - { - var originalTags = GetTagResource().Get(cancellationToken); - originalTags.Value.Data.TagValues.Remove(key); - GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _myWorkbookRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new MyWorkbookResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); - } - else - { - var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new MyWorkbookData(); - foreach (var tag in current.Tags) - { - patch.Tags.Add(tag); - } - patch.Tags.Remove(key); - var result = Update(patch, cancellationToken: cancellationToken); - return result; - } - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - } -} diff --git a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/RestOperations/MyWorkbooksRestOperations.cs b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/RestOperations/MyWorkbooksRestOperations.cs deleted file mode 100644 index 946535af9361e..0000000000000 --- a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/RestOperations/MyWorkbooksRestOperations.cs +++ /dev/null @@ -1,709 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager.ApplicationInsights.Models; - -namespace Azure.ResourceManager.ApplicationInsights -{ - internal partial class MyWorkbooksRestOperations - { - private readonly TelemetryDetails _userAgent; - private readonly HttpPipeline _pipeline; - private readonly Uri _endpoint; - private readonly string _apiVersion; - - /// Initializes a new instance of MyWorkbooksRestOperations. - /// 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 MyWorkbooksRestOperations(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 ?? "2021-03-08"; - _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); - } - - internal HttpMessage CreateListByResourceGroupRequest(string subscriptionId, string resourceGroupName, CategoryType category, IEnumerable tags, string sourceId, bool? canFetchContent) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Insights/myWorkbooks", false); - uri.AppendQuery("category", category.ToString(), true); - if (tags != null && Optional.IsCollectionDefined(tags)) - { - uri.AppendQueryDelimited("tags", tags, ",", true); - } - if (sourceId != null) - { - uri.AppendQuery("sourceId", sourceId, true); - } - if (canFetchContent != null) - { - uri.AppendQuery("canFetchContent", canFetchContent.Value, true); - } - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Get all private workbooks defined within a specified resource group and category. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Category of workbook to return. - /// Tags presents on each workbook returned. - /// Azure Resource Id that will fetch all linked workbooks. - /// Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CategoryType category, IEnumerable tags = null, string sourceId = null, bool? canFetchContent = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName, category, tags, sourceId, canFetchContent); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - MyWorkbooksListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = MyWorkbooksListResult.DeserializeMyWorkbooksListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get all private workbooks defined within a specified resource group and category. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Category of workbook to return. - /// Tags presents on each workbook returned. - /// Azure Resource Id that will fetch all linked workbooks. - /// Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks. - /// The cancellation token to use. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CategoryType category, IEnumerable tags = null, string sourceId = null, bool? canFetchContent = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupRequest(subscriptionId, resourceGroupName, category, tags, sourceId, canFetchContent); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - MyWorkbooksListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = MyWorkbooksListResult.DeserializeMyWorkbooksListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListBySubscriptionRequest(string subscriptionId, CategoryType category, IEnumerable tags, bool? canFetchContent) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/providers/Microsoft.Insights/myWorkbooks", false); - uri.AppendQuery("category", category.ToString(), true); - if (tags != null && Optional.IsCollectionDefined(tags)) - { - uri.AppendQueryDelimited("tags", tags, ",", true); - } - if (canFetchContent != null) - { - uri.AppendQuery("canFetchContent", canFetchContent.Value, true); - } - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Get all private workbooks defined within a specified subscription and category. - /// The ID of the target subscription. - /// Category of workbook to return. - /// Tags presents on each workbook returned. - /// Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListBySubscriptionAsync(string subscriptionId, CategoryType category, IEnumerable tags = null, bool? canFetchContent = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListBySubscriptionRequest(subscriptionId, category, tags, canFetchContent); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - MyWorkbooksListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = MyWorkbooksListResult.DeserializeMyWorkbooksListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get all private workbooks defined within a specified subscription and category. - /// The ID of the target subscription. - /// Category of workbook to return. - /// Tags presents on each workbook returned. - /// Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks. - /// The cancellation token to use. - /// is null. - /// is an empty string, and was expected to be non-empty. - public Response ListBySubscription(string subscriptionId, CategoryType category, IEnumerable tags = null, bool? canFetchContent = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListBySubscriptionRequest(subscriptionId, category, tags, canFetchContent); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - MyWorkbooksListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = MyWorkbooksListResult.DeserializeMyWorkbooksListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string resourceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Insights/myWorkbooks/", false); - uri.AppendPath(resourceName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Get a single private workbook by its resourceName. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the Application Insights component resource. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, resourceName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - MyWorkbookData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = MyWorkbookData.DeserializeMyWorkbookData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((MyWorkbookData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get a single private workbook by its resourceName. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the Application Insights component resource. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Get(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - - using var message = CreateGetRequest(subscriptionId, resourceGroupName, resourceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - MyWorkbookData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = MyWorkbookData.DeserializeMyWorkbookData(document.RootElement); - return Response.FromValue(value, message.Response); - } - case 404: - return Response.FromValue((MyWorkbookData)null, message.Response); - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string resourceName) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Insights/myWorkbooks/", false); - uri.AppendPath(resourceName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Delete a private workbook. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the Application Insights component resource. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, resourceName); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - /// Delete a private workbook. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the Application Insights component resource. - /// The cancellation token to use. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Delete(string subscriptionId, string resourceGroupName, string resourceName, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - - using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, resourceName); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 204: - return message.Response; - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string resourceName, MyWorkbookData data, string sourceId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Insights/myWorkbooks/", false); - uri.AppendPath(resourceName, true); - if (sourceId != null) - { - uri.AppendQuery("sourceId", sourceId, true); - } - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Create a new private workbook. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the Application Insights component resource. - /// Properties that need to be specified to create a new private workbook. - /// Azure Resource Id that will fetch all linked workbooks. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string resourceName, MyWorkbookData data, string sourceId = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, resourceName, data, sourceId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - case 201: - { - MyWorkbookData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = MyWorkbookData.DeserializeMyWorkbookData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Create a new private workbook. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the Application Insights component resource. - /// Properties that need to be specified to create a new private workbook. - /// Azure Resource Id that will fetch all linked workbooks. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string resourceName, MyWorkbookData data, string sourceId = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, resourceName, data, sourceId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - case 201: - { - MyWorkbookData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = MyWorkbookData.DeserializeMyWorkbookData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string resourceName, MyWorkbookData data, string sourceId) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Patch; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/subscriptions/", false); - uri.AppendPath(subscriptionId, true); - uri.AppendPath("/resourceGroups/", false); - uri.AppendPath(resourceGroupName, true); - uri.AppendPath("/providers/Microsoft.Insights/myWorkbooks/", false); - uri.AppendPath(resourceName, true); - if (sourceId != null) - { - uri.AppendQuery("sourceId", sourceId, true); - } - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(data); - request.Content = content; - _userAgent.Apply(message); - return message; - } - - /// Updates a private workbook that has already been added. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the Application Insights component resource. - /// Properties that need to be specified to create a new private workbook. - /// Azure Resource Id that will fetch all linked workbooks. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string resourceName, MyWorkbookData data, string sourceId = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, resourceName, data, sourceId); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 201: - { - MyWorkbookData value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = MyWorkbookData.DeserializeMyWorkbookData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Updates a private workbook that has already been added. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// The name of the Application Insights component resource. - /// Properties that need to be specified to create a new private workbook. - /// Azure Resource Id that will fetch all linked workbooks. - /// The cancellation token to use. - /// , , or is null. - /// , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string resourceName, MyWorkbookData data, string sourceId = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - Argument.AssertNotNullOrEmpty(resourceName, nameof(resourceName)); - Argument.AssertNotNull(data, nameof(data)); - - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, resourceName, data, sourceId); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 201: - { - MyWorkbookData value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = MyWorkbookData.DeserializeMyWorkbookData(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListByResourceGroupNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, CategoryType category, IEnumerable tags, string sourceId, bool? canFetchContent) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Get all private workbooks defined within a specified resource group and category. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Category of workbook to return. - /// Tags presents on each workbook returned. - /// Azure Resource Id that will fetch all linked workbooks. - /// Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks. - /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public async Task> ListByResourceGroupNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, CategoryType category, IEnumerable tags = null, string sourceId = null, bool? canFetchContent = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName, category, tags, sourceId, canFetchContent); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - MyWorkbooksListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = MyWorkbooksListResult.DeserializeMyWorkbooksListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get all private workbooks defined within a specified resource group and category. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// The name of the resource group. The name is case insensitive. - /// Category of workbook to return. - /// Tags presents on each workbook returned. - /// Azure Resource Id that will fetch all linked workbooks. - /// Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks. - /// The cancellation token to use. - /// , or is null. - /// or is an empty string, and was expected to be non-empty. - public Response ListByResourceGroupNextPage(string nextLink, string subscriptionId, string resourceGroupName, CategoryType category, IEnumerable tags = null, string sourceId = null, bool? canFetchContent = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); - - using var message = CreateListByResourceGroupNextPageRequest(nextLink, subscriptionId, resourceGroupName, category, tags, sourceId, canFetchContent); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - MyWorkbooksListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = MyWorkbooksListResult.DeserializeMyWorkbooksListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - internal HttpMessage CreateListBySubscriptionNextPageRequest(string nextLink, string subscriptionId, CategoryType category, IEnumerable tags, bool? canFetchContent) - { - var message = _pipeline.CreateMessage(); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - _userAgent.Apply(message); - return message; - } - - /// Get all private workbooks defined within a specified subscription and category. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// Category of workbook to return. - /// Tags presents on each workbook returned. - /// Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public async Task> ListBySubscriptionNextPageAsync(string nextLink, string subscriptionId, CategoryType category, IEnumerable tags = null, bool? canFetchContent = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId, category, tags, canFetchContent); - await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); - switch (message.Response.Status) - { - case 200: - { - MyWorkbooksListResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = MyWorkbooksListResult.DeserializeMyWorkbooksListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - - /// Get all private workbooks defined within a specified subscription and category. - /// The URL to the next page of results. - /// The ID of the target subscription. - /// Category of workbook to return. - /// Tags presents on each workbook returned. - /// Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks. - /// The cancellation token to use. - /// or is null. - /// is an empty string, and was expected to be non-empty. - public Response ListBySubscriptionNextPage(string nextLink, string subscriptionId, CategoryType category, IEnumerable tags = null, bool? canFetchContent = null, CancellationToken cancellationToken = default) - { - Argument.AssertNotNull(nextLink, nameof(nextLink)); - Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); - - using var message = CreateListBySubscriptionNextPageRequest(nextLink, subscriptionId, category, tags, canFetchContent); - _pipeline.Send(message, cancellationToken); - switch (message.Response.Status) - { - case 200: - { - MyWorkbooksListResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = MyWorkbooksListResult.DeserializeMyWorkbooksListResult(document.RootElement); - return Response.FromValue(value, message.Response); - } - default: - throw new RequestFailedException(message.Response); - } - } - } -} diff --git a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/RestOperations/WorkbooksRestOperations.cs b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/RestOperations/WorkbooksRestOperations.cs index 9592586edc6a1..10d05b5dc0e25 100644 --- a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/RestOperations/WorkbooksRestOperations.cs +++ b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/RestOperations/WorkbooksRestOperations.cs @@ -34,7 +34,7 @@ public WorkbooksRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-04-01"; + _apiVersion = apiVersion ?? "2023-06-01"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -241,7 +241,7 @@ internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGrou /// Get a single workbook by its resourceName. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the resource. + /// The name of the workbook resource. The value must be an UUID. /// Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks. /// The cancellation token to use. /// , or is null. @@ -273,7 +273,7 @@ public async Task> GetAsync(string subscriptionId, string /// Get a single workbook by its resourceName. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the resource. + /// The name of the workbook resource. The value must be an UUID. /// Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks. /// The cancellation token to use. /// , or is null. @@ -325,7 +325,7 @@ internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceG /// Delete a workbook. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the resource. + /// The name of the workbook resource. The value must be an UUID. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -350,7 +350,7 @@ public async Task DeleteAsync(string subscriptionId, string resourceGr /// Delete a workbook. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the resource. + /// The name of the workbook resource. The value must be an UUID. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -403,7 +403,7 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r /// Create a new workbook. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the resource. + /// The name of the workbook resource. The value must be an UUID. /// Properties that need to be specified to create a new workbook. /// Azure Resource Id that will fetch all linked workbooks. /// The cancellation token to use. @@ -436,7 +436,7 @@ public async Task> CreateOrUpdateAsync(string subscriptio /// Create a new workbook. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the resource. + /// The name of the workbook resource. The value must be an UUID. /// Properties that need to be specified to create a new workbook. /// Azure Resource Id that will fetch all linked workbooks. /// The cancellation token to use. @@ -497,7 +497,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG /// Updates a workbook that has already been added. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the resource. + /// The name of the workbook resource. The value must be an UUID. /// Properties that need to be specified to create a new workbook. /// Azure Resource Id that will fetch all linked workbooks. /// The cancellation token to use. @@ -530,7 +530,7 @@ public async Task> UpdateAsync(string subscriptionId, str /// Updates a workbook that has already been added. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the resource. + /// The name of the workbook resource. The value must be an UUID. /// Properties that need to be specified to create a new workbook. /// Azure Resource Id that will fetch all linked workbooks. /// The cancellation token to use. @@ -584,7 +584,7 @@ internal HttpMessage CreateRevisionsListRequest(string subscriptionId, string re /// Get the revisions for the workbook defined by its resourceName. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the resource. + /// The name of the workbook resource. The value must be an UUID. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -613,7 +613,7 @@ public async Task> RevisionsListAsync(string subsc /// Get the revisions for the workbook defined by its resourceName. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the resource. + /// The name of the workbook resource. The value must be an UUID. /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -664,7 +664,7 @@ internal HttpMessage CreateRevisionGetRequest(string subscriptionId, string reso /// Get a single workbook revision defined by its revisionId. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the resource. + /// The name of the workbook resource. The value must be an UUID. /// The id of the workbook's revision. /// The cancellation token to use. /// , , or is null. @@ -697,7 +697,7 @@ public async Task> RevisionGetAsync(string subscriptionId /// Get a single workbook revision defined by its revisionId. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the resource. + /// The name of the workbook resource. The value must be an UUID. /// The id of the workbook's revision. /// The cancellation token to use. /// , , or is null. @@ -899,7 +899,7 @@ internal HttpMessage CreateRevisionsListNextPageRequest(string nextLink, string /// The URL to the next page of results. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the resource. + /// The name of the workbook resource. The value must be an UUID. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. @@ -930,7 +930,7 @@ public async Task> RevisionsListNextPageAsync(stri /// The URL to the next page of results. /// The ID of the target subscription. /// The name of the resource group. The name is case insensitive. - /// The name of the resource. + /// The name of the workbook resource. The value must be an UUID. /// The cancellation token to use. /// , , or is null. /// , or is an empty string, and was expected to be non-empty. diff --git a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/WorkbookCollection.cs b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/WorkbookCollection.cs index 2cd842c613d78..940009b8a5a68 100644 --- a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/WorkbookCollection.cs +++ b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/Generated/WorkbookCollection.cs @@ -68,7 +68,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the resource. + /// The name of the workbook resource. The value must be an UUID. /// Properties that need to be specified to create a new workbook. /// Azure Resource Id that will fetch all linked workbooks. /// The cancellation token to use. @@ -110,7 +110,7 @@ public virtual async Task> CreateOrUpdateAsync(Wa /// /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The name of the resource. + /// The name of the workbook resource. The value must be an UUID. /// Properties that need to be specified to create a new workbook. /// Azure Resource Id that will fetch all linked workbooks. /// The cancellation token to use. @@ -151,7 +151,7 @@ public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil /// /// /// - /// The name of the resource. + /// The name of the workbook resource. The value must be an UUID. /// Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -189,7 +189,7 @@ public virtual async Task> GetAsync(string resourceNa /// /// /// - /// The name of the resource. + /// The name of the workbook resource. The value must be an UUID. /// Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -279,7 +279,7 @@ public virtual Pageable GetAll(CategoryType category, IEnumera /// /// /// - /// The name of the resource. + /// The name of the workbook resource. The value must be an UUID. /// Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -315,7 +315,7 @@ public virtual async Task> ExistsAsync(string resourceName, bool? /// /// /// - /// The name of the resource. + /// The name of the workbook resource. The value must be an UUID. /// Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -351,7 +351,7 @@ public virtual Response Exists(string resourceName, bool? canFetchContent /// /// /// - /// The name of the resource. + /// The name of the workbook resource. The value must be an UUID. /// Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. @@ -389,7 +389,7 @@ public virtual async Task> GetIfExistsAsync(s /// /// /// - /// The name of the resource. + /// The name of the workbook resource. The value must be an UUID. /// Flag indicating whether or not to return the full content for each applicable workbook. If false, only return summary content for workbooks. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. diff --git a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/autorest.md b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/autorest.md index b84b588b04b32..4c5bb42583b8e 100644 --- a/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/autorest.md +++ b/sdk/applicationinsights/Azure.ResourceManager.ApplicationInsights/src/autorest.md @@ -8,7 +8,7 @@ azure-arm: true csharp: true library-name: ApplicationInsights namespace: Azure.ResourceManager.ApplicationInsights -require: https://github.com/Azure/azure-rest-api-specs/blob/1fea23ac36b111293dc3efc30f725e9ebb790f7f/specification/applicationinsights/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/applicationinsights/resource-manager/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true sample-gen: