diff --git a/sdk/automation/Azure.ResourceManager.Automation/api/Azure.ResourceManager.Automation.netstandard2.0.cs b/sdk/automation/Azure.ResourceManager.Automation/api/Azure.ResourceManager.Automation.netstandard2.0.cs index 11c0f5b978c3e..b72c45a2c6680 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/api/Azure.ResourceManager.Automation.netstandard2.0.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/api/Azure.ResourceManager.Automation.netstandard2.0.cs @@ -78,8 +78,8 @@ protected AutomationAccountModuleResource() { } public partial class AutomationAccountPython2PackageCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable { protected AutomationAccountPython2PackageCollection() { } - public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string packageName, Azure.ResourceManager.Automation.Models.AutomationAccountPython2PackageCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string packageName, Azure.ResourceManager.Automation.Models.AutomationAccountPython2PackageCreateOrUpdateContent content, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string packageName, Azure.ResourceManager.Automation.Models.PythonPackageCreateParameters pythonPackageCreateParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string packageName, Azure.ResourceManager.Automation.Models.PythonPackageCreateParameters pythonPackageCreateParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Exists(string packageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> ExistsAsync(string packageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Get(string packageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -107,8 +107,43 @@ protected AutomationAccountPython2PackageResource() { } public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response Update(Azure.ResourceManager.Automation.Models.AutomationAccountPython2PackagePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.Automation.Models.AutomationAccountPython2PackagePatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Update(Azure.ResourceManager.Automation.Models.PythonPackageUpdateParameters pythonPackageUpdateParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.Automation.Models.PythonPackageUpdateParameters pythonPackageUpdateParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public partial class AutomationAccountPython3PackageCollection : Azure.ResourceManager.ArmCollection, System.Collections.Generic.IAsyncEnumerable, System.Collections.Generic.IEnumerable, System.Collections.IEnumerable + { + protected AutomationAccountPython3PackageCollection() { } + public virtual Azure.ResourceManager.ArmOperation CreateOrUpdate(Azure.WaitUntil waitUntil, string packageName, Azure.ResourceManager.Automation.Models.PythonPackageCreateParameters pythonPackageCreateParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateAsync(Azure.WaitUntil waitUntil, string packageName, Azure.ResourceManager.Automation.Models.PythonPackageCreateParameters pythonPackageCreateParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Exists(string packageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> ExistsAsync(string packageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(string packageName, 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 packageName, 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 AutomationAccountPython3PackageResource : Azure.ResourceManager.ArmResource + { + public static readonly Azure.Core.ResourceType ResourceType; + protected AutomationAccountPython3PackageResource() { } + public virtual Azure.ResourceManager.Automation.ModuleData Data { get { throw null; } } + public virtual bool HasData { get { throw null; } } + public virtual Azure.Response AddTag(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> AddTagAsync(string key, string value, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public static Azure.Core.ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName) { throw null; } + public virtual Azure.ResourceManager.ArmOperation Delete(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAsync(Azure.WaitUntil waitUntil, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Get(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response RemoveTag(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> RemoveTagAsync(string key, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response SetTags(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> SetTagsAsync(System.Collections.Generic.IDictionary tags, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response Update(Azure.ResourceManager.Automation.Models.PythonPackageUpdateParameters pythonPackageUpdateParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.Automation.Models.PythonPackageUpdateParameters pythonPackageUpdateParameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } public partial class AutomationAccountResource : Azure.ResourceManager.ArmResource { @@ -139,6 +174,9 @@ protected AutomationAccountResource() { } public virtual Azure.Response GetAutomationAccountPython2Package(string packageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAutomationAccountPython2PackageAsync(string packageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.Automation.AutomationAccountPython2PackageCollection GetAutomationAccountPython2Packages() { throw null; } + public virtual Azure.Response GetAutomationAccountPython3Package(string packageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAutomationAccountPython3PackageAsync(string packageName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.ResourceManager.Automation.AutomationAccountPython3PackageCollection GetAutomationAccountPython3Packages() { throw null; } public virtual Azure.Response GetAutomationPrivateEndpointConnection(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetAutomationPrivateEndpointConnectionAsync(string privateEndpointConnectionName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.ResourceManager.Automation.AutomationPrivateEndpointConnectionCollection GetAutomationPrivateEndpointConnections() { throw null; } @@ -233,6 +271,7 @@ public static partial class AutomationExtensions public static System.Threading.Tasks.Task> GetAutomationAccountAsync(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource, string automationAccountName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public static Azure.ResourceManager.Automation.AutomationAccountModuleResource GetAutomationAccountModuleResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.Automation.AutomationAccountPython2PackageResource GetAutomationAccountPython2PackageResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } + public static Azure.ResourceManager.Automation.AutomationAccountPython3PackageResource GetAutomationAccountPython3PackageResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.Automation.AutomationAccountResource GetAutomationAccountResource(this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier id) { throw null; } public static Azure.ResourceManager.Automation.AutomationAccountCollection GetAutomationAccounts(this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource) { throw null; } public static Azure.Pageable GetAutomationAccounts(this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -899,8 +938,8 @@ protected RunbookResource() { } public virtual System.Threading.Tasks.Task StopTestJobAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response SuspendTestJob(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task SuspendTestJobAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual Azure.Response UndoEditRunbookDraft(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UndoEditRunbookDraftAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response UndoEditRunbookDraft(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task UndoEditRunbookDraftAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Response Update(Azure.ResourceManager.Automation.Models.RunbookPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> UpdateAsync(Azure.ResourceManager.Automation.Models.RunbookPatch patch, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } @@ -1310,17 +1349,6 @@ public AutomationAccountPatch() { } public Azure.ResourceManager.Automation.Models.AutomationSku Sku { get { throw null; } set { } } public System.Collections.Generic.IDictionary Tags { get { throw null; } } } - public partial class AutomationAccountPython2PackageCreateOrUpdateContent - { - public AutomationAccountPython2PackageCreateOrUpdateContent(Azure.ResourceManager.Automation.Models.ContentLink contentLink) { } - public Azure.ResourceManager.Automation.Models.ContentLink ContentLink { get { throw null; } } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } - } - public partial class AutomationAccountPython2PackagePatch - { - public AutomationAccountPython2PackagePatch() { } - public System.Collections.Generic.IDictionary Tags { get { throw null; } } - } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct AutomationAccountState : System.IEquatable { @@ -1770,69 +1798,6 @@ public GraphicalRunbookContent() { } public static bool operator !=(Azure.ResourceManager.Automation.Models.GroupTypeEnum left, Azure.ResourceManager.Automation.Models.GroupTypeEnum right) { throw null; } public override string ToString() { throw null; } } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct HttpStatusCode : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public HttpStatusCode(string value) { throw null; } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode Accepted { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode Ambiguous { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode BadGateway { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode BadRequest { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode Conflict { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode Continue { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode Created { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode ExpectationFailed { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode Forbidden { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode Found { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode GatewayTimeout { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode Gone { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode HttpVersionNotSupported { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode InternalServerError { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode LengthRequired { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode MethodNotAllowed { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode Moved { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode MovedPermanently { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode MultipleChoices { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode NoContent { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode NonAuthoritativeInformation { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode NotAcceptable { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode NotFound { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode NotImplemented { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode NotModified { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode OK { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode PartialContent { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode PaymentRequired { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode PreconditionFailed { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode ProxyAuthenticationRequired { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode Redirect { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode RedirectKeepVerb { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode RedirectMethod { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode RequestedRangeNotSatisfiable { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode RequestEntityTooLarge { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode RequestTimeout { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode RequestUriTooLong { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode ResetContent { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode SeeOther { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode ServiceUnavailable { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode SwitchingProtocols { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode TemporaryRedirect { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode Unauthorized { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode UnsupportedMediaType { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode Unused { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode UpgradeRequired { get { throw null; } } - public static Azure.ResourceManager.Automation.Models.HttpStatusCode UseProxy { get { throw null; } } - public bool Equals(Azure.ResourceManager.Automation.Models.HttpStatusCode other) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override bool Equals(object obj) { throw null; } - [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.ResourceManager.Automation.Models.HttpStatusCode left, Azure.ResourceManager.Automation.Models.HttpStatusCode right) { throw null; } - public static implicit operator Azure.ResourceManager.Automation.Models.HttpStatusCode (string value) { throw null; } - public static bool operator !=(Azure.ResourceManager.Automation.Models.HttpStatusCode left, Azure.ResourceManager.Automation.Models.HttpStatusCode right) { throw null; } - public override string ToString() { throw null; } - } public partial class HybridRunbookWorkerCreateOrUpdateContent { public HybridRunbookWorkerCreateOrUpdateContent() { } @@ -2019,24 +1984,37 @@ public ModuleErrorInfo() { } public string Code { get { throw null; } set { } } public string Message { get { throw null; } set { } } } - public enum ModuleProvisioningState - { - Created = 0, - Creating = 1, - StartingImportModuleRunbook = 2, - RunningImportModuleRunbook = 3, - ContentRetrieved = 4, - ContentDownloaded = 5, - ContentValidated = 6, - ConnectionTypeImported = 7, - ContentStored = 8, - ModuleDataStored = 9, - ActivitiesStored = 10, - ModuleImportRunbookComplete = 11, - Succeeded = 12, - Failed = 13, - Cancelled = 14, - Updating = 15, + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct ModuleProvisioningState : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public ModuleProvisioningState(string value) { throw null; } + public static Azure.ResourceManager.Automation.Models.ModuleProvisioningState ActivitiesStored { get { throw null; } } + public static Azure.ResourceManager.Automation.Models.ModuleProvisioningState Cancelled { get { throw null; } } + public static Azure.ResourceManager.Automation.Models.ModuleProvisioningState ConnectionTypeImported { get { throw null; } } + public static Azure.ResourceManager.Automation.Models.ModuleProvisioningState ContentDownloaded { get { throw null; } } + public static Azure.ResourceManager.Automation.Models.ModuleProvisioningState ContentRetrieved { get { throw null; } } + public static Azure.ResourceManager.Automation.Models.ModuleProvisioningState ContentStored { get { throw null; } } + public static Azure.ResourceManager.Automation.Models.ModuleProvisioningState ContentValidated { get { throw null; } } + public static Azure.ResourceManager.Automation.Models.ModuleProvisioningState Created { get { throw null; } } + public static Azure.ResourceManager.Automation.Models.ModuleProvisioningState Creating { get { throw null; } } + public static Azure.ResourceManager.Automation.Models.ModuleProvisioningState Failed { get { throw null; } } + public static Azure.ResourceManager.Automation.Models.ModuleProvisioningState ModuleDataStored { get { throw null; } } + public static Azure.ResourceManager.Automation.Models.ModuleProvisioningState ModuleImportRunbookComplete { get { throw null; } } + public static Azure.ResourceManager.Automation.Models.ModuleProvisioningState RunningImportModuleRunbook { get { throw null; } } + public static Azure.ResourceManager.Automation.Models.ModuleProvisioningState StartingImportModuleRunbook { get { throw null; } } + public static Azure.ResourceManager.Automation.Models.ModuleProvisioningState Succeeded { get { throw null; } } + public static Azure.ResourceManager.Automation.Models.ModuleProvisioningState Updating { get { throw null; } } + public bool Equals(Azure.ResourceManager.Automation.Models.ModuleProvisioningState other) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override bool Equals(object obj) { throw null; } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.ResourceManager.Automation.Models.ModuleProvisioningState left, Azure.ResourceManager.Automation.Models.ModuleProvisioningState right) { throw null; } + public static implicit operator Azure.ResourceManager.Automation.Models.ModuleProvisioningState (string value) { throw null; } + public static bool operator !=(Azure.ResourceManager.Automation.Models.ModuleProvisioningState left, Azure.ResourceManager.Automation.Models.ModuleProvisioningState right) { throw null; } + public override string ToString() { throw null; } } public partial class NodeCount { @@ -2074,6 +2052,17 @@ public enum OperatingSystemType public static bool operator !=(Azure.ResourceManager.Automation.Models.ProvisioningState left, Azure.ResourceManager.Automation.Models.ProvisioningState right) { throw null; } public override string ToString() { throw null; } } + public partial class PythonPackageCreateParameters + { + public PythonPackageCreateParameters(Azure.ResourceManager.Automation.Models.ContentLink contentLink) { } + public Azure.ResourceManager.Automation.Models.ContentLink ContentLink { get { throw null; } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + } + public partial class PythonPackageUpdateParameters + { + public PythonPackageUpdateParameters() { } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + } public partial class RawGraphicalRunbookContent { public RawGraphicalRunbookContent() { } @@ -2110,12 +2099,6 @@ public RunbookDraft() { } public System.Collections.Generic.IList OutputTypes { get { throw null; } } public System.Collections.Generic.IDictionary Parameters { get { throw null; } } } - public partial class RunbookDraftUndoEditResult - { - internal RunbookDraftUndoEditResult() { } - public string RequestId { get { throw null; } } - public Azure.ResourceManager.Automation.Models.HttpStatusCode? StatusCode { get { throw null; } } - } public partial class RunbookParameter { public RunbookParameter() { } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountPython2PackageCollection.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountPython2PackageCollection.cs index f1380e972938d..c90af368b0e11 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountPython2PackageCollection.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountPython2PackageCollection.cs @@ -61,20 +61,20 @@ internal static void ValidateResourceId(ResourceIdentifier id) /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The name of python package. - /// The create or update parameters for python package. + /// The create or update parameters for python package. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string packageName, AutomationAccountPython2PackageCreateOrUpdateContent content, CancellationToken cancellationToken = default) + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string packageName, PythonPackageCreateParameters pythonPackageCreateParameters, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(pythonPackageCreateParameters, nameof(pythonPackageCreateParameters)); using var scope = _automationAccountPython2PackagePython2PackageClientDiagnostics.CreateScope("AutomationAccountPython2PackageCollection.CreateOrUpdate"); scope.Start(); try { - var response = await _automationAccountPython2PackagePython2PackageRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, packageName, content, cancellationToken).ConfigureAwait(false); + var response = await _automationAccountPython2PackagePython2PackageRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, packageName, pythonPackageCreateParameters, cancellationToken).ConfigureAwait(false); var operation = new AutomationArmOperation(Response.FromValue(new AutomationAccountPython2PackageResource(Client, response), response.GetRawResponse())); if (waitUntil == WaitUntil.Completed) await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); @@ -94,20 +94,20 @@ public virtual async Task> /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. /// The name of python package. - /// The create or update parameters for python package. + /// The create or update parameters for python package. /// The cancellation token to use. /// is an empty string, and was expected to be non-empty. - /// or is null. - public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string packageName, AutomationAccountPython2PackageCreateOrUpdateContent content, CancellationToken cancellationToken = default) + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string packageName, PythonPackageCreateParameters pythonPackageCreateParameters, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(pythonPackageCreateParameters, nameof(pythonPackageCreateParameters)); using var scope = _automationAccountPython2PackagePython2PackageClientDiagnostics.CreateScope("AutomationAccountPython2PackageCollection.CreateOrUpdate"); scope.Start(); try { - var response = _automationAccountPython2PackagePython2PackageRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, packageName, content, cancellationToken); + var response = _automationAccountPython2PackagePython2PackageRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, packageName, pythonPackageCreateParameters, cancellationToken); var operation = new AutomationArmOperation(Response.FromValue(new AutomationAccountPython2PackageResource(Client, response), response.GetRawResponse())); if (waitUntil == WaitUntil.Completed) operation.WaitForCompletion(cancellationToken); diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountPython2PackageResource.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountPython2PackageResource.cs index 16de47fa9ccdb..e8887b56f212f 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountPython2PackageResource.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountPython2PackageResource.cs @@ -193,18 +193,18 @@ public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancel /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python2Packages/{packageName} /// Operation Id: Python2Package_Update /// - /// The update parameters for python package. + /// The update parameters for python package. /// The cancellation token to use. - /// is null. - public virtual async Task> UpdateAsync(AutomationAccountPython2PackagePatch patch, CancellationToken cancellationToken = default) + /// is null. + public virtual async Task> UpdateAsync(PythonPackageUpdateParameters pythonPackageUpdateParameters, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(patch, nameof(patch)); + Argument.AssertNotNull(pythonPackageUpdateParameters, nameof(pythonPackageUpdateParameters)); using var scope = _automationAccountPython2PackagePython2PackageClientDiagnostics.CreateScope("AutomationAccountPython2PackageResource.Update"); scope.Start(); try { - var response = await _automationAccountPython2PackagePython2PackageRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken).ConfigureAwait(false); + var response = await _automationAccountPython2PackagePython2PackageRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, pythonPackageUpdateParameters, cancellationToken).ConfigureAwait(false); return Response.FromValue(new AutomationAccountPython2PackageResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) @@ -219,18 +219,18 @@ public virtual async Task> Upd /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python2Packages/{packageName} /// Operation Id: Python2Package_Update /// - /// The update parameters for python package. + /// The update parameters for python package. /// The cancellation token to use. - /// is null. - public virtual Response Update(AutomationAccountPython2PackagePatch patch, CancellationToken cancellationToken = default) + /// is null. + public virtual Response Update(PythonPackageUpdateParameters pythonPackageUpdateParameters, CancellationToken cancellationToken = default) { - Argument.AssertNotNull(patch, nameof(patch)); + Argument.AssertNotNull(pythonPackageUpdateParameters, nameof(pythonPackageUpdateParameters)); using var scope = _automationAccountPython2PackagePython2PackageClientDiagnostics.CreateScope("AutomationAccountPython2PackageResource.Update"); scope.Start(); try { - var response = _automationAccountPython2PackagePython2PackageRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, patch, cancellationToken); + var response = _automationAccountPython2PackagePython2PackageRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, pythonPackageUpdateParameters, cancellationToken); return Response.FromValue(new AutomationAccountPython2PackageResource(Client, response.Value), response.GetRawResponse()); } catch (Exception e) @@ -269,7 +269,7 @@ public virtual async Task> Add else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new AutomationAccountPython2PackagePatch(); + var patch = new PythonPackageUpdateParameters(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -315,7 +315,7 @@ public virtual Response AddTag(string k else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new AutomationAccountPython2PackagePatch(); + var patch = new PythonPackageUpdateParameters(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -360,7 +360,7 @@ public virtual async Task> Set else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new AutomationAccountPython2PackagePatch(); + var patch = new PythonPackageUpdateParameters(); patch.Tags.ReplaceWith(tags); var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); return result; @@ -401,7 +401,7 @@ public virtual Response SetTags(IDictio else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new AutomationAccountPython2PackagePatch(); + var patch = new PythonPackageUpdateParameters(); patch.Tags.ReplaceWith(tags); var result = Update(patch, cancellationToken: cancellationToken); return result; @@ -441,7 +441,7 @@ public virtual async Task> Rem else { var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; - var patch = new AutomationAccountPython2PackagePatch(); + var patch = new PythonPackageUpdateParameters(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); @@ -485,7 +485,7 @@ public virtual Response RemoveTag(strin else { var current = Get(cancellationToken: cancellationToken).Value.Data; - var patch = new AutomationAccountPython2PackagePatch(); + var patch = new PythonPackageUpdateParameters(); foreach (var tag in current.Tags) { patch.Tags.Add(tag); diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountPython3PackageCollection.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountPython3PackageCollection.cs new file mode 100644 index 0000000000000..42f2d192ecf7c --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountPython3PackageCollection.cs @@ -0,0 +1,334 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.Automation.Models; + +namespace Azure.ResourceManager.Automation +{ + /// + /// A class representing a collection of and their operations. + /// Each in the collection will belong to the same instance of . + /// To get an instance call the GetAutomationAccountPython3Packages method from an instance of . + /// + public partial class AutomationAccountPython3PackageCollection : ArmCollection, IEnumerable, IAsyncEnumerable + { + private readonly ClientDiagnostics _automationAccountPython3PackagePython3PackageClientDiagnostics; + private readonly Python3PackageRestOperations _automationAccountPython3PackagePython3PackageRestClient; + + /// Initializes a new instance of the class for mocking. + protected AutomationAccountPython3PackageCollection() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the parent resource that is the target of operations. + internal AutomationAccountPython3PackageCollection(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _automationAccountPython3PackagePython3PackageClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Automation", AutomationAccountPython3PackageResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(AutomationAccountPython3PackageResource.ResourceType, out string automationAccountPython3PackagePython3PackageApiVersion); + _automationAccountPython3PackagePython3PackageRestClient = new Python3PackageRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, automationAccountPython3PackagePython3PackageApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != AutomationAccountResource.ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, AutomationAccountResource.ResourceType), nameof(id)); + } + + /// + /// Create or Update the python 3 package identified by package name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName} + /// Operation Id: Python3Package_CreateOrUpdate + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of python package. + /// The create or update parameters for python package. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual async Task> CreateOrUpdateAsync(WaitUntil waitUntil, string packageName, PythonPackageCreateParameters pythonPackageCreateParameters, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + Argument.AssertNotNull(pythonPackageCreateParameters, nameof(pythonPackageCreateParameters)); + + using var scope = _automationAccountPython3PackagePython3PackageClientDiagnostics.CreateScope("AutomationAccountPython3PackageCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = await _automationAccountPython3PackagePython3PackageRestClient.CreateOrUpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, packageName, pythonPackageCreateParameters, cancellationToken).ConfigureAwait(false); + var operation = new AutomationArmOperation(Response.FromValue(new AutomationAccountPython3PackageResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Create or Update the python 3 package identified by package name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName} + /// Operation Id: Python3Package_CreateOrUpdate + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The name of python package. + /// The create or update parameters for python package. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// or is null. + public virtual ArmOperation CreateOrUpdate(WaitUntil waitUntil, string packageName, PythonPackageCreateParameters pythonPackageCreateParameters, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + Argument.AssertNotNull(pythonPackageCreateParameters, nameof(pythonPackageCreateParameters)); + + using var scope = _automationAccountPython3PackagePython3PackageClientDiagnostics.CreateScope("AutomationAccountPython3PackageCollection.CreateOrUpdate"); + scope.Start(); + try + { + var response = _automationAccountPython3PackagePython3PackageRestClient.CreateOrUpdate(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, packageName, pythonPackageCreateParameters, cancellationToken); + var operation = new AutomationArmOperation(Response.FromValue(new AutomationAccountPython3PackageResource(Client, response), response.GetRawResponse())); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletion(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Retrieve the python 3 package identified by package name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName} + /// Operation Id: Python3Package_Get + /// + /// The python package name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> GetAsync(string packageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + + using var scope = _automationAccountPython3PackagePython3PackageClientDiagnostics.CreateScope("AutomationAccountPython3PackageCollection.Get"); + scope.Start(); + try + { + var response = await _automationAccountPython3PackagePython3PackageRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, packageName, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AutomationAccountPython3PackageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Retrieve the python 3 package identified by package name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName} + /// Operation Id: Python3Package_Get + /// + /// The python package name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Get(string packageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + + using var scope = _automationAccountPython3PackagePython3PackageClientDiagnostics.CreateScope("AutomationAccountPython3PackageCollection.Get"); + scope.Start(); + try + { + var response = _automationAccountPython3PackagePython3PackageRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, packageName, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AutomationAccountPython3PackageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Retrieve a list of python 3 packages. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages + /// Operation Id: Python3Package_ListByAutomationAccount + /// + /// 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) + { + async Task> FirstPageFunc(int? pageSizeHint) + { + using var scope = _automationAccountPython3PackagePython3PackageClientDiagnostics.CreateScope("AutomationAccountPython3PackageCollection.GetAll"); + scope.Start(); + try + { + var response = await _automationAccountPython3PackagePython3PackageRestClient.ListByAutomationAccountAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new AutomationAccountPython3PackageResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + async Task> NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _automationAccountPython3PackagePython3PackageClientDiagnostics.CreateScope("AutomationAccountPython3PackageCollection.GetAll"); + scope.Start(); + try + { + var response = await _automationAccountPython3PackagePython3PackageRestClient.ListByAutomationAccountNextPageAsync(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value.Select(value => new AutomationAccountPython3PackageResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Retrieve a list of python 3 packages. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages + /// Operation Id: Python3Package_ListByAutomationAccount + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAll(CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) + { + using var scope = _automationAccountPython3PackagePython3PackageClientDiagnostics.CreateScope("AutomationAccountPython3PackageCollection.GetAll"); + scope.Start(); + try + { + var response = _automationAccountPython3PackagePython3PackageRestClient.ListByAutomationAccount(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new AutomationAccountPython3PackageResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + Page NextPageFunc(string nextLink, int? pageSizeHint) + { + using var scope = _automationAccountPython3PackagePython3PackageClientDiagnostics.CreateScope("AutomationAccountPython3PackageCollection.GetAll"); + scope.Start(); + try + { + var response = _automationAccountPython3PackagePython3PackageRestClient.ListByAutomationAccountNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new AutomationAccountPython3PackageResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + } + + /// + /// Checks to see if the resource exists in azure. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName} + /// Operation Id: Python3Package_Get + /// + /// The python package name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual async Task> ExistsAsync(string packageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + + using var scope = _automationAccountPython3PackagePython3PackageClientDiagnostics.CreateScope("AutomationAccountPython3PackageCollection.Exists"); + scope.Start(); + try + { + var response = await _automationAccountPython3PackagePython3PackageRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, packageName, cancellationToken: cancellationToken).ConfigureAwait(false); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Checks to see if the resource exists in azure. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName} + /// Operation Id: Python3Package_Get + /// + /// The python package name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + public virtual Response Exists(string packageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + + using var scope = _automationAccountPython3PackagePython3PackageClientDiagnostics.CreateScope("AutomationAccountPython3PackageCollection.Exists"); + scope.Start(); + try + { + var response = _automationAccountPython3PackagePython3PackageRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, packageName, cancellationToken: cancellationToken); + return Response.FromValue(response.Value != null, response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + return GetAll().GetEnumerator(); + } + + IAsyncEnumerator IAsyncEnumerable.GetAsyncEnumerator(CancellationToken cancellationToken) + { + return GetAllAsync(cancellationToken: cancellationToken).GetAsyncEnumerator(cancellationToken); + } + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountPython3PackageResource.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountPython3PackageResource.cs new file mode 100644 index 0000000000000..94d140bd5a152 --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountPython3PackageResource.cs @@ -0,0 +1,505 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Threading; +using System.Threading.Tasks; +using Azure; +using Azure.Core; +using Azure.Core.Pipeline; +using Azure.ResourceManager; +using Azure.ResourceManager.Automation.Models; + +namespace Azure.ResourceManager.Automation +{ + /// + /// A Class representing an AutomationAccountPython3Package along with the instance operations that can be performed on it. + /// If you have a you can construct an + /// from an instance of using the GetAutomationAccountPython3PackageResource method. + /// Otherwise you can get one from its parent resource using the GetAutomationAccountPython3Package method. + /// + public partial class AutomationAccountPython3PackageResource : ArmResource + { + /// Generate the resource identifier of a instance. + public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName) + { + var resourceId = $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName}"; + return new ResourceIdentifier(resourceId); + } + + private readonly ClientDiagnostics _automationAccountPython3PackagePython3PackageClientDiagnostics; + private readonly Python3PackageRestOperations _automationAccountPython3PackagePython3PackageRestClient; + private readonly ModuleData _data; + + /// Initializes a new instance of the class for mocking. + protected AutomationAccountPython3PackageResource() + { + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The resource that is the target of operations. + internal AutomationAccountPython3PackageResource(ArmClient client, ModuleData data) : this(client, data.Id) + { + HasData = true; + _data = data; + } + + /// Initializes a new instance of the class. + /// The client parameters to use in these operations. + /// The identifier of the resource that is the target of operations. + internal AutomationAccountPython3PackageResource(ArmClient client, ResourceIdentifier id) : base(client, id) + { + _automationAccountPython3PackagePython3PackageClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Automation", ResourceType.Namespace, Diagnostics); + TryGetApiVersion(ResourceType, out string automationAccountPython3PackagePython3PackageApiVersion); + _automationAccountPython3PackagePython3PackageRestClient = new Python3PackageRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, automationAccountPython3PackagePython3PackageApiVersion); +#if DEBUG + ValidateResourceId(Id); +#endif + } + + /// Gets the resource type for the operations. + public static readonly ResourceType ResourceType = "Microsoft.Automation/automationAccounts/python3Packages"; + + /// Gets whether or not the current instance has data. + public virtual bool HasData { get; } + + /// Gets the data representing this Feature. + /// Throws if there is no data loaded in the current instance. + public virtual ModuleData Data + { + get + { + if (!HasData) + throw new InvalidOperationException("The current instance does not have data, you must call Get first."); + return _data; + } + } + + internal static void ValidateResourceId(ResourceIdentifier id) + { + if (id.ResourceType != ResourceType) + throw new ArgumentException(string.Format(CultureInfo.CurrentCulture, "Invalid resource type {0} expected {1}", id.ResourceType, ResourceType), nameof(id)); + } + + /// + /// Retrieve the python 3 package identified by package name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName} + /// Operation Id: Python3Package_Get + /// + /// The cancellation token to use. + public virtual async Task> GetAsync(CancellationToken cancellationToken = default) + { + using var scope = _automationAccountPython3PackagePython3PackageClientDiagnostics.CreateScope("AutomationAccountPython3PackageResource.Get"); + scope.Start(); + try + { + var response = await _automationAccountPython3PackagePython3PackageRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AutomationAccountPython3PackageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Retrieve the python 3 package identified by package name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName} + /// Operation Id: Python3Package_Get + /// + /// The cancellation token to use. + public virtual Response Get(CancellationToken cancellationToken = default) + { + using var scope = _automationAccountPython3PackagePython3PackageClientDiagnostics.CreateScope("AutomationAccountPython3PackageResource.Get"); + scope.Start(); + try + { + var response = _automationAccountPython3PackagePython3PackageRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + if (response.Value == null) + throw new RequestFailedException(response.GetRawResponse()); + return Response.FromValue(new AutomationAccountPython3PackageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the python 3 package by name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName} + /// Operation Id: Python3Package_Delete + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual async Task DeleteAsync(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _automationAccountPython3PackagePython3PackageClientDiagnostics.CreateScope("AutomationAccountPython3PackageResource.Delete"); + scope.Start(); + try + { + var response = await _automationAccountPython3PackagePython3PackageRestClient.DeleteAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + var operation = new AutomationArmOperation(response); + if (waitUntil == WaitUntil.Completed) + await operation.WaitForCompletionResponseAsync(cancellationToken).ConfigureAwait(false); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Delete the python 3 package by name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName} + /// Operation Id: Python3Package_Delete + /// + /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. + /// The cancellation token to use. + public virtual ArmOperation Delete(WaitUntil waitUntil, CancellationToken cancellationToken = default) + { + using var scope = _automationAccountPython3PackagePython3PackageClientDiagnostics.CreateScope("AutomationAccountPython3PackageResource.Delete"); + scope.Start(); + try + { + var response = _automationAccountPython3PackagePython3PackageRestClient.Delete(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + var operation = new AutomationArmOperation(response); + if (waitUntil == WaitUntil.Completed) + operation.WaitForCompletionResponse(cancellationToken); + return operation; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update the python 3 package identified by package name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName} + /// Operation Id: Python3Package_Update + /// + /// The update parameters for python package. + /// The cancellation token to use. + /// is null. + public virtual async Task> UpdateAsync(PythonPackageUpdateParameters pythonPackageUpdateParameters, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(pythonPackageUpdateParameters, nameof(pythonPackageUpdateParameters)); + + using var scope = _automationAccountPython3PackagePython3PackageClientDiagnostics.CreateScope("AutomationAccountPython3PackageResource.Update"); + scope.Start(); + try + { + var response = await _automationAccountPython3PackagePython3PackageRestClient.UpdateAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, pythonPackageUpdateParameters, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new AutomationAccountPython3PackageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Update the python 3 package identified by package name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName} + /// Operation Id: Python3Package_Update + /// + /// The update parameters for python package. + /// The cancellation token to use. + /// is null. + public virtual Response Update(PythonPackageUpdateParameters pythonPackageUpdateParameters, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(pythonPackageUpdateParameters, nameof(pythonPackageUpdateParameters)); + + using var scope = _automationAccountPython3PackagePython3PackageClientDiagnostics.CreateScope("AutomationAccountPython3PackageResource.Update"); + scope.Start(); + try + { + var response = _automationAccountPython3PackagePython3PackageRestClient.Update(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, pythonPackageUpdateParameters, cancellationToken); + return Response.FromValue(new AutomationAccountPython3PackageResource(Client, response.Value), response.GetRawResponse()); + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName} + /// Operation Id: Python3Package_Get + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual async Task> AddTagAsync(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _automationAccountPython3PackagePython3PackageClientDiagnostics.CreateScope("AutomationAccountPython3PackageResource.AddTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues[key] = value; + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _automationAccountPython3PackagePython3PackageRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new AutomationAccountPython3PackageResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new PythonPackageUpdateParameters(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Add a tag to the current resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName} + /// Operation Id: Python3Package_Get + /// + /// The key for the tag. + /// The value for the tag. + /// The cancellation token to use. + /// or is null. + public virtual Response AddTag(string key, string value, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + Argument.AssertNotNull(value, nameof(value)); + + using var scope = _automationAccountPython3PackagePython3PackageClientDiagnostics.CreateScope("AutomationAccountPython3PackageResource.AddTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues[key] = value; + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _automationAccountPython3PackagePython3PackageRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new AutomationAccountPython3PackageResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new PythonPackageUpdateParameters(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags[key] = value; + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName} + /// Operation Id: Python3Package_Get + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual async Task> SetTagsAsync(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _automationAccountPython3PackagePython3PackageClientDiagnostics.CreateScope("AutomationAccountPython3PackageResource.SetTags"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + await GetTagResource().DeleteAsync(WaitUntil.Completed, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _automationAccountPython3PackagePython3PackageRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new AutomationAccountPython3PackageResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new PythonPackageUpdateParameters(); + patch.Tags.ReplaceWith(tags); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Replace the tags on the resource with the given set. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName} + /// Operation Id: Python3Package_Get + /// + /// The set of tags to use as replacement. + /// The cancellation token to use. + /// is null. + public virtual Response SetTags(IDictionary tags, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(tags, nameof(tags)); + + using var scope = _automationAccountPython3PackagePython3PackageClientDiagnostics.CreateScope("AutomationAccountPython3PackageResource.SetTags"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + GetTagResource().Delete(WaitUntil.Completed, cancellationToken: cancellationToken); + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.ReplaceWith(tags); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _automationAccountPython3PackagePython3PackageRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new AutomationAccountPython3PackageResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new PythonPackageUpdateParameters(); + patch.Tags.ReplaceWith(tags); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName} + /// Operation Id: Python3Package_Get + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual async Task> RemoveTagAsync(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _automationAccountPython3PackagePython3PackageClientDiagnostics.CreateScope("AutomationAccountPython3PackageResource.RemoveTag"); + scope.Start(); + try + { + if (await CanUseTagResourceAsync(cancellationToken: cancellationToken).ConfigureAwait(false)) + { + var originalTags = await GetTagResource().GetAsync(cancellationToken).ConfigureAwait(false); + originalTags.Value.Data.TagValues.Remove(key); + await GetTagResource().CreateOrUpdateAsync(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken).ConfigureAwait(false); + var originalResponse = await _automationAccountPython3PackagePython3PackageRestClient.GetAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken).ConfigureAwait(false); + return Response.FromValue(new AutomationAccountPython3PackageResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = (await GetAsync(cancellationToken: cancellationToken).ConfigureAwait(false)).Value.Data; + var patch = new PythonPackageUpdateParameters(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = await UpdateAsync(patch, cancellationToken: cancellationToken).ConfigureAwait(false); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Removes a tag by key from the resource. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName} + /// Operation Id: Python3Package_Get + /// + /// The key for the tag. + /// The cancellation token to use. + /// is null. + public virtual Response RemoveTag(string key, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(key, nameof(key)); + + using var scope = _automationAccountPython3PackagePython3PackageClientDiagnostics.CreateScope("AutomationAccountPython3PackageResource.RemoveTag"); + scope.Start(); + try + { + if (CanUseTagResource(cancellationToken: cancellationToken)) + { + var originalTags = GetTagResource().Get(cancellationToken); + originalTags.Value.Data.TagValues.Remove(key); + GetTagResource().CreateOrUpdate(WaitUntil.Completed, originalTags.Value.Data, cancellationToken: cancellationToken); + var originalResponse = _automationAccountPython3PackagePython3PackageRestClient.Get(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken); + return Response.FromValue(new AutomationAccountPython3PackageResource(Client, originalResponse.Value), originalResponse.GetRawResponse()); + } + else + { + var current = Get(cancellationToken: cancellationToken).Value.Data; + var patch = new PythonPackageUpdateParameters(); + foreach (var tag in current.Tags) + { + patch.Tags.Add(tag); + } + patch.Tags.Remove(key); + var result = Update(patch, cancellationToken: cancellationToken); + return result; + } + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountResource.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountResource.cs index 9c141cf981deb..45eca2696a0dd 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountResource.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/AutomationAccountResource.cs @@ -46,6 +46,8 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly DscCompilationJobStreamRestOperations _dscCompilationJobStreamRestClient; private readonly ClientDiagnostics _nodeCountInformationClientDiagnostics; private readonly NodeCountInformationRestOperations _nodeCountInformationRestClient; + private readonly ClientDiagnostics _webhookClientDiagnostics; + private readonly WebhookRestOperations _webhookRestClient; private readonly ClientDiagnostics _statisticsClientDiagnostics; private readonly StatisticsRestOperations _statisticsRestClient; private readonly ClientDiagnostics _usagesClientDiagnostics; @@ -58,12 +60,10 @@ public static ResourceIdentifier CreateResourceIdentifier(string subscriptionId, private readonly ObjectDataTypesRestOperations _objectDataTypesRestClient; private readonly ClientDiagnostics _defaultClientDiagnostics; private readonly AutomationRestOperations _defaultRestClient; - private readonly ClientDiagnostics _softwareUpdateConfigurationRunsClientDiagnostics; - private readonly SoftwareUpdateConfigurationRunsRestOperations _softwareUpdateConfigurationRunsRestClient; private readonly ClientDiagnostics _softwareUpdateConfigurationMachineRunsClientDiagnostics; private readonly SoftwareUpdateConfigurationMachineRunsRestOperations _softwareUpdateConfigurationMachineRunsRestClient; - private readonly ClientDiagnostics _webhookClientDiagnostics; - private readonly WebhookRestOperations _webhookRestClient; + private readonly ClientDiagnostics _softwareUpdateConfigurationRunsClientDiagnostics; + private readonly SoftwareUpdateConfigurationRunsRestOperations _softwareUpdateConfigurationRunsRestClient; private readonly AutomationAccountData _data; /// Initializes a new instance of the class for mocking. @@ -99,6 +99,9 @@ internal AutomationAccountResource(ArmClient client, ResourceIdentifier id) : ba _dscCompilationJobStreamRestClient = new DscCompilationJobStreamRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); _nodeCountInformationClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Automation", ProviderConstants.DefaultProviderNamespace, Diagnostics); _nodeCountInformationRestClient = new NodeCountInformationRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + _webhookClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Automation", WebhookResource.ResourceType.Namespace, Diagnostics); + TryGetApiVersion(WebhookResource.ResourceType, out string webhookApiVersion); + _webhookRestClient = new WebhookRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, webhookApiVersion); _statisticsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Automation", ProviderConstants.DefaultProviderNamespace, Diagnostics); _statisticsRestClient = new StatisticsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); _usagesClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Automation", ProviderConstants.DefaultProviderNamespace, Diagnostics); @@ -111,13 +114,10 @@ internal AutomationAccountResource(ArmClient client, ResourceIdentifier id) : ba _objectDataTypesRestClient = new ObjectDataTypesRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); _defaultClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Automation", ProviderConstants.DefaultProviderNamespace, Diagnostics); _defaultRestClient = new AutomationRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - _softwareUpdateConfigurationRunsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Automation", ProviderConstants.DefaultProviderNamespace, Diagnostics); - _softwareUpdateConfigurationRunsRestClient = new SoftwareUpdateConfigurationRunsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); _softwareUpdateConfigurationMachineRunsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Automation", ProviderConstants.DefaultProviderNamespace, Diagnostics); _softwareUpdateConfigurationMachineRunsRestClient = new SoftwareUpdateConfigurationMachineRunsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); - _webhookClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Automation", WebhookResource.ResourceType.Namespace, Diagnostics); - TryGetApiVersion(WebhookResource.ResourceType, out string webhookApiVersion); - _webhookRestClient = new WebhookRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, webhookApiVersion); + _softwareUpdateConfigurationRunsClientDiagnostics = new ClientDiagnostics("Azure.ResourceManager.Automation", ProviderConstants.DefaultProviderNamespace, Diagnostics); + _softwareUpdateConfigurationRunsRestClient = new SoftwareUpdateConfigurationRunsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); #if DEBUG ValidateResourceId(Id); #endif @@ -184,80 +184,6 @@ public virtual Response GetAutomati return GetAutomationPrivateEndpointConnections().Get(privateEndpointConnectionName, cancellationToken); } - /// Gets a collection of AutomationAccountPython2PackageResources in the AutomationAccount. - /// An object representing collection of AutomationAccountPython2PackageResources and their operations over a AutomationAccountPython2PackageResource. - public virtual AutomationAccountPython2PackageCollection GetAutomationAccountPython2Packages() - { - return GetCachedClient(Client => new AutomationAccountPython2PackageCollection(Client, Id)); - } - - /// - /// Retrieve the python 2 package identified by package name. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python2Packages/{packageName} - /// Operation Id: Python2Package_Get - /// - /// The python package name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual async Task> GetAutomationAccountPython2PackageAsync(string packageName, CancellationToken cancellationToken = default) - { - return await GetAutomationAccountPython2Packages().GetAsync(packageName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Retrieve the python 2 package identified by package name. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python2Packages/{packageName} - /// Operation Id: Python2Package_Get - /// - /// The python package name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual Response GetAutomationAccountPython2Package(string packageName, CancellationToken cancellationToken = default) - { - return GetAutomationAccountPython2Packages().Get(packageName, cancellationToken); - } - - /// Gets a collection of AutomationAccountModuleResources in the AutomationAccount. - /// An object representing collection of AutomationAccountModuleResources and their operations over a AutomationAccountModuleResource. - public virtual AutomationAccountModuleCollection GetAutomationAccountModules() - { - return GetCachedClient(Client => new AutomationAccountModuleCollection(Client, Id)); - } - - /// - /// Retrieve the module identified by module name. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName} - /// Operation Id: Module_Get - /// - /// The module name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual async Task> GetAutomationAccountModuleAsync(string moduleName, CancellationToken cancellationToken = default) - { - return await GetAutomationAccountModules().GetAsync(moduleName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Retrieve the module identified by module name. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName} - /// Operation Id: Module_Get - /// - /// The module name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual Response GetAutomationAccountModule(string moduleName, CancellationToken cancellationToken = default) - { - return GetAutomationAccountModules().Get(moduleName, cancellationToken); - } - /// Gets a collection of DscNodeResources in the AutomationAccount. /// An object representing collection of DscNodeResources and their operations over a DscNodeResource. public virtual DscNodeCollection GetDscNodes() @@ -295,43 +221,6 @@ public virtual Response GetDscNode(string nodeId, CancellationT return GetDscNodes().Get(nodeId, cancellationToken); } - /// Gets a collection of DscNodeConfigurationResources in the AutomationAccount. - /// An object representing collection of DscNodeConfigurationResources and their operations over a DscNodeConfigurationResource. - public virtual DscNodeConfigurationCollection GetDscNodeConfigurations() - { - return GetCachedClient(Client => new DscNodeConfigurationCollection(Client, Id)); - } - - /// - /// Retrieve the Dsc node configurations by node configuration. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodeConfigurations/{nodeConfigurationName} - /// Operation Id: DscNodeConfiguration_Get - /// - /// The Dsc node configuration name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual async Task> GetDscNodeConfigurationAsync(string nodeConfigurationName, CancellationToken cancellationToken = default) - { - return await GetDscNodeConfigurations().GetAsync(nodeConfigurationName, cancellationToken).ConfigureAwait(false); - } - - /// - /// Retrieve the Dsc node configurations by node configuration. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodeConfigurations/{nodeConfigurationName} - /// Operation Id: DscNodeConfiguration_Get - /// - /// The Dsc node configuration name. - /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. - [ForwardsClientCalls] - public virtual Response GetDscNodeConfiguration(string nodeConfigurationName, CancellationToken cancellationToken = default) - { - return GetDscNodeConfigurations().Get(nodeConfigurationName, cancellationToken); - } - /// Gets a collection of DscCompilationJobResources in the AutomationAccount. /// An object representing collection of DscCompilationJobResources and their operations over a DscCompilationJobResource. public virtual DscCompilationJobCollection GetDscCompilationJobs() @@ -369,333 +258,376 @@ public virtual Response GetDscCompilationJob(string c return GetDscCompilationJobs().Get(compilationJobName, cancellationToken); } - /// Gets a collection of SourceControlResources in the AutomationAccount. - /// An object representing collection of SourceControlResources and their operations over a SourceControlResource. - public virtual SourceControlCollection GetSourceControls() + /// Gets a collection of WatcherResources in the AutomationAccount. + /// An object representing collection of WatcherResources and their operations over a WatcherResource. + public virtual WatcherCollection GetWatchers() { - return GetCachedClient(Client => new SourceControlCollection(Client, Id)); + return GetCachedClient(Client => new WatcherCollection(Client, Id)); } /// - /// Retrieve the source control identified by source control name. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls/{sourceControlName} - /// Operation Id: SourceControl_Get + /// Retrieve the watcher identified by watcher name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/watchers/{watcherName} + /// Operation Id: Watcher_Get /// - /// The name of source control. + /// The watcher name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetSourceControlAsync(string sourceControlName, CancellationToken cancellationToken = default) + public virtual async Task> GetWatcherAsync(string watcherName, CancellationToken cancellationToken = default) { - return await GetSourceControls().GetAsync(sourceControlName, cancellationToken).ConfigureAwait(false); + return await GetWatchers().GetAsync(watcherName, cancellationToken).ConfigureAwait(false); } /// - /// Retrieve the source control identified by source control name. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls/{sourceControlName} - /// Operation Id: SourceControl_Get + /// Retrieve the watcher identified by watcher name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/watchers/{watcherName} + /// Operation Id: Watcher_Get /// - /// The name of source control. + /// The watcher name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetSourceControl(string sourceControlName, CancellationToken cancellationToken = default) + public virtual Response GetWatcher(string watcherName, CancellationToken cancellationToken = default) { - return GetSourceControls().Get(sourceControlName, cancellationToken); + return GetWatchers().Get(watcherName, cancellationToken); } - /// Gets a collection of CertificateResources in the AutomationAccount. - /// An object representing collection of CertificateResources and their operations over a CertificateResource. - public virtual CertificateCollection GetCertificates() + /// Gets a collection of SoftwareUpdateConfigurationResources in the AutomationAccount. + /// An object representing collection of SoftwareUpdateConfigurationResources and their operations over a SoftwareUpdateConfigurationResource. + public virtual SoftwareUpdateConfigurationCollection GetSoftwareUpdateConfigurations() { - return GetCachedClient(Client => new CertificateCollection(Client, Id)); + return GetCachedClient(Client => new SoftwareUpdateConfigurationCollection(Client, Id)); } /// - /// Retrieve the certificate identified by certificate name. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/certificates/{certificateName} - /// Operation Id: Certificate_Get + /// Get a single software update configuration by name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations/{softwareUpdateConfigurationName} + /// Operation Id: SoftwareUpdateConfigurations_GetByName /// - /// The name of certificate. + /// The name of the software update configuration to be created. + /// Identifies this specific client request. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetCertificateAsync(string certificateName, CancellationToken cancellationToken = default) + public virtual async Task> GetSoftwareUpdateConfigurationAsync(string softwareUpdateConfigurationName, string clientRequestId = null, CancellationToken cancellationToken = default) { - return await GetCertificates().GetAsync(certificateName, cancellationToken).ConfigureAwait(false); + return await GetSoftwareUpdateConfigurations().GetAsync(softwareUpdateConfigurationName, clientRequestId, cancellationToken).ConfigureAwait(false); } /// - /// Retrieve the certificate identified by certificate name. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/certificates/{certificateName} - /// Operation Id: Certificate_Get + /// Get a single software update configuration by name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations/{softwareUpdateConfigurationName} + /// Operation Id: SoftwareUpdateConfigurations_GetByName /// - /// The name of certificate. + /// The name of the software update configuration to be created. + /// Identifies this specific client request. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetCertificate(string certificateName, CancellationToken cancellationToken = default) + public virtual Response GetSoftwareUpdateConfiguration(string softwareUpdateConfigurationName, string clientRequestId = null, CancellationToken cancellationToken = default) { - return GetCertificates().Get(certificateName, cancellationToken); + return GetSoftwareUpdateConfigurations().Get(softwareUpdateConfigurationName, clientRequestId, cancellationToken); } - /// Gets a collection of ConnectionResources in the AutomationAccount. - /// An object representing collection of ConnectionResources and their operations over a ConnectionResource. - public virtual ConnectionCollection GetConnections() + /// Gets a collection of WebhookResources in the AutomationAccount. + /// An object representing collection of WebhookResources and their operations over a WebhookResource. + public virtual WebhookCollection GetWebhooks() { - return GetCachedClient(Client => new ConnectionCollection(Client, Id)); + return GetCachedClient(Client => new WebhookCollection(Client, Id)); } /// - /// Retrieve the connection identified by connection name. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connections/{connectionName} - /// Operation Id: Connection_Get + /// Retrieve the webhook identified by webhook name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks/{webhookName} + /// Operation Id: Webhook_Get /// - /// The name of connection. + /// The webhook name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetConnectionAsync(string connectionName, CancellationToken cancellationToken = default) + public virtual async Task> GetWebhookAsync(string webhookName, CancellationToken cancellationToken = default) { - return await GetConnections().GetAsync(connectionName, cancellationToken).ConfigureAwait(false); + return await GetWebhooks().GetAsync(webhookName, cancellationToken).ConfigureAwait(false); } /// - /// Retrieve the connection identified by connection name. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connections/{connectionName} - /// Operation Id: Connection_Get + /// Retrieve the webhook identified by webhook name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks/{webhookName} + /// Operation Id: Webhook_Get /// - /// The name of connection. + /// The webhook name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetConnection(string connectionName, CancellationToken cancellationToken = default) + public virtual Response GetWebhook(string webhookName, CancellationToken cancellationToken = default) { - return GetConnections().Get(connectionName, cancellationToken); + return GetWebhooks().Get(webhookName, cancellationToken); } - /// Gets a collection of ConnectionTypeResources in the AutomationAccount. - /// An object representing collection of ConnectionTypeResources and their operations over a ConnectionTypeResource. - public virtual ConnectionTypeCollection GetConnectionTypes() + /// Gets a collection of AutomationAccountPython3PackageResources in the AutomationAccount. + /// An object representing collection of AutomationAccountPython3PackageResources and their operations over a AutomationAccountPython3PackageResource. + public virtual AutomationAccountPython3PackageCollection GetAutomationAccountPython3Packages() { - return GetCachedClient(Client => new ConnectionTypeCollection(Client, Id)); + return GetCachedClient(Client => new AutomationAccountPython3PackageCollection(Client, Id)); } /// - /// Retrieve the connection type identified by connection type name. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connectionTypes/{connectionTypeName} - /// Operation Id: ConnectionType_Get + /// Retrieve the python 3 package identified by package name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName} + /// Operation Id: Python3Package_Get /// - /// The name of connection type. + /// The python package name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetConnectionTypeAsync(string connectionTypeName, CancellationToken cancellationToken = default) + public virtual async Task> GetAutomationAccountPython3PackageAsync(string packageName, CancellationToken cancellationToken = default) { - return await GetConnectionTypes().GetAsync(connectionTypeName, cancellationToken).ConfigureAwait(false); + return await GetAutomationAccountPython3Packages().GetAsync(packageName, cancellationToken).ConfigureAwait(false); } /// - /// Retrieve the connection type identified by connection type name. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connectionTypes/{connectionTypeName} - /// Operation Id: ConnectionType_Get + /// Retrieve the python 3 package identified by package name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python3Packages/{packageName} + /// Operation Id: Python3Package_Get /// - /// The name of connection type. + /// The python package name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetConnectionType(string connectionTypeName, CancellationToken cancellationToken = default) + public virtual Response GetAutomationAccountPython3Package(string packageName, CancellationToken cancellationToken = default) { - return GetConnectionTypes().Get(connectionTypeName, cancellationToken); + return GetAutomationAccountPython3Packages().Get(packageName, cancellationToken); } - /// Gets a collection of CredentialResources in the AutomationAccount. - /// An object representing collection of CredentialResources and their operations over a CredentialResource. - public virtual CredentialCollection GetCredentials() + /// Gets a collection of AutomationAccountModuleResources in the AutomationAccount. + /// An object representing collection of AutomationAccountModuleResources and their operations over a AutomationAccountModuleResource. + public virtual AutomationAccountModuleCollection GetAutomationAccountModules() { - return GetCachedClient(Client => new CredentialCollection(Client, Id)); + return GetCachedClient(Client => new AutomationAccountModuleCollection(Client, Id)); } /// - /// Retrieve the credential identified by credential name. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/credentials/{credentialName} - /// Operation Id: Credential_Get + /// Retrieve the module identified by module name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName} + /// Operation Id: Module_Get /// - /// The name of credential. + /// The module name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetCredentialAsync(string credentialName, CancellationToken cancellationToken = default) + public virtual async Task> GetAutomationAccountModuleAsync(string moduleName, CancellationToken cancellationToken = default) { - return await GetCredentials().GetAsync(credentialName, cancellationToken).ConfigureAwait(false); + return await GetAutomationAccountModules().GetAsync(moduleName, cancellationToken).ConfigureAwait(false); } /// - /// Retrieve the credential identified by credential name. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/credentials/{credentialName} - /// Operation Id: Credential_Get + /// Retrieve the module identified by module name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/modules/{moduleName} + /// Operation Id: Module_Get /// - /// The name of credential. + /// The module name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetCredential(string credentialName, CancellationToken cancellationToken = default) + public virtual Response GetAutomationAccountModule(string moduleName, CancellationToken cancellationToken = default) { - return GetCredentials().Get(credentialName, cancellationToken); + return GetAutomationAccountModules().Get(moduleName, cancellationToken); } - /// Gets a collection of JobScheduleResources in the AutomationAccount. - /// An object representing collection of JobScheduleResources and their operations over a JobScheduleResource. - public virtual JobScheduleCollection GetJobSchedules() + /// Gets a collection of AutomationAccountPython2PackageResources in the AutomationAccount. + /// An object representing collection of AutomationAccountPython2PackageResources and their operations over a AutomationAccountPython2PackageResource. + public virtual AutomationAccountPython2PackageCollection GetAutomationAccountPython2Packages() { - return GetCachedClient(Client => new JobScheduleCollection(Client, Id)); + return GetCachedClient(Client => new AutomationAccountPython2PackageCollection(Client, Id)); } /// - /// Retrieve the job schedule identified by job schedule name. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobSchedules/{jobScheduleId} - /// Operation Id: JobSchedule_Get + /// Retrieve the python 2 package identified by package name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python2Packages/{packageName} + /// Operation Id: Python2Package_Get /// - /// The job schedule name. + /// The python package name. /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetJobScheduleAsync(Guid jobScheduleId, CancellationToken cancellationToken = default) + public virtual async Task> GetAutomationAccountPython2PackageAsync(string packageName, CancellationToken cancellationToken = default) { - return await GetJobSchedules().GetAsync(jobScheduleId, cancellationToken).ConfigureAwait(false); + return await GetAutomationAccountPython2Packages().GetAsync(packageName, cancellationToken).ConfigureAwait(false); } /// - /// Retrieve the job schedule identified by job schedule name. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobSchedules/{jobScheduleId} - /// Operation Id: JobSchedule_Get + /// Retrieve the python 2 package identified by package name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/python2Packages/{packageName} + /// Operation Id: Python2Package_Get /// - /// The job schedule name. + /// The python package name. /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetJobSchedule(Guid jobScheduleId, CancellationToken cancellationToken = default) + public virtual Response GetAutomationAccountPython2Package(string packageName, CancellationToken cancellationToken = default) { - return GetJobSchedules().Get(jobScheduleId, cancellationToken); + return GetAutomationAccountPython2Packages().Get(packageName, cancellationToken); } - /// Gets a collection of ScheduleResources in the AutomationAccount. - /// An object representing collection of ScheduleResources and their operations over a ScheduleResource. - public virtual ScheduleCollection GetSchedules() + /// Gets a collection of CertificateResources in the AutomationAccount. + /// An object representing collection of CertificateResources and their operations over a CertificateResource. + public virtual CertificateCollection GetCertificates() { - return GetCachedClient(Client => new ScheduleCollection(Client, Id)); + return GetCachedClient(Client => new CertificateCollection(Client, Id)); } /// - /// Retrieve the schedule identified by schedule name. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/schedules/{scheduleName} - /// Operation Id: Schedule_Get + /// Retrieve the certificate identified by certificate name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/certificates/{certificateName} + /// Operation Id: Certificate_Get /// - /// The schedule name. + /// The name of certificate. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetScheduleAsync(string scheduleName, CancellationToken cancellationToken = default) + public virtual async Task> GetCertificateAsync(string certificateName, CancellationToken cancellationToken = default) { - return await GetSchedules().GetAsync(scheduleName, cancellationToken).ConfigureAwait(false); + return await GetCertificates().GetAsync(certificateName, cancellationToken).ConfigureAwait(false); } /// - /// Retrieve the schedule identified by schedule name. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/schedules/{scheduleName} - /// Operation Id: Schedule_Get + /// Retrieve the certificate identified by certificate name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/certificates/{certificateName} + /// Operation Id: Certificate_Get /// - /// The schedule name. + /// The name of certificate. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetSchedule(string scheduleName, CancellationToken cancellationToken = default) + public virtual Response GetCertificate(string certificateName, CancellationToken cancellationToken = default) { - return GetSchedules().Get(scheduleName, cancellationToken); + return GetCertificates().Get(certificateName, cancellationToken); } - /// Gets a collection of VariableResources in the AutomationAccount. - /// An object representing collection of VariableResources and their operations over a VariableResource. - public virtual VariableCollection GetVariables() + /// Gets a collection of ConnectionResources in the AutomationAccount. + /// An object representing collection of ConnectionResources and their operations over a ConnectionResource. + public virtual ConnectionCollection GetConnections() { - return GetCachedClient(Client => new VariableCollection(Client, Id)); + return GetCachedClient(Client => new ConnectionCollection(Client, Id)); } /// - /// Retrieve the variable identified by variable name. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/variables/{variableName} - /// Operation Id: Variable_Get + /// Retrieve the connection identified by connection name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connections/{connectionName} + /// Operation Id: Connection_Get /// - /// The name of variable. + /// The name of connection. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetVariableAsync(string variableName, CancellationToken cancellationToken = default) + public virtual async Task> GetConnectionAsync(string connectionName, CancellationToken cancellationToken = default) { - return await GetVariables().GetAsync(variableName, cancellationToken).ConfigureAwait(false); + return await GetConnections().GetAsync(connectionName, cancellationToken).ConfigureAwait(false); } /// - /// Retrieve the variable identified by variable name. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/variables/{variableName} - /// Operation Id: Variable_Get + /// Retrieve the connection identified by connection name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connections/{connectionName} + /// Operation Id: Connection_Get /// - /// The name of variable. + /// The name of connection. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetVariable(string variableName, CancellationToken cancellationToken = default) + public virtual Response GetConnection(string connectionName, CancellationToken cancellationToken = default) { - return GetVariables().Get(variableName, cancellationToken); + return GetConnections().Get(connectionName, cancellationToken); } - /// Gets a collection of WatcherResources in the AutomationAccount. - /// An object representing collection of WatcherResources and their operations over a WatcherResource. - public virtual WatcherCollection GetWatchers() + /// Gets a collection of ConnectionTypeResources in the AutomationAccount. + /// An object representing collection of ConnectionTypeResources and their operations over a ConnectionTypeResource. + public virtual ConnectionTypeCollection GetConnectionTypes() { - return GetCachedClient(Client => new WatcherCollection(Client, Id)); + return GetCachedClient(Client => new ConnectionTypeCollection(Client, Id)); } /// - /// Retrieve the watcher identified by watcher name. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/watchers/{watcherName} - /// Operation Id: Watcher_Get + /// Retrieve the connection type identified by connection type name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connectionTypes/{connectionTypeName} + /// Operation Id: ConnectionType_Get /// - /// The watcher name. + /// The name of connection type. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetWatcherAsync(string watcherName, CancellationToken cancellationToken = default) + public virtual async Task> GetConnectionTypeAsync(string connectionTypeName, CancellationToken cancellationToken = default) { - return await GetWatchers().GetAsync(watcherName, cancellationToken).ConfigureAwait(false); + return await GetConnectionTypes().GetAsync(connectionTypeName, cancellationToken).ConfigureAwait(false); } /// - /// Retrieve the watcher identified by watcher name. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/watchers/{watcherName} - /// Operation Id: Watcher_Get + /// Retrieve the connection type identified by connection type name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/connectionTypes/{connectionTypeName} + /// Operation Id: ConnectionType_Get /// - /// The watcher name. + /// The name of connection type. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetWatcher(string watcherName, CancellationToken cancellationToken = default) + public virtual Response GetConnectionType(string connectionTypeName, CancellationToken cancellationToken = default) { - return GetWatchers().Get(watcherName, cancellationToken); + return GetConnectionTypes().Get(connectionTypeName, cancellationToken); + } + + /// Gets a collection of CredentialResources in the AutomationAccount. + /// An object representing collection of CredentialResources and their operations over a CredentialResource. + public virtual CredentialCollection GetCredentials() + { + return GetCachedClient(Client => new CredentialCollection(Client, Id)); + } + + /// + /// Retrieve the credential identified by credential name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/credentials/{credentialName} + /// Operation Id: Credential_Get + /// + /// The name of credential. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetCredentialAsync(string credentialName, CancellationToken cancellationToken = default) + { + return await GetCredentials().GetAsync(credentialName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Retrieve the credential identified by credential name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/credentials/{credentialName} + /// Operation Id: Credential_Get + /// + /// The name of credential. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetCredential(string credentialName, CancellationToken cancellationToken = default) + { + return GetCredentials().Get(credentialName, cancellationToken); } /// Gets a collection of DscConfigurationResources in the AutomationAccount. @@ -735,6 +667,80 @@ public virtual Response GetDscConfiguration(string con return GetDscConfigurations().Get(configurationName, cancellationToken); } + /// Gets a collection of DscNodeConfigurationResources in the AutomationAccount. + /// An object representing collection of DscNodeConfigurationResources and their operations over a DscNodeConfigurationResource. + public virtual DscNodeConfigurationCollection GetDscNodeConfigurations() + { + return GetCachedClient(Client => new DscNodeConfigurationCollection(Client, Id)); + } + + /// + /// Retrieve the Dsc node configurations by node configuration. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodeConfigurations/{nodeConfigurationName} + /// Operation Id: DscNodeConfiguration_Get + /// + /// The Dsc node configuration name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetDscNodeConfigurationAsync(string nodeConfigurationName, CancellationToken cancellationToken = default) + { + return await GetDscNodeConfigurations().GetAsync(nodeConfigurationName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Retrieve the Dsc node configurations by node configuration. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/nodeConfigurations/{nodeConfigurationName} + /// Operation Id: DscNodeConfiguration_Get + /// + /// The Dsc node configuration name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetDscNodeConfiguration(string nodeConfigurationName, CancellationToken cancellationToken = default) + { + return GetDscNodeConfigurations().Get(nodeConfigurationName, cancellationToken); + } + + /// Gets a collection of HybridRunbookWorkerGroupResources in the AutomationAccount. + /// An object representing collection of HybridRunbookWorkerGroupResources and their operations over a HybridRunbookWorkerGroupResource. + public virtual HybridRunbookWorkerGroupCollection GetHybridRunbookWorkerGroups() + { + return GetCachedClient(Client => new HybridRunbookWorkerGroupCollection(Client, Id)); + } + + /// + /// Retrieve a hybrid runbook worker group. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/hybridRunbookWorkerGroups/{hybridRunbookWorkerGroupName} + /// Operation Id: HybridRunbookWorkerGroup_Get + /// + /// The hybrid runbook worker group name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetHybridRunbookWorkerGroupAsync(string hybridRunbookWorkerGroupName, CancellationToken cancellationToken = default) + { + return await GetHybridRunbookWorkerGroups().GetAsync(hybridRunbookWorkerGroupName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Retrieve a hybrid runbook worker group. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/hybridRunbookWorkerGroups/{hybridRunbookWorkerGroupName} + /// Operation Id: HybridRunbookWorkerGroup_Get + /// + /// The hybrid runbook worker group name. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetHybridRunbookWorkerGroup(string hybridRunbookWorkerGroupName, CancellationToken cancellationToken = default) + { + return GetHybridRunbookWorkerGroups().Get(hybridRunbookWorkerGroupName, cancellationToken); + } + /// Gets a collection of JobResources in the AutomationAccount. /// An object representing collection of JobResources and their operations over a JobResource. public virtual JobCollection GetJobs() @@ -774,43 +780,37 @@ public virtual Response GetJob(string jobName, string clientRequest return GetJobs().Get(jobName, clientRequestId, cancellationToken); } - /// Gets a collection of SoftwareUpdateConfigurationResources in the AutomationAccount. - /// An object representing collection of SoftwareUpdateConfigurationResources and their operations over a SoftwareUpdateConfigurationResource. - public virtual SoftwareUpdateConfigurationCollection GetSoftwareUpdateConfigurations() + /// Gets a collection of JobScheduleResources in the AutomationAccount. + /// An object representing collection of JobScheduleResources and their operations over a JobScheduleResource. + public virtual JobScheduleCollection GetJobSchedules() { - return GetCachedClient(Client => new SoftwareUpdateConfigurationCollection(Client, Id)); + return GetCachedClient(Client => new JobScheduleCollection(Client, Id)); } /// - /// Get a single software update configuration by name. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations/{softwareUpdateConfigurationName} - /// Operation Id: SoftwareUpdateConfigurations_GetByName + /// Retrieve the job schedule identified by job schedule name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobSchedules/{jobScheduleId} + /// Operation Id: JobSchedule_Get /// - /// The name of the software update configuration to be created. - /// Identifies this specific client request. + /// The job schedule name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. [ForwardsClientCalls] - public virtual async Task> GetSoftwareUpdateConfigurationAsync(string softwareUpdateConfigurationName, string clientRequestId = null, CancellationToken cancellationToken = default) + public virtual async Task> GetJobScheduleAsync(Guid jobScheduleId, CancellationToken cancellationToken = default) { - return await GetSoftwareUpdateConfigurations().GetAsync(softwareUpdateConfigurationName, clientRequestId, cancellationToken).ConfigureAwait(false); + return await GetJobSchedules().GetAsync(jobScheduleId, cancellationToken).ConfigureAwait(false); } /// - /// Get a single software update configuration by name. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurations/{softwareUpdateConfigurationName} - /// Operation Id: SoftwareUpdateConfigurations_GetByName + /// Retrieve the job schedule identified by job schedule name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/jobSchedules/{jobScheduleId} + /// Operation Id: JobSchedule_Get /// - /// The name of the software update configuration to be created. - /// Identifies this specific client request. + /// The job schedule name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. [ForwardsClientCalls] - public virtual Response GetSoftwareUpdateConfiguration(string softwareUpdateConfigurationName, string clientRequestId = null, CancellationToken cancellationToken = default) + public virtual Response GetJobSchedule(Guid jobScheduleId, CancellationToken cancellationToken = default) { - return GetSoftwareUpdateConfigurations().Get(softwareUpdateConfigurationName, clientRequestId, cancellationToken); + return GetJobSchedules().Get(jobScheduleId, cancellationToken); } /// Gets a collection of RunbookResources in the AutomationAccount. @@ -850,78 +850,115 @@ public virtual Response GetRunbook(string runbookName, Cancella return GetRunbooks().Get(runbookName, cancellationToken); } - /// Gets a collection of WebhookResources in the AutomationAccount. - /// An object representing collection of WebhookResources and their operations over a WebhookResource. - public virtual WebhookCollection GetWebhooks() + /// Gets a collection of ScheduleResources in the AutomationAccount. + /// An object representing collection of ScheduleResources and their operations over a ScheduleResource. + public virtual ScheduleCollection GetSchedules() { - return GetCachedClient(Client => new WebhookCollection(Client, Id)); + return GetCachedClient(Client => new ScheduleCollection(Client, Id)); } /// - /// Retrieve the webhook identified by webhook name. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks/{webhookName} - /// Operation Id: Webhook_Get + /// Retrieve the schedule identified by schedule name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/schedules/{scheduleName} + /// Operation Id: Schedule_Get /// - /// The webhook name. + /// The schedule name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetWebhookAsync(string webhookName, CancellationToken cancellationToken = default) + public virtual async Task> GetScheduleAsync(string scheduleName, CancellationToken cancellationToken = default) { - return await GetWebhooks().GetAsync(webhookName, cancellationToken).ConfigureAwait(false); + return await GetSchedules().GetAsync(scheduleName, cancellationToken).ConfigureAwait(false); } /// - /// Retrieve the webhook identified by webhook name. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks/{webhookName} - /// Operation Id: Webhook_Get + /// Retrieve the schedule identified by schedule name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/schedules/{scheduleName} + /// Operation Id: Schedule_Get /// - /// The webhook name. + /// The schedule name. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetWebhook(string webhookName, CancellationToken cancellationToken = default) + public virtual Response GetSchedule(string scheduleName, CancellationToken cancellationToken = default) { - return GetWebhooks().Get(webhookName, cancellationToken); + return GetSchedules().Get(scheduleName, cancellationToken); + } + + /// Gets a collection of SourceControlResources in the AutomationAccount. + /// An object representing collection of SourceControlResources and their operations over a SourceControlResource. + public virtual SourceControlCollection GetSourceControls() + { + return GetCachedClient(Client => new SourceControlCollection(Client, Id)); + } + + /// + /// Retrieve the source control identified by source control name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls/{sourceControlName} + /// Operation Id: SourceControl_Get + /// + /// The name of source control. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual async Task> GetSourceControlAsync(string sourceControlName, CancellationToken cancellationToken = default) + { + return await GetSourceControls().GetAsync(sourceControlName, cancellationToken).ConfigureAwait(false); + } + + /// + /// Retrieve the source control identified by source control name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/sourceControls/{sourceControlName} + /// Operation Id: SourceControl_Get + /// + /// The name of source control. + /// The cancellation token to use. + /// is an empty string, and was expected to be non-empty. + /// is null. + [ForwardsClientCalls] + public virtual Response GetSourceControl(string sourceControlName, CancellationToken cancellationToken = default) + { + return GetSourceControls().Get(sourceControlName, cancellationToken); } - /// Gets a collection of HybridRunbookWorkerGroupResources in the AutomationAccount. - /// An object representing collection of HybridRunbookWorkerGroupResources and their operations over a HybridRunbookWorkerGroupResource. - public virtual HybridRunbookWorkerGroupCollection GetHybridRunbookWorkerGroups() + /// Gets a collection of VariableResources in the AutomationAccount. + /// An object representing collection of VariableResources and their operations over a VariableResource. + public virtual VariableCollection GetVariables() { - return GetCachedClient(Client => new HybridRunbookWorkerGroupCollection(Client, Id)); + return GetCachedClient(Client => new VariableCollection(Client, Id)); } /// - /// Retrieve a hybrid runbook worker group. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/hybridRunbookWorkerGroups/{hybridRunbookWorkerGroupName} - /// Operation Id: HybridRunbookWorkerGroup_Get + /// Retrieve the variable identified by variable name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/variables/{variableName} + /// Operation Id: Variable_Get /// - /// The hybrid runbook worker group name. + /// The name of variable. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual async Task> GetHybridRunbookWorkerGroupAsync(string hybridRunbookWorkerGroupName, CancellationToken cancellationToken = default) + public virtual async Task> GetVariableAsync(string variableName, CancellationToken cancellationToken = default) { - return await GetHybridRunbookWorkerGroups().GetAsync(hybridRunbookWorkerGroupName, cancellationToken).ConfigureAwait(false); + return await GetVariables().GetAsync(variableName, cancellationToken).ConfigureAwait(false); } /// - /// Retrieve a hybrid runbook worker group. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/hybridRunbookWorkerGroups/{hybridRunbookWorkerGroupName} - /// Operation Id: HybridRunbookWorkerGroup_Get + /// Retrieve the variable identified by variable name. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/variables/{variableName} + /// Operation Id: Variable_Get /// - /// The hybrid runbook worker group name. + /// The name of variable. /// The cancellation token to use. - /// is an empty string, and was expected to be non-empty. - /// is null. + /// is an empty string, and was expected to be non-empty. + /// is null. [ForwardsClientCalls] - public virtual Response GetHybridRunbookWorkerGroup(string hybridRunbookWorkerGroupName, CancellationToken cancellationToken = default) + public virtual Response GetVariable(string variableName, CancellationToken cancellationToken = default) { - return GetHybridRunbookWorkerGroups().Get(hybridRunbookWorkerGroupName, cancellationToken); + return GetVariables().Get(variableName, cancellationToken); } /// @@ -1394,6 +1431,50 @@ Page FirstPageFunc(int? pageSizeHint) return PageableHelpers.CreateEnumerable(FirstPageFunc, null); } + /// + /// Generates a Uri for use in creating a webhook. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks/generateUri + /// Operation Id: Webhook_GenerateUri + /// + /// The cancellation token to use. + public virtual async Task> GenerateUriWebhookAsync(CancellationToken cancellationToken = default) + { + using var scope = _webhookClientDiagnostics.CreateScope("AutomationAccountResource.GenerateUriWebhook"); + scope.Start(); + try + { + var response = await _webhookRestClient.GenerateUriAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + + /// + /// Generates a Uri for use in creating a webhook. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks/generateUri + /// Operation Id: Webhook_GenerateUri + /// + /// The cancellation token to use. + public virtual Response GenerateUriWebhook(CancellationToken cancellationToken = default) + { + using var scope = _webhookClientDiagnostics.CreateScope("AutomationAccountResource.GenerateUriWebhook"); + scope.Start(); + try + { + var response = _webhookRestClient.GenerateUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); + return response; + } + catch (Exception e) + { + scope.Failed(e); + throw; + } + } + /// /// Retrieve the statistics for the account. /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/statistics @@ -1709,20 +1790,20 @@ public virtual Response ConvertGraphRunbookContent(Grap } /// - /// Get a single software update configuration Run by Id. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationRuns/{softwareUpdateConfigurationRunId} - /// Operation Id: SoftwareUpdateConfigurationRuns_GetById + /// Get a single software update configuration machine run by Id. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationMachineRuns/{softwareUpdateConfigurationMachineRunId} + /// Operation Id: SoftwareUpdateConfigurationMachineRuns_GetById /// - /// The Id of the software update configuration run. + /// The Id of the software update configuration machine run. /// Identifies this specific client request. /// The cancellation token to use. - public virtual async Task> GetByIdSoftwareUpdateConfigurationRunAsync(Guid softwareUpdateConfigurationRunId, string clientRequestId = null, CancellationToken cancellationToken = default) + public virtual async Task> GetByIdSoftwareUpdateConfigurationMachineRunAsync(Guid softwareUpdateConfigurationMachineRunId, string clientRequestId = null, CancellationToken cancellationToken = default) { - using var scope = _softwareUpdateConfigurationRunsClientDiagnostics.CreateScope("AutomationAccountResource.GetByIdSoftwareUpdateConfigurationRun"); + using var scope = _softwareUpdateConfigurationMachineRunsClientDiagnostics.CreateScope("AutomationAccountResource.GetByIdSoftwareUpdateConfigurationMachineRun"); scope.Start(); try { - var response = await _softwareUpdateConfigurationRunsRestClient.GetByIdAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, softwareUpdateConfigurationRunId, clientRequestId, cancellationToken).ConfigureAwait(false); + var response = await _softwareUpdateConfigurationMachineRunsRestClient.GetByIdAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, softwareUpdateConfigurationMachineRunId, clientRequestId, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -1733,20 +1814,20 @@ public virtual async Task> GetByIdSoftw } /// - /// Get a single software update configuration Run by Id. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationRuns/{softwareUpdateConfigurationRunId} - /// Operation Id: SoftwareUpdateConfigurationRuns_GetById + /// Get a single software update configuration machine run by Id. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationMachineRuns/{softwareUpdateConfigurationMachineRunId} + /// Operation Id: SoftwareUpdateConfigurationMachineRuns_GetById /// - /// The Id of the software update configuration run. + /// The Id of the software update configuration machine run. /// Identifies this specific client request. /// The cancellation token to use. - public virtual Response GetByIdSoftwareUpdateConfigurationRun(Guid softwareUpdateConfigurationRunId, string clientRequestId = null, CancellationToken cancellationToken = default) + public virtual Response GetByIdSoftwareUpdateConfigurationMachineRun(Guid softwareUpdateConfigurationMachineRunId, string clientRequestId = null, CancellationToken cancellationToken = default) { - using var scope = _softwareUpdateConfigurationRunsClientDiagnostics.CreateScope("AutomationAccountResource.GetByIdSoftwareUpdateConfigurationRun"); + using var scope = _softwareUpdateConfigurationMachineRunsClientDiagnostics.CreateScope("AutomationAccountResource.GetByIdSoftwareUpdateConfigurationMachineRun"); scope.Start(); try { - var response = _softwareUpdateConfigurationRunsRestClient.GetById(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, softwareUpdateConfigurationRunId, clientRequestId, cancellationToken); + var response = _softwareUpdateConfigurationMachineRunsRestClient.GetById(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, softwareUpdateConfigurationMachineRunId, clientRequestId, cancellationToken); return response; } catch (Exception e) @@ -1757,25 +1838,25 @@ public virtual Response GetByIdSoftwareUpdateCon } /// - /// Return list of software update configuration runs - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationRuns - /// Operation Id: SoftwareUpdateConfigurationRuns_List + /// Return list of software update configuration machine runs + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationMachineRuns + /// Operation Id: SoftwareUpdateConfigurationMachineRuns_List /// /// Identifies this specific client request. /// The filter to apply on the operation. You can use the following filters: 'properties/osType', 'properties/status', 'properties/startTime', and 'properties/softwareUpdateConfiguration/name'. - /// Number of entries you skip before returning results. + /// number of entries you skip before returning results. /// Maximum number of entries returned in the results collection. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetSoftwareUpdateConfigurationRunsAsync(string clientRequestId = null, string filter = null, string skip = null, string top = null, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetSoftwareUpdateConfigurationMachineRunsAsync(string clientRequestId = null, string filter = null, string skip = null, string top = null, CancellationToken cancellationToken = default) { - async Task> FirstPageFunc(int? pageSizeHint) + async Task> FirstPageFunc(int? pageSizeHint) { - using var scope = _softwareUpdateConfigurationRunsClientDiagnostics.CreateScope("AutomationAccountResource.GetSoftwareUpdateConfigurationRuns"); + using var scope = _softwareUpdateConfigurationMachineRunsClientDiagnostics.CreateScope("AutomationAccountResource.GetSoftwareUpdateConfigurationMachineRuns"); scope.Start(); try { - var response = await _softwareUpdateConfigurationRunsRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clientRequestId, filter, skip, top, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _softwareUpdateConfigurationMachineRunsRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clientRequestId, filter, skip, top, cancellationToken: cancellationToken).ConfigureAwait(false); return Page.FromValues(response.Value.Value, null, response.GetRawResponse()); } catch (Exception e) @@ -1788,25 +1869,25 @@ async Task> FirstPageFunc(int? pageSizeHint } /// - /// Return list of software update configuration runs - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationRuns - /// Operation Id: SoftwareUpdateConfigurationRuns_List + /// Return list of software update configuration machine runs + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationMachineRuns + /// Operation Id: SoftwareUpdateConfigurationMachineRuns_List /// /// Identifies this specific client request. /// The filter to apply on the operation. You can use the following filters: 'properties/osType', 'properties/status', 'properties/startTime', and 'properties/softwareUpdateConfiguration/name'. - /// Number of entries you skip before returning results. + /// number of entries you skip before returning results. /// Maximum number of entries returned in the results collection. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetSoftwareUpdateConfigurationRuns(string clientRequestId = null, string filter = null, string skip = null, string top = null, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetSoftwareUpdateConfigurationMachineRuns(string clientRequestId = null, string filter = null, string skip = null, string top = null, CancellationToken cancellationToken = default) { - Page FirstPageFunc(int? pageSizeHint) + Page FirstPageFunc(int? pageSizeHint) { - using var scope = _softwareUpdateConfigurationRunsClientDiagnostics.CreateScope("AutomationAccountResource.GetSoftwareUpdateConfigurationRuns"); + using var scope = _softwareUpdateConfigurationMachineRunsClientDiagnostics.CreateScope("AutomationAccountResource.GetSoftwareUpdateConfigurationMachineRuns"); scope.Start(); try { - var response = _softwareUpdateConfigurationRunsRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clientRequestId, filter, skip, top, cancellationToken: cancellationToken); + var response = _softwareUpdateConfigurationMachineRunsRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clientRequestId, filter, skip, top, cancellationToken: cancellationToken); return Page.FromValues(response.Value.Value, null, response.GetRawResponse()); } catch (Exception e) @@ -1819,20 +1900,20 @@ Page FirstPageFunc(int? pageSizeHint) } /// - /// Get a single software update configuration machine run by Id. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationMachineRuns/{softwareUpdateConfigurationMachineRunId} - /// Operation Id: SoftwareUpdateConfigurationMachineRuns_GetById + /// Get a single software update configuration Run by Id. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationRuns/{softwareUpdateConfigurationRunId} + /// Operation Id: SoftwareUpdateConfigurationRuns_GetById /// - /// The Id of the software update configuration machine run. + /// The Id of the software update configuration run. /// Identifies this specific client request. /// The cancellation token to use. - public virtual async Task> GetByIdSoftwareUpdateConfigurationMachineRunAsync(Guid softwareUpdateConfigurationMachineRunId, string clientRequestId = null, CancellationToken cancellationToken = default) + public virtual async Task> GetByIdSoftwareUpdateConfigurationRunAsync(Guid softwareUpdateConfigurationRunId, string clientRequestId = null, CancellationToken cancellationToken = default) { - using var scope = _softwareUpdateConfigurationMachineRunsClientDiagnostics.CreateScope("AutomationAccountResource.GetByIdSoftwareUpdateConfigurationMachineRun"); + using var scope = _softwareUpdateConfigurationRunsClientDiagnostics.CreateScope("AutomationAccountResource.GetByIdSoftwareUpdateConfigurationRun"); scope.Start(); try { - var response = await _softwareUpdateConfigurationMachineRunsRestClient.GetByIdAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, softwareUpdateConfigurationMachineRunId, clientRequestId, cancellationToken).ConfigureAwait(false); + var response = await _softwareUpdateConfigurationRunsRestClient.GetByIdAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, softwareUpdateConfigurationRunId, clientRequestId, cancellationToken).ConfigureAwait(false); return response; } catch (Exception e) @@ -1843,20 +1924,20 @@ public virtual async Task> GetBy } /// - /// Get a single software update configuration machine run by Id. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationMachineRuns/{softwareUpdateConfigurationMachineRunId} - /// Operation Id: SoftwareUpdateConfigurationMachineRuns_GetById + /// Get a single software update configuration Run by Id. + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationRuns/{softwareUpdateConfigurationRunId} + /// Operation Id: SoftwareUpdateConfigurationRuns_GetById /// - /// The Id of the software update configuration machine run. + /// The Id of the software update configuration run. /// Identifies this specific client request. /// The cancellation token to use. - public virtual Response GetByIdSoftwareUpdateConfigurationMachineRun(Guid softwareUpdateConfigurationMachineRunId, string clientRequestId = null, CancellationToken cancellationToken = default) + public virtual Response GetByIdSoftwareUpdateConfigurationRun(Guid softwareUpdateConfigurationRunId, string clientRequestId = null, CancellationToken cancellationToken = default) { - using var scope = _softwareUpdateConfigurationMachineRunsClientDiagnostics.CreateScope("AutomationAccountResource.GetByIdSoftwareUpdateConfigurationMachineRun"); + using var scope = _softwareUpdateConfigurationRunsClientDiagnostics.CreateScope("AutomationAccountResource.GetByIdSoftwareUpdateConfigurationRun"); scope.Start(); try { - var response = _softwareUpdateConfigurationMachineRunsRestClient.GetById(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, softwareUpdateConfigurationMachineRunId, clientRequestId, cancellationToken); + var response = _softwareUpdateConfigurationRunsRestClient.GetById(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, softwareUpdateConfigurationRunId, clientRequestId, cancellationToken); return response; } catch (Exception e) @@ -1867,25 +1948,25 @@ public virtual Response GetByIdSoftwareUp } /// - /// Return list of software update configuration machine runs - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationMachineRuns - /// Operation Id: SoftwareUpdateConfigurationMachineRuns_List + /// Return list of software update configuration runs + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationRuns + /// Operation Id: SoftwareUpdateConfigurationRuns_List /// /// Identifies this specific client request. /// The filter to apply on the operation. You can use the following filters: 'properties/osType', 'properties/status', 'properties/startTime', and 'properties/softwareUpdateConfiguration/name'. - /// number of entries you skip before returning results. + /// Number of entries you skip before returning results. /// Maximum number of entries returned in the results collection. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetSoftwareUpdateConfigurationMachineRunsAsync(string clientRequestId = null, string filter = null, string skip = null, string top = null, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetSoftwareUpdateConfigurationRunsAsync(string clientRequestId = null, string filter = null, string skip = null, string top = null, CancellationToken cancellationToken = default) { - async Task> FirstPageFunc(int? pageSizeHint) + async Task> FirstPageFunc(int? pageSizeHint) { - using var scope = _softwareUpdateConfigurationMachineRunsClientDiagnostics.CreateScope("AutomationAccountResource.GetSoftwareUpdateConfigurationMachineRuns"); + using var scope = _softwareUpdateConfigurationRunsClientDiagnostics.CreateScope("AutomationAccountResource.GetSoftwareUpdateConfigurationRuns"); scope.Start(); try { - var response = await _softwareUpdateConfigurationMachineRunsRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clientRequestId, filter, skip, top, cancellationToken: cancellationToken).ConfigureAwait(false); + var response = await _softwareUpdateConfigurationRunsRestClient.ListAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clientRequestId, filter, skip, top, cancellationToken: cancellationToken).ConfigureAwait(false); return Page.FromValues(response.Value.Value, null, response.GetRawResponse()); } catch (Exception e) @@ -1898,25 +1979,25 @@ async Task> FirstPageFunc(int? pageS } /// - /// Return list of software update configuration machine runs - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationMachineRuns - /// Operation Id: SoftwareUpdateConfigurationMachineRuns_List + /// Return list of software update configuration runs + /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/softwareUpdateConfigurationRuns + /// Operation Id: SoftwareUpdateConfigurationRuns_List /// /// Identifies this specific client request. /// The filter to apply on the operation. You can use the following filters: 'properties/osType', 'properties/status', 'properties/startTime', and 'properties/softwareUpdateConfiguration/name'. - /// number of entries you skip before returning results. + /// Number of entries you skip before returning results. /// Maximum number of entries returned in the results collection. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetSoftwareUpdateConfigurationMachineRuns(string clientRequestId = null, string filter = null, string skip = null, string top = null, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetSoftwareUpdateConfigurationRuns(string clientRequestId = null, string filter = null, string skip = null, string top = null, CancellationToken cancellationToken = default) { - Page FirstPageFunc(int? pageSizeHint) + Page FirstPageFunc(int? pageSizeHint) { - using var scope = _softwareUpdateConfigurationMachineRunsClientDiagnostics.CreateScope("AutomationAccountResource.GetSoftwareUpdateConfigurationMachineRuns"); + using var scope = _softwareUpdateConfigurationRunsClientDiagnostics.CreateScope("AutomationAccountResource.GetSoftwareUpdateConfigurationRuns"); scope.Start(); try { - var response = _softwareUpdateConfigurationMachineRunsRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clientRequestId, filter, skip, top, cancellationToken: cancellationToken); + var response = _softwareUpdateConfigurationRunsRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, clientRequestId, filter, skip, top, cancellationToken: cancellationToken); return Page.FromValues(response.Value.Value, null, response.GetRawResponse()); } catch (Exception e) @@ -1928,50 +2009,6 @@ Page FirstPageFunc(int? pageSizeHint) return PageableHelpers.CreateEnumerable(FirstPageFunc, null); } - /// - /// Generates a Uri for use in creating a webhook. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks/generateUri - /// Operation Id: Webhook_GenerateUri - /// - /// The cancellation token to use. - public virtual async Task> GenerateUriWebhookAsync(CancellationToken cancellationToken = default) - { - using var scope = _webhookClientDiagnostics.CreateScope("AutomationAccountResource.GenerateUriWebhook"); - scope.Start(); - try - { - var response = await _webhookRestClient.GenerateUriAsync(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken).ConfigureAwait(false); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// Generates a Uri for use in creating a webhook. - /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName}/webhooks/generateUri - /// Operation Id: Webhook_GenerateUri - /// - /// The cancellation token to use. - public virtual Response GenerateUriWebhook(CancellationToken cancellationToken = default) - { - using var scope = _webhookClientDiagnostics.CreateScope("AutomationAccountResource.GenerateUriWebhook"); - scope.Start(); - try - { - var response = _webhookRestClient.GenerateUri(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken); - return response; - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - /// /// Add a tag to the current resource. /// Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Automation/automationAccounts/{automationAccountName} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Extensions/AutomationExtensions.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Extensions/AutomationExtensions.cs index 75327cd162874..cf8c8107da9c3 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Extensions/AutomationExtensions.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Extensions/AutomationExtensions.cs @@ -29,55 +29,55 @@ private static SubscriptionResourceExtensionClient GetExtensionClient(Subscripti } /// - /// Retrieve a list of accounts within a given subscription. - /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Automation/automationAccounts - /// Operation Id: AutomationAccount_List + /// Retrieve deleted automation account. + /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Automation/deletedAutomationAccounts + /// Operation Id: deletedAutomationAccounts_ListBySubscription /// /// The instance the method will execute against. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetAutomationAccountsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetDeletedAutomationAccountsBySubscriptionAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { - return GetExtensionClient(subscriptionResource).GetAutomationAccountsAsync(cancellationToken); + return GetExtensionClient(subscriptionResource).GetDeletedAutomationAccountsBySubscriptionAsync(cancellationToken); } /// - /// Retrieve a list of accounts within a given subscription. - /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Automation/automationAccounts - /// Operation Id: AutomationAccount_List + /// Retrieve deleted automation account. + /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Automation/deletedAutomationAccounts + /// Operation Id: deletedAutomationAccounts_ListBySubscription /// /// The instance the method will execute against. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetAutomationAccounts(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetDeletedAutomationAccountsBySubscription(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { - return GetExtensionClient(subscriptionResource).GetAutomationAccounts(cancellationToken); + return GetExtensionClient(subscriptionResource).GetDeletedAutomationAccountsBySubscription(cancellationToken); } /// - /// Retrieve deleted automation account. - /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Automation/deletedAutomationAccounts - /// Operation Id: deletedAutomationAccounts_ListBySubscription + /// Retrieve a list of accounts within a given subscription. + /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Automation/automationAccounts + /// Operation Id: AutomationAccount_List /// /// The instance the method will execute against. /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public static AsyncPageable GetDeletedAutomationAccountsBySubscriptionAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public static AsyncPageable GetAutomationAccountsAsync(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { - return GetExtensionClient(subscriptionResource).GetDeletedAutomationAccountsBySubscriptionAsync(cancellationToken); + return GetExtensionClient(subscriptionResource).GetAutomationAccountsAsync(cancellationToken); } /// - /// Retrieve deleted automation account. - /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Automation/deletedAutomationAccounts - /// Operation Id: deletedAutomationAccounts_ListBySubscription + /// Retrieve a list of accounts within a given subscription. + /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Automation/automationAccounts + /// Operation Id: AutomationAccount_List /// /// The instance the method will execute against. /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public static Pageable GetDeletedAutomationAccountsBySubscription(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public static Pageable GetAutomationAccounts(this SubscriptionResource subscriptionResource, CancellationToken cancellationToken = default) { - return GetExtensionClient(subscriptionResource).GetDeletedAutomationAccountsBySubscription(cancellationToken); + return GetExtensionClient(subscriptionResource).GetAutomationAccounts(cancellationToken); } private static ResourceGroupResourceExtensionClient GetExtensionClient(ResourceGroupResource resourceGroupResource) @@ -148,115 +148,153 @@ public static AutomationPrivateEndpointConnectionResource GetAutomationPrivateEn } #endregion - #region AutomationAccountPython2PackageResource + #region DscNodeResource /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static AutomationAccountPython2PackageResource GetAutomationAccountPython2PackageResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static DscNodeResource GetDscNodeResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - AutomationAccountPython2PackageResource.ValidateResourceId(id); - return new AutomationAccountPython2PackageResource(client, id); + DscNodeResource.ValidateResourceId(id); + return new DscNodeResource(client, id); } ); } #endregion - #region AutomationAccountModuleResource + #region DscCompilationJobResource /// - /// Gets an object representing an along with the instance operations that can be performed on it but with no data. - /// You can use to create an from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static AutomationAccountModuleResource GetAutomationAccountModuleResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static DscCompilationJobResource GetDscCompilationJobResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - AutomationAccountModuleResource.ValidateResourceId(id); - return new AutomationAccountModuleResource(client, id); + DscCompilationJobResource.ValidateResourceId(id); + return new DscCompilationJobResource(client, id); } ); } #endregion - #region DscNodeResource + #region WatcherResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static DscNodeResource GetDscNodeResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static WatcherResource GetWatcherResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - DscNodeResource.ValidateResourceId(id); - return new DscNodeResource(client, id); + WatcherResource.ValidateResourceId(id); + return new WatcherResource(client, id); } ); } #endregion - #region DscNodeConfigurationResource + #region SoftwareUpdateConfigurationResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static DscNodeConfigurationResource GetDscNodeConfigurationResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static SoftwareUpdateConfigurationResource GetSoftwareUpdateConfigurationResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - DscNodeConfigurationResource.ValidateResourceId(id); - return new DscNodeConfigurationResource(client, id); + SoftwareUpdateConfigurationResource.ValidateResourceId(id); + return new SoftwareUpdateConfigurationResource(client, id); } ); } #endregion - #region DscCompilationJobResource + #region WebhookResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static DscCompilationJobResource GetDscCompilationJobResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static WebhookResource GetWebhookResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - DscCompilationJobResource.ValidateResourceId(id); - return new DscCompilationJobResource(client, id); + WebhookResource.ValidateResourceId(id); + return new WebhookResource(client, id); } ); } #endregion - #region SourceControlResource + #region AutomationAccountPython3PackageResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static SourceControlResource GetSourceControlResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static AutomationAccountPython3PackageResource GetAutomationAccountPython3PackageResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - SourceControlResource.ValidateResourceId(id); - return new SourceControlResource(client, id); + AutomationAccountPython3PackageResource.ValidateResourceId(id); + return new AutomationAccountPython3PackageResource(client, id); + } + ); + } + #endregion + + #region AutomationAccountModuleResource + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static AutomationAccountModuleResource GetAutomationAccountModuleResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + AutomationAccountModuleResource.ValidateResourceId(id); + return new AutomationAccountModuleResource(client, id); + } + ); + } + #endregion + + #region AutomationAccountPython2PackageResource + /// + /// Gets an object representing an along with the instance operations that can be performed on it but with no data. + /// You can use to create an from its components. + /// + /// The instance the method will execute against. + /// The resource ID of the resource to get. + /// Returns a object. + public static AutomationAccountPython2PackageResource GetAutomationAccountPython2PackageResource(this ArmClient client, ResourceIdentifier id) + { + return client.GetResourceClient(() => + { + AutomationAccountPython2PackageResource.ValidateResourceId(id); + return new AutomationAccountPython2PackageResource(client, id); } ); } @@ -357,96 +395,77 @@ public static CredentialResource GetCredentialResource(this ArmClient client, Re } #endregion - #region JobScheduleResource - /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. - /// - /// The instance the method will execute against. - /// The resource ID of the resource to get. - /// Returns a object. - public static JobScheduleResource GetJobScheduleResource(this ArmClient client, ResourceIdentifier id) - { - return client.GetResourceClient(() => - { - JobScheduleResource.ValidateResourceId(id); - return new JobScheduleResource(client, id); - } - ); - } - #endregion - - #region ScheduleResource + #region DscConfigurationResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static ScheduleResource GetScheduleResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static DscConfigurationResource GetDscConfigurationResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - ScheduleResource.ValidateResourceId(id); - return new ScheduleResource(client, id); + DscConfigurationResource.ValidateResourceId(id); + return new DscConfigurationResource(client, id); } ); } #endregion - #region VariableResource + #region DscNodeConfigurationResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static VariableResource GetVariableResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static DscNodeConfigurationResource GetDscNodeConfigurationResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - VariableResource.ValidateResourceId(id); - return new VariableResource(client, id); + DscNodeConfigurationResource.ValidateResourceId(id); + return new DscNodeConfigurationResource(client, id); } ); } #endregion - #region WatcherResource + #region HybridRunbookWorkerResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static WatcherResource GetWatcherResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static HybridRunbookWorkerResource GetHybridRunbookWorkerResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - WatcherResource.ValidateResourceId(id); - return new WatcherResource(client, id); + HybridRunbookWorkerResource.ValidateResourceId(id); + return new HybridRunbookWorkerResource(client, id); } ); } #endregion - #region DscConfigurationResource + #region HybridRunbookWorkerGroupResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static DscConfigurationResource GetDscConfigurationResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static HybridRunbookWorkerGroupResource GetHybridRunbookWorkerGroupResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - DscConfigurationResource.ValidateResourceId(id); - return new DscConfigurationResource(client, id); + HybridRunbookWorkerGroupResource.ValidateResourceId(id); + return new HybridRunbookWorkerGroupResource(client, id); } ); } @@ -471,20 +490,20 @@ public static JobResource GetJobResource(this ArmClient client, ResourceIdentifi } #endregion - #region SoftwareUpdateConfigurationResource + #region JobScheduleResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static SoftwareUpdateConfigurationResource GetSoftwareUpdateConfigurationResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static JobScheduleResource GetJobScheduleResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - SoftwareUpdateConfigurationResource.ValidateResourceId(id); - return new SoftwareUpdateConfigurationResource(client, id); + JobScheduleResource.ValidateResourceId(id); + return new JobScheduleResource(client, id); } ); } @@ -509,58 +528,58 @@ public static RunbookResource GetRunbookResource(this ArmClient client, Resource } #endregion - #region WebhookResource + #region ScheduleResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static WebhookResource GetWebhookResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static ScheduleResource GetScheduleResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - WebhookResource.ValidateResourceId(id); - return new WebhookResource(client, id); + ScheduleResource.ValidateResourceId(id); + return new ScheduleResource(client, id); } ); } #endregion - #region HybridRunbookWorkerResource + #region SourceControlResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static HybridRunbookWorkerResource GetHybridRunbookWorkerResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static SourceControlResource GetSourceControlResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - HybridRunbookWorkerResource.ValidateResourceId(id); - return new HybridRunbookWorkerResource(client, id); + SourceControlResource.ValidateResourceId(id); + return new SourceControlResource(client, id); } ); } #endregion - #region HybridRunbookWorkerGroupResource + #region VariableResource /// - /// Gets an object representing a along with the instance operations that can be performed on it but with no data. - /// You can use to create a from its components. + /// Gets an object representing a along with the instance operations that can be performed on it but with no data. + /// You can use to create a from its components. /// /// The instance the method will execute against. /// The resource ID of the resource to get. - /// Returns a object. - public static HybridRunbookWorkerGroupResource GetHybridRunbookWorkerGroupResource(this ArmClient client, ResourceIdentifier id) + /// Returns a object. + public static VariableResource GetVariableResource(this ArmClient client, ResourceIdentifier id) { return client.GetResourceClient(() => { - HybridRunbookWorkerGroupResource.ValidateResourceId(id); - return new HybridRunbookWorkerGroupResource(client, id); + VariableResource.ValidateResourceId(id); + return new VariableResource(client, id); } ); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs index 23bf1006f10e9..d2e395d581225 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Extensions/SubscriptionResourceExtensionClient.cs @@ -20,10 +20,10 @@ namespace Azure.ResourceManager.Automation /// A class to add extension methods to SubscriptionResource. internal partial class SubscriptionResourceExtensionClient : ArmResource { - private ClientDiagnostics _automationAccountClientDiagnostics; - private AutomationAccountRestOperations _automationAccountRestClient; private ClientDiagnostics _deletedAutomationAccountsClientDiagnostics; private DeletedAutomationAccountsRestOperations _deletedAutomationAccountsRestClient; + private ClientDiagnostics _automationAccountClientDiagnostics; + private AutomationAccountRestOperations _automationAccountRestClient; /// Initializes a new instance of the class for mocking. protected SubscriptionResourceExtensionClient() @@ -37,10 +37,10 @@ internal SubscriptionResourceExtensionClient(ArmClient client, ResourceIdentifie { } - private ClientDiagnostics AutomationAccountClientDiagnostics => _automationAccountClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Automation", AutomationAccountResource.ResourceType.Namespace, Diagnostics); - private AutomationAccountRestOperations AutomationAccountRestClient => _automationAccountRestClient ??= new AutomationAccountRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(AutomationAccountResource.ResourceType)); private ClientDiagnostics deletedAutomationAccountsClientDiagnostics => _deletedAutomationAccountsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Automation", ProviderConstants.DefaultProviderNamespace, Diagnostics); private DeletedAutomationAccountsRestOperations deletedAutomationAccountsRestClient => _deletedAutomationAccountsRestClient ??= new DeletedAutomationAccountsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint); + private ClientDiagnostics AutomationAccountClientDiagnostics => _automationAccountClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.Automation", AutomationAccountResource.ResourceType.Namespace, Diagnostics); + private AutomationAccountRestOperations AutomationAccountRestClient => _automationAccountRestClient ??= new AutomationAccountRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(AutomationAccountResource.ResourceType)); private string GetApiVersionOrNull(ResourceType resourceType) { @@ -49,22 +49,22 @@ private string GetApiVersionOrNull(ResourceType resourceType) } /// - /// Retrieve a list of accounts within a given subscription. - /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Automation/automationAccounts - /// Operation Id: AutomationAccount_List + /// Retrieve deleted automation account. + /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Automation/deletedAutomationAccounts + /// Operation Id: deletedAutomationAccounts_ListBySubscription /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetAutomationAccountsAsync(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetDeletedAutomationAccountsBySubscriptionAsync(CancellationToken cancellationToken = default) { - async Task> FirstPageFunc(int? pageSizeHint) + async Task> FirstPageFunc(int? pageSizeHint) { - using var scope = AutomationAccountClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetAutomationAccounts"); + using var scope = deletedAutomationAccountsClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetDeletedAutomationAccountsBySubscription"); scope.Start(); try { - var response = await AutomationAccountRestClient.ListAsync(Id.SubscriptionId, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new AutomationAccountResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = await deletedAutomationAccountsRestClient.ListBySubscriptionAsync(Id.SubscriptionId, cancellationToken: cancellationToken).ConfigureAwait(false); + return Page.FromValues(response.Value.Value, null, response.GetRawResponse()); } catch (Exception e) { @@ -72,14 +72,26 @@ async Task> FirstPageFunc(int? pageSizeHint) throw; } } - async Task> NextPageFunc(string nextLink, int? pageSizeHint) + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, null); + } + + /// + /// Retrieve deleted automation account. + /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Automation/deletedAutomationAccounts + /// Operation Id: deletedAutomationAccounts_ListBySubscription + /// + /// The cancellation token to use. + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetDeletedAutomationAccountsBySubscription(CancellationToken cancellationToken = default) + { + Page FirstPageFunc(int? pageSizeHint) { - using var scope = AutomationAccountClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetAutomationAccounts"); + using var scope = deletedAutomationAccountsClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetDeletedAutomationAccountsBySubscription"); scope.Start(); try { - var response = await AutomationAccountRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value.Select(value => new AutomationAccountResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); + var response = deletedAutomationAccountsRestClient.ListBySubscription(Id.SubscriptionId, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value, null, response.GetRawResponse()); } catch (Exception e) { @@ -87,7 +99,7 @@ async Task> NextPageFunc(string nextLink, int? p throw; } } - return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); + return PageableHelpers.CreateEnumerable(FirstPageFunc, null); } /// @@ -96,16 +108,16 @@ async Task> NextPageFunc(string nextLink, int? p /// Operation Id: AutomationAccount_List /// /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetAutomationAccounts(CancellationToken cancellationToken = default) + /// An async collection of that may take multiple service requests to iterate over. + public virtual AsyncPageable GetAutomationAccountsAsync(CancellationToken cancellationToken = default) { - Page FirstPageFunc(int? pageSizeHint) + async Task> FirstPageFunc(int? pageSizeHint) { using var scope = AutomationAccountClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetAutomationAccounts"); scope.Start(); try { - var response = AutomationAccountRestClient.List(Id.SubscriptionId, cancellationToken: cancellationToken); + var response = await AutomationAccountRestClient.ListAsync(Id.SubscriptionId, cancellationToken: cancellationToken).ConfigureAwait(false); return Page.FromValues(response.Value.Value.Select(value => new AutomationAccountResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) @@ -114,13 +126,13 @@ Page FirstPageFunc(int? pageSizeHint) throw; } } - Page NextPageFunc(string nextLink, int? pageSizeHint) + async Task> NextPageFunc(string nextLink, int? pageSizeHint) { using var scope = AutomationAccountClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetAutomationAccounts"); scope.Start(); try { - var response = AutomationAccountRestClient.ListNextPage(nextLink, Id.SubscriptionId, cancellationToken: cancellationToken); + var response = await AutomationAccountRestClient.ListNextPageAsync(nextLink, Id.SubscriptionId, cancellationToken: cancellationToken).ConfigureAwait(false); return Page.FromValues(response.Value.Value.Select(value => new AutomationAccountResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) @@ -129,26 +141,26 @@ Page NextPageFunc(string nextLink, int? pageSizeHint) throw; } } - return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); + return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); } /// - /// Retrieve deleted automation account. - /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Automation/deletedAutomationAccounts - /// Operation Id: deletedAutomationAccounts_ListBySubscription + /// Retrieve a list of accounts within a given subscription. + /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Automation/automationAccounts + /// Operation Id: AutomationAccount_List /// /// The cancellation token to use. - /// An async collection of that may take multiple service requests to iterate over. - public virtual AsyncPageable GetDeletedAutomationAccountsBySubscriptionAsync(CancellationToken cancellationToken = default) + /// A collection of that may take multiple service requests to iterate over. + public virtual Pageable GetAutomationAccounts(CancellationToken cancellationToken = default) { - async Task> FirstPageFunc(int? pageSizeHint) + Page FirstPageFunc(int? pageSizeHint) { - using var scope = deletedAutomationAccountsClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetDeletedAutomationAccountsBySubscription"); + using var scope = AutomationAccountClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetAutomationAccounts"); scope.Start(); try { - var response = await deletedAutomationAccountsRestClient.ListBySubscriptionAsync(Id.SubscriptionId, cancellationToken: cancellationToken).ConfigureAwait(false); - return Page.FromValues(response.Value.Value, null, response.GetRawResponse()); + var response = AutomationAccountRestClient.List(Id.SubscriptionId, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new AutomationAccountResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -156,26 +168,14 @@ async Task> FirstPageFunc(int? pageSizeHint) throw; } } - return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, null); - } - - /// - /// Retrieve deleted automation account. - /// Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Automation/deletedAutomationAccounts - /// Operation Id: deletedAutomationAccounts_ListBySubscription - /// - /// The cancellation token to use. - /// A collection of that may take multiple service requests to iterate over. - public virtual Pageable GetDeletedAutomationAccountsBySubscription(CancellationToken cancellationToken = default) - { - Page FirstPageFunc(int? pageSizeHint) + Page NextPageFunc(string nextLink, int? pageSizeHint) { - using var scope = deletedAutomationAccountsClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetDeletedAutomationAccountsBySubscription"); + using var scope = AutomationAccountClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetAutomationAccounts"); scope.Start(); try { - var response = deletedAutomationAccountsRestClient.ListBySubscription(Id.SubscriptionId, cancellationToken: cancellationToken); - return Page.FromValues(response.Value.Value, null, response.GetRawResponse()); + var response = AutomationAccountRestClient.ListNextPage(nextLink, Id.SubscriptionId, cancellationToken: cancellationToken); + return Page.FromValues(response.Value.Value.Select(value => new AutomationAccountResource(Client, value)), response.Value.NextLink, response.GetRawResponse()); } catch (Exception e) { @@ -183,7 +183,7 @@ Page FirstPageFunc(int? pageSizeHint) throw; } } - return PageableHelpers.CreateEnumerable(FirstPageFunc, null); + return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); } } } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/HttpStatusCode.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/HttpStatusCode.cs deleted file mode 100644 index 39f464f6ae2d8..0000000000000 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/HttpStatusCode.cs +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.ResourceManager.Automation.Models -{ - /// The HttpStatusCode. - public readonly partial struct HttpStatusCode : IEquatable - { - private readonly string _value; - - /// Initializes a new instance of . - /// is null. - public HttpStatusCode(string value) - { - _value = value ?? throw new ArgumentNullException(nameof(value)); - } - - private const string ContinueValue = "Continue"; - private const string SwitchingProtocolsValue = "SwitchingProtocols"; - private const string OKValue = "OK"; - private const string CreatedValue = "Created"; - private const string AcceptedValue = "Accepted"; - private const string NonAuthoritativeInformationValue = "NonAuthoritativeInformation"; - private const string NoContentValue = "NoContent"; - private const string ResetContentValue = "ResetContent"; - private const string PartialContentValue = "PartialContent"; - private const string MultipleChoicesValue = "MultipleChoices"; - private const string AmbiguousValue = "Ambiguous"; - private const string MovedPermanentlyValue = "MovedPermanently"; - private const string MovedValue = "Moved"; - private const string FoundValue = "Found"; - private const string RedirectValue = "Redirect"; - private const string SeeOtherValue = "SeeOther"; - private const string RedirectMethodValue = "RedirectMethod"; - private const string NotModifiedValue = "NotModified"; - private const string UseProxyValue = "UseProxy"; - private const string UnusedValue = "Unused"; - private const string TemporaryRedirectValue = "TemporaryRedirect"; - private const string RedirectKeepVerbValue = "RedirectKeepVerb"; - private const string BadRequestValue = "BadRequest"; - private const string UnauthorizedValue = "Unauthorized"; - private const string PaymentRequiredValue = "PaymentRequired"; - private const string ForbiddenValue = "Forbidden"; - private const string NotFoundValue = "NotFound"; - private const string MethodNotAllowedValue = "MethodNotAllowed"; - private const string NotAcceptableValue = "NotAcceptable"; - private const string ProxyAuthenticationRequiredValue = "ProxyAuthenticationRequired"; - private const string RequestTimeoutValue = "RequestTimeout"; - private const string ConflictValue = "Conflict"; - private const string GoneValue = "Gone"; - private const string LengthRequiredValue = "LengthRequired"; - private const string PreconditionFailedValue = "PreconditionFailed"; - private const string RequestEntityTooLargeValue = "RequestEntityTooLarge"; - private const string RequestUriTooLongValue = "RequestUriTooLong"; - private const string UnsupportedMediaTypeValue = "UnsupportedMediaType"; - private const string RequestedRangeNotSatisfiableValue = "RequestedRangeNotSatisfiable"; - private const string ExpectationFailedValue = "ExpectationFailed"; - private const string UpgradeRequiredValue = "UpgradeRequired"; - private const string InternalServerErrorValue = "InternalServerError"; - private const string NotImplementedValue = "NotImplemented"; - private const string BadGatewayValue = "BadGateway"; - private const string ServiceUnavailableValue = "ServiceUnavailable"; - private const string GatewayTimeoutValue = "GatewayTimeout"; - private const string HttpVersionNotSupportedValue = "HttpVersionNotSupported"; - - /// Continue. - public static HttpStatusCode Continue { get; } = new HttpStatusCode(ContinueValue); - /// SwitchingProtocols. - public static HttpStatusCode SwitchingProtocols { get; } = new HttpStatusCode(SwitchingProtocolsValue); - /// OK. - public static HttpStatusCode OK { get; } = new HttpStatusCode(OKValue); - /// Created. - public static HttpStatusCode Created { get; } = new HttpStatusCode(CreatedValue); - /// Accepted. - public static HttpStatusCode Accepted { get; } = new HttpStatusCode(AcceptedValue); - /// NonAuthoritativeInformation. - public static HttpStatusCode NonAuthoritativeInformation { get; } = new HttpStatusCode(NonAuthoritativeInformationValue); - /// NoContent. - public static HttpStatusCode NoContent { get; } = new HttpStatusCode(NoContentValue); - /// ResetContent. - public static HttpStatusCode ResetContent { get; } = new HttpStatusCode(ResetContentValue); - /// PartialContent. - public static HttpStatusCode PartialContent { get; } = new HttpStatusCode(PartialContentValue); - /// MultipleChoices. - public static HttpStatusCode MultipleChoices { get; } = new HttpStatusCode(MultipleChoicesValue); - /// Ambiguous. - public static HttpStatusCode Ambiguous { get; } = new HttpStatusCode(AmbiguousValue); - /// MovedPermanently. - public static HttpStatusCode MovedPermanently { get; } = new HttpStatusCode(MovedPermanentlyValue); - /// Moved. - public static HttpStatusCode Moved { get; } = new HttpStatusCode(MovedValue); - /// Found. - public static HttpStatusCode Found { get; } = new HttpStatusCode(FoundValue); - /// Redirect. - public static HttpStatusCode Redirect { get; } = new HttpStatusCode(RedirectValue); - /// SeeOther. - public static HttpStatusCode SeeOther { get; } = new HttpStatusCode(SeeOtherValue); - /// RedirectMethod. - public static HttpStatusCode RedirectMethod { get; } = new HttpStatusCode(RedirectMethodValue); - /// NotModified. - public static HttpStatusCode NotModified { get; } = new HttpStatusCode(NotModifiedValue); - /// UseProxy. - public static HttpStatusCode UseProxy { get; } = new HttpStatusCode(UseProxyValue); - /// Unused. - public static HttpStatusCode Unused { get; } = new HttpStatusCode(UnusedValue); - /// TemporaryRedirect. - public static HttpStatusCode TemporaryRedirect { get; } = new HttpStatusCode(TemporaryRedirectValue); - /// RedirectKeepVerb. - public static HttpStatusCode RedirectKeepVerb { get; } = new HttpStatusCode(RedirectKeepVerbValue); - /// BadRequest. - public static HttpStatusCode BadRequest { get; } = new HttpStatusCode(BadRequestValue); - /// Unauthorized. - public static HttpStatusCode Unauthorized { get; } = new HttpStatusCode(UnauthorizedValue); - /// PaymentRequired. - public static HttpStatusCode PaymentRequired { get; } = new HttpStatusCode(PaymentRequiredValue); - /// Forbidden. - public static HttpStatusCode Forbidden { get; } = new HttpStatusCode(ForbiddenValue); - /// NotFound. - public static HttpStatusCode NotFound { get; } = new HttpStatusCode(NotFoundValue); - /// MethodNotAllowed. - public static HttpStatusCode MethodNotAllowed { get; } = new HttpStatusCode(MethodNotAllowedValue); - /// NotAcceptable. - public static HttpStatusCode NotAcceptable { get; } = new HttpStatusCode(NotAcceptableValue); - /// ProxyAuthenticationRequired. - public static HttpStatusCode ProxyAuthenticationRequired { get; } = new HttpStatusCode(ProxyAuthenticationRequiredValue); - /// RequestTimeout. - public static HttpStatusCode RequestTimeout { get; } = new HttpStatusCode(RequestTimeoutValue); - /// Conflict. - public static HttpStatusCode Conflict { get; } = new HttpStatusCode(ConflictValue); - /// Gone. - public static HttpStatusCode Gone { get; } = new HttpStatusCode(GoneValue); - /// LengthRequired. - public static HttpStatusCode LengthRequired { get; } = new HttpStatusCode(LengthRequiredValue); - /// PreconditionFailed. - public static HttpStatusCode PreconditionFailed { get; } = new HttpStatusCode(PreconditionFailedValue); - /// RequestEntityTooLarge. - public static HttpStatusCode RequestEntityTooLarge { get; } = new HttpStatusCode(RequestEntityTooLargeValue); - /// RequestUriTooLong. - public static HttpStatusCode RequestUriTooLong { get; } = new HttpStatusCode(RequestUriTooLongValue); - /// UnsupportedMediaType. - public static HttpStatusCode UnsupportedMediaType { get; } = new HttpStatusCode(UnsupportedMediaTypeValue); - /// RequestedRangeNotSatisfiable. - public static HttpStatusCode RequestedRangeNotSatisfiable { get; } = new HttpStatusCode(RequestedRangeNotSatisfiableValue); - /// ExpectationFailed. - public static HttpStatusCode ExpectationFailed { get; } = new HttpStatusCode(ExpectationFailedValue); - /// UpgradeRequired. - public static HttpStatusCode UpgradeRequired { get; } = new HttpStatusCode(UpgradeRequiredValue); - /// InternalServerError. - public static HttpStatusCode InternalServerError { get; } = new HttpStatusCode(InternalServerErrorValue); - /// NotImplemented. - public static HttpStatusCode NotImplemented { get; } = new HttpStatusCode(NotImplementedValue); - /// BadGateway. - public static HttpStatusCode BadGateway { get; } = new HttpStatusCode(BadGatewayValue); - /// ServiceUnavailable. - public static HttpStatusCode ServiceUnavailable { get; } = new HttpStatusCode(ServiceUnavailableValue); - /// GatewayTimeout. - public static HttpStatusCode GatewayTimeout { get; } = new HttpStatusCode(GatewayTimeoutValue); - /// HttpVersionNotSupported. - public static HttpStatusCode HttpVersionNotSupported { get; } = new HttpStatusCode(HttpVersionNotSupportedValue); - /// Determines if two values are the same. - public static bool operator ==(HttpStatusCode left, HttpStatusCode right) => left.Equals(right); - /// Determines if two values are not the same. - public static bool operator !=(HttpStatusCode left, HttpStatusCode right) => !left.Equals(right); - /// Converts a string to a . - public static implicit operator HttpStatusCode(string value) => new HttpStatusCode(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is HttpStatusCode other && Equals(other); - /// - public bool Equals(HttpStatusCode other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override int GetHashCode() => _value?.GetHashCode() ?? 0; - /// - public override string ToString() => _value; - } -} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/ModuleData.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/ModuleData.Serialization.cs index 91a9dd946c5c7..f35f3884220ec 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/ModuleData.Serialization.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/ModuleData.Serialization.cs @@ -63,7 +63,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) if (Optional.IsDefined(ProvisioningState)) { writer.WritePropertyName("provisioningState"); - writer.WriteStringValue(ProvisioningState.Value.ToSerialString()); + writer.WriteStringValue(ProvisioningState.Value.ToString()); } if (Optional.IsDefined(ContentLink)) { @@ -227,7 +227,7 @@ internal static ModuleData DeserializeModuleData(JsonElement element) property0.ThrowNonNullablePropertyIsNull(); continue; } - provisioningState = property0.Value.GetString().ToModuleProvisioningState(); + provisioningState = new ModuleProvisioningState(property0.Value.GetString()); continue; } if (property0.NameEquals("contentLink")) diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/ModuleProvisioningState.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/ModuleProvisioningState.Serialization.cs deleted file mode 100644 index 8f79681ca2ede..0000000000000 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/ModuleProvisioningState.Serialization.cs +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; - -namespace Azure.ResourceManager.Automation.Models -{ - internal static partial class ModuleProvisioningStateExtensions - { - public static string ToSerialString(this ModuleProvisioningState value) => value switch - { - ModuleProvisioningState.Created => "Created", - ModuleProvisioningState.Creating => "Creating", - ModuleProvisioningState.StartingImportModuleRunbook => "StartingImportModuleRunbook", - ModuleProvisioningState.RunningImportModuleRunbook => "RunningImportModuleRunbook", - ModuleProvisioningState.ContentRetrieved => "ContentRetrieved", - ModuleProvisioningState.ContentDownloaded => "ContentDownloaded", - ModuleProvisioningState.ContentValidated => "ContentValidated", - ModuleProvisioningState.ConnectionTypeImported => "ConnectionTypeImported", - ModuleProvisioningState.ContentStored => "ContentStored", - ModuleProvisioningState.ModuleDataStored => "ModuleDataStored", - ModuleProvisioningState.ActivitiesStored => "ActivitiesStored", - ModuleProvisioningState.ModuleImportRunbookComplete => "ModuleImportRunbookComplete", - ModuleProvisioningState.Succeeded => "Succeeded", - ModuleProvisioningState.Failed => "Failed", - ModuleProvisioningState.Cancelled => "Cancelled", - ModuleProvisioningState.Updating => "Updating", - _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ModuleProvisioningState value.") - }; - - public static ModuleProvisioningState ToModuleProvisioningState(this string value) - { - if (string.Equals(value, "Created", StringComparison.InvariantCultureIgnoreCase)) return ModuleProvisioningState.Created; - if (string.Equals(value, "Creating", StringComparison.InvariantCultureIgnoreCase)) return ModuleProvisioningState.Creating; - if (string.Equals(value, "StartingImportModuleRunbook", StringComparison.InvariantCultureIgnoreCase)) return ModuleProvisioningState.StartingImportModuleRunbook; - if (string.Equals(value, "RunningImportModuleRunbook", StringComparison.InvariantCultureIgnoreCase)) return ModuleProvisioningState.RunningImportModuleRunbook; - if (string.Equals(value, "ContentRetrieved", StringComparison.InvariantCultureIgnoreCase)) return ModuleProvisioningState.ContentRetrieved; - if (string.Equals(value, "ContentDownloaded", StringComparison.InvariantCultureIgnoreCase)) return ModuleProvisioningState.ContentDownloaded; - if (string.Equals(value, "ContentValidated", StringComparison.InvariantCultureIgnoreCase)) return ModuleProvisioningState.ContentValidated; - if (string.Equals(value, "ConnectionTypeImported", StringComparison.InvariantCultureIgnoreCase)) return ModuleProvisioningState.ConnectionTypeImported; - if (string.Equals(value, "ContentStored", StringComparison.InvariantCultureIgnoreCase)) return ModuleProvisioningState.ContentStored; - if (string.Equals(value, "ModuleDataStored", StringComparison.InvariantCultureIgnoreCase)) return ModuleProvisioningState.ModuleDataStored; - if (string.Equals(value, "ActivitiesStored", StringComparison.InvariantCultureIgnoreCase)) return ModuleProvisioningState.ActivitiesStored; - if (string.Equals(value, "ModuleImportRunbookComplete", StringComparison.InvariantCultureIgnoreCase)) return ModuleProvisioningState.ModuleImportRunbookComplete; - if (string.Equals(value, "Succeeded", StringComparison.InvariantCultureIgnoreCase)) return ModuleProvisioningState.Succeeded; - if (string.Equals(value, "Failed", StringComparison.InvariantCultureIgnoreCase)) return ModuleProvisioningState.Failed; - if (string.Equals(value, "Cancelled", StringComparison.InvariantCultureIgnoreCase)) return ModuleProvisioningState.Cancelled; - if (string.Equals(value, "Updating", StringComparison.InvariantCultureIgnoreCase)) return ModuleProvisioningState.Updating; - throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ModuleProvisioningState value."); - } - } -} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/ModuleProvisioningState.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/ModuleProvisioningState.cs index 630023c2ebd53..72dc334a5108c 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/ModuleProvisioningState.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/ModuleProvisioningState.cs @@ -5,42 +5,89 @@ #nullable disable +using System; +using System.ComponentModel; + namespace Azure.ResourceManager.Automation.Models { /// Gets or sets the provisioning state of the module. - public enum ModuleProvisioningState + public readonly partial struct ModuleProvisioningState : IEquatable { + private readonly string _value; + + /// Initializes a new instance of . + /// is null. + public ModuleProvisioningState(string value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + private const string CreatedValue = "Created"; + private const string CreatingValue = "Creating"; + private const string StartingImportModuleRunbookValue = "StartingImportModuleRunbook"; + private const string RunningImportModuleRunbookValue = "RunningImportModuleRunbook"; + private const string ContentRetrievedValue = "ContentRetrieved"; + private const string ContentDownloadedValue = "ContentDownloaded"; + private const string ContentValidatedValue = "ContentValidated"; + private const string ConnectionTypeImportedValue = "ConnectionTypeImported"; + private const string ContentStoredValue = "ContentStored"; + private const string ModuleDataStoredValue = "ModuleDataStored"; + private const string ActivitiesStoredValue = "ActivitiesStored"; + private const string ModuleImportRunbookCompleteValue = "ModuleImportRunbookComplete"; + private const string SucceededValue = "Succeeded"; + private const string FailedValue = "Failed"; + private const string CancelledValue = "Cancelled"; + private const string UpdatingValue = "Updating"; + /// Created. - Created, + public static ModuleProvisioningState Created { get; } = new ModuleProvisioningState(CreatedValue); /// Creating. - Creating, + public static ModuleProvisioningState Creating { get; } = new ModuleProvisioningState(CreatingValue); /// StartingImportModuleRunbook. - StartingImportModuleRunbook, + public static ModuleProvisioningState StartingImportModuleRunbook { get; } = new ModuleProvisioningState(StartingImportModuleRunbookValue); /// RunningImportModuleRunbook. - RunningImportModuleRunbook, + public static ModuleProvisioningState RunningImportModuleRunbook { get; } = new ModuleProvisioningState(RunningImportModuleRunbookValue); /// ContentRetrieved. - ContentRetrieved, + public static ModuleProvisioningState ContentRetrieved { get; } = new ModuleProvisioningState(ContentRetrievedValue); /// ContentDownloaded. - ContentDownloaded, + public static ModuleProvisioningState ContentDownloaded { get; } = new ModuleProvisioningState(ContentDownloadedValue); /// ContentValidated. - ContentValidated, + public static ModuleProvisioningState ContentValidated { get; } = new ModuleProvisioningState(ContentValidatedValue); /// ConnectionTypeImported. - ConnectionTypeImported, + public static ModuleProvisioningState ConnectionTypeImported { get; } = new ModuleProvisioningState(ConnectionTypeImportedValue); /// ContentStored. - ContentStored, + public static ModuleProvisioningState ContentStored { get; } = new ModuleProvisioningState(ContentStoredValue); /// ModuleDataStored. - ModuleDataStored, + public static ModuleProvisioningState ModuleDataStored { get; } = new ModuleProvisioningState(ModuleDataStoredValue); /// ActivitiesStored. - ActivitiesStored, + public static ModuleProvisioningState ActivitiesStored { get; } = new ModuleProvisioningState(ActivitiesStoredValue); /// ModuleImportRunbookComplete. - ModuleImportRunbookComplete, + public static ModuleProvisioningState ModuleImportRunbookComplete { get; } = new ModuleProvisioningState(ModuleImportRunbookCompleteValue); /// Succeeded. - Succeeded, + public static ModuleProvisioningState Succeeded { get; } = new ModuleProvisioningState(SucceededValue); /// Failed. - Failed, + public static ModuleProvisioningState Failed { get; } = new ModuleProvisioningState(FailedValue); /// Cancelled. - Cancelled, + public static ModuleProvisioningState Cancelled { get; } = new ModuleProvisioningState(CancelledValue); /// Updating. - Updating + public static ModuleProvisioningState Updating { get; } = new ModuleProvisioningState(UpdatingValue); + /// Determines if two values are the same. + public static bool operator ==(ModuleProvisioningState left, ModuleProvisioningState right) => left.Equals(right); + /// Determines if two values are not the same. + public static bool operator !=(ModuleProvisioningState left, ModuleProvisioningState right) => !left.Equals(right); + /// Converts a string to a . + public static implicit operator ModuleProvisioningState(string value) => new ModuleProvisioningState(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is ModuleProvisioningState other && Equals(other); + /// + public bool Equals(ModuleProvisioningState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override int GetHashCode() => _value?.GetHashCode() ?? 0; + /// + public override string ToString() => _value; } } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationAccountPython2PackageCreateOrUpdateContent.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PythonPackageCreateParameters.Serialization.cs similarity index 91% rename from sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationAccountPython2PackageCreateOrUpdateContent.Serialization.cs rename to sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PythonPackageCreateParameters.Serialization.cs index 5959994d939f1..59c7439fdb3e3 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationAccountPython2PackageCreateOrUpdateContent.Serialization.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PythonPackageCreateParameters.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Automation.Models { - public partial class AutomationAccountPython2PackageCreateOrUpdateContent : IUtf8JsonSerializable + public partial class PythonPackageCreateParameters : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationAccountPython2PackageCreateOrUpdateContent.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PythonPackageCreateParameters.cs similarity index 77% rename from sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationAccountPython2PackageCreateOrUpdateContent.cs rename to sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PythonPackageCreateParameters.cs index 9aeb487320b87..dda53cbafdfa5 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationAccountPython2PackageCreateOrUpdateContent.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PythonPackageCreateParameters.cs @@ -12,12 +12,12 @@ namespace Azure.ResourceManager.Automation.Models { /// The parameters supplied to the create or update module operation. - public partial class AutomationAccountPython2PackageCreateOrUpdateContent + public partial class PythonPackageCreateParameters { - /// Initializes a new instance of AutomationAccountPython2PackageCreateOrUpdateContent. + /// Initializes a new instance of PythonPackageCreateParameters. /// Gets or sets the module content link. /// is null. - public AutomationAccountPython2PackageCreateOrUpdateContent(ContentLink contentLink) + public PythonPackageCreateParameters(ContentLink contentLink) { Argument.AssertNotNull(contentLink, nameof(contentLink)); diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationAccountPython2PackagePatch.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PythonPackageUpdateParameters.Serialization.cs similarity index 90% rename from sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationAccountPython2PackagePatch.Serialization.cs rename to sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PythonPackageUpdateParameters.Serialization.cs index c69043e0a8a0b..6e5f4b7f2a88f 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationAccountPython2PackagePatch.Serialization.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PythonPackageUpdateParameters.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.ResourceManager.Automation.Models { - public partial class AutomationAccountPython2PackagePatch : IUtf8JsonSerializable + public partial class PythonPackageUpdateParameters : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationAccountPython2PackagePatch.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PythonPackageUpdateParameters.cs similarity index 72% rename from sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationAccountPython2PackagePatch.cs rename to sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PythonPackageUpdateParameters.cs index 8e7e70b8feb30..580027aae8636 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/AutomationAccountPython2PackagePatch.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/PythonPackageUpdateParameters.cs @@ -11,10 +11,10 @@ namespace Azure.ResourceManager.Automation.Models { /// The parameters supplied to the update module operation. - public partial class AutomationAccountPython2PackagePatch + public partial class PythonPackageUpdateParameters { - /// Initializes a new instance of AutomationAccountPython2PackagePatch. - public AutomationAccountPython2PackagePatch() + /// Initializes a new instance of PythonPackageUpdateParameters. + public PythonPackageUpdateParameters() { Tags = new ChangeTrackingDictionary(); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/RunbookDraftUndoEditResult.Serialization.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/RunbookDraftUndoEditResult.Serialization.cs deleted file mode 100644 index 505bb0569e472..0000000000000 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/RunbookDraftUndoEditResult.Serialization.cs +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System.Text.Json; -using Azure.Core; - -namespace Azure.ResourceManager.Automation.Models -{ - public partial class RunbookDraftUndoEditResult - { - internal static RunbookDraftUndoEditResult DeserializeRunbookDraftUndoEditResult(JsonElement element) - { - Optional statusCode = default; - Optional requestId = default; - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("statusCode")) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - property.ThrowNonNullablePropertyIsNull(); - continue; - } - statusCode = new HttpStatusCode(property.Value.GetString()); - continue; - } - if (property.NameEquals("requestId")) - { - requestId = property.Value.GetString(); - continue; - } - } - return new RunbookDraftUndoEditResult(Optional.ToNullable(statusCode), requestId.Value); - } - } -} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/RunbookDraftUndoEditResult.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/RunbookDraftUndoEditResult.cs deleted file mode 100644 index b81ca87b5800d..0000000000000 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/Models/RunbookDraftUndoEditResult.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -namespace Azure.ResourceManager.Automation.Models -{ - /// The response model for the undo edit runbook operation. - public partial class RunbookDraftUndoEditResult - { - /// Initializes a new instance of RunbookDraftUndoEditResult. - internal RunbookDraftUndoEditResult() - { - } - - /// Initializes a new instance of RunbookDraftUndoEditResult. - /// - /// - internal RunbookDraftUndoEditResult(HttpStatusCode? statusCode, string requestId) - { - StatusCode = statusCode; - RequestId = requestId; - } - - /// Gets the status code. - public HttpStatusCode? StatusCode { get; } - /// Gets the request id. - public string RequestId { get; } - } -} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ActivityRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ActivityRestOperations.cs index 52e8e998f2d37..1853d9f665465 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ActivityRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ActivityRestOperations.cs @@ -33,7 +33,7 @@ public ActivityRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-13-preview"; + _apiVersion = apiVersion ?? "2022-08-08"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/AutomationAccountRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/AutomationAccountRestOperations.cs index fb8924576173d..7001db87d1da6 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/AutomationAccountRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/AutomationAccountRestOperations.cs @@ -33,7 +33,7 @@ public AutomationAccountRestOperations(HttpPipeline pipeline, string application { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-06-22"; + _apiVersion = apiVersion ?? "2022-08-08"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/AutomationRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/AutomationRestOperations.cs index 8bba8a024da1b..8b8bb7c4deeb5 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/AutomationRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/AutomationRestOperations.cs @@ -33,7 +33,7 @@ public AutomationRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-06-22"; + _apiVersion = apiVersion ?? "2022-08-08"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/CertificateRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/CertificateRestOperations.cs index 3d8f8d0baebea..0e7728e6f3952 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/CertificateRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/CertificateRestOperations.cs @@ -33,7 +33,7 @@ public CertificateRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-13-preview"; + _apiVersion = apiVersion ?? "2022-08-08"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ConnectionRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ConnectionRestOperations.cs index 4db99ae4bf95b..0d85d040a44ba 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ConnectionRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ConnectionRestOperations.cs @@ -33,7 +33,7 @@ public ConnectionRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-13-preview"; + _apiVersion = apiVersion ?? "2022-08-08"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ConnectionTypeRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ConnectionTypeRestOperations.cs index 7c3333f5560f7..2ec71e4f12663 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ConnectionTypeRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ConnectionTypeRestOperations.cs @@ -33,7 +33,7 @@ public ConnectionTypeRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-13-preview"; + _apiVersion = apiVersion ?? "2022-08-08"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/CredentialRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/CredentialRestOperations.cs index 3394b0285738e..1b49d28b07052 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/CredentialRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/CredentialRestOperations.cs @@ -33,7 +33,7 @@ public CredentialRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-13-preview"; + _apiVersion = apiVersion ?? "2022-08-08"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/DscConfigurationRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/DscConfigurationRestOperations.cs index 2fb3243517f36..fd2290995107d 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/DscConfigurationRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/DscConfigurationRestOperations.cs @@ -34,7 +34,7 @@ public DscConfigurationRestOperations(HttpPipeline pipeline, string applicationI { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2019-06-01"; + _apiVersion = apiVersion ?? "2022-08-08"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/DscNodeConfigurationRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/DscNodeConfigurationRestOperations.cs index c3894607ede3a..0e95291a76e4e 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/DscNodeConfigurationRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/DscNodeConfigurationRestOperations.cs @@ -33,7 +33,7 @@ public DscNodeConfigurationRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-13-preview"; + _apiVersion = apiVersion ?? "2022-08-08"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/FieldsRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/FieldsRestOperations.cs index 104bea848b111..54349ce1a0f6b 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/FieldsRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/FieldsRestOperations.cs @@ -33,7 +33,7 @@ public FieldsRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-13-preview"; + _apiVersion = apiVersion ?? "2022-08-08"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/HybridRunbookWorkerGroupRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/HybridRunbookWorkerGroupRestOperations.cs index 367d8d361a6ce..a10220b343e8b 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/HybridRunbookWorkerGroupRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/HybridRunbookWorkerGroupRestOperations.cs @@ -33,7 +33,7 @@ public HybridRunbookWorkerGroupRestOperations(HttpPipeline pipeline, string appl { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2022-02-22"; + _apiVersion = apiVersion ?? "2022-08-08"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -247,6 +247,7 @@ public async Task> CreateAsync(string sub switch (message.Response.Status) { case 200: + case 201: { HybridRunbookWorkerGroupData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); @@ -280,6 +281,7 @@ public Response Create(string subscriptionId, stri switch (message.Response.Status) { case 200: + case 201: { HybridRunbookWorkerGroupData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/HybridRunbookWorkersRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/HybridRunbookWorkersRestOperations.cs index eea189dc3f5a3..837e8a68dc0ab 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/HybridRunbookWorkersRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/HybridRunbookWorkersRestOperations.cs @@ -33,7 +33,7 @@ public HybridRunbookWorkersRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-06-22"; + _apiVersion = apiVersion ?? "2022-08-08"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -265,6 +265,7 @@ public async Task> CreateAsync(string subscrip switch (message.Response.Status) { case 200: + case 201: { HybridRunbookWorkerData value = default; using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); @@ -300,6 +301,7 @@ public Response Create(string subscriptionId, string re switch (message.Response.Status) { case 200: + case 201: { HybridRunbookWorkerData value = default; using var document = JsonDocument.Parse(message.Response.ContentStream); diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/JobRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/JobRestOperations.cs index d77a99902b2ad..772c3d9c53a4a 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/JobRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/JobRestOperations.cs @@ -34,7 +34,7 @@ public JobRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoi { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2019-06-01"; + _apiVersion = apiVersion ?? "2022-08-08"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/JobScheduleRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/JobScheduleRestOperations.cs index 938fc26adbd11..442dd32e801fc 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/JobScheduleRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/JobScheduleRestOperations.cs @@ -33,7 +33,7 @@ public JobScheduleRestOperations(HttpPipeline pipeline, string applicationId, Ur { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-13-preview"; + _apiVersion = apiVersion ?? "2022-08-08"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/JobStreamRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/JobStreamRestOperations.cs index 660ac2f407d14..f7974ab49b7f6 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/JobStreamRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/JobStreamRestOperations.cs @@ -33,7 +33,7 @@ public JobStreamRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2019-06-01"; + _apiVersion = apiVersion ?? "2022-08-08"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/KeysRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/KeysRestOperations.cs index 6784840c5b88d..63d233a1b9732 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/KeysRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/KeysRestOperations.cs @@ -33,7 +33,7 @@ public KeysRestOperations(HttpPipeline pipeline, string applicationId, Uri endpo { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-06-22"; + _apiVersion = apiVersion ?? "2022-08-08"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/LinkedWorkspaceRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/LinkedWorkspaceRestOperations.cs index 6ba74f69691ad..73645be547993 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/LinkedWorkspaceRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/LinkedWorkspaceRestOperations.cs @@ -33,7 +33,7 @@ public LinkedWorkspaceRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-13-preview"; + _apiVersion = apiVersion ?? "2022-08-08"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ModuleRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ModuleRestOperations.cs index 493365b7cc4af..a07bdee813320 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ModuleRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ModuleRestOperations.cs @@ -33,7 +33,7 @@ public ModuleRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-13-preview"; + _apiVersion = apiVersion ?? "2022-08-08"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ObjectDataTypesRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ObjectDataTypesRestOperations.cs index 0f10585d160bd..bf4b5626cdc02 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ObjectDataTypesRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ObjectDataTypesRestOperations.cs @@ -33,7 +33,7 @@ public ObjectDataTypesRestOperations(HttpPipeline pipeline, string applicationId { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-13-preview"; + _apiVersion = apiVersion ?? "2022-08-08"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/Python2PackageRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/Python2PackageRestOperations.cs index 6c2bf80676885..00b42f6558edb 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/Python2PackageRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/Python2PackageRestOperations.cs @@ -33,7 +33,7 @@ public Python2PackageRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-13-preview"; + _apiVersion = apiVersion ?? "2022-08-08"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -199,7 +199,7 @@ public Response Get(string subscriptionId, string resourceGroupName, } } - internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, AutomationAccountPython2PackageCreateOrUpdateContent content) + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, PythonPackageCreateParameters pythonPackageCreateParameters) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -218,9 +218,9 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r request.Uri = uri; request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); - var content0 = new Utf8JsonRequestContent(); - content0.JsonWriter.WriteObjectValue(content); - request.Content = content0; + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(pythonPackageCreateParameters); + request.Content = content; _userAgent.Apply(message); return message; } @@ -230,19 +230,19 @@ internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string r /// Name of an Azure Resource group. /// The name of the automation account. /// The name of python package. - /// The create or update parameters for python package. + /// The create or update parameters for python package. /// The cancellation token to use. - /// , , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, AutomationAccountPython2PackageCreateOrUpdateContent content, CancellationToken cancellationToken = default) + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, PythonPackageCreateParameters pythonPackageCreateParameters, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(pythonPackageCreateParameters, nameof(pythonPackageCreateParameters)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, automationAccountName, packageName, content); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, automationAccountName, packageName, pythonPackageCreateParameters); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -264,19 +264,19 @@ public async Task> CreateOrUpdateAsync(string subscriptionI /// Name of an Azure Resource group. /// The name of the automation account. /// The name of python package. - /// The create or update parameters for python package. + /// The create or update parameters for python package. /// The cancellation token to use. - /// , , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, AutomationAccountPython2PackageCreateOrUpdateContent content, CancellationToken cancellationToken = default) + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, PythonPackageCreateParameters pythonPackageCreateParameters, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); - Argument.AssertNotNull(content, nameof(content)); + Argument.AssertNotNull(pythonPackageCreateParameters, nameof(pythonPackageCreateParameters)); - using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, automationAccountName, packageName, content); + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, automationAccountName, packageName, pythonPackageCreateParameters); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { @@ -293,7 +293,7 @@ public Response CreateOrUpdate(string subscriptionId, string resourc } } - internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, AutomationAccountPython2PackagePatch patch) + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, PythonPackageUpdateParameters pythonPackageUpdateParameters) { var message = _pipeline.CreateMessage(); var request = message.Request; @@ -313,7 +313,7 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG request.Headers.Add("Accept", "application/json"); request.Headers.Add("Content-Type", "application/json"); var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(patch); + content.JsonWriter.WriteObjectValue(pythonPackageUpdateParameters); request.Content = content; _userAgent.Apply(message); return message; @@ -324,19 +324,19 @@ internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceG /// Name of an Azure Resource group. /// The name of the automation account. /// The name of python package. - /// The update parameters for python package. + /// The update parameters for python package. /// The cancellation token to use. - /// , , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, AutomationAccountPython2PackagePatch patch, CancellationToken cancellationToken = default) + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, PythonPackageUpdateParameters pythonPackageUpdateParameters, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); - Argument.AssertNotNull(patch, nameof(patch)); + Argument.AssertNotNull(pythonPackageUpdateParameters, nameof(pythonPackageUpdateParameters)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, automationAccountName, packageName, patch); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, automationAccountName, packageName, pythonPackageUpdateParameters); await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); switch (message.Response.Status) { @@ -357,19 +357,19 @@ public async Task> UpdateAsync(string subscriptionId, strin /// Name of an Azure Resource group. /// The name of the automation account. /// The name of python package. - /// The update parameters for python package. + /// The update parameters for python package. /// The cancellation token to use. - /// , , , or is null. + /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response Update(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, AutomationAccountPython2PackagePatch patch, CancellationToken cancellationToken = default) + public Response Update(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, PythonPackageUpdateParameters pythonPackageUpdateParameters, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); - Argument.AssertNotNull(patch, nameof(patch)); + Argument.AssertNotNull(pythonPackageUpdateParameters, nameof(pythonPackageUpdateParameters)); - using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, automationAccountName, packageName, patch); + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, automationAccountName, packageName, pythonPackageUpdateParameters); _pipeline.Send(message, cancellationToken); switch (message.Response.Status) { diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/Python3PackageRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/Python3PackageRestOperations.cs new file mode 100644 index 0000000000000..acb8740487bc5 --- /dev/null +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/Python3PackageRestOperations.cs @@ -0,0 +1,545 @@ +// 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.Automation.Models; + +namespace Azure.ResourceManager.Automation +{ + internal partial class Python3PackageRestOperations + { + private readonly TelemetryDetails _userAgent; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of Python3PackageRestOperations. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The application id to use for user agent. + /// server parameter. + /// Api Version. + /// or is null. + public Python3PackageRestOperations(HttpPipeline pipeline, string applicationId, Uri endpoint = null, string apiVersion = default) + { + _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); + _endpoint = endpoint ?? new Uri("https://management.azure.com"); + _apiVersion = apiVersion ?? "2022-08-08"; + _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); + } + + internal HttpMessage CreateDeleteRequest(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Delete; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Automation/automationAccounts/", false); + uri.AppendPath(automationAccountName, true); + uri.AppendPath("/python3Packages/", false); + uri.AppendPath(packageName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Delete the python 3 package by name. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The python package name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task DeleteAsync(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, automationAccountName, packageName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + /// Delete the python 3 package by name. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The python package name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Delete(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + + using var message = CreateDeleteRequest(subscriptionId, resourceGroupName, automationAccountName, packageName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 204: + return message.Response; + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateGetRequest(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Automation/automationAccounts/", false); + uri.AppendPath(automationAccountName, true); + uri.AppendPath("/python3Packages/", false); + uri.AppendPath(packageName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Retrieve the python 3 package identified by package name. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The python package name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> GetAsync(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, automationAccountName, packageName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ModuleData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ModuleData.DeserializeModuleData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ModuleData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + /// Retrieve the python 3 package identified by package name. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The python package name. + /// The cancellation token to use. + /// , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Get(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + + using var message = CreateGetRequest(subscriptionId, resourceGroupName, automationAccountName, packageName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ModuleData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ModuleData.DeserializeModuleData(document.RootElement); + return Response.FromValue(value, message.Response); + } + case 404: + return Response.FromValue((ModuleData)null, message.Response); + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateCreateOrUpdateRequest(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, PythonPackageCreateParameters pythonPackageCreateParameters) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Put; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Automation/automationAccounts/", false); + uri.AppendPath(automationAccountName, true); + uri.AppendPath("/python3Packages/", false); + uri.AppendPath(packageName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(pythonPackageCreateParameters); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Create or Update the python 3 package identified by package name. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The name of python package. + /// The create or update parameters for python package. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> CreateOrUpdateAsync(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, PythonPackageCreateParameters pythonPackageCreateParameters, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + Argument.AssertNotNull(pythonPackageCreateParameters, nameof(pythonPackageCreateParameters)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, automationAccountName, packageName, pythonPackageCreateParameters); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + case 201: + { + ModuleData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ModuleData.DeserializeModuleData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Create or Update the python 3 package identified by package name. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The name of python package. + /// The create or update parameters for python package. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response CreateOrUpdate(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, PythonPackageCreateParameters pythonPackageCreateParameters, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + Argument.AssertNotNull(pythonPackageCreateParameters, nameof(pythonPackageCreateParameters)); + + using var message = CreateCreateOrUpdateRequest(subscriptionId, resourceGroupName, automationAccountName, packageName, pythonPackageCreateParameters); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + case 201: + { + ModuleData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ModuleData.DeserializeModuleData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateUpdateRequest(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, PythonPackageUpdateParameters pythonPackageUpdateParameters) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Patch; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Automation/automationAccounts/", false); + uri.AppendPath(automationAccountName, true); + uri.AppendPath("/python3Packages/", false); + uri.AppendPath(packageName, true); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + request.Headers.Add("Content-Type", "application/json"); + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(pythonPackageUpdateParameters); + request.Content = content; + _userAgent.Apply(message); + return message; + } + + /// Update the python 3 package identified by package name. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The name of python package. + /// The update parameters for python package. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public async Task> UpdateAsync(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, PythonPackageUpdateParameters pythonPackageUpdateParameters, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + Argument.AssertNotNull(pythonPackageUpdateParameters, nameof(pythonPackageUpdateParameters)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, automationAccountName, packageName, pythonPackageUpdateParameters); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ModuleData value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ModuleData.DeserializeModuleData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Update the python 3 package identified by package name. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The name of python package. + /// The update parameters for python package. + /// The cancellation token to use. + /// , , , or is null. + /// , , or is an empty string, and was expected to be non-empty. + public Response Update(string subscriptionId, string resourceGroupName, string automationAccountName, string packageName, PythonPackageUpdateParameters pythonPackageUpdateParameters, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + Argument.AssertNotNullOrEmpty(packageName, nameof(packageName)); + Argument.AssertNotNull(pythonPackageUpdateParameters, nameof(pythonPackageUpdateParameters)); + + using var message = CreateUpdateRequest(subscriptionId, resourceGroupName, automationAccountName, packageName, pythonPackageUpdateParameters); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ModuleData value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ModuleData.DeserializeModuleData(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListByAutomationAccountRequest(string subscriptionId, string resourceGroupName, string automationAccountName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/subscriptions/", false); + uri.AppendPath(subscriptionId, true); + uri.AppendPath("/resourceGroups/", false); + uri.AppendPath(resourceGroupName, true); + uri.AppendPath("/providers/Microsoft.Automation/automationAccounts/", false); + uri.AppendPath(automationAccountName, true); + uri.AppendPath("/python3Packages", false); + uri.AppendQuery("api-version", _apiVersion, true); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Retrieve a list of python 3 packages. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByAutomationAccountAsync(string subscriptionId, string resourceGroupName, string automationAccountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + + using var message = CreateListByAutomationAccountRequest(subscriptionId, resourceGroupName, automationAccountName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ModuleListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ModuleListResult.DeserializeModuleListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Retrieve a list of python 3 packages. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The cancellation token to use. + /// , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByAutomationAccount(string subscriptionId, string resourceGroupName, string automationAccountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + + using var message = CreateListByAutomationAccountRequest(subscriptionId, resourceGroupName, automationAccountName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ModuleListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ModuleListResult.DeserializeModuleListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + internal HttpMessage CreateListByAutomationAccountNextPageRequest(string nextLink, string subscriptionId, string resourceGroupName, string automationAccountName) + { + var message = _pipeline.CreateMessage(); + var request = message.Request; + request.Method = RequestMethod.Get; + var uri = new RawRequestUriBuilder(); + uri.Reset(_endpoint); + uri.AppendRawNextLink(nextLink, false); + request.Uri = uri; + request.Headers.Add("Accept", "application/json"); + _userAgent.Apply(message); + return message; + } + + /// Retrieve a list of python 3 packages. + /// The URL to the next page of results. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public async Task> ListByAutomationAccountNextPageAsync(string nextLink, string subscriptionId, string resourceGroupName, string automationAccountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + + using var message = CreateListByAutomationAccountNextPageRequest(nextLink, subscriptionId, resourceGroupName, automationAccountName); + await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false); + switch (message.Response.Status) + { + case 200: + { + ModuleListResult value = default; + using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); + value = ModuleListResult.DeserializeModuleListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + + /// Retrieve a list of python 3 packages. + /// The URL to the next page of results. + /// Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + /// Name of an Azure Resource group. + /// The name of the automation account. + /// The cancellation token to use. + /// , , or is null. + /// , or is an empty string, and was expected to be non-empty. + public Response ListByAutomationAccountNextPage(string nextLink, string subscriptionId, string resourceGroupName, string automationAccountName, CancellationToken cancellationToken = default) + { + Argument.AssertNotNull(nextLink, nameof(nextLink)); + Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); + Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); + Argument.AssertNotNullOrEmpty(automationAccountName, nameof(automationAccountName)); + + using var message = CreateListByAutomationAccountNextPageRequest(nextLink, subscriptionId, resourceGroupName, automationAccountName); + _pipeline.Send(message, cancellationToken); + switch (message.Response.Status) + { + case 200: + { + ModuleListResult value = default; + using var document = JsonDocument.Parse(message.Response.ContentStream); + value = ModuleListResult.DeserializeModuleListResult(document.RootElement); + return Response.FromValue(value, message.Response); + } + default: + throw new RequestFailedException(message.Response); + } + } + } +} diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/RunbookDraftRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/RunbookDraftRestOperations.cs index 7c650b04179ea..145c9ebf87aaa 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/RunbookDraftRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/RunbookDraftRestOperations.cs @@ -34,7 +34,7 @@ public RunbookDraftRestOperations(HttpPipeline pipeline, string applicationId, U { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2018-06-30"; + _apiVersion = apiVersion ?? "2022-08-08"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } @@ -151,7 +151,7 @@ internal HttpMessage CreateReplaceContentRequest(string subscriptionId, string r /// Name of an Azure Resource group. /// The name of the automation account. /// The runbook name. - /// The runbook draft content. + /// The runbook draft content. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -180,7 +180,7 @@ public async Task ReplaceContentAsync(string subscriptionId, string re /// Name of an Azure Resource group. /// The name of the automation account. /// The runbook name. - /// The runbook draft content. + /// The runbook draft content. /// The cancellation token to use. /// , , , or is null. /// , , or is an empty string, and was expected to be non-empty. @@ -320,7 +320,7 @@ internal HttpMessage CreateUndoEditRequest(string subscriptionId, string resourc /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public async Task> UndoEditAsync(string subscriptionId, string resourceGroupName, string automationAccountName, string runbookName, CancellationToken cancellationToken = default) + public async Task UndoEditAsync(string subscriptionId, string resourceGroupName, string automationAccountName, string runbookName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -332,12 +332,7 @@ public async Task> UndoEditAsync(string sub switch (message.Response.Status) { case 200: - { - RunbookDraftUndoEditResult value = default; - using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false); - value = RunbookDraftUndoEditResult.DeserializeRunbookDraftUndoEditResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + return message.Response; default: throw new RequestFailedException(message.Response); } @@ -351,7 +346,7 @@ public async Task> UndoEditAsync(string sub /// The cancellation token to use. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. - public Response UndoEdit(string subscriptionId, string resourceGroupName, string automationAccountName, string runbookName, CancellationToken cancellationToken = default) + public Response UndoEdit(string subscriptionId, string resourceGroupName, string automationAccountName, string runbookName, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId)); Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName)); @@ -363,12 +358,7 @@ public Response UndoEdit(string subscriptionId, stri switch (message.Response.Status) { case 200: - { - RunbookDraftUndoEditResult value = default; - using var document = JsonDocument.Parse(message.Response.ContentStream); - value = RunbookDraftUndoEditResult.DeserializeRunbookDraftUndoEditResult(document.RootElement); - return Response.FromValue(value, message.Response); - } + return message.Response; default: throw new RequestFailedException(message.Response); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/RunbookRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/RunbookRestOperations.cs index 056e479ccfa4b..f30381402a9d4 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/RunbookRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/RunbookRestOperations.cs @@ -34,7 +34,7 @@ public RunbookRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2018-06-30"; + _apiVersion = apiVersion ?? "2022-08-08"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ScheduleRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ScheduleRestOperations.cs index 3df731e0fb48f..c92063f5fd538 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ScheduleRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/ScheduleRestOperations.cs @@ -33,7 +33,7 @@ public ScheduleRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-13-preview"; + _apiVersion = apiVersion ?? "2022-08-08"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SoftwareUpdateConfigurationMachineRunsRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SoftwareUpdateConfigurationMachineRunsRestOperations.cs index 6dc01a377407f..21956d4467861 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SoftwareUpdateConfigurationMachineRunsRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SoftwareUpdateConfigurationMachineRunsRestOperations.cs @@ -33,7 +33,7 @@ public SoftwareUpdateConfigurationMachineRunsRestOperations(HttpPipeline pipelin { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2019-06-01"; + _apiVersion = apiVersion ?? "2022-08-08"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SoftwareUpdateConfigurationRunsRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SoftwareUpdateConfigurationRunsRestOperations.cs index dcd6236076f2f..8e8becefbc8ed 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SoftwareUpdateConfigurationRunsRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SoftwareUpdateConfigurationRunsRestOperations.cs @@ -33,7 +33,7 @@ public SoftwareUpdateConfigurationRunsRestOperations(HttpPipeline pipeline, stri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2019-06-01"; + _apiVersion = apiVersion ?? "2022-08-08"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SourceControlRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SourceControlRestOperations.cs index 605839e80fd65..481d0315b9289 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SourceControlRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SourceControlRestOperations.cs @@ -33,7 +33,7 @@ public SourceControlRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-13-preview"; + _apiVersion = apiVersion ?? "2022-08-08"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SourceControlSyncJobRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SourceControlSyncJobRestOperations.cs index 238f5feadcac2..fda72456dbd17 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SourceControlSyncJobRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SourceControlSyncJobRestOperations.cs @@ -33,7 +33,7 @@ public SourceControlSyncJobRestOperations(HttpPipeline pipeline, string applicat { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-13-preview"; + _apiVersion = apiVersion ?? "2022-08-08"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SourceControlSyncJobStreamsRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SourceControlSyncJobStreamsRestOperations.cs index 77ee7bb19c065..34ccd543eba34 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SourceControlSyncJobStreamsRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/SourceControlSyncJobStreamsRestOperations.cs @@ -33,7 +33,7 @@ public SourceControlSyncJobStreamsRestOperations(HttpPipeline pipeline, string a { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-13-preview"; + _apiVersion = apiVersion ?? "2022-08-08"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/StatisticsRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/StatisticsRestOperations.cs index 36515bb4969ca..1bf44d9895ade 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/StatisticsRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/StatisticsRestOperations.cs @@ -33,7 +33,7 @@ public StatisticsRestOperations(HttpPipeline pipeline, string applicationId, Uri { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-06-22"; + _apiVersion = apiVersion ?? "2022-08-08"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/TestJobRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/TestJobRestOperations.cs index a1a1c4ba48142..81797a73da252 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/TestJobRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/TestJobRestOperations.cs @@ -33,7 +33,7 @@ public TestJobRestOperations(HttpPipeline pipeline, string applicationId, Uri en { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2018-06-30"; + _apiVersion = apiVersion ?? "2022-08-08"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/TestJobStreamsRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/TestJobStreamsRestOperations.cs index f5715c9eb2347..6a822b961e5e4 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/TestJobStreamsRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/TestJobStreamsRestOperations.cs @@ -33,7 +33,7 @@ public TestJobStreamsRestOperations(HttpPipeline pipeline, string applicationId, { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2018-06-30"; + _apiVersion = apiVersion ?? "2022-08-08"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/UsagesRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/UsagesRestOperations.cs index 1949f4fe90285..ab49df75f02a1 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/UsagesRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/UsagesRestOperations.cs @@ -33,7 +33,7 @@ public UsagesRestOperations(HttpPipeline pipeline, string applicationId, Uri end { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2021-06-22"; + _apiVersion = apiVersion ?? "2022-08-08"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/VariableRestOperations.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/VariableRestOperations.cs index 1501b2667fadf..cb83051e1d3eb 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/VariableRestOperations.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RestOperations/VariableRestOperations.cs @@ -33,7 +33,7 @@ public VariableRestOperations(HttpPipeline pipeline, string applicationId, Uri e { _pipeline = pipeline ?? throw new ArgumentNullException(nameof(pipeline)); _endpoint = endpoint ?? new Uri("https://management.azure.com"); - _apiVersion = apiVersion ?? "2020-01-13-preview"; + _apiVersion = apiVersion ?? "2022-08-08"; _userAgent = new TelemetryDetails(GetType().Assembly, applicationId); } diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RunbookResource.cs b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RunbookResource.cs index 12a9e75b86648..dd16112db548e 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RunbookResource.cs +++ b/sdk/automation/Azure.ResourceManager.Automation/src/Generated/RunbookResource.cs @@ -303,7 +303,7 @@ public virtual Response GetContentRunbookDraft(CancellationToken cancell /// Operation Id: RunbookDraft_ReplaceContent /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The runbook draft content. + /// The runbook draft content. /// The cancellation token to use. /// is null. public virtual async Task ReplaceContentRunbookDraftAsync(WaitUntil waitUntil, Stream runbookContent, CancellationToken cancellationToken = default) @@ -333,7 +333,7 @@ public virtual async Task ReplaceContentRunbookDraftAsync(WaitUnti /// Operation Id: RunbookDraft_ReplaceContent /// /// if the method should wait to return until the long-running operation has completed on the service; if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples. - /// The runbook draft content. + /// The runbook draft content. /// The cancellation token to use. /// is null. public virtual ArmOperation ReplaceContentRunbookDraft(WaitUntil waitUntil, Stream runbookContent, CancellationToken cancellationToken = default) @@ -407,7 +407,7 @@ public virtual Response GetRunbookDraft(CancellationToken cancella /// Operation Id: RunbookDraft_UndoEdit /// /// The cancellation token to use. - public virtual async Task> UndoEditRunbookDraftAsync(CancellationToken cancellationToken = default) + public virtual async Task UndoEditRunbookDraftAsync(CancellationToken cancellationToken = default) { using var scope = _runbookDraftClientDiagnostics.CreateScope("RunbookResource.UndoEditRunbookDraft"); scope.Start(); @@ -429,7 +429,7 @@ public virtual async Task> UndoEditRunbookD /// Operation Id: RunbookDraft_UndoEdit /// /// The cancellation token to use. - public virtual Response UndoEditRunbookDraft(CancellationToken cancellationToken = default) + public virtual Response UndoEditRunbookDraft(CancellationToken cancellationToken = default) { using var scope = _runbookDraftClientDiagnostics.CreateScope("RunbookResource.UndoEditRunbookDraft"); scope.Start(); diff --git a/sdk/automation/Azure.ResourceManager.Automation/src/autorest.md b/sdk/automation/Azure.ResourceManager.Automation/src/autorest.md index 974ecaea37348..331fc65a23693 100644 --- a/sdk/automation/Azure.ResourceManager.Automation/src/autorest.md +++ b/sdk/automation/Azure.ResourceManager.Automation/src/autorest.md @@ -8,7 +8,7 @@ azure-arm: true csharp: true library-name: Automation namespace: Azure.ResourceManager.Automation -require: https://github.com/Azure/azure-rest-api-specs/blob/d1b0569d8adbd342a1111d6a69764d099f5f717c/specification/automation/resource-manager/readme.md +require: /mnt/vss/_work/1/s/azure-rest-api-specs/specification/automation/resource-manager/readme.md output-folder: $(this-folder)/Generated clear-output-folder: true skip-csproj: true