From f161480e6646981f5900cedbdc5c6c03218e76b8 Mon Sep 17 00:00:00 2001 From: Tai Chou Date: Fri, 24 Jan 2025 17:34:28 -0500 Subject: [PATCH] Revert "Generating dotnet SDK for the API version 2024-08-22 (#47815)" This reverts commit c5c7612d6fca1368d665d6e45f39360a0ca622ef. --- .../CHANGELOG.md | 2 +- ...zure.Security.ConfidentialLedger.net8.0.cs | 26 - ...urity.ConfidentialLedger.netstandard2.0.cs | 26 - .../Azure.Security.ConfidentialLedger.csproj | 2 +- .../src/Generated/ConfidentialLedgerClient.cs | 1059 ----------------- .../Docs/ConfidentialLedgerClient.xml | 932 --------------- .../src/autorest.md | 15 +- .../Samples_ConfidentialLedgerClient.cs | 1010 ---------------- 8 files changed, 7 insertions(+), 3065 deletions(-) diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/CHANGELOG.md b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/CHANGELOG.md index abaa9b433dc18..770ccf7539833 100644 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/CHANGELOG.md +++ b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.4.2-beta.1 (Unreleased) +## 1.4.1-beta.1 (Unreleased) ### Features Added diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/api/Azure.Security.ConfidentialLedger.net8.0.cs b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/api/Azure.Security.ConfidentialLedger.net8.0.cs index 54f71c70cf739..f1278fa41532e 100644 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/api/Azure.Security.ConfidentialLedger.net8.0.cs +++ b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/api/Azure.Security.ConfidentialLedger.net8.0.cs @@ -10,20 +10,10 @@ public ConfidentialLedgerClient(System.Uri ledgerEndpoint, System.Security.Crypt public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } public virtual Azure.Response CreateLedgerEntry(Azure.Core.RequestContent content, string collectionId = null, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task CreateLedgerEntryAsync(Azure.Core.RequestContent content, string collectionId = null, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response CreateOrUpdateLedgerUser(string userId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task CreateOrUpdateLedgerUserAsync(string userId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } public virtual Azure.Response CreateOrUpdateUser(string userId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task CreateOrUpdateUserAsync(string userId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response CreateUserDefinedEndpoint(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task CreateUserDefinedEndpointAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response CreateUserDefinedRole(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task CreateUserDefinedRoleAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response DeleteLedgerUser(string userId, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task DeleteLedgerUserAsync(string userId, Azure.RequestContext context = null) { throw null; } public virtual Azure.Response DeleteUser(string userId, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task DeleteUserAsync(string userId, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response DeleteUserDefinedRole(string roleName, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task DeleteUserDefinedRoleAsync(string roleName, Azure.RequestContext context = null) { throw null; } public virtual Azure.Pageable GetCollections(Azure.RequestContext context = null) { throw null; } public virtual Azure.AsyncPageable GetCollectionsAsync(Azure.RequestContext context = null) { throw null; } public virtual Azure.Pageable GetConsortiumMembers(Azure.RequestContext context = null) { throw null; } @@ -38,32 +28,16 @@ public ConfidentialLedgerClient(System.Uri ledgerEndpoint, System.Security.Crypt public virtual Azure.AsyncPageable GetLedgerEntriesAsync(string collectionId = null, string fromTransactionId = null, string toTransactionId = null, Azure.RequestContext context = null) { throw null; } public virtual Azure.Response GetLedgerEntry(string transactionId, string collectionId = null, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task GetLedgerEntryAsync(string transactionId, string collectionId = null, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response GetLedgerUser(string userId, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task GetLedgerUserAsync(string userId, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Pageable GetLedgerUsers(Azure.RequestContext context = null) { throw null; } - public virtual Azure.AsyncPageable GetLedgerUsersAsync(Azure.RequestContext context = null) { throw null; } public virtual Azure.Response GetReceipt(string transactionId, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task GetReceiptAsync(string transactionId, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response GetRuntimeOptions(Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task GetRuntimeOptionsAsync(Azure.RequestContext context = null) { throw null; } public virtual Azure.Response GetTransactionStatus(string transactionId, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task 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 GetUserAsync(string userId, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response GetUserDefinedEndpoint(Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task GetUserDefinedEndpointAsync(Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response GetUserDefinedEndpointsModule(string module, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task GetUserDefinedEndpointsModuleAsync(string module, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response GetUserDefinedRole(string roleName, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task GetUserDefinedRoleAsync(string roleName, Azure.RequestContext context = null) { throw null; } public virtual Azure.Pageable GetUsers(Azure.RequestContext context = null) { throw null; } public virtual Azure.AsyncPageable 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 PostLedgerEntryAsync(Azure.WaitUntil waitUntil, Azure.Core.RequestContent content, string collectionId = null, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response UpdateRuntimeOptions(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task UpdateRuntimeOptionsAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response UpdateUserDefinedRole(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task UpdateUserDefinedRoleAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } } public partial class ConfidentialLedgerClientOptions : Azure.Core.ClientOptions { diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/api/Azure.Security.ConfidentialLedger.netstandard2.0.cs b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/api/Azure.Security.ConfidentialLedger.netstandard2.0.cs index 54f71c70cf739..f1278fa41532e 100644 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/api/Azure.Security.ConfidentialLedger.netstandard2.0.cs +++ b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/api/Azure.Security.ConfidentialLedger.netstandard2.0.cs @@ -10,20 +10,10 @@ public ConfidentialLedgerClient(System.Uri ledgerEndpoint, System.Security.Crypt public virtual Azure.Core.Pipeline.HttpPipeline Pipeline { get { throw null; } } public virtual Azure.Response CreateLedgerEntry(Azure.Core.RequestContent content, string collectionId = null, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task CreateLedgerEntryAsync(Azure.Core.RequestContent content, string collectionId = null, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response CreateOrUpdateLedgerUser(string userId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task CreateOrUpdateLedgerUserAsync(string userId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } public virtual Azure.Response CreateOrUpdateUser(string userId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task CreateOrUpdateUserAsync(string userId, Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response CreateUserDefinedEndpoint(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task CreateUserDefinedEndpointAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response CreateUserDefinedRole(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task CreateUserDefinedRoleAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response DeleteLedgerUser(string userId, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task DeleteLedgerUserAsync(string userId, Azure.RequestContext context = null) { throw null; } public virtual Azure.Response DeleteUser(string userId, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task DeleteUserAsync(string userId, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response DeleteUserDefinedRole(string roleName, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task DeleteUserDefinedRoleAsync(string roleName, Azure.RequestContext context = null) { throw null; } public virtual Azure.Pageable GetCollections(Azure.RequestContext context = null) { throw null; } public virtual Azure.AsyncPageable GetCollectionsAsync(Azure.RequestContext context = null) { throw null; } public virtual Azure.Pageable GetConsortiumMembers(Azure.RequestContext context = null) { throw null; } @@ -38,32 +28,16 @@ public ConfidentialLedgerClient(System.Uri ledgerEndpoint, System.Security.Crypt public virtual Azure.AsyncPageable GetLedgerEntriesAsync(string collectionId = null, string fromTransactionId = null, string toTransactionId = null, Azure.RequestContext context = null) { throw null; } public virtual Azure.Response GetLedgerEntry(string transactionId, string collectionId = null, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task GetLedgerEntryAsync(string transactionId, string collectionId = null, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response GetLedgerUser(string userId, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task GetLedgerUserAsync(string userId, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Pageable GetLedgerUsers(Azure.RequestContext context = null) { throw null; } - public virtual Azure.AsyncPageable GetLedgerUsersAsync(Azure.RequestContext context = null) { throw null; } public virtual Azure.Response GetReceipt(string transactionId, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task GetReceiptAsync(string transactionId, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response GetRuntimeOptions(Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task GetRuntimeOptionsAsync(Azure.RequestContext context = null) { throw null; } public virtual Azure.Response GetTransactionStatus(string transactionId, Azure.RequestContext context = null) { throw null; } public virtual System.Threading.Tasks.Task 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 GetUserAsync(string userId, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response GetUserDefinedEndpoint(Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task GetUserDefinedEndpointAsync(Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response GetUserDefinedEndpointsModule(string module, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task GetUserDefinedEndpointsModuleAsync(string module, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response GetUserDefinedRole(string roleName, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task GetUserDefinedRoleAsync(string roleName, Azure.RequestContext context = null) { throw null; } public virtual Azure.Pageable GetUsers(Azure.RequestContext context = null) { throw null; } public virtual Azure.AsyncPageable 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 PostLedgerEntryAsync(Azure.WaitUntil waitUntil, Azure.Core.RequestContent content, string collectionId = null, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response UpdateRuntimeOptions(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task UpdateRuntimeOptionsAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual Azure.Response UpdateUserDefinedRole(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } - public virtual System.Threading.Tasks.Task UpdateUserDefinedRoleAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } } public partial class ConfidentialLedgerClientOptions : Azure.Core.ClientOptions { diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Azure.Security.ConfidentialLedger.csproj b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Azure.Security.ConfidentialLedger.csproj index ed2c452fb3d07..ce859396c8d9a 100644 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Azure.Security.ConfidentialLedger.csproj +++ b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Azure.Security.ConfidentialLedger.csproj @@ -2,7 +2,7 @@ Client SDK for the Azure Confidential Ledger service Azure Confidential Ledger - 1.4.2-beta.1 + 1.4.1-beta.1 1.3.0 Azure ConfidentialLedger diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Generated/ConfidentialLedgerClient.cs b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Generated/ConfidentialLedgerClient.cs index dc78d19a1e620..26535501ffbc5 100644 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Generated/ConfidentialLedgerClient.cs +++ b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Generated/ConfidentialLedgerClient.cs @@ -706,810 +706,6 @@ public virtual Response CreateOrUpdateUser(string userId, RequestContent content } } - /// - /// [Protocol Method] Deletes a user with multiple roles from the Confidential Ledger. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// The user id, either an AAD object ID or certificate fingerprint. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// Service returned a non-success status code. - /// The response returned from the service. - /// - public virtual async Task DeleteLedgerUserAsync(string userId, RequestContext context = null) - { - Argument.AssertNotNull(userId, nameof(userId)); - - using var scope = ClientDiagnostics.CreateScope("ConfidentialLedgerClient.DeleteLedgerUser"); - scope.Start(); - try - { - using HttpMessage message = CreateDeleteLedgerUserRequest(userId, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Deletes a user with multiple roles from the Confidential Ledger. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// The user id, either an AAD object ID or certificate fingerprint. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// Service returned a non-success status code. - /// The response returned from the service. - /// - public virtual Response DeleteLedgerUser(string userId, RequestContext context = null) - { - Argument.AssertNotNull(userId, nameof(userId)); - - using var scope = ClientDiagnostics.CreateScope("ConfidentialLedgerClient.DeleteLedgerUser"); - scope.Start(); - try - { - using HttpMessage message = CreateDeleteLedgerUserRequest(userId, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Gets a user with multiple roles. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// The user id, either an AAD object ID or certificate fingerprint. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// Service returned a non-success status code. - /// The response returned from the service. - /// - public virtual async Task GetLedgerUserAsync(string userId, RequestContext context = null) - { - Argument.AssertNotNull(userId, nameof(userId)); - - using var scope = ClientDiagnostics.CreateScope("ConfidentialLedgerClient.GetLedgerUser"); - scope.Start(); - try - { - using HttpMessage message = CreateGetLedgerUserRequest(userId, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Gets a user with multiple roles. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// The user id, either an AAD object ID or certificate fingerprint. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// Service returned a non-success status code. - /// The response returned from the service. - /// - public virtual Response GetLedgerUser(string userId, RequestContext context = null) - { - Argument.AssertNotNull(userId, nameof(userId)); - - using var scope = ClientDiagnostics.CreateScope("ConfidentialLedgerClient.GetLedgerUser"); - scope.Start(); - try - { - using HttpMessage message = CreateGetLedgerUserRequest(userId, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Adds a user or updates a user's fields. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// The user id, either an AAD object ID or certificate fingerprint. - /// The content to send as the body of the request. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// or is null. - /// Service returned a non-success status code. - /// The response returned from the service. - /// - public virtual async Task CreateOrUpdateLedgerUserAsync(string userId, RequestContent content, RequestContext context = null) - { - Argument.AssertNotNull(userId, nameof(userId)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("ConfidentialLedgerClient.CreateOrUpdateLedgerUser"); - scope.Start(); - try - { - using HttpMessage message = CreateCreateOrUpdateLedgerUserRequest(userId, content, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Adds a user or updates a user's fields. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// The user id, either an AAD object ID or certificate fingerprint. - /// The content to send as the body of the request. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// or is null. - /// Service returned a non-success status code. - /// The response returned from the service. - /// - public virtual Response CreateOrUpdateLedgerUser(string userId, RequestContent content, RequestContext context = null) - { - Argument.AssertNotNull(userId, nameof(userId)); - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("ConfidentialLedgerClient.CreateOrUpdateLedgerUser"); - scope.Start(); - try - { - using HttpMessage message = CreateCreateOrUpdateLedgerUserRequest(userId, content, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Gets a user defined endpoint. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// Service returned a non-success status code. - /// The response returned from the service. - /// - public virtual async Task GetUserDefinedEndpointAsync(RequestContext context = null) - { - using var scope = ClientDiagnostics.CreateScope("ConfidentialLedgerClient.GetUserDefinedEndpoint"); - scope.Start(); - try - { - using HttpMessage message = CreateGetUserDefinedEndpointRequest(context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Gets a user defined endpoint. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// Service returned a non-success status code. - /// The response returned from the service. - /// - public virtual Response GetUserDefinedEndpoint(RequestContext context = null) - { - using var scope = ClientDiagnostics.CreateScope("ConfidentialLedgerClient.GetUserDefinedEndpoint"); - scope.Start(); - try - { - using HttpMessage message = CreateGetUserDefinedEndpointRequest(context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Creates a user defined endpoint. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// The content to send as the body of the request. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// Service returned a non-success status code. - /// The response returned from the service. - /// - public virtual async Task CreateUserDefinedEndpointAsync(RequestContent content, RequestContext context = null) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("ConfidentialLedgerClient.CreateUserDefinedEndpoint"); - scope.Start(); - try - { - using HttpMessage message = CreateCreateUserDefinedEndpointRequest(content, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Creates a user defined endpoint. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// The content to send as the body of the request. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// Service returned a non-success status code. - /// The response returned from the service. - /// - public virtual Response CreateUserDefinedEndpoint(RequestContent content, RequestContext context = null) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("ConfidentialLedgerClient.CreateUserDefinedEndpoint"); - scope.Start(); - try - { - using HttpMessage message = CreateCreateUserDefinedEndpointRequest(content, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Runtime options for user defined endpoints. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// Service returned a non-success status code. - /// The response returned from the service. - /// - public virtual async Task GetRuntimeOptionsAsync(RequestContext context = null) - { - using var scope = ClientDiagnostics.CreateScope("ConfidentialLedgerClient.GetRuntimeOptions"); - scope.Start(); - try - { - using HttpMessage message = CreateGetRuntimeOptionsRequest(context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Runtime options for user defined endpoints. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// Service returned a non-success status code. - /// The response returned from the service. - /// - public virtual Response GetRuntimeOptions(RequestContext context = null) - { - using var scope = ClientDiagnostics.CreateScope("ConfidentialLedgerClient.GetRuntimeOptions"); - scope.Start(); - try - { - using HttpMessage message = CreateGetRuntimeOptionsRequest(context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Runtime options for user defined endpoints. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// The content to send as the body of the request. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// Service returned a non-success status code. - /// The response returned from the service. - /// - public virtual async Task UpdateRuntimeOptionsAsync(RequestContent content, RequestContext context = null) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("ConfidentialLedgerClient.UpdateRuntimeOptions"); - scope.Start(); - try - { - using HttpMessage message = CreateUpdateRuntimeOptionsRequest(content, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Runtime options for user defined endpoints. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// The content to send as the body of the request. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// Service returned a non-success status code. - /// The response returned from the service. - /// - public virtual Response UpdateRuntimeOptions(RequestContent content, RequestContext context = null) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("ConfidentialLedgerClient.UpdateRuntimeOptions"); - scope.Start(); - try - { - using HttpMessage message = CreateUpdateRuntimeOptionsRequest(content, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Module for user defined endpoints. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// module name of the user defined endpoint. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// Service returned a non-success status code. - /// The response returned from the service. - /// - public virtual async Task GetUserDefinedEndpointsModuleAsync(string module, RequestContext context = null) - { - Argument.AssertNotNull(module, nameof(module)); - - using var scope = ClientDiagnostics.CreateScope("ConfidentialLedgerClient.GetUserDefinedEndpointsModule"); - scope.Start(); - try - { - using HttpMessage message = CreateGetUserDefinedEndpointsModuleRequest(module, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Module for user defined endpoints. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// module name of the user defined endpoint. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// Service returned a non-success status code. - /// The response returned from the service. - /// - public virtual Response GetUserDefinedEndpointsModule(string module, RequestContext context = null) - { - Argument.AssertNotNull(module, nameof(module)); - - using var scope = ClientDiagnostics.CreateScope("ConfidentialLedgerClient.GetUserDefinedEndpointsModule"); - scope.Start(); - try - { - using HttpMessage message = CreateGetUserDefinedEndpointsModuleRequest(module, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Gets role actions for user defined roles - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// user defined role name. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// Service returned a non-success status code. - /// The response returned from the service. - /// - public virtual async Task GetUserDefinedRoleAsync(string roleName, RequestContext context = null) - { - Argument.AssertNotNull(roleName, nameof(roleName)); - - using var scope = ClientDiagnostics.CreateScope("ConfidentialLedgerClient.GetUserDefinedRole"); - scope.Start(); - try - { - using HttpMessage message = CreateGetUserDefinedRoleRequest(roleName, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Gets role actions for user defined roles - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// user defined role name. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// Service returned a non-success status code. - /// The response returned from the service. - /// - public virtual Response GetUserDefinedRole(string roleName, RequestContext context = null) - { - Argument.AssertNotNull(roleName, nameof(roleName)); - - using var scope = ClientDiagnostics.CreateScope("ConfidentialLedgerClient.GetUserDefinedRole"); - scope.Start(); - try - { - using HttpMessage message = CreateGetUserDefinedRoleRequest(roleName, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Creates new roles and their actions - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// The content to send as the body of the request. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// Service returned a non-success status code. - /// The response returned from the service. - /// - public virtual async Task CreateUserDefinedRoleAsync(RequestContent content, RequestContext context = null) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("ConfidentialLedgerClient.CreateUserDefinedRole"); - scope.Start(); - try - { - using HttpMessage message = CreateCreateUserDefinedRoleRequest(content, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Creates new roles and their actions - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// The content to send as the body of the request. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// Service returned a non-success status code. - /// The response returned from the service. - /// - public virtual Response CreateUserDefinedRole(RequestContent content, RequestContext context = null) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("ConfidentialLedgerClient.CreateUserDefinedRole"); - scope.Start(); - try - { - using HttpMessage message = CreateCreateUserDefinedRoleRequest(content, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Patch replaces the allowed action on existing roles,if the desire is to remove an existing action, the role must be deleted and recreated. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// The content to send as the body of the request. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// Service returned a non-success status code. - /// The response returned from the service. - /// - public virtual async Task UpdateUserDefinedRoleAsync(RequestContent content, RequestContext context = null) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("ConfidentialLedgerClient.UpdateUserDefinedRole"); - scope.Start(); - try - { - using HttpMessage message = CreateUpdateUserDefinedRoleRequest(content, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Patch replaces the allowed action on existing roles,if the desire is to remove an existing action, the role must be deleted and recreated. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// The content to send as the body of the request. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// Service returned a non-success status code. - /// The response returned from the service. - /// - public virtual Response UpdateUserDefinedRole(RequestContent content, RequestContext context = null) - { - Argument.AssertNotNull(content, nameof(content)); - - using var scope = ClientDiagnostics.CreateScope("ConfidentialLedgerClient.UpdateUserDefinedRole"); - scope.Start(); - try - { - using HttpMessage message = CreateUpdateUserDefinedRoleRequest(content, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Deletes user defined roles - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// user defined role name. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// Service returned a non-success status code. - /// The response returned from the service. - /// - public virtual async Task DeleteUserDefinedRoleAsync(string roleName, RequestContext context = null) - { - Argument.AssertNotNull(roleName, nameof(roleName)); - - using var scope = ClientDiagnostics.CreateScope("ConfidentialLedgerClient.DeleteUserDefinedRole"); - scope.Start(); - try - { - using HttpMessage message = CreateDeleteUserDefinedRoleRequest(roleName, context); - return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - - /// - /// [Protocol Method] Deletes user defined roles - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// user defined role name. - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. - /// Service returned a non-success status code. - /// The response returned from the service. - /// - public virtual Response DeleteUserDefinedRole(string roleName, RequestContext context = null) - { - Argument.AssertNotNull(roleName, nameof(roleName)); - - using var scope = ClientDiagnostics.CreateScope("ConfidentialLedgerClient.DeleteUserDefinedRole"); - scope.Start(); - try - { - using HttpMessage message = CreateDeleteUserDefinedRoleRequest(roleName, context); - return _pipeline.ProcessMessage(message, context); - } - catch (Exception e) - { - scope.Failed(e); - throw; - } - } - /// /// [Protocol Method] Lists the consortium members. /// @@ -1684,48 +880,6 @@ public virtual Pageable GetUsers(RequestContext context = null) return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "ConfidentialLedgerClient.GetUsers", "ledgerUsers", "nextLink", context); } - /// - /// [Protocol Method] Gets details on a list of users. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// Service returned a non-success status code. - /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. - /// - public virtual AsyncPageable GetLedgerUsersAsync(RequestContext context = null) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetLedgerUsersRequest(context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetLedgerUsersNextPageRequest(nextLink, context); - return GeneratorPageableHelpers.CreateAsyncPageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "ConfidentialLedgerClient.GetLedgerUsers", "ledgerUsers", "nextLink", context); - } - - /// - /// [Protocol Method] Gets details on a list of users. - /// - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// - /// The request context, which can override default behaviors of the client pipeline on a per-call basis. - /// Service returned a non-success status code. - /// The from the service containing a list of objects. Details of the body schema for each item in the collection are in the Remarks section below. - /// - public virtual Pageable GetLedgerUsers(RequestContext context = null) - { - HttpMessage FirstPageRequest(int? pageSizeHint) => CreateGetLedgerUsersRequest(context); - HttpMessage NextPageRequest(int? pageSizeHint, string nextLink) => CreateGetLedgerUsersNextPageRequest(nextLink, context); - return GeneratorPageableHelpers.CreatePageable(FirstPageRequest, NextPageRequest, e => BinaryData.FromString(e.GetRawText()), ClientDiagnostics, _pipeline, "ConfidentialLedgerClient.GetLedgerUsers", "ledgerUsers", "nextLink", context); - } - internal HttpMessage CreateGetConstitutionRequest(RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier200); @@ -1911,20 +1065,6 @@ internal HttpMessage CreateGetUsersRequest(RequestContext context) return message; } - internal HttpMessage CreateGetLedgerUsersRequest(RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/app/ledgerUsers", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - internal HttpMessage CreateDeleteUserRequest(string userId, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier204); @@ -1972,190 +1112,6 @@ internal HttpMessage CreateCreateOrUpdateUserRequest(string userId, RequestConte return message; } - internal HttpMessage CreateDeleteLedgerUserRequest(string userId, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier204); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/app/ledgerUsers/", false); - uri.AppendPath(userId, false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - internal HttpMessage CreateGetLedgerUserRequest(string userId, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/app/ledgerUsers/", false); - uri.AppendPath(userId, false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - internal HttpMessage CreateCreateOrUpdateLedgerUserRequest(string userId, RequestContent content, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Patch; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/app/ledgerUsers/", false); - uri.AppendPath(userId, false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/merge-patch+json"); - request.Content = content; - return message; - } - - internal HttpMessage CreateGetUserDefinedEndpointRequest(RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/app/userDefinedEndpoints", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - internal HttpMessage CreateCreateUserDefinedEndpointRequest(RequestContent content, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier201); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/app/userDefinedEndpoints", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - request.Content = content; - return message; - } - - internal HttpMessage CreateGetRuntimeOptionsRequest(RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/app/userDefinedEndpoints/runTimeOptions", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - internal HttpMessage CreateUpdateRuntimeOptionsRequest(RequestContent content, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Patch; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/app/userDefinedEndpoints/runTimeOptions", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - request.Content = content; - return message; - } - - internal HttpMessage CreateGetUserDefinedEndpointsModuleRequest(string module, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/app/userDefinedEndpoints/modules", false); - uri.AppendQuery("module", module, false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - internal HttpMessage CreateGetUserDefinedRoleRequest(string roleName, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/app/roles", false); - uri.AppendQuery("roleName", roleName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - - internal HttpMessage CreateCreateUserDefinedRoleRequest(RequestContent content, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Put; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/app/roles", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - request.Content = content; - return message; - } - - internal HttpMessage CreateUpdateUserDefinedRoleRequest(RequestContent content, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Patch; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/app/roles", false); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - request.Headers.Add("Content-Type", "application/json"); - request.Content = content; - return message; - } - - internal HttpMessage CreateDeleteUserDefinedRoleRequest(string roleName, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Delete; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/app/roles", false); - uri.AppendQuery("roleName", roleName, true); - uri.AppendQuery("api-version", _apiVersion, true); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - internal HttpMessage CreateGetConsortiumMembersNextPageRequest(string nextLink, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier200); @@ -2208,24 +1164,9 @@ internal HttpMessage CreateGetUsersNextPageRequest(string nextLink, RequestConte return message; } - internal HttpMessage CreateGetLedgerUsersNextPageRequest(string nextLink, RequestContext context) - { - var message = _pipeline.CreateMessage(context, ResponseClassifier200); - var request = message.Request; - request.Method = RequestMethod.Get; - var uri = new RawRequestUriBuilder(); - uri.Reset(_endpoint); - uri.AppendRawNextLink(nextLink, false); - request.Uri = uri; - request.Headers.Add("Accept", "application/json"); - return message; - } - private static ResponseClassifier _responseClassifier200; private static ResponseClassifier ResponseClassifier200 => _responseClassifier200 ??= new StatusCodeClassifier(stackalloc ushort[] { 200 }); private static ResponseClassifier _responseClassifier204; private static ResponseClassifier ResponseClassifier204 => _responseClassifier204 ??= new StatusCodeClassifier(stackalloc ushort[] { 204 }); - private static ResponseClassifier _responseClassifier201; - private static ResponseClassifier ResponseClassifier201 => _responseClassifier201 ??= new StatusCodeClassifier(stackalloc ushort[] { 201 }); } } diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Generated/Docs/ConfidentialLedgerClient.xml b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Generated/Docs/ConfidentialLedgerClient.xml index bf07be687f337..07f5a604ee69d 100644 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Generated/Docs/ConfidentialLedgerClient.xml +++ b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/Generated/Docs/ConfidentialLedgerClient.xml @@ -603,882 +603,6 @@ Response response = client.CreateOrUpdateUser("", content); JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; Console.WriteLine(result.GetProperty("assignedRole").ToString()); Console.WriteLine(result.GetProperty("userId").ToString()); -]]> - - - -This sample shows how to call DeleteLedgerUserAsync. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -Response response = await client.DeleteLedgerUserAsync(""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DeleteLedgerUserAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -Response response = await client.DeleteLedgerUserAsync(""); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call DeleteLedgerUser. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -Response response = client.DeleteLedgerUser(""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DeleteLedgerUser with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -Response response = client.DeleteLedgerUser(""); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call GetLedgerUserAsync and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -Response response = await client.GetLedgerUserAsync(""); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("assignedRoles")[0].ToString()); -]]> -This sample shows how to call GetLedgerUserAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -Response response = await client.GetLedgerUserAsync(""); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("assignedRoles")[0].ToString()); -Console.WriteLine(result.GetProperty("userId").ToString()); -]]> - - - -This sample shows how to call GetLedgerUser and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -Response response = client.GetLedgerUser(""); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("assignedRoles")[0].ToString()); -]]> -This sample shows how to call GetLedgerUser with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -Response response = client.GetLedgerUser(""); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("assignedRoles")[0].ToString()); -Console.WriteLine(result.GetProperty("userId").ToString()); -]]> - - - -This sample shows how to call CreateOrUpdateLedgerUserAsync and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - assignedRoles = new object[] - { - "Administrator" - }, -}); -Response response = await client.CreateOrUpdateLedgerUserAsync("", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("assignedRoles")[0].ToString()); -]]> -This sample shows how to call CreateOrUpdateLedgerUserAsync with all parameters and request content and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - assignedRoles = new object[] - { - "Administrator" - }, -}); -Response response = await client.CreateOrUpdateLedgerUserAsync("", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("assignedRoles")[0].ToString()); -Console.WriteLine(result.GetProperty("userId").ToString()); -]]> - - - -This sample shows how to call CreateOrUpdateLedgerUser and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - assignedRoles = new object[] - { - "Administrator" - }, -}); -Response response = client.CreateOrUpdateLedgerUser("", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("assignedRoles")[0].ToString()); -]]> -This sample shows how to call CreateOrUpdateLedgerUser with all parameters and request content and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - assignedRoles = new object[] - { - "Administrator" - }, -}); -Response response = client.CreateOrUpdateLedgerUser("", content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("assignedRoles")[0].ToString()); -Console.WriteLine(result.GetProperty("userId").ToString()); -]]> - - - -This sample shows how to call GetUserDefinedEndpointAsync and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -Response response = await client.GetUserDefinedEndpointAsync(); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("modules").ToString()); -]]> -This sample shows how to call GetUserDefinedEndpointAsync with all request content and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -Response response = await client.GetUserDefinedEndpointAsync(); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("get").GetProperty("authn_policies")[0].ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("get").GetProperty("forwarding_required").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("get").GetProperty("interpreter_reuse").GetProperty("key").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("get").GetProperty("js_function").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("get").GetProperty("js_module").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("get").GetProperty("mode").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("get").GetProperty("openapi").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("get").GetProperty("openapi_hidden").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("get").GetProperty("redirection_strategy").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("put").GetProperty("authn_policies")[0].ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("put").GetProperty("forwarding_required").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("put").GetProperty("interpreter_reuse").GetProperty("key").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("put").GetProperty("js_function").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("put").GetProperty("js_module").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("put").GetProperty("mode").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("put").GetProperty("openapi").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("put").GetProperty("openapi_hidden").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("put").GetProperty("redirection_strategy").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("patch").GetProperty("authn_policies")[0].ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("patch").GetProperty("forwarding_required").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("patch").GetProperty("interpreter_reuse").GetProperty("key").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("patch").GetProperty("js_function").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("patch").GetProperty("js_module").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("patch").GetProperty("mode").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("patch").GetProperty("openapi").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("patch").GetProperty("openapi_hidden").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("patch").GetProperty("redirection_strategy").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("delete").GetProperty("authn_policies")[0].ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("delete").GetProperty("forwarding_required").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("delete").GetProperty("interpreter_reuse").GetProperty("key").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("delete").GetProperty("js_function").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("delete").GetProperty("js_module").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("delete").GetProperty("mode").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("delete").GetProperty("openapi").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("delete").GetProperty("openapi_hidden").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("delete").GetProperty("redirection_strategy").ToString()); -Console.WriteLine(result.GetProperty("modules").ToString()); -]]> - - - -This sample shows how to call GetUserDefinedEndpoint and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -Response response = client.GetUserDefinedEndpoint(); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").ToString()); -Console.WriteLine(result.GetProperty("modules").ToString()); -]]> -This sample shows how to call GetUserDefinedEndpoint with all request content and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -Response response = client.GetUserDefinedEndpoint(); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("get").GetProperty("authn_policies")[0].ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("get").GetProperty("forwarding_required").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("get").GetProperty("interpreter_reuse").GetProperty("key").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("get").GetProperty("js_function").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("get").GetProperty("js_module").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("get").GetProperty("mode").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("get").GetProperty("openapi").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("get").GetProperty("openapi_hidden").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("get").GetProperty("redirection_strategy").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("put").GetProperty("authn_policies")[0].ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("put").GetProperty("forwarding_required").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("put").GetProperty("interpreter_reuse").GetProperty("key").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("put").GetProperty("js_function").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("put").GetProperty("js_module").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("put").GetProperty("mode").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("put").GetProperty("openapi").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("put").GetProperty("openapi_hidden").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("put").GetProperty("redirection_strategy").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("patch").GetProperty("authn_policies")[0].ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("patch").GetProperty("forwarding_required").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("patch").GetProperty("interpreter_reuse").GetProperty("key").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("patch").GetProperty("js_function").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("patch").GetProperty("js_module").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("patch").GetProperty("mode").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("patch").GetProperty("openapi").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("patch").GetProperty("openapi_hidden").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("patch").GetProperty("redirection_strategy").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("delete").GetProperty("authn_policies")[0].ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("delete").GetProperty("forwarding_required").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("delete").GetProperty("interpreter_reuse").GetProperty("key").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("delete").GetProperty("js_function").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("delete").GetProperty("js_module").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("delete").GetProperty("mode").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("delete").GetProperty("openapi").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("delete").GetProperty("openapi_hidden").ToString()); -Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("delete").GetProperty("redirection_strategy").ToString()); -Console.WriteLine(result.GetProperty("modules").ToString()); -]]> - - - -This sample shows how to call CreateUserDefinedEndpointAsync. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - metadata = new - { - endpoints = new - { - key = new object(), - }, - }, - modules = new object(), -}); -Response response = await client.CreateUserDefinedEndpointAsync(content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call CreateUserDefinedEndpointAsync with all request content. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - metadata = new - { - endpoints = new - { - key = new - { - get = new - { - authn_policies = new object[] - { - new object() - }, - forwarding_required = "sometimes", - interpreter_reuse = new - { - key = "", - }, - js_function = "", - js_module = "", - mode = "readwrite", - openapi = new object(), - openapi_hidden = true, - redirection_strategy = "none", - }, - }, - }, - }, - modules = new object(), -}); -Response response = await client.CreateUserDefinedEndpointAsync(content); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call CreateUserDefinedEndpoint. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - metadata = new - { - endpoints = new - { - key = new object(), - }, - }, - modules = new object(), -}); -Response response = client.CreateUserDefinedEndpoint(content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call CreateUserDefinedEndpoint with all request content. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - metadata = new - { - endpoints = new - { - key = new - { - get = new - { - authn_policies = new object[] - { - new object() - }, - forwarding_required = "sometimes", - interpreter_reuse = new - { - key = "", - }, - js_function = "", - js_module = "", - mode = "readwrite", - openapi = new object(), - openapi_hidden = true, - redirection_strategy = "none", - }, - }, - }, - }, - modules = new object(), -}); -Response response = client.CreateUserDefinedEndpoint(content); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call GetRuntimeOptionsAsync and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -Response response = await client.GetRuntimeOptionsAsync(); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetRuntimeOptionsAsync with all request content and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -Response response = await client.GetRuntimeOptionsAsync(); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("log_exception_details").ToString()); -Console.WriteLine(result.GetProperty("max_cached_interpreters").ToString()); -Console.WriteLine(result.GetProperty("max_execution_time_ms").ToString()); -Console.WriteLine(result.GetProperty("max_heap_bytes").ToString()); -Console.WriteLine(result.GetProperty("max_stack_bytes").ToString()); -Console.WriteLine(result.GetProperty("return_exception_details").ToString()); -]]> - - - -This sample shows how to call GetRuntimeOptions and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -Response response = client.GetRuntimeOptions(); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call GetRuntimeOptions with all request content and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -Response response = client.GetRuntimeOptions(); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("log_exception_details").ToString()); -Console.WriteLine(result.GetProperty("max_cached_interpreters").ToString()); -Console.WriteLine(result.GetProperty("max_execution_time_ms").ToString()); -Console.WriteLine(result.GetProperty("max_heap_bytes").ToString()); -Console.WriteLine(result.GetProperty("max_stack_bytes").ToString()); -Console.WriteLine(result.GetProperty("return_exception_details").ToString()); -]]> - - - -This sample shows how to call UpdateRuntimeOptionsAsync and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new object()); -Response response = await client.UpdateRuntimeOptionsAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call UpdateRuntimeOptionsAsync with all request content and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - log_exception_details = true, - max_cached_interpreters = 1234L, - max_execution_time_ms = 1234L, - max_heap_bytes = 1234L, - max_stack_bytes = 1234L, - return_exception_details = true, -}); -Response response = await client.UpdateRuntimeOptionsAsync(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("log_exception_details").ToString()); -Console.WriteLine(result.GetProperty("max_cached_interpreters").ToString()); -Console.WriteLine(result.GetProperty("max_execution_time_ms").ToString()); -Console.WriteLine(result.GetProperty("max_heap_bytes").ToString()); -Console.WriteLine(result.GetProperty("max_stack_bytes").ToString()); -Console.WriteLine(result.GetProperty("return_exception_details").ToString()); -]]> - - - -This sample shows how to call UpdateRuntimeOptions and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new object()); -Response response = client.UpdateRuntimeOptions(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.ToString()); -]]> -This sample shows how to call UpdateRuntimeOptions with all request content and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new -{ - log_exception_details = true, - max_cached_interpreters = 1234L, - max_execution_time_ms = 1234L, - max_heap_bytes = 1234L, - max_stack_bytes = 1234L, - return_exception_details = true, -}); -Response response = client.UpdateRuntimeOptions(content); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("log_exception_details").ToString()); -Console.WriteLine(result.GetProperty("max_cached_interpreters").ToString()); -Console.WriteLine(result.GetProperty("max_execution_time_ms").ToString()); -Console.WriteLine(result.GetProperty("max_heap_bytes").ToString()); -Console.WriteLine(result.GetProperty("max_stack_bytes").ToString()); -Console.WriteLine(result.GetProperty("return_exception_details").ToString()); -]]> - - - -This sample shows how to call GetUserDefinedEndpointsModuleAsync and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -Response response = await client.GetUserDefinedEndpointsModuleAsync(""); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("module").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -]]> -This sample shows how to call GetUserDefinedEndpointsModuleAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -Response response = await client.GetUserDefinedEndpointsModuleAsync(""); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("module").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -]]> - - - -This sample shows how to call GetUserDefinedEndpointsModule and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -Response response = client.GetUserDefinedEndpointsModule(""); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("module").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -]]> -This sample shows how to call GetUserDefinedEndpointsModule with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -Response response = client.GetUserDefinedEndpointsModule(""); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result.GetProperty("module").ToString()); -Console.WriteLine(result.GetProperty("name").ToString()); -]]> - - - -This sample shows how to call GetUserDefinedRoleAsync and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -Response response = await client.GetUserDefinedRoleAsync(""); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result[0].ToString()); -]]> -This sample shows how to call GetUserDefinedRoleAsync with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -Response response = await client.GetUserDefinedRoleAsync(""); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result[0].GetProperty("roleName").ToString()); -Console.WriteLine(result[0].GetProperty("roleActions")[0].ToString()); -]]> - - - -This sample shows how to call GetUserDefinedRole and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -Response response = client.GetUserDefinedRole(""); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result[0].ToString()); -]]> -This sample shows how to call GetUserDefinedRole with all parameters and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -Response response = client.GetUserDefinedRole(""); - -JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; -Console.WriteLine(result[0].GetProperty("roleName").ToString()); -Console.WriteLine(result[0].GetProperty("roleActions")[0].ToString()); -]]> - - - -This sample shows how to call CreateUserDefinedRoleAsync. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new object[] -{ - new object() -}); -Response response = await client.CreateUserDefinedRoleAsync(content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call CreateUserDefinedRoleAsync with all request content. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new object[] -{ - new - { - roleName = "", - roleActions = new object[] - { - "" - }, - } -}); -Response response = await client.CreateUserDefinedRoleAsync(content); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call CreateUserDefinedRole. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new object[] -{ - new object() -}); -Response response = client.CreateUserDefinedRole(content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call CreateUserDefinedRole with all request content. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new object[] -{ - new - { - roleName = "", - roleActions = new object[] - { - "" - }, - } -}); -Response response = client.CreateUserDefinedRole(content); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call UpdateUserDefinedRoleAsync. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new object[] -{ - new object() -}); -Response response = await client.UpdateUserDefinedRoleAsync(content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call UpdateUserDefinedRoleAsync with all request content. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new object[] -{ - new - { - roleName = "", - roleActions = new object[] - { - "" - }, - } -}); -Response response = await client.UpdateUserDefinedRoleAsync(content); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call UpdateUserDefinedRole. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new object[] -{ - new object() -}); -Response response = client.UpdateUserDefinedRole(content); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call UpdateUserDefinedRole with all request content. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -using RequestContent content = RequestContent.Create(new object[] -{ - new - { - roleName = "", - roleActions = new object[] - { - "" - }, - } -}); -Response response = client.UpdateUserDefinedRole(content); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call DeleteUserDefinedRoleAsync. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -Response response = await client.DeleteUserDefinedRoleAsync(""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DeleteUserDefinedRoleAsync with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -Response response = await client.DeleteUserDefinedRoleAsync(""); - -Console.WriteLine(response.Status); -]]> - - - -This sample shows how to call DeleteUserDefinedRole. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -Response response = client.DeleteUserDefinedRole(""); - -Console.WriteLine(response.Status); -]]> -This sample shows how to call DeleteUserDefinedRole with all parameters. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -Response response = client.DeleteUserDefinedRole(""); - -Console.WriteLine(response.Status); ]]> @@ -1705,62 +829,6 @@ foreach (BinaryData item in client.GetUsers()) Console.WriteLine(result.GetProperty("assignedRole").ToString()); Console.WriteLine(result.GetProperty("userId").ToString()); } -]]> - - - -This sample shows how to call GetLedgerUsersAsync and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -await foreach (BinaryData item in client.GetLedgerUsersAsync()) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("assignedRoles")[0].ToString()); -} -]]> -This sample shows how to call GetLedgerUsersAsync with all request content and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -await foreach (BinaryData item in client.GetLedgerUsersAsync()) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("assignedRoles")[0].ToString()); - Console.WriteLine(result.GetProperty("userId").ToString()); -} -]]> - - - -This sample shows how to call GetLedgerUsers and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -foreach (BinaryData item in client.GetLedgerUsers()) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("assignedRoles")[0].ToString()); -} -]]> -This sample shows how to call GetLedgerUsers with all request content and parse the result. -"); -TokenCredential credential = new DefaultAzureCredential(); -ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - -foreach (BinaryData item in client.GetLedgerUsers()) -{ - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("assignedRoles")[0].ToString()); - Console.WriteLine(result.GetProperty("userId").ToString()); -} ]]> diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/autorest.md b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/autorest.md index a836619976531..b3199185f5199 100644 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/autorest.md +++ b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/src/autorest.md @@ -10,17 +10,17 @@ security: AADToken security-scopes: "https://confidential-ledger.azure.com/.default" keep-non-overloadable-protocol-signature: true input-file: -- https://github.com/Azure/azure-rest-api-specs/blob/4ae5cdc221660762336d5a899495b2b4941ea486/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-08-22-preview/common.json -- https://github.com/Azure/azure-rest-api-specs/blob/4ae5cdc221660762336d5a899495b2b4941ea486/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-08-22-preview/confidentialledger.json -- https://github.com/Azure/azure-rest-api-specs/blob/4ae5cdc221660762336d5a899495b2b4941ea486/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-08-22-preview/identityservice.json +- https://github.com/Azure/azure-rest-api-specs/blob/adb20036091c8d853084e62f89e1aecb866254d2/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/common.json +- https://github.com/Azure/azure-rest-api-specs/blob/adb20036091c8d853084e62f89e1aecb866254d2/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/confidentialledger.json +- https://github.com/Azure/azure-rest-api-specs/blob/adb20036091c8d853084e62f89e1aecb866254d2/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/identityservice.json ``` ``` yaml directive: - - from: https://github.com/Azure/azure-rest-api-specs/blob/4ae5cdc221660762336d5a899495b2b4941ea486/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-08-22-preview/confidentialledger.json + - from: https://github.com/Azure/azure-rest-api-specs/blob/adb20036091c8d853084e62f89e1aecb866254d2/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/confidentialledger.json where: '$..paths.*.*' transform: '$.operationId = "ConfidentialLedger_"+$.operationId' - - from: https://github.com/Azure/azure-rest-api-specs/blob/4ae5cdc221660762336d5a899495b2b4941ea486/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-08-22-preview/identityservice.json + - from: https://github.com/Azure/azure-rest-api-specs/blob/adb20036091c8d853084e62f89e1aecb866254d2/specification/confidentialledger/data-plane/Microsoft.ConfidentialLedger/preview/2024-01-26-preview/identityservice.json where: '$..paths.*.*' transform: '$.operationId = "ConfidentialLedgerCertificate_"+$.operationId' ``` @@ -39,11 +39,6 @@ directive: - - - - - diff --git a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/Generated/Samples/Samples_ConfidentialLedgerClient.cs b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/Generated/Samples/Samples_ConfidentialLedgerClient.cs index f8828f5ca69dd..c7370424c1404 100644 --- a/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/Generated/Samples/Samples_ConfidentialLedgerClient.cs +++ b/sdk/confidentialledger/Azure.Security.ConfidentialLedger/tests/Generated/Samples/Samples_ConfidentialLedgerClient.cs @@ -680,954 +680,6 @@ public async Task Example_CreateOrUpdateUser_AllParameters_Async() Console.WriteLine(result.GetProperty("userId").ToString()); } - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DeleteLedgerUser_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - Response response = client.DeleteLedgerUser(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DeleteLedgerUser_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - Response response = await client.DeleteLedgerUserAsync(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DeleteLedgerUser_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - Response response = client.DeleteLedgerUser(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DeleteLedgerUser_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - Response response = await client.DeleteLedgerUserAsync(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_GetLedgerUser_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - Response response = client.GetLedgerUser(""); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("assignedRoles")[0].ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_GetLedgerUser_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - Response response = await client.GetLedgerUserAsync(""); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("assignedRoles")[0].ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_GetLedgerUser_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - Response response = client.GetLedgerUser(""); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("assignedRoles")[0].ToString()); - Console.WriteLine(result.GetProperty("userId").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_GetLedgerUser_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - Response response = await client.GetLedgerUserAsync(""); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("assignedRoles")[0].ToString()); - Console.WriteLine(result.GetProperty("userId").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_CreateOrUpdateLedgerUser_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - assignedRoles = new object[] - { -"Administrator" - }, - }); - Response response = client.CreateOrUpdateLedgerUser("", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("assignedRoles")[0].ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_CreateOrUpdateLedgerUser_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - assignedRoles = new object[] - { -"Administrator" - }, - }); - Response response = await client.CreateOrUpdateLedgerUserAsync("", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("assignedRoles")[0].ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_CreateOrUpdateLedgerUser_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - assignedRoles = new object[] - { -"Administrator" - }, - }); - Response response = client.CreateOrUpdateLedgerUser("", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("assignedRoles")[0].ToString()); - Console.WriteLine(result.GetProperty("userId").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_CreateOrUpdateLedgerUser_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - assignedRoles = new object[] - { -"Administrator" - }, - }); - Response response = await client.CreateOrUpdateLedgerUserAsync("", content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("assignedRoles")[0].ToString()); - Console.WriteLine(result.GetProperty("userId").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_GetUserDefinedEndpoint_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - Response response = client.GetUserDefinedEndpoint(); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("modules").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_GetUserDefinedEndpoint_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - Response response = await client.GetUserDefinedEndpointAsync(); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").ToString()); - Console.WriteLine(result.GetProperty("modules").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_GetUserDefinedEndpoint_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - Response response = client.GetUserDefinedEndpoint(); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("get").GetProperty("authn_policies")[0].ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("get").GetProperty("forwarding_required").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("get").GetProperty("interpreter_reuse").GetProperty("key").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("get").GetProperty("js_function").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("get").GetProperty("js_module").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("get").GetProperty("mode").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("get").GetProperty("openapi").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("get").GetProperty("openapi_hidden").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("get").GetProperty("redirection_strategy").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("put").GetProperty("authn_policies")[0].ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("put").GetProperty("forwarding_required").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("put").GetProperty("interpreter_reuse").GetProperty("key").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("put").GetProperty("js_function").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("put").GetProperty("js_module").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("put").GetProperty("mode").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("put").GetProperty("openapi").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("put").GetProperty("openapi_hidden").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("put").GetProperty("redirection_strategy").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("patch").GetProperty("authn_policies")[0].ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("patch").GetProperty("forwarding_required").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("patch").GetProperty("interpreter_reuse").GetProperty("key").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("patch").GetProperty("js_function").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("patch").GetProperty("js_module").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("patch").GetProperty("mode").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("patch").GetProperty("openapi").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("patch").GetProperty("openapi_hidden").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("patch").GetProperty("redirection_strategy").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("delete").GetProperty("authn_policies")[0].ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("delete").GetProperty("forwarding_required").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("delete").GetProperty("interpreter_reuse").GetProperty("key").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("delete").GetProperty("js_function").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("delete").GetProperty("js_module").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("delete").GetProperty("mode").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("delete").GetProperty("openapi").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("delete").GetProperty("openapi_hidden").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("delete").GetProperty("redirection_strategy").ToString()); - Console.WriteLine(result.GetProperty("modules").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_GetUserDefinedEndpoint_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - Response response = await client.GetUserDefinedEndpointAsync(); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("get").GetProperty("authn_policies")[0].ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("get").GetProperty("forwarding_required").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("get").GetProperty("interpreter_reuse").GetProperty("key").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("get").GetProperty("js_function").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("get").GetProperty("js_module").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("get").GetProperty("mode").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("get").GetProperty("openapi").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("get").GetProperty("openapi_hidden").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("get").GetProperty("redirection_strategy").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("put").GetProperty("authn_policies")[0].ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("put").GetProperty("forwarding_required").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("put").GetProperty("interpreter_reuse").GetProperty("key").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("put").GetProperty("js_function").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("put").GetProperty("js_module").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("put").GetProperty("mode").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("put").GetProperty("openapi").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("put").GetProperty("openapi_hidden").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("put").GetProperty("redirection_strategy").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("patch").GetProperty("authn_policies")[0].ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("patch").GetProperty("forwarding_required").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("patch").GetProperty("interpreter_reuse").GetProperty("key").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("patch").GetProperty("js_function").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("patch").GetProperty("js_module").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("patch").GetProperty("mode").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("patch").GetProperty("openapi").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("patch").GetProperty("openapi_hidden").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("patch").GetProperty("redirection_strategy").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("delete").GetProperty("authn_policies")[0].ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("delete").GetProperty("forwarding_required").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("delete").GetProperty("interpreter_reuse").GetProperty("key").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("delete").GetProperty("js_function").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("delete").GetProperty("js_module").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("delete").GetProperty("mode").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("delete").GetProperty("openapi").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("delete").GetProperty("openapi_hidden").ToString()); - Console.WriteLine(result.GetProperty("metadata").GetProperty("endpoints").GetProperty("").GetProperty("delete").GetProperty("redirection_strategy").ToString()); - Console.WriteLine(result.GetProperty("modules").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_CreateUserDefinedEndpoint_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - metadata = new - { - endpoints = new - { - key = new object(), - }, - }, - modules = new object(), - }); - Response response = client.CreateUserDefinedEndpoint(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_CreateUserDefinedEndpoint_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - metadata = new - { - endpoints = new - { - key = new object(), - }, - }, - modules = new object(), - }); - Response response = await client.CreateUserDefinedEndpointAsync(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_CreateUserDefinedEndpoint_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - metadata = new - { - endpoints = new - { - key = new - { - get = new - { - authn_policies = new object[] - { -new object() - }, - forwarding_required = "sometimes", - interpreter_reuse = new - { - key = "", - }, - js_function = "", - js_module = "", - mode = "readwrite", - openapi = new object(), - openapi_hidden = true, - redirection_strategy = "none", - }, - }, - }, - }, - modules = new object(), - }); - Response response = client.CreateUserDefinedEndpoint(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_CreateUserDefinedEndpoint_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - metadata = new - { - endpoints = new - { - key = new - { - get = new - { - authn_policies = new object[] - { -new object() - }, - forwarding_required = "sometimes", - interpreter_reuse = new - { - key = "", - }, - js_function = "", - js_module = "", - mode = "readwrite", - openapi = new object(), - openapi_hidden = true, - redirection_strategy = "none", - }, - }, - }, - }, - modules = new object(), - }); - Response response = await client.CreateUserDefinedEndpointAsync(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_GetRuntimeOptions_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - Response response = client.GetRuntimeOptions(); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_GetRuntimeOptions_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - Response response = await client.GetRuntimeOptionsAsync(); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_GetRuntimeOptions_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - Response response = client.GetRuntimeOptions(); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("log_exception_details").ToString()); - Console.WriteLine(result.GetProperty("max_cached_interpreters").ToString()); - Console.WriteLine(result.GetProperty("max_execution_time_ms").ToString()); - Console.WriteLine(result.GetProperty("max_heap_bytes").ToString()); - Console.WriteLine(result.GetProperty("max_stack_bytes").ToString()); - Console.WriteLine(result.GetProperty("return_exception_details").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_GetRuntimeOptions_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - Response response = await client.GetRuntimeOptionsAsync(); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("log_exception_details").ToString()); - Console.WriteLine(result.GetProperty("max_cached_interpreters").ToString()); - Console.WriteLine(result.GetProperty("max_execution_time_ms").ToString()); - Console.WriteLine(result.GetProperty("max_heap_bytes").ToString()); - Console.WriteLine(result.GetProperty("max_stack_bytes").ToString()); - Console.WriteLine(result.GetProperty("return_exception_details").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_UpdateRuntimeOptions_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new object()); - Response response = client.UpdateRuntimeOptions(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_UpdateRuntimeOptions_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new object()); - Response response = await client.UpdateRuntimeOptionsAsync(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_UpdateRuntimeOptions_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - log_exception_details = true, - max_cached_interpreters = 1234L, - max_execution_time_ms = 1234L, - max_heap_bytes = 1234L, - max_stack_bytes = 1234L, - return_exception_details = true, - }); - Response response = client.UpdateRuntimeOptions(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("log_exception_details").ToString()); - Console.WriteLine(result.GetProperty("max_cached_interpreters").ToString()); - Console.WriteLine(result.GetProperty("max_execution_time_ms").ToString()); - Console.WriteLine(result.GetProperty("max_heap_bytes").ToString()); - Console.WriteLine(result.GetProperty("max_stack_bytes").ToString()); - Console.WriteLine(result.GetProperty("return_exception_details").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_UpdateRuntimeOptions_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new - { - log_exception_details = true, - max_cached_interpreters = 1234L, - max_execution_time_ms = 1234L, - max_heap_bytes = 1234L, - max_stack_bytes = 1234L, - return_exception_details = true, - }); - Response response = await client.UpdateRuntimeOptionsAsync(content); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("log_exception_details").ToString()); - Console.WriteLine(result.GetProperty("max_cached_interpreters").ToString()); - Console.WriteLine(result.GetProperty("max_execution_time_ms").ToString()); - Console.WriteLine(result.GetProperty("max_heap_bytes").ToString()); - Console.WriteLine(result.GetProperty("max_stack_bytes").ToString()); - Console.WriteLine(result.GetProperty("return_exception_details").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_GetUserDefinedEndpointsModule_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - Response response = client.GetUserDefinedEndpointsModule(""); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("module").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_GetUserDefinedEndpointsModule_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - Response response = await client.GetUserDefinedEndpointsModuleAsync(""); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("module").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_GetUserDefinedEndpointsModule_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - Response response = client.GetUserDefinedEndpointsModule(""); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("module").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_GetUserDefinedEndpointsModule_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - Response response = await client.GetUserDefinedEndpointsModuleAsync(""); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result.GetProperty("module").ToString()); - Console.WriteLine(result.GetProperty("name").ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_GetUserDefinedRole_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - Response response = client.GetUserDefinedRole(""); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_GetUserDefinedRole_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - Response response = await client.GetUserDefinedRoleAsync(""); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_GetUserDefinedRole_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - Response response = client.GetUserDefinedRole(""); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].GetProperty("roleName").ToString()); - Console.WriteLine(result[0].GetProperty("roleActions")[0].ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_GetUserDefinedRole_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - Response response = await client.GetUserDefinedRoleAsync(""); - - JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; - Console.WriteLine(result[0].GetProperty("roleName").ToString()); - Console.WriteLine(result[0].GetProperty("roleActions")[0].ToString()); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_CreateUserDefinedRole_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new object[] - { -new object() - }); - Response response = client.CreateUserDefinedRole(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_CreateUserDefinedRole_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new object[] - { -new object() - }); - Response response = await client.CreateUserDefinedRoleAsync(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_CreateUserDefinedRole_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new object[] - { -new -{ -roleName = "", -roleActions = new object[] -{ -"" -}, -} - }); - Response response = client.CreateUserDefinedRole(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_CreateUserDefinedRole_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new object[] - { -new -{ -roleName = "", -roleActions = new object[] -{ -"" -}, -} - }); - Response response = await client.CreateUserDefinedRoleAsync(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_UpdateUserDefinedRole_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new object[] - { -new object() - }); - Response response = client.UpdateUserDefinedRole(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_UpdateUserDefinedRole_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new object[] - { -new object() - }); - Response response = await client.UpdateUserDefinedRoleAsync(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_UpdateUserDefinedRole_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new object[] - { -new -{ -roleName = "", -roleActions = new object[] -{ -"" -}, -} - }); - Response response = client.UpdateUserDefinedRole(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_UpdateUserDefinedRole_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - using RequestContent content = RequestContent.Create(new object[] - { -new -{ -roleName = "", -roleActions = new object[] -{ -"" -}, -} - }); - Response response = await client.UpdateUserDefinedRoleAsync(content); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DeleteUserDefinedRole_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - Response response = client.DeleteUserDefinedRole(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DeleteUserDefinedRole_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - Response response = await client.DeleteUserDefinedRoleAsync(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_DeleteUserDefinedRole_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - Response response = client.DeleteUserDefinedRole(""); - - Console.WriteLine(response.Status); - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_DeleteUserDefinedRole_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - Response response = await client.DeleteUserDefinedRoleAsync(""); - - Console.WriteLine(response.Status); - } - [Test] [Ignore("Only validating compilation of examples")] public void Example_GetConsortiumMembers_ShortVersion() @@ -1877,67 +929,5 @@ public async Task Example_GetUsers_AllParameters_Async() Console.WriteLine(result.GetProperty("userId").ToString()); } } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_GetLedgerUsers_ShortVersion() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - foreach (BinaryData item in client.GetLedgerUsers()) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("assignedRoles")[0].ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_GetLedgerUsers_ShortVersion_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - await foreach (BinaryData item in client.GetLedgerUsersAsync()) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("assignedRoles")[0].ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public void Example_GetLedgerUsers_AllParameters() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - foreach (BinaryData item in client.GetLedgerUsers()) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("assignedRoles")[0].ToString()); - Console.WriteLine(result.GetProperty("userId").ToString()); - } - } - - [Test] - [Ignore("Only validating compilation of examples")] - public async Task Example_GetLedgerUsers_AllParameters_Async() - { - Uri endpoint = new Uri(""); - TokenCredential credential = new DefaultAzureCredential(); - ConfidentialLedgerClient client = new ConfidentialLedgerClient(endpoint, credential); - - await foreach (BinaryData item in client.GetLedgerUsersAsync()) - { - JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; - Console.WriteLine(result.GetProperty("assignedRoles")[0].ToString()); - Console.WriteLine(result.GetProperty("userId").ToString()); - } - } } }