From fc02ca3d6a028e4245654e316225f09970c95e55 Mon Sep 17 00:00:00 2001 From: Feng Zhou <55177366+fengzhou-msft@users.noreply.github.com> Date: Sat, 29 Jan 2022 19:38:54 +0800 Subject: [PATCH] Release Resources 1.0.0-beta.6 (#26679) --- eng/Packages.Data.props | 2 +- .../Azure.ResourceManager/README.md | 2 +- .../CHANGELOG.md | 11 +- .../Azure.ResourceManager.Resources/README.md | 2 +- ...esourceManager.Resources.netstandard2.0.cs | 90 ++++++------ .../Extensions/ArmClientExtensions.cs | 12 +- .../Extensions/ResourceGroupExtensions.cs | 10 +- .../Extensions/SubscriptionExtensionClient.cs | 32 ++--- .../Extensions/SubscriptionExtensions.cs | 4 +- ...{JitRequestDefinition.cs => JitRequest.cs} | 136 +++++++++--------- ...nCollection.cs => JitRequestCollection.cs} | 110 +++++++------- ...estDefinitionData.cs => JitRequestData.cs} | 12 +- .../JitRequestCreateOrUpdateOperation.cs | 79 ++++++++++ ...equestDefinitionCreateOrUpdateOperation.cs | 79 ---------- ...ration.cs => JitRequestDeleteOperation.cs} | 8 +- ...ion.cs => JitRequestData.Serialization.cs} | 6 +- ... => JitRequestListResult.Serialization.cs} | 12 +- ...nListResult.cs => JitRequestListResult.cs} | 14 +- .../JitRequestsRestOperations.cs | 58 ++++---- .../src/autorest.md | 2 + 20 files changed, 341 insertions(+), 340 deletions(-) rename sdk/resources/Azure.ResourceManager.Resources/src/Generated/{JitRequestDefinition.cs => JitRequest.cs} (60%) rename sdk/resources/Azure.ResourceManager.Resources/src/Generated/{JitRequestDefinitionCollection.cs => JitRequestCollection.cs} (58%) rename sdk/resources/Azure.ResourceManager.Resources/src/Generated/{JitRequestDefinitionData.cs => JitRequestData.cs} (75%) create mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/LongRunningOperation/JitRequestCreateOrUpdateOperation.cs delete mode 100644 sdk/resources/Azure.ResourceManager.Resources/src/Generated/LongRunningOperation/JitRequestDefinitionCreateOrUpdateOperation.cs rename sdk/resources/Azure.ResourceManager.Resources/src/Generated/LongRunningOperation/{JitRequestDefinitionDeleteOperation.cs => JitRequestDeleteOperation.cs} (87%) rename sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/{JitRequestDefinitionData.Serialization.cs => JitRequestData.Serialization.cs} (94%) rename sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/{JitRequestDefinitionListResult.Serialization.cs => JitRequestListResult.Serialization.cs} (67%) rename sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/{JitRequestDefinitionListResult.cs => JitRequestListResult.cs} (59%) diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props index 2212a1ca127e9..088c58947f821 100644 --- a/eng/Packages.Data.props +++ b/eng/Packages.Data.props @@ -96,7 +96,7 @@ - + diff --git a/sdk/resourcemanager/Azure.ResourceManager/README.md b/sdk/resourcemanager/Azure.ResourceManager/README.md index d7465c36c3c82..1aa401e861b9d 100644 --- a/sdk/resourcemanager/Azure.ResourceManager/README.md +++ b/sdk/resourcemanager/Azure.ResourceManager/README.md @@ -14,7 +14,7 @@ This package follows the [new Azure SDK guidelines](https://azure.github.io/azur Install the Azure Resources management library for .NET with [NuGet](https://www.nuget.org/): ```PowerShell -Install-Package Azure.ResourceManager -Version 1.0.0-beta.7 +Install-Package Azure.ResourceManager -Version 1.0.0-beta.8 ``` ### Prerequisites diff --git a/sdk/resources/Azure.ResourceManager.Resources/CHANGELOG.md b/sdk/resources/Azure.ResourceManager.Resources/CHANGELOG.md index e08eeefa7707c..017a032d6b118 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/CHANGELOG.md +++ b/sdk/resources/Azure.ResourceManager.Resources/CHANGELOG.md @@ -1,14 +1,13 @@ # Release History -## 1.0.0-beta.6 (Unreleased) - -### Features Added +## 1.0.0-beta.6 (2022-01-29) ### Breaking Changes -### Bugs Fixed - -### Other Changes +- waitForCompletion is now a required parameter and moved to the first parameter in LRO operations. +- Renaming: JitRequestDefinition renamed to JitRequest, IdentityAutoGenerated renamed to ApplicationManagedIdentity, SkuAutoGenerated renamed to ApplicationSku. +- Removed GetAllAsGenericResources in [Resource]Collections. +- Added Resource constructor to use ArmClient for ClientContext information and removed previous constructors with parameters. ## 1.0.0-beta.5 (2021-12-28) diff --git a/sdk/resources/Azure.ResourceManager.Resources/README.md b/sdk/resources/Azure.ResourceManager.Resources/README.md index fc3b38f39f338..65aa6bdc79900 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/README.md +++ b/sdk/resources/Azure.ResourceManager.Resources/README.md @@ -9,7 +9,7 @@ This package follows the [new Azure SDK guidelines](https://azure.github.io/azur Install the Azure Resources management library for .NET with [NuGet](https://www.nuget.org/): ```PowerShell -Install-Package Azure.ResourceManager.Resources -Version 1.0.0-beta.5 +Install-Package Azure.ResourceManager.Resources -Version 1.0.0-beta.6 ``` ### Prerequisites diff --git a/sdk/resources/Azure.ResourceManager.Resources/api/Azure.ResourceManager.Resources.netstandard2.0.cs b/sdk/resources/Azure.ResourceManager.Resources/api/Azure.ResourceManager.Resources.netstandard2.0.cs index 7156dcab164b3..32261f3ea550c 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/api/Azure.ResourceManager.Resources.netstandard2.0.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/api/Azure.ResourceManager.Resources.netstandard2.0.cs @@ -112,7 +112,7 @@ public static partial class ArmClientExtensions public static Azure.ResourceManager.Resources.ApplicationDefinition GetApplicationDefinition(this Azure.ResourceManager.ArmClient armClient, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.Resources.Deployment GetDeployment(this Azure.ResourceManager.ArmClient armClient, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.Resources.DeploymentScript GetDeploymentScript(this Azure.ResourceManager.ArmClient armClient, Azure.Core.ResourceIdentifier id) { throw null; } - public static Azure.ResourceManager.Resources.JitRequestDefinition GetJitRequestDefinition(this Azure.ResourceManager.ArmClient armClient, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.Resources.JitRequest GetJitRequest(this Azure.ResourceManager.ArmClient armClient, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.Resources.ScriptLog GetScriptLog(this Azure.ResourceManager.ArmClient armClient, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.Resources.TemplateSpec GetTemplateSpec(this Azure.ResourceManager.ArmClient armClient, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.Resources.TemplateSpecVersion GetTemplateSpecVersion(this Azure.ResourceManager.ArmClient armClient, Azure.Core.ResourceIdentifier id) { throw null; } @@ -212,48 +212,48 @@ public DeploymentScriptData(string location) { } public string Location { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } } - public partial class JitRequestDefinition : Azure.ResourceManager.Core.ArmResource + public partial class JitRequest : Azure.ResourceManager.Core.ArmResource { public static readonly Azure.Core.ResourceType ResourceType; - protected JitRequestDefinition() { } - public virtual Azure.ResourceManager.Resources.JitRequestDefinitionData Data { get { throw null; } } + protected JitRequest() { } + public virtual Azure.ResourceManager.Resources.JitRequestData 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 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 jitRequestName) { throw null; } - public virtual Azure.ResourceManager.Resources.Models.JitRequestDefinitionDeleteOperation Delete(bool waitForCompletion, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteAsync(bool waitForCompletion, 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.ResourceManager.Resources.Models.JitRequestDeleteOperation Delete(bool waitForCompletion, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(bool waitForCompletion, 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 System.Collections.Generic.IEnumerable GetAvailableLocations(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAvailableLocationsAsync(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(System.Collections.Generic.IDictionary tags = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(System.Collections.Generic.IDictionary tags = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - } - public partial class JitRequestDefinitionCollection : Azure.ResourceManager.Core.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable - { - protected JitRequestDefinitionCollection() { } - public virtual Azure.ResourceManager.Resources.Models.JitRequestDefinitionCreateOrUpdateOperation CreateOrUpdate(bool waitForCompletion, string jitRequestName, Azure.ResourceManager.Resources.JitRequestDefinitionData parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task CreateOrUpdateAsync(bool waitForCompletion, string jitRequestName, Azure.ResourceManager.Resources.JitRequestDefinitionData parameters, 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(System.Collections.Generic.IDictionary tags = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(System.Collections.Generic.IDictionary tags = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class JitRequestCollection : Azure.ResourceManager.Core.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected JitRequestCollection() { } + public virtual Azure.ResourceManager.Resources.Models.JitRequestCreateOrUpdateOperation CreateOrUpdate(bool waitForCompletion, string jitRequestName, Azure.ResourceManager.Resources.JitRequestData parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CreateOrUpdateAsync(bool waitForCompletion, string jitRequestName, Azure.ResourceManager.Resources.JitRequestData parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string jitRequestName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string jitRequestName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Get(string jitRequestName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetAsync(string jitRequestName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response GetIfExists(string jitRequestName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string jitRequestName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } - System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } + public virtual Azure.Response Get(string jitRequestName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Pageable GetAll(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.AsyncPageable GetAllAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string jitRequestName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response GetIfExists(string jitRequestName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetIfExistsAsync(string jitRequestName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + System.Collections.Generic.IAsyncEnumerator System.Collections.Generic.IAsyncEnumerable.GetAsyncEnumerator(System.Threading.CancellationToken cancellationToken) { throw null; } + System.Collections.Generic.IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator() { throw null; } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; } } - public partial class JitRequestDefinitionData : Azure.ResourceManager.Models.TrackedResource + public partial class JitRequestData : Azure.ResourceManager.Models.TrackedResource { - public JitRequestDefinitionData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } + public JitRequestData(Azure.Core.AzureLocation location) : base (default(Azure.Core.AzureLocation)) { } public string ApplicationResourceId { get { throw null; } set { } } public Azure.ResourceManager.Resources.Models.ApplicationClientDetails CreatedBy { get { throw null; } } public System.Collections.Generic.IList JitAuthorizationPolicies { get { throw null; } } @@ -273,7 +273,7 @@ public static partial class ResourceGroupExtensions public static Azure.ResourceManager.Resources.ApplicationCollection GetApplications(this Azure.ResourceManager.Resources.ResourceGroup resourceGroup) { throw null; } public static Azure.ResourceManager.Resources.DeploymentCollection GetDeployments(this Azure.ResourceManager.Resources.ResourceGroup resourceGroup) { throw null; } public static Azure.ResourceManager.Resources.DeploymentScriptCollection GetDeploymentScripts(this Azure.ResourceManager.Resources.ResourceGroup resourceGroup) { throw null; } - public static Azure.ResourceManager.Resources.JitRequestDefinitionCollection GetJitRequestDefinitions(this Azure.ResourceManager.Resources.ResourceGroup resourceGroup) { throw null; } + public static Azure.ResourceManager.Resources.JitRequestCollection GetJitRequests(this Azure.ResourceManager.Resources.ResourceGroup resourceGroup) { throw null; } public static Azure.ResourceManager.Resources.TemplateSpecCollection GetTemplateSpecs(this Azure.ResourceManager.Resources.ResourceGroup resourceGroup) { throw null; } } public partial class ScriptLog : Azure.ResourceManager.Core.ArmResource @@ -300,8 +300,8 @@ public static partial class SubscriptionExtensions public static Azure.ResourceManager.Resources.DeploymentCollection GetDeployments(this Azure.ResourceManager.Resources.Subscription subscription) { throw null; } public static Azure.Pageable GetDeploymentScripts(this Azure.ResourceManager.Resources.Subscription subscription, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetDeploymentScriptsAsync(this Azure.ResourceManager.Resources.Subscription subscription, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.Pageable GetJitRequestDefinitions(this Azure.ResourceManager.Resources.Subscription subscription, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public static Azure.AsyncPageable GetJitRequestDefinitionsAsync(this Azure.ResourceManager.Resources.Subscription subscription, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Pageable GetJitRequestDefinitions(this Azure.ResourceManager.Resources.Subscription subscription, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.AsyncPageable GetJitRequestDefinitionsAsync(this Azure.ResourceManager.Resources.Subscription subscription, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.Pageable GetTemplateSpecs(this Azure.ResourceManager.Resources.Subscription subscription, Azure.ResourceManager.Resources.Models.TemplateSpecExpandKind? expand = default(Azure.ResourceManager.Resources.Models.TemplateSpecExpandKind?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.AsyncPageable GetTemplateSpecsAsync(this Azure.ResourceManager.Resources.Subscription subscription, Azure.ResourceManager.Resources.Models.TemplateSpecExpandKind? expand = default(Azure.ResourceManager.Resources.Models.TemplateSpecExpandKind?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } @@ -1072,22 +1072,22 @@ public JitAuthorizationPolicies(string principalId, string roleDefinitionId) { } public string PrincipalId { get { throw null; } set { } } public string RoleDefinitionId { get { throw null; } set { } } } - public partial class JitRequestDefinitionCreateOrUpdateOperation : Azure.Operation + public partial class JitRequestCreateOrUpdateOperation : Azure.Operation { - protected JitRequestDefinitionCreateOrUpdateOperation() { } + protected JitRequestCreateOrUpdateOperation() { } public override bool HasCompleted { get { throw null; } } public override bool HasValue { get { throw null; } } public override string Id { get { throw null; } } - public override Azure.ResourceManager.Resources.JitRequestDefinition Value { get { throw null; } } + public override Azure.ResourceManager.Resources.JitRequest Value { get { throw null; } } public override Azure.Response GetRawResponse() { throw null; } public override Azure.Response UpdateStatus(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public override System.Threading.Tasks.ValueTask UpdateStatusAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.TimeSpan pollingInterval, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public override System.Threading.Tasks.ValueTask> WaitForCompletionAsync(System.TimeSpan pollingInterval, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class JitRequestDefinitionDeleteOperation : Azure.Operation + public partial class JitRequestDeleteOperation : Azure.Operation { - protected JitRequestDefinitionDeleteOperation() { } + protected JitRequestDeleteOperation() { } public override bool HasCompleted { get { throw null; } } public override string Id { get { throw null; } } public override Azure.Response GetRawResponse() { throw null; } @@ -1096,11 +1096,11 @@ protected JitRequestDefinitionDeleteOperation() { } public override System.Threading.Tasks.ValueTask WaitForCompletionResponseAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public override System.Threading.Tasks.ValueTask WaitForCompletionResponseAsync(System.TimeSpan pollingInterval, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } - public partial class JitRequestDefinitionListResult + public partial class JitRequestListResult { - internal JitRequestDefinitionListResult() { } + internal JitRequestListResult() { } public string NextLink { get { throw null; } } - public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } + public System.Collections.Generic.IReadOnlyList Value { get { throw null; } } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct JitRequestState : System.IEquatable diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Extensions/ArmClientExtensions.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Extensions/ArmClientExtensions.cs index ee624875ca840..6e8feede97114 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Extensions/ArmClientExtensions.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Extensions/ArmClientExtensions.cs @@ -49,15 +49,15 @@ public static ApplicationDefinition GetApplicationDefinition(this ArmClient armC } #endregion - #region JitRequestDefinition - /// Gets an object representing a JitRequestDefinition along with the instance operations that can be performed on it but with no data. + #region JitRequest + /// Gets an object representing a JitRequest along with the instance operations that can be performed on it but with no data. /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static JitRequestDefinition GetJitRequestDefinition(this ArmClient armClient, ResourceIdentifier id) + /// Returns a object. + public static JitRequest GetJitRequest(this ArmClient armClient, ResourceIdentifier id) { - JitRequestDefinition.ValidateResourceId(id); - return new JitRequestDefinition(armClient, id); + JitRequest.ValidateResourceId(id); + return new JitRequest(armClient, id); } #endregion diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Extensions/ResourceGroupExtensions.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Extensions/ResourceGroupExtensions.cs index 82620d8307330..fdc6d11c09799 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Extensions/ResourceGroupExtensions.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Extensions/ResourceGroupExtensions.cs @@ -40,13 +40,13 @@ public static ApplicationDefinitionCollection GetApplicationDefinitions(this Res } #endregion - #region JitRequestDefinition - /// Gets an object representing a JitRequestDefinitionCollection along with the instance operations that can be performed on it. + #region JitRequest + /// Gets an object representing a JitRequestCollection along with the instance operations that can be performed on it. /// The instance the method will execute against. - /// Returns a object. - public static JitRequestDefinitionCollection GetJitRequestDefinitions(this ResourceGroup resourceGroup) + /// Returns a object. + public static JitRequestCollection GetJitRequests(this ResourceGroup resourceGroup) { - return new JitRequestDefinitionCollection(resourceGroup); + return new JitRequestCollection(resourceGroup); } #endregion diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Extensions/SubscriptionExtensionClient.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Extensions/SubscriptionExtensionClient.cs index 7f0559dcf2781..42dfd59ec6b95 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Extensions/SubscriptionExtensionClient.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Extensions/SubscriptionExtensionClient.cs @@ -23,8 +23,8 @@ internal partial class SubscriptionExtensionClient : ArmResource { private ClientDiagnostics _applicationClientDiagnostics; private ApplicationsRestOperations _applicationRestClient; - private ClientDiagnostics _jitRequestDefinitionJitRequestsClientDiagnostics; - private JitRequestsRestOperations _jitRequestDefinitionJitRequestsRestClient; + private ClientDiagnostics _jitRequestClientDiagnostics; + private JitRequestsRestOperations _jitRequestRestClient; private ClientDiagnostics _deploymentScriptClientDiagnostics; private DeploymentScriptsRestOperations _deploymentScriptRestClient; private ClientDiagnostics _templateSpecClientDiagnostics; @@ -44,8 +44,8 @@ internal SubscriptionExtensionClient(ArmClient armClient, ResourceIdentifier id) private ClientDiagnostics ApplicationClientDiagnostics => _applicationClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Resources", Application.ResourceType.Namespace, DiagnosticOptions); private ApplicationsRestOperations ApplicationRestClient => _applicationRestClient ??= new ApplicationsRestOperations(ApplicationClientDiagnostics, Pipeline, DiagnosticOptions.ApplicationId, BaseUri, GetApiVersionOrNull(Application.ResourceType)); - private ClientDiagnostics JitRequestDefinitionJitRequestsClientDiagnostics => _jitRequestDefinitionJitRequestsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Resources", JitRequestDefinition.ResourceType.Namespace, DiagnosticOptions); - private JitRequestsRestOperations JitRequestDefinitionJitRequestsRestClient => _jitRequestDefinitionJitRequestsRestClient ??= new JitRequestsRestOperations(JitRequestDefinitionJitRequestsClientDiagnostics, Pipeline, DiagnosticOptions.ApplicationId, BaseUri, GetApiVersionOrNull(JitRequestDefinition.ResourceType)); + private ClientDiagnostics JitRequestClientDiagnostics => _jitRequestClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Resources", JitRequest.ResourceType.Namespace, DiagnosticOptions); + private JitRequestsRestOperations JitRequestRestClient => _jitRequestRestClient ??= new JitRequestsRestOperations(JitRequestClientDiagnostics, Pipeline, DiagnosticOptions.ApplicationId, BaseUri, GetApiVersionOrNull(JitRequest.ResourceType)); private ClientDiagnostics DeploymentScriptClientDiagnostics => _deploymentScriptClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Resources", DeploymentScript.ResourceType.Namespace, DiagnosticOptions); private DeploymentScriptsRestOperations DeploymentScriptRestClient => _deploymentScriptRestClient ??= new DeploymentScriptsRestOperations(DeploymentScriptClientDiagnostics, Pipeline, DiagnosticOptions.ApplicationId, BaseUri, GetApiVersionOrNull(DeploymentScript.ResourceType)); private ClientDiagnostics TemplateSpecClientDiagnostics => _templateSpecClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Resources", TemplateSpec.ResourceType.Namespace, DiagnosticOptions); @@ -135,17 +135,17 @@ Page NextPageFunc(string nextLink, int? pageSizeHint) /// Retrieves all JIT requests within the subscription. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetJitRequestDefinitionsAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetJitRequestDefinitionsAsync(CancellationToken cancellationToken = default) { - async Task> FirstPageFunc(int? pageSizeHint) + async Task> FirstPageFunc(int? pageSizeHint) { - using var scope = JitRequestDefinitionJitRequestsClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetJitRequestDefinitions"); + using var scope = JitRequestClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetJitRequestDefinitions"); scope.Start(); try { - var response = await JitRequestDefinitionJitRequestsRestClient.ListBySubscriptionAsync(Id.SubscriptionId, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new JitRequestDefinition(ArmClient, value)), null, response.GetRawResponse()); + var response = await JitRequestRestClient.ListBySubscriptionAsync(Id.SubscriptionId, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new JitRequest(ArmClient, value)), null, response.GetRawResponse()); } catch (Exception e) { @@ -158,17 +158,17 @@ async Task> FirstPageFunc(int? pageSizeHint) /// Retrieves all JIT requests within the subscription. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetJitRequestDefinitions(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetJitRequestDefinitions(CancellationToken cancellationToken = default) { - Page FirstPageFunc(int? pageSizeHint) + Page FirstPageFunc(int? pageSizeHint) { - using var scope = JitRequestDefinitionJitRequestsClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetJitRequestDefinitions"); + using var scope = JitRequestClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetJitRequestDefinitions"); scope.Start(); try { - var response = JitRequestDefinitionJitRequestsRestClient.ListBySubscription(Id.SubscriptionId, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new JitRequestDefinition(ArmClient, value)), null, response.GetRawResponse()); + var response = JitRequestRestClient.ListBySubscription(Id.SubscriptionId, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new JitRequest(ArmClient, value)), null, response.GetRawResponse()); } catch (Exception e) { diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Extensions/SubscriptionExtensions.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Extensions/SubscriptionExtensions.cs index e1140b269ae34..801d539cb8c8d 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Extensions/SubscriptionExtensions.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Extensions/SubscriptionExtensions.cs @@ -52,7 +52,7 @@ public static Pageable GetApplications(this Subscription subscripti /// The instance the method will execute against. /// The cancellation token to use. /// A collection of resource operations that may take multiple service requests to iterate over. - public static AsyncPageable GetJitRequestDefinitionsAsync(this Subscription subscription, CancellationToken cancellationToken = default) + public static AsyncPageable GetJitRequestDefinitionsAsync(this Subscription subscription, CancellationToken cancellationToken = default) { return GetExtensionClient(subscription).GetJitRequestDefinitionsAsync(cancellationToken); } @@ -60,7 +60,7 @@ public static AsyncPageable GetJitRequestDefinitionsAsync( /// The instance the method will execute against. /// The cancellation token to use. /// A collection of resource operations that may take multiple service requests to iterate over. - public static Pageable GetJitRequestDefinitions(this Subscription subscription, CancellationToken cancellationToken = default) + public static Pageable GetJitRequestDefinitions(this Subscription subscription, CancellationToken cancellationToken = default) { return GetExtensionClient(subscription).GetJitRequestDefinitions(cancellationToken); } diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/JitRequestDefinition.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/JitRequest.cs similarity index 60% rename from sdk/resources/Azure.ResourceManager.Resources/src/Generated/JitRequestDefinition.cs rename to sdk/resources/Azure.ResourceManager.Resources/src/Generated/JitRequest.cs index 5d660a3994694..e7a06da9f3c60 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/JitRequestDefinition.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/JitRequest.cs @@ -19,42 +19,42 @@ namespace Azure.ResourceManager.Resources { - /// A Class representing a JitRequestDefinition along with the instance operations that can be performed on it. - public partial class JitRequestDefinition : ArmResource + /// A Class representing a JitRequest along with the instance operations that can be performed on it. + public partial class JitRequest : ArmResource { - /// Generate the resource identifier of a instance. + /// Generate the resource identifier of a instance. public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string jitRequestName) { var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Solutions/jitRequests/{jitRequestName}"; return new ResourceIdentifier(resourceId); } - private readonly ClientDiagnostics _jitRequestDefinitionJitRequestsClientDiagnostics; - private readonly JitRequestsRestOperations _jitRequestDefinitionJitRequestsRestClient; - private readonly JitRequestDefinitionData _data; + private readonly ClientDiagnostics _jitRequestClientDiagnostics; + private readonly JitRequestsRestOperations _jitRequestRestClient; + private readonly JitRequestData _data; - /// Initializes a new instance of the class for mocking. - protected JitRequestDefinition() + /// Initializes a new instance of the class for mocking. + protected JitRequest() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The client parameters to use in these operations. /// The resource that is the target of operations. - internal JitRequestDefinition(ArmClient armClient, JitRequestDefinitionData data) : this(armClient, data.Id) + internal JitRequest(ArmClient armClient, JitRequestData data) : this(armClient, data.Id) { HasData = true; _data = data; } - /// Initializes a new instance of the class. + /// 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 JitRequestDefinition(ArmClient armClient, ResourceIdentifier id) : base(armClient, id) + internal JitRequest(ArmClient armClient, ResourceIdentifier id) : base(armClient, id) { - _jitRequestDefinitionJitRequestsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Resources", ResourceType.Namespace, DiagnosticOptions); - ArmClient.TryGetApiVersion(ResourceType, out string jitRequestDefinitionJitRequestsApiVersion); - _jitRequestDefinitionJitRequestsRestClient = new JitRequestsRestOperations(_jitRequestDefinitionJitRequestsClientDiagnostics, Pipeline, DiagnosticOptions.ApplicationId, BaseUri, jitRequestDefinitionJitRequestsApiVersion); + _jitRequestClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Resources", ResourceType.Namespace, DiagnosticOptions); + ArmClient.TryGetApiVersion(ResourceType, out string jitRequestApiVersion); + _jitRequestRestClient = new JitRequestsRestOperations(_jitRequestClientDiagnostics, Pipeline, DiagnosticOptions.ApplicationId, BaseUri, jitRequestApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -68,7 +68,7 @@ internal JitRequestDefinition(ArmClient armClient, ResourceIdentifier id) : base /// Gets the data representing this Feature. /// Throws if there is no data loaded in the current instance. - public virtual JitRequestDefinitionData Data + public virtual JitRequestData Data { get { @@ -86,16 +86,16 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// Gets the JIT request. /// The cancellation token to use. - public async virtual Task> GetAsync(CancellationToken cancellationToken = default) + public async virtual Task> GetAsync(CancellationToken cancellationToken = default) { - using var scope = _jitRequestDefinitionJitRequestsClientDiagnostics.CreateScope("JitRequestDefinition.Get"); + using var scope = _jitRequestClientDiagnostics.CreateScope("JitRequest.Get"); scope.Start(); try { - var response = await _jitRequestDefinitionJitRequestsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var response = await _jitRequestRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); if (response.Value == null) - throw await _jitRequestDefinitionJitRequestsClientDiagnostics.CreateRequestFailedExceptionAsync(response.GetRawResponse()).ConfigureAwait(false); - return Response.FromValue(new JitRequestDefinition(ArmClient, response.Value), response.GetRawResponse()); + throw await _jitRequestClientDiagnostics.CreateRequestFailedExceptionAsync(response.GetRawResponse()).ConfigureAwait(false); + return Response.FromValue(new JitRequest(ArmClient, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -106,16 +106,16 @@ public async virtual Task> GetAsync(CancellationT /// Gets the JIT request. /// The cancellation token to use. - public virtual Response Get(CancellationToken cancellationToken = default) + public virtual Response Get(CancellationToken cancellationToken = default) { - using var scope = _jitRequestDefinitionJitRequestsClientDiagnostics.CreateScope("JitRequestDefinition.Get"); + using var scope = _jitRequestClientDiagnostics.CreateScope("JitRequest.Get"); scope.Start(); try { - var response = _jitRequestDefinitionJitRequestsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var response = _jitRequestRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); if (response.Value == null) - throw _jitRequestDefinitionJitRequestsClientDiagnostics.CreateRequestFailedException(response.GetRawResponse()); - return Response.FromValue(new JitRequestDefinition(ArmClient, response.Value), response.GetRawResponse()); + throw _jitRequestClientDiagnostics.CreateRequestFailedException(response.GetRawResponse()); + return Response.FromValue(new JitRequest(ArmClient, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -129,7 +129,7 @@ public virtual Response Get(CancellationToken cancellation /// A collection of locations that may take multiple service requests to iterate over. public async virtual Task> GetAvailableLocationsAsync(CancellationToken cancellationToken = default) { - using var scope = _jitRequestDefinitionJitRequestsClientDiagnostics.CreateScope("JitRequestDefinition.GetAvailableLocations"); + using var scope = _jitRequestClientDiagnostics.CreateScope("JitRequest.GetAvailableLocations"); scope.Start(); try { @@ -147,7 +147,7 @@ public async virtual Task> GetAvailableLocationsAsync /// A collection of locations that may take multiple service requests to iterate over. public virtual IEnumerable GetAvailableLocations(CancellationToken cancellationToken = default) { - using var scope = _jitRequestDefinitionJitRequestsClientDiagnostics.CreateScope("JitRequestDefinition.GetAvailableLocations"); + using var scope = _jitRequestClientDiagnostics.CreateScope("JitRequest.GetAvailableLocations"); scope.Start(); try { @@ -163,14 +163,14 @@ public virtual IEnumerable GetAvailableLocations(CancellationToke /// Deletes the JIT request. /// Waits for the completion of the long running operations. /// The cancellation token to use. - public async virtual Task DeleteAsync(bool waitForCompletion, CancellationToken cancellationToken = default) + public async virtual Task DeleteAsync(bool waitForCompletion, CancellationToken cancellationToken = default) { - using var scope = _jitRequestDefinitionJitRequestsClientDiagnostics.CreateScope("JitRequestDefinition.Delete"); + using var scope = _jitRequestClientDiagnostics.CreateScope("JitRequest.Delete"); scope.Start(); try { - var response = await _jitRequestDefinitionJitRequestsRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - var operation = new JitRequestDefinitionDeleteOperation(response); + var response = await _jitRequestRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new JitRequestDeleteOperation(response); if (waitForCompletion) await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -185,14 +185,14 @@ public async virtual Task DeleteAsync(bool /// Deletes the JIT request. /// Waits for the completion of the long running operations. /// The cancellation token to use. - public virtual JitRequestDefinitionDeleteOperation Delete(bool waitForCompletion, CancellationToken cancellationToken = default) + public virtual JitRequestDeleteOperation Delete(bool waitForCompletion, CancellationToken cancellationToken = default) { - using var scope = _jitRequestDefinitionJitRequestsClientDiagnostics.CreateScope("JitRequestDefinition.Delete"); + using var scope = _jitRequestClientDiagnostics.CreateScope("JitRequest.Delete"); scope.Start(); try { - var response = _jitRequestDefinitionJitRequestsRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - var operation = new JitRequestDefinitionDeleteOperation(response); + var response = _jitRequestRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + var operation = new JitRequestDeleteOperation(response); if (waitForCompletion) operation.WaitForCompletionResponse(cancellationToken); return operation; @@ -209,19 +209,19 @@ public virtual JitRequestDefinitionDeleteOperation Delete(bool waitForCompletion /// The value for the tag. /// A token to allow the caller to cancel the call to the service. The default value is . /// The updated resource with the tag added. - public async virtual Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + public async virtual Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrWhiteSpace(key, nameof(key)); - using var scope = _jitRequestDefinitionJitRequestsClientDiagnostics.CreateScope("JitRequestDefinition.AddTag"); + using var scope = _jitRequestClientDiagnostics.CreateScope("JitRequest.AddTag"); scope.Start(); try { var originalTags = await TagResource.GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.Properties.TagsValue[key] = value; await TagResource.CreateOrUpdateAsync(true, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _jitRequestDefinitionJitRequestsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new JitRequestDefinition(ArmClient, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _jitRequestRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new JitRequest(ArmClient, originalResponse.Value), originalResponse.GetRawResponse()); } catch (Exception e) { @@ -235,19 +235,19 @@ public async virtual Task> AddTagAsync(string key /// The value for the tag. /// A token to allow the caller to cancel the call to the service. The default value is . /// The updated resource with the tag added. - public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrWhiteSpace(key, nameof(key)); - using var scope = _jitRequestDefinitionJitRequestsClientDiagnostics.CreateScope("JitRequestDefinition.AddTag"); + using var scope = _jitRequestClientDiagnostics.CreateScope("JitRequest.AddTag"); scope.Start(); try { var originalTags = TagResource.Get(cancellationToken); originalTags.Value.Data.Properties.TagsValue[key] = value; TagResource.CreateOrUpdate(true, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _jitRequestDefinitionJitRequestsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new JitRequestDefinition(ArmClient, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _jitRequestRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new JitRequest(ArmClient, originalResponse.Value), originalResponse.GetRawResponse()); } catch (Exception e) { @@ -260,14 +260,14 @@ public virtual Response AddTag(string key, string value, C /// The set of tags to use as replacement. /// A token to allow the caller to cancel the call to the service. The default value is . /// The updated resource with the tags replaced. - public async virtual Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + public async virtual Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) { if (tags == null) { throw new ArgumentNullException(nameof(tags), $"{nameof(tags)} provided cannot be null."); } - using var scope = _jitRequestDefinitionJitRequestsClientDiagnostics.CreateScope("JitRequestDefinition.SetTags"); + using var scope = _jitRequestClientDiagnostics.CreateScope("JitRequest.SetTags"); scope.Start(); try { @@ -275,8 +275,8 @@ public async virtual Task> SetTagsAsync(IDictiona var originalTags = await TagResource.GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.Properties.TagsValue.ReplaceWith(tags); await TagResource.CreateOrUpdateAsync(true, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _jitRequestDefinitionJitRequestsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new JitRequestDefinition(ArmClient, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _jitRequestRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new JitRequest(ArmClient, originalResponse.Value), originalResponse.GetRawResponse()); } catch (Exception e) { @@ -289,14 +289,14 @@ public async virtual Task> SetTagsAsync(IDictiona /// The set of tags to use as replacement. /// A token to allow the caller to cancel the call to the service. The default value is . /// The updated resource with the tags replaced. - public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) { if (tags == null) { throw new ArgumentNullException(nameof(tags), $"{nameof(tags)} provided cannot be null."); } - using var scope = _jitRequestDefinitionJitRequestsClientDiagnostics.CreateScope("JitRequestDefinition.SetTags"); + using var scope = _jitRequestClientDiagnostics.CreateScope("JitRequest.SetTags"); scope.Start(); try { @@ -304,8 +304,8 @@ public virtual Response SetTags(IDictionary SetTags(IDictionary The key of the tag to remove. /// A token to allow the caller to cancel the call to the service. The default value is . /// The updated resource with the tag removed. - public async virtual Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + public async virtual Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrWhiteSpace(key, nameof(key)); - using var scope = _jitRequestDefinitionJitRequestsClientDiagnostics.CreateScope("JitRequestDefinition.RemoveTag"); + using var scope = _jitRequestClientDiagnostics.CreateScope("JitRequest.RemoveTag"); scope.Start(); try { var originalTags = await TagResource.GetAsync(cancellationToken).ConfigureAwait(false); originalTags.Value.Data.Properties.TagsValue.Remove(key); await TagResource.CreateOrUpdateAsync(true, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); - var originalResponse = await _jitRequestDefinitionJitRequestsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new JitRequestDefinition(ArmClient, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = await _jitRequestRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new JitRequest(ArmClient, originalResponse.Value), originalResponse.GetRawResponse()); } catch (Exception e) { @@ -343,19 +343,19 @@ public async virtual Task> RemoveTagAsync(string /// The key of the tag to remove. /// A token to allow the caller to cancel the call to the service. The default value is . /// The updated resource with the tag removed. - public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrWhiteSpace(key, nameof(key)); - using var scope = _jitRequestDefinitionJitRequestsClientDiagnostics.CreateScope("JitRequestDefinition.RemoveTag"); + using var scope = _jitRequestClientDiagnostics.CreateScope("JitRequest.RemoveTag"); scope.Start(); try { var originalTags = TagResource.Get(cancellationToken); originalTags.Value.Data.Properties.TagsValue.Remove(key); TagResource.CreateOrUpdate(true, originalTags.Value.Data, cancellationToken: cancellationToken); - var originalResponse = _jitRequestDefinitionJitRequestsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return Response.FromValue(new JitRequestDefinition(ArmClient, originalResponse.Value), originalResponse.GetRawResponse()); + var originalResponse = _jitRequestRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return Response.FromValue(new JitRequest(ArmClient, originalResponse.Value), originalResponse.GetRawResponse()); } catch (Exception e) { @@ -367,14 +367,14 @@ public virtual Response RemoveTag(string key, Cancellation /// Updates the JIT request. /// Jit request tags. /// The cancellation token to use. - public async virtual Task> UpdateAsync(IDictionary tags = null, CancellationToken cancellationToken = default) + public async virtual Task> UpdateAsync(IDictionary tags = null, CancellationToken cancellationToken = default) { - using var scope = _jitRequestDefinitionJitRequestsClientDiagnostics.CreateScope("JitRequestDefinition.Update"); + using var scope = _jitRequestClientDiagnostics.CreateScope("JitRequest.Update"); scope.Start(); try { - var response = await _jitRequestDefinitionJitRequestsRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, tags, cancellationToken).ConfigureAwait(false); - return Response.FromValue(new JitRequestDefinition(ArmClient, response.Value), response.GetRawResponse()); + var response = await _jitRequestRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, tags, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new JitRequest(ArmClient, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -386,14 +386,14 @@ public async virtual Task> UpdateAsync(IDictionar /// Updates the JIT request. /// Jit request tags. /// The cancellation token to use. - public virtual Response Update(IDictionary tags = null, CancellationToken cancellationToken = default) + public virtual Response Update(IDictionary tags = null, CancellationToken cancellationToken = default) { - using var scope = _jitRequestDefinitionJitRequestsClientDiagnostics.CreateScope("JitRequestDefinition.Update"); + using var scope = _jitRequestClientDiagnostics.CreateScope("JitRequest.Update"); scope.Start(); try { - var response = _jitRequestDefinitionJitRequestsRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, tags, cancellationToken); - return Response.FromValue(new JitRequestDefinition(ArmClient, response.Value), response.GetRawResponse()); + var response = _jitRequestRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, tags, cancellationToken); + return Response.FromValue(new JitRequest(ArmClient, response.Value), response.GetRawResponse()); } catch (Exception e) { diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/JitRequestDefinitionCollection.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/JitRequestCollection.cs similarity index 58% rename from sdk/resources/Azure.ResourceManager.Resources/src/Generated/JitRequestDefinitionCollection.cs rename to sdk/resources/Azure.ResourceManager.Resources/src/Generated/JitRequestCollection.cs index 8b331e9c819c4..21dcc5122d89d 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/JitRequestDefinitionCollection.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/JitRequestCollection.cs @@ -20,24 +20,24 @@ namespace Azure.ResourceManager.Resources { - /// A class representing collection of JitRequestDefinition and their operations over its parent. - public partial class JitRequestDefinitionCollection : ArmCollection, IEnumerable, IAsyncEnumerable + /// A class representing collection of JitRequest and their operations over its parent. + public partial class JitRequestCollection : ArmCollection, IEnumerable, IAsyncEnumerable { - private readonly ClientDiagnostics _jitRequestDefinitionJitRequestsClientDiagnostics; - private readonly JitRequestsRestOperations _jitRequestDefinitionJitRequestsRestClient; + private readonly ClientDiagnostics _jitRequestClientDiagnostics; + private readonly JitRequestsRestOperations _jitRequestRestClient; - /// Initializes a new instance of the class for mocking. - protected JitRequestDefinitionCollection() + /// Initializes a new instance of the class for mocking. + protected JitRequestCollection() { } - /// Initializes a new instance of the class. + /// Initializes a new instance of the class. /// The resource representing the parent resource. - internal JitRequestDefinitionCollection(ArmResource parent) : base(parent) + internal JitRequestCollection(ArmResource parent) : base(parent) { - _jitRequestDefinitionJitRequestsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Resources", JitRequestDefinition.ResourceType.Namespace, DiagnosticOptions); - ArmClient.TryGetApiVersion(JitRequestDefinition.ResourceType, out string jitRequestDefinitionJitRequestsApiVersion); - _jitRequestDefinitionJitRequestsRestClient = new JitRequestsRestOperations(_jitRequestDefinitionJitRequestsClientDiagnostics, Pipeline, DiagnosticOptions.ApplicationId, BaseUri, jitRequestDefinitionJitRequestsApiVersion); + _jitRequestClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Resources", JitRequest.ResourceType.Namespace, DiagnosticOptions); + ArmClient.TryGetApiVersion(JitRequest.ResourceType, out string jitRequestApiVersion); + _jitRequestRestClient = new JitRequestsRestOperations(_jitRequestClientDiagnostics, Pipeline, DiagnosticOptions.ApplicationId, BaseUri, jitRequestApiVersion); #if DEBUG ValidateResourceId(Id); #endif @@ -58,7 +58,7 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// The cancellation token to use. /// is empty. /// or is null. - public virtual JitRequestDefinitionCreateOrUpdateOperation CreateOrUpdate(bool waitForCompletion, string jitRequestName, JitRequestDefinitionData parameters, CancellationToken cancellationToken = default) + public virtual JitRequestCreateOrUpdateOperation CreateOrUpdate(bool waitForCompletion, string jitRequestName, JitRequestData parameters, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(jitRequestName, nameof(jitRequestName)); if (parameters == null) @@ -66,12 +66,12 @@ public virtual JitRequestDefinitionCreateOrUpdateOperation CreateOrUpdate(bool w throw new ArgumentNullException(nameof(parameters)); } - using var scope = _jitRequestDefinitionJitRequestsClientDiagnostics.CreateScope("JitRequestDefinitionCollection.CreateOrUpdate"); + using var scope = _jitRequestClientDiagnostics.CreateScope("JitRequestCollection.CreateOrUpdate"); scope.Start(); try { - var response = _jitRequestDefinitionJitRequestsRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, jitRequestName, parameters, cancellationToken); - var operation = new JitRequestDefinitionCreateOrUpdateOperation(ArmClient, _jitRequestDefinitionJitRequestsClientDiagnostics, Pipeline, _jitRequestDefinitionJitRequestsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, jitRequestName, parameters).Request, response); + var response = _jitRequestRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, jitRequestName, parameters, cancellationToken); + var operation = new JitRequestCreateOrUpdateOperation(ArmClient, _jitRequestClientDiagnostics, Pipeline, _jitRequestRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, jitRequestName, parameters).Request, response); if (waitForCompletion) operation.WaitForCompletion(cancellationToken); return operation; @@ -90,7 +90,7 @@ public virtual JitRequestDefinitionCreateOrUpdateOperation CreateOrUpdate(bool w /// The cancellation token to use. /// is empty. /// or is null. - public async virtual Task CreateOrUpdateAsync(bool waitForCompletion, string jitRequestName, JitRequestDefinitionData parameters, CancellationToken cancellationToken = default) + public async virtual Task CreateOrUpdateAsync(bool waitForCompletion, string jitRequestName, JitRequestData parameters, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(jitRequestName, nameof(jitRequestName)); if (parameters == null) @@ -98,12 +98,12 @@ public async virtual Task CreateOrU throw new ArgumentNullException(nameof(parameters)); } - using var scope = _jitRequestDefinitionJitRequestsClientDiagnostics.CreateScope("JitRequestDefinitionCollection.CreateOrUpdate"); + using var scope = _jitRequestClientDiagnostics.CreateScope("JitRequestCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _jitRequestDefinitionJitRequestsRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, jitRequestName, parameters, cancellationToken).ConfigureAwait(false); - var operation = new JitRequestDefinitionCreateOrUpdateOperation(ArmClient, _jitRequestDefinitionJitRequestsClientDiagnostics, Pipeline, _jitRequestDefinitionJitRequestsRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, jitRequestName, parameters).Request, response); + var response = await _jitRequestRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, jitRequestName, parameters, cancellationToken).ConfigureAwait(false); + var operation = new JitRequestCreateOrUpdateOperation(ArmClient, _jitRequestClientDiagnostics, Pipeline, _jitRequestRestClient.CreateCreateOrUpdateRequest(Id.SubscriptionId, Id.ResourceGroupName, jitRequestName, parameters).Request, response); if (waitForCompletion) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); return operation; @@ -120,18 +120,18 @@ public async virtual Task CreateOrU /// The cancellation token to use. /// is empty. /// is null. - public virtual Response Get(string jitRequestName, CancellationToken cancellationToken = default) + public virtual Response Get(string jitRequestName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(jitRequestName, nameof(jitRequestName)); - using var scope = _jitRequestDefinitionJitRequestsClientDiagnostics.CreateScope("JitRequestDefinitionCollection.Get"); + using var scope = _jitRequestClientDiagnostics.CreateScope("JitRequestCollection.Get"); scope.Start(); try { - var response = _jitRequestDefinitionJitRequestsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, jitRequestName, cancellationToken); + var response = _jitRequestRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, jitRequestName, cancellationToken); if (response.Value == null) - throw _jitRequestDefinitionJitRequestsClientDiagnostics.CreateRequestFailedException(response.GetRawResponse()); - return Response.FromValue(new JitRequestDefinition(ArmClient, response.Value), response.GetRawResponse()); + throw _jitRequestClientDiagnostics.CreateRequestFailedException(response.GetRawResponse()); + return Response.FromValue(new JitRequest(ArmClient, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -145,18 +145,18 @@ public virtual Response Get(string jitRequestName, Cancell /// The cancellation token to use. /// is empty. /// is null. - public async virtual Task> GetAsync(string jitRequestName, CancellationToken cancellationToken = default) + public async virtual Task> GetAsync(string jitRequestName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(jitRequestName, nameof(jitRequestName)); - using var scope = _jitRequestDefinitionJitRequestsClientDiagnostics.CreateScope("JitRequestDefinitionCollection.Get"); + using var scope = _jitRequestClientDiagnostics.CreateScope("JitRequestCollection.Get"); scope.Start(); try { - var response = await _jitRequestDefinitionJitRequestsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, jitRequestName, cancellationToken).ConfigureAwait(false); + var response = await _jitRequestRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, jitRequestName, cancellationToken).ConfigureAwait(false); if (response.Value == null) - throw await _jitRequestDefinitionJitRequestsClientDiagnostics.CreateRequestFailedExceptionAsync(response.GetRawResponse()).ConfigureAwait(false); - return Response.FromValue(new JitRequestDefinition(ArmClient, response.Value), response.GetRawResponse()); + throw await _jitRequestClientDiagnostics.CreateRequestFailedExceptionAsync(response.GetRawResponse()).ConfigureAwait(false); + return Response.FromValue(new JitRequest(ArmClient, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -170,18 +170,18 @@ public async virtual Task> GetAsync(string jitReq /// The cancellation token to use. /// is empty. /// is null. - public virtual Response GetIfExists(string jitRequestName, CancellationToken cancellationToken = default) + public virtual Response GetIfExists(string jitRequestName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(jitRequestName, nameof(jitRequestName)); - using var scope = _jitRequestDefinitionJitRequestsClientDiagnostics.CreateScope("JitRequestDefinitionCollection.GetIfExists"); + using var scope = _jitRequestClientDiagnostics.CreateScope("JitRequestCollection.GetIfExists"); scope.Start(); try { - var response = _jitRequestDefinitionJitRequestsRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, jitRequestName, cancellationToken: cancellationToken); + var response = _jitRequestRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, jitRequestName, cancellationToken: cancellationToken); if (response.Value == null) - return Response.FromValue(null, response.GetRawResponse()); - return Response.FromValue(new JitRequestDefinition(ArmClient, response.Value), response.GetRawResponse()); + return Response.FromValue(null, response.GetRawResponse()); + return Response.FromValue(new JitRequest(ArmClient, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -195,18 +195,18 @@ public virtual Response GetIfExists(string jitRequestName, /// The cancellation token to use. /// is empty. /// is null. - public async virtual Task> GetIfExistsAsync(string jitRequestName, CancellationToken cancellationToken = default) + public async virtual Task> GetIfExistsAsync(string jitRequestName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(jitRequestName, nameof(jitRequestName)); - using var scope = _jitRequestDefinitionJitRequestsClientDiagnostics.CreateScope("JitRequestDefinitionCollection.GetIfExists"); + using var scope = _jitRequestClientDiagnostics.CreateScope("JitRequestCollection.GetIfExists"); scope.Start(); try { - var response = await _jitRequestDefinitionJitRequestsRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, jitRequestName, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _jitRequestRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, jitRequestName, cancellationToken: cancellationToken).ConfigureAwait(false); if (response.Value == null) - return Response.FromValue(null, response.GetRawResponse()); - return Response.FromValue(new JitRequestDefinition(ArmClient, response.Value), response.GetRawResponse()); + return Response.FromValue(null, response.GetRawResponse()); + return Response.FromValue(new JitRequest(ArmClient, response.Value), response.GetRawResponse()); } catch (Exception e) { @@ -224,7 +224,7 @@ public virtual Response Exists(string jitRequestName, CancellationToken ca { Argument.AssertNotNullOrEmpty(jitRequestName, nameof(jitRequestName)); - using var scope = _jitRequestDefinitionJitRequestsClientDiagnostics.CreateScope("JitRequestDefinitionCollection.Exists"); + using var scope = _jitRequestClientDiagnostics.CreateScope("JitRequestCollection.Exists"); scope.Start(); try { @@ -247,7 +247,7 @@ public async virtual Task> ExistsAsync(string jitRequestName, Can { Argument.AssertNotNullOrEmpty(jitRequestName, nameof(jitRequestName)); - using var scope = _jitRequestDefinitionJitRequestsClientDiagnostics.CreateScope("JitRequestDefinitionCollection.Exists"); + using var scope = _jitRequestClientDiagnostics.CreateScope("JitRequestCollection.Exists"); scope.Start(); try { @@ -263,17 +263,17 @@ public async virtual Task> ExistsAsync(string jitRequestName, Can /// Retrieves all JIT requests within the resource group. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAll(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) { - Page FirstPageFunc(int? pageSizeHint) + Page FirstPageFunc(int? pageSizeHint) { - using var scope = _jitRequestDefinitionJitRequestsClientDiagnostics.CreateScope("JitRequestDefinitionCollection.GetAll"); + using var scope = _jitRequestClientDiagnostics.CreateScope("JitRequestCollection.GetAll"); scope.Start(); try { - var response = _jitRequestDefinitionJitRequestsRestClient.ListByResourceGroup(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value.Select(value => new JitRequestDefinition(ArmClient, value)), null, response.GetRawResponse()); + var response = _jitRequestRestClient.ListByResourceGroup(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new JitRequest(ArmClient, value)), null, response.GetRawResponse()); } catch (Exception e) { @@ -286,17 +286,17 @@ Page FirstPageFunc(int? pageSizeHint) /// Retrieves all JIT requests within the resource group. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAllAsync(CancellationToken cancellationToken = default) { - async Task> FirstPageFunc(int? pageSizeHint) + async Task> FirstPageFunc(int? pageSizeHint) { - using var scope = _jitRequestDefinitionJitRequestsClientDiagnostics.CreateScope("JitRequestDefinitionCollection.GetAll"); + using var scope = _jitRequestClientDiagnostics.CreateScope("JitRequestCollection.GetAll"); scope.Start(); try { - var response = await _jitRequestDefinitionJitRequestsRestClient.ListByResourceGroupAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new JitRequestDefinition(ArmClient, value)), null, response.GetRawResponse()); + var response = await _jitRequestRestClient.ListByResourceGroupAsync(Id.SubscriptionId, Id.ResourceGroupName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new JitRequest(ArmClient, value)), null, response.GetRawResponse()); } catch (Exception e) { @@ -307,7 +307,7 @@ async Task> FirstPageFunc(int? pageSizeHint) return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, null); } - IEnumerator IEnumerable.GetEnumerator() + IEnumerator IEnumerable.GetEnumerator() { return GetAll().GetEnumerator(); } @@ -317,7 +317,7 @@ IEnumerator IEnumerable.GetEnumerator() return GetAll().GetEnumerator(); } - IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) { return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); } diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/JitRequestDefinitionData.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/JitRequestData.cs similarity index 75% rename from sdk/resources/Azure.ResourceManager.Resources/src/Generated/JitRequestDefinitionData.cs rename to sdk/resources/Azure.ResourceManager.Resources/src/Generated/JitRequestData.cs index 883a8a8e16f35..5baf7e5ba75eb 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/JitRequestDefinitionData.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/JitRequestData.cs @@ -12,17 +12,17 @@ namespace Azure.ResourceManager.Resources { - /// A class representing the JitRequestDefinition data model. - public partial class JitRequestDefinitionData : TrackedResource + /// A class representing the JitRequest data model. + public partial class JitRequestData : TrackedResource { - /// Initializes a new instance of JitRequestDefinitionData. + /// Initializes a new instance of JitRequestData. /// The location. - public JitRequestDefinitionData(AzureLocation location) : base(location) + public JitRequestData(AzureLocation location) : base(location) { JitAuthorizationPolicies = new ChangeTrackingList(); } - /// Initializes a new instance of JitRequestDefinitionData. + /// Initializes a new instance of JitRequestData. /// The id. /// The name. /// The type. @@ -37,7 +37,7 @@ public JitRequestDefinitionData(AzureLocation location) : base(location) /// The JIT request state. /// The client entity that created the JIT request. /// The client entity that last updated the JIT request. - internal JitRequestDefinitionData(ResourceIdentifier id, string name, ResourceType type, SystemData systemData, IDictionary tags, AzureLocation location, string applicationResourceId, string publisherTenantId, IList jitAuthorizationPolicies, JitSchedulingPolicy jitSchedulingPolicy, ProvisioningState? provisioningState, JitRequestState? jitRequestState, ApplicationClientDetails createdBy, ApplicationClientDetails updatedBy) : base(id, name, type, systemData, tags, location) + internal JitRequestData(ResourceIdentifier id, string name, ResourceType type, SystemData systemData, IDictionary tags, AzureLocation location, string applicationResourceId, string publisherTenantId, IList jitAuthorizationPolicies, JitSchedulingPolicy jitSchedulingPolicy, ProvisioningState? provisioningState, JitRequestState? jitRequestState, ApplicationClientDetails createdBy, ApplicationClientDetails updatedBy) : base(id, name, type, systemData, tags, location) { ApplicationResourceId = applicationResourceId; PublisherTenantId = publisherTenantId; diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/LongRunningOperation/JitRequestCreateOrUpdateOperation.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/LongRunningOperation/JitRequestCreateOrUpdateOperation.cs new file mode 100644 index 0000000000000..1b55a1eb7f2ac --- /dev/null +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/LongRunningOperation/JitRequestCreateOrUpdateOperation.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.Resources; + +namespace Azure.ResourceManager.Resources.Models +{ + /// Creates or updates the JIT request. + public partial class JitRequestCreateOrUpdateOperation : Operation, IOperationSource + { + private readonly OperationInternals _operation; + + private readonly ArmClient _armClient; + + /// Initializes a new instance of JitRequestCreateOrUpdateOperation for mocking. + protected JitRequestCreateOrUpdateOperation() + { + } + + internal JitRequestCreateOrUpdateOperation(ArmClient armClient, ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response) + { + _operation = new OperationInternals(this, clientDiagnostics, pipeline, request, response, OperationFinalStateVia.Location, "JitRequestCreateOrUpdateOperation"); + _armClient = armClient; + } + + /// + public override string Id => _operation.Id; + + /// + public override JitRequest Value => _operation.Value; + + /// + public override bool HasCompleted => _operation.HasCompleted; + + /// + public override bool HasValue => _operation.HasValue; + + /// + public override Response GetRawResponse() => _operation.GetRawResponse(); + + /// + public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); + + /// + public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(cancellationToken); + + /// + public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(pollingInterval, cancellationToken); + + JitRequest IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) + { + using var document = JsonDocument.Parse(response.ContentStream); + var data = JitRequestData.DeserializeJitRequestData(document.RootElement); + return new JitRequest(_armClient, data); + } + + async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) + { + using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); + var data = JitRequestData.DeserializeJitRequestData(document.RootElement); + return new JitRequest(_armClient, data); + } + } +} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/LongRunningOperation/JitRequestDefinitionCreateOrUpdateOperation.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/LongRunningOperation/JitRequestDefinitionCreateOrUpdateOperation.cs deleted file mode 100644 index 0bc4fdae37ac2..0000000000000 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/LongRunningOperation/JitRequestDefinitionCreateOrUpdateOperation.cs +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Text.Json; -using System.Threading; -using System.Threading.Tasks; -using Azure; -using Azure.Core; -using Azure.Core.Pipeline; -using Azure.ResourceManager; -using Azure.ResourceManager.Resources; - -namespace Azure.ResourceManager.Resources.Models -{ - /// Creates or updates the JIT request. - public partial class JitRequestDefinitionCreateOrUpdateOperation : Operation, IOperationSource - { - private readonly OperationInternals _operation; - - private readonly ArmClient _armClient; - - /// Initializes a new instance of JitRequestDefinitionCreateOrUpdateOperation for mocking. - protected JitRequestDefinitionCreateOrUpdateOperation() - { - } - - internal JitRequestDefinitionCreateOrUpdateOperation(ArmClient armClient, ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response) - { - _operation = new OperationInternals(this, clientDiagnostics, pipeline, request, response, OperationFinalStateVia.Location, "JitRequestDefinitionCreateOrUpdateOperation"); - _armClient = armClient; - } - - /// - public override string Id => _operation.Id; - - /// - public override JitRequestDefinition Value => _operation.Value; - - /// - public override bool HasCompleted => _operation.HasCompleted; - - /// - public override bool HasValue => _operation.HasValue; - - /// - public override Response GetRawResponse() => _operation.GetRawResponse(); - - /// - public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken); - - /// - public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken); - - /// - public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(cancellationToken); - - /// - public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(pollingInterval, cancellationToken); - - JitRequestDefinition IOperationSource.CreateResult(Response response, CancellationToken cancellationToken) - { - using var document = JsonDocument.Parse(response.ContentStream); - var data = JitRequestDefinitionData.DeserializeJitRequestDefinitionData(document.RootElement); - return new JitRequestDefinition(_armClient, data); - } - - async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken) - { - using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); - var data = JitRequestDefinitionData.DeserializeJitRequestDefinitionData(document.RootElement); - return new JitRequestDefinition(_armClient, data); - } - } -} diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/LongRunningOperation/JitRequestDefinitionDeleteOperation.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/LongRunningOperation/JitRequestDeleteOperation.cs similarity index 87% rename from sdk/resources/Azure.ResourceManager.Resources/src/Generated/LongRunningOperation/JitRequestDefinitionDeleteOperation.cs rename to sdk/resources/Azure.ResourceManager.Resources/src/Generated/LongRunningOperation/JitRequestDeleteOperation.cs index 78aaf728ddb8b..09efc9854d1f2 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/LongRunningOperation/JitRequestDefinitionDeleteOperation.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/LongRunningOperation/JitRequestDeleteOperation.cs @@ -14,16 +14,16 @@ namespace Azure.ResourceManager.Resources.Models { /// Deletes the JIT request. - public partial class JitRequestDefinitionDeleteOperation : Operation + public partial class JitRequestDeleteOperation : Operation { private readonly OperationOrResponseInternals _operation; - /// Initializes a new instance of JitRequestDefinitionDeleteOperation for mocking. - protected JitRequestDefinitionDeleteOperation() + /// Initializes a new instance of JitRequestDeleteOperation for mocking. + protected JitRequestDeleteOperation() { } - internal JitRequestDefinitionDeleteOperation(Response response) + internal JitRequestDeleteOperation(Response response) { _operation = new OperationOrResponseInternals(response); } diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/JitRequestDefinitionData.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/JitRequestData.Serialization.cs similarity index 94% rename from sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/JitRequestDefinitionData.Serialization.cs rename to sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/JitRequestData.Serialization.cs index 2de3a5a228802..0e560df01ae8f 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/JitRequestDefinitionData.Serialization.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/JitRequestData.Serialization.cs @@ -13,7 +13,7 @@ namespace Azure.ResourceManager.Resources { - public partial class JitRequestDefinitionData : IUtf8JsonSerializable + public partial class JitRequestData : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -54,7 +54,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static JitRequestDefinitionData DeserializeJitRequestDefinitionData(JsonElement element) + internal static JitRequestData DeserializeJitRequestData(JsonElement element) { IDictionary tags = default; AzureLocation location = default; @@ -195,7 +195,7 @@ internal static JitRequestDefinitionData DeserializeJitRequestDefinitionData(Jso continue; } } - return new JitRequestDefinitionData(id, name, type, systemData, tags, location, applicationResourceId.Value, publisherTenantId.Value, Optional.ToList(jitAuthorizationPolicies), jitSchedulingPolicy.Value, Optional.ToNullable(provisioningState), Optional.ToNullable(jitRequestState), createdBy.Value, updatedBy.Value); + return new JitRequestData(id, name, type, systemData, tags, location, applicationResourceId.Value, publisherTenantId.Value, Optional.ToList(jitAuthorizationPolicies), jitSchedulingPolicy.Value, Optional.ToNullable(provisioningState), Optional.ToNullable(jitRequestState), createdBy.Value, updatedBy.Value); } } } diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/JitRequestDefinitionListResult.Serialization.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/JitRequestListResult.Serialization.cs similarity index 67% rename from sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/JitRequestDefinitionListResult.Serialization.cs rename to sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/JitRequestListResult.Serialization.cs index 3f1b5ad33b6e3..93cf92fed840e 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/JitRequestDefinitionListResult.Serialization.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/JitRequestListResult.Serialization.cs @@ -12,11 +12,11 @@ namespace Azure.ResourceManager.Resources.Models { - public partial class JitRequestDefinitionListResult + public partial class JitRequestListResult { - internal static JitRequestDefinitionListResult DeserializeJitRequestDefinitionListResult(JsonElement element) + internal static JitRequestListResult DeserializeJitRequestListResult(JsonElement element) { - Optional> value = default; + Optional> value = default; Optional nextLink = default; foreach (var property in element.EnumerateObject()) { @@ -27,10 +27,10 @@ internal static JitRequestDefinitionListResult DeserializeJitRequestDefinitionLi property.ThrowNonNullablePropertyIsNull(); continue; } - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(JitRequestDefinitionData.DeserializeJitRequestDefinitionData(item)); + array.Add(JitRequestData.DeserializeJitRequestData(item)); } value = array; continue; @@ -41,7 +41,7 @@ internal static JitRequestDefinitionListResult DeserializeJitRequestDefinitionLi continue; } } - return new JitRequestDefinitionListResult(Optional.ToList(value), nextLink.Value); + return new JitRequestListResult(Optional.ToList(value), nextLink.Value); } } } diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/JitRequestDefinitionListResult.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/JitRequestListResult.cs similarity index 59% rename from sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/JitRequestDefinitionListResult.cs rename to sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/JitRequestListResult.cs index 70c28f16e1d92..440ea8e119931 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/JitRequestDefinitionListResult.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/Models/JitRequestListResult.cs @@ -12,25 +12,25 @@ namespace Azure.ResourceManager.Resources.Models { /// List of JIT requests. - public partial class JitRequestDefinitionListResult + public partial class JitRequestListResult { - /// Initializes a new instance of JitRequestDefinitionListResult. - internal JitRequestDefinitionListResult() + /// Initializes a new instance of JitRequestListResult. + internal JitRequestListResult() { - Value = new ChangeTrackingList(); + Value = new ChangeTrackingList(); } - /// Initializes a new instance of JitRequestDefinitionListResult. + /// Initializes a new instance of JitRequestListResult. /// The array of Jit request definition. /// The URL to use for getting the next set of results. - internal JitRequestDefinitionListResult(IReadOnlyList value, string nextLink) + internal JitRequestListResult(IReadOnlyList value, string nextLink) { Value = value; NextLink = nextLink; } /// The array of Jit request definition. - public IReadOnlyList Value { get; } + public IReadOnlyList Value { get; } /// The URL to use for getting the next set of results. public string NextLink { get; } } diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/RestOperations/JitRequestsRestOperations.cs b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/RestOperations/JitRequestsRestOperations.cs index 99e58eb4a7c7b..7e825aa53eccf 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/Generated/RestOperations/JitRequestsRestOperations.cs +++ b/sdk/resources/Azure.ResourceManager.Resources/src/Generated/RestOperations/JitRequestsRestOperations.cs @@ -68,7 +68,7 @@ internal Azure.Core.HttpMessage CreateGetRequest(string subscriptionId, string r /// The name of the JIT request. /// The cancellation token to use. /// , , or is null. - public async Task> GetAsync(string subscriptionId, string resourceGroupName, string jitRequestName, CancellationToken cancellationToken = default) + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string jitRequestName, CancellationToken cancellationToken = default) { if (subscriptionId == null) { @@ -89,13 +89,13 @@ public async Task> GetAsync(string subscripti { case 200: { - JitRequestDefinitionData value = default; + JitRequestData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = JitRequestDefinitionData.DeserializeJitRequestDefinitionData(document.RootElement); + value = JitRequestData.DeserializeJitRequestData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((JitRequestDefinitionData)null, message.Response); + return Response.FromValue((JitRequestData)null, message.Response); default: throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false); } @@ -107,7 +107,7 @@ public async Task> GetAsync(string subscripti /// The name of the JIT request. /// The cancellation token to use. /// , , or is null. - public Response Get(string subscriptionId, string resourceGroupName, string jitRequestName, CancellationToken cancellationToken = default) + public Response Get(string subscriptionId, string resourceGroupName, string jitRequestName, CancellationToken cancellationToken = default) { if (subscriptionId == null) { @@ -128,19 +128,19 @@ public Response Get(string subscriptionId, string reso { case 200: { - JitRequestDefinitionData value = default; + JitRequestData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = JitRequestDefinitionData.DeserializeJitRequestDefinitionData(document.RootElement); + value = JitRequestData.DeserializeJitRequestData(document.RootElement); return Response.FromValue(value, message.Response); } case 404: - return Response.FromValue((JitRequestDefinitionData)null, message.Response); + return Response.FromValue((JitRequestData)null, message.Response); default: throw _clientDiagnostics.CreateRequestFailedException(message.Response); } } - internal Azure.Core.HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string jitRequestName, JitRequestDefinitionData parameters) + internal Azure.Core.HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string jitRequestName, JitRequestData parameters) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -171,7 +171,7 @@ internal Azure.Core.HttpMessage CreateCreateOrUpdateRequest(string subscriptionI /// Parameters supplied to the update JIT request. /// The cancellation token to use. /// , , , or is null. - public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string jitRequestName, JitRequestDefinitionData parameters, CancellationToken cancellationToken = default) + public async Task CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string jitRequestName, JitRequestData parameters, CancellationToken cancellationToken = default) { if (subscriptionId == null) { @@ -209,7 +209,7 @@ public async Task CreateOrUpdateAsync(string subscriptionId, string re /// Parameters supplied to the update JIT request. /// The cancellation token to use. /// , , , or is null. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string jitRequestName, JitRequestDefinitionData parameters, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string jitRequestName, JitRequestData parameters, CancellationToken cancellationToken = default) { if (subscriptionId == null) { @@ -280,7 +280,7 @@ internal Azure.Core.HttpMessage CreateUpdateRequest(string subscriptionId, strin /// Jit request tags. /// The cancellation token to use. /// , , or is null. - public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string jitRequestName, IDictionary tags = null, CancellationToken cancellationToken = default) + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string jitRequestName, IDictionary tags = null, CancellationToken cancellationToken = default) { if (subscriptionId == null) { @@ -301,9 +301,9 @@ public async Task> UpdateAsync(string subscri { case 200: { - JitRequestDefinitionData value = default; + JitRequestData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = JitRequestDefinitionData.DeserializeJitRequestDefinitionData(document.RootElement); + value = JitRequestData.DeserializeJitRequestData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -318,7 +318,7 @@ public async Task> UpdateAsync(string subscri /// Jit request tags. /// The cancellation token to use. /// , , or is null. - public Response Update(string subscriptionId, string resourceGroupName, string jitRequestName, IDictionary tags = null, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string jitRequestName, IDictionary tags = null, CancellationToken cancellationToken = default) { if (subscriptionId == null) { @@ -339,9 +339,9 @@ public Response Update(string subscriptionId, string r { case 200: { - JitRequestDefinitionData value = default; + JitRequestData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = JitRequestDefinitionData.DeserializeJitRequestDefinitionData(document.RootElement); + value = JitRequestData.DeserializeJitRequestData(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -456,7 +456,7 @@ internal Azure.Core.HttpMessage CreateListBySubscriptionRequest(string subscript /// The Microsoft Azure subscription ID. /// The cancellation token to use. /// is null. - public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) + public async Task> ListBySubscriptionAsync(string subscriptionId, CancellationToken cancellationToken = default) { if (subscriptionId == null) { @@ -469,9 +469,9 @@ public async Task> ListBySubscriptionAs { case 200: { - JitRequestDefinitionListResult value = default; + JitRequestListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = JitRequestDefinitionListResult.DeserializeJitRequestDefinitionListResult(document.RootElement); + value = JitRequestListResult.DeserializeJitRequestListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -483,7 +483,7 @@ public async Task> ListBySubscriptionAs /// The Microsoft Azure subscription ID. /// The cancellation token to use. /// is null. - public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) + public Response ListBySubscription(string subscriptionId, CancellationToken cancellationToken = default) { if (subscriptionId == null) { @@ -496,9 +496,9 @@ public Response ListBySubscription(string subscr { case 200: { - JitRequestDefinitionListResult value = default; + JitRequestListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = JitRequestDefinitionListResult.DeserializeJitRequestDefinitionListResult(document.RootElement); + value = JitRequestListResult.DeserializeJitRequestListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -530,7 +530,7 @@ internal Azure.Core.HttpMessage CreateListByResourceGroupRequest(string subscrip /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. - public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + public async Task> ListByResourceGroupAsync(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { if (subscriptionId == null) { @@ -547,9 +547,9 @@ public async Task> ListByResourceGroupA { case 200: { - JitRequestDefinitionListResult value = default; + JitRequestListResult value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = JitRequestDefinitionListResult.DeserializeJitRequestDefinitionListResult(document.RootElement); + value = JitRequestListResult.DeserializeJitRequestListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: @@ -562,7 +562,7 @@ public async Task> ListByResourceGroupA /// The name of the resource group. The name is case insensitive. /// The cancellation token to use. /// or is null. - public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) + public Response ListByResourceGroup(string subscriptionId, string resourceGroupName, CancellationToken cancellationToken = default) { if (subscriptionId == null) { @@ -579,9 +579,9 @@ public Response ListByResourceGroup(string subsc { case 200: { - JitRequestDefinitionListResult value = default; + JitRequestListResult value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); - value = JitRequestDefinitionListResult.DeserializeJitRequestDefinitionListResult(document.RootElement); + value = JitRequestListResult.DeserializeJitRequestListResult(document.RootElement); return Response.FromValue(value, message.Response); } default: diff --git a/sdk/resources/Azure.ResourceManager.Resources/src/autorest.md b/sdk/resources/Azure.ResourceManager.Resources/src/autorest.md index ceabdef7db67d..4d8bcb785445c 100644 --- a/sdk/resources/Azure.ResourceManager.Resources/src/autorest.md +++ b/sdk/resources/Azure.ResourceManager.Resources/src/autorest.md @@ -146,6 +146,8 @@ directive: $["Operation"]["x-ms-client-name"] = "ApplicationOperation"; $["Operation"]["properties"]["displayOfApplication"] = $["Operation"]["properties"]["display"]; $["Operation"]["properties"]["display"] = undefined; + $["JitRequestDefinition"]["x-ms-client-name"] = "JitRequest"; + $["JitRequestDefinitionListResult"]["x-ms-client-name"] = "JitRequestListResult"; ``` ### Tag: package-track2-preview