diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index f23b343f3b92..113f19eec3b0 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -256,6 +256,7 @@ com.azure.spring:spring-cloud-azure-stream-binder-servicebus-core;5.22.0;5.23.0- com.azure.spring:spring-cloud-azure-stream-binder-servicebus;5.22.0;5.23.0-beta.1 com.azure.spring:spring-cloud-azure-testcontainers;5.22.0;5.23.0-beta.1 com.azure:azure-spring-data-cosmos;5.22.0;5.23.0-beta.1 +com.azure:azure-security-codetransparency;1.0.0-beta.1;1.0.0-beta.1 com.azure.resourcemanager:azure-resourcemanager;2.50.0;2.51.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-appplatform;2.50.0;2.51.0-beta.1 com.azure.resourcemanager:azure-resourcemanager-appservice;2.50.0;2.51.0-beta.1 diff --git a/sdk/confidentialledger/azure-security-codetransparency/CHANGELOG.md b/sdk/confidentialledger/azure-security-codetransparency/CHANGELOG.md new file mode 100644 index 000000000000..078c902c5359 --- /dev/null +++ b/sdk/confidentialledger/azure-security-codetransparency/CHANGELOG.md @@ -0,0 +1,16 @@ +# Release History + +## 1.0.0-beta.1 (Unreleased) + +- Azure CodeTransparency client library for Java. This package contains Microsoft Azure CodeTransparency client library. + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes +### Features Added + +- Initial release for the azure-security-codetransparency Java SDK. diff --git a/sdk/confidentialledger/azure-security-codetransparency/README.md b/sdk/confidentialledger/azure-security-codetransparency/README.md new file mode 100644 index 000000000000..a4cf12d66279 --- /dev/null +++ b/sdk/confidentialledger/azure-security-codetransparency/README.md @@ -0,0 +1,78 @@ +# Azure CodeTransparency client library for Java + +Azure CodeTransparency client library for Java. + +This package contains Microsoft Azure CodeTransparency client library. + +## Documentation + +Various documentation is available to help you get started + +- [API reference documentation][docs] +- [Product documentation][product_documentation] + +## Getting started + +### Prerequisites + +- [Java Development Kit (JDK)][jdk] with version 8 or above +- [Azure Subscription][azure_subscription] + +### Adding the package to your product + +[//]: # ({x-version-update-start;com.azure:azure-security-codetransparency;current}) +```xml + + com.azure + azure-security-codetransparency + 1.0.0-beta.1 + +``` +[//]: # ({x-version-update-end}) + +### Authentication + +[Azure Identity][azure_identity] package provides the default implementation for authenticating the client. + +## Key concepts + +## Examples + +```java com.azure.security.codetransparency.readme +``` + +### Service API versions + +The client library targets the latest service API version by default. +The service client builder accepts an optional service API version parameter to specify which API version to communicate. + +#### Select a service API version + +You have the flexibility to explicitly select a supported service API version when initializing a service client via the service client builder. +This ensures that the client can communicate with services using the specified API version. + +When selecting an API version, it is important to verify that there are no breaking changes compared to the latest API version. +If there are significant differences, API calls may fail due to incompatibility. + +Always ensure that the chosen API version is fully supported and operational for your specific use case and that it aligns with the service's versioning policy. + +## Troubleshooting + +## Next steps + +## Contributing + +For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md). + +1. Fork it +1. Create your feature branch (`git checkout -b my-new-feature`) +1. Commit your changes (`git commit -am 'Add some feature'`) +1. Push to the branch (`git push origin my-new-feature`) +1. Create new Pull Request + + +[product_documentation]: https://azure.microsoft.com/services/ +[docs]: https://azure.github.io/azure-sdk-for-java/ +[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/ +[azure_subscription]: https://azure.microsoft.com/free/ +[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity diff --git a/sdk/confidentialledger/azure-security-codetransparency/assets.json b/sdk/confidentialledger/azure-security-codetransparency/assets.json new file mode 100644 index 000000000000..a424f02b1b89 --- /dev/null +++ b/sdk/confidentialledger/azure-security-codetransparency/assets.json @@ -0,0 +1 @@ +{"AssetsRepo":"Azure/azure-sdk-assets","AssetsRepoPrefixPath":"java","TagPrefix":"java/confidentialledger/azure-security-codetransparency","Tag":""} \ No newline at end of file diff --git a/sdk/confidentialledger/azure-security-codetransparency/pom.xml b/sdk/confidentialledger/azure-security-codetransparency/pom.xml new file mode 100644 index 000000000000..727c513fbef9 --- /dev/null +++ b/sdk/confidentialledger/azure-security-codetransparency/pom.xml @@ -0,0 +1,71 @@ + + + 4.0.0 + + com.azure + azure-client-sdk-parent + 1.7.0 + ../../parents/azure-client-sdk-parent + + + com.azure + azure-security-codetransparency + 1.0.0-beta.1 + jar + + Microsoft Azure SDK for CodeTransparency + This package contains Microsoft Azure CodeTransparency client library. + https://github.com/Azure/azure-sdk-for-java + + + + The MIT License (MIT) + http://opensource.org/licenses/MIT + repo + + + + + https://github.com/Azure/azure-sdk-for-java + scm:git:git@github.com:Azure/azure-sdk-for-java.git + scm:git:git@github.com:Azure/azure-sdk-for-java.git + HEAD + + + + microsoft + Microsoft + + + + UTF-8 + + + + com.azure + azure-core + 1.55.3 + + + com.azure + azure-core-http-netty + 1.15.11 + + + com.azure + azure-core-test + 1.27.0-beta.8 + test + + + com.azure + azure-identity + 1.16.0 + test + + + diff --git a/sdk/confidentialledger/azure-security-codetransparency/src/main/java/com/azure/security/codetransparency/CodeTransparencyAsyncClient.java b/sdk/confidentialledger/azure-security-codetransparency/src/main/java/com/azure/security/codetransparency/CodeTransparencyAsyncClient.java new file mode 100644 index 000000000000..da7859e07d16 --- /dev/null +++ b/sdk/confidentialledger/azure-security-codetransparency/src/main/java/com/azure/security/codetransparency/CodeTransparencyAsyncClient.java @@ -0,0 +1,331 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.security.codetransparency; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.core.util.FluxUtil; +import com.azure.security.codetransparency.implementation.CodeTransparencyClientImpl; +import com.azure.security.codetransparency.models.JwksDocument; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the asynchronous CodeTransparencyClient type. + */ +@ServiceClient(builder = CodeTransparencyClientBuilder.class, isAsync = true) +public final class CodeTransparencyAsyncClient { + @Generated + private final CodeTransparencyClientImpl serviceClient; + + /** + * Initializes an instance of CodeTransparencyAsyncClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + CodeTransparencyAsyncClient(CodeTransparencyClientImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Get the transparency service configuration, mandatory in IETF SCITT draft. + *

