Skip to content

Commit

Permalink
Generating confidentialledger SDK for API spec version 2024-01-26-pre… (
Browse files Browse the repository at this point in the history
#47340)

* Generating confidentialledger SDK for API spec version 2024-01-26-preview
* API adds the ability to list users.
  • Loading branch information
taicchoumsft authored Jan 10, 2025
1 parent 21554c4 commit 8992dc6
Show file tree
Hide file tree
Showing 18 changed files with 549 additions and 184 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Release History

## 1.4.0-beta.1 (Unreleased)
## 1.4.1-beta.1 (Unreleased)

### Features Added

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,20 @@ public ConfidentialLedgerClient(System.Uri ledgerEndpoint, System.Security.Crypt
public virtual System.Threading.Tasks.Task<Azure.Response> GetTransactionStatusAsync(string transactionId, Azure.RequestContext context = null) { throw null; }
public virtual Azure.Response GetUser(string userId, Azure.RequestContext context = null) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response> GetUserAsync(string userId, Azure.RequestContext context = null) { throw null; }
public virtual Azure.Pageable<System.BinaryData> GetUsers(Azure.RequestContext context = null) { throw null; }
public virtual Azure.AsyncPageable<System.BinaryData> GetUsersAsync(Azure.RequestContext context = null) { throw null; }
public virtual Azure.Operation PostLedgerEntry(Azure.WaitUntil waitUntil, Azure.Core.RequestContent content, string collectionId = null, Azure.RequestContext context = null) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Operation> PostLedgerEntryAsync(Azure.WaitUntil waitUntil, Azure.Core.RequestContent content, string collectionId = null, Azure.RequestContext context = null) { throw null; }
}
public partial class ConfidentialLedgerClientOptions : Azure.Core.ClientOptions
{
public ConfidentialLedgerClientOptions(Azure.Security.ConfidentialLedger.ConfidentialLedgerClientOptions.ServiceVersion version = Azure.Security.ConfidentialLedger.ConfidentialLedgerClientOptions.ServiceVersion.V2022_05_13) { }
public ConfidentialLedgerClientOptions(Azure.Security.ConfidentialLedger.ConfidentialLedgerClientOptions.ServiceVersion version = Azure.Security.ConfidentialLedger.ConfidentialLedgerClientOptions.ServiceVersion.V2024_01_26_Preview) { }
public System.Uri CertificateEndpoint { get { throw null; } set { } }
public bool VerifyConnection { get { throw null; } set { } }
public enum ServiceVersion
{
V2022_05_13 = 1,
V2024_01_26_Preview = 2,
}
}
}
Expand All @@ -61,10 +64,11 @@ public ConfidentialLedgerCertificateClient(System.Uri certificateEndpoint, Azure
}
public partial class ConfidentialLedgerCertificateClientOptions : Azure.Core.ClientOptions
{
public ConfidentialLedgerCertificateClientOptions(Azure.Security.ConfidentialLedger.Certificate.ConfidentialLedgerCertificateClientOptions.ServiceVersion version = Azure.Security.ConfidentialLedger.Certificate.ConfidentialLedgerCertificateClientOptions.ServiceVersion.V2022_05_13) { }
public ConfidentialLedgerCertificateClientOptions(Azure.Security.ConfidentialLedger.Certificate.ConfidentialLedgerCertificateClientOptions.ServiceVersion version = Azure.Security.ConfidentialLedger.Certificate.ConfidentialLedgerCertificateClientOptions.ServiceVersion.V2024_01_26_Preview) { }
public enum ServiceVersion
{
V2022_05_13 = 1,
V2024_01_26_Preview = 2,
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,20 @@ public ConfidentialLedgerClient(System.Uri ledgerEndpoint, System.Security.Crypt
public virtual System.Threading.Tasks.Task<Azure.Response> GetTransactionStatusAsync(string transactionId, Azure.RequestContext context = null) { throw null; }
public virtual Azure.Response GetUser(string userId, Azure.RequestContext context = null) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response> GetUserAsync(string userId, Azure.RequestContext context = null) { throw null; }
public virtual Azure.Pageable<System.BinaryData> GetUsers(Azure.RequestContext context = null) { throw null; }
public virtual Azure.AsyncPageable<System.BinaryData> GetUsersAsync(Azure.RequestContext context = null) { throw null; }
public virtual Azure.Operation PostLedgerEntry(Azure.WaitUntil waitUntil, Azure.Core.RequestContent content, string collectionId = null, Azure.RequestContext context = null) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Operation> PostLedgerEntryAsync(Azure.WaitUntil waitUntil, Azure.Core.RequestContent content, string collectionId = null, Azure.RequestContext context = null) { throw null; }
}
public partial class ConfidentialLedgerClientOptions : Azure.Core.ClientOptions
{
public ConfidentialLedgerClientOptions(Azure.Security.ConfidentialLedger.ConfidentialLedgerClientOptions.ServiceVersion version = Azure.Security.ConfidentialLedger.ConfidentialLedgerClientOptions.ServiceVersion.V2022_05_13) { }
public ConfidentialLedgerClientOptions(Azure.Security.ConfidentialLedger.ConfidentialLedgerClientOptions.ServiceVersion version = Azure.Security.ConfidentialLedger.ConfidentialLedgerClientOptions.ServiceVersion.V2024_01_26_Preview) { }
public System.Uri CertificateEndpoint { get { throw null; } set { } }
public bool VerifyConnection { get { throw null; } set { } }
public enum ServiceVersion
{
V2022_05_13 = 1,
V2024_01_26_Preview = 2,
}
}
}
Expand All @@ -61,10 +64,11 @@ public ConfidentialLedgerCertificateClient(System.Uri certificateEndpoint, Azure
}
public partial class ConfidentialLedgerCertificateClientOptions : Azure.Core.ClientOptions
{
public ConfidentialLedgerCertificateClientOptions(Azure.Security.ConfidentialLedger.Certificate.ConfidentialLedgerCertificateClientOptions.ServiceVersion version = Azure.Security.ConfidentialLedger.Certificate.ConfidentialLedgerCertificateClientOptions.ServiceVersion.V2022_05_13) { }
public ConfidentialLedgerCertificateClientOptions(Azure.Security.ConfidentialLedger.Certificate.ConfidentialLedgerCertificateClientOptions.ServiceVersion version = Azure.Security.ConfidentialLedger.Certificate.ConfidentialLedgerCertificateClientOptions.ServiceVersion.V2024_01_26_Preview) { }
public enum ServiceVersion
{
V2022_05_13 = 1,
V2024_01_26_Preview = 2,
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "net",
"TagPrefix": "net/confidentialledger/Azure.Security.ConfidentialLedger",
"Tag": "net/confidentialledger/Azure.Security.ConfidentialLedger_d8f1bd9cd9"
"Tag": "net/confidentialledger/Azure.Security.ConfidentialLedger_a71d645d61"
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<Description>Client SDK for the Azure Confidential Ledger service</Description>
<AssemblyTitle>Azure Confidential Ledger</AssemblyTitle>
<Version>1.4.0-beta.1</Version>
<Version>1.4.1-beta.1</Version>
<!--The ApiCompatVersion is managed automatically and should not generally be modified manually.-->
<ApiCompatVersion>1.3.0</ApiCompatVersion>
<PackageTags>Azure ConfidentialLedger</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public ConfidentialLedgerCertificateClient(Uri certificateEndpoint, Confidential
options ??= new ConfidentialLedgerCertificateClientOptions();
ClientDiagnostics = new ClientDiagnostics(options);
_pipeline = HttpPipelineBuilder.Build(options, Array.Empty<HttpPipelinePolicy>(), Array.Empty<HttpPipelinePolicy>(), new ResponseClassifier());
_certificateEndpoint = certificateEndpoint;
_endpoint = certificateEndpoint;
_apiVersion = options.Version;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ namespace Azure.Security.ConfidentialLedger.Certificate
/// <summary> Client options for ConfidentialLedger library clients. </summary>
public partial class ConfidentialLedgerCertificateClientOptions : ClientOptions
{
private const ServiceVersion LatestVersion = ServiceVersion.V2022_05_13;
private const ServiceVersion LatestVersion = ServiceVersion.V2024_01_26_Preview;

/// <summary> The version of the service to use. </summary>
public enum ServiceVersion
{
/// <summary> Service version "2022-05-13". </summary>
V2022_05_13 = 1,
/// <summary> Service version "2024-01-26-Preview". </summary>
V2024_01_26_Preview = 2,
}

internal string Version { get; }
Expand All @@ -30,6 +32,7 @@ public ConfidentialLedgerCertificateClientOptions(ServiceVersion version = Lates
Version = version switch
{
ServiceVersion.V2022_05_13 => "2022-05-13",
ServiceVersion.V2024_01_26_Preview => "2024-01-26-Preview",
_ => throw new NotSupportedException()
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ internal ConfidentialLedgerClient(Uri ledgerEndpoint, TokenCredential credential
new HttpPipelinePolicy[] { new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes) },
transportOptions,
new ConfidentialLedgerResponseClassifier());
_ledgerEndpoint = ledgerEndpoint;
_endpoint = ledgerEndpoint;
_apiVersion = actualOptions.Version;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@
using System;
using Azure.Core;

[assembly: CodeGenSuppressType("ConfidentialLedgerClientOptions")]
namespace Azure.Security.ConfidentialLedger
{
/// <summary> Client options for ConfidentialLedger library clients. </summary>
public partial class ConfidentialLedgerClientOptions : ClientOptions
{
private const ServiceVersion LatestVersion = ServiceVersion.V2024_01_26_Preview;
internal string Version { get; }

/// <summary>
/// The Identity Service URL. If not provided, the default endpoint "https://identity.confidential-ledger.core.azure.com" will be used.
/// </summary>
Expand All @@ -19,5 +24,25 @@ public partial class ConfidentialLedgerClientOptions : ClientOptions
/// </summary>
/// <value></value>
public bool VerifyConnection { get; set; }

/// <summary> The version of the service to use. </summary>
public enum ServiceVersion
{
/// <summary> Service version "2022-05-13". </summary>
V2022_05_13 = 1,
/// <summary> Service version "2024-08-22-preview". </summary>
V2024_01_26_Preview = 2,
}

/// <summary> Initializes new instance of ConfidentialLedgerClientOptions. </summary>
public ConfidentialLedgerClientOptions(ServiceVersion version = LatestVersion)
{
Version = version switch
{
ServiceVersion.V2022_05_13 => "2022-05-13",
ServiceVersion.V2024_01_26_Preview => "2024-01-26-preview",
_ => throw new NotSupportedException()
};
}
}
}
}

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

Loading

0 comments on commit 8992dc6

Please sign in to comment.