Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate Resources from generation to yabo/release-2024-11-11 #26566

Merged
merged 1 commit into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Resources/Authorization.Autorest/Az.Authorization.psd1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@{
GUID = 'de90936a-b512-40d3-93cd-aa8c85077b04'
GUID = '7501974d-011d-40c9-8f5c-8aca539e2c8b'
RootModule = './Az.Authorization.psm1'
ModuleVersion = '0.1.0'
CompatiblePSEditions = 'Core', 'Desktop'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
Module Name: Az.Authorization
Module Guid: de90936a-b512-40d3-93cd-aa8c85077b04
Module Guid: 7501974d-011d-40c9-8f5c-8aca539e2c8b
Download Help Link: https://learn.microsoft.com/powershell/module/az.authorization
Help Version: 1.0.0.0
Locale: en-US
Expand Down
47 changes: 34 additions & 13 deletions src/Resources/MSGraph.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ directive:
- from: source-file-csharp
where: $
transform: if ($documentPath.endsWith("MSGraph.cs")) {$ = $.replace(/Count.ToString\(\)/g, "Count.ToString().ToLower()")}


# below directives are for mitigate breaking change upgrading autorest.powershell v3 -> v4
- where:
subject: ApplicationsApplication
set:
Expand All @@ -136,6 +137,38 @@ directive:
subject: (UsersUser)(.*)
set:
subject: User$2
- where:
subject: ^Application$
parameter-name: ApplicationId
set:
parameter-name: Id
alias: ApplicationId
- where:
subject: ^User$
parameter-name: UserId
set:
parameter-name: Id
alias: UserId
- where:
subject: ^ServicePrincipal$
parameter-name: ServicePrincipalId
set:
parameter-name: Id
alias: ServicePrincipalId
- where:
subject: ^Group$
verb: ^(?!Update$)
parameter-name: GroupId
set:
parameter-name: Id
alias: GroupId
- where:
subject: ^Group$
verb: ^Update$
parameter-name: GroupId
set:
parameter-name: ObjectId
alias: GroupId

# hide user owned application cmdlets
- where:
Expand Down Expand Up @@ -240,18 +273,6 @@ directive:
subject: organization
verb: New
hide: true
- where:
subject: ^group$
verb: ^Update$
parameter-name: GroupId
set:
parameter-name: ObjectId
- where:
subject: ^group$
verb: ^Update$
parameter-name: ObjectId
set:
alias: GroupId

- where:
subject: ^group$
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,6 @@ public partial class GetAzADApplication_Get : global::System.Management.Automati
/// </summary>
private int _responseSize = 0;

/// <summary>Backing field for <see cref="ApplicationId" /> property.</summary>
private string _applicationId;

/// <summary>key: id of application</summary>
[global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "key: id of application")]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Info(
Required = true,
ReadOnly = false,
Description = @"key: id of application",
SerializedName = @"application-id",
PossibleTypes = new [] { typeof(string) })]
[global::Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.ParameterCategory.Path)]
public string ApplicationId { get => this._applicationId; set => this._applicationId = value; }

/// <summary>Wait for .NET debugger to attach</summary>
[global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")]
[global::Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.ParameterCategory.Runtime)]
Expand Down Expand Up @@ -134,6 +120,21 @@ public partial class GetAzADApplication_Get : global::System.Management.Automati
[global::Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.ParameterCategory.Runtime)]
public Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; }

/// <summary>Backing field for <see cref="Id" /> property.</summary>
private string _id;

/// <summary>key: id of application</summary>
[global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "key: id of application")]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Info(
Required = true,
ReadOnly = false,
Description = @"key: id of application",
SerializedName = @"application-id",
PossibleTypes = new [] { typeof(string) })]
[global::System.Management.Automation.Alias("ApplicationId")]
[global::Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.ParameterCategory.Path)]
public string Id { get => this._id; set => this._id = value; }

/// <summary>Accessor for our copy of the InvocationInfo.</summary>
public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } }

Expand Down Expand Up @@ -395,12 +396,12 @@ protected override void ProcessRecord()
try
{
await ((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
await this.Client.ApplicationsApplicationGetApplication(ApplicationId, this.InvocationInformation.BoundParameters.ContainsKey("ConsistencyLevel") ? ConsistencyLevel : null, this.InvocationInformation.BoundParameters.ContainsKey("Select") ? Select : null /* fixedArrayOf */, this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null /* fixedArrayOf */, onOk, onDefault, this, Pipeline);
await this.Client.ApplicationsApplicationGetApplication(Id, this.InvocationInformation.BoundParameters.ContainsKey("ConsistencyLevel") ? ConsistencyLevel : null, this.InvocationInformation.BoundParameters.ContainsKey("Select") ? Select : null /* fixedArrayOf */, this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null /* fixedArrayOf */, onOk, onDefault, this, Pipeline);
await ((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
}
catch (Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.UndeclaredResponseException urexception)
{
WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { ApplicationId=ApplicationId,ConsistencyLevel=this.InvocationInformation.BoundParameters.ContainsKey("ConsistencyLevel") ? ConsistencyLevel : null,Select=this.InvocationInformation.BoundParameters.ContainsKey("Select") ? Select : null /* fixedArrayOf */,Expand=this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null /* fixedArrayOf */})
WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Id=Id,ConsistencyLevel=this.InvocationInformation.BoundParameters.ContainsKey("ConsistencyLevel") ? ConsistencyLevel : null,Select=this.InvocationInformation.BoundParameters.ContainsKey("Select") ? Select : null /* fixedArrayOf */,Expand=this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null /* fixedArrayOf */})
{
ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action }
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,20 +108,6 @@ public partial class GetAzADGroup_Get : global::System.Management.Automation.PSC
/// <summary>Accessor for extensibleParameters.</summary>
public global::System.Collections.Generic.IDictionary<global::System.String,global::System.Object> ExtensibleParameters { get => _extensibleParameters ; }

/// <summary>Backing field for <see cref="GroupId" /> property.</summary>
private string _groupId;

/// <summary>key: id of group</summary>
[global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "key: id of group")]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Info(
Required = true,
ReadOnly = false,
Description = @"key: id of group",
SerializedName = @"group-id",
PossibleTypes = new [] { typeof(string) })]
[global::Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.ParameterCategory.Path)]
public string GroupId { get => this._groupId; set => this._groupId = value; }

/// <summary>SendAsync Pipeline Steps to be appended to the front of the pipeline</summary>
[global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")]
[global::System.Management.Automation.ValidateNotNull]
Expand All @@ -134,6 +120,21 @@ public partial class GetAzADGroup_Get : global::System.Management.Automation.PSC
[global::Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.ParameterCategory.Runtime)]
public Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; }

/// <summary>Backing field for <see cref="Id" /> property.</summary>
private string _id;

/// <summary>key: id of group</summary>
[global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "key: id of group")]
[Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Info(
Required = true,
ReadOnly = false,
Description = @"key: id of group",
SerializedName = @"group-id",
PossibleTypes = new [] { typeof(string) })]
[global::System.Management.Automation.Alias("GroupId")]
[global::Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.ParameterCategory.Path)]
public string Id { get => this._id; set => this._id = value; }

/// <summary>Accessor for our copy of the InvocationInfo.</summary>
public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } }

Expand Down Expand Up @@ -393,12 +394,12 @@ protected override void ProcessRecord()
try
{
await ((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
await this.Client.GroupsGroupGetGroup(GroupId, this.InvocationInformation.BoundParameters.ContainsKey("ConsistencyLevel") ? ConsistencyLevel : null, this.InvocationInformation.BoundParameters.ContainsKey("Select") ? Select : null /* fixedArrayOf */, this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null /* fixedArrayOf */, onOk, onDefault, this, Pipeline);
await this.Client.GroupsGroupGetGroup(Id, this.InvocationInformation.BoundParameters.ContainsKey("ConsistencyLevel") ? ConsistencyLevel : null, this.InvocationInformation.BoundParameters.ContainsKey("Select") ? Select : null /* fixedArrayOf */, this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null /* fixedArrayOf */, onOk, onDefault, this, Pipeline);
await ((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; }
}
catch (Microsoft.Azure.PowerShell.Cmdlets.Resources.MSGraph.Runtime.UndeclaredResponseException urexception)
{
WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { GroupId=GroupId,ConsistencyLevel=this.InvocationInformation.BoundParameters.ContainsKey("ConsistencyLevel") ? ConsistencyLevel : null,Select=this.InvocationInformation.BoundParameters.ContainsKey("Select") ? Select : null /* fixedArrayOf */,Expand=this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null /* fixedArrayOf */})
WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { Id=Id,ConsistencyLevel=this.InvocationInformation.BoundParameters.ContainsKey("ConsistencyLevel") ? ConsistencyLevel : null,Select=this.InvocationInformation.BoundParameters.ContainsKey("Select") ? Select : null /* fixedArrayOf */,Expand=this.InvocationInformation.BoundParameters.ContainsKey("Expand") ? Expand : null /* fixedArrayOf */})
{
ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action }
});
Expand Down
Loading
Loading