Response Body Schema
* *
@@ -57,8 +83,10 @@ public final class ConfidentialLedgerAsyncClient {
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the governance script for the application along with {@link Response} on successful completion of
- * {@link Mono}.
+ * @return the constitution used for governance.
+ *
+ * The constitution is a script that assesses and applies proposals from
+ * consortium members along with {@link Response} on successful completion of {@link Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -97,7 +125,8 @@ public PagedFlux listConsortiumMembers(RequestOptions requestOptions
/**
* Gets quotes for all nodes of the Confidential Ledger.
*
- * A quote is an SGX enclave measurement that can be used to verify the validity of a node and its enclave.
+ * A quote is an SGX enclave measurement that can be used to verify the validity
+ * of a node and its enclave.
* Response Body Schema
*
*
@@ -121,8 +150,10 @@ public PagedFlux listConsortiumMembers(RequestOptions requestOptions
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return information about the enclaves running the Confidential Ledger along with {@link Response} on successful
- * completion of {@link Mono}.
+ * @return quotes for all nodes of the Confidential Ledger.
+ *
+ * A quote is an SGX enclave measurement that can be used to verify the validity
+ * of a node and its enclave along with {@link Response} on successful completion of {@link Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -157,11 +188,45 @@ public PagedFlux listCollections(RequestOptions requestOptions) {
return this.serviceClient.listCollectionsAsync(requestOptions);
}
+ /**
+ * Gets a list of tags for a collection.
+ *
+ * Retrieves the tags associated with a collection.
+ * Query Parameters
+ *
+ * Query Parameters
+ * Name Type Required Description
+ * collectionId String No The collection id.
+ *
+ * You can add these to a request with {@link RequestOptions#addQueryParam}
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * String
+ * }
+ *
+ *
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return a list of tags for a collection.
+ *
+ * Retrieves the tags associated with a collection as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listTags(RequestOptions requestOptions) {
+ return this.serviceClient.listTagsAsync(requestOptions);
+ }
+
/**
* Gets ledger entries from a collection corresponding to a range.
*
- * A collection id may optionally be specified. Only entries in the specified (or default) collection will be
- * returned.
+ * A collection id may optionally be specified. Only entries in the specified (or
+ * default) collection will be returned.
* Query Parameters
*
* Query Parameters
@@ -212,7 +277,9 @@ public PagedFlux listCollections(RequestOptions requestOptions) {
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return paginated ledger entries returned in response to a query as paginated response with {@link PagedFlux}.
+ * @return ledger entries from a collection corresponding to a range.
+ *
+ * A collection id may optionally be specified as paginated response with {@link PagedFlux}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -282,8 +349,9 @@ public PagedFlux listLedgerEntries(RequestOptions requestOptions) {
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return returned as a result of a write to the Confidential Ledger, the transaction id in the response indicates
- * when the write will become durable along with {@link Response} on successful completion of {@link Mono}.
+ * @return returned as a result of a write to the Confidential Ledger, the transaction id
+ * in the response indicates when the write will become durable along with {@link Response} on successful completion
+ * of {@link Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -292,12 +360,14 @@ public Mono> createLedgerEntryWithResponse(BinaryData entry
}
/**
- * Gets the ledger entry at the specified transaction id. A collection id may optionally be specified to indicate
- * the collection from which to fetch the value.
- *
- * To return older ledger entries, the relevant sections of the ledger must be read from disk and validated. To
- * prevent blocking within the enclave, the response will indicate whether the entry is ready and part of the
- * response, or if the loading is still ongoing.
+ * Gets the ledger entry at the specified transaction id. A collection id may
+ * optionally be specified to indicate the collection from which to fetch the
+ * value.
+ *
+ * To return older ledger entries, the relevant sections of the ledger must be
+ * read from disk and validated. To prevent blocking within the enclave, the
+ * response will indicate whether the entry is ready and part of the response, or
+ * if the loading is still ongoing.
* Query Parameters
*
* Query Parameters
@@ -348,8 +418,8 @@ public Mono> createLedgerEntryWithResponse(BinaryData entry
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the result of querying for a ledger entry from an older transaction id along with {@link Response} on
- * successful completion of {@link Mono}.
+ * @return the ledger entry at the specified transaction id along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -500,7 +570,9 @@ public Mono> getTransactionStatusWithResponse(String transa
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return an entry in the ledger along with {@link Response} on successful completion of {@link Mono}.
+ * @return the current value available in the ledger.
+ *
+ * A collection id may optionally be specified along with {@link Response} on successful completion of {@link Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -517,7 +589,7 @@ public Mono> getCurrentLedgerEntryWithResponse(RequestOptio
*
* {@code
* {
- * assignedRole: String(Administrator/Contributor/Reader) (Required)
+ * assignedRole: String(Administrator/Contributor/Reader) (Optional, Required on create)
* userId: String (Optional)
* }
* }
@@ -528,7 +600,9 @@ public Mono> getCurrentLedgerEntryWithResponse(RequestOptio
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return paginated users returned in response to a query as paginated response with {@link PagedFlux}.
+ * @return details on a list of users.
+ *
+ * All users' object IDs and single role per user will be returned as paginated response with {@link PagedFlux}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -545,8 +619,8 @@ public PagedFlux listUsers(RequestOptions requestOptions) {
*
* {@code
* {
- * assignedRoles (Required): [
- * String(Administrator/Contributor/Reader) (Required)
+ * assignedRoles (Optional, Required on create): [
+ * String(Administrator/Contributor/Reader) (Optional, Required on create)
* ]
* userId: String (Optional)
* }
@@ -558,7 +632,9 @@ public PagedFlux listUsers(RequestOptions requestOptions) {
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return paginated users returned in response to a query as paginated response with {@link PagedFlux}.
+ * @return details on a list of users.
+ *
+ * All users' object IDs and multiple roles will be returned as paginated response with {@link PagedFlux}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -590,7 +666,7 @@ public Mono> deleteUserWithResponse(String userId, RequestOptions
*
* {@code
* {
- * assignedRole: String(Administrator/Contributor/Reader) (Required)
+ * assignedRole: String(Administrator/Contributor/Reader) (Optional, Required on create)
* userId: String (Optional)
* }
* }
@@ -619,7 +695,7 @@ public Mono> getUserWithResponse(String userId, RequestOpti
*
* {@code
* {
- * assignedRole: String(Administrator/Contributor/Reader) (Required)
+ * assignedRole: String(Administrator/Contributor/Reader) (Optional, Required on create)
* userId: String (Optional)
* }
* }
@@ -630,7 +706,7 @@ public Mono> getUserWithResponse(String userId, RequestOpti
*
* {@code
* {
- * assignedRole: String(Administrator/Contributor/Reader) (Required)
+ * assignedRole: String(Administrator/Contributor/Reader) (Optional, Required on create)
* userId: String (Optional)
* }
* }
@@ -677,8 +753,8 @@ public Mono> deleteLedgerUserWithResponse(String userId, RequestO
*
* {@code
* {
- * assignedRoles (Required): [
- * String(Administrator/Contributor/Reader) (Required)
+ * assignedRoles (Optional, Required on create): [
+ * String(Administrator/Contributor/Reader) (Optional, Required on create)
* ]
* userId: String (Optional)
* }
@@ -708,8 +784,8 @@ public Mono> getLedgerUserWithResponse(String userId, Reque
*
* {@code
* {
- * assignedRoles (Required): [
- * String(Administrator/Contributor/Reader) (Required)
+ * assignedRoles (Optional, Required on create): [
+ * String(Administrator/Contributor/Reader) (Optional, Required on create)
* ]
* userId: String (Optional)
* }
@@ -721,8 +797,8 @@ public Mono> getLedgerUserWithResponse(String userId, Reque
*
* {@code
* {
- * assignedRoles (Required): [
- * String(Administrator/Contributor/Reader) (Required)
+ * assignedRoles (Optional, Required on create): [
+ * String(Administrator/Contributor/Reader) (Optional, Required on create)
* ]
* userId: String (Optional)
* }
@@ -760,7 +836,9 @@ public Mono> createOrUpdateLedgerUserWithResponse(String us
* String (Required): {
* get (Optional): {
* authn_policies (Required): [
- * Object (Required)
+ * (Required){
+ * String: BinaryData (Required)
+ * }
* ]
* forwarding_required: String(sometimes/always/never) (Required)
* interpreter_reuse (Optional): {
@@ -769,7 +847,9 @@ public Mono> createOrUpdateLedgerUserWithResponse(String us
* js_function: String (Optional)
* js_module: String (Optional)
* mode: String(readwrite/readonly/historical) (Optional)
- * openapi: Object (Optional)
+ * openapi (Optional): {
+ * String: BinaryData (Required)
+ * }
* openapi_hidden: Boolean (Optional)
* redirection_strategy: String(none/to_primary/to_backup) (Optional)
* }
@@ -779,7 +859,12 @@ public Mono> createOrUpdateLedgerUserWithResponse(String us
* }
* }
* }
- * modules: Object (Required)
+ * modules (Required): [
+ * (Required){
+ * module: String (Required)
+ * name: String (Required)
+ * }
+ * ]
* }
* }
*
@@ -789,7 +874,9 @@ public Mono> createOrUpdateLedgerUserWithResponse(String us
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return bundle for the user defined endpoints along with {@link Response} on successful completion of
+ * @return a user defined endpoint.
+ *
+ * Returns the user defined endpoint in the ACL instance along with {@link Response} on successful completion of
* {@link Mono}.
*/
@Generated
@@ -812,7 +899,9 @@ public Mono> getUserDefinedEndpointWithResponse(RequestOpti
* String (Required): {
* get (Optional): {
* authn_policies (Required): [
- * Object (Required)
+ * (Required){
+ * String: BinaryData (Required)
+ * }
* ]
* forwarding_required: String(sometimes/always/never) (Required)
* interpreter_reuse (Optional): {
@@ -821,7 +910,9 @@ public Mono> getUserDefinedEndpointWithResponse(RequestOpti
* js_function: String (Optional)
* js_module: String (Optional)
* mode: String(readwrite/readonly/historical) (Optional)
- * openapi: Object (Optional)
+ * openapi (Optional): {
+ * String: BinaryData (Required)
+ * }
* openapi_hidden: Boolean (Optional)
* redirection_strategy: String(none/to_primary/to_backup) (Optional)
* }
@@ -831,12 +922,17 @@ public Mono> getUserDefinedEndpointWithResponse(RequestOpti
* }
* }
* }
- * modules: Object (Required)
+ * modules (Required): [
+ * (Required){
+ * module: String (Required)
+ * name: String (Required)
+ * }
+ * ]
* }
* }
*
*
- * @param bundle bundle parameter description.
+ * @param bundle Specify a user defined endpoint.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
@@ -918,7 +1014,7 @@ public Mono> getRuntimeOptionsWithResponse(RequestOptions r
* }
*
*
- * @param jSRuntimeOptions JS runtime options.
+ * @param jsRuntimeOptions JS Runtime options.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
@@ -929,9 +1025,9 @@ public Mono> getRuntimeOptionsWithResponse(RequestOptions r
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> updateRuntimeOptionsWithResponse(BinaryData jSRuntimeOptions,
+ public Mono> updateRuntimeOptionsStableWithResponse(BinaryData jsRuntimeOptions,
RequestOptions requestOptions) {
- return this.serviceClient.updateRuntimeOptionsWithResponseAsync(jSRuntimeOptions, requestOptions);
+ return this.serviceClient.updateRuntimeOptionsStableWithResponseAsync(jsRuntimeOptions, requestOptions);
}
/**
@@ -955,7 +1051,7 @@ public Mono> updateRuntimeOptionsWithResponse(BinaryData jS
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the response body along with {@link Response} on successful completion of {@link Mono}.
+ * @return module definition along with {@link Response} on successful completion of {@link Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -1032,8 +1128,10 @@ public Mono> deleteUserDefinedFunctionWithResponse(String functio
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return a user defined function in the ledger along with {@link Response} on successful completion of
- * {@link Mono}.
+ * @return a user defined function.
+ *
+ * Returns the user defined function in the Confidential Ledger along with {@link Response} on successful completion
+ * of {@link Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -1159,14 +1257,16 @@ public Mono> executeUserDefinedFunctionWithResponse(String
*
*
* {@code
- * [
- * (Required){
- * roleName: String (Optional)
- * roleActions (Optional): [
- * String (Optional)
- * ]
- * }
- * ]
+ * {
+ * role (Required): [
+ * (Required){
+ * roleName: String (Optional)
+ * roleActions (Optional): [
+ * String (Optional)
+ * ]
+ * }
+ * ]
+ * }
* }
*
*
@@ -1176,7 +1276,10 @@ public Mono> executeUserDefinedFunctionWithResponse(String
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return definition for roles along with {@link Response} on successful completion of {@link Mono}.
+ * @return role actions for user defined roles
+ *
+ * user defined roles allow users to define and manage app specific AuthZ policy along with {@link Response} on
+ * successful completion of {@link Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -1192,69 +1295,110 @@ public Mono> getUserDefinedRoleWithResponse(String roleName
*
*
* {@code
- * [
- * (Required){
- * roleName: String (Optional)
- * roleActions (Optional): [
- * String (Optional)
- * ]
- * }
- * ]
+ * {
+ * roles (Optional, Required on create): [
+ * (Optional, Required on create){
+ * roleName: String (Optional)
+ * roleActions (Optional): [
+ * String (Optional)
+ * ]
+ * }
+ * ]
+ * }
* }
*
*
- * @param roles user defined role.
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * roles (Optional, Required on create): [
+ * (Optional, Required on create){
+ * roleName: String (Optional)
+ * roleActions (Optional): [
+ * String (Optional)
+ * ]
+ * }
+ * ]
+ * }
+ * }
+ *
+ *
+ * @param body Request body.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the {@link Response} on successful completion of {@link Mono}.
+ * @return roles along with {@link Response} on successful completion of {@link Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> createUserDefinedRoleWithResponse(BinaryData roles, RequestOptions requestOptions) {
- return this.serviceClient.createUserDefinedRoleWithResponseAsync(roles, requestOptions);
+ public Mono> createUserDefinedRoleStableWithResponse(BinaryData body,
+ RequestOptions requestOptions) {
+ return this.serviceClient.createUserDefinedRoleStableWithResponseAsync(body, requestOptions);
}
/**
- * Patch replaces the allowed action on existing roles,if the desire is to remove an existing action, the role must
- * be deleted and recreated.
+ * Patch replaces the allowed action on existing roles,if the desire is to remove
+ * an existing action, the role must be deleted and recreated.
*
* User defined roles allow users to define and manage app specific AuthZ policy.
* Request Body Schema
*
*
* {@code
- * [
- * (Required){
- * roleName: String (Optional)
- * roleActions (Optional): [
- * String (Optional)
- * ]
- * }
- * ]
+ * {
+ * roles (Optional, Required on create): [
+ * (Optional, Required on create){
+ * roleName: String (Optional)
+ * roleActions (Optional): [
+ * String (Optional)
+ * ]
+ * }
+ * ]
+ * }
+ * }
+ *
+ *
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * roles (Optional, Required on create): [
+ * (Optional, Required on create){
+ * roleName: String (Optional)
+ * roleActions (Optional): [
+ * String (Optional)
+ * ]
+ * }
+ * ]
+ * }
* }
*
*
- * @param roles user defined role.
+ * @param body Request body.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the {@link Response} on successful completion of {@link Mono}.
+ * @return roles along with {@link Response} on successful completion of {@link Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> updateUserDefinedRoleWithResponse(BinaryData roles, RequestOptions requestOptions) {
- return this.serviceClient.updateUserDefinedRoleWithResponseAsync(roles, requestOptions);
+ public Mono> updateUserDefinedRoleStableWithResponse(BinaryData body,
+ RequestOptions requestOptions) {
+ return this.serviceClient.updateUserDefinedRoleStableWithResponseAsync(body, requestOptions);
}
/**
* Deletes user defined roles
*
- * A user defined role allows the users to create and manage their own role actions using the API.
+ * A user defined role allows the users to create and manage their own role
+ * actions using the API.
*
* @param roleName user defined role name.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
@@ -1266,7 +1410,1083 @@ public Mono> updateUserDefinedRoleWithResponse(BinaryData roles,
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> deleteUserDefinedRoleWithResponse(String roleName, RequestOptions requestOptions) {
- return this.serviceClient.deleteUserDefinedRoleWithResponseAsync(roleName, requestOptions);
+ public Mono> deleteUserDefinedRoleStableWithResponse(String roleName,
+ RequestOptions requestOptions) {
+ return this.serviceClient.deleteUserDefinedRoleStableWithResponseAsync(roleName, requestOptions);
+ }
+
+ /**
+ * Gets the constitution used for governance.
+ *
+ * The constitution is a script that assesses and applies proposals from
+ * consortium members.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the constitution used for governance.
+ *
+ * The constitution is a script that assesses and applies proposals from
+ * consortium members on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getConstitution() {
+ // Generated convenience method for getConstitutionWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getConstitutionWithResponse(requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(Constitution.class));
+ }
+
+ /**
+ * Lists the consortium members.
+ *
+ * Consortium members can manage the Confidential Ledger.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of members in the consortium as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listConsortiumMembers() {
+ // Generated convenience method for listConsortiumMembers
+ RequestOptions requestOptions = new RequestOptions();
+ PagedFlux pagedFluxResponse = listConsortiumMembers(requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(),
+ pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(ConsortiumMember.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Gets quotes for all nodes of the Confidential Ledger.
+ *
+ * A quote is an SGX enclave measurement that can be used to verify the validity
+ * of a node and its enclave.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return quotes for all nodes of the Confidential Ledger.
+ *
+ * A quote is an SGX enclave measurement that can be used to verify the validity
+ * of a node and its enclave on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getEnclaveQuotes() {
+ // Generated convenience method for getEnclaveQuotesWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getEnclaveQuotesWithResponse(requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(ConfidentialLedgerEnclaves.class));
+ }
+
+ /**
+ * Retrieves a list of collection ids present in the Confidential Ledger
+ *
+ * Collection ids are user-created collections of ledger entries.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paginated collections returned in response to a query as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listCollections() {
+ // Generated convenience method for listCollections
+ RequestOptions requestOptions = new RequestOptions();
+ PagedFlux pagedFluxResponse = listCollections(requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(),
+ pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(Collection.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Gets a list of tags for a collection.
+ *
+ * Retrieves the tags associated with a collection.
+ *
+ * @param collectionId The collection id.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of tags for a collection.
+ *
+ * Retrieves the tags associated with a collection as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listTags(String collectionId) {
+ // Generated convenience method for listTags
+ RequestOptions requestOptions = new RequestOptions();
+ if (collectionId != null) {
+ requestOptions.addQueryParam("collectionId", collectionId, false);
+ }
+ PagedFlux pagedFluxResponse = listTags(requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(),
+ pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(String.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Gets a list of tags for a collection.
+ *
+ * Retrieves the tags associated with a collection.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of tags for a collection.
+ *
+ * Retrieves the tags associated with a collection as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listTags() {
+ // Generated convenience method for listTags
+ RequestOptions requestOptions = new RequestOptions();
+ PagedFlux pagedFluxResponse = listTags(requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(),
+ pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(String.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Gets ledger entries from a collection corresponding to a range.
+ *
+ * A collection id may optionally be specified. Only entries in the specified (or
+ * default) collection will be returned.
+ *
+ * @param collectionId The collection id.
+ * @param fromTransactionId Specify the first transaction ID in a range.
+ * @param toTransactionId Specify the last transaction ID in a range.
+ * @param tag Single tag.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return ledger entries from a collection corresponding to a range.
+ *
+ * A collection id may optionally be specified as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listLedgerEntries(String collectionId, String fromTransactionId,
+ String toTransactionId, String tag) {
+ // Generated convenience method for listLedgerEntries
+ RequestOptions requestOptions = new RequestOptions();
+ if (collectionId != null) {
+ requestOptions.addQueryParam("collectionId", collectionId, false);
+ }
+ if (fromTransactionId != null) {
+ requestOptions.addQueryParam("fromTransactionId", fromTransactionId, false);
+ }
+ if (toTransactionId != null) {
+ requestOptions.addQueryParam("toTransactionId", toTransactionId, false);
+ }
+ if (tag != null) {
+ requestOptions.addQueryParam("tag", tag, false);
+ }
+ PagedFlux pagedFluxResponse = listLedgerEntries(requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(),
+ pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(LedgerEntry.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Gets ledger entries from a collection corresponding to a range.
+ *
+ * A collection id may optionally be specified. Only entries in the specified (or
+ * default) collection will be returned.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return ledger entries from a collection corresponding to a range.
+ *
+ * A collection id may optionally be specified as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listLedgerEntries() {
+ // Generated convenience method for listLedgerEntries
+ RequestOptions requestOptions = new RequestOptions();
+ PagedFlux pagedFluxResponse = listLedgerEntries(requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(),
+ pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(LedgerEntry.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Writes a ledger entry.
+ *
+ * A collection id may optionally be specified.
+ *
+ * @param entry Ledger entry.
+ * @param collectionId The collection id.
+ * @param tags Comma separated tags.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return returned as a result of a write to the Confidential Ledger, the transaction id
+ * in the response indicates when the write will become durable on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono createLedgerEntry(LedgerEntry entry, String collectionId, String tags) {
+ // Generated convenience method for createLedgerEntryWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ if (collectionId != null) {
+ requestOptions.addQueryParam("collectionId", collectionId, false);
+ }
+ if (tags != null) {
+ requestOptions.addQueryParam("tags", tags, false);
+ }
+ return createLedgerEntryWithResponse(BinaryData.fromObject(entry), requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(LedgerWriteResult.class));
+ }
+
+ /**
+ * Writes a ledger entry.
+ *
+ * A collection id may optionally be specified.
+ *
+ * @param entry Ledger entry.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return returned as a result of a write to the Confidential Ledger, the transaction id
+ * in the response indicates when the write will become durable on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono createLedgerEntry(LedgerEntry entry) {
+ // Generated convenience method for createLedgerEntryWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return createLedgerEntryWithResponse(BinaryData.fromObject(entry), requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(LedgerWriteResult.class));
+ }
+
+ /**
+ * Gets the ledger entry at the specified transaction id. A collection id may
+ * optionally be specified to indicate the collection from which to fetch the
+ * value.
+ *
+ * To return older ledger entries, the relevant sections of the ledger must be
+ * read from disk and validated. To prevent blocking within the enclave, the
+ * response will indicate whether the entry is ready and part of the response, or
+ * if the loading is still ongoing.
+ *
+ * @param transactionId Identifies a write transaction.
+ * @param collectionId The collection id.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the ledger entry at the specified transaction id on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getLedgerEntry(String transactionId, String collectionId) {
+ // Generated convenience method for getLedgerEntryWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ if (collectionId != null) {
+ requestOptions.addQueryParam("collectionId", collectionId, false);
+ }
+ return getLedgerEntryWithResponse(transactionId, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(LedgerQueryResult.class));
+ }
+
+ /**
+ * Gets the ledger entry at the specified transaction id. A collection id may
+ * optionally be specified to indicate the collection from which to fetch the
+ * value.
+ *
+ * To return older ledger entries, the relevant sections of the ledger must be
+ * read from disk and validated. To prevent blocking within the enclave, the
+ * response will indicate whether the entry is ready and part of the response, or
+ * if the loading is still ongoing.
+ *
+ * @param transactionId Identifies a write transaction.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the ledger entry at the specified transaction id on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getLedgerEntry(String transactionId) {
+ // Generated convenience method for getLedgerEntryWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getLedgerEntryWithResponse(transactionId, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(LedgerQueryResult.class));
+ }
+
+ /**
+ * Gets a receipt certifying ledger contents at a particular transaction id.
+ *
+ * @param transactionId Identifies a write transaction.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a receipt certifying ledger contents at a particular transaction id on successful completion of
+ * {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getReceipt(String transactionId) {
+ // Generated convenience method for getReceiptWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getReceiptWithResponse(transactionId, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(TransactionReceipt.class));
+ }
+
+ /**
+ * Gets the status of an entry identified by a transaction id.
+ *
+ * @param transactionId Identifies a write transaction.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status of an entry identified by a transaction id on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getTransactionStatus(String transactionId) {
+ // Generated convenience method for getTransactionStatusWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getTransactionStatusWithResponse(transactionId, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(TransactionStatus.class));
+ }
+
+ /**
+ * Gets the current value available in the ledger.
+ *
+ * A collection id may optionally be specified.
+ *
+ * @param collectionId The collection id.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the current value available in the ledger.
+ *
+ * A collection id may optionally be specified on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getCurrentLedgerEntry(String collectionId) {
+ // Generated convenience method for getCurrentLedgerEntryWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ if (collectionId != null) {
+ requestOptions.addQueryParam("collectionId", collectionId, false);
+ }
+ return getCurrentLedgerEntryWithResponse(requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(LedgerEntry.class));
+ }
+
+ /**
+ * Gets the current value available in the ledger.
+ *
+ * A collection id may optionally be specified.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the current value available in the ledger.
+ *
+ * A collection id may optionally be specified on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getCurrentLedgerEntry() {
+ // Generated convenience method for getCurrentLedgerEntryWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getCurrentLedgerEntryWithResponse(requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(LedgerEntry.class));
+ }
+
+ /**
+ * Gets details on a list of users.
+ *
+ * All users' object IDs and single role per user will be returned.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return details on a list of users.
+ *
+ * All users' object IDs and single role per user will be returned as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listUsers() {
+ // Generated convenience method for listUsers
+ RequestOptions requestOptions = new RequestOptions();
+ PagedFlux pagedFluxResponse = listUsers(requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux.map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(),
+ pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(LedgerUser.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Gets details on a list of users.
+ *
+ * All users' object IDs and multiple roles will be returned.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return details on a list of users.
+ *
+ * All users' object IDs and multiple roles will be returned as paginated response with {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listLedgerUsers() {
+ // Generated convenience method for listLedgerUsers
+ RequestOptions requestOptions = new RequestOptions();
+ PagedFlux pagedFluxResponse = listLedgerUsers(requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux
+ .map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(),
+ pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(LedgerUserMultipleRoles.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Deletes a user from the Confidential Ledger.
+ *
+ * @param userId The user id, either an AAD object ID or certificate fingerprint.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono deleteUser(String userId) {
+ // Generated convenience method for deleteUserWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return deleteUserWithResponse(userId, requestOptions).flatMap(FluxUtil::toMono);
+ }
+
+ /**
+ * Gets a user.
+ *
+ * @param userId The user id, either an AAD object ID or certificate fingerprint.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a user on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getUser(String userId) {
+ // Generated convenience method for getUserWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getUserWithResponse(userId, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(LedgerUser.class));
+ }
+
+ /**
+ * Adds a user or updates a user's fields.
+ *
+ * A JSON merge patch is applied for existing users.
+ *
+ * @param userId The user id, either an AAD object ID or certificate fingerprint.
+ * @param userDetails Details about a Confidential Ledger user.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return details about a Confidential Ledger user on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono createOrUpdateUser(String userId, LedgerUser userDetails) {
+ // Generated convenience method for createOrUpdateUserWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ JsonMergePatchHelper.getLedgerUserAccessor().prepareModelForJsonMergePatch(userDetails, true);
+ BinaryData userDetailsInBinaryData = BinaryData.fromObject(userDetails);
+ // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization.
+ userDetailsInBinaryData.getLength();
+ JsonMergePatchHelper.getLedgerUserAccessor().prepareModelForJsonMergePatch(userDetails, false);
+ return createOrUpdateUserWithResponse(userId, userDetailsInBinaryData, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(LedgerUser.class));
+ }
+
+ /**
+ * Deletes a user with multiple roles from the Confidential Ledger.
+ *
+ * @param userId The user id, either an AAD object ID or certificate fingerprint.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono deleteLedgerUser(String userId) {
+ // Generated convenience method for deleteLedgerUserWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return deleteLedgerUserWithResponse(userId, requestOptions).flatMap(FluxUtil::toMono);
+ }
+
+ /**
+ * Gets a user with multiple roles.
+ *
+ * @param userId The user id, either an AAD object ID or certificate fingerprint.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a user with multiple roles on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getLedgerUser(String userId) {
+ // Generated convenience method for getLedgerUserWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getLedgerUserWithResponse(userId, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(LedgerUserMultipleRoles.class));
+ }
+
+ /**
+ * Adds a user or updates a user's fields.
+ *
+ * A JSON merge patch is applied for existing users.
+ *
+ * @param userId The user id, either an AAD object ID or certificate fingerprint.
+ * @param userMultipleRoles Details about a Confidential Ledger user with multiple roles.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return details about a Confidential Ledger user on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono createOrUpdateLedgerUser(String userId,
+ LedgerUserMultipleRoles userMultipleRoles) {
+ // Generated convenience method for createOrUpdateLedgerUserWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ JsonMergePatchHelper.getLedgerUserMultipleRolesAccessor()
+ .prepareModelForJsonMergePatch(userMultipleRoles, true);
+ BinaryData userMultipleRolesInBinaryData = BinaryData.fromObject(userMultipleRoles);
+ // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization.
+ userMultipleRolesInBinaryData.getLength();
+ JsonMergePatchHelper.getLedgerUserMultipleRolesAccessor()
+ .prepareModelForJsonMergePatch(userMultipleRoles, false);
+ return createOrUpdateLedgerUserWithResponse(userId, userMultipleRolesInBinaryData, requestOptions)
+ .flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(LedgerUserMultipleRoles.class));
+ }
+
+ /**
+ * Gets a user defined endpoint.
+ *
+ * Returns the user defined endpoint in the ACL instance.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a user defined endpoint.
+ *
+ * Returns the user defined endpoint in the ACL instance on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getUserDefinedEndpoint() {
+ // Generated convenience method for getUserDefinedEndpointWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getUserDefinedEndpointWithResponse(requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(Bundle.class));
+ }
+
+ /**
+ * Creates a user defined endpoint.
+ *
+ * Creates the user defined endpoint in the ACL instance.
+ *
+ * @param bundle Specify a user defined endpoint.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono createUserDefinedEndpoint(Bundle bundle) {
+ // Generated convenience method for createUserDefinedEndpointWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return createUserDefinedEndpointWithResponse(BinaryData.fromObject(bundle), requestOptions)
+ .flatMap(FluxUtil::toMono);
+ }
+
+ /**
+ * Runtime options for user defined endpoints.
+ *
+ * It returns the runtime options.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return jS runtime options for user defined endpoints and functions on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getRuntimeOptions() {
+ // Generated convenience method for getRuntimeOptionsWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getRuntimeOptionsWithResponse(requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(JsRuntimeOptions.class));
+ }
+
+ /**
+ * Runtime options for user defined endpoints.
+ *
+ * Updates the runtime options.
+ *
+ * @param jsRuntimeOptions JS Runtime options.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return jS runtime options for user defined endpoints and functions on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono updateRuntimeOptionsStable(JsRuntimeOptions jsRuntimeOptions) {
+ // Generated convenience method for updateRuntimeOptionsStableWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ JsonMergePatchHelper.getJsRuntimeOptionsAccessor().prepareModelForJsonMergePatch(jsRuntimeOptions, true);
+ BinaryData jsRuntimeOptionsInBinaryData = BinaryData.fromObject(jsRuntimeOptions);
+ // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization.
+ jsRuntimeOptionsInBinaryData.getLength();
+ JsonMergePatchHelper.getJsRuntimeOptionsAccessor().prepareModelForJsonMergePatch(jsRuntimeOptions, false);
+ return updateRuntimeOptionsStableWithResponse(jsRuntimeOptionsInBinaryData, requestOptions)
+ .flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(JsRuntimeOptions.class));
+ }
+
+ /**
+ * Module for user defined endpoints.
+ *
+ * It gets the module for the user defined endpoint.
+ *
+ * @param moduleName module name of the user defined endpoint.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return module definition on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getUserDefinedEndpointsModule(String moduleName) {
+ // Generated convenience method for getUserDefinedEndpointsModuleWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getUserDefinedEndpointsModuleWithResponse(moduleName, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(ModuleDef.class));
+ }
+
+ /**
+ * Retrieves a list of user defined functions present in the Confidential Ledger
+ *
+ * User defined functions stored in the Confidential Ledger.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paginated user defined functions returned in response to a query as paginated response with
+ * {@link PagedFlux}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedFlux listUserDefinedFunctions() {
+ // Generated convenience method for listUserDefinedFunctions
+ RequestOptions requestOptions = new RequestOptions();
+ PagedFlux pagedFluxResponse = listUserDefinedFunctions(requestOptions);
+ return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
+ Flux> flux = (continuationTokenParam == null)
+ ? pagedFluxResponse.byPage().take(1)
+ : pagedFluxResponse.byPage(continuationTokenParam).take(1);
+ return flux
+ .map(pagedResponse -> new PagedResponseBase(pagedResponse.getRequest(),
+ pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
+ pagedResponse.getValue()
+ .stream()
+ .map(protocolMethodData -> protocolMethodData.toObject(UserDefinedFunction.class))
+ .collect(Collectors.toList()),
+ pagedResponse.getContinuationToken(), null));
+ });
+ }
+
+ /**
+ * Deletes a user defined function from the Confidential Ledger.
+ *
+ * @param functionId Identifies a user defined function.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono deleteUserDefinedFunction(String functionId) {
+ // Generated convenience method for deleteUserDefinedFunctionWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return deleteUserDefinedFunctionWithResponse(functionId, requestOptions).flatMap(FluxUtil::toMono);
+ }
+
+ /**
+ * Gets a user defined function.
+ *
+ * Returns the user defined function in the Confidential Ledger.
+ *
+ * @param functionId Identifies a user defined function.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a user defined function.
+ *
+ * Returns the user defined function in the Confidential Ledger on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getUserDefinedFunction(String functionId) {
+ // Generated convenience method for getUserDefinedFunctionWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getUserDefinedFunctionWithResponse(functionId, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(UserDefinedFunction.class));
+ }
+
+ /**
+ * Creates a user defined function.
+ *
+ * Creates the user defined function in the Confidential Ledger.
+ *
+ * @param functionId Identifies a user defined function.
+ * @param userDefinedFunction Specify a user defined function of a Confidential Ledger.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a user defined function in the ledger on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono createUserDefinedFunction(String functionId,
+ UserDefinedFunction userDefinedFunction) {
+ // Generated convenience method for createUserDefinedFunctionWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return createUserDefinedFunctionWithResponse(functionId, BinaryData.fromObject(userDefinedFunction),
+ requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(UserDefinedFunction.class));
+ }
+
+ /**
+ * Executes a user defined function.
+ *
+ * Executes the user defined function in the Confidential Ledger.
+ *
+ * @param functionId Identifies a user defined function.
+ * @param userDefinedFunctionExecutionProperties Specify user defined function execution properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the result of a user defined function execution on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono executeUserDefinedFunction(String functionId,
+ UserDefinedFunctionExecutionProperties userDefinedFunctionExecutionProperties) {
+ // Generated convenience method for executeUserDefinedFunctionWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ if (userDefinedFunctionExecutionProperties != null) {
+ requestOptions.setBody(BinaryData.fromObject(userDefinedFunctionExecutionProperties));
+ }
+ return executeUserDefinedFunctionWithResponse(functionId, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(UserDefinedFunctionExecutionResponse.class));
+ }
+
+ /**
+ * Executes a user defined function.
+ *
+ * Executes the user defined function in the Confidential Ledger.
+ *
+ * @param functionId Identifies a user defined function.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the result of a user defined function execution on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono executeUserDefinedFunction(String functionId) {
+ // Generated convenience method for executeUserDefinedFunctionWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return executeUserDefinedFunctionWithResponse(functionId, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(UserDefinedFunctionExecutionResponse.class));
+ }
+
+ /**
+ * Gets role actions for user defined roles
+ *
+ * user defined roles allow users to define and manage app specific AuthZ policy.
+ *
+ * @param roleName user defined role name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return role actions for user defined roles
+ *
+ * user defined roles allow users to define and manage app specific AuthZ policy on successful completion of
+ * {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getUserDefinedRole(String roleName) {
+ // Generated convenience method for getUserDefinedRoleWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getUserDefinedRoleWithResponse(roleName, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(UserDefinedRole.class));
+ }
+
+ /**
+ * Creates new roles and their actions
+ *
+ * User defined roles allow users to define and manage app specific AuthZ policy.
+ *
+ * @param body Request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return roles on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono createUserDefinedRoleStable(UserDefinedRoles body) {
+ // Generated convenience method for createUserDefinedRoleStableWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return createUserDefinedRoleStableWithResponse(BinaryData.fromObject(body), requestOptions)
+ .flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(UserDefinedRoles.class));
+ }
+
+ /**
+ * Patch replaces the allowed action on existing roles,if the desire is to remove
+ * an existing action, the role must be deleted and recreated.
+ *
+ * User defined roles allow users to define and manage app specific AuthZ policy.
+ *
+ * @param body Request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return roles on successful completion of {@link Mono}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono updateUserDefinedRoleStable(UserDefinedRoles body) {
+ // Generated convenience method for updateUserDefinedRoleStableWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ JsonMergePatchHelper.getUserDefinedRolesAccessor().prepareModelForJsonMergePatch(body, true);
+ BinaryData bodyInBinaryData = BinaryData.fromObject(body);
+ // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization.
+ bodyInBinaryData.getLength();
+ JsonMergePatchHelper.getUserDefinedRolesAccessor().prepareModelForJsonMergePatch(body, false);
+ return updateUserDefinedRoleStableWithResponse(bodyInBinaryData, requestOptions).flatMap(FluxUtil::toMono)
+ .map(protocolMethodData -> protocolMethodData.toObject(UserDefinedRoles.class));
+ }
+
+ /**
+ * Deletes user defined roles
+ *
+ * A user defined role allows the users to create and manage their own role
+ * actions using the API.
+ *
+ * @param roleName user defined role name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono deleteUserDefinedRoleStable(String roleName) {
+ // Generated convenience method for deleteUserDefinedRoleStableWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return deleteUserDefinedRoleStableWithResponse(roleName, requestOptions).flatMap(FluxUtil::toMono);
}
}
diff --git a/sdk/confidentialledger/azure-security-confidentialledger/src/main/java/com/azure/security/confidentialledger/ConfidentialLedgerClient.java b/sdk/confidentialledger/azure-security-confidentialledger/src/main/java/com/azure/security/confidentialledger/ConfidentialLedgerClient.java
index eabb327a1cf9..9c88d38e1709 100644
--- a/sdk/confidentialledger/azure-security-confidentialledger/src/main/java/com/azure/security/confidentialledger/ConfidentialLedgerClient.java
+++ b/sdk/confidentialledger/azure-security-confidentialledger/src/main/java/com/azure/security/confidentialledger/ConfidentialLedgerClient.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.security.confidentialledger;
@@ -17,6 +17,26 @@
import com.azure.core.http.rest.Response;
import com.azure.core.util.BinaryData;
import com.azure.security.confidentialledger.implementation.ConfidentialLedgerClientImpl;
+import com.azure.security.confidentialledger.implementation.JsonMergePatchHelper;
+import com.azure.security.confidentialledger.models.Bundle;
+import com.azure.security.confidentialledger.models.Collection;
+import com.azure.security.confidentialledger.models.ConfidentialLedgerEnclaves;
+import com.azure.security.confidentialledger.models.ConsortiumMember;
+import com.azure.security.confidentialledger.models.Constitution;
+import com.azure.security.confidentialledger.models.JsRuntimeOptions;
+import com.azure.security.confidentialledger.models.LedgerEntry;
+import com.azure.security.confidentialledger.models.LedgerQueryResult;
+import com.azure.security.confidentialledger.models.LedgerUser;
+import com.azure.security.confidentialledger.models.LedgerUserMultipleRoles;
+import com.azure.security.confidentialledger.models.LedgerWriteResult;
+import com.azure.security.confidentialledger.models.ModuleDef;
+import com.azure.security.confidentialledger.models.TransactionReceipt;
+import com.azure.security.confidentialledger.models.TransactionStatus;
+import com.azure.security.confidentialledger.models.UserDefinedFunction;
+import com.azure.security.confidentialledger.models.UserDefinedFunctionExecutionProperties;
+import com.azure.security.confidentialledger.models.UserDefinedFunctionExecutionResponse;
+import com.azure.security.confidentialledger.models.UserDefinedRole;
+import com.azure.security.confidentialledger.models.UserDefinedRoles;
/**
* Initializes a new instance of the synchronous ConfidentialLedgerClient type.
@@ -39,7 +59,8 @@ public final class ConfidentialLedgerClient {
/**
* Gets the constitution used for governance.
*
- * The constitution is a script that assesses and applies proposals from consortium members.
+ * The constitution is a script that assesses and applies proposals from
+ * consortium members.
* Response Body Schema
*
*
@@ -56,7 +77,10 @@ public final class ConfidentialLedgerClient {
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the governance script for the application along with {@link Response}.
+ * @return the constitution used for governance.
+ *
+ * The constitution is a script that assesses and applies proposals from
+ * consortium members along with {@link Response}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -95,7 +119,8 @@ public PagedIterable listConsortiumMembers(RequestOptions requestOpt
/**
* Gets quotes for all nodes of the Confidential Ledger.
*
- * A quote is an SGX enclave measurement that can be used to verify the validity of a node and its enclave.
+ * A quote is an SGX enclave measurement that can be used to verify the validity
+ * of a node and its enclave.
* Response Body Schema
*
*
@@ -119,7 +144,10 @@ public PagedIterable listConsortiumMembers(RequestOptions requestOpt
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return information about the enclaves running the Confidential Ledger along with {@link Response}.
+ * @return quotes for all nodes of the Confidential Ledger.
+ *
+ * A quote is an SGX enclave measurement that can be used to verify the validity
+ * of a node and its enclave along with {@link Response}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -154,11 +182,45 @@ public PagedIterable listCollections(RequestOptions requestOptions)
return this.serviceClient.listCollections(requestOptions);
}
+ /**
+ * Gets a list of tags for a collection.
+ *
+ * Retrieves the tags associated with a collection.
+ * Query Parameters
+ *
+ * Query Parameters
+ * Name Type Required Description
+ * collectionId String No The collection id.
+ *
+ * You can add these to a request with {@link RequestOptions#addQueryParam}
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * String
+ * }
+ *
+ *
+ * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @return a list of tags for a collection.
+ *
+ * Retrieves the tags associated with a collection as paginated response with {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listTags(RequestOptions requestOptions) {
+ return this.serviceClient.listTags(requestOptions);
+ }
+
/**
* Gets ledger entries from a collection corresponding to a range.
*
- * A collection id may optionally be specified. Only entries in the specified (or default) collection will be
- * returned.
+ * A collection id may optionally be specified. Only entries in the specified (or
+ * default) collection will be returned.
* Query Parameters
*
* Query Parameters
@@ -209,8 +271,9 @@ public PagedIterable listCollections(RequestOptions requestOptions)
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return paginated ledger entries returned in response to a query as paginated response with
- * {@link PagedIterable}.
+ * @return ledger entries from a collection corresponding to a range.
+ *
+ * A collection id may optionally be specified as paginated response with {@link PagedIterable}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -280,8 +343,8 @@ public PagedIterable listLedgerEntries(RequestOptions requestOptions
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return returned as a result of a write to the Confidential Ledger, the transaction id in the response indicates
- * when the write will become durable along with {@link Response}.
+ * @return returned as a result of a write to the Confidential Ledger, the transaction id
+ * in the response indicates when the write will become durable along with {@link Response}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -290,12 +353,14 @@ public Response createLedgerEntryWithResponse(BinaryData entry, Requ
}
/**
- * Gets the ledger entry at the specified transaction id. A collection id may optionally be specified to indicate
- * the collection from which to fetch the value.
- *
- * To return older ledger entries, the relevant sections of the ledger must be read from disk and validated. To
- * prevent blocking within the enclave, the response will indicate whether the entry is ready and part of the
- * response, or if the loading is still ongoing.
+ * Gets the ledger entry at the specified transaction id. A collection id may
+ * optionally be specified to indicate the collection from which to fetch the
+ * value.
+ *
+ * To return older ledger entries, the relevant sections of the ledger must be
+ * read from disk and validated. To prevent blocking within the enclave, the
+ * response will indicate whether the entry is ready and part of the response, or
+ * if the loading is still ongoing.
* Query Parameters
*
* Query Parameters
@@ -346,7 +411,7 @@ public Response createLedgerEntryWithResponse(BinaryData entry, Requ
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the result of querying for a ledger entry from an older transaction id along with {@link Response}.
+ * @return the ledger entry at the specified transaction id along with {@link Response}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -494,7 +559,9 @@ public Response getTransactionStatusWithResponse(String transactionI
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return an entry in the ledger along with {@link Response}.
+ * @return the current value available in the ledger.
+ *
+ * A collection id may optionally be specified along with {@link Response}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -511,7 +578,7 @@ public Response getCurrentLedgerEntryWithResponse(RequestOptions req
*
* {@code
* {
- * assignedRole: String(Administrator/Contributor/Reader) (Required)
+ * assignedRole: String(Administrator/Contributor/Reader) (Optional, Required on create)
* userId: String (Optional)
* }
* }
@@ -522,7 +589,9 @@ public Response getCurrentLedgerEntryWithResponse(RequestOptions req
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return paginated users returned in response to a query as paginated response with {@link PagedIterable}.
+ * @return details on a list of users.
+ *
+ * All users' object IDs and single role per user will be returned as paginated response with {@link PagedIterable}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -539,8 +608,8 @@ public PagedIterable listUsers(RequestOptions requestOptions) {
*
* {@code
* {
- * assignedRoles (Required): [
- * String(Administrator/Contributor/Reader) (Required)
+ * assignedRoles (Optional, Required on create): [
+ * String(Administrator/Contributor/Reader) (Optional, Required on create)
* ]
* userId: String (Optional)
* }
@@ -552,7 +621,9 @@ public PagedIterable listUsers(RequestOptions requestOptions) {
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return paginated users returned in response to a query as paginated response with {@link PagedIterable}.
+ * @return details on a list of users.
+ *
+ * All users' object IDs and multiple roles will be returned as paginated response with {@link PagedIterable}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -584,7 +655,7 @@ public Response deleteUserWithResponse(String userId, RequestOptions reque
*
* {@code
* {
- * assignedRole: String(Administrator/Contributor/Reader) (Required)
+ * assignedRole: String(Administrator/Contributor/Reader) (Optional, Required on create)
* userId: String (Optional)
* }
* }
@@ -613,7 +684,7 @@ public Response getUserWithResponse(String userId, RequestOptions re
*
* {@code
* {
- * assignedRole: String(Administrator/Contributor/Reader) (Required)
+ * assignedRole: String(Administrator/Contributor/Reader) (Optional, Required on create)
* userId: String (Optional)
* }
* }
@@ -624,7 +695,7 @@ public Response getUserWithResponse(String userId, RequestOptions re
*
* {@code
* {
- * assignedRole: String(Administrator/Contributor/Reader) (Required)
+ * assignedRole: String(Administrator/Contributor/Reader) (Optional, Required on create)
* userId: String (Optional)
* }
* }
@@ -670,8 +741,8 @@ public Response deleteLedgerUserWithResponse(String userId, RequestOptions
*
* {@code
* {
- * assignedRoles (Required): [
- * String(Administrator/Contributor/Reader) (Required)
+ * assignedRoles (Optional, Required on create): [
+ * String(Administrator/Contributor/Reader) (Optional, Required on create)
* ]
* userId: String (Optional)
* }
@@ -701,8 +772,8 @@ public Response getLedgerUserWithResponse(String userId, RequestOpti
*
* {@code
* {
- * assignedRoles (Required): [
- * String(Administrator/Contributor/Reader) (Required)
+ * assignedRoles (Optional, Required on create): [
+ * String(Administrator/Contributor/Reader) (Optional, Required on create)
* ]
* userId: String (Optional)
* }
@@ -714,8 +785,8 @@ public Response getLedgerUserWithResponse(String userId, RequestOpti
*
* {@code
* {
- * assignedRoles (Required): [
- * String(Administrator/Contributor/Reader) (Required)
+ * assignedRoles (Optional, Required on create): [
+ * String(Administrator/Contributor/Reader) (Optional, Required on create)
* ]
* userId: String (Optional)
* }
@@ -752,7 +823,9 @@ public Response createOrUpdateLedgerUserWithResponse(String userId,
* String (Required): {
* get (Optional): {
* authn_policies (Required): [
- * Object (Required)
+ * (Required){
+ * String: BinaryData (Required)
+ * }
* ]
* forwarding_required: String(sometimes/always/never) (Required)
* interpreter_reuse (Optional): {
@@ -761,7 +834,9 @@ public Response createOrUpdateLedgerUserWithResponse(String userId,
* js_function: String (Optional)
* js_module: String (Optional)
* mode: String(readwrite/readonly/historical) (Optional)
- * openapi: Object (Optional)
+ * openapi (Optional): {
+ * String: BinaryData (Required)
+ * }
* openapi_hidden: Boolean (Optional)
* redirection_strategy: String(none/to_primary/to_backup) (Optional)
* }
@@ -771,7 +846,12 @@ public Response createOrUpdateLedgerUserWithResponse(String userId,
* }
* }
* }
- * modules: Object (Required)
+ * modules (Required): [
+ * (Required){
+ * module: String (Required)
+ * name: String (Required)
+ * }
+ * ]
* }
* }
*
@@ -781,7 +861,9 @@ public Response createOrUpdateLedgerUserWithResponse(String userId,
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return bundle for the user defined endpoints along with {@link Response}.
+ * @return a user defined endpoint.
+ *
+ * Returns the user defined endpoint in the ACL instance along with {@link Response}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -803,7 +885,9 @@ public Response getUserDefinedEndpointWithResponse(RequestOptions re
* String (Required): {
* get (Optional): {
* authn_policies (Required): [
- * Object (Required)
+ * (Required){
+ * String: BinaryData (Required)
+ * }
* ]
* forwarding_required: String(sometimes/always/never) (Required)
* interpreter_reuse (Optional): {
@@ -812,7 +896,9 @@ public Response getUserDefinedEndpointWithResponse(RequestOptions re
* js_function: String (Optional)
* js_module: String (Optional)
* mode: String(readwrite/readonly/historical) (Optional)
- * openapi: Object (Optional)
+ * openapi (Optional): {
+ * String: BinaryData (Required)
+ * }
* openapi_hidden: Boolean (Optional)
* redirection_strategy: String(none/to_primary/to_backup) (Optional)
* }
@@ -822,12 +908,17 @@ public Response getUserDefinedEndpointWithResponse(RequestOptions re
* }
* }
* }
- * modules: Object (Required)
+ * modules (Required): [
+ * (Required){
+ * module: String (Required)
+ * name: String (Required)
+ * }
+ * ]
* }
* }
*
*
- * @param bundle bundle parameter description.
+ * @param bundle Specify a user defined endpoint.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
@@ -907,7 +998,7 @@ public Response getRuntimeOptionsWithResponse(RequestOptions request
* }
*
*
- * @param jSRuntimeOptions JS runtime options.
+ * @param jsRuntimeOptions JS Runtime options.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
@@ -917,9 +1008,9 @@ public Response getRuntimeOptionsWithResponse(RequestOptions request
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response updateRuntimeOptionsWithResponse(BinaryData jSRuntimeOptions,
+ public Response updateRuntimeOptionsStableWithResponse(BinaryData jsRuntimeOptions,
RequestOptions requestOptions) {
- return this.serviceClient.updateRuntimeOptionsWithResponse(jSRuntimeOptions, requestOptions);
+ return this.serviceClient.updateRuntimeOptionsStableWithResponse(jsRuntimeOptions, requestOptions);
}
/**
@@ -943,7 +1034,7 @@ public Response updateRuntimeOptionsWithResponse(BinaryData jSRuntim
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the response body along with {@link Response}.
+ * @return module definition along with {@link Response}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -1019,7 +1110,9 @@ public Response deleteUserDefinedFunctionWithResponse(String functionId, R
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return a user defined function in the ledger along with {@link Response}.
+ * @return a user defined function.
+ *
+ * Returns the user defined function in the Confidential Ledger along with {@link Response}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -1142,14 +1235,16 @@ public Response executeUserDefinedFunctionWithResponse(String functi
*
*
* {@code
- * [
- * (Required){
- * roleName: String (Optional)
- * roleActions (Optional): [
- * String (Optional)
- * ]
- * }
- * ]
+ * {
+ * role (Required): [
+ * (Required){
+ * roleName: String (Optional)
+ * roleActions (Optional): [
+ * String (Optional)
+ * ]
+ * }
+ * ]
+ * }
* }
*
*
@@ -1159,7 +1254,9 @@ public Response executeUserDefinedFunctionWithResponse(String functi
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return definition for roles along with {@link Response}.
+ * @return role actions for user defined roles
+ *
+ * user defined roles allow users to define and manage app specific AuthZ policy along with {@link Response}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -1175,69 +1272,110 @@ public Response getUserDefinedRoleWithResponse(String roleName, Requ
*
*
* {@code
- * [
- * (Required){
- * roleName: String (Optional)
- * roleActions (Optional): [
- * String (Optional)
- * ]
- * }
- * ]
+ * {
+ * roles (Optional, Required on create): [
+ * (Optional, Required on create){
+ * roleName: String (Optional)
+ * roleActions (Optional): [
+ * String (Optional)
+ * ]
+ * }
+ * ]
+ * }
+ * }
+ *
+ *
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * roles (Optional, Required on create): [
+ * (Optional, Required on create){
+ * roleName: String (Optional)
+ * roleActions (Optional): [
+ * String (Optional)
+ * ]
+ * }
+ * ]
+ * }
* }
*
*
- * @param roles user defined role.
+ * @param body Request body.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the {@link Response}.
+ * @return roles along with {@link Response}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response createUserDefinedRoleWithResponse(BinaryData roles, RequestOptions requestOptions) {
- return this.serviceClient.createUserDefinedRoleWithResponse(roles, requestOptions);
+ public Response createUserDefinedRoleStableWithResponse(BinaryData body,
+ RequestOptions requestOptions) {
+ return this.serviceClient.createUserDefinedRoleStableWithResponse(body, requestOptions);
}
/**
- * Patch replaces the allowed action on existing roles,if the desire is to remove an existing action, the role must
- * be deleted and recreated.
+ * Patch replaces the allowed action on existing roles,if the desire is to remove
+ * an existing action, the role must be deleted and recreated.
*
* User defined roles allow users to define and manage app specific AuthZ policy.
* Request Body Schema
*
*
* {@code
- * [
- * (Required){
- * roleName: String (Optional)
- * roleActions (Optional): [
- * String (Optional)
- * ]
- * }
- * ]
+ * {
+ * roles (Optional, Required on create): [
+ * (Optional, Required on create){
+ * roleName: String (Optional)
+ * roleActions (Optional): [
+ * String (Optional)
+ * ]
+ * }
+ * ]
+ * }
+ * }
+ *
+ *
+ * Response Body Schema
+ *
+ *
+ * {@code
+ * {
+ * roles (Optional, Required on create): [
+ * (Optional, Required on create){
+ * roleName: String (Optional)
+ * roleActions (Optional): [
+ * String (Optional)
+ * ]
+ * }
+ * ]
+ * }
* }
*
*
- * @param roles user defined role.
+ * @param body Request body.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the {@link Response}.
+ * @return roles along with {@link Response}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response updateUserDefinedRoleWithResponse(BinaryData roles, RequestOptions requestOptions) {
- return this.serviceClient.updateUserDefinedRoleWithResponse(roles, requestOptions);
+ public Response updateUserDefinedRoleStableWithResponse(BinaryData body,
+ RequestOptions requestOptions) {
+ return this.serviceClient.updateUserDefinedRoleStableWithResponse(body, requestOptions);
}
/**
* Deletes user defined roles
*
- * A user defined role allows the users to create and manage their own role actions using the API.
+ * A user defined role allows the users to create and manage their own role
+ * actions using the API.
*
* @param roleName user defined role name.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
@@ -1249,7 +1387,953 @@ public Response updateUserDefinedRoleWithResponse(BinaryData roles, Reques
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
- public Response deleteUserDefinedRoleWithResponse(String roleName, RequestOptions requestOptions) {
- return this.serviceClient.deleteUserDefinedRoleWithResponse(roleName, requestOptions);
+ public Response deleteUserDefinedRoleStableWithResponse(String roleName, RequestOptions requestOptions) {
+ return this.serviceClient.deleteUserDefinedRoleStableWithResponse(roleName, requestOptions);
+ }
+
+ /**
+ * Gets the constitution used for governance.
+ *
+ * The constitution is a script that assesses and applies proposals from
+ * consortium members.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the constitution used for governance.
+ *
+ * The constitution is a script that assesses and applies proposals from
+ * consortium members.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Constitution getConstitution() {
+ // Generated convenience method for getConstitutionWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getConstitutionWithResponse(requestOptions).getValue().toObject(Constitution.class);
+ }
+
+ /**
+ * Lists the consortium members.
+ *
+ * Consortium members can manage the Confidential Ledger.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return list of members in the consortium as paginated response with {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listConsortiumMembers() {
+ // Generated convenience method for listConsortiumMembers
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.listConsortiumMembers(requestOptions)
+ .mapPage(bodyItemValue -> bodyItemValue.toObject(ConsortiumMember.class));
+ }
+
+ /**
+ * Gets quotes for all nodes of the Confidential Ledger.
+ *
+ * A quote is an SGX enclave measurement that can be used to verify the validity
+ * of a node and its enclave.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return quotes for all nodes of the Confidential Ledger.
+ *
+ * A quote is an SGX enclave measurement that can be used to verify the validity
+ * of a node and its enclave.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ConfidentialLedgerEnclaves getEnclaveQuotes() {
+ // Generated convenience method for getEnclaveQuotesWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getEnclaveQuotesWithResponse(requestOptions).getValue().toObject(ConfidentialLedgerEnclaves.class);
+ }
+
+ /**
+ * Retrieves a list of collection ids present in the Confidential Ledger
+ *
+ * Collection ids are user-created collections of ledger entries.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paginated collections returned in response to a query as paginated response with {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listCollections() {
+ // Generated convenience method for listCollections
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.listCollections(requestOptions)
+ .mapPage(bodyItemValue -> bodyItemValue.toObject(Collection.class));
+ }
+
+ /**
+ * Gets a list of tags for a collection.
+ *
+ * Retrieves the tags associated with a collection.
+ *
+ * @param collectionId The collection id.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of tags for a collection.
+ *
+ * Retrieves the tags associated with a collection as paginated response with {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listTags(String collectionId) {
+ // Generated convenience method for listTags
+ RequestOptions requestOptions = new RequestOptions();
+ if (collectionId != null) {
+ requestOptions.addQueryParam("collectionId", collectionId, false);
+ }
+ return serviceClient.listTags(requestOptions).mapPage(bodyItemValue -> bodyItemValue.toObject(String.class));
+ }
+
+ /**
+ * Gets a list of tags for a collection.
+ *
+ * Retrieves the tags associated with a collection.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of tags for a collection.
+ *
+ * Retrieves the tags associated with a collection as paginated response with {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listTags() {
+ // Generated convenience method for listTags
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.listTags(requestOptions).mapPage(bodyItemValue -> bodyItemValue.toObject(String.class));
+ }
+
+ /**
+ * Gets ledger entries from a collection corresponding to a range.
+ *
+ * A collection id may optionally be specified. Only entries in the specified (or
+ * default) collection will be returned.
+ *
+ * @param collectionId The collection id.
+ * @param fromTransactionId Specify the first transaction ID in a range.
+ * @param toTransactionId Specify the last transaction ID in a range.
+ * @param tag Single tag.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return ledger entries from a collection corresponding to a range.
+ *
+ * A collection id may optionally be specified as paginated response with {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listLedgerEntries(String collectionId, String fromTransactionId,
+ String toTransactionId, String tag) {
+ // Generated convenience method for listLedgerEntries
+ RequestOptions requestOptions = new RequestOptions();
+ if (collectionId != null) {
+ requestOptions.addQueryParam("collectionId", collectionId, false);
+ }
+ if (fromTransactionId != null) {
+ requestOptions.addQueryParam("fromTransactionId", fromTransactionId, false);
+ }
+ if (toTransactionId != null) {
+ requestOptions.addQueryParam("toTransactionId", toTransactionId, false);
+ }
+ if (tag != null) {
+ requestOptions.addQueryParam("tag", tag, false);
+ }
+ return serviceClient.listLedgerEntries(requestOptions)
+ .mapPage(bodyItemValue -> bodyItemValue.toObject(LedgerEntry.class));
+ }
+
+ /**
+ * Gets ledger entries from a collection corresponding to a range.
+ *
+ * A collection id may optionally be specified. Only entries in the specified (or
+ * default) collection will be returned.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return ledger entries from a collection corresponding to a range.
+ *
+ * A collection id may optionally be specified as paginated response with {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listLedgerEntries() {
+ // Generated convenience method for listLedgerEntries
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.listLedgerEntries(requestOptions)
+ .mapPage(bodyItemValue -> bodyItemValue.toObject(LedgerEntry.class));
+ }
+
+ /**
+ * Writes a ledger entry.
+ *
+ * A collection id may optionally be specified.
+ *
+ * @param entry Ledger entry.
+ * @param collectionId The collection id.
+ * @param tags Comma separated tags.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return returned as a result of a write to the Confidential Ledger, the transaction id
+ * in the response indicates when the write will become durable.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public LedgerWriteResult createLedgerEntry(LedgerEntry entry, String collectionId, String tags) {
+ // Generated convenience method for createLedgerEntryWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ if (collectionId != null) {
+ requestOptions.addQueryParam("collectionId", collectionId, false);
+ }
+ if (tags != null) {
+ requestOptions.addQueryParam("tags", tags, false);
+ }
+ return createLedgerEntryWithResponse(BinaryData.fromObject(entry), requestOptions).getValue()
+ .toObject(LedgerWriteResult.class);
+ }
+
+ /**
+ * Writes a ledger entry.
+ *
+ * A collection id may optionally be specified.
+ *
+ * @param entry Ledger entry.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return returned as a result of a write to the Confidential Ledger, the transaction id
+ * in the response indicates when the write will become durable.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public LedgerWriteResult createLedgerEntry(LedgerEntry entry) {
+ // Generated convenience method for createLedgerEntryWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return createLedgerEntryWithResponse(BinaryData.fromObject(entry), requestOptions).getValue()
+ .toObject(LedgerWriteResult.class);
+ }
+
+ /**
+ * Gets the ledger entry at the specified transaction id. A collection id may
+ * optionally be specified to indicate the collection from which to fetch the
+ * value.
+ *
+ * To return older ledger entries, the relevant sections of the ledger must be
+ * read from disk and validated. To prevent blocking within the enclave, the
+ * response will indicate whether the entry is ready and part of the response, or
+ * if the loading is still ongoing.
+ *
+ * @param transactionId Identifies a write transaction.
+ * @param collectionId The collection id.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the ledger entry at the specified transaction id.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public LedgerQueryResult getLedgerEntry(String transactionId, String collectionId) {
+ // Generated convenience method for getLedgerEntryWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ if (collectionId != null) {
+ requestOptions.addQueryParam("collectionId", collectionId, false);
+ }
+ return getLedgerEntryWithResponse(transactionId, requestOptions).getValue().toObject(LedgerQueryResult.class);
+ }
+
+ /**
+ * Gets the ledger entry at the specified transaction id. A collection id may
+ * optionally be specified to indicate the collection from which to fetch the
+ * value.
+ *
+ * To return older ledger entries, the relevant sections of the ledger must be
+ * read from disk and validated. To prevent blocking within the enclave, the
+ * response will indicate whether the entry is ready and part of the response, or
+ * if the loading is still ongoing.
+ *
+ * @param transactionId Identifies a write transaction.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the ledger entry at the specified transaction id.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public LedgerQueryResult getLedgerEntry(String transactionId) {
+ // Generated convenience method for getLedgerEntryWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getLedgerEntryWithResponse(transactionId, requestOptions).getValue().toObject(LedgerQueryResult.class);
+ }
+
+ /**
+ * Gets a receipt certifying ledger contents at a particular transaction id.
+ *
+ * @param transactionId Identifies a write transaction.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a receipt certifying ledger contents at a particular transaction id.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public TransactionReceipt getReceipt(String transactionId) {
+ // Generated convenience method for getReceiptWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getReceiptWithResponse(transactionId, requestOptions).getValue().toObject(TransactionReceipt.class);
+ }
+
+ /**
+ * Gets the status of an entry identified by a transaction id.
+ *
+ * @param transactionId Identifies a write transaction.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the status of an entry identified by a transaction id.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public TransactionStatus getTransactionStatus(String transactionId) {
+ // Generated convenience method for getTransactionStatusWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getTransactionStatusWithResponse(transactionId, requestOptions).getValue()
+ .toObject(TransactionStatus.class);
+ }
+
+ /**
+ * Gets the current value available in the ledger.
+ *
+ * A collection id may optionally be specified.
+ *
+ * @param collectionId The collection id.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the current value available in the ledger.
+ *
+ * A collection id may optionally be specified.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public LedgerEntry getCurrentLedgerEntry(String collectionId) {
+ // Generated convenience method for getCurrentLedgerEntryWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ if (collectionId != null) {
+ requestOptions.addQueryParam("collectionId", collectionId, false);
+ }
+ return getCurrentLedgerEntryWithResponse(requestOptions).getValue().toObject(LedgerEntry.class);
+ }
+
+ /**
+ * Gets the current value available in the ledger.
+ *
+ * A collection id may optionally be specified.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the current value available in the ledger.
+ *
+ * A collection id may optionally be specified.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public LedgerEntry getCurrentLedgerEntry() {
+ // Generated convenience method for getCurrentLedgerEntryWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getCurrentLedgerEntryWithResponse(requestOptions).getValue().toObject(LedgerEntry.class);
+ }
+
+ /**
+ * Gets details on a list of users.
+ *
+ * All users' object IDs and single role per user will be returned.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return details on a list of users.
+ *
+ * All users' object IDs and single role per user will be returned as paginated response with {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listUsers() {
+ // Generated convenience method for listUsers
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.listUsers(requestOptions)
+ .mapPage(bodyItemValue -> bodyItemValue.toObject(LedgerUser.class));
+ }
+
+ /**
+ * Gets details on a list of users.
+ *
+ * All users' object IDs and multiple roles will be returned.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return details on a list of users.
+ *
+ * All users' object IDs and multiple roles will be returned as paginated response with {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listLedgerUsers() {
+ // Generated convenience method for listLedgerUsers
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.listLedgerUsers(requestOptions)
+ .mapPage(bodyItemValue -> bodyItemValue.toObject(LedgerUserMultipleRoles.class));
+ }
+
+ /**
+ * Deletes a user from the Confidential Ledger.
+ *
+ * @param userId The user id, either an AAD object ID or certificate fingerprint.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void deleteUser(String userId) {
+ // Generated convenience method for deleteUserWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ deleteUserWithResponse(userId, requestOptions).getValue();
+ }
+
+ /**
+ * Gets a user.
+ *
+ * @param userId The user id, either an AAD object ID or certificate fingerprint.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a user.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public LedgerUser getUser(String userId) {
+ // Generated convenience method for getUserWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getUserWithResponse(userId, requestOptions).getValue().toObject(LedgerUser.class);
+ }
+
+ /**
+ * Adds a user or updates a user's fields.
+ *
+ * A JSON merge patch is applied for existing users.
+ *
+ * @param userId The user id, either an AAD object ID or certificate fingerprint.
+ * @param userDetails Details about a Confidential Ledger user.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return details about a Confidential Ledger user.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public LedgerUser createOrUpdateUser(String userId, LedgerUser userDetails) {
+ // Generated convenience method for createOrUpdateUserWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ JsonMergePatchHelper.getLedgerUserAccessor().prepareModelForJsonMergePatch(userDetails, true);
+ BinaryData userDetailsInBinaryData = BinaryData.fromObject(userDetails);
+ // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization.
+ userDetailsInBinaryData.getLength();
+ JsonMergePatchHelper.getLedgerUserAccessor().prepareModelForJsonMergePatch(userDetails, false);
+ return createOrUpdateUserWithResponse(userId, userDetailsInBinaryData, requestOptions).getValue()
+ .toObject(LedgerUser.class);
+ }
+
+ /**
+ * Deletes a user with multiple roles from the Confidential Ledger.
+ *
+ * @param userId The user id, either an AAD object ID or certificate fingerprint.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void deleteLedgerUser(String userId) {
+ // Generated convenience method for deleteLedgerUserWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ deleteLedgerUserWithResponse(userId, requestOptions).getValue();
+ }
+
+ /**
+ * Gets a user with multiple roles.
+ *
+ * @param userId The user id, either an AAD object ID or certificate fingerprint.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a user with multiple roles.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public LedgerUserMultipleRoles getLedgerUser(String userId) {
+ // Generated convenience method for getLedgerUserWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getLedgerUserWithResponse(userId, requestOptions).getValue().toObject(LedgerUserMultipleRoles.class);
+ }
+
+ /**
+ * Adds a user or updates a user's fields.
+ *
+ * A JSON merge patch is applied for existing users.
+ *
+ * @param userId The user id, either an AAD object ID or certificate fingerprint.
+ * @param userMultipleRoles Details about a Confidential Ledger user with multiple roles.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return details about a Confidential Ledger user.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public LedgerUserMultipleRoles createOrUpdateLedgerUser(String userId, LedgerUserMultipleRoles userMultipleRoles) {
+ // Generated convenience method for createOrUpdateLedgerUserWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ JsonMergePatchHelper.getLedgerUserMultipleRolesAccessor()
+ .prepareModelForJsonMergePatch(userMultipleRoles, true);
+ BinaryData userMultipleRolesInBinaryData = BinaryData.fromObject(userMultipleRoles);
+ // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization.
+ userMultipleRolesInBinaryData.getLength();
+ JsonMergePatchHelper.getLedgerUserMultipleRolesAccessor()
+ .prepareModelForJsonMergePatch(userMultipleRoles, false);
+ return createOrUpdateLedgerUserWithResponse(userId, userMultipleRolesInBinaryData, requestOptions).getValue()
+ .toObject(LedgerUserMultipleRoles.class);
+ }
+
+ /**
+ * Gets a user defined endpoint.
+ *
+ * Returns the user defined endpoint in the ACL instance.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a user defined endpoint.
+ *
+ * Returns the user defined endpoint in the ACL instance.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Bundle getUserDefinedEndpoint() {
+ // Generated convenience method for getUserDefinedEndpointWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getUserDefinedEndpointWithResponse(requestOptions).getValue().toObject(Bundle.class);
+ }
+
+ /**
+ * Creates a user defined endpoint.
+ *
+ * Creates the user defined endpoint in the ACL instance.
+ *
+ * @param bundle Specify a user defined endpoint.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void createUserDefinedEndpoint(Bundle bundle) {
+ // Generated convenience method for createUserDefinedEndpointWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ createUserDefinedEndpointWithResponse(BinaryData.fromObject(bundle), requestOptions).getValue();
+ }
+
+ /**
+ * Runtime options for user defined endpoints.
+ *
+ * It returns the runtime options.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return jS runtime options for user defined endpoints and functions.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public JsRuntimeOptions getRuntimeOptions() {
+ // Generated convenience method for getRuntimeOptionsWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getRuntimeOptionsWithResponse(requestOptions).getValue().toObject(JsRuntimeOptions.class);
+ }
+
+ /**
+ * Runtime options for user defined endpoints.
+ *
+ * Updates the runtime options.
+ *
+ * @param jsRuntimeOptions JS Runtime options.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return jS runtime options for user defined endpoints and functions.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public JsRuntimeOptions updateRuntimeOptionsStable(JsRuntimeOptions jsRuntimeOptions) {
+ // Generated convenience method for updateRuntimeOptionsStableWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ JsonMergePatchHelper.getJsRuntimeOptionsAccessor().prepareModelForJsonMergePatch(jsRuntimeOptions, true);
+ BinaryData jsRuntimeOptionsInBinaryData = BinaryData.fromObject(jsRuntimeOptions);
+ // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization.
+ jsRuntimeOptionsInBinaryData.getLength();
+ JsonMergePatchHelper.getJsRuntimeOptionsAccessor().prepareModelForJsonMergePatch(jsRuntimeOptions, false);
+ return updateRuntimeOptionsStableWithResponse(jsRuntimeOptionsInBinaryData, requestOptions).getValue()
+ .toObject(JsRuntimeOptions.class);
+ }
+
+ /**
+ * Module for user defined endpoints.
+ *
+ * It gets the module for the user defined endpoint.
+ *
+ * @param moduleName module name of the user defined endpoint.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return module definition.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ModuleDef getUserDefinedEndpointsModule(String moduleName) {
+ // Generated convenience method for getUserDefinedEndpointsModuleWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getUserDefinedEndpointsModuleWithResponse(moduleName, requestOptions).getValue()
+ .toObject(ModuleDef.class);
+ }
+
+ /**
+ * Retrieves a list of user defined functions present in the Confidential Ledger
+ *
+ * User defined functions stored in the Confidential Ledger.
+ *
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return paginated user defined functions returned in response to a query as paginated response with
+ * {@link PagedIterable}.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listUserDefinedFunctions() {
+ // Generated convenience method for listUserDefinedFunctions
+ RequestOptions requestOptions = new RequestOptions();
+ return serviceClient.listUserDefinedFunctions(requestOptions)
+ .mapPage(bodyItemValue -> bodyItemValue.toObject(UserDefinedFunction.class));
+ }
+
+ /**
+ * Deletes a user defined function from the Confidential Ledger.
+ *
+ * @param functionId Identifies a user defined function.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void deleteUserDefinedFunction(String functionId) {
+ // Generated convenience method for deleteUserDefinedFunctionWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ deleteUserDefinedFunctionWithResponse(functionId, requestOptions).getValue();
+ }
+
+ /**
+ * Gets a user defined function.
+ *
+ * Returns the user defined function in the Confidential Ledger.
+ *
+ * @param functionId Identifies a user defined function.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a user defined function.
+ *
+ * Returns the user defined function in the Confidential Ledger.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public UserDefinedFunction getUserDefinedFunction(String functionId) {
+ // Generated convenience method for getUserDefinedFunctionWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getUserDefinedFunctionWithResponse(functionId, requestOptions).getValue()
+ .toObject(UserDefinedFunction.class);
+ }
+
+ /**
+ * Creates a user defined function.
+ *
+ * Creates the user defined function in the Confidential Ledger.
+ *
+ * @param functionId Identifies a user defined function.
+ * @param userDefinedFunction Specify a user defined function of a Confidential Ledger.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a user defined function in the ledger.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public UserDefinedFunction createUserDefinedFunction(String functionId, UserDefinedFunction userDefinedFunction) {
+ // Generated convenience method for createUserDefinedFunctionWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return createUserDefinedFunctionWithResponse(functionId, BinaryData.fromObject(userDefinedFunction),
+ requestOptions).getValue().toObject(UserDefinedFunction.class);
+ }
+
+ /**
+ * Executes a user defined function.
+ *
+ * Executes the user defined function in the Confidential Ledger.
+ *
+ * @param functionId Identifies a user defined function.
+ * @param userDefinedFunctionExecutionProperties Specify user defined function execution properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the result of a user defined function execution.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public UserDefinedFunctionExecutionResponse executeUserDefinedFunction(String functionId,
+ UserDefinedFunctionExecutionProperties userDefinedFunctionExecutionProperties) {
+ // Generated convenience method for executeUserDefinedFunctionWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ if (userDefinedFunctionExecutionProperties != null) {
+ requestOptions.setBody(BinaryData.fromObject(userDefinedFunctionExecutionProperties));
+ }
+ return executeUserDefinedFunctionWithResponse(functionId, requestOptions).getValue()
+ .toObject(UserDefinedFunctionExecutionResponse.class);
+ }
+
+ /**
+ * Executes a user defined function.
+ *
+ * Executes the user defined function in the Confidential Ledger.
+ *
+ * @param functionId Identifies a user defined function.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the result of a user defined function execution.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public UserDefinedFunctionExecutionResponse executeUserDefinedFunction(String functionId) {
+ // Generated convenience method for executeUserDefinedFunctionWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return executeUserDefinedFunctionWithResponse(functionId, requestOptions).getValue()
+ .toObject(UserDefinedFunctionExecutionResponse.class);
+ }
+
+ /**
+ * Gets role actions for user defined roles
+ *
+ * user defined roles allow users to define and manage app specific AuthZ policy.
+ *
+ * @param roleName user defined role name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return role actions for user defined roles
+ *
+ * user defined roles allow users to define and manage app specific AuthZ policy.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public UserDefinedRole getUserDefinedRole(String roleName) {
+ // Generated convenience method for getUserDefinedRoleWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return getUserDefinedRoleWithResponse(roleName, requestOptions).getValue().toObject(UserDefinedRole.class);
+ }
+
+ /**
+ * Creates new roles and their actions
+ *
+ * User defined roles allow users to define and manage app specific AuthZ policy.
+ *
+ * @param body Request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return roles.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public UserDefinedRoles createUserDefinedRoleStable(UserDefinedRoles body) {
+ // Generated convenience method for createUserDefinedRoleStableWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ return createUserDefinedRoleStableWithResponse(BinaryData.fromObject(body), requestOptions).getValue()
+ .toObject(UserDefinedRoles.class);
+ }
+
+ /**
+ * Patch replaces the allowed action on existing roles,if the desire is to remove
+ * an existing action, the role must be deleted and recreated.
+ *
+ * User defined roles allow users to define and manage app specific AuthZ policy.
+ *
+ * @param body Request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return roles.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public UserDefinedRoles updateUserDefinedRoleStable(UserDefinedRoles body) {
+ // Generated convenience method for updateUserDefinedRoleStableWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ JsonMergePatchHelper.getUserDefinedRolesAccessor().prepareModelForJsonMergePatch(body, true);
+ BinaryData bodyInBinaryData = BinaryData.fromObject(body);
+ // BinaryData.fromObject() will not fire serialization, use getLength() to fire serialization.
+ bodyInBinaryData.getLength();
+ JsonMergePatchHelper.getUserDefinedRolesAccessor().prepareModelForJsonMergePatch(body, false);
+ return updateUserDefinedRoleStableWithResponse(bodyInBinaryData, requestOptions).getValue()
+ .toObject(UserDefinedRoles.class);
+ }
+
+ /**
+ * Deletes user defined roles
+ *
+ * A user defined role allows the users to create and manage their own role
+ * actions using the API.
+ *
+ * @param roleName user defined role name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
+ * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
+ * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @Generated
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void deleteUserDefinedRoleStable(String roleName) {
+ // Generated convenience method for deleteUserDefinedRoleStableWithResponse
+ RequestOptions requestOptions = new RequestOptions();
+ deleteUserDefinedRoleStableWithResponse(roleName, requestOptions).getValue();
}
}
diff --git a/sdk/confidentialledger/azure-security-confidentialledger/src/main/java/com/azure/security/confidentialledger/ConfidentialLedgerClientBuilder.java b/sdk/confidentialledger/azure-security-confidentialledger/src/main/java/com/azure/security/confidentialledger/ConfidentialLedgerClientBuilder.java
index b17d39a26ec3..f6024a7422d0 100644
--- a/sdk/confidentialledger/azure-security-confidentialledger/src/main/java/com/azure/security/confidentialledger/ConfidentialLedgerClientBuilder.java
+++ b/sdk/confidentialledger/azure-security-confidentialledger/src/main/java/com/azure/security/confidentialledger/ConfidentialLedgerClientBuilder.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.security.confidentialledger;
@@ -8,8 +8,6 @@
import com.azure.core.annotation.ServiceClientBuilder;
import com.azure.core.client.traits.ConfigurationTrait;
import com.azure.core.client.traits.HttpTrait;
-import com.azure.core.client.traits.TokenCredentialTrait;
-import com.azure.core.credential.TokenCredential;
import com.azure.core.http.HttpClient;
import com.azure.core.http.HttpHeaders;
import com.azure.core.http.HttpPipeline;
@@ -18,7 +16,6 @@
import com.azure.core.http.policy.AddDatePolicy;
import com.azure.core.http.policy.AddHeadersFromContextPolicy;
import com.azure.core.http.policy.AddHeadersPolicy;
-import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
@@ -43,17 +40,14 @@
* A builder for creating a new instance of the ConfidentialLedgerClient type.
*/
@ServiceClientBuilder(serviceClients = { ConfidentialLedgerClient.class, ConfidentialLedgerAsyncClient.class })
-public final class ConfidentialLedgerClientBuilder implements HttpTrait,
- ConfigurationTrait, TokenCredentialTrait {
+public final class ConfidentialLedgerClientBuilder
+ implements HttpTrait, ConfigurationTrait {
@Generated
private static final String SDK_NAME = "name";
@Generated
private static final String SDK_VERSION = "version";
- @Generated
- private static final String[] DEFAULT_SCOPES = new String[] { "https://confidential-ledger.azure.com/.default" };
-
@Generated
private static final Map PROPERTIES
= CoreUtils.getProperties("azure-security-confidentialledger.properties");
@@ -70,37 +64,37 @@ public ConfidentialLedgerClientBuilder() {
}
/*
- * The HTTP pipeline to send requests through.
+ * The HTTP client used to send the request.
*/
@Generated
- private HttpPipeline pipeline;
+ private HttpClient httpClient;
/**
* {@inheritDoc}.
*/
@Generated
@Override
- public ConfidentialLedgerClientBuilder pipeline(HttpPipeline pipeline) {
- if (this.pipeline != null && pipeline == null) {
- LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured.");
- }
- this.pipeline = pipeline;
+ public ConfidentialLedgerClientBuilder httpClient(HttpClient httpClient) {
+ this.httpClient = httpClient;
return this;
}
/*
- * The HTTP client used to send the request.
+ * The HTTP pipeline to send requests through.
*/
@Generated
- private HttpClient httpClient;
+ private HttpPipeline pipeline;
/**
* {@inheritDoc}.
*/
@Generated
@Override
- public ConfidentialLedgerClientBuilder httpClient(HttpClient httpClient) {
- this.httpClient = httpClient;
+ public ConfidentialLedgerClientBuilder pipeline(HttpPipeline pipeline) {
+ if (this.pipeline != null && pipeline == null) {
+ LOGGER.atInfo().log("HttpPipeline is being set to 'null' when it was previously configured.");
+ }
+ this.pipeline = pipeline;
return this;
}
@@ -180,23 +174,7 @@ public ConfidentialLedgerClientBuilder configuration(Configuration configuration
}
/*
- * The TokenCredential used for authentication.
- */
- @Generated
- private TokenCredential tokenCredential;
-
- /**
- * {@inheritDoc}.
- */
- @Generated
- @Override
- public ConfidentialLedgerClientBuilder credential(TokenCredential tokenCredential) {
- this.tokenCredential = tokenCredential;
- return this;
- }
-
- /*
- * The Confidential Ledger URL, for example https://contoso.confidentialledger.azure.com
+ * The Confidential Ledger URL, for example https://contoso.confidentialledger.azure.com.
*/
@Generated
private String ledgerEndpoint;
@@ -295,10 +273,6 @@ private HttpPipeline createHttpPipeline() {
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy()));
policies.add(new AddDatePolicy());
- if (tokenCredential != null) {
- policies.add(new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPES));
- }
- policies.add(new ConfidentialLedgerRedirectPolicy());
this.pipelinePolicies.stream()
.filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
.forEach(p -> policies.add(p));
diff --git a/sdk/confidentialledger/azure-security-confidentialledger/src/main/java/com/azure/security/confidentialledger/ConfidentialLedgerServiceVersion.java b/sdk/confidentialledger/azure-security-confidentialledger/src/main/java/com/azure/security/confidentialledger/ConfidentialLedgerServiceVersion.java
index b860e60755b0..e341e82f4ecc 100644
--- a/sdk/confidentialledger/azure-security-confidentialledger/src/main/java/com/azure/security/confidentialledger/ConfidentialLedgerServiceVersion.java
+++ b/sdk/confidentialledger/azure-security-confidentialledger/src/main/java/com/azure/security/confidentialledger/ConfidentialLedgerServiceVersion.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.security.confidentialledger;
@@ -11,13 +11,9 @@
*/
public enum ConfidentialLedgerServiceVersion implements ServiceVersion {
/**
- * Enum value 2022-05-13.
+ * Enum value 2026-02-23.
*/
- V2022_05_13("2022-05-13"),
- /**
- * Enum value 2024-12-09-preview.
- */
- V2024_12_09_PREVIEW("2024-12-09-preview");
+ V2026_02_23("2026-02-23");
private final String version;
@@ -39,6 +35,6 @@ public String getVersion() {
* @return The latest {@link ConfidentialLedgerServiceVersion}.
*/
public static ConfidentialLedgerServiceVersion getLatest() {
- return V2024_12_09_PREVIEW;
+ return V2026_02_23;
}
}
diff --git a/sdk/confidentialledger/azure-security-confidentialledger/src/main/java/com/azure/security/confidentialledger/implementation/ConfidentialLedgerClientImpl.java b/sdk/confidentialledger/azure-security-confidentialledger/src/main/java/com/azure/security/confidentialledger/implementation/ConfidentialLedgerClientImpl.java
index 5f0685887f26..2c4140f5816f 100644
--- a/sdk/confidentialledger/azure-security-confidentialledger/src/main/java/com/azure/security/confidentialledger/implementation/ConfidentialLedgerClientImpl.java
+++ b/sdk/confidentialledger/azure-security-confidentialledger/src/main/java/com/azure/security/confidentialledger/implementation/ConfidentialLedgerClientImpl.java
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.security.confidentialledger.implementation;
@@ -158,7 +158,7 @@ public ConfidentialLedgerClientImpl(HttpPipeline httpPipeline, SerializerAdapter
* REST calls.
*/
@Host("{ledgerEndpoint}")
- @ServiceInterface(name = "ConfidentialLedgerCl")
+ @ServiceInterface(name = "ConfidentialLedgerClient")
public interface ConfidentialLedgerClientService {
@Get("/app/governance/constitution")
@ExpectedResponses({ 200 })
@@ -240,6 +240,26 @@ Response listCollectionsSync(@HostParam("ledgerEndpoint") String led
@QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept,
RequestOptions requestOptions, Context context);
+ @Get("/app/collections/tags")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
+ @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
+ @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
+ @UnexpectedResponseExceptionType(HttpResponseException.class)
+ Mono> listTags(@HostParam("ledgerEndpoint") String ledgerEndpoint,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions, Context context);
+
+ @Get("/app/collections/tags")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
+ @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
+ @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
+ @UnexpectedResponseExceptionType(HttpResponseException.class)
+ Response listTagsSync(@HostParam("ledgerEndpoint") String ledgerEndpoint,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions, Context context);
+
@Get("/app/transactions")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
@@ -267,8 +287,9 @@ Response listLedgerEntriesSync(@HostParam("ledgerEndpoint") String l
@UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
@UnexpectedResponseExceptionType(HttpResponseException.class)
Mono> createLedgerEntry(@HostParam("ledgerEndpoint") String ledgerEndpoint,
- @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BinaryData entry,
- @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData entry,
+ RequestOptions requestOptions, Context context);
@Post("/app/transactions")
@ExpectedResponses({ 200 })
@@ -277,8 +298,9 @@ Mono> createLedgerEntry(@HostParam("ledgerEndpoint") String
@UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
@UnexpectedResponseExceptionType(HttpResponseException.class)
Response createLedgerEntrySync(@HostParam("ledgerEndpoint") String ledgerEndpoint,
- @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BinaryData entry,
- @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData entry,
+ RequestOptions requestOptions, Context context);
@Get("/app/transactions/{transactionId}")
@ExpectedResponses({ 200 })
@@ -407,8 +429,8 @@ Response listLedgerUsersSync(@HostParam("ledgerEndpoint") String led
@UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
@UnexpectedResponseExceptionType(HttpResponseException.class)
Mono> deleteUser(@HostParam("ledgerEndpoint") String ledgerEndpoint,
- @QueryParam("api-version") String apiVersion, @PathParam(value = "userId", encoded = true) String userId,
- @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
+ @QueryParam("api-version") String apiVersion, @PathParam("userId") String userId,
+ RequestOptions requestOptions, Context context);
@Delete("/app/users/{userId}")
@ExpectedResponses({ 204 })
@@ -417,8 +439,8 @@ Mono> deleteUser(@HostParam("ledgerEndpoint") String ledgerEndpoi
@UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
@UnexpectedResponseExceptionType(HttpResponseException.class)
Response deleteUserSync(@HostParam("ledgerEndpoint") String ledgerEndpoint,
- @QueryParam("api-version") String apiVersion, @PathParam(value = "userId", encoded = true) String userId,
- @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
+ @QueryParam("api-version") String apiVersion, @PathParam("userId") String userId,
+ RequestOptions requestOptions, Context context);
@Get("/app/users/{userId}")
@ExpectedResponses({ 200 })
@@ -427,7 +449,7 @@ Response deleteUserSync(@HostParam("ledgerEndpoint") String ledgerEndpoint
@UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
@UnexpectedResponseExceptionType(HttpResponseException.class)
Mono> getUser(@HostParam("ledgerEndpoint") String ledgerEndpoint,
- @QueryParam("api-version") String apiVersion, @PathParam(value = "userId", encoded = true) String userId,
+ @QueryParam("api-version") String apiVersion, @PathParam("userId") String userId,
@HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
@Get("/app/users/{userId}")
@@ -437,7 +459,7 @@ Mono> getUser(@HostParam("ledgerEndpoint") String ledgerEnd
@UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
@UnexpectedResponseExceptionType(HttpResponseException.class)
Response getUserSync(@HostParam("ledgerEndpoint") String ledgerEndpoint,
- @QueryParam("api-version") String apiVersion, @PathParam(value = "userId", encoded = true) String userId,
+ @QueryParam("api-version") String apiVersion, @PathParam("userId") String userId,
@HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
@Patch("/app/users/{userId}")
@@ -447,9 +469,10 @@ Response getUserSync(@HostParam("ledgerEndpoint") String ledgerEndpo
@UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
@UnexpectedResponseExceptionType(HttpResponseException.class)
Mono> createOrUpdateUser(@HostParam("ledgerEndpoint") String ledgerEndpoint,
- @QueryParam("api-version") String apiVersion, @PathParam(value = "userId", encoded = true) String userId,
- @BodyParam("application/merge-patch+json") BinaryData userDetails, @HeaderParam("Accept") String accept,
- RequestOptions requestOptions, Context context);
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Content-Type") String contentType,
+ @PathParam("userId") String userId, @HeaderParam("Accept") String accept,
+ @BodyParam("application/merge-patch+json") BinaryData userDetails, RequestOptions requestOptions,
+ Context context);
@Patch("/app/users/{userId}")
@ExpectedResponses({ 200 })
@@ -458,9 +481,10 @@ Mono> createOrUpdateUser(@HostParam("ledgerEndpoint") Strin
@UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
@UnexpectedResponseExceptionType(HttpResponseException.class)
Response createOrUpdateUserSync(@HostParam("ledgerEndpoint") String ledgerEndpoint,
- @QueryParam("api-version") String apiVersion, @PathParam(value = "userId", encoded = true) String userId,
- @BodyParam("application/merge-patch+json") BinaryData userDetails, @HeaderParam("Accept") String accept,
- RequestOptions requestOptions, Context context);
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Content-Type") String contentType,
+ @PathParam("userId") String userId, @HeaderParam("Accept") String accept,
+ @BodyParam("application/merge-patch+json") BinaryData userDetails, RequestOptions requestOptions,
+ Context context);
@Delete("/app/ledgerUsers/{userId}")
@ExpectedResponses({ 204 })
@@ -469,8 +493,8 @@ Response createOrUpdateUserSync(@HostParam("ledgerEndpoint") String
@UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
@UnexpectedResponseExceptionType(HttpResponseException.class)
Mono> deleteLedgerUser(@HostParam("ledgerEndpoint") String ledgerEndpoint,
- @QueryParam("api-version") String apiVersion, @PathParam(value = "userId", encoded = true) String userId,
- @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
+ @QueryParam("api-version") String apiVersion, @PathParam("userId") String userId,
+ RequestOptions requestOptions, Context context);
@Delete("/app/ledgerUsers/{userId}")
@ExpectedResponses({ 204 })
@@ -479,8 +503,8 @@ Mono> deleteLedgerUser(@HostParam("ledgerEndpoint") String ledger
@UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
@UnexpectedResponseExceptionType(HttpResponseException.class)
Response deleteLedgerUserSync(@HostParam("ledgerEndpoint") String ledgerEndpoint,
- @QueryParam("api-version") String apiVersion, @PathParam(value = "userId", encoded = true) String userId,
- @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
+ @QueryParam("api-version") String apiVersion, @PathParam("userId") String userId,
+ RequestOptions requestOptions, Context context);
@Get("/app/ledgerUsers/{userId}")
@ExpectedResponses({ 200 })
@@ -489,7 +513,7 @@ Response deleteLedgerUserSync(@HostParam("ledgerEndpoint") String ledgerEn
@UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
@UnexpectedResponseExceptionType(HttpResponseException.class)
Mono> getLedgerUser(@HostParam("ledgerEndpoint") String ledgerEndpoint,
- @QueryParam("api-version") String apiVersion, @PathParam(value = "userId", encoded = true) String userId,
+ @QueryParam("api-version") String apiVersion, @PathParam("userId") String userId,
@HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
@Get("/app/ledgerUsers/{userId}")
@@ -499,7 +523,7 @@ Mono> getLedgerUser(@HostParam("ledgerEndpoint") String led
@UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
@UnexpectedResponseExceptionType(HttpResponseException.class)
Response getLedgerUserSync(@HostParam("ledgerEndpoint") String ledgerEndpoint,
- @QueryParam("api-version") String apiVersion, @PathParam(value = "userId", encoded = true) String userId,
+ @QueryParam("api-version") String apiVersion, @PathParam("userId") String userId,
@HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
@Patch("/app/ledgerUsers/{userId}")
@@ -509,9 +533,10 @@ Response getLedgerUserSync(@HostParam("ledgerEndpoint") String ledge
@UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
@UnexpectedResponseExceptionType(HttpResponseException.class)
Mono> createOrUpdateLedgerUser(@HostParam("ledgerEndpoint") String ledgerEndpoint,
- @QueryParam("api-version") String apiVersion, @PathParam(value = "userId", encoded = true) String userId,
- @BodyParam("application/merge-patch+json") BinaryData userMultipleRoles,
- @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Content-Type") String contentType,
+ @PathParam("userId") String userId, @HeaderParam("Accept") String accept,
+ @BodyParam("application/merge-patch+json") BinaryData userMultipleRoles, RequestOptions requestOptions,
+ Context context);
@Patch("/app/ledgerUsers/{userId}")
@ExpectedResponses({ 200 })
@@ -520,9 +545,10 @@ Mono> createOrUpdateLedgerUser(@HostParam("ledgerEndpoint")
@UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
@UnexpectedResponseExceptionType(HttpResponseException.class)
Response createOrUpdateLedgerUserSync(@HostParam("ledgerEndpoint") String ledgerEndpoint,
- @QueryParam("api-version") String apiVersion, @PathParam(value = "userId", encoded = true) String userId,
- @BodyParam("application/merge-patch+json") BinaryData userMultipleRoles,
- @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Content-Type") String contentType,
+ @PathParam("userId") String userId, @HeaderParam("Accept") String accept,
+ @BodyParam("application/merge-patch+json") BinaryData userMultipleRoles, RequestOptions requestOptions,
+ Context context);
@Get("/app/userDefinedEndpoints")
@ExpectedResponses({ 200 })
@@ -551,8 +577,8 @@ Response getUserDefinedEndpointSync(@HostParam("ledgerEndpoint") Str
@UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
@UnexpectedResponseExceptionType(HttpResponseException.class)
Mono> createUserDefinedEndpoint(@HostParam("ledgerEndpoint") String ledgerEndpoint,
- @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BinaryData bundle,
- @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Content-Type") String contentType,
+ @BodyParam("application/json") BinaryData bundle, RequestOptions requestOptions, Context context);
@Put("/app/userDefinedEndpoints")
@ExpectedResponses({ 201 })
@@ -561,8 +587,8 @@ Mono> createUserDefinedEndpoint(@HostParam("ledgerEndpoint") Stri
@UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
@UnexpectedResponseExceptionType(HttpResponseException.class)
Response createUserDefinedEndpointSync(@HostParam("ledgerEndpoint") String ledgerEndpoint,
- @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BinaryData bundle,
- @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Content-Type") String contentType,
+ @BodyParam("application/json") BinaryData bundle, RequestOptions requestOptions, Context context);
@Get("/app/userDefinedEndpoints/runtimeOptions")
@ExpectedResponses({ 200 })
@@ -590,9 +616,11 @@ Response getRuntimeOptionsSync(@HostParam("ledgerEndpoint") String l
@UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
@UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
@UnexpectedResponseExceptionType(HttpResponseException.class)
- Mono> updateRuntimeOptions(@HostParam("ledgerEndpoint") String ledgerEndpoint,
- @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BinaryData jSRuntimeOptions,
- @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
+ Mono> updateRuntimeOptionsStable(@HostParam("ledgerEndpoint") String ledgerEndpoint,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept,
+ @BodyParam("application/merge-patch+json") BinaryData jsRuntimeOptions, RequestOptions requestOptions,
+ Context context);
@Patch("/app/userDefinedEndpoints/runtimeOptions")
@ExpectedResponses({ 200 })
@@ -600,9 +628,11 @@ Mono> updateRuntimeOptions(@HostParam("ledgerEndpoint") Str
@UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
@UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
@UnexpectedResponseExceptionType(HttpResponseException.class)
- Response updateRuntimeOptionsSync(@HostParam("ledgerEndpoint") String ledgerEndpoint,
- @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BinaryData jSRuntimeOptions,
- @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
+ Response updateRuntimeOptionsStableSync(@HostParam("ledgerEndpoint") String ledgerEndpoint,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept,
+ @BodyParam("application/merge-patch+json") BinaryData jsRuntimeOptions, RequestOptions requestOptions,
+ Context context);
@Get("/app/userDefinedEndpoints/modules")
@ExpectedResponses({ 200 })
@@ -611,9 +641,8 @@ Response updateRuntimeOptionsSync(@HostParam("ledgerEndpoint") Strin
@UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
@UnexpectedResponseExceptionType(HttpResponseException.class)
Mono> getUserDefinedEndpointsModule(@HostParam("ledgerEndpoint") String ledgerEndpoint,
- @QueryParam("api-version") String apiVersion,
- @QueryParam(value = "module_name", encoded = true) String moduleName, @HeaderParam("Accept") String accept,
- RequestOptions requestOptions, Context context);
+ @QueryParam("api-version") String apiVersion, @QueryParam("module_name") String moduleName,
+ @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
@Get("/app/userDefinedEndpoints/modules")
@ExpectedResponses({ 200 })
@@ -622,9 +651,8 @@ Mono> getUserDefinedEndpointsModule(@HostParam("ledgerEndpo
@UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
@UnexpectedResponseExceptionType(HttpResponseException.class)
Response getUserDefinedEndpointsModuleSync(@HostParam("ledgerEndpoint") String ledgerEndpoint,
- @QueryParam("api-version") String apiVersion,
- @QueryParam(value = "module_name", encoded = true) String moduleName, @HeaderParam("Accept") String accept,
- RequestOptions requestOptions, Context context);
+ @QueryParam("api-version") String apiVersion, @QueryParam("module_name") String moduleName,
+ @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
@Get("/app/userDefinedFunctions")
@ExpectedResponses({ 200 })
@@ -654,7 +682,7 @@ Response listUserDefinedFunctionsSync(@HostParam("ledgerEndpoint") S
@UnexpectedResponseExceptionType(HttpResponseException.class)
Mono> deleteUserDefinedFunction(@HostParam("ledgerEndpoint") String ledgerEndpoint,
@QueryParam("api-version") String apiVersion, @PathParam("functionId") String functionId,
- @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
+ RequestOptions requestOptions, Context context);
@Delete("/app/userDefinedFunctions/{functionId}")
@ExpectedResponses({ 204 })
@@ -664,7 +692,7 @@ Mono> deleteUserDefinedFunction(@HostParam("ledgerEndpoint") Stri
@UnexpectedResponseExceptionType(HttpResponseException.class)
Response deleteUserDefinedFunctionSync(@HostParam("ledgerEndpoint") String ledgerEndpoint,
@QueryParam("api-version") String apiVersion, @PathParam("functionId") String functionId,
- @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
+ RequestOptions requestOptions, Context context);
@Get("/app/userDefinedFunctions/{functionId}")
@ExpectedResponses({ 200 })
@@ -694,8 +722,9 @@ Response getUserDefinedFunctionSync(@HostParam("ledgerEndpoint") Str
@UnexpectedResponseExceptionType(HttpResponseException.class)
Mono> createUserDefinedFunction(@HostParam("ledgerEndpoint") String ledgerEndpoint,
@QueryParam("api-version") String apiVersion, @PathParam("functionId") String functionId,
- @BodyParam("application/json") BinaryData userDefinedFunction, @HeaderParam("Accept") String accept,
- RequestOptions requestOptions, Context context);
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") BinaryData userDefinedFunction, RequestOptions requestOptions,
+ Context context);
@Put("/app/userDefinedFunctions/{functionId}")
@ExpectedResponses({ 200, 201 })
@@ -705,8 +734,9 @@ Mono> createUserDefinedFunction(@HostParam("ledgerEndpoint"
@UnexpectedResponseExceptionType(HttpResponseException.class)
Response createUserDefinedFunctionSync(@HostParam("ledgerEndpoint") String ledgerEndpoint,
@QueryParam("api-version") String apiVersion, @PathParam("functionId") String functionId,
- @BodyParam("application/json") BinaryData userDefinedFunction, @HeaderParam("Accept") String accept,
- RequestOptions requestOptions, Context context);
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") BinaryData userDefinedFunction, RequestOptions requestOptions,
+ Context context);
@Post("/app/userDefinedFunctions/{functionId}:execute")
@ExpectedResponses({ 200 })
@@ -754,9 +784,10 @@ Response getUserDefinedRoleSync(@HostParam("ledgerEndpoint") String
@UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
@UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
@UnexpectedResponseExceptionType(HttpResponseException.class)
- Mono> createUserDefinedRole(@HostParam("ledgerEndpoint") String ledgerEndpoint,
- @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BinaryData roles,
- @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
+ Mono> createUserDefinedRoleStable(@HostParam("ledgerEndpoint") String ledgerEndpoint,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body,
+ RequestOptions requestOptions, Context context);
@Put("/app/roles")
@ExpectedResponses({ 200 })
@@ -764,9 +795,10 @@ Mono> createUserDefinedRole(@HostParam("ledgerEndpoint") String l
@UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
@UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
@UnexpectedResponseExceptionType(HttpResponseException.class)
- Response createUserDefinedRoleSync(@HostParam("ledgerEndpoint") String ledgerEndpoint,
- @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BinaryData roles,
- @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
+ Response createUserDefinedRoleStableSync(@HostParam("ledgerEndpoint") String ledgerEndpoint,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") BinaryData body,
+ RequestOptions requestOptions, Context context);
@Patch("/app/roles")
@ExpectedResponses({ 200 })
@@ -774,9 +806,10 @@ Response createUserDefinedRoleSync(@HostParam("ledgerEndpoint") String led
@UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
@UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
@UnexpectedResponseExceptionType(HttpResponseException.class)
- Mono> updateUserDefinedRole(@HostParam("ledgerEndpoint") String ledgerEndpoint,
- @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BinaryData roles,
- @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
+ Mono> updateUserDefinedRoleStable(@HostParam("ledgerEndpoint") String ledgerEndpoint,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/merge-patch+json") BinaryData body,
+ RequestOptions requestOptions, Context context);
@Patch("/app/roles")
@ExpectedResponses({ 200 })
@@ -784,29 +817,30 @@ Mono> updateUserDefinedRole(@HostParam("ledgerEndpoint") String l
@UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
@UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
@UnexpectedResponseExceptionType(HttpResponseException.class)
- Response updateUserDefinedRoleSync(@HostParam("ledgerEndpoint") String ledgerEndpoint,
- @QueryParam("api-version") String apiVersion, @BodyParam("application/json") BinaryData roles,
- @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
+ Response updateUserDefinedRoleStableSync(@HostParam("ledgerEndpoint") String ledgerEndpoint,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/merge-patch+json") BinaryData body,
+ RequestOptions requestOptions, Context context);
@Delete("/app/roles")
- @ExpectedResponses({ 200 })
+ @ExpectedResponses({ 204 })
@UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
@UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
@UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
@UnexpectedResponseExceptionType(HttpResponseException.class)
- Mono> deleteUserDefinedRole(@HostParam("ledgerEndpoint") String ledgerEndpoint,
+ Mono> deleteUserDefinedRoleStable(@HostParam("ledgerEndpoint") String ledgerEndpoint,
@QueryParam("api-version") String apiVersion, @QueryParam("roleName") String roleName,
- @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
+ RequestOptions requestOptions, Context context);
@Delete("/app/roles")
- @ExpectedResponses({ 200 })
+ @ExpectedResponses({ 204 })
@UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
@UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
@UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
@UnexpectedResponseExceptionType(HttpResponseException.class)
- Response deleteUserDefinedRoleSync(@HostParam("ledgerEndpoint") String ledgerEndpoint,
+ Response deleteUserDefinedRoleStableSync(@HostParam("ledgerEndpoint") String ledgerEndpoint,
@QueryParam("api-version") String apiVersion, @QueryParam("roleName") String roleName,
- @HeaderParam("Accept") String accept, RequestOptions requestOptions, Context context);
+ RequestOptions requestOptions, Context context);
@Get("{nextLink}")
@ExpectedResponses({ 200 })
@@ -850,6 +884,26 @@ Response listCollectionsNextSync(@PathParam(value = "nextLink", enco
@HostParam("ledgerEndpoint") String ledgerEndpoint, @HeaderParam("Accept") String accept,
RequestOptions requestOptions, Context context);
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
+ @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
+ @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
+ @UnexpectedResponseExceptionType(HttpResponseException.class)
+ Mono> listTagsNext(@PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("ledgerEndpoint") String ledgerEndpoint, @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions, Context context);
+
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
+ @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 })
+ @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 })
+ @UnexpectedResponseExceptionType(HttpResponseException.class)
+ Response listTagsNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("ledgerEndpoint") String ledgerEndpoint, @HeaderParam("Accept") String accept,
+ RequestOptions requestOptions, Context context);
+
@Get("{nextLink}")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 })
@@ -936,7 +990,8 @@ Response listUserDefinedFunctionsNextSync(
/**
* Gets the constitution used for governance.
*
- * The constitution is a script that assesses and applies proposals from consortium members.
+ * The constitution is a script that assesses and applies proposals from
+ * consortium members.
* Response Body Schema
*
*
@@ -953,8 +1008,10 @@ Response listUserDefinedFunctionsNextSync(
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the governance script for the application along with {@link Response} on successful completion of
- * {@link Mono}.
+ * @return the constitution used for governance.
+ *
+ * The constitution is a script that assesses and applies proposals from
+ * consortium members along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono> getConstitutionWithResponseAsync(RequestOptions requestOptions) {
@@ -966,7 +1023,8 @@ public Mono> getConstitutionWithResponseAsync(RequestOption
/**
* Gets the constitution used for governance.
*
- * The constitution is a script that assesses and applies proposals from consortium members.
+ * The constitution is a script that assesses and applies proposals from
+ * consortium members.
* Response Body Schema
*
*
@@ -983,7 +1041,10 @@ public Mono> getConstitutionWithResponseAsync(RequestOption
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return the governance script for the application along with {@link Response}.
+ * @return the constitution used for governance.
+ *
+ * The constitution is a script that assesses and applies proposals from
+ * consortium members along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getConstitutionWithResponse(RequestOptions requestOptions) {
@@ -1121,7 +1182,8 @@ public PagedIterable listConsortiumMembers(RequestOptions requestOpt
/**
* Gets quotes for all nodes of the Confidential Ledger.
*
- * A quote is an SGX enclave measurement that can be used to verify the validity of a node and its enclave.
+ * A quote is an SGX enclave measurement that can be used to verify the validity
+ * of a node and its enclave.
* Response Body Schema
*
*
@@ -1145,8 +1207,10 @@ public PagedIterable listConsortiumMembers(RequestOptions requestOpt
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return information about the enclaves running the Confidential Ledger along with {@link Response} on successful
- * completion of {@link Mono}.
+ * @return quotes for all nodes of the Confidential Ledger.
+ *
+ * A quote is an SGX enclave measurement that can be used to verify the validity
+ * of a node and its enclave along with {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono> getEnclaveQuotesWithResponseAsync(RequestOptions requestOptions) {
@@ -1158,7 +1222,8 @@ public Mono> getEnclaveQuotesWithResponseAsync(RequestOptio
/**
* Gets quotes for all nodes of the Confidential Ledger.
*
- * A quote is an SGX enclave measurement that can be used to verify the validity of a node and its enclave.
+ * A quote is an SGX enclave measurement that can be used to verify the validity
+ * of a node and its enclave.
* Response Body Schema
*
*
@@ -1182,7 +1247,10 @@ public Mono> getEnclaveQuotesWithResponseAsync(RequestOptio
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
- * @return information about the enclaves running the Confidential Ledger along with {@link Response}.
+ * @return quotes for all nodes of the Confidential Ledger.
+ *
+ * A quote is an SGX enclave measurement that can be used to verify the validity
+ * of a node and its enclave along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getEnclaveQuotesWithResponse(RequestOptions requestOptions) {
@@ -1313,11 +1381,161 @@ public PagedIterable listCollections(RequestOptions requestOptions)
nextLink -> listCollectionsNextSinglePage(nextLink, requestOptionsForNextPage));
}
+ /**
+ * Gets a list of tags for a collection.
+ *
+ * Retrieves the tags associated with a collection.
+ *