Skip to content

Autorest Upgrade - 4.0.742 #28192

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -119,28 +119,34 @@ public partial class DomainServiceProperties :
Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IDomainSecuritySettings Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IDomainServicePropertiesInternal.DomainSecuritySetting { get => (this._domainSecuritySetting = this._domainSecuritySetting ?? new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.DomainSecuritySettings()); set { {_domainSecuritySetting = value;} } }

/// <summary>Internal Acessors for LdapSettingCertificateNotAfter</summary>
global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IDomainServicePropertiesInternal.LdapSettingCertificateNotAfter { get => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.ILdapsSettingsInternal)LdapsSetting).CertificateNotAfter; set => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.ILdapsSettingsInternal)LdapsSetting).CertificateNotAfter = value; }
global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IDomainServicePropertiesInternal.LdapSettingCertificateNotAfter { get => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.ILdapsSettingsInternal)LdapsSetting).CertificateNotAfter; set => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.ILdapsSettingsInternal)LdapsSetting).CertificateNotAfter = value ?? default(global::System.DateTime); }

/// <summary>Internal Acessors for LdapSettingCertificateThumbprint</summary>
string Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IDomainServicePropertiesInternal.LdapSettingCertificateThumbprint { get => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.ILdapsSettingsInternal)LdapsSetting).CertificateThumbprint; set => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.ILdapsSettingsInternal)LdapsSetting).CertificateThumbprint = value; }
string Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IDomainServicePropertiesInternal.LdapSettingCertificateThumbprint { get => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.ILdapsSettingsInternal)LdapsSetting).CertificateThumbprint; set => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.ILdapsSettingsInternal)LdapsSetting).CertificateThumbprint = value ?? null; }

/// <summary>Internal Acessors for LdapSettingPublicCertificate</summary>
string Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IDomainServicePropertiesInternal.LdapSettingPublicCertificate { get => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.ILdapsSettingsInternal)LdapsSetting).PublicCertificate; set => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.ILdapsSettingsInternal)LdapsSetting).PublicCertificate = value; }
string Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IDomainServicePropertiesInternal.LdapSettingPublicCertificate { get => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.ILdapsSettingsInternal)LdapsSetting).PublicCertificate; set => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.ILdapsSettingsInternal)LdapsSetting).PublicCertificate = value ?? null; }

/// <summary>Internal Acessors for LdapsSetting</summary>
Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.ILdapsSettings Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IDomainServicePropertiesInternal.LdapsSetting { get => (this._ldapsSetting = this._ldapsSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.LdapsSettings()); set { {_ldapsSetting = value;} } }

/// <summary>Internal Acessors for MigrationProgressCompletionPercentage</summary>
double? Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IDomainServicePropertiesInternal.MigrationProgressCompletionPercentage { get => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IMigrationPropertiesInternal)MigrationProperty).MigrationProgressCompletionPercentage; set => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IMigrationPropertiesInternal)MigrationProperty).MigrationProgressCompletionPercentage = value ?? default(double); }

/// <summary>Internal Acessors for MigrationProgressMessage</summary>
string Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IDomainServicePropertiesInternal.MigrationProgressMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IMigrationPropertiesInternal)MigrationProperty).MigrationProgressMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IMigrationPropertiesInternal)MigrationProperty).MigrationProgressMessage = value ?? null; }

/// <summary>Internal Acessors for MigrationProperty</summary>
Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IMigrationProperties Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IDomainServicePropertiesInternal.MigrationProperty { get => (this._migrationProperty = this._migrationProperty ?? new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.MigrationProperties()); set { {_migrationProperty = value;} } }

/// <summary>Internal Acessors for MigrationPropertyMigrationProgress</summary>
Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IMigrationProgress Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IDomainServicePropertiesInternal.MigrationPropertyMigrationProgress { get => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IMigrationPropertiesInternal)MigrationProperty).MigrationProgress; set => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IMigrationPropertiesInternal)MigrationProperty).MigrationProgress = value; }
Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IMigrationProgress Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IDomainServicePropertiesInternal.MigrationPropertyMigrationProgress { get => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IMigrationPropertiesInternal)MigrationProperty).MigrationProgress; set => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IMigrationPropertiesInternal)MigrationProperty).MigrationProgress = value ?? null /* model class */; }

/// <summary>Internal Acessors for MigrationPropertyOldSubnetId</summary>
string Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IDomainServicePropertiesInternal.MigrationPropertyOldSubnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IMigrationPropertiesInternal)MigrationProperty).OldSubnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IMigrationPropertiesInternal)MigrationProperty).OldSubnetId = value; }
string Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IDomainServicePropertiesInternal.MigrationPropertyOldSubnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IMigrationPropertiesInternal)MigrationProperty).OldSubnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IMigrationPropertiesInternal)MigrationProperty).OldSubnetId = value ?? null; }

/// <summary>Internal Acessors for MigrationPropertyOldVnetSiteId</summary>
string Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IDomainServicePropertiesInternal.MigrationPropertyOldVnetSiteId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IMigrationPropertiesInternal)MigrationProperty).OldVnetSiteId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IMigrationPropertiesInternal)MigrationProperty).OldVnetSiteId = value; }
string Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IDomainServicePropertiesInternal.MigrationPropertyOldVnetSiteId { get => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IMigrationPropertiesInternal)MigrationProperty).OldVnetSiteId; set => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IMigrationPropertiesInternal)MigrationProperty).OldVnetSiteId = value ?? null; }

/// <summary>Internal Acessors for NotificationSetting</summary>
Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.INotificationSettings Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IDomainServicePropertiesInternal.NotificationSetting { get => (this._notificationSetting = this._notificationSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.NotificationSettings()); set { {_notificationSetting = value;} } }
Expand All @@ -162,11 +168,11 @@ public partial class DomainServiceProperties :

/// <summary>Completion Percentage</summary>
[Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.PropertyOrigin.Inlined)]
public double? MigrationProgressCompletionPercentage { get => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IMigrationPropertiesInternal)MigrationProperty).MigrationProgressCompletionPercentage; set => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IMigrationPropertiesInternal)MigrationProperty).MigrationProgressCompletionPercentage = value ?? default(double); }
public double? MigrationProgressCompletionPercentage { get => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IMigrationPropertiesInternal)MigrationProperty).MigrationProgressCompletionPercentage; }

/// <summary>Progress Message</summary>
[Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.PropertyOrigin.Inlined)]
public string MigrationProgressMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IMigrationPropertiesInternal)MigrationProperty).MigrationProgressMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IMigrationPropertiesInternal)MigrationProperty).MigrationProgressMessage = value ?? null; }
public string MigrationProgressMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IMigrationPropertiesInternal)MigrationProperty).MigrationProgressMessage; }

/// <summary>Backing field for <see cref="MigrationProperty" /> property.</summary>
private Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IMigrationProperties _migrationProperty;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ public partial class MigrationProperties :
/// <summary>Internal Acessors for MigrationProgress</summary>
Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IMigrationProgress Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IMigrationPropertiesInternal.MigrationProgress { get => (this._migrationProgress = this._migrationProgress ?? new Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.MigrationProgress()); set { {_migrationProgress = value;} } }

/// <summary>Internal Acessors for MigrationProgressCompletionPercentage</summary>
double? Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IMigrationPropertiesInternal.MigrationProgressCompletionPercentage { get => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IMigrationProgressInternal)MigrationProgress).CompletionPercentage; set => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IMigrationProgressInternal)MigrationProgress).CompletionPercentage = value ?? default(double); }

/// <summary>Internal Acessors for MigrationProgressMessage</summary>
string Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IMigrationPropertiesInternal.MigrationProgressMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IMigrationProgressInternal)MigrationProgress).ProgressMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IMigrationProgressInternal)MigrationProgress).ProgressMessage = value ?? null; }

/// <summary>Internal Acessors for OldSubnetId</summary>
string Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IMigrationPropertiesInternal.OldSubnetId { get => this._oldSubnetId; set { {_oldSubnetId = value;} } }

Expand All @@ -31,11 +37,11 @@ public partial class MigrationProperties :

/// <summary>Completion Percentage</summary>
[Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.PropertyOrigin.Inlined)]
public double? MigrationProgressCompletionPercentage { get => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IMigrationProgressInternal)MigrationProgress).CompletionPercentage; set => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IMigrationProgressInternal)MigrationProgress).CompletionPercentage = value ?? default(double); }
public double? MigrationProgressCompletionPercentage { get => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IMigrationProgressInternal)MigrationProgress).CompletionPercentage; }

/// <summary>Progress Message</summary>
[Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Origin(Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.PropertyOrigin.Inlined)]
public string MigrationProgressMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IMigrationProgressInternal)MigrationProgress).ProgressMessage; set => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IMigrationProgressInternal)MigrationProgress).ProgressMessage = value ?? null; }
public string MigrationProgressMessage { get => ((Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Models.IMigrationProgressInternal)MigrationProgress).ProgressMessage; }

/// <summary>Backing field for <see cref="OldSubnetId" /> property.</summary>
private string _oldSubnetId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,23 @@ internal class PsHelpInfo
public object Role { get; }
public string NonTerminatingErrors { get; }

public static string CapitalizeFirstLetter(string text)
{
if (string.IsNullOrEmpty(text))
return text;

return char.ToUpper(text[0]) + text.Substring(1);
}

public PsHelpInfo(PSObject helpObject = null)
{
helpObject = helpObject ?? new PSObject();
CmdletName = helpObject.GetProperty<string>("Name").NullIfEmpty() ?? helpObject.GetNestedProperty<string>("details", "name");
ModuleName = helpObject.GetProperty<string>("ModuleName");
Synopsis = helpObject.GetProperty<string>("Synopsis");
Synopsis = CapitalizeFirstLetter(helpObject.GetProperty<string>("Synopsis"));
Description = helpObject.GetProperty<PSObject[]>("description").EmptyIfNull().ToDescriptionText().NullIfEmpty() ??
helpObject.GetNestedProperty<PSObject[]>("details", "description").EmptyIfNull().ToDescriptionText();
Description = CapitalizeFirstLetter(Description);
AlertText = helpObject.GetNestedProperty<PSObject[]>("alertSet", "alert").EmptyIfNull().ToDescriptionText();
Category = helpObject.GetProperty<string>("Category");
HasCommonParameters = helpObject.GetProperty<string>("CommonParameters").ToNullableBool();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,7 @@ public CommentInfo(VariantGroup variantGroup)
var helpInfo = variantGroup.HelpInfo;
Description = variantGroup.Variants.SelectMany(v => v.Attributes).OfType<DescriptionAttribute>().FirstOrDefault()?.Description.NullIfEmpty()
?? helpInfo.Description.EmptyIfNull();
Description = PsHelpInfo.CapitalizeFirstLetter(Description);
// If there is no Synopsis, PowerShell may put in the Syntax string as the Synopsis. This seems unintended, so we remove the Synopsis in this situation.
var synopsis = helpInfo.Synopsis.EmptyIfNull().Trim().StartsWith(variantGroup.CmdletName) ? String.Empty : helpInfo.Synopsis;
Synopsis = synopsis.NullIfEmpty() ?? Description;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ADDomainServices.Runtime
public class GenericBreakingChangeAttribute : Attribute
{
private string _message;
//A dexcription of what the change is about, non mandatory
//A description of what the change is about, non mandatory
public string ChangeDescription { get; set; } = null;

//Name of the module that is being deprecated
public string moduleName { get; set; } = String.IsNullOrEmpty(@"") ? @"Az.ADDomainServices" : @"";

//The version the change is effective from, non mandatory
public string DeprecateByVersion { get; }
public string DeprecateByAzVersion { get; }
Expand Down Expand Up @@ -82,7 +85,7 @@ public void PrintCustomAttributeInfo(Action<string> writeOutput)
}

writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByAzVersion, this.DeprecateByAzVersion));
writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByVersion, this.DeprecateByVersion));
writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByVersion, this.moduleName, this.DeprecateByVersion));

if (OldWay != null && NewWay != null)
{
Expand Down Expand Up @@ -191,11 +194,11 @@ public PreviewMessageAttribute(string message, string estimatedDateOfGa) : this(
this.IsEstimatedGaDateSet = true;
}
}

public void PrintCustomAttributeInfo(Action<string> writeOutput)
{
writeOutput(this._message);

if (IsEstimatedGaDateSet)
{
writeOutput(string.Format(Resources.PreviewCmdletETAMessage, this.EstimatedGaDate.ToShortDateString()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1705,7 +1705,7 @@ Use the Enable-AzureDataCollection cmdlet to turn the feature On. The cmdlet can
</data>
<data name="BreakingChangesAttributesInEffectByVersion" xml:space="preserve">
<value>
- The change is expected to take effect from version : '{0}'</value>
- The change is expected to take effect in '{0}' from version : '{1}'</value>
</data>
<data name="BreakingChangesAttributesUsageChangeMessage" xml:space="preserve">
<value>```powershell
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

<#
.Synopsis
create a maintenance configuration in the specified managed cluster.
Create a maintenance configuration in the specified managed cluster.
.Description
create a maintenance configuration in the specified managed cluster.
Create a maintenance configuration in the specified managed cluster.
.Example
$TimeSpan = New-AzAksTimeSpanObject -Start (Get-Date -Year 2023 -Month 3 -Day 1) -End (Get-Date -Year 2023 -Month 3 -Day 2)
$TimeInWeek = New-AzAksTimeInWeekObject -Day Sunday -HourSlot 1,2
Expand Down
4 changes: 2 additions & 2 deletions generated/Aks/Aks.Autorest/exports/New-AzAksSnapshot.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

<#
.Synopsis
create a snapshot.
Create a snapshot.
.Description
create a snapshot.
Create a snapshot.
.Example
$pool = Get-AzAksNodePool -ResourceGroupName mygroup -ClusterName mycluster -Name default
New-AzAksSnapshot -ResourceGroupName mygroup -ResourceName 'snapshot1' -Location eastus -SnapshotType 'NodePool' -CreationDataSourceResourceId $pool.Id
Expand Down
Loading