Skip to content

Commit

Permalink
[CognitiveServices] Revert flatten KeyVaultProperties in the Encrypti…
Browse files Browse the repository at this point in the history
…on model (#34459)

* revert flatten in cognitive services

* update changelog

* resolve comment
  • Loading branch information
Yao725 authored Feb 22, 2023
1 parent 8b5fc14 commit a35b015
Show file tree
Hide file tree
Showing 10 changed files with 271 additions and 88 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,18 @@ Global
{7F2D11EE-8853-45D8-AB2D-5518C4C87543}.Release|x64.Build.0 = Release|Any CPU
{7F2D11EE-8853-45D8-AB2D-5518C4C87543}.Release|x86.ActiveCfg = Release|Any CPU
{7F2D11EE-8853-45D8-AB2D-5518C4C87543}.Release|x86.Build.0 = Release|Any CPU
{6C76231F-3D6D-4E1D-BC60-9832AD145E3E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6C76231F-3D6D-4E1D-BC60-9832AD145E3E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6C76231F-3D6D-4E1D-BC60-9832AD145E3E}.Debug|x64.ActiveCfg = Debug|Any CPU
{6C76231F-3D6D-4E1D-BC60-9832AD145E3E}.Debug|x64.Build.0 = Debug|Any CPU
{6C76231F-3D6D-4E1D-BC60-9832AD145E3E}.Debug|x86.ActiveCfg = Debug|Any CPU
{6C76231F-3D6D-4E1D-BC60-9832AD145E3E}.Debug|x86.Build.0 = Debug|Any CPU
{6C76231F-3D6D-4E1D-BC60-9832AD145E3E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6C76231F-3D6D-4E1D-BC60-9832AD145E3E}.Release|Any CPU.Build.0 = Release|Any CPU
{6C76231F-3D6D-4E1D-BC60-9832AD145E3E}.Release|x64.ActiveCfg = Release|Any CPU
{6C76231F-3D6D-4E1D-BC60-9832AD145E3E}.Release|x64.Build.0 = Release|Any CPU
{6C76231F-3D6D-4E1D-BC60-9832AD145E3E}.Release|x86.ActiveCfg = Release|Any CPU
{6C76231F-3D6D-4E1D-BC60-9832AD145E3E}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

### Bugs Fixed

- Reverted the flattening of `KeyVaultProperties` in `ServiceAccountEncryptionProperties` as service side does not support passing empty object for this property.

### Other Changes

## 1.2.1 (2023-02-20)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,14 @@ public partial class CognitiveServicesIPRule
public CognitiveServicesIPRule(string value) { }
public string Value { get { throw null; } set { } }
}
public partial class CognitiveServicesKeyVaultProperties
{
public CognitiveServicesKeyVaultProperties() { }
public System.Guid? IdentityClientId { get { throw null; } set { } }
public string KeyName { get { throw null; } set { } }
public System.Uri KeyVaultUri { get { throw null; } set { } }
public string KeyVersion { get { throw null; } set { } }
}
public partial class CognitiveServicesMultiRegionSettings
{
public CognitiveServicesMultiRegionSettings() { }
Expand Down Expand Up @@ -846,10 +854,19 @@ internal ServiceAccountCallRateLimit() { }
public partial class ServiceAccountEncryptionProperties
{
public ServiceAccountEncryptionProperties() { }
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
[System.ObsoleteAttribute("This property is obsolete and will be removed in a future release", false)]
public System.Guid? IdentityClientId { 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", false)]
public string KeyName { get { throw null; } set { } }
public Azure.ResourceManager.CognitiveServices.Models.ServiceAccountEncryptionKeySource? KeySource { get { throw null; } set { } }
public Azure.ResourceManager.CognitiveServices.Models.CognitiveServicesKeyVaultProperties KeyVaultProperties { 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", false)]
public System.Uri KeyVaultUri { 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", false)]
public string KeyVersion { get { throw null; } set { } }
}
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
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,91 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#nullable disable

using System;
using System.ComponentModel;

namespace Azure.ResourceManager.CognitiveServices.Models
{
/// <summary> Properties to configure Encryption. </summary>
public partial class ServiceAccountEncryptionProperties
{
/// <summary> Name of the Key from KeyVault. </summary>
[Obsolete("This property is obsolete and will be removed in a future release", false)]
[EditorBrowsable(EditorBrowsableState.Never)]
public string KeyName
{
get
{
if (KeyVaultProperties != null)
return KeyVaultProperties.KeyName;
else
return default;
}
set
{
if (KeyVaultProperties == null)
KeyVaultProperties = new CognitiveServicesKeyVaultProperties();
KeyVaultProperties.KeyName = value;
}
}
/// <summary> Version of the Key from KeyVault. </summary>
[Obsolete("This property is obsolete and will be removed in a future release", false)]
[EditorBrowsable(EditorBrowsableState.Never)]
public string KeyVersion
{
get
{
if (KeyVaultProperties != null)
return KeyVaultProperties.KeyVersion;
else
return default;
}
set
{
if (KeyVaultProperties == null)
KeyVaultProperties = new CognitiveServicesKeyVaultProperties();
KeyVaultProperties.KeyVersion = value;
}
}
/// <summary> Uri of KeyVault. </summary>
[Obsolete("This property is obsolete and will be removed in a future release", false)]
[EditorBrowsable(EditorBrowsableState.Never)]
public Uri KeyVaultUri
{
get
{
if (KeyVaultProperties != null)
return KeyVaultProperties.KeyVaultUri;
else
return default;
}
set
{
if (KeyVaultProperties == null)
KeyVaultProperties = new CognitiveServicesKeyVaultProperties();
KeyVaultProperties.KeyVaultUri = value;
}
}
/// <summary> Gets or sets the identity client id. </summary>
[Obsolete("This property is obsolete and will be removed in a future release", false)]
[EditorBrowsable(EditorBrowsableState.Never)]
public Guid? IdentityClientId
{
get
{
if (KeyVaultProperties != null)
return KeyVaultProperties.IdentityClientId;
else
return default;
}
set
{
if (KeyVaultProperties == null)
KeyVaultProperties = new CognitiveServicesKeyVaultProperties();
KeyVaultProperties.IdentityClientId = value;
}
}
}
}

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.

Loading

0 comments on commit a35b015

Please sign in to comment.