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

Add ThumbprintString property to mgmt #36320

Merged
merged 12 commits into from
May 29, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

### Features Added

- Added `AutomationCertificateData.ThumbprintString`, `AutomationCertificateCreateOrUpdateContent.ThumbprintString` to return the hexadecimal string representation of the SHA-1 hash of the certificate.
`AutomationCertificateData.Thumbprint`, `AutomationCertificateCreateOrUpdateContent.Thumbprint` have been hidden but are still available.

### Breaking Changes

### Bugs Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,10 @@ public AutomationCertificateData() { }
public System.DateTimeOffset? ExpireOn { get { throw null; } }
public bool? IsExportable { get { throw null; } }
public System.DateTimeOffset? LastModifiedOn { get { throw null; } }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
[System.ObsoleteAttribute("This property is obsolete and will be removed in a future release. Please use `ThumbprintString` instead.", false)]
public System.BinaryData Thumbprint { get { throw null; } }
public string ThumbprintString { get { throw null; } }
}
public partial class AutomationCertificateResource : Azure.ResourceManager.ArmResource
{
Expand Down Expand Up @@ -1356,7 +1359,10 @@ public AutomationCertificateCreateOrUpdateContent(string name, string base64Valu
public string Description { get { throw null; } set { } }
public bool? IsExportable { get { throw null; } set { } }
public string Name { get { throw null; } }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
[System.ObsoleteAttribute("This property is obsolete and will be removed in a future release. Please use `ThumbprintString` instead.", false)]
public System.BinaryData Thumbprint { get { throw null; } set { } }
public string ThumbprintString { get { throw null; } set { } }
}
public partial class AutomationCertificatePatch
{
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System;
using System.ComponentModel;

namespace Azure.ResourceManager.Automation
{
public partial class AutomationCertificateData
{
/// <summary>
/// Gets the thumbprint of the certificate.
/// <para>
/// To assign an object to this property use <see cref="BinaryData.FromObjectAsJson{T}(T, System.Text.Json.JsonSerializerOptions?)"/>.
/// </para>
/// <para>
/// To assign an already formated json string to this property use <see cref="BinaryData.FromString(string)"/>.
/// </para>
/// <para>
/// Examples:
/// <list type="bullet">
/// <item>
/// <term>BinaryData.FromObjectAsJson("foo")</term>
/// <description>Creates a payload of "foo".</description>
/// </item>
/// <item>
/// <term>BinaryData.FromString("\"foo\"")</term>
/// <description>Creates a payload of "foo".</description>
/// </item>
/// <item>
/// <term>BinaryData.FromObjectAsJson(new { key = "value" })</term>
/// <description>Creates a payload of { "key": "value" }.</description>
/// </item>
/// <item>
/// <term>BinaryData.FromString("{\"key\": \"value\"}")</term>
/// <description>Creates a payload of { "key": "value" }.</description>
/// </item>
/// </list>
/// </para>
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("This property is obsolete and will be removed in a future release. Please use `ThumbprintString` instead.", false)]
public BinaryData Thumbprint => BinaryData.FromString(ThumbprintString);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System;
using System.ComponentModel;

namespace Azure.ResourceManager.Automation.Models
{
public partial class AutomationCertificateCreateOrUpdateContent
{
/// <summary>
/// Gets or sets the thumbprint of the certificate.
/// <para>
/// To assign an object to this property use <see cref="BinaryData.FromObjectAsJson{T}(T, System.Text.Json.JsonSerializerOptions?)"/>.
/// </para>
/// <para>
/// To assign an already formated json string to this property use <see cref="BinaryData.FromString(string)"/>.
/// </para>
/// <para>
/// Examples:
/// <list type="bullet">
/// <item>
/// <term>BinaryData.FromObjectAsJson("foo")</term>
/// <description>Creates a payload of "foo".</description>
/// </item>
/// <item>
/// <term>BinaryData.FromString("\"foo\"")</term>
/// <description>Creates a payload of "foo".</description>
/// </item>
/// <item>
/// <term>BinaryData.FromObjectAsJson(new { key = "value" })</term>
/// <description>Creates a payload of { "key": "value" }.</description>
/// </item>
/// <item>
/// <term>BinaryData.FromString("{\"key\": \"value\"}")</term>
/// <description>Creates a payload of { "key": "value" }.</description>
/// </item>
/// </list>
/// </para>
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("This property is obsolete and will be removed in a future release. Please use `ThumbprintString` instead.", false)]
public BinaryData Thumbprint
{
get { return BinaryData.FromString(ThumbprintString); }
set { ThumbprintString = value.ToString(); }
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ skip-csproj: true
modelerfour:
flatten-payloads: false

# mgmt-debug:
# show-serialized-names: true

rename-mapping:
AutomationAccount.properties.publicNetworkAccess: IsPublicNetworkAccessAllowed
AutomationAccount.properties.disableLocalAuth: IsLocalAuthDisabled
Expand Down Expand Up @@ -130,6 +133,8 @@ rename-mapping:
WindowsUpdateClasses: WindowsUpdateClassification
WindowsProperties.excludedKbNumbers: ExcludedKBNumbers
WindowsProperties.includedKbNumbers: IncludedKBNumbers
Certificate.properties.thumbprint: ThumbprintString
CertificateCreateOrUpdateParameters.properties.thumbprint: ThumbprintString

prepend-rp-prefix:
- Certificate
Expand Down Expand Up @@ -192,7 +197,6 @@ format-by-name-rules:
'location': 'azure-location'
'*Uri': 'Uri'
'*Uris': 'Uri'
'thumbprint': 'any'

rename-rules:
CPU: Cpu
Expand Down
3 changes: 3 additions & 0 deletions sdk/batch/Azure.ResourceManager.Batch/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

### Features Added

- Added `BatchAccountCertificateData.ThumbprintString`, `BatchAccountCertificateCreateOrUpdateContent.ThumbprintString` to return the hexadecimal string representation of the SHA-1 hash of the certificate.
`BatchAccountCertificateData.Thumbprint`, `BatchAccountCertificateCreateOrUpdateContent.Thumbprint` have been hidden but are still available.

### Breaking Changes

### Bugs Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@ public BatchAccountCertificateData() { }
public Azure.ResourceManager.Batch.Models.BatchAccountCertificateProvisioningState? ProvisioningState { get { throw null; } }
public System.DateTimeOffset? ProvisioningStateTransitOn { get { throw null; } }
public string PublicData { get { throw null; } }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
[System.ObsoleteAttribute("This property is obsolete and will be removed in a future release. Please use `ThumbprintString` instead.", false)]
public System.BinaryData Thumbprint { get { throw null; } set { } }
public string ThumbprintAlgorithm { get { throw null; } set { } }
public string ThumbprintString { get { throw null; } set { } }
}
public partial class BatchAccountCertificateResource : Azure.ResourceManager.ArmResource
{
Expand Down Expand Up @@ -425,8 +428,11 @@ public BatchAccountCertificateCreateOrUpdateContent() { }
public Azure.ETag? ETag { get { throw null; } }
public Azure.ResourceManager.Batch.Models.BatchAccountCertificateFormat? Format { get { throw null; } set { } }
public string Password { get { throw null; } set { } }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
[System.ObsoleteAttribute("This property is obsolete and will be removed in a future release. Please use `ThumbprintString` instead.", false)]
public System.BinaryData Thumbprint { get { throw null; } set { } }
public string ThumbprintAlgorithm { get { throw null; } set { } }
public string ThumbprintString { get { throw null; } set { } }
}
public enum BatchAccountCertificateFormat
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System;
using System.ComponentModel;

namespace Azure.ResourceManager.Batch
{
public partial class BatchAccountCertificateData
{
/// <summary>
/// This must match the thumbprint from the name.
/// <para>
/// To assign an object to this property use <see cref="BinaryData.FromObjectAsJson{T}(T, System.Text.Json.JsonSerializerOptions?)"/>.
/// </para>
/// <para>
/// To assign an already formated json string to this property use <see cref="BinaryData.FromString(string)"/>.
/// </para>
/// <para>
/// Examples:
/// <list type="bullet">
/// <item>
/// <term>BinaryData.FromObjectAsJson("foo")</term>
/// <description>Creates a payload of "foo".</description>
/// </item>
/// <item>
/// <term>BinaryData.FromString("\"foo\"")</term>
/// <description>Creates a payload of "foo".</description>
/// </item>
/// <item>
/// <term>BinaryData.FromObjectAsJson(new { key = "value" })</term>
/// <description>Creates a payload of { "key": "value" }.</description>
/// </item>
/// <item>
/// <term>BinaryData.FromString("{\"key\": \"value\"}")</term>
/// <description>Creates a payload of { "key": "value" }.</description>
/// </item>
/// </list>
/// </para>
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("This property is obsolete and will be removed in a future release. Please use `ThumbprintString` instead.", false)]
public BinaryData Thumbprint
{
get { return BinaryData.FromString(ThumbprintString); }
set { ThumbprintString = value.ToString(); }
}
}
}
Loading