Response Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + * @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 transparency service configuration, mandatory in IETF SCITT draft along with {@link Response} on + * successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getTransparencyConfigCborWithResponse(RequestOptions requestOptions) { + return this.serviceClient.getTransparencyConfigCborWithResponseAsync(requestOptions); + } + + /** + * Get the public keys used by the service to sign receipts, mentioned in IETF SCITT draft as part of jwks_uri + * implementation. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     keys (Required): [
+     *          (Required){
+     *             alg: String (Optional)
+     *             crv: String (Optional)
+     *             d: String (Optional)
+     *             dp: String (Optional)
+     *             dq: String (Optional)
+     *             e: String (Optional)
+     *             k: String (Optional)
+     *             kid: String (Optional)
+     *             kty: String (Required)
+     *             n: String (Optional)
+     *             p: String (Optional)
+     *             q: String (Optional)
+     *             qi: String (Optional)
+     *             use: String (Optional)
+     *             x: String (Optional)
+     *             x5c (Optional): [
+     *                 String (Optional)
+     *             ]
+     *             y: String (Optional)
+     *         }
+     *     ]
+     * }
+     * }
+     * 
+ * + * @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 ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the public keys used by the service to sign receipts, mentioned in IETF SCITT draft as part of jwks_uri + * implementation along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getPublicKeysWithResponse(RequestOptions requestOptions) { + return this.serviceClient.getPublicKeysWithResponseAsync(requestOptions); + } + + /** + * Post an entry to be registered on the CodeTransparency instance, mandatory in IETF SCITT draft. + *

Request Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + * @param body CoseSign1 signature envelope. + * @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 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}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createEntryWithResponse(BinaryData body, RequestOptions requestOptions) { + return this.serviceClient.createEntryWithResponseAsync(body, requestOptions); + } + + /** + * Get status of the long running registration operation, mandatory in IETF SCITT draft. + *

Response Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + * @param operationId ID of the operation to retrieve. + * @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 ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return status of the long running registration operation, mandatory in IETF SCITT draft along with + * {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getOperationWithResponse(String operationId, RequestOptions requestOptions) { + return this.serviceClient.getOperationWithResponseAsync(operationId, requestOptions); + } + + /** + * Get receipt. + *

Response Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + * @param entryId ID of the entry to retrieve. + * @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 ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return receipt along with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getEntryWithResponse(String entryId, RequestOptions requestOptions) { + return this.serviceClient.getEntryWithResponseAsync(entryId, requestOptions); + } + + /** + * Get the transparent statement consisting of the signed statement and the receipt embedded in the header. + *

Response Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + * @param entryId ID of the entry to retrieve. + * @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 ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the transparent statement consisting of the signed statement and the receipt embedded in the header along + * with {@link Response} on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getEntryStatementWithResponse(String entryId, RequestOptions requestOptions) { + return this.serviceClient.getEntryStatementWithResponseAsync(entryId, requestOptions); + } + + /** + * Get the transparency service configuration, mandatory in IETF SCITT draft. + * + * @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 transparency service configuration, mandatory in IETF SCITT draft on successful completion of + * {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getTransparencyConfigCbor() { + // Generated convenience method for getTransparencyConfigCborWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getTransparencyConfigCborWithResponse(requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Get the public keys used by the service to sign receipts, mentioned in IETF SCITT draft as part of jwks_uri + * implementation. + * + * @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 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 public keys used by the service to sign receipts, mentioned in IETF SCITT draft as part of jwks_uri + * implementation on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getPublicKeys() { + // Generated convenience method for getPublicKeysWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getPublicKeysWithResponse(requestOptions).flatMap(FluxUtil::toMono) + .map(protocolMethodData -> protocolMethodData.toObject(JwksDocument.class)); + } + + /** + * Post an entry to be registered on the CodeTransparency instance, mandatory in IETF SCITT draft. + * + * @param body CoseSign1 signature envelope. + * @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 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 response body on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono createEntry(BinaryData body) { + // Generated convenience method for createEntryWithResponse + RequestOptions requestOptions = new RequestOptions(); + return createEntryWithResponse(body, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Get status of the long running registration operation, mandatory in IETF SCITT draft. + * + * @param operationId ID of the operation to retrieve. + * @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 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 status of the long running registration operation, mandatory in IETF SCITT draft on successful completion + * of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getOperation(String operationId) { + // Generated convenience method for getOperationWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getOperationWithResponse(operationId, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Get receipt. + * + * @param entryId ID of the entry to retrieve. + * @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 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 receipt on successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getEntry(String entryId) { + // Generated convenience method for getEntryWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getEntryWithResponse(entryId, requestOptions).flatMap(FluxUtil::toMono); + } + + /** + * Get the transparent statement consisting of the signed statement and the receipt embedded in the header. + * + * @param entryId ID of the entry to retrieve. + * @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 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 transparent statement consisting of the signed statement and the receipt embedded in the header on + * successful completion of {@link Mono}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono getEntryStatement(String entryId) { + // Generated convenience method for getEntryStatementWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getEntryStatementWithResponse(entryId, requestOptions).flatMap(FluxUtil::toMono); + } +} diff --git a/sdk/confidentialledger/azure-security-codetransparency/src/main/java/com/azure/security/codetransparency/CodeTransparencyClient.java b/sdk/confidentialledger/azure-security-codetransparency/src/main/java/com/azure/security/codetransparency/CodeTransparencyClient.java new file mode 100644 index 000000000000..1376a5e0f0f1 --- /dev/null +++ b/sdk/confidentialledger/azure-security-codetransparency/src/main/java/com/azure/security/codetransparency/CodeTransparencyClient.java @@ -0,0 +1,324 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.security.codetransparency; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceClient; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.util.BinaryData; +import com.azure.security.codetransparency.implementation.CodeTransparencyClientImpl; +import com.azure.security.codetransparency.models.JwksDocument; + +/** + * Initializes a new instance of the synchronous CodeTransparencyClient type. + */ +@ServiceClient(builder = CodeTransparencyClientBuilder.class) +public final class CodeTransparencyClient { + @Generated + private final CodeTransparencyClientImpl serviceClient; + + /** + * Initializes an instance of CodeTransparencyClient class. + * + * @param serviceClient the service client implementation. + */ + @Generated + CodeTransparencyClient(CodeTransparencyClientImpl serviceClient) { + this.serviceClient = serviceClient; + } + + /** + * Get the transparency service configuration, mandatory in IETF SCITT draft. + *

Response Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + * @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 transparency service configuration, mandatory in IETF SCITT draft along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getTransparencyConfigCborWithResponse(RequestOptions requestOptions) { + return this.serviceClient.getTransparencyConfigCborWithResponse(requestOptions); + } + + /** + * Get the public keys used by the service to sign receipts, mentioned in IETF SCITT draft as part of jwks_uri + * implementation. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     keys (Required): [
+     *          (Required){
+     *             alg: String (Optional)
+     *             crv: String (Optional)
+     *             d: String (Optional)
+     *             dp: String (Optional)
+     *             dq: String (Optional)
+     *             e: String (Optional)
+     *             k: String (Optional)
+     *             kid: String (Optional)
+     *             kty: String (Required)
+     *             n: String (Optional)
+     *             p: String (Optional)
+     *             q: String (Optional)
+     *             qi: String (Optional)
+     *             use: String (Optional)
+     *             x: String (Optional)
+     *             x5c (Optional): [
+     *                 String (Optional)
+     *             ]
+     *             y: String (Optional)
+     *         }
+     *     ]
+     * }
+     * }
+     * 
+ * + * @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 ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the public keys used by the service to sign receipts, mentioned in IETF SCITT draft as part of jwks_uri + * implementation along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getPublicKeysWithResponse(RequestOptions requestOptions) { + return this.serviceClient.getPublicKeysWithResponse(requestOptions); + } + + /** + * Post an entry to be registered on the CodeTransparency instance, mandatory in IETF SCITT draft. + *

Request Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + * @param body CoseSign1 signature envelope. + * @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 ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createEntryWithResponse(BinaryData body, RequestOptions requestOptions) { + return this.serviceClient.createEntryWithResponse(body, requestOptions); + } + + /** + * Get status of the long running registration operation, mandatory in IETF SCITT draft. + *

Response Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + * @param operationId ID of the operation to retrieve. + * @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 ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return status of the long running registration operation, mandatory in IETF SCITT draft along with + * {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getOperationWithResponse(String operationId, RequestOptions requestOptions) { + return this.serviceClient.getOperationWithResponse(operationId, requestOptions); + } + + /** + * Get receipt. + *

Response Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + * @param entryId ID of the entry to retrieve. + * @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 ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return receipt along with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getEntryWithResponse(String entryId, RequestOptions requestOptions) { + return this.serviceClient.getEntryWithResponse(entryId, requestOptions); + } + + /** + * Get the transparent statement consisting of the signed statement and the receipt embedded in the header. + *

Response Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + * @param entryId ID of the entry to retrieve. + * @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 ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the transparent statement consisting of the signed statement and the receipt embedded in the header along + * with {@link Response}. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getEntryStatementWithResponse(String entryId, RequestOptions requestOptions) { + return this.serviceClient.getEntryStatementWithResponse(entryId, requestOptions); + } + + /** + * Get the transparency service configuration, mandatory in IETF SCITT draft. + * + * @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 transparency service configuration, mandatory in IETF SCITT draft. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public BinaryData getTransparencyConfigCbor() { + // Generated convenience method for getTransparencyConfigCborWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getTransparencyConfigCborWithResponse(requestOptions).getValue(); + } + + /** + * Get the public keys used by the service to sign receipts, mentioned in IETF SCITT draft as part of jwks_uri + * implementation. + * + * @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 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 public keys used by the service to sign receipts, mentioned in IETF SCITT draft as part of jwks_uri + * implementation. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public JwksDocument getPublicKeys() { + // Generated convenience method for getPublicKeysWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getPublicKeysWithResponse(requestOptions).getValue().toObject(JwksDocument.class); + } + + /** + * Post an entry to be registered on the CodeTransparency instance, mandatory in IETF SCITT draft. + * + * @param body CoseSign1 signature envelope. + * @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 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 response. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public BinaryData createEntry(BinaryData body) { + // Generated convenience method for createEntryWithResponse + RequestOptions requestOptions = new RequestOptions(); + return createEntryWithResponse(body, requestOptions).getValue(); + } + + /** + * Get status of the long running registration operation, mandatory in IETF SCITT draft. + * + * @param operationId ID of the operation to retrieve. + * @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 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 status of the long running registration operation, mandatory in IETF SCITT draft. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public BinaryData getOperation(String operationId) { + // Generated convenience method for getOperationWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getOperationWithResponse(operationId, requestOptions).getValue(); + } + + /** + * Get receipt. + * + * @param entryId ID of the entry to retrieve. + * @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 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 receipt. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public BinaryData getEntry(String entryId) { + // Generated convenience method for getEntryWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getEntryWithResponse(entryId, requestOptions).getValue(); + } + + /** + * Get the transparent statement consisting of the signed statement and the receipt embedded in the header. + * + * @param entryId ID of the entry to retrieve. + * @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 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 transparent statement consisting of the signed statement and the receipt embedded in the header. + */ + @Generated + @ServiceMethod(returns = ReturnType.SINGLE) + public BinaryData getEntryStatement(String entryId) { + // Generated convenience method for getEntryStatementWithResponse + RequestOptions requestOptions = new RequestOptions(); + return getEntryStatementWithResponse(entryId, requestOptions).getValue(); + } +} diff --git a/sdk/confidentialledger/azure-security-codetransparency/src/main/java/com/azure/security/codetransparency/CodeTransparencyClientBuilder.java b/sdk/confidentialledger/azure-security-codetransparency/src/main/java/com/azure/security/codetransparency/CodeTransparencyClientBuilder.java new file mode 100644 index 000000000000..f0fa4cdf8a4f --- /dev/null +++ b/sdk/confidentialledger/azure-security-codetransparency/src/main/java/com/azure/security/codetransparency/CodeTransparencyClientBuilder.java @@ -0,0 +1,331 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.security.codetransparency; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.ServiceClientBuilder; +import com.azure.core.client.traits.ConfigurationTrait; +import com.azure.core.client.traits.EndpointTrait; +import com.azure.core.client.traits.HttpTrait; +import com.azure.core.client.traits.KeyCredentialTrait; +import com.azure.core.credential.KeyCredential; +import com.azure.core.http.HttpClient; +import com.azure.core.http.HttpHeaders; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.HttpPipelinePosition; +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.HttpLogOptions; +import com.azure.core.http.policy.HttpLoggingPolicy; +import com.azure.core.http.policy.HttpPipelinePolicy; +import com.azure.core.http.policy.HttpPolicyProviders; +import com.azure.core.http.policy.KeyCredentialPolicy; +import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.util.ClientOptions; +import com.azure.core.util.Configuration; +import com.azure.core.util.CoreUtils; +import com.azure.core.util.builder.ClientBuilderUtil; +import com.azure.core.util.logging.ClientLogger; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.security.codetransparency.implementation.CodeTransparencyClientImpl; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * A builder for creating a new instance of the CodeTransparencyClient type. + */ +@ServiceClientBuilder(serviceClients = { CodeTransparencyClient.class, CodeTransparencyAsyncClient.class }) +public final class CodeTransparencyClientBuilder + implements HttpTrait, ConfigurationTrait, + KeyCredentialTrait, EndpointTrait { + @Generated + private static final String SDK_NAME = "name"; + + @Generated + private static final String SDK_VERSION = "version"; + + @Generated + private static final Map PROPERTIES + = CoreUtils.getProperties("azure-security-codetransparency.properties"); + + @Generated + private final List pipelinePolicies; + + /** + * Create an instance of the CodeTransparencyClientBuilder. + */ + @Generated + public CodeTransparencyClientBuilder() { + this.pipelinePolicies = new ArrayList<>(); + } + + /* + * The HTTP client used to send the request. + */ + @Generated + private HttpClient httpClient; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public CodeTransparencyClientBuilder httpClient(HttpClient httpClient) { + this.httpClient = httpClient; + return this; + } + + /* + * The HTTP pipeline to send requests through. + */ + @Generated + private HttpPipeline pipeline; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public CodeTransparencyClientBuilder 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; + } + + /* + * The logging configuration for HTTP requests and responses. + */ + @Generated + private HttpLogOptions httpLogOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public CodeTransparencyClientBuilder httpLogOptions(HttpLogOptions httpLogOptions) { + this.httpLogOptions = httpLogOptions; + return this; + } + + /* + * The client options such as application ID and custom headers to set on a request. + */ + @Generated + private ClientOptions clientOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public CodeTransparencyClientBuilder clientOptions(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + return this; + } + + /* + * The retry options to configure retry policy for failed requests. + */ + @Generated + private RetryOptions retryOptions; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public CodeTransparencyClientBuilder retryOptions(RetryOptions retryOptions) { + this.retryOptions = retryOptions; + return this; + } + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public CodeTransparencyClientBuilder addPolicy(HttpPipelinePolicy customPolicy) { + Objects.requireNonNull(customPolicy, "'customPolicy' cannot be null."); + pipelinePolicies.add(customPolicy); + return this; + } + + /* + * The configuration store that is used during construction of the service client. + */ + @Generated + private Configuration configuration; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public CodeTransparencyClientBuilder configuration(Configuration configuration) { + this.configuration = configuration; + return this; + } + + /* + * The KeyCredential used for authentication. + */ + @Generated + private KeyCredential keyCredential; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public CodeTransparencyClientBuilder credential(KeyCredential keyCredential) { + this.keyCredential = keyCredential; + return this; + } + + /* + * The service endpoint + */ + @Generated + private String endpoint; + + /** + * {@inheritDoc}. + */ + @Generated + @Override + public CodeTransparencyClientBuilder endpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /* + * Service version + */ + @Generated + private CodeTransparencyServiceVersion serviceVersion; + + /** + * Sets Service version. + * + * @param serviceVersion the serviceVersion value. + * @return the CodeTransparencyClientBuilder. + */ + @Generated + public CodeTransparencyClientBuilder serviceVersion(CodeTransparencyServiceVersion serviceVersion) { + this.serviceVersion = serviceVersion; + return this; + } + + /* + * The retry policy that will attempt to retry failed requests, if applicable. + */ + @Generated + private RetryPolicy retryPolicy; + + /** + * Sets The retry policy that will attempt to retry failed requests, if applicable. + * + * @param retryPolicy the retryPolicy value. + * @return the CodeTransparencyClientBuilder. + */ + @Generated + public CodeTransparencyClientBuilder retryPolicy(RetryPolicy retryPolicy) { + this.retryPolicy = retryPolicy; + return this; + } + + /** + * Builds an instance of CodeTransparencyClientImpl with the provided parameters. + * + * @return an instance of CodeTransparencyClientImpl. + */ + @Generated + private CodeTransparencyClientImpl buildInnerClient() { + this.validateClient(); + HttpPipeline localPipeline = (pipeline != null) ? pipeline : createHttpPipeline(); + CodeTransparencyServiceVersion localServiceVersion + = (serviceVersion != null) ? serviceVersion : CodeTransparencyServiceVersion.getLatest(); + CodeTransparencyClientImpl client = new CodeTransparencyClientImpl(localPipeline, + JacksonAdapter.createDefaultSerializerAdapter(), this.endpoint, localServiceVersion); + return client; + } + + @Generated + private void validateClient() { + // This method is invoked from 'buildInnerClient'/'buildClient' method. + // Developer can customize this method, to validate that the necessary conditions are met for the new client. + Objects.requireNonNull(endpoint, "'endpoint' cannot be null."); + } + + @Generated + private HttpPipeline createHttpPipeline() { + Configuration buildConfiguration + = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration; + HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions; + ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions; + List policies = new ArrayList<>(); + String clientName = PROPERTIES.getOrDefault(SDK_NAME, "UnknownName"); + String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion"); + String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions); + policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration)); + policies.add(new RequestIdPolicy()); + policies.add(new AddHeadersFromContextPolicy()); + HttpHeaders headers = CoreUtils.createHttpHeadersFromClientOptions(localClientOptions); + if (headers != null) { + policies.add(new AddHeadersPolicy(headers)); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addBeforeRetryPolicies(policies); + policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy())); + policies.add(new AddDatePolicy()); + if (keyCredential != null) { + policies.add(new KeyCredentialPolicy("authorization", keyCredential, "Bearer")); + } + this.pipelinePolicies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) + .forEach(p -> policies.add(p)); + HttpPolicyProviders.addAfterRetryPolicies(policies); + policies.add(new HttpLoggingPolicy(localHttpLogOptions)); + HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0])) + .httpClient(httpClient) + .clientOptions(localClientOptions) + .build(); + return httpPipeline; + } + + /** + * Builds an instance of CodeTransparencyAsyncClient class. + * + * @return an instance of CodeTransparencyAsyncClient. + */ + @Generated + public CodeTransparencyAsyncClient buildAsyncClient() { + return new CodeTransparencyAsyncClient(buildInnerClient()); + } + + /** + * Builds an instance of CodeTransparencyClient class. + * + * @return an instance of CodeTransparencyClient. + */ + @Generated + public CodeTransparencyClient buildClient() { + return new CodeTransparencyClient(buildInnerClient()); + } + + private static final ClientLogger LOGGER = new ClientLogger(CodeTransparencyClientBuilder.class); +} diff --git a/sdk/confidentialledger/azure-security-codetransparency/src/main/java/com/azure/security/codetransparency/CodeTransparencyServiceVersion.java b/sdk/confidentialledger/azure-security-codetransparency/src/main/java/com/azure/security/codetransparency/CodeTransparencyServiceVersion.java new file mode 100644 index 000000000000..cd70477a9012 --- /dev/null +++ b/sdk/confidentialledger/azure-security-codetransparency/src/main/java/com/azure/security/codetransparency/CodeTransparencyServiceVersion.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.security.codetransparency; + +import com.azure.core.util.ServiceVersion; + +/** + * Service version of CodeTransparencyClient. + */ +public enum CodeTransparencyServiceVersion implements ServiceVersion { + /** + * Enum value 2025-01-31-preview. + */ + V2025_01_31_PREVIEW("2025-01-31-preview"), + + /** + * Enum value 2025-05-31-preview. + */ + V2025_05_31_PREVIEW("2025-05-31-preview"); + + private final String version; + + CodeTransparencyServiceVersion(String version) { + this.version = version; + } + + /** + * {@inheritDoc} + */ + @Override + public String getVersion() { + return this.version; + } + + /** + * Gets the latest service version supported by this client library. + * + * @return The latest {@link CodeTransparencyServiceVersion}. + */ + public static CodeTransparencyServiceVersion getLatest() { + return V2025_05_31_PREVIEW; + } +} diff --git a/sdk/confidentialledger/azure-security-codetransparency/src/main/java/com/azure/security/codetransparency/implementation/CodeTransparencyClientImpl.java b/sdk/confidentialledger/azure-security-codetransparency/src/main/java/com/azure/security/codetransparency/implementation/CodeTransparencyClientImpl.java new file mode 100644 index 000000000000..41912191cfc2 --- /dev/null +++ b/sdk/confidentialledger/azure-security-codetransparency/src/main/java/com/azure/security/codetransparency/implementation/CodeTransparencyClientImpl.java @@ -0,0 +1,625 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.security.codetransparency.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.exception.ClientAuthenticationException; +import com.azure.core.exception.HttpResponseException; +import com.azure.core.exception.ResourceModifiedException; +import com.azure.core.exception.ResourceNotFoundException; +import com.azure.core.http.HttpPipeline; +import com.azure.core.http.HttpPipelineBuilder; +import com.azure.core.http.policy.RetryPolicy; +import com.azure.core.http.policy.UserAgentPolicy; +import com.azure.core.http.rest.RequestOptions; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.BinaryData; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.serializer.JacksonAdapter; +import com.azure.core.util.serializer.SerializerAdapter; +import com.azure.security.codetransparency.CodeTransparencyServiceVersion; +import reactor.core.publisher.Mono; + +/** + * Initializes a new instance of the CodeTransparencyClient type. + */ +public final class CodeTransparencyClientImpl { + /** + * The proxy service used to perform REST calls. + */ + private final CodeTransparencyClientService service; + + /** + */ + private final String endpoint; + + /** + * Gets. + * + * @return the endpoint value. + */ + public String getEndpoint() { + return this.endpoint; + } + + /** + * Service version. + */ + private final CodeTransparencyServiceVersion serviceVersion; + + /** + * Gets Service version. + * + * @return the serviceVersion value. + */ + public CodeTransparencyServiceVersion getServiceVersion() { + return this.serviceVersion; + } + + /** + * The HTTP pipeline to send requests through. + */ + private final HttpPipeline httpPipeline; + + /** + * Gets The HTTP pipeline to send requests through. + * + * @return the httpPipeline value. + */ + public HttpPipeline getHttpPipeline() { + return this.httpPipeline; + } + + /** + * The serializer to serialize an object into a string. + */ + private final SerializerAdapter serializerAdapter; + + /** + * Gets The serializer to serialize an object into a string. + * + * @return the serializerAdapter value. + */ + public SerializerAdapter getSerializerAdapter() { + return this.serializerAdapter; + } + + /** + * Initializes an instance of CodeTransparencyClient client. + * + * @param endpoint + * @param serviceVersion Service version. + */ + public CodeTransparencyClientImpl(String endpoint, CodeTransparencyServiceVersion serviceVersion) { + this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(), + JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); + } + + /** + * Initializes an instance of CodeTransparencyClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param endpoint + * @param serviceVersion Service version. + */ + public CodeTransparencyClientImpl(HttpPipeline httpPipeline, String endpoint, + CodeTransparencyServiceVersion serviceVersion) { + this(httpPipeline, JacksonAdapter.createDefaultSerializerAdapter(), endpoint, serviceVersion); + } + + /** + * Initializes an instance of CodeTransparencyClient client. + * + * @param httpPipeline The HTTP pipeline to send requests through. + * @param serializerAdapter The serializer to serialize an object into a string. + * @param endpoint + * @param serviceVersion Service version. + */ + public CodeTransparencyClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, String endpoint, + CodeTransparencyServiceVersion serviceVersion) { + this.httpPipeline = httpPipeline; + this.serializerAdapter = serializerAdapter; + this.endpoint = endpoint; + this.serviceVersion = serviceVersion; + this.service + = RestProxy.create(CodeTransparencyClientService.class, this.httpPipeline, this.getSerializerAdapter()); + } + + /** + * The interface defining all the services for CodeTransparencyClient to be used by the proxy service to perform + * REST calls. + */ + @Host("{endpoint}") + @ServiceInterface(name = "CodeTransparencyClie") + public interface CodeTransparencyClientService { + @Get("/.well-known/transparency-configuration") + @ExpectedResponses({ 200, 500, 503 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getTransparencyConfigCbor(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/.well-known/transparency-configuration") + @ExpectedResponses({ 200, 500, 503 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceNotFoundException.class, code = { 404 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getTransparencyConfigCborSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/jwks") + @ExpectedResponses({ 200, 400, 404, 429, 500, 503 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getPublicKeys(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Get("/jwks") + @ExpectedResponses({ 200, 400, 404, 429, 500, 503 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getPublicKeysSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, + RequestOptions requestOptions, Context context); + + @Post("/entries") + @ExpectedResponses({ 201, 202, 400, 404, 429, 500, 503 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> createEntry(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Content-Type") String contentType, + @HeaderParam("accept") String accept, @BodyParam("application/cose") BinaryData body, + RequestOptions requestOptions, Context context); + + @Post("/entries") + @ExpectedResponses({ 201, 202, 400, 404, 429, 500, 503 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response createEntrySync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Content-Type") String contentType, + @HeaderParam("accept") String accept, @BodyParam("application/cose") BinaryData body, + RequestOptions requestOptions, Context context); + + @Get("/operations/{operationId}") + @ExpectedResponses({ 200, 202, 400, 404, 429, 500, 503 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getOperation(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("operationId") String operationId, + @HeaderParam("accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/operations/{operationId}") + @ExpectedResponses({ 200, 202, 400, 404, 429, 500, 503 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getOperationSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("operationId") String operationId, + @HeaderParam("accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/entries/{entryId}") + @ExpectedResponses({ 200, 400, 404, 429, 500, 503 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getEntry(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("entryId") String entryId, + @HeaderParam("accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/entries/{entryId}") + @ExpectedResponses({ 200, 400, 404, 429, 500, 503 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getEntrySync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("entryId") String entryId, + @HeaderParam("accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/entries/{entryId}/statement") + @ExpectedResponses({ 200, 400, 404, 429, 500, 503 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Mono> getEntryStatement(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("entryId") String entryId, + @HeaderParam("accept") String accept, RequestOptions requestOptions, Context context); + + @Get("/entries/{entryId}/statement") + @ExpectedResponses({ 200, 400, 404, 429, 500, 503 }) + @UnexpectedResponseExceptionType(value = ClientAuthenticationException.class, code = { 401 }) + @UnexpectedResponseExceptionType(value = ResourceModifiedException.class, code = { 409 }) + @UnexpectedResponseExceptionType(HttpResponseException.class) + Response getEntryStatementSync(@HostParam("endpoint") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("entryId") String entryId, + @HeaderParam("accept") String accept, RequestOptions requestOptions, Context context); + } + + /** + * Get the transparency service configuration, mandatory in IETF SCITT draft. + *

Response Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + * @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 transparency service configuration, mandatory in IETF SCITT draft along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getTransparencyConfigCborWithResponseAsync(RequestOptions requestOptions) { + final String accept = "application/cbor"; + return FluxUtil.withContext(context -> service.getTransparencyConfigCbor(this.getEndpoint(), + this.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Get the transparency service configuration, mandatory in IETF SCITT draft. + *

Response Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + * @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 transparency service configuration, mandatory in IETF SCITT draft along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getTransparencyConfigCborWithResponse(RequestOptions requestOptions) { + final String accept = "application/cbor"; + return service.getTransparencyConfigCborSync(this.getEndpoint(), this.getServiceVersion().getVersion(), accept, + requestOptions, Context.NONE); + } + + /** + * Get the public keys used by the service to sign receipts, mentioned in IETF SCITT draft as part of jwks_uri + * implementation. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     keys (Required): [
+     *          (Required){
+     *             alg: String (Optional)
+     *             crv: String (Optional)
+     *             d: String (Optional)
+     *             dp: String (Optional)
+     *             dq: String (Optional)
+     *             e: String (Optional)
+     *             k: String (Optional)
+     *             kid: String (Optional)
+     *             kty: String (Required)
+     *             n: String (Optional)
+     *             p: String (Optional)
+     *             q: String (Optional)
+     *             qi: String (Optional)
+     *             use: String (Optional)
+     *             x: String (Optional)
+     *             x5c (Optional): [
+     *                 String (Optional)
+     *             ]
+     *             y: String (Optional)
+     *         }
+     *     ]
+     * }
+     * }
+     * 
+ * + * @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 ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the public keys used by the service to sign receipts, mentioned in IETF SCITT draft as part of jwks_uri + * implementation along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getPublicKeysWithResponseAsync(RequestOptions requestOptions) { + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.getPublicKeys(this.getEndpoint(), + this.getServiceVersion().getVersion(), accept, requestOptions, context)); + } + + /** + * Get the public keys used by the service to sign receipts, mentioned in IETF SCITT draft as part of jwks_uri + * implementation. + *

Response Body Schema

+ * + *
+     * {@code
+     * {
+     *     keys (Required): [
+     *          (Required){
+     *             alg: String (Optional)
+     *             crv: String (Optional)
+     *             d: String (Optional)
+     *             dp: String (Optional)
+     *             dq: String (Optional)
+     *             e: String (Optional)
+     *             k: String (Optional)
+     *             kid: String (Optional)
+     *             kty: String (Required)
+     *             n: String (Optional)
+     *             p: String (Optional)
+     *             q: String (Optional)
+     *             qi: String (Optional)
+     *             use: String (Optional)
+     *             x: String (Optional)
+     *             x5c (Optional): [
+     *                 String (Optional)
+     *             ]
+     *             y: String (Optional)
+     *         }
+     *     ]
+     * }
+     * }
+     * 
+ * + * @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 ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the public keys used by the service to sign receipts, mentioned in IETF SCITT draft as part of jwks_uri + * implementation along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getPublicKeysWithResponse(RequestOptions requestOptions) { + final String accept = "application/json"; + return service.getPublicKeysSync(this.getEndpoint(), this.getServiceVersion().getVersion(), accept, + requestOptions, Context.NONE); + } + + /** + * Post an entry to be registered on the CodeTransparency instance, mandatory in IETF SCITT draft. + *

Request Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + * @param body CoseSign1 signature envelope. + * @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 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> createEntryWithResponseAsync(BinaryData body, RequestOptions requestOptions) { + final String contentType = "application/cose"; + final String accept = "application/cose; application/cbor"; + return FluxUtil.withContext(context -> service.createEntry(this.getEndpoint(), + this.getServiceVersion().getVersion(), contentType, accept, body, requestOptions, context)); + } + + /** + * Post an entry to be registered on the CodeTransparency instance, mandatory in IETF SCITT draft. + *

Request Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + *

Response Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + * @param body CoseSign1 signature envelope. + * @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 ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createEntryWithResponse(BinaryData body, RequestOptions requestOptions) { + final String contentType = "application/cose"; + final String accept = "application/cose; application/cbor"; + return service.createEntrySync(this.getEndpoint(), this.getServiceVersion().getVersion(), contentType, accept, + body, requestOptions, Context.NONE); + } + + /** + * Get status of the long running registration operation, mandatory in IETF SCITT draft. + *

Response Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + * @param operationId ID of the operation to retrieve. + * @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 ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return status of the long running registration operation, mandatory in IETF SCITT draft along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getOperationWithResponseAsync(String operationId, RequestOptions requestOptions) { + final String accept = "application/cbor"; + return FluxUtil.withContext(context -> service.getOperation(this.getEndpoint(), + this.getServiceVersion().getVersion(), operationId, accept, requestOptions, context)); + } + + /** + * Get status of the long running registration operation, mandatory in IETF SCITT draft. + *

Response Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + * @param operationId ID of the operation to retrieve. + * @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 ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return status of the long running registration operation, mandatory in IETF SCITT draft along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getOperationWithResponse(String operationId, RequestOptions requestOptions) { + final String accept = "application/cbor"; + return service.getOperationSync(this.getEndpoint(), this.getServiceVersion().getVersion(), operationId, accept, + requestOptions, Context.NONE); + } + + /** + * Get receipt. + *

Response Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + * @param entryId ID of the entry to retrieve. + * @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 ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return receipt along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getEntryWithResponseAsync(String entryId, RequestOptions requestOptions) { + final String accept = "application/cose"; + return FluxUtil.withContext(context -> service.getEntry(this.getEndpoint(), + this.getServiceVersion().getVersion(), entryId, accept, requestOptions, context)); + } + + /** + * Get receipt. + *

Response Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + * @param entryId ID of the entry to retrieve. + * @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 ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return receipt along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getEntryWithResponse(String entryId, RequestOptions requestOptions) { + final String accept = "application/cose"; + return service.getEntrySync(this.getEndpoint(), this.getServiceVersion().getVersion(), entryId, accept, + requestOptions, Context.NONE); + } + + /** + * Get the transparent statement consisting of the signed statement and the receipt embedded in the header. + *

Response Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + * @param entryId ID of the entry to retrieve. + * @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 ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the transparent statement consisting of the signed statement and the receipt embedded in the header along + * with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Mono> getEntryStatementWithResponseAsync(String entryId, + RequestOptions requestOptions) { + final String accept = "application/cose"; + return FluxUtil.withContext(context -> service.getEntryStatement(this.getEndpoint(), + this.getServiceVersion().getVersion(), entryId, accept, requestOptions, context)); + } + + /** + * Get the transparent statement consisting of the signed statement and the receipt embedded in the header. + *

Response Body Schema

+ * + *
+     * {@code
+     * BinaryData
+     * }
+     * 
+ * + * @param entryId ID of the entry to retrieve. + * @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 ResourceModifiedException thrown if the request is rejected by server on status code 409. + * @return the transparent statement consisting of the signed statement and the receipt embedded in the header along + * with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getEntryStatementWithResponse(String entryId, RequestOptions requestOptions) { + final String accept = "application/cose"; + return service.getEntryStatementSync(this.getEndpoint(), this.getServiceVersion().getVersion(), entryId, accept, + requestOptions, Context.NONE); + } +} diff --git a/sdk/confidentialledger/azure-security-codetransparency/src/main/java/com/azure/security/codetransparency/implementation/package-info.java b/sdk/confidentialledger/azure-security-codetransparency/src/main/java/com/azure/security/codetransparency/implementation/package-info.java new file mode 100644 index 000000000000..c6f8bb4a93c4 --- /dev/null +++ b/sdk/confidentialledger/azure-security-codetransparency/src/main/java/com/azure/security/codetransparency/implementation/package-info.java @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +/** + * Package containing the implementations for CodeTransparency. + */ +package com.azure.security.codetransparency.implementation; diff --git a/sdk/confidentialledger/azure-security-codetransparency/src/main/java/com/azure/security/codetransparency/models/JsonWebKey.java b/sdk/confidentialledger/azure-security-codetransparency/src/main/java/com/azure/security/codetransparency/models/JsonWebKey.java new file mode 100644 index 000000000000..b36f7fc6647e --- /dev/null +++ b/sdk/confidentialledger/azure-security-codetransparency/src/main/java/com/azure/security/codetransparency/models/JsonWebKey.java @@ -0,0 +1,472 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.security.codetransparency.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * rfc7517 JSON Web Key representation adapted from a shared swagger definition in the common types. + */ +@Immutable +public final class JsonWebKey implements JsonSerializable { + /* + * The "alg" (algorithm) parameter identifies the algorithm intended for + * use with the key. The values used should either be registered in the + * IANA "JSON Web Signature and Encryption Algorithms" registry + * established by [JWA] or be a value that contains a Collision- + * Resistant Name. + */ + @Generated + private String alg; + + /* + * The "crv" (curve) parameter identifies the curve type + */ + @Generated + private String crv; + + /* + * RSA private exponent or ECC private key + */ + @Generated + private String d; + + /* + * RSA Private Key Parameter + */ + @Generated + private String dp; + + /* + * RSA Private Key Parameter + */ + @Generated + private String dq; + + /* + * RSA public exponent, in Base64 + */ + @Generated + private String e; + + /* + * Symmetric key + */ + @Generated + private String k; + + /* + * The "kid" (key ID) parameter is used to match a specific key. This + * is used, for instance, to choose among a set of keys within a JWK Set + * during key rollover. The structure of the "kid" value is + * unspecified. When "kid" values are used within a JWK Set, different + * keys within the JWK Set SHOULD use distinct "kid" values. (One + * example in which different keys might use the same "kid" value is if + * they have different "kty" (key type) values but are considered to be + * equivalent alternatives by the application using them.) The "kid" + * value is a case-sensitive string. + */ + @Generated + private String kid; + + /* + * The "kty" (key type) parameter identifies the cryptographic algorithm + * family used with the key, such as "RSA" or "EC". "kty" values should + * either be registered in the IANA "JSON Web Key Types" registry + * established by [JWA] or be a value that contains a Collision- + * Resistant Name. The "kty" value is a case-sensitive string. + */ + @Generated + private final String kty; + + /* + * RSA modulus, in Base64 + */ + @Generated + private String n; + + /* + * RSA secret prime + */ + @Generated + private String p; + + /* + * RSA secret prime, with p < q + */ + @Generated + private String q; + + /* + * RSA Private Key Parameter + */ + @Generated + private String qi; + + /* + * Use ("public key use") identifies the intended use of + * the public key. The "use" parameter is employed to indicate whether + * a public key is used for encrypting data or verifying the signature + * on data. Values are commonly "sig" (signature) or "enc" (encryption). + */ + @Generated + private String use; + + /* + * X coordinate for the Elliptic Curve point + */ + @Generated + private String x; + + /* + * The "x5c" (X.509 certificate chain) parameter contains a chain of one + * or more PKIX certificates [RFC5280]. The certificate chain is + * represented as a JSON array of certificate value strings. Each + * string in the array is a base64-encoded (Section 4 of [RFC4648] -- + * not base64url-encoded) DER [ITU.X690.1994] PKIX certificate value. + * The PKIX certificate containing the key value MUST be the first + * certificate. + */ + @Generated + private List x5c; + + /* + * Y coordinate for the Elliptic Curve point + */ + @Generated + private String y; + + /** + * Creates an instance of JsonWebKey class. + * + * @param kty the kty value to set. + */ + @Generated + private JsonWebKey(String kty) { + this.kty = kty; + } + + /** + * Get the alg property: The "alg" (algorithm) parameter identifies the algorithm intended for + * use with the key. The values used should either be registered in the + * IANA "JSON Web Signature and Encryption Algorithms" registry + * established by [JWA] or be a value that contains a Collision- + * Resistant Name. + * + * @return the alg value. + */ + @Generated + public String getAlg() { + return this.alg; + } + + /** + * Get the crv property: The "crv" (curve) parameter identifies the curve type. + * + * @return the crv value. + */ + @Generated + public String getCrv() { + return this.crv; + } + + /** + * Get the d property: RSA private exponent or ECC private key. + * + * @return the d value. + */ + @Generated + public String getD() { + return this.d; + } + + /** + * Get the dp property: RSA Private Key Parameter. + * + * @return the dp value. + */ + @Generated + public String getDp() { + return this.dp; + } + + /** + * Get the dq property: RSA Private Key Parameter. + * + * @return the dq value. + */ + @Generated + public String getDq() { + return this.dq; + } + + /** + * Get the e property: RSA public exponent, in Base64. + * + * @return the e value. + */ + @Generated + public String getE() { + return this.e; + } + + /** + * Get the k property: Symmetric key. + * + * @return the k value. + */ + @Generated + public String getK() { + return this.k; + } + + /** + * Get the kid property: The "kid" (key ID) parameter is used to match a specific key. This + * is used, for instance, to choose among a set of keys within a JWK Set + * during key rollover. The structure of the "kid" value is + * unspecified. When "kid" values are used within a JWK Set, different + * keys within the JWK Set SHOULD use distinct "kid" values. (One + * example in which different keys might use the same "kid" value is if + * they have different "kty" (key type) values but are considered to be + * equivalent alternatives by the application using them.) The "kid" + * value is a case-sensitive string. + * + * @return the kid value. + */ + @Generated + public String getKid() { + return this.kid; + } + + /** + * Get the kty property: The "kty" (key type) parameter identifies the cryptographic algorithm + * family used with the key, such as "RSA" or "EC". "kty" values should + * either be registered in the IANA "JSON Web Key Types" registry + * established by [JWA] or be a value that contains a Collision- + * Resistant Name. The "kty" value is a case-sensitive string. + * + * @return the kty value. + */ + @Generated + public String getKty() { + return this.kty; + } + + /** + * Get the n property: RSA modulus, in Base64. + * + * @return the n value. + */ + @Generated + public String getN() { + return this.n; + } + + /** + * Get the p property: RSA secret prime. + * + * @return the p value. + */ + @Generated + public String getP() { + return this.p; + } + + /** + * Get the q property: RSA secret prime, with p < q. + * + * @return the q value. + */ + @Generated + public String getQ() { + return this.q; + } + + /** + * Get the qi property: RSA Private Key Parameter. + * + * @return the qi value. + */ + @Generated + public String getQi() { + return this.qi; + } + + /** + * Get the use property: Use ("public key use") identifies the intended use of + * the public key. The "use" parameter is employed to indicate whether + * a public key is used for encrypting data or verifying the signature + * on data. Values are commonly "sig" (signature) or "enc" (encryption). + * + * @return the use value. + */ + @Generated + public String getUse() { + return this.use; + } + + /** + * Get the x property: X coordinate for the Elliptic Curve point. + * + * @return the x value. + */ + @Generated + public String getX() { + return this.x; + } + + /** + * Get the x5c property: The "x5c" (X.509 certificate chain) parameter contains a chain of one + * or more PKIX certificates [RFC5280]. The certificate chain is + * represented as a JSON array of certificate value strings. Each + * string in the array is a base64-encoded (Section 4 of [RFC4648] -- + * not base64url-encoded) DER [ITU.X690.1994] PKIX certificate value. + * The PKIX certificate containing the key value MUST be the first + * certificate. + * + * @return the x5c value. + */ + @Generated + public List getX5c() { + return this.x5c; + } + + /** + * Get the y property: Y coordinate for the Elliptic Curve point. + * + * @return the y value. + */ + @Generated + public String getY() { + return this.y; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeStringField("kty", this.kty); + jsonWriter.writeStringField("alg", this.alg); + jsonWriter.writeStringField("crv", this.crv); + jsonWriter.writeStringField("d", this.d); + jsonWriter.writeStringField("dp", this.dp); + jsonWriter.writeStringField("dq", this.dq); + jsonWriter.writeStringField("e", this.e); + jsonWriter.writeStringField("k", this.k); + jsonWriter.writeStringField("kid", this.kid); + jsonWriter.writeStringField("n", this.n); + jsonWriter.writeStringField("p", this.p); + jsonWriter.writeStringField("q", this.q); + jsonWriter.writeStringField("qi", this.qi); + jsonWriter.writeStringField("use", this.use); + jsonWriter.writeStringField("x", this.x); + jsonWriter.writeArrayField("x5c", this.x5c, (writer, element) -> writer.writeString(element)); + jsonWriter.writeStringField("y", this.y); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JsonWebKey from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JsonWebKey if the JsonReader was pointing to an instance of it, or null if it was pointing + * to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the JsonWebKey. + */ + @Generated + public static JsonWebKey fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + String kty = null; + String alg = null; + String crv = null; + String d = null; + String dp = null; + String dq = null; + String e = null; + String k = null; + String kid = null; + String n = null; + String p = null; + String q = null; + String qi = null; + String use = null; + String x = null; + List x5c = null; + String y = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("kty".equals(fieldName)) { + kty = reader.getString(); + } else if ("alg".equals(fieldName)) { + alg = reader.getString(); + } else if ("crv".equals(fieldName)) { + crv = reader.getString(); + } else if ("d".equals(fieldName)) { + d = reader.getString(); + } else if ("dp".equals(fieldName)) { + dp = reader.getString(); + } else if ("dq".equals(fieldName)) { + dq = reader.getString(); + } else if ("e".equals(fieldName)) { + e = reader.getString(); + } else if ("k".equals(fieldName)) { + k = reader.getString(); + } else if ("kid".equals(fieldName)) { + kid = reader.getString(); + } else if ("n".equals(fieldName)) { + n = reader.getString(); + } else if ("p".equals(fieldName)) { + p = reader.getString(); + } else if ("q".equals(fieldName)) { + q = reader.getString(); + } else if ("qi".equals(fieldName)) { + qi = reader.getString(); + } else if ("use".equals(fieldName)) { + use = reader.getString(); + } else if ("x".equals(fieldName)) { + x = reader.getString(); + } else if ("x5c".equals(fieldName)) { + x5c = reader.readArray(reader1 -> reader1.getString()); + } else if ("y".equals(fieldName)) { + y = reader.getString(); + } else { + reader.skipChildren(); + } + } + JsonWebKey deserializedJsonWebKey = new JsonWebKey(kty); + deserializedJsonWebKey.alg = alg; + deserializedJsonWebKey.crv = crv; + deserializedJsonWebKey.d = d; + deserializedJsonWebKey.dp = dp; + deserializedJsonWebKey.dq = dq; + deserializedJsonWebKey.e = e; + deserializedJsonWebKey.k = k; + deserializedJsonWebKey.kid = kid; + deserializedJsonWebKey.n = n; + deserializedJsonWebKey.p = p; + deserializedJsonWebKey.q = q; + deserializedJsonWebKey.qi = qi; + deserializedJsonWebKey.use = use; + deserializedJsonWebKey.x = x; + deserializedJsonWebKey.x5c = x5c; + deserializedJsonWebKey.y = y; + + return deserializedJsonWebKey; + }); + } +} diff --git a/sdk/confidentialledger/azure-security-codetransparency/src/main/java/com/azure/security/codetransparency/models/JwksDocument.java b/sdk/confidentialledger/azure-security-codetransparency/src/main/java/com/azure/security/codetransparency/models/JwksDocument.java new file mode 100644 index 000000000000..76483bcfbbd2 --- /dev/null +++ b/sdk/confidentialledger/azure-security-codetransparency/src/main/java/com/azure/security/codetransparency/models/JwksDocument.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.security.codetransparency.models; + +import com.azure.core.annotation.Generated; +import com.azure.core.annotation.Immutable; +import com.azure.json.JsonReader; +import com.azure.json.JsonSerializable; +import com.azure.json.JsonToken; +import com.azure.json.JsonWriter; +import java.io.IOException; +import java.util.List; + +/** + * A JWKS like document. + */ +@Immutable +public final class JwksDocument implements JsonSerializable { + /* + * List of public keys used for receipt verification. + */ + @Generated + private final List keys; + + /** + * Creates an instance of JwksDocument class. + * + * @param keys the keys value to set. + */ + @Generated + private JwksDocument(List keys) { + this.keys = keys; + } + + /** + * Get the keys property: List of public keys used for receipt verification. + * + * @return the keys value. + */ + @Generated + public List getKeys() { + return this.keys; + } + + /** + * {@inheritDoc} + */ + @Generated + @Override + public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { + jsonWriter.writeStartObject(); + jsonWriter.writeArrayField("keys", this.keys, (writer, element) -> writer.writeJson(element)); + return jsonWriter.writeEndObject(); + } + + /** + * Reads an instance of JwksDocument from the JsonReader. + * + * @param jsonReader The JsonReader being read. + * @return An instance of JwksDocument if the JsonReader was pointing to an instance of it, or null if it was + * pointing to JSON null. + * @throws IllegalStateException If the deserialized JSON object was missing any required properties. + * @throws IOException If an error occurs while reading the JwksDocument. + */ + @Generated + public static JwksDocument fromJson(JsonReader jsonReader) throws IOException { + return jsonReader.readObject(reader -> { + List keys = null; + while (reader.nextToken() != JsonToken.END_OBJECT) { + String fieldName = reader.getFieldName(); + reader.nextToken(); + + if ("keys".equals(fieldName)) { + keys = reader.readArray(reader1 -> JsonWebKey.fromJson(reader1)); + } else { + reader.skipChildren(); + } + } + return new JwksDocument(keys); + }); + } +} diff --git a/sdk/confidentialledger/azure-security-codetransparency/src/main/java/com/azure/security/codetransparency/models/package-info.java b/sdk/confidentialledger/azure-security-codetransparency/src/main/java/com/azure/security/codetransparency/models/package-info.java new file mode 100644 index 000000000000..7f905b6534c9 --- /dev/null +++ b/sdk/confidentialledger/azure-security-codetransparency/src/main/java/com/azure/security/codetransparency/models/package-info.java @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +/** + * Package containing the data models for CodeTransparency. + */ +package com.azure.security.codetransparency.models; diff --git a/sdk/confidentialledger/azure-security-codetransparency/src/main/java/com/azure/security/codetransparency/package-info.java b/sdk/confidentialledger/azure-security-codetransparency/src/main/java/com/azure/security/codetransparency/package-info.java new file mode 100644 index 000000000000..7b7bfd248220 --- /dev/null +++ b/sdk/confidentialledger/azure-security-codetransparency/src/main/java/com/azure/security/codetransparency/package-info.java @@ -0,0 +1,8 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +/** + * Package containing the classes for CodeTransparency. + */ +package com.azure.security.codetransparency; diff --git a/sdk/confidentialledger/azure-security-codetransparency/src/main/java/module-info.java b/sdk/confidentialledger/azure-security-codetransparency/src/main/java/module-info.java new file mode 100644 index 000000000000..745b435e3ebe --- /dev/null +++ b/sdk/confidentialledger/azure-security-codetransparency/src/main/java/module-info.java @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +module com.azure.security.codetransparency { + requires transitive com.azure.core; + + exports com.azure.security.codetransparency; + exports com.azure.security.codetransparency.models; + + opens com.azure.security.codetransparency.models to com.azure.core; +} diff --git a/sdk/confidentialledger/azure-security-codetransparency/src/main/resources/META-INF/azure-security-codetransparency_apiview_properties.json b/sdk/confidentialledger/azure-security-codetransparency/src/main/resources/META-INF/azure-security-codetransparency_apiview_properties.json new file mode 100644 index 000000000000..c93221f09d14 --- /dev/null +++ b/sdk/confidentialledger/azure-security-codetransparency/src/main/resources/META-INF/azure-security-codetransparency_apiview_properties.json @@ -0,0 +1,34 @@ +{ + "flavor": "azure", + "CrossLanguageDefinitionId": { + "com.azure.security.codetransparency.CodeTransparencyAsyncClient": "Microsoft.CodeTransparency", + "com.azure.security.codetransparency.CodeTransparencyAsyncClient.createEntry": "Microsoft.CodeTransparency.createEntry", + "com.azure.security.codetransparency.CodeTransparencyAsyncClient.createEntryWithResponse": "Microsoft.CodeTransparency.createEntry", + "com.azure.security.codetransparency.CodeTransparencyAsyncClient.getEntry": "Microsoft.CodeTransparency.getEntry", + "com.azure.security.codetransparency.CodeTransparencyAsyncClient.getEntryStatement": "Microsoft.CodeTransparency.getEntryStatement", + "com.azure.security.codetransparency.CodeTransparencyAsyncClient.getEntryStatementWithResponse": "Microsoft.CodeTransparency.getEntryStatement", + "com.azure.security.codetransparency.CodeTransparencyAsyncClient.getEntryWithResponse": "Microsoft.CodeTransparency.getEntry", + "com.azure.security.codetransparency.CodeTransparencyAsyncClient.getOperation": "Microsoft.CodeTransparency.getOperation", + "com.azure.security.codetransparency.CodeTransparencyAsyncClient.getOperationWithResponse": "Microsoft.CodeTransparency.getOperation", + "com.azure.security.codetransparency.CodeTransparencyAsyncClient.getPublicKeys": "Microsoft.CodeTransparency.getPublicKeys", + "com.azure.security.codetransparency.CodeTransparencyAsyncClient.getPublicKeysWithResponse": "Microsoft.CodeTransparency.getPublicKeys", + "com.azure.security.codetransparency.CodeTransparencyAsyncClient.getTransparencyConfigCbor": "Microsoft.CodeTransparency.getTransparencyConfigCbor", + "com.azure.security.codetransparency.CodeTransparencyAsyncClient.getTransparencyConfigCborWithResponse": "Microsoft.CodeTransparency.getTransparencyConfigCbor", + "com.azure.security.codetransparency.CodeTransparencyClient": "Microsoft.CodeTransparency", + "com.azure.security.codetransparency.CodeTransparencyClient.createEntry": "Microsoft.CodeTransparency.createEntry", + "com.azure.security.codetransparency.CodeTransparencyClient.createEntryWithResponse": "Microsoft.CodeTransparency.createEntry", + "com.azure.security.codetransparency.CodeTransparencyClient.getEntry": "Microsoft.CodeTransparency.getEntry", + "com.azure.security.codetransparency.CodeTransparencyClient.getEntryStatement": "Microsoft.CodeTransparency.getEntryStatement", + "com.azure.security.codetransparency.CodeTransparencyClient.getEntryStatementWithResponse": "Microsoft.CodeTransparency.getEntryStatement", + "com.azure.security.codetransparency.CodeTransparencyClient.getEntryWithResponse": "Microsoft.CodeTransparency.getEntry", + "com.azure.security.codetransparency.CodeTransparencyClient.getOperation": "Microsoft.CodeTransparency.getOperation", + "com.azure.security.codetransparency.CodeTransparencyClient.getOperationWithResponse": "Microsoft.CodeTransparency.getOperation", + "com.azure.security.codetransparency.CodeTransparencyClient.getPublicKeys": "Microsoft.CodeTransparency.getPublicKeys", + "com.azure.security.codetransparency.CodeTransparencyClient.getPublicKeysWithResponse": "Microsoft.CodeTransparency.getPublicKeys", + "com.azure.security.codetransparency.CodeTransparencyClient.getTransparencyConfigCbor": "Microsoft.CodeTransparency.getTransparencyConfigCbor", + "com.azure.security.codetransparency.CodeTransparencyClient.getTransparencyConfigCborWithResponse": "Microsoft.CodeTransparency.getTransparencyConfigCbor", + "com.azure.security.codetransparency.CodeTransparencyClientBuilder": "Microsoft.CodeTransparency", + "com.azure.security.codetransparency.models.JsonWebKey": "Microsoft.CodeTransparency.JsonWebKey", + "com.azure.security.codetransparency.models.JwksDocument": "Microsoft.CodeTransparency.JwksDocument" + } +} diff --git a/sdk/confidentialledger/azure-security-codetransparency/src/main/resources/azure-security-codetransparency.properties b/sdk/confidentialledger/azure-security-codetransparency/src/main/resources/azure-security-codetransparency.properties new file mode 100644 index 000000000000..ca812989b4f2 --- /dev/null +++ b/sdk/confidentialledger/azure-security-codetransparency/src/main/resources/azure-security-codetransparency.properties @@ -0,0 +1,2 @@ +name=${project.artifactId} +version=${project.version} diff --git a/sdk/confidentialledger/azure-security-codetransparency/src/samples/java/com/azure/security/codetransparency/ReadmeSamples.java b/sdk/confidentialledger/azure-security-codetransparency/src/samples/java/com/azure/security/codetransparency/ReadmeSamples.java new file mode 100644 index 000000000000..ab339d1eaff9 --- /dev/null +++ b/sdk/confidentialledger/azure-security-codetransparency/src/samples/java/com/azure/security/codetransparency/ReadmeSamples.java @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.security.codetransparency; + +public final class ReadmeSamples { + public void readmeSamples() { + // BEGIN: com.azure.security.codetransparency.readme + // END: com.azure.security.codetransparency.readme + } +} diff --git a/sdk/confidentialledger/azure-security-codetransparency/src/test/java/com/azure/security/codetransparency/generated/CodeTransparencyClientTestBase.java b/sdk/confidentialledger/azure-security-codetransparency/src/test/java/com/azure/security/codetransparency/generated/CodeTransparencyClientTestBase.java new file mode 100644 index 000000000000..6ee74701de60 --- /dev/null +++ b/sdk/confidentialledger/azure-security-codetransparency/src/test/java/com/azure/security/codetransparency/generated/CodeTransparencyClientTestBase.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) TypeSpec Code Generator. + +package com.azure.security.codetransparency.generated; + +// The Java test files under 'generated' package are generated for your reference. +// If you wish to modify these files, please copy them out of the 'generated' package, and modify there. +// See https://aka.ms/azsdk/dpg/java/tests for guide on adding a test. + +import com.azure.core.http.policy.HttpLogDetailLevel; +import com.azure.core.http.policy.HttpLogOptions; +import com.azure.core.test.TestMode; +import com.azure.core.test.TestProxyTestBase; +import com.azure.core.util.Configuration; +import com.azure.security.codetransparency.CodeTransparencyClient; +import com.azure.security.codetransparency.CodeTransparencyClientBuilder; + +class CodeTransparencyClientTestBase extends TestProxyTestBase { + protected CodeTransparencyClient codeTransparencyClient; + + @Override + protected void beforeTest() { + CodeTransparencyClientBuilder codeTransparencyClientbuilder = new CodeTransparencyClientBuilder() + .endpoint(Configuration.getGlobalConfiguration().get("ENDPOINT", "endpoint")) + .httpClient(getHttpClientOrUsePlayback(getHttpClients().findFirst().orElse(null))) + .httpLogOptions(new HttpLogOptions().setLogLevel(HttpLogDetailLevel.BASIC)); + if (getTestMode() == TestMode.RECORD) { + codeTransparencyClientbuilder.addPolicy(interceptorManager.getRecordPolicy()); + } + codeTransparencyClient = codeTransparencyClientbuilder.buildClient(); + + } +} diff --git a/sdk/confidentialledger/azure-security-codetransparency/tsp-location.yaml b/sdk/confidentialledger/azure-security-codetransparency/tsp-location.yaml new file mode 100644 index 000000000000..c5b1bd786b12 --- /dev/null +++ b/sdk/confidentialledger/azure-security-codetransparency/tsp-location.yaml @@ -0,0 +1,4 @@ +directory: specification/confidentialledger/Microsoft.CodeTransparency +commit: 36053916698f900e3b47e165e7bddc098ddb0109 +repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/confidentialledger/ci.yml b/sdk/confidentialledger/ci.yml index c1b564d31137..c406ef983056 100644 --- a/sdk/confidentialledger/ci.yml +++ b/sdk/confidentialledger/ci.yml @@ -30,14 +30,18 @@ pr: - sdk/confidentialledger/azure-resourcemanager-confidentialledger/pom.xml parameters: -- name: release_azuresecurityconfidentialledger - displayName: 'azure-security-confidentialledger' - type: boolean - default: true -- name: release_azureresourcemanagerconfidentialledger - displayName: 'azure-resourcemanager-confidentialledger' - type: boolean - default: false + - name: release_azuresecurityconfidentialledger + displayName: azure-security-confidentialledger + type: boolean + default: true + - name: release_azureresourcemanagerconfidentialledger + displayName: azure-resourcemanager-confidentialledger + type: boolean + default: false + - name: release_azuresecuritycodetransparency + displayName: azure-security-codetransparency + type: boolean + default: true extends: template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml @@ -52,3 +56,7 @@ extends: groupId: com.azure.resourcemanager safeName: azureresourcemanagerconfidentialledger releaseInBatch: ${{ parameters.release_azureresourcemanagerconfidentialledger }} + - name: azure-security-codetransparency + groupId: com.azure + safeName: azuresecuritycodetransparency + releaseInBatch: ${{ parameters.release_azuresecuritycodetransparency }} diff --git a/sdk/confidentialledger/pom.xml b/sdk/confidentialledger/pom.xml index 02aadd3e1659..65905ef55a7d 100644 --- a/sdk/confidentialledger/pom.xml +++ b/sdk/confidentialledger/pom.xml @@ -9,7 +9,8 @@ pom 1.0.0 - azure-resourcemanager-confidentialledger - azure-security-confidentialledger + azure-resourcemanager-confidentialledger + azure-security-codetransparency + azure-security-confidentialledger \ No newline at end of file