scopes = new ArrayList<>();
+ private RetryPolicy retryPolicy;
+ private RetryOptions retryOptions;
+ private Duration defaultPollInterval;
+
+ private Configurable() {
+ }
+
+ /**
+ * Sets the http client.
+ *
+ * @param httpClient the HTTP client.
+ * @return the configurable object itself.
+ */
+ public Configurable withHttpClient(HttpClient httpClient) {
+ this.httpClient = Objects.requireNonNull(httpClient, "'httpClient' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the logging options to the HTTP pipeline.
+ *
+ * @param httpLogOptions the HTTP log options.
+ * @return the configurable object itself.
+ */
+ public Configurable withLogOptions(HttpLogOptions httpLogOptions) {
+ this.httpLogOptions = Objects.requireNonNull(httpLogOptions, "'httpLogOptions' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Adds the pipeline policy to the HTTP pipeline.
+ *
+ * @param policy the HTTP pipeline policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withPolicy(HttpPipelinePolicy policy) {
+ this.policies.add(Objects.requireNonNull(policy, "'policy' cannot be null."));
+ return this;
+ }
+
+ /**
+ * Adds the scope to permission sets.
+ *
+ * @param scope the scope.
+ * @return the configurable object itself.
+ */
+ public Configurable withScope(String scope) {
+ this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null."));
+ return this;
+ }
+
+ /**
+ * Sets the retry policy to the HTTP pipeline.
+ *
+ * @param retryPolicy the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryPolicy(RetryPolicy retryPolicy) {
+ this.retryPolicy = Objects.requireNonNull(retryPolicy, "'retryPolicy' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the retry options for the HTTP pipeline retry policy.
+ *
+ * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}.
+ *
+ * @param retryOptions the retry options for the HTTP pipeline retry policy.
+ * @return the configurable object itself.
+ */
+ public Configurable withRetryOptions(RetryOptions retryOptions) {
+ this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null.");
+ return this;
+ }
+
+ /**
+ * Sets the default poll interval, used when service does not provide "Retry-After" header.
+ *
+ * @param defaultPollInterval the default poll interval.
+ * @return the configurable object itself.
+ */
+ public Configurable withDefaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval
+ = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null.");
+ if (this.defaultPollInterval.isNegative()) {
+ throw LOGGER
+ .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative"));
+ }
+ return this;
+ }
+
+ /**
+ * Creates an instance of CodeSigning service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the CodeSigning service API instance.
+ */
+ public CodeSigningManager authenticate(TokenCredential credential, AzureProfile profile) {
+ Objects.requireNonNull(credential, "'credential' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+
+ StringBuilder userAgentBuilder = new StringBuilder();
+ userAgentBuilder.append("azsdk-java")
+ .append("-")
+ .append("com.azure.resourcemanager.codesigning")
+ .append("/")
+ .append("1.0.0-beta.1");
+ if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
+ userAgentBuilder.append(" (")
+ .append(Configuration.getGlobalConfiguration().get("java.version"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.name"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.version"))
+ .append("; auto-generated)");
+ } else {
+ userAgentBuilder.append(" (auto-generated)");
+ }
+
+ if (scopes.isEmpty()) {
+ scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
+ }
+ if (retryPolicy == null) {
+ if (retryOptions != null) {
+ retryPolicy = new RetryPolicy(retryOptions);
+ } else {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
+ }
+ List policies = new ArrayList<>();
+ policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new AddHeadersFromContextPolicy());
+ policies.add(new RequestIdPolicy());
+ policies.addAll(this.policies.stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .collect(Collectors.toList()));
+ HttpPolicyProviders.addBeforeRetryPolicies(policies);
+ policies.add(retryPolicy);
+ policies.add(new AddDatePolicy());
+ policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
+ policies.addAll(this.policies.stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
+ HttpPolicyProviders.addAfterRetryPolicies(policies);
+ policies.add(new HttpLoggingPolicy(httpLogOptions));
+ HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient)
+ .policies(policies.toArray(new HttpPipelinePolicy[0]))
+ .build();
+ return new CodeSigningManager(httpPipeline, profile, defaultPollInterval);
+ }
+ }
+
+ /**
+ * Gets the resource collection API of Operations.
+ *
+ * @return Resource collection API of Operations.
+ */
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(clientObject.getOperations(), this);
+ }
+ return operations;
+ }
+
+ /**
+ * Gets the resource collection API of CodeSigningAccounts. It manages CodeSigningAccount.
+ *
+ * @return Resource collection API of CodeSigningAccounts.
+ */
+ public CodeSigningAccounts codeSigningAccounts() {
+ if (this.codeSigningAccounts == null) {
+ this.codeSigningAccounts = new CodeSigningAccountsImpl(clientObject.getCodeSigningAccounts(), this);
+ }
+ return codeSigningAccounts;
+ }
+
+ /**
+ * Gets the resource collection API of CertificateProfiles. It manages CertificateProfile.
+ *
+ * @return Resource collection API of CertificateProfiles.
+ */
+ public CertificateProfiles certificateProfiles() {
+ if (this.certificateProfiles == null) {
+ this.certificateProfiles = new CertificateProfilesImpl(clientObject.getCertificateProfiles(), this);
+ }
+ return certificateProfiles;
+ }
+
+ /**
+ * Gets wrapped service client CodeSigningManagementClient providing direct access to the underlying auto-generated
+ * API implementation, based on Azure REST API.
+ *
+ * @return Wrapped service client CodeSigningManagementClient.
+ */
+ public CodeSigningManagementClient serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/fluent/CertificateProfilesClient.java b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/fluent/CertificateProfilesClient.java
new file mode 100644
index 0000000000000..592078b71000d
--- /dev/null
+++ b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/fluent/CertificateProfilesClient.java
@@ -0,0 +1,232 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.codesigning.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.codesigning.fluent.models.CertificateProfileInner;
+import com.azure.resourcemanager.codesigning.models.RevokeCertificate;
+
+/**
+ * An instance of this class provides access to all the operations defined in CertificateProfilesClient.
+ */
+public interface CertificateProfilesClient {
+ /**
+ * List certificate profiles under a trusted signing account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a CertificateProfile list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByCodeSigningAccount(String resourceGroupName, String accountName);
+
+ /**
+ * List certificate profiles under a trusted signing account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a CertificateProfile list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByCodeSigningAccount(String resourceGroupName, String accountName,
+ Context context);
+
+ /**
+ * Get details of a certificate profile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param profileName Certificate profile name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return details of a certificate profile along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceGroupName, String accountName, String profileName,
+ Context context);
+
+ /**
+ * Get details of a certificate profile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param profileName Certificate profile name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return details of a certificate profile.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CertificateProfileInner get(String resourceGroupName, String accountName, String profileName);
+
+ /**
+ * Create a certificate profile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param profileName Certificate profile name.
+ * @param resource Parameters to create the certificate profile.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of certificate profile resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, CertificateProfileInner> beginCreate(String resourceGroupName,
+ String accountName, String profileName, CertificateProfileInner resource);
+
+ /**
+ * Create a certificate profile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param profileName Certificate profile name.
+ * @param resource Parameters to create the certificate profile.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of certificate profile resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, CertificateProfileInner> beginCreate(String resourceGroupName,
+ String accountName, String profileName, CertificateProfileInner resource, Context context);
+
+ /**
+ * Create a certificate profile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param profileName Certificate profile name.
+ * @param resource Parameters to create the certificate profile.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return certificate profile resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CertificateProfileInner create(String resourceGroupName, String accountName, String profileName,
+ CertificateProfileInner resource);
+
+ /**
+ * Create a certificate profile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param profileName Certificate profile name.
+ * @param resource Parameters to create the certificate profile.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return certificate profile resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CertificateProfileInner create(String resourceGroupName, String accountName, String profileName,
+ CertificateProfileInner resource, Context context);
+
+ /**
+ * Delete a certificate profile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param profileName Certificate profile name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, String profileName);
+
+ /**
+ * Delete a certificate profile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param profileName Certificate profile name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, String profileName,
+ Context context);
+
+ /**
+ * Delete a certificate profile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param profileName Certificate profile name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String accountName, String profileName);
+
+ /**
+ * Delete a certificate profile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param profileName Certificate profile name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String accountName, String profileName, Context context);
+
+ /**
+ * Revoke a certificate under a certificate profile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param profileName Certificate profile name.
+ * @param body Parameters to revoke the certificate profile.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response revokeCertificateWithResponse(String resourceGroupName, String accountName, String profileName,
+ RevokeCertificate body, Context context);
+
+ /**
+ * Revoke a certificate under a certificate profile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param profileName Certificate profile name.
+ * @param body Parameters to revoke the certificate profile.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void revokeCertificate(String resourceGroupName, String accountName, String profileName, RevokeCertificate body);
+}
diff --git a/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/fluent/CodeSigningAccountsClient.java b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/fluent/CodeSigningAccountsClient.java
new file mode 100644
index 0000000000000..f34e7ce2002c9
--- /dev/null
+++ b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/fluent/CodeSigningAccountsClient.java
@@ -0,0 +1,297 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.codesigning.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.codesigning.fluent.models.CheckNameAvailabilityResultInner;
+import com.azure.resourcemanager.codesigning.fluent.models.CodeSigningAccountInner;
+import com.azure.resourcemanager.codesigning.models.CheckNameAvailability;
+import com.azure.resourcemanager.codesigning.models.CodeSigningAccountPatch;
+
+/**
+ * An instance of this class provides access to all the operations defined in CodeSigningAccountsClient.
+ */
+public interface CodeSigningAccountsClient {
+ /**
+ * Checks that the trusted signing account name is valid and is not already in use.
+ *
+ * @param body The CheckAvailability request.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the CheckNameAvailability operation response along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response checkNameAvailabilityWithResponse(CheckNameAvailability body,
+ Context context);
+
+ /**
+ * Checks that the trusted signing account name is valid and is not already in use.
+ *
+ * @param body The CheckAvailability request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the CheckNameAvailability operation response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CheckNameAvailabilityResultInner checkNameAvailability(CheckNameAvailability body);
+
+ /**
+ * Lists trusted signing accounts within a subscription.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a CodeSigningAccount list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Lists trusted signing accounts within a subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a CodeSigningAccount list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
+ /**
+ * Lists trusted signing accounts within a resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a CodeSigningAccount list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * Lists trusted signing accounts within a resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a CodeSigningAccount list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * Get a trusted Signing Account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a trusted Signing Account along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(String resourceGroupName, String accountName,
+ Context context);
+
+ /**
+ * Get a trusted Signing Account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a trusted Signing Account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CodeSigningAccountInner getByResourceGroup(String resourceGroupName, String accountName);
+
+ /**
+ * Create a trusted Signing Account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param resource Parameters to create the trusted signing account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of trusted signing account resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, CodeSigningAccountInner> beginCreate(String resourceGroupName,
+ String accountName, CodeSigningAccountInner resource);
+
+ /**
+ * Create a trusted Signing Account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param resource Parameters to create the trusted signing account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of trusted signing account resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, CodeSigningAccountInner> beginCreate(String resourceGroupName,
+ String accountName, CodeSigningAccountInner resource, Context context);
+
+ /**
+ * Create a trusted Signing Account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param resource Parameters to create the trusted signing account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return trusted signing account resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CodeSigningAccountInner create(String resourceGroupName, String accountName, CodeSigningAccountInner resource);
+
+ /**
+ * Create a trusted Signing Account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param resource Parameters to create the trusted signing account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return trusted signing account resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CodeSigningAccountInner create(String resourceGroupName, String accountName, CodeSigningAccountInner resource,
+ Context context);
+
+ /**
+ * Update a trusted signing account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param properties Parameters supplied to update the trusted signing account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of trusted signing account resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, CodeSigningAccountInner> beginUpdate(String resourceGroupName,
+ String accountName, CodeSigningAccountPatch properties);
+
+ /**
+ * Update a trusted signing account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param properties Parameters supplied to update the trusted signing account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of trusted signing account resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, CodeSigningAccountInner> beginUpdate(String resourceGroupName,
+ String accountName, CodeSigningAccountPatch properties, Context context);
+
+ /**
+ * Update a trusted signing account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param properties Parameters supplied to update the trusted signing account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return trusted signing account resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CodeSigningAccountInner update(String resourceGroupName, String accountName, CodeSigningAccountPatch properties);
+
+ /**
+ * Update a trusted signing account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param properties Parameters supplied to update the trusted signing account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return trusted signing account resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CodeSigningAccountInner update(String resourceGroupName, String accountName, CodeSigningAccountPatch properties,
+ Context context);
+
+ /**
+ * Delete a trusted signing account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String accountName);
+
+ /**
+ * Delete a trusted signing account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String accountName, Context context);
+
+ /**
+ * Delete a trusted signing account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String accountName);
+
+ /**
+ * Delete a trusted signing account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String accountName, Context context);
+}
diff --git a/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/fluent/CodeSigningManagementClient.java b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/fluent/CodeSigningManagementClient.java
new file mode 100644
index 0000000000000..4617af15344fa
--- /dev/null
+++ b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/fluent/CodeSigningManagementClient.java
@@ -0,0 +1,69 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.codesigning.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/**
+ * The interface for CodeSigningManagementClient class.
+ */
+public interface CodeSigningManagementClient {
+ /**
+ * Gets The ID of the target subscription. The value must be an UUID.
+ *
+ * @return the subscriptionId value.
+ */
+ String getSubscriptionId();
+
+ /**
+ * Gets server parameter.
+ *
+ * @return the endpoint value.
+ */
+ String getEndpoint();
+
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ String getApiVersion();
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ HttpPipeline getHttpPipeline();
+
+ /**
+ * Gets The default poll interval for long-running operation.
+ *
+ * @return the defaultPollInterval value.
+ */
+ Duration getDefaultPollInterval();
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ OperationsClient getOperations();
+
+ /**
+ * Gets the CodeSigningAccountsClient object to access its operations.
+ *
+ * @return the CodeSigningAccountsClient object.
+ */
+ CodeSigningAccountsClient getCodeSigningAccounts();
+
+ /**
+ * Gets the CertificateProfilesClient object to access its operations.
+ *
+ * @return the CertificateProfilesClient object.
+ */
+ CertificateProfilesClient getCertificateProfiles();
+}
diff --git a/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/fluent/OperationsClient.java b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/fluent/OperationsClient.java
new file mode 100644
index 0000000000000..1380579bd06da
--- /dev/null
+++ b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/fluent/OperationsClient.java
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.codesigning.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.codesigning.fluent.models.OperationInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in OperationsClient.
+ */
+public interface OperationsClient {
+ /**
+ * List the operations for the provider.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * List the operations for the provider.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/fluent/models/CertificateProfileInner.java b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/fluent/models/CertificateProfileInner.java
new file mode 100644
index 0000000000000..83bb1e38cf627
--- /dev/null
+++ b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/fluent/models/CertificateProfileInner.java
@@ -0,0 +1,353 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.codesigning.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.codesigning.models.Certificate;
+import com.azure.resourcemanager.codesigning.models.CertificateProfileStatus;
+import com.azure.resourcemanager.codesigning.models.ProfileType;
+import com.azure.resourcemanager.codesigning.models.ProvisioningState;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * Certificate profile resource.
+ */
+@Fluent
+public final class CertificateProfileInner extends ProxyResource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ private CertificateProfileProperties innerProperties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of CertificateProfileInner class.
+ */
+ public CertificateProfileInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The resource-specific properties for this resource.
+ *
+ * @return the innerProperties value.
+ */
+ private CertificateProfileProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Get the profileType property: Profile type of the certificate.
+ *
+ * @return the profileType value.
+ */
+ public ProfileType profileType() {
+ return this.innerProperties() == null ? null : this.innerProperties().profileType();
+ }
+
+ /**
+ * Set the profileType property: Profile type of the certificate.
+ *
+ * @param profileType the profileType value to set.
+ * @return the CertificateProfileInner object itself.
+ */
+ public CertificateProfileInner withProfileType(ProfileType profileType) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new CertificateProfileProperties();
+ }
+ this.innerProperties().withProfileType(profileType);
+ return this;
+ }
+
+ /**
+ * Get the includeStreetAddress property: Whether to include STREET in the certificate subject name.
+ *
+ * @return the includeStreetAddress value.
+ */
+ public Boolean includeStreetAddress() {
+ return this.innerProperties() == null ? null : this.innerProperties().includeStreetAddress();
+ }
+
+ /**
+ * Set the includeStreetAddress property: Whether to include STREET in the certificate subject name.
+ *
+ * @param includeStreetAddress the includeStreetAddress value to set.
+ * @return the CertificateProfileInner object itself.
+ */
+ public CertificateProfileInner withIncludeStreetAddress(Boolean includeStreetAddress) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new CertificateProfileProperties();
+ }
+ this.innerProperties().withIncludeStreetAddress(includeStreetAddress);
+ return this;
+ }
+
+ /**
+ * Get the includeCity property: Whether to include L in the certificate subject name. Applicable only for private
+ * trust, private trust ci profile types.
+ *
+ * @return the includeCity value.
+ */
+ public Boolean includeCity() {
+ return this.innerProperties() == null ? null : this.innerProperties().includeCity();
+ }
+
+ /**
+ * Set the includeCity property: Whether to include L in the certificate subject name. Applicable only for private
+ * trust, private trust ci profile types.
+ *
+ * @param includeCity the includeCity value to set.
+ * @return the CertificateProfileInner object itself.
+ */
+ public CertificateProfileInner withIncludeCity(Boolean includeCity) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new CertificateProfileProperties();
+ }
+ this.innerProperties().withIncludeCity(includeCity);
+ return this;
+ }
+
+ /**
+ * Get the includeState property: Whether to include S in the certificate subject name. Applicable only for private
+ * trust, private trust ci profile types.
+ *
+ * @return the includeState value.
+ */
+ public Boolean includeState() {
+ return this.innerProperties() == null ? null : this.innerProperties().includeState();
+ }
+
+ /**
+ * Set the includeState property: Whether to include S in the certificate subject name. Applicable only for private
+ * trust, private trust ci profile types.
+ *
+ * @param includeState the includeState value to set.
+ * @return the CertificateProfileInner object itself.
+ */
+ public CertificateProfileInner withIncludeState(Boolean includeState) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new CertificateProfileProperties();
+ }
+ this.innerProperties().withIncludeState(includeState);
+ return this;
+ }
+
+ /**
+ * Get the includeCountry property: Whether to include C in the certificate subject name. Applicable only for
+ * private trust, private trust ci profile types.
+ *
+ * @return the includeCountry value.
+ */
+ public Boolean includeCountry() {
+ return this.innerProperties() == null ? null : this.innerProperties().includeCountry();
+ }
+
+ /**
+ * Set the includeCountry property: Whether to include C in the certificate subject name. Applicable only for
+ * private trust, private trust ci profile types.
+ *
+ * @param includeCountry the includeCountry value to set.
+ * @return the CertificateProfileInner object itself.
+ */
+ public CertificateProfileInner withIncludeCountry(Boolean includeCountry) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new CertificateProfileProperties();
+ }
+ this.innerProperties().withIncludeCountry(includeCountry);
+ return this;
+ }
+
+ /**
+ * Get the includePostalCode property: Whether to include PC in the certificate subject name.
+ *
+ * @return the includePostalCode value.
+ */
+ public Boolean includePostalCode() {
+ return this.innerProperties() == null ? null : this.innerProperties().includePostalCode();
+ }
+
+ /**
+ * Set the includePostalCode property: Whether to include PC in the certificate subject name.
+ *
+ * @param includePostalCode the includePostalCode value to set.
+ * @return the CertificateProfileInner object itself.
+ */
+ public CertificateProfileInner withIncludePostalCode(Boolean includePostalCode) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new CertificateProfileProperties();
+ }
+ this.innerProperties().withIncludePostalCode(includePostalCode);
+ return this;
+ }
+
+ /**
+ * Get the identityValidationId property: Identity validation id used for the certificate subject name.
+ *
+ * @return the identityValidationId value.
+ */
+ public String identityValidationId() {
+ return this.innerProperties() == null ? null : this.innerProperties().identityValidationId();
+ }
+
+ /**
+ * Set the identityValidationId property: Identity validation id used for the certificate subject name.
+ *
+ * @param identityValidationId the identityValidationId value to set.
+ * @return the CertificateProfileInner object itself.
+ */
+ public CertificateProfileInner withIdentityValidationId(String identityValidationId) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new CertificateProfileProperties();
+ }
+ this.innerProperties().withIdentityValidationId(identityValidationId);
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: Status of the current operation on certificate profile.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Get the status property: Status of the certificate profile.
+ *
+ * @return the status value.
+ */
+ public CertificateProfileStatus status() {
+ return this.innerProperties() == null ? null : this.innerProperties().status();
+ }
+
+ /**
+ * Get the certificates property: List of renewed certificates.
+ *
+ * @return the certificates value.
+ */
+ public List certificates() {
+ return this.innerProperties() == null ? null : this.innerProperties().certificates();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of CertificateProfileInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of CertificateProfileInner 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 CertificateProfileInner.
+ */
+ public static CertificateProfileInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ CertificateProfileInner deserializedCertificateProfileInner = new CertificateProfileInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedCertificateProfileInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedCertificateProfileInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedCertificateProfileInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedCertificateProfileInner.innerProperties = CertificateProfileProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedCertificateProfileInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedCertificateProfileInner;
+ });
+ }
+}
diff --git a/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/fluent/models/CertificateProfileProperties.java b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/fluent/models/CertificateProfileProperties.java
new file mode 100644
index 0000000000000..107d6690c191b
--- /dev/null
+++ b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/fluent/models/CertificateProfileProperties.java
@@ -0,0 +1,346 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.codesigning.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.codesigning.models.Certificate;
+import com.azure.resourcemanager.codesigning.models.CertificateProfileStatus;
+import com.azure.resourcemanager.codesigning.models.ProfileType;
+import com.azure.resourcemanager.codesigning.models.ProvisioningState;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * Properties of the certificate profile.
+ */
+@Fluent
+public final class CertificateProfileProperties implements JsonSerializable {
+ /*
+ * Profile type of the certificate.
+ */
+ private ProfileType profileType;
+
+ /*
+ * Whether to include STREET in the certificate subject name.
+ */
+ private Boolean includeStreetAddress;
+
+ /*
+ * Whether to include L in the certificate subject name. Applicable only for private trust, private trust ci profile
+ * types
+ */
+ private Boolean includeCity;
+
+ /*
+ * Whether to include S in the certificate subject name. Applicable only for private trust, private trust ci profile
+ * types
+ */
+ private Boolean includeState;
+
+ /*
+ * Whether to include C in the certificate subject name. Applicable only for private trust, private trust ci profile
+ * types
+ */
+ private Boolean includeCountry;
+
+ /*
+ * Whether to include PC in the certificate subject name.
+ */
+ private Boolean includePostalCode;
+
+ /*
+ * Identity validation id used for the certificate subject name.
+ */
+ private String identityValidationId;
+
+ /*
+ * Status of the current operation on certificate profile.
+ */
+ private ProvisioningState provisioningState;
+
+ /*
+ * Status of the certificate profile.
+ */
+ private CertificateProfileStatus status;
+
+ /*
+ * List of renewed certificates.
+ */
+ private List certificates;
+
+ /**
+ * Creates an instance of CertificateProfileProperties class.
+ */
+ public CertificateProfileProperties() {
+ }
+
+ /**
+ * Get the profileType property: Profile type of the certificate.
+ *
+ * @return the profileType value.
+ */
+ public ProfileType profileType() {
+ return this.profileType;
+ }
+
+ /**
+ * Set the profileType property: Profile type of the certificate.
+ *
+ * @param profileType the profileType value to set.
+ * @return the CertificateProfileProperties object itself.
+ */
+ public CertificateProfileProperties withProfileType(ProfileType profileType) {
+ this.profileType = profileType;
+ return this;
+ }
+
+ /**
+ * Get the includeStreetAddress property: Whether to include STREET in the certificate subject name.
+ *
+ * @return the includeStreetAddress value.
+ */
+ public Boolean includeStreetAddress() {
+ return this.includeStreetAddress;
+ }
+
+ /**
+ * Set the includeStreetAddress property: Whether to include STREET in the certificate subject name.
+ *
+ * @param includeStreetAddress the includeStreetAddress value to set.
+ * @return the CertificateProfileProperties object itself.
+ */
+ public CertificateProfileProperties withIncludeStreetAddress(Boolean includeStreetAddress) {
+ this.includeStreetAddress = includeStreetAddress;
+ return this;
+ }
+
+ /**
+ * Get the includeCity property: Whether to include L in the certificate subject name. Applicable only for private
+ * trust, private trust ci profile types.
+ *
+ * @return the includeCity value.
+ */
+ public Boolean includeCity() {
+ return this.includeCity;
+ }
+
+ /**
+ * Set the includeCity property: Whether to include L in the certificate subject name. Applicable only for private
+ * trust, private trust ci profile types.
+ *
+ * @param includeCity the includeCity value to set.
+ * @return the CertificateProfileProperties object itself.
+ */
+ public CertificateProfileProperties withIncludeCity(Boolean includeCity) {
+ this.includeCity = includeCity;
+ return this;
+ }
+
+ /**
+ * Get the includeState property: Whether to include S in the certificate subject name. Applicable only for private
+ * trust, private trust ci profile types.
+ *
+ * @return the includeState value.
+ */
+ public Boolean includeState() {
+ return this.includeState;
+ }
+
+ /**
+ * Set the includeState property: Whether to include S in the certificate subject name. Applicable only for private
+ * trust, private trust ci profile types.
+ *
+ * @param includeState the includeState value to set.
+ * @return the CertificateProfileProperties object itself.
+ */
+ public CertificateProfileProperties withIncludeState(Boolean includeState) {
+ this.includeState = includeState;
+ return this;
+ }
+
+ /**
+ * Get the includeCountry property: Whether to include C in the certificate subject name. Applicable only for
+ * private trust, private trust ci profile types.
+ *
+ * @return the includeCountry value.
+ */
+ public Boolean includeCountry() {
+ return this.includeCountry;
+ }
+
+ /**
+ * Set the includeCountry property: Whether to include C in the certificate subject name. Applicable only for
+ * private trust, private trust ci profile types.
+ *
+ * @param includeCountry the includeCountry value to set.
+ * @return the CertificateProfileProperties object itself.
+ */
+ public CertificateProfileProperties withIncludeCountry(Boolean includeCountry) {
+ this.includeCountry = includeCountry;
+ return this;
+ }
+
+ /**
+ * Get the includePostalCode property: Whether to include PC in the certificate subject name.
+ *
+ * @return the includePostalCode value.
+ */
+ public Boolean includePostalCode() {
+ return this.includePostalCode;
+ }
+
+ /**
+ * Set the includePostalCode property: Whether to include PC in the certificate subject name.
+ *
+ * @param includePostalCode the includePostalCode value to set.
+ * @return the CertificateProfileProperties object itself.
+ */
+ public CertificateProfileProperties withIncludePostalCode(Boolean includePostalCode) {
+ this.includePostalCode = includePostalCode;
+ return this;
+ }
+
+ /**
+ * Get the identityValidationId property: Identity validation id used for the certificate subject name.
+ *
+ * @return the identityValidationId value.
+ */
+ public String identityValidationId() {
+ return this.identityValidationId;
+ }
+
+ /**
+ * Set the identityValidationId property: Identity validation id used for the certificate subject name.
+ *
+ * @param identityValidationId the identityValidationId value to set.
+ * @return the CertificateProfileProperties object itself.
+ */
+ public CertificateProfileProperties withIdentityValidationId(String identityValidationId) {
+ this.identityValidationId = identityValidationId;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: Status of the current operation on certificate profile.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the status property: Status of the certificate profile.
+ *
+ * @return the status value.
+ */
+ public CertificateProfileStatus status() {
+ return this.status;
+ }
+
+ /**
+ * Get the certificates property: List of renewed certificates.
+ *
+ * @return the certificates value.
+ */
+ public List certificates() {
+ return this.certificates;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (profileType() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property profileType in model CertificateProfileProperties"));
+ }
+ if (identityValidationId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property identityValidationId in model CertificateProfileProperties"));
+ }
+ if (certificates() != null) {
+ certificates().forEach(e -> e.validate());
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(CertificateProfileProperties.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("profileType", this.profileType == null ? null : this.profileType.toString());
+ jsonWriter.writeStringField("identityValidationId", this.identityValidationId);
+ jsonWriter.writeBooleanField("includeStreetAddress", this.includeStreetAddress);
+ jsonWriter.writeBooleanField("includeCity", this.includeCity);
+ jsonWriter.writeBooleanField("includeState", this.includeState);
+ jsonWriter.writeBooleanField("includeCountry", this.includeCountry);
+ jsonWriter.writeBooleanField("includePostalCode", this.includePostalCode);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of CertificateProfileProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of CertificateProfileProperties 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 CertificateProfileProperties.
+ */
+ public static CertificateProfileProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ CertificateProfileProperties deserializedCertificateProfileProperties = new CertificateProfileProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("profileType".equals(fieldName)) {
+ deserializedCertificateProfileProperties.profileType = ProfileType.fromString(reader.getString());
+ } else if ("identityValidationId".equals(fieldName)) {
+ deserializedCertificateProfileProperties.identityValidationId = reader.getString();
+ } else if ("includeStreetAddress".equals(fieldName)) {
+ deserializedCertificateProfileProperties.includeStreetAddress
+ = reader.getNullable(JsonReader::getBoolean);
+ } else if ("includeCity".equals(fieldName)) {
+ deserializedCertificateProfileProperties.includeCity = reader.getNullable(JsonReader::getBoolean);
+ } else if ("includeState".equals(fieldName)) {
+ deserializedCertificateProfileProperties.includeState = reader.getNullable(JsonReader::getBoolean);
+ } else if ("includeCountry".equals(fieldName)) {
+ deserializedCertificateProfileProperties.includeCountry
+ = reader.getNullable(JsonReader::getBoolean);
+ } else if ("includePostalCode".equals(fieldName)) {
+ deserializedCertificateProfileProperties.includePostalCode
+ = reader.getNullable(JsonReader::getBoolean);
+ } else if ("provisioningState".equals(fieldName)) {
+ deserializedCertificateProfileProperties.provisioningState
+ = ProvisioningState.fromString(reader.getString());
+ } else if ("status".equals(fieldName)) {
+ deserializedCertificateProfileProperties.status
+ = CertificateProfileStatus.fromString(reader.getString());
+ } else if ("certificates".equals(fieldName)) {
+ List certificates = reader.readArray(reader1 -> Certificate.fromJson(reader1));
+ deserializedCertificateProfileProperties.certificates = certificates;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedCertificateProfileProperties;
+ });
+ }
+}
diff --git a/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/fluent/models/CheckNameAvailabilityResultInner.java b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/fluent/models/CheckNameAvailabilityResultInner.java
new file mode 100644
index 0000000000000..d35041d3c5c18
--- /dev/null
+++ b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/fluent/models/CheckNameAvailabilityResultInner.java
@@ -0,0 +1,121 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.codesigning.fluent.models;
+
+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 com.azure.resourcemanager.codesigning.models.NameUnavailabilityReason;
+import java.io.IOException;
+
+/**
+ * The CheckNameAvailability operation response.
+ */
+@Immutable
+public final class CheckNameAvailabilityResultInner implements JsonSerializable {
+ /*
+ * A boolean value that indicates whether the name is available for you to use. If true, the name is available. If
+ * false, the name has already been taken or is invalid and cannot be used.
+ */
+ private Boolean nameAvailable;
+
+ /*
+ * The reason that a trusted signing account name could not be used. The Reason element is only returned if
+ * nameAvailable is false.
+ */
+ private NameUnavailabilityReason reason;
+
+ /*
+ * An error message explaining the Reason value in more detail.
+ */
+ private String message;
+
+ /**
+ * Creates an instance of CheckNameAvailabilityResultInner class.
+ */
+ public CheckNameAvailabilityResultInner() {
+ }
+
+ /**
+ * Get the nameAvailable property: A boolean value that indicates whether the name is available for you to use. If
+ * true, the name is available. If false, the name has already been taken or is invalid and cannot be used.
+ *
+ * @return the nameAvailable value.
+ */
+ public Boolean nameAvailable() {
+ return this.nameAvailable;
+ }
+
+ /**
+ * Get the reason property: The reason that a trusted signing account name could not be used. The Reason element is
+ * only returned if nameAvailable is false.
+ *
+ * @return the reason value.
+ */
+ public NameUnavailabilityReason reason() {
+ return this.reason;
+ }
+
+ /**
+ * Get the message property: An error message explaining the Reason value in more detail.
+ *
+ * @return the message value.
+ */
+ public String message() {
+ return this.message;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of CheckNameAvailabilityResultInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of CheckNameAvailabilityResultInner if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the CheckNameAvailabilityResultInner.
+ */
+ public static CheckNameAvailabilityResultInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ CheckNameAvailabilityResultInner deserializedCheckNameAvailabilityResultInner
+ = new CheckNameAvailabilityResultInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("nameAvailable".equals(fieldName)) {
+ deserializedCheckNameAvailabilityResultInner.nameAvailable
+ = reader.getNullable(JsonReader::getBoolean);
+ } else if ("reason".equals(fieldName)) {
+ deserializedCheckNameAvailabilityResultInner.reason
+ = NameUnavailabilityReason.fromString(reader.getString());
+ } else if ("message".equals(fieldName)) {
+ deserializedCheckNameAvailabilityResultInner.message = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedCheckNameAvailabilityResultInner;
+ });
+ }
+}
diff --git a/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/fluent/models/CodeSigningAccountInner.java b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/fluent/models/CodeSigningAccountInner.java
new file mode 100644
index 0000000000000..79cc884c72e25
--- /dev/null
+++ b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/fluent/models/CodeSigningAccountInner.java
@@ -0,0 +1,223 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.codesigning.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.codesigning.models.AccountSku;
+import com.azure.resourcemanager.codesigning.models.ProvisioningState;
+import java.io.IOException;
+import java.util.Map;
+
+/**
+ * Trusted signing account resource.
+ */
+@Fluent
+public final class CodeSigningAccountInner extends Resource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ private CodeSigningAccountProperties innerProperties;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ */
+ private SystemData systemData;
+
+ /*
+ * The type of the resource.
+ */
+ private String type;
+
+ /*
+ * The name of the resource.
+ */
+ private String name;
+
+ /*
+ * Fully qualified resource Id for the resource.
+ */
+ private String id;
+
+ /**
+ * Creates an instance of CodeSigningAccountInner class.
+ */
+ public CodeSigningAccountInner() {
+ }
+
+ /**
+ * Get the innerProperties property: The resource-specific properties for this resource.
+ *
+ * @return the innerProperties value.
+ */
+ private CodeSigningAccountProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public CodeSigningAccountInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public CodeSigningAccountInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Get the accountUri property: The URI of the trusted signing account which is used during signing files.
+ *
+ * @return the accountUri value.
+ */
+ public String accountUri() {
+ return this.innerProperties() == null ? null : this.innerProperties().accountUri();
+ }
+
+ /**
+ * Get the sku property: SKU of the trusted signing account.
+ *
+ * @return the sku value.
+ */
+ public AccountSku sku() {
+ return this.innerProperties() == null ? null : this.innerProperties().sku();
+ }
+
+ /**
+ * Set the sku property: SKU of the trusted signing account.
+ *
+ * @param sku the sku value to set.
+ * @return the CodeSigningAccountInner object itself.
+ */
+ public CodeSigningAccountInner withSku(AccountSku sku) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new CodeSigningAccountProperties();
+ }
+ this.innerProperties().withSku(sku);
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: Status of the current operation on trusted signing account.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("location", location());
+ jsonWriter.writeMapField("tags", tags(), (writer, element) -> writer.writeString(element));
+ jsonWriter.writeJsonField("properties", this.innerProperties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of CodeSigningAccountInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of CodeSigningAccountInner 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 CodeSigningAccountInner.
+ */
+ public static CodeSigningAccountInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ CodeSigningAccountInner deserializedCodeSigningAccountInner = new CodeSigningAccountInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedCodeSigningAccountInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedCodeSigningAccountInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedCodeSigningAccountInner.type = reader.getString();
+ } else if ("location".equals(fieldName)) {
+ deserializedCodeSigningAccountInner.withLocation(reader.getString());
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedCodeSigningAccountInner.withTags(tags);
+ } else if ("properties".equals(fieldName)) {
+ deserializedCodeSigningAccountInner.innerProperties = CodeSigningAccountProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedCodeSigningAccountInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedCodeSigningAccountInner;
+ });
+ }
+}
diff --git a/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/fluent/models/CodeSigningAccountPatchProperties.java b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/fluent/models/CodeSigningAccountPatchProperties.java
new file mode 100644
index 0000000000000..10cd001cd1c21
--- /dev/null
+++ b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/fluent/models/CodeSigningAccountPatchProperties.java
@@ -0,0 +1,98 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.codesigning.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.codesigning.models.AccountSkuPatch;
+import java.io.IOException;
+
+/**
+ * Properties of the trusted signing account.
+ */
+@Fluent
+public final class CodeSigningAccountPatchProperties implements JsonSerializable {
+ /*
+ * SKU of the trusted signing account.
+ */
+ private AccountSkuPatch sku;
+
+ /**
+ * Creates an instance of CodeSigningAccountPatchProperties class.
+ */
+ public CodeSigningAccountPatchProperties() {
+ }
+
+ /**
+ * Get the sku property: SKU of the trusted signing account.
+ *
+ * @return the sku value.
+ */
+ public AccountSkuPatch sku() {
+ return this.sku;
+ }
+
+ /**
+ * Set the sku property: SKU of the trusted signing account.
+ *
+ * @param sku the sku value to set.
+ * @return the CodeSigningAccountPatchProperties object itself.
+ */
+ public CodeSigningAccountPatchProperties withSku(AccountSkuPatch sku) {
+ this.sku = sku;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (sku() != null) {
+ sku().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("sku", this.sku);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of CodeSigningAccountPatchProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of CodeSigningAccountPatchProperties if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the CodeSigningAccountPatchProperties.
+ */
+ public static CodeSigningAccountPatchProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ CodeSigningAccountPatchProperties deserializedCodeSigningAccountPatchProperties
+ = new CodeSigningAccountPatchProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("sku".equals(fieldName)) {
+ deserializedCodeSigningAccountPatchProperties.sku = AccountSkuPatch.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedCodeSigningAccountPatchProperties;
+ });
+ }
+}
diff --git a/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/fluent/models/CodeSigningAccountProperties.java b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/fluent/models/CodeSigningAccountProperties.java
new file mode 100644
index 0000000000000..448801b300a5f
--- /dev/null
+++ b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/fluent/models/CodeSigningAccountProperties.java
@@ -0,0 +1,131 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.codesigning.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.codesigning.models.AccountSku;
+import com.azure.resourcemanager.codesigning.models.ProvisioningState;
+import java.io.IOException;
+
+/**
+ * Properties of the trusted signing account.
+ */
+@Fluent
+public final class CodeSigningAccountProperties implements JsonSerializable {
+ /*
+ * The URI of the trusted signing account which is used during signing files.
+ */
+ private String accountUri;
+
+ /*
+ * SKU of the trusted signing account.
+ */
+ private AccountSku sku;
+
+ /*
+ * Status of the current operation on trusted signing account.
+ */
+ private ProvisioningState provisioningState;
+
+ /**
+ * Creates an instance of CodeSigningAccountProperties class.
+ */
+ public CodeSigningAccountProperties() {
+ }
+
+ /**
+ * Get the accountUri property: The URI of the trusted signing account which is used during signing files.
+ *
+ * @return the accountUri value.
+ */
+ public String accountUri() {
+ return this.accountUri;
+ }
+
+ /**
+ * Get the sku property: SKU of the trusted signing account.
+ *
+ * @return the sku value.
+ */
+ public AccountSku sku() {
+ return this.sku;
+ }
+
+ /**
+ * Set the sku property: SKU of the trusted signing account.
+ *
+ * @param sku the sku value to set.
+ * @return the CodeSigningAccountProperties object itself.
+ */
+ public CodeSigningAccountProperties withSku(AccountSku sku) {
+ this.sku = sku;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: Status of the current operation on trusted signing account.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (sku() != null) {
+ sku().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("sku", this.sku);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of CodeSigningAccountProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of CodeSigningAccountProperties if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IOException If an error occurs while reading the CodeSigningAccountProperties.
+ */
+ public static CodeSigningAccountProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ CodeSigningAccountProperties deserializedCodeSigningAccountProperties = new CodeSigningAccountProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("accountUri".equals(fieldName)) {
+ deserializedCodeSigningAccountProperties.accountUri = reader.getString();
+ } else if ("sku".equals(fieldName)) {
+ deserializedCodeSigningAccountProperties.sku = AccountSku.fromJson(reader);
+ } else if ("provisioningState".equals(fieldName)) {
+ deserializedCodeSigningAccountProperties.provisioningState
+ = ProvisioningState.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedCodeSigningAccountProperties;
+ });
+ }
+}
diff --git a/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/fluent/models/OperationInner.java b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/fluent/models/OperationInner.java
new file mode 100644
index 0000000000000..18ba852f0a730
--- /dev/null
+++ b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/fluent/models/OperationInner.java
@@ -0,0 +1,172 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.codesigning.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.codesigning.models.ActionType;
+import com.azure.resourcemanager.codesigning.models.OperationDisplay;
+import com.azure.resourcemanager.codesigning.models.Origin;
+import java.io.IOException;
+
+/**
+ * REST API Operation
+ *
+ * Details of a REST API operation, returned from the Resource Provider Operations API.
+ */
+@Fluent
+public final class OperationInner implements JsonSerializable {
+ /*
+ * The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
+ * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action"
+ */
+ private String name;
+
+ /*
+ * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for
+ * ARM/control-plane operations.
+ */
+ private Boolean isDataAction;
+
+ /*
+ * Localized display information for this particular operation.
+ */
+ private OperationDisplay display;
+
+ /*
+ * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default
+ * value is "user,system"
+ */
+ private Origin origin;
+
+ /*
+ * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
+ */
+ private ActionType actionType;
+
+ /**
+ * Creates an instance of OperationInner class.
+ */
+ public OperationInner() {
+ }
+
+ /**
+ * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
+ * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action".
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane
+ * operations and "false" for ARM/control-plane operations.
+ *
+ * @return the isDataAction value.
+ */
+ public Boolean isDataAction() {
+ return this.isDataAction;
+ }
+
+ /**
+ * Get the display property: Localized display information for this particular operation.
+ *
+ * @return the display value.
+ */
+ public OperationDisplay display() {
+ return this.display;
+ }
+
+ /**
+ * Set the display property: Localized display information for this particular operation.
+ *
+ * @param display the display value to set.
+ * @return the OperationInner object itself.
+ */
+ public OperationInner withDisplay(OperationDisplay display) {
+ this.display = display;
+ return this;
+ }
+
+ /**
+ * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and
+ * audit logs UX. Default value is "user,system".
+ *
+ * @return the origin value.
+ */
+ public Origin origin() {
+ return this.origin;
+ }
+
+ /**
+ * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal
+ * only APIs.
+ *
+ * @return the actionType value.
+ */
+ public ActionType actionType() {
+ return this.actionType;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (display() != null) {
+ display().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("display", this.display);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OperationInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OperationInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the OperationInner.
+ */
+ public static OperationInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OperationInner deserializedOperationInner = new OperationInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("name".equals(fieldName)) {
+ deserializedOperationInner.name = reader.getString();
+ } else if ("isDataAction".equals(fieldName)) {
+ deserializedOperationInner.isDataAction = reader.getNullable(JsonReader::getBoolean);
+ } else if ("display".equals(fieldName)) {
+ deserializedOperationInner.display = OperationDisplay.fromJson(reader);
+ } else if ("origin".equals(fieldName)) {
+ deserializedOperationInner.origin = Origin.fromString(reader.getString());
+ } else if ("actionType".equals(fieldName)) {
+ deserializedOperationInner.actionType = ActionType.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOperationInner;
+ });
+ }
+}
diff --git a/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/fluent/models/Revocation.java b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/fluent/models/Revocation.java
new file mode 100644
index 0000000000000..cdb7054301365
--- /dev/null
+++ b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/fluent/models/Revocation.java
@@ -0,0 +1,229 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.codesigning.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.CoreUtils;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.codesigning.models.RevocationStatus;
+import java.io.IOException;
+import java.time.OffsetDateTime;
+import java.time.format.DateTimeFormatter;
+
+/**
+ * Revocation details of the certificate.
+ */
+@Fluent
+public final class Revocation implements JsonSerializable {
+ /*
+ * The timestamp when the revocation is requested.
+ */
+ private OffsetDateTime requestedAt;
+
+ /*
+ * The timestamp when the revocation is effective.
+ */
+ private OffsetDateTime effectiveAt;
+
+ /*
+ * Reason for revocation.
+ */
+ private String reason;
+
+ /*
+ * Remarks for the revocation.
+ */
+ private String remarks;
+
+ /*
+ * Status of the revocation.
+ */
+ private RevocationStatus status;
+
+ /*
+ * Reason for the revocation failure.
+ */
+ private String failureReason;
+
+ /**
+ * Creates an instance of Revocation class.
+ */
+ public Revocation() {
+ }
+
+ /**
+ * Get the requestedAt property: The timestamp when the revocation is requested.
+ *
+ * @return the requestedAt value.
+ */
+ public OffsetDateTime requestedAt() {
+ return this.requestedAt;
+ }
+
+ /**
+ * Set the requestedAt property: The timestamp when the revocation is requested.
+ *
+ * @param requestedAt the requestedAt value to set.
+ * @return the Revocation object itself.
+ */
+ public Revocation withRequestedAt(OffsetDateTime requestedAt) {
+ this.requestedAt = requestedAt;
+ return this;
+ }
+
+ /**
+ * Get the effectiveAt property: The timestamp when the revocation is effective.
+ *
+ * @return the effectiveAt value.
+ */
+ public OffsetDateTime effectiveAt() {
+ return this.effectiveAt;
+ }
+
+ /**
+ * Set the effectiveAt property: The timestamp when the revocation is effective.
+ *
+ * @param effectiveAt the effectiveAt value to set.
+ * @return the Revocation object itself.
+ */
+ public Revocation withEffectiveAt(OffsetDateTime effectiveAt) {
+ this.effectiveAt = effectiveAt;
+ return this;
+ }
+
+ /**
+ * Get the reason property: Reason for revocation.
+ *
+ * @return the reason value.
+ */
+ public String reason() {
+ return this.reason;
+ }
+
+ /**
+ * Set the reason property: Reason for revocation.
+ *
+ * @param reason the reason value to set.
+ * @return the Revocation object itself.
+ */
+ public Revocation withReason(String reason) {
+ this.reason = reason;
+ return this;
+ }
+
+ /**
+ * Get the remarks property: Remarks for the revocation.
+ *
+ * @return the remarks value.
+ */
+ public String remarks() {
+ return this.remarks;
+ }
+
+ /**
+ * Set the remarks property: Remarks for the revocation.
+ *
+ * @param remarks the remarks value to set.
+ * @return the Revocation object itself.
+ */
+ public Revocation withRemarks(String remarks) {
+ this.remarks = remarks;
+ return this;
+ }
+
+ /**
+ * Get the status property: Status of the revocation.
+ *
+ * @return the status value.
+ */
+ public RevocationStatus status() {
+ return this.status;
+ }
+
+ /**
+ * Get the failureReason property: Reason for the revocation failure.
+ *
+ * @return the failureReason value.
+ */
+ public String failureReason() {
+ return this.failureReason;
+ }
+
+ /**
+ * Set the failureReason property: Reason for the revocation failure.
+ *
+ * @param failureReason the failureReason value to set.
+ * @return the Revocation object itself.
+ */
+ public Revocation withFailureReason(String failureReason) {
+ this.failureReason = failureReason;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("requestedAt",
+ this.requestedAt == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.requestedAt));
+ jsonWriter.writeStringField("effectiveAt",
+ this.effectiveAt == null ? null : DateTimeFormatter.ISO_OFFSET_DATE_TIME.format(this.effectiveAt));
+ jsonWriter.writeStringField("reason", this.reason);
+ jsonWriter.writeStringField("remarks", this.remarks);
+ jsonWriter.writeStringField("failureReason", this.failureReason);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of Revocation from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of Revocation if the JsonReader was pointing to an instance of it, or null if it was pointing
+ * to JSON null.
+ * @throws IOException If an error occurs while reading the Revocation.
+ */
+ public static Revocation fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ Revocation deserializedRevocation = new Revocation();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("requestedAt".equals(fieldName)) {
+ deserializedRevocation.requestedAt = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("effectiveAt".equals(fieldName)) {
+ deserializedRevocation.effectiveAt = reader
+ .getNullable(nonNullReader -> CoreUtils.parseBestOffsetDateTime(nonNullReader.getString()));
+ } else if ("reason".equals(fieldName)) {
+ deserializedRevocation.reason = reader.getString();
+ } else if ("remarks".equals(fieldName)) {
+ deserializedRevocation.remarks = reader.getString();
+ } else if ("status".equals(fieldName)) {
+ deserializedRevocation.status = RevocationStatus.fromString(reader.getString());
+ } else if ("failureReason".equals(fieldName)) {
+ deserializedRevocation.failureReason = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedRevocation;
+ });
+ }
+}
diff --git a/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/fluent/models/package-info.java b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/fluent/models/package-info.java
new file mode 100644
index 0000000000000..a86b94ba4f572
--- /dev/null
+++ b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/fluent/models/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/**
+ * Package containing the inner data models for CodeSigningManagementClient.
+ * Code Signing resource provider api.
+ */
+package com.azure.resourcemanager.codesigning.fluent.models;
diff --git a/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/fluent/package-info.java b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/fluent/package-info.java
new file mode 100644
index 0000000000000..cf5cc6e8eb235
--- /dev/null
+++ b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/fluent/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+/**
+ * Package containing the service clients for CodeSigningManagementClient.
+ * Code Signing resource provider api.
+ */
+package com.azure.resourcemanager.codesigning.fluent;
diff --git a/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/implementation/CertificateProfileImpl.java b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/implementation/CertificateProfileImpl.java
new file mode 100644
index 0000000000000..6e4ad965ddb4e
--- /dev/null
+++ b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/implementation/CertificateProfileImpl.java
@@ -0,0 +1,191 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.codesigning.implementation;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.codesigning.fluent.models.CertificateProfileInner;
+import com.azure.resourcemanager.codesigning.models.Certificate;
+import com.azure.resourcemanager.codesigning.models.CertificateProfile;
+import com.azure.resourcemanager.codesigning.models.CertificateProfileStatus;
+import com.azure.resourcemanager.codesigning.models.ProfileType;
+import com.azure.resourcemanager.codesigning.models.ProvisioningState;
+import com.azure.resourcemanager.codesigning.models.RevokeCertificate;
+import java.util.Collections;
+import java.util.List;
+
+public final class CertificateProfileImpl implements CertificateProfile, CertificateProfile.Definition {
+ private CertificateProfileInner innerObject;
+
+ private final com.azure.resourcemanager.codesigning.CodeSigningManager serviceManager;
+
+ CertificateProfileImpl(CertificateProfileInner innerObject,
+ com.azure.resourcemanager.codesigning.CodeSigningManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public ProfileType profileType() {
+ return this.innerModel().profileType();
+ }
+
+ public Boolean includeStreetAddress() {
+ return this.innerModel().includeStreetAddress();
+ }
+
+ public Boolean includeCity() {
+ return this.innerModel().includeCity();
+ }
+
+ public Boolean includeState() {
+ return this.innerModel().includeState();
+ }
+
+ public Boolean includeCountry() {
+ return this.innerModel().includeCountry();
+ }
+
+ public Boolean includePostalCode() {
+ return this.innerModel().includePostalCode();
+ }
+
+ public String identityValidationId() {
+ return this.innerModel().identityValidationId();
+ }
+
+ public ProvisioningState provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public CertificateProfileStatus status() {
+ return this.innerModel().status();
+ }
+
+ public List certificates() {
+ List inner = this.innerModel().certificates();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public CertificateProfileInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.codesigning.CodeSigningManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String accountName;
+
+ private String profileName;
+
+ public CertificateProfileImpl withExistingCodeSigningAccount(String resourceGroupName, String accountName) {
+ this.resourceGroupName = resourceGroupName;
+ this.accountName = accountName;
+ return this;
+ }
+
+ public CertificateProfile create() {
+ this.innerObject = serviceManager.serviceClient()
+ .getCertificateProfiles()
+ .create(resourceGroupName, accountName, profileName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public CertificateProfile create(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getCertificateProfiles()
+ .create(resourceGroupName, accountName, profileName, this.innerModel(), context);
+ return this;
+ }
+
+ CertificateProfileImpl(String name, com.azure.resourcemanager.codesigning.CodeSigningManager serviceManager) {
+ this.innerObject = new CertificateProfileInner();
+ this.serviceManager = serviceManager;
+ this.profileName = name;
+ }
+
+ public CertificateProfile refresh() {
+ this.innerObject = serviceManager.serviceClient()
+ .getCertificateProfiles()
+ .getWithResponse(resourceGroupName, accountName, profileName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public CertificateProfile refresh(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getCertificateProfiles()
+ .getWithResponse(resourceGroupName, accountName, profileName, context)
+ .getValue();
+ return this;
+ }
+
+ public Response revokeCertificateWithResponse(RevokeCertificate body, Context context) {
+ return serviceManager.certificateProfiles()
+ .revokeCertificateWithResponse(resourceGroupName, accountName, profileName, body, context);
+ }
+
+ public void revokeCertificate(RevokeCertificate body) {
+ serviceManager.certificateProfiles().revokeCertificate(resourceGroupName, accountName, profileName, body);
+ }
+
+ public CertificateProfileImpl withProfileType(ProfileType profileType) {
+ this.innerModel().withProfileType(profileType);
+ return this;
+ }
+
+ public CertificateProfileImpl withIncludeStreetAddress(Boolean includeStreetAddress) {
+ this.innerModel().withIncludeStreetAddress(includeStreetAddress);
+ return this;
+ }
+
+ public CertificateProfileImpl withIncludeCity(Boolean includeCity) {
+ this.innerModel().withIncludeCity(includeCity);
+ return this;
+ }
+
+ public CertificateProfileImpl withIncludeState(Boolean includeState) {
+ this.innerModel().withIncludeState(includeState);
+ return this;
+ }
+
+ public CertificateProfileImpl withIncludeCountry(Boolean includeCountry) {
+ this.innerModel().withIncludeCountry(includeCountry);
+ return this;
+ }
+
+ public CertificateProfileImpl withIncludePostalCode(Boolean includePostalCode) {
+ this.innerModel().withIncludePostalCode(includePostalCode);
+ return this;
+ }
+
+ public CertificateProfileImpl withIdentityValidationId(String identityValidationId) {
+ this.innerModel().withIdentityValidationId(identityValidationId);
+ return this;
+ }
+}
diff --git a/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/implementation/CertificateProfilesClientImpl.java b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/implementation/CertificateProfilesClientImpl.java
new file mode 100644
index 0000000000000..e61276c745b2d
--- /dev/null
+++ b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/implementation/CertificateProfilesClientImpl.java
@@ -0,0 +1,1076 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.codesigning.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+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.Put;
+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.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.codesigning.fluent.CertificateProfilesClient;
+import com.azure.resourcemanager.codesigning.fluent.models.CertificateProfileInner;
+import com.azure.resourcemanager.codesigning.models.CertificateProfileListResult;
+import com.azure.resourcemanager.codesigning.models.RevokeCertificate;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in CertificateProfilesClient.
+ */
+public final class CertificateProfilesClientImpl implements CertificateProfilesClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final CertificateProfilesService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final CodeSigningManagementClientImpl client;
+
+ /**
+ * Initializes an instance of CertificateProfilesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ CertificateProfilesClientImpl(CodeSigningManagementClientImpl client) {
+ this.service = RestProxy.create(CertificateProfilesService.class, client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for CodeSigningManagementClientCertificateProfiles to be used by the
+ * proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "CodeSigningManagemen")
+ public interface CertificateProfilesService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByCodeSigningAccount(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles/{profileName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
+ @PathParam("profileName") String profileName, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles/{profileName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> create(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
+ @PathParam("profileName") String profileName,
+ @BodyParam("application/json") CertificateProfileInner resource, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles/{profileName}")
+ @ExpectedResponses({ 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
+ @PathParam("profileName") String profileName, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}/certificateProfiles/{profileName}/revokeCertificate")
+ @ExpectedResponses({ 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> revokeCertificate(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
+ @PathParam("profileName") String profileName, @BodyParam("application/json") RevokeCertificate body,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByCodeSigningAccountNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * List certificate profiles under a trusted signing account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a CertificateProfile list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>
+ listByCodeSigningAccountSinglePageAsync(String resourceGroupName, String accountName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (accountName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.listByCodeSigningAccount(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List certificate profiles under a trusted signing account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a CertificateProfile list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>
+ listByCodeSigningAccountSinglePageAsync(String resourceGroupName, String accountName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (accountName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByCodeSigningAccount(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * List certificate profiles under a trusted signing account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a CertificateProfile list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByCodeSigningAccountAsync(String resourceGroupName,
+ String accountName) {
+ return new PagedFlux<>(() -> listByCodeSigningAccountSinglePageAsync(resourceGroupName, accountName),
+ nextLink -> listByCodeSigningAccountNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List certificate profiles under a trusted signing account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a CertificateProfile list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByCodeSigningAccountAsync(String resourceGroupName,
+ String accountName, Context context) {
+ return new PagedFlux<>(() -> listByCodeSigningAccountSinglePageAsync(resourceGroupName, accountName, context),
+ nextLink -> listByCodeSigningAccountNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List certificate profiles under a trusted signing account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a CertificateProfile list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByCodeSigningAccount(String resourceGroupName,
+ String accountName) {
+ return new PagedIterable<>(listByCodeSigningAccountAsync(resourceGroupName, accountName));
+ }
+
+ /**
+ * List certificate profiles under a trusted signing account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a CertificateProfile list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByCodeSigningAccount(String resourceGroupName, String accountName,
+ Context context) {
+ return new PagedIterable<>(listByCodeSigningAccountAsync(resourceGroupName, accountName, context));
+ }
+
+ /**
+ * Get details of a certificate profile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param profileName Certificate profile name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return details of a certificate profile along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceGroupName, String accountName,
+ String profileName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (accountName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
+ }
+ if (profileName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accountName, profileName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get details of a certificate profile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param profileName Certificate profile name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return details of a certificate profile along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceGroupName, String accountName,
+ String profileName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (accountName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
+ }
+ if (profileName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, accountName, profileName, accept, context);
+ }
+
+ /**
+ * Get details of a certificate profile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param profileName Certificate profile name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return details of a certificate profile on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String accountName, String profileName) {
+ return getWithResponseAsync(resourceGroupName, accountName, profileName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get details of a certificate profile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param profileName Certificate profile name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return details of a certificate profile along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String resourceGroupName, String accountName,
+ String profileName, Context context) {
+ return getWithResponseAsync(resourceGroupName, accountName, profileName, context).block();
+ }
+
+ /**
+ * Get details of a certificate profile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param profileName Certificate profile name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return details of a certificate profile.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public CertificateProfileInner get(String resourceGroupName, String accountName, String profileName) {
+ return getWithResponse(resourceGroupName, accountName, profileName, Context.NONE).getValue();
+ }
+
+ /**
+ * Create a certificate profile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param profileName Certificate profile name.
+ * @param resource Parameters to create the certificate profile.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return certificate profile resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(String resourceGroupName, String accountName,
+ String profileName, CertificateProfileInner resource) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (accountName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
+ }
+ if (profileName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null."));
+ }
+ if (resource == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null."));
+ } else {
+ resource.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil.withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accountName, profileName, resource, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create a certificate profile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param profileName Certificate profile name.
+ * @param resource Parameters to create the certificate profile.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return certificate profile resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(String resourceGroupName, String accountName,
+ String profileName, CertificateProfileInner resource, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (accountName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
+ }
+ if (profileName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null."));
+ }
+ if (resource == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null."));
+ } else {
+ resource.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, accountName, profileName, resource, accept, context);
+ }
+
+ /**
+ * Create a certificate profile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param profileName Certificate profile name.
+ * @param resource Parameters to create the certificate profile.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of certificate profile resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, CertificateProfileInner> beginCreateAsync(
+ String resourceGroupName, String accountName, String profileName, CertificateProfileInner resource) {
+ Mono>> mono
+ = createWithResponseAsync(resourceGroupName, accountName, profileName, resource);
+ return this.client.getLroResult(mono,
+ this.client.getHttpPipeline(), CertificateProfileInner.class, CertificateProfileInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Create a certificate profile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param profileName Certificate profile name.
+ * @param resource Parameters to create the certificate profile.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of certificate profile resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, CertificateProfileInner> beginCreateAsync(
+ String resourceGroupName, String accountName, String profileName, CertificateProfileInner resource,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono
+ = createWithResponseAsync(resourceGroupName, accountName, profileName, resource, context);
+ return this.client.getLroResult(mono,
+ this.client.getHttpPipeline(), CertificateProfileInner.class, CertificateProfileInner.class, context);
+ }
+
+ /**
+ * Create a certificate profile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param profileName Certificate profile name.
+ * @param resource Parameters to create the certificate profile.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of certificate profile resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, CertificateProfileInner> beginCreate(
+ String resourceGroupName, String accountName, String profileName, CertificateProfileInner resource) {
+ return this.beginCreateAsync(resourceGroupName, accountName, profileName, resource).getSyncPoller();
+ }
+
+ /**
+ * Create a certificate profile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param profileName Certificate profile name.
+ * @param resource Parameters to create the certificate profile.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of certificate profile resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, CertificateProfileInner> beginCreate(
+ String resourceGroupName, String accountName, String profileName, CertificateProfileInner resource,
+ Context context) {
+ return this.beginCreateAsync(resourceGroupName, accountName, profileName, resource, context).getSyncPoller();
+ }
+
+ /**
+ * Create a certificate profile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param profileName Certificate profile name.
+ * @param resource Parameters to create the certificate profile.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return certificate profile resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(String resourceGroupName, String accountName, String profileName,
+ CertificateProfileInner resource) {
+ return beginCreateAsync(resourceGroupName, accountName, profileName, resource).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create a certificate profile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param profileName Certificate profile name.
+ * @param resource Parameters to create the certificate profile.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return certificate profile resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(String resourceGroupName, String accountName, String profileName,
+ CertificateProfileInner resource, Context context) {
+ return beginCreateAsync(resourceGroupName, accountName, profileName, resource, context).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create a certificate profile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param profileName Certificate profile name.
+ * @param resource Parameters to create the certificate profile.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return certificate profile resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public CertificateProfileInner create(String resourceGroupName, String accountName, String profileName,
+ CertificateProfileInner resource) {
+ return createAsync(resourceGroupName, accountName, profileName, resource).block();
+ }
+
+ /**
+ * Create a certificate profile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param profileName Certificate profile name.
+ * @param resource Parameters to create the certificate profile.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return certificate profile resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public CertificateProfileInner create(String resourceGroupName, String accountName, String profileName,
+ CertificateProfileInner resource, Context context) {
+ return createAsync(resourceGroupName, accountName, profileName, resource, context).block();
+ }
+
+ /**
+ * Delete a certificate profile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param profileName Certificate profile name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(String resourceGroupName, String accountName,
+ String profileName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (accountName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
+ }
+ if (profileName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accountName, profileName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Delete a certificate profile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param profileName Certificate profile name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(String resourceGroupName, String accountName,
+ String profileName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (accountName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
+ }
+ if (profileName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, accountName, profileName, accept, context);
+ }
+
+ /**
+ * Delete a certificate profile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param profileName Certificate profile name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String accountName,
+ String profileName) {
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, accountName, profileName);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Delete a certificate profile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param profileName Certificate profile name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String accountName,
+ String profileName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono
+ = deleteWithResponseAsync(resourceGroupName, accountName, profileName, context);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ context);
+ }
+
+ /**
+ * Delete a certificate profile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param profileName Certificate profile name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName,
+ String profileName) {
+ return this.beginDeleteAsync(resourceGroupName, accountName, profileName).getSyncPoller();
+ }
+
+ /**
+ * Delete a certificate profile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param profileName Certificate profile name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName,
+ String profileName, Context context) {
+ return this.beginDeleteAsync(resourceGroupName, accountName, profileName, context).getSyncPoller();
+ }
+
+ /**
+ * Delete a certificate profile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param profileName Certificate profile name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String accountName, String profileName) {
+ return beginDeleteAsync(resourceGroupName, accountName, profileName).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete a certificate profile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param profileName Certificate profile name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String accountName, String profileName, Context context) {
+ return beginDeleteAsync(resourceGroupName, accountName, profileName, context).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete a certificate profile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param profileName Certificate profile name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String accountName, String profileName) {
+ deleteAsync(resourceGroupName, accountName, profileName).block();
+ }
+
+ /**
+ * Delete a certificate profile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param profileName Certificate profile name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String accountName, String profileName, Context context) {
+ deleteAsync(resourceGroupName, accountName, profileName, context).block();
+ }
+
+ /**
+ * Revoke a certificate under a certificate profile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param profileName Certificate profile name.
+ * @param body Parameters to revoke the certificate profile.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> revokeCertificateWithResponseAsync(String resourceGroupName, String accountName,
+ String profileName, RevokeCertificate body) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (accountName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
+ }
+ if (profileName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null."));
+ }
+ if (body == null) {
+ return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null."));
+ } else {
+ body.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.revokeCertificate(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accountName, profileName, body, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Revoke a certificate under a certificate profile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param profileName Certificate profile name.
+ * @param body Parameters to revoke the certificate profile.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> revokeCertificateWithResponseAsync(String resourceGroupName, String accountName,
+ String profileName, RevokeCertificate body, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (accountName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
+ }
+ if (profileName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter profileName is required and cannot be null."));
+ }
+ if (body == null) {
+ return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null."));
+ } else {
+ body.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.revokeCertificate(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accountName, profileName, body, accept, context);
+ }
+
+ /**
+ * Revoke a certificate under a certificate profile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param profileName Certificate profile name.
+ * @param body Parameters to revoke the certificate profile.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono revokeCertificateAsync(String resourceGroupName, String accountName, String profileName,
+ RevokeCertificate body) {
+ return revokeCertificateWithResponseAsync(resourceGroupName, accountName, profileName, body)
+ .flatMap(ignored -> Mono.empty());
+ }
+
+ /**
+ * Revoke a certificate under a certificate profile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param profileName Certificate profile name.
+ * @param body Parameters to revoke the certificate profile.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response revokeCertificateWithResponse(String resourceGroupName, String accountName,
+ String profileName, RevokeCertificate body, Context context) {
+ return revokeCertificateWithResponseAsync(resourceGroupName, accountName, profileName, body, context).block();
+ }
+
+ /**
+ * Revoke a certificate under a certificate profile.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param profileName Certificate profile name.
+ * @param body Parameters to revoke the certificate profile.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void revokeCertificate(String resourceGroupName, String accountName, String profileName,
+ RevokeCertificate body) {
+ revokeCertificateWithResponse(resourceGroupName, accountName, profileName, body, Context.NONE);
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a CertificateProfile list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByCodeSigningAccountNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.listByCodeSigningAccountNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a CertificateProfile list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByCodeSigningAccountNextSinglePageAsync(String nextLink,
+ Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.listByCodeSigningAccountNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+}
diff --git a/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/implementation/CertificateProfilesImpl.java b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/implementation/CertificateProfilesImpl.java
new file mode 100644
index 0000000000000..e94375a633036
--- /dev/null
+++ b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/implementation/CertificateProfilesImpl.java
@@ -0,0 +1,171 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.codesigning.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.codesigning.fluent.CertificateProfilesClient;
+import com.azure.resourcemanager.codesigning.fluent.models.CertificateProfileInner;
+import com.azure.resourcemanager.codesigning.models.CertificateProfile;
+import com.azure.resourcemanager.codesigning.models.CertificateProfiles;
+import com.azure.resourcemanager.codesigning.models.RevokeCertificate;
+
+public final class CertificateProfilesImpl implements CertificateProfiles {
+ private static final ClientLogger LOGGER = new ClientLogger(CertificateProfilesImpl.class);
+
+ private final CertificateProfilesClient innerClient;
+
+ private final com.azure.resourcemanager.codesigning.CodeSigningManager serviceManager;
+
+ public CertificateProfilesImpl(CertificateProfilesClient innerClient,
+ com.azure.resourcemanager.codesigning.CodeSigningManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable listByCodeSigningAccount(String resourceGroupName, String accountName) {
+ PagedIterable inner
+ = this.serviceClient().listByCodeSigningAccount(resourceGroupName, accountName);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new CertificateProfileImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByCodeSigningAccount(String resourceGroupName, String accountName,
+ Context context) {
+ PagedIterable inner
+ = this.serviceClient().listByCodeSigningAccount(resourceGroupName, accountName, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new CertificateProfileImpl(inner1, this.manager()));
+ }
+
+ public Response getWithResponse(String resourceGroupName, String accountName,
+ String profileName, Context context) {
+ Response inner
+ = this.serviceClient().getWithResponse(resourceGroupName, accountName, profileName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new CertificateProfileImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public CertificateProfile get(String resourceGroupName, String accountName, String profileName) {
+ CertificateProfileInner inner = this.serviceClient().get(resourceGroupName, accountName, profileName);
+ if (inner != null) {
+ return new CertificateProfileImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public void delete(String resourceGroupName, String accountName, String profileName) {
+ this.serviceClient().delete(resourceGroupName, accountName, profileName);
+ }
+
+ public void delete(String resourceGroupName, String accountName, String profileName, Context context) {
+ this.serviceClient().delete(resourceGroupName, accountName, profileName, context);
+ }
+
+ public Response revokeCertificateWithResponse(String resourceGroupName, String accountName,
+ String profileName, RevokeCertificate body, Context context) {
+ return this.serviceClient()
+ .revokeCertificateWithResponse(resourceGroupName, accountName, profileName, body, context);
+ }
+
+ public void revokeCertificate(String resourceGroupName, String accountName, String profileName,
+ RevokeCertificate body) {
+ this.serviceClient().revokeCertificate(resourceGroupName, accountName, profileName, body);
+ }
+
+ public CertificateProfile getById(String id) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String accountName = ResourceManagerUtils.getValueFromIdByName(id, "codeSigningAccounts");
+ if (accountName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'codeSigningAccounts'.", id)));
+ }
+ String profileName = ResourceManagerUtils.getValueFromIdByName(id, "certificateProfiles");
+ if (profileName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'certificateProfiles'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, accountName, profileName, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String accountName = ResourceManagerUtils.getValueFromIdByName(id, "codeSigningAccounts");
+ if (accountName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'codeSigningAccounts'.", id)));
+ }
+ String profileName = ResourceManagerUtils.getValueFromIdByName(id, "certificateProfiles");
+ if (profileName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'certificateProfiles'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, accountName, profileName, context);
+ }
+
+ public void deleteById(String id) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String accountName = ResourceManagerUtils.getValueFromIdByName(id, "codeSigningAccounts");
+ if (accountName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'codeSigningAccounts'.", id)));
+ }
+ String profileName = ResourceManagerUtils.getValueFromIdByName(id, "certificateProfiles");
+ if (profileName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'certificateProfiles'.", id)));
+ }
+ this.delete(resourceGroupName, accountName, profileName, Context.NONE);
+ }
+
+ public void deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String accountName = ResourceManagerUtils.getValueFromIdByName(id, "codeSigningAccounts");
+ if (accountName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'codeSigningAccounts'.", id)));
+ }
+ String profileName = ResourceManagerUtils.getValueFromIdByName(id, "certificateProfiles");
+ if (profileName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'certificateProfiles'.", id)));
+ }
+ this.delete(resourceGroupName, accountName, profileName, context);
+ }
+
+ private CertificateProfilesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.codesigning.CodeSigningManager manager() {
+ return this.serviceManager;
+ }
+
+ public CertificateProfileImpl define(String name) {
+ return new CertificateProfileImpl(name, this.manager());
+ }
+}
diff --git a/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/implementation/CheckNameAvailabilityResultImpl.java b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/implementation/CheckNameAvailabilityResultImpl.java
new file mode 100644
index 0000000000000..84453c07b3bf4
--- /dev/null
+++ b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/implementation/CheckNameAvailabilityResultImpl.java
@@ -0,0 +1,41 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.codesigning.implementation;
+
+import com.azure.resourcemanager.codesigning.fluent.models.CheckNameAvailabilityResultInner;
+import com.azure.resourcemanager.codesigning.models.CheckNameAvailabilityResult;
+import com.azure.resourcemanager.codesigning.models.NameUnavailabilityReason;
+
+public final class CheckNameAvailabilityResultImpl implements CheckNameAvailabilityResult {
+ private CheckNameAvailabilityResultInner innerObject;
+
+ private final com.azure.resourcemanager.codesigning.CodeSigningManager serviceManager;
+
+ CheckNameAvailabilityResultImpl(CheckNameAvailabilityResultInner innerObject,
+ com.azure.resourcemanager.codesigning.CodeSigningManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public Boolean nameAvailable() {
+ return this.innerModel().nameAvailable();
+ }
+
+ public NameUnavailabilityReason reason() {
+ return this.innerModel().reason();
+ }
+
+ public String message() {
+ return this.innerModel().message();
+ }
+
+ public CheckNameAvailabilityResultInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.codesigning.CodeSigningManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/implementation/CodeSigningAccountImpl.java b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/implementation/CodeSigningAccountImpl.java
new file mode 100644
index 0000000000000..f47434c228339
--- /dev/null
+++ b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/implementation/CodeSigningAccountImpl.java
@@ -0,0 +1,193 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.codesigning.implementation;
+
+import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.codesigning.fluent.models.CodeSigningAccountInner;
+import com.azure.resourcemanager.codesigning.models.AccountSku;
+import com.azure.resourcemanager.codesigning.models.AccountSkuPatch;
+import com.azure.resourcemanager.codesigning.models.CodeSigningAccount;
+import com.azure.resourcemanager.codesigning.models.CodeSigningAccountPatch;
+import com.azure.resourcemanager.codesigning.models.ProvisioningState;
+import java.util.Collections;
+import java.util.Map;
+
+public final class CodeSigningAccountImpl
+ implements CodeSigningAccount, CodeSigningAccount.Definition, CodeSigningAccount.Update {
+ private CodeSigningAccountInner innerObject;
+
+ private final com.azure.resourcemanager.codesigning.CodeSigningManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String location() {
+ return this.innerModel().location();
+ }
+
+ public Map tags() {
+ Map inner = this.innerModel().tags();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public String accountUri() {
+ return this.innerModel().accountUri();
+ }
+
+ public AccountSku sku() {
+ return this.innerModel().sku();
+ }
+
+ public ProvisioningState provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public CodeSigningAccountInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.codesigning.CodeSigningManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String accountName;
+
+ private CodeSigningAccountPatch updateProperties;
+
+ public CodeSigningAccountImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public CodeSigningAccount create() {
+ this.innerObject = serviceManager.serviceClient()
+ .getCodeSigningAccounts()
+ .create(resourceGroupName, accountName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public CodeSigningAccount create(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getCodeSigningAccounts()
+ .create(resourceGroupName, accountName, this.innerModel(), context);
+ return this;
+ }
+
+ CodeSigningAccountImpl(String name, com.azure.resourcemanager.codesigning.CodeSigningManager serviceManager) {
+ this.innerObject = new CodeSigningAccountInner();
+ this.serviceManager = serviceManager;
+ this.accountName = name;
+ }
+
+ public CodeSigningAccountImpl update() {
+ this.updateProperties = new CodeSigningAccountPatch();
+ return this;
+ }
+
+ public CodeSigningAccount apply() {
+ this.innerObject = serviceManager.serviceClient()
+ .getCodeSigningAccounts()
+ .update(resourceGroupName, accountName, updateProperties, Context.NONE);
+ return this;
+ }
+
+ public CodeSigningAccount apply(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getCodeSigningAccounts()
+ .update(resourceGroupName, accountName, updateProperties, context);
+ return this;
+ }
+
+ CodeSigningAccountImpl(CodeSigningAccountInner innerObject,
+ com.azure.resourcemanager.codesigning.CodeSigningManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.accountName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "codeSigningAccounts");
+ }
+
+ public CodeSigningAccount refresh() {
+ this.innerObject = serviceManager.serviceClient()
+ .getCodeSigningAccounts()
+ .getByResourceGroupWithResponse(resourceGroupName, accountName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public CodeSigningAccount refresh(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getCodeSigningAccounts()
+ .getByResourceGroupWithResponse(resourceGroupName, accountName, context)
+ .getValue();
+ return this;
+ }
+
+ public CodeSigningAccountImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public CodeSigningAccountImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public CodeSigningAccountImpl withTags(Map tags) {
+ if (isInCreateMode()) {
+ this.innerModel().withTags(tags);
+ return this;
+ } else {
+ this.updateProperties.withTags(tags);
+ return this;
+ }
+ }
+
+ public CodeSigningAccountImpl withSku(AccountSku sku) {
+ this.innerModel().withSku(sku);
+ return this;
+ }
+
+ public CodeSigningAccountImpl withSku(AccountSkuPatch sku) {
+ this.updateProperties.withSku(sku);
+ return this;
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/implementation/CodeSigningAccountsClientImpl.java b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/implementation/CodeSigningAccountsClientImpl.java
new file mode 100644
index 0000000000000..3dc04156affcb
--- /dev/null
+++ b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/implementation/CodeSigningAccountsClientImpl.java
@@ -0,0 +1,1397 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.codesigning.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+import com.azure.core.annotation.Put;
+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.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.codesigning.fluent.CodeSigningAccountsClient;
+import com.azure.resourcemanager.codesigning.fluent.models.CheckNameAvailabilityResultInner;
+import com.azure.resourcemanager.codesigning.fluent.models.CodeSigningAccountInner;
+import com.azure.resourcemanager.codesigning.models.CheckNameAvailability;
+import com.azure.resourcemanager.codesigning.models.CodeSigningAccountListResult;
+import com.azure.resourcemanager.codesigning.models.CodeSigningAccountPatch;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in CodeSigningAccountsClient.
+ */
+public final class CodeSigningAccountsClientImpl implements CodeSigningAccountsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final CodeSigningAccountsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final CodeSigningManagementClientImpl client;
+
+ /**
+ * Initializes an instance of CodeSigningAccountsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ CodeSigningAccountsClientImpl(CodeSigningManagementClientImpl client) {
+ this.service = RestProxy.create(CodeSigningAccountsService.class, client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for CodeSigningManagementClientCodeSigningAccounts to be used by the
+ * proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "CodeSigningManagemen")
+ public interface CodeSigningAccountsService {
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/providers/Microsoft.CodeSigning/checkNameAvailability")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> checkNameAvailability(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @BodyParam("application/json") CheckNameAvailability body, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.CodeSigning/codeSigningAccounts")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResourceGroup(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> create(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
+ @BodyParam("application/json") CodeSigningAccountInner resource, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> update(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
+ @BodyParam("application/json") CodeSigningAccountPatch properties, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CodeSigning/codeSigningAccounts/{accountName}")
+ @ExpectedResponses({ 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName, @PathParam("accountName") String accountName,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listBySubscriptionNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroupNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Checks that the trusted signing account name is valid and is not already in use.
+ *
+ * @param body The CheckAvailability request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the CheckNameAvailability operation response along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>
+ checkNameAvailabilityWithResponseAsync(CheckNameAvailability body) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (body == null) {
+ return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null."));
+ } else {
+ body.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.checkNameAvailability(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), body, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Checks that the trusted signing account name is valid and is not already in use.
+ *
+ * @param body The CheckAvailability request.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the CheckNameAvailability operation response along with {@link Response} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>
+ checkNameAvailabilityWithResponseAsync(CheckNameAvailability body, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (body == null) {
+ return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null."));
+ } else {
+ body.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.checkNameAvailability(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), body, accept, context);
+ }
+
+ /**
+ * Checks that the trusted signing account name is valid and is not already in use.
+ *
+ * @param body The CheckAvailability request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the CheckNameAvailability operation response on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono checkNameAvailabilityAsync(CheckNameAvailability body) {
+ return checkNameAvailabilityWithResponseAsync(body).flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Checks that the trusted signing account name is valid and is not already in use.
+ *
+ * @param body The CheckAvailability request.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the CheckNameAvailability operation response along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response checkNameAvailabilityWithResponse(CheckNameAvailability body,
+ Context context) {
+ return checkNameAvailabilityWithResponseAsync(body, context).block();
+ }
+
+ /**
+ * Checks that the trusted signing account name is valid and is not already in use.
+ *
+ * @param body The CheckAvailability request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the CheckNameAvailability operation response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public CheckNameAvailabilityResultInner checkNameAvailability(CheckNameAvailability body) {
+ return checkNameAvailabilityWithResponse(body, Context.NONE).getValue();
+ }
+
+ /**
+ * Lists trusted signing accounts within a subscription.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a CodeSigningAccount list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync() {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Lists trusted signing accounts within a subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a CodeSigningAccount list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept,
+ context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * Lists trusted signing accounts within a subscription.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a CodeSigningAccount list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists trusted signing accounts within a subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a CodeSigningAccount list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(() -> listSinglePageAsync(context),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Lists trusted signing accounts within a subscription.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a CodeSigningAccount list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * Lists trusted signing accounts within a subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a CodeSigningAccount list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * Lists trusted signing accounts within a resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a CodeSigningAccount list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Lists trusted signing accounts within a resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a CodeSigningAccount list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * Lists trusted signing accounts within a resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a CodeSigningAccount list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
+ return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists trusted signing accounts within a resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a CodeSigningAccount list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) {
+ return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Lists trusted signing accounts within a resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a CodeSigningAccount list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName));
+ }
+
+ /**
+ * Lists trusted signing accounts within a resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a CodeSigningAccount list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context));
+ }
+
+ /**
+ * Get a trusted Signing Account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a trusted Signing Account along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName,
+ String accountName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (accountName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a trusted Signing Account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a trusted Signing Account along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName,
+ String accountName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (accountName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context);
+ }
+
+ /**
+ * Get a trusted Signing Account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a trusted Signing Account on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getByResourceGroupAsync(String resourceGroupName, String accountName) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, accountName)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get a trusted Signing Account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a trusted Signing Account along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getByResourceGroupWithResponse(String resourceGroupName,
+ String accountName, Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, accountName, context).block();
+ }
+
+ /**
+ * Get a trusted Signing Account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a trusted Signing Account.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public CodeSigningAccountInner getByResourceGroup(String resourceGroupName, String accountName) {
+ return getByResourceGroupWithResponse(resourceGroupName, accountName, Context.NONE).getValue();
+ }
+
+ /**
+ * Create a trusted Signing Account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param resource Parameters to create the trusted signing account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return trusted signing account resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(String resourceGroupName, String accountName,
+ CodeSigningAccountInner resource) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (accountName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
+ }
+ if (resource == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null."));
+ } else {
+ resource.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.create(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accountName, resource, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create a trusted Signing Account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param resource Parameters to create the trusted signing account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return trusted signing account resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(String resourceGroupName, String accountName,
+ CodeSigningAccountInner resource, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (accountName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
+ }
+ if (resource == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resource is required and cannot be null."));
+ } else {
+ resource.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.create(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, accountName, resource, accept, context);
+ }
+
+ /**
+ * Create a trusted Signing Account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param resource Parameters to create the trusted signing account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of trusted signing account resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, CodeSigningAccountInner>
+ beginCreateAsync(String resourceGroupName, String accountName, CodeSigningAccountInner resource) {
+ Mono>> mono = createWithResponseAsync(resourceGroupName, accountName, resource);
+ return this.client.getLroResult(mono,
+ this.client.getHttpPipeline(), CodeSigningAccountInner.class, CodeSigningAccountInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Create a trusted Signing Account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param resource Parameters to create the trusted signing account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of trusted signing account resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, CodeSigningAccountInner> beginCreateAsync(
+ String resourceGroupName, String accountName, CodeSigningAccountInner resource, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono
+ = createWithResponseAsync(resourceGroupName, accountName, resource, context);
+ return this.client.getLroResult(mono,
+ this.client.getHttpPipeline(), CodeSigningAccountInner.class, CodeSigningAccountInner.class, context);
+ }
+
+ /**
+ * Create a trusted Signing Account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param resource Parameters to create the trusted signing account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of trusted signing account resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, CodeSigningAccountInner>
+ beginCreate(String resourceGroupName, String accountName, CodeSigningAccountInner resource) {
+ return this.beginCreateAsync(resourceGroupName, accountName, resource).getSyncPoller();
+ }
+
+ /**
+ * Create a trusted Signing Account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param resource Parameters to create the trusted signing account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of trusted signing account resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, CodeSigningAccountInner>
+ beginCreate(String resourceGroupName, String accountName, CodeSigningAccountInner resource, Context context) {
+ return this.beginCreateAsync(resourceGroupName, accountName, resource, context).getSyncPoller();
+ }
+
+ /**
+ * Create a trusted Signing Account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param resource Parameters to create the trusted signing account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return trusted signing account resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(String resourceGroupName, String accountName,
+ CodeSigningAccountInner resource) {
+ return beginCreateAsync(resourceGroupName, accountName, resource).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create a trusted Signing Account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param resource Parameters to create the trusted signing account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return trusted signing account resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(String resourceGroupName, String accountName,
+ CodeSigningAccountInner resource, Context context) {
+ return beginCreateAsync(resourceGroupName, accountName, resource, context).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create a trusted Signing Account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param resource Parameters to create the trusted signing account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return trusted signing account resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public CodeSigningAccountInner create(String resourceGroupName, String accountName,
+ CodeSigningAccountInner resource) {
+ return createAsync(resourceGroupName, accountName, resource).block();
+ }
+
+ /**
+ * Create a trusted Signing Account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param resource Parameters to create the trusted signing account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return trusted signing account resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public CodeSigningAccountInner create(String resourceGroupName, String accountName,
+ CodeSigningAccountInner resource, Context context) {
+ return createAsync(resourceGroupName, accountName, resource, context).block();
+ }
+
+ /**
+ * Update a trusted signing account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param properties Parameters supplied to update the trusted signing account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return trusted signing account resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(String resourceGroupName, String accountName,
+ CodeSigningAccountPatch properties) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (accountName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
+ }
+ if (properties == null) {
+ return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null."));
+ } else {
+ properties.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accountName, properties, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Update a trusted signing account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param properties Parameters supplied to update the trusted signing account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return trusted signing account resource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(String resourceGroupName, String accountName,
+ CodeSigningAccountPatch properties, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (accountName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
+ }
+ if (properties == null) {
+ return Mono.error(new IllegalArgumentException("Parameter properties is required and cannot be null."));
+ } else {
+ properties.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, accountName, properties, accept, context);
+ }
+
+ /**
+ * Update a trusted signing account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param properties Parameters supplied to update the trusted signing account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of trusted signing account resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, CodeSigningAccountInner>
+ beginUpdateAsync(String resourceGroupName, String accountName, CodeSigningAccountPatch properties) {
+ Mono>> mono = updateWithResponseAsync(resourceGroupName, accountName, properties);
+ return this.client.getLroResult(mono,
+ this.client.getHttpPipeline(), CodeSigningAccountInner.class, CodeSigningAccountInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Update a trusted signing account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param properties Parameters supplied to update the trusted signing account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of trusted signing account resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, CodeSigningAccountInner> beginUpdateAsync(
+ String resourceGroupName, String accountName, CodeSigningAccountPatch properties, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono
+ = updateWithResponseAsync(resourceGroupName, accountName, properties, context);
+ return this.client.getLroResult(mono,
+ this.client.getHttpPipeline(), CodeSigningAccountInner.class, CodeSigningAccountInner.class, context);
+ }
+
+ /**
+ * Update a trusted signing account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param properties Parameters supplied to update the trusted signing account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of trusted signing account resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, CodeSigningAccountInner>
+ beginUpdate(String resourceGroupName, String accountName, CodeSigningAccountPatch properties) {
+ return this.beginUpdateAsync(resourceGroupName, accountName, properties).getSyncPoller();
+ }
+
+ /**
+ * Update a trusted signing account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param properties Parameters supplied to update the trusted signing account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of trusted signing account resource.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, CodeSigningAccountInner>
+ beginUpdate(String resourceGroupName, String accountName, CodeSigningAccountPatch properties, Context context) {
+ return this.beginUpdateAsync(resourceGroupName, accountName, properties, context).getSyncPoller();
+ }
+
+ /**
+ * Update a trusted signing account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param properties Parameters supplied to update the trusted signing account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return trusted signing account resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(String resourceGroupName, String accountName,
+ CodeSigningAccountPatch properties) {
+ return beginUpdateAsync(resourceGroupName, accountName, properties).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Update a trusted signing account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param properties Parameters supplied to update the trusted signing account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return trusted signing account resource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(String resourceGroupName, String accountName,
+ CodeSigningAccountPatch properties, Context context) {
+ return beginUpdateAsync(resourceGroupName, accountName, properties, context).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Update a trusted signing account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param properties Parameters supplied to update the trusted signing account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return trusted signing account resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public CodeSigningAccountInner update(String resourceGroupName, String accountName,
+ CodeSigningAccountPatch properties) {
+ return updateAsync(resourceGroupName, accountName, properties).block();
+ }
+
+ /**
+ * Update a trusted signing account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param properties Parameters supplied to update the trusted signing account.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return trusted signing account resource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public CodeSigningAccountInner update(String resourceGroupName, String accountName,
+ CodeSigningAccountPatch properties, Context context) {
+ return updateAsync(resourceGroupName, accountName, properties, context).block();
+ }
+
+ /**
+ * Delete a trusted signing account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(String resourceGroupName, String accountName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (accountName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, accountName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Delete a trusted signing account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(String resourceGroupName, String accountName,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (accountName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter accountName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ resourceGroupName, accountName, accept, context);
+ }
+
+ /**
+ * Delete a trusted signing account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String accountName) {
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, accountName);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Delete a trusted signing account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String accountName,
+ Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, accountName, context);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ context);
+ }
+
+ /**
+ * Delete a trusted signing account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName) {
+ return this.beginDeleteAsync(resourceGroupName, accountName).getSyncPoller();
+ }
+
+ /**
+ * Delete a trusted signing account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String accountName,
+ Context context) {
+ return this.beginDeleteAsync(resourceGroupName, accountName, context).getSyncPoller();
+ }
+
+ /**
+ * Delete a trusted signing account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String accountName) {
+ return beginDeleteAsync(resourceGroupName, accountName).last().flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete a trusted signing account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return A {@link Mono} that completes when a successful response is received.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String accountName, Context context) {
+ return beginDeleteAsync(resourceGroupName, accountName, context).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete a trusted signing account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String accountName) {
+ deleteAsync(resourceGroupName, accountName).block();
+ }
+
+ /**
+ * Delete a trusted signing account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName Trusted Signing account name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String accountName, Context context) {
+ deleteAsync(resourceGroupName, accountName, context).block();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a CodeSigningAccount list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a CodeSigningAccount list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionNextSinglePageAsync(String nextLink,
+ Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a CodeSigningAccount list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(),
+ res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a CodeSigningAccount list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(String nextLink,
+ Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+}
diff --git a/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/implementation/CodeSigningAccountsImpl.java b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/implementation/CodeSigningAccountsImpl.java
new file mode 100644
index 0000000000000..cf39d5a81f5ad
--- /dev/null
+++ b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/implementation/CodeSigningAccountsImpl.java
@@ -0,0 +1,171 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.codesigning.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.codesigning.fluent.CodeSigningAccountsClient;
+import com.azure.resourcemanager.codesigning.fluent.models.CheckNameAvailabilityResultInner;
+import com.azure.resourcemanager.codesigning.fluent.models.CodeSigningAccountInner;
+import com.azure.resourcemanager.codesigning.models.CheckNameAvailability;
+import com.azure.resourcemanager.codesigning.models.CheckNameAvailabilityResult;
+import com.azure.resourcemanager.codesigning.models.CodeSigningAccount;
+import com.azure.resourcemanager.codesigning.models.CodeSigningAccounts;
+
+public final class CodeSigningAccountsImpl implements CodeSigningAccounts {
+ private static final ClientLogger LOGGER = new ClientLogger(CodeSigningAccountsImpl.class);
+
+ private final CodeSigningAccountsClient innerClient;
+
+ private final com.azure.resourcemanager.codesigning.CodeSigningManager serviceManager;
+
+ public CodeSigningAccountsImpl(CodeSigningAccountsClient innerClient,
+ com.azure.resourcemanager.codesigning.CodeSigningManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response checkNameAvailabilityWithResponse(CheckNameAvailability body,
+ Context context) {
+ Response inner
+ = this.serviceClient().checkNameAvailabilityWithResponse(body, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new CheckNameAvailabilityResultImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public CheckNameAvailabilityResult checkNameAvailability(CheckNameAvailability body) {
+ CheckNameAvailabilityResultInner inner = this.serviceClient().checkNameAvailability(body);
+ if (inner != null) {
+ return new CheckNameAvailabilityResultImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new CodeSigningAccountImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new CodeSigningAccountImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new CodeSigningAccountImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ PagedIterable inner
+ = this.serviceClient().listByResourceGroup(resourceGroupName, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new CodeSigningAccountImpl(inner1, this.manager()));
+ }
+
+ public Response getByResourceGroupWithResponse(String resourceGroupName, String accountName,
+ Context context) {
+ Response inner
+ = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, accountName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new CodeSigningAccountImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public CodeSigningAccount getByResourceGroup(String resourceGroupName, String accountName) {
+ CodeSigningAccountInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, accountName);
+ if (inner != null) {
+ return new CodeSigningAccountImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public void deleteByResourceGroup(String resourceGroupName, String accountName) {
+ this.serviceClient().delete(resourceGroupName, accountName);
+ }
+
+ public void delete(String resourceGroupName, String accountName, Context context) {
+ this.serviceClient().delete(resourceGroupName, accountName, context);
+ }
+
+ public CodeSigningAccount getById(String id) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String accountName = ResourceManagerUtils.getValueFromIdByName(id, "codeSigningAccounts");
+ if (accountName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'codeSigningAccounts'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, accountName, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String accountName = ResourceManagerUtils.getValueFromIdByName(id, "codeSigningAccounts");
+ if (accountName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'codeSigningAccounts'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, accountName, context);
+ }
+
+ public void deleteById(String id) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String accountName = ResourceManagerUtils.getValueFromIdByName(id, "codeSigningAccounts");
+ if (accountName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'codeSigningAccounts'.", id)));
+ }
+ this.delete(resourceGroupName, accountName, Context.NONE);
+ }
+
+ public void deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String accountName = ResourceManagerUtils.getValueFromIdByName(id, "codeSigningAccounts");
+ if (accountName == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'codeSigningAccounts'.", id)));
+ }
+ this.delete(resourceGroupName, accountName, context);
+ }
+
+ private CodeSigningAccountsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.codesigning.CodeSigningManager manager() {
+ return this.serviceManager;
+ }
+
+ public CodeSigningAccountImpl define(String name) {
+ return new CodeSigningAccountImpl(name, this.manager());
+ }
+}
diff --git a/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/implementation/CodeSigningManagementClientBuilder.java b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/implementation/CodeSigningManagementClientBuilder.java
new file mode 100644
index 0000000000000..1fe26b6b72d88
--- /dev/null
+++ b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/implementation/CodeSigningManagementClientBuilder.java
@@ -0,0 +1,138 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.codesigning.implementation;
+
+import com.azure.core.annotation.ServiceClientBuilder;
+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.management.AzureEnvironment;
+import com.azure.core.management.serializer.SerializerFactory;
+import com.azure.core.util.serializer.SerializerAdapter;
+import java.time.Duration;
+
+/**
+ * A builder for creating a new instance of the CodeSigningManagementClientImpl type.
+ */
+@ServiceClientBuilder(serviceClients = { CodeSigningManagementClientImpl.class })
+public final class CodeSigningManagementClientBuilder {
+ /*
+ * The ID of the target subscription. The value must be an UUID.
+ */
+ private String subscriptionId;
+
+ /**
+ * Sets The ID of the target subscription. The value must be an UUID.
+ *
+ * @param subscriptionId the subscriptionId value.
+ * @return the CodeSigningManagementClientBuilder.
+ */
+ public CodeSigningManagementClientBuilder subscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /*
+ * server parameter
+ */
+ private String endpoint;
+
+ /**
+ * Sets server parameter.
+ *
+ * @param endpoint the endpoint value.
+ * @return the CodeSigningManagementClientBuilder.
+ */
+ public CodeSigningManagementClientBuilder endpoint(String endpoint) {
+ this.endpoint = endpoint;
+ return this;
+ }
+
+ /*
+ * The environment to connect to
+ */
+ private AzureEnvironment environment;
+
+ /**
+ * Sets The environment to connect to.
+ *
+ * @param environment the environment value.
+ * @return the CodeSigningManagementClientBuilder.
+ */
+ public CodeSigningManagementClientBuilder environment(AzureEnvironment environment) {
+ this.environment = environment;
+ return this;
+ }
+
+ /*
+ * The HTTP pipeline to send requests through
+ */
+ private HttpPipeline pipeline;
+
+ /**
+ * Sets The HTTP pipeline to send requests through.
+ *
+ * @param pipeline the pipeline value.
+ * @return the CodeSigningManagementClientBuilder.
+ */
+ public CodeSigningManagementClientBuilder pipeline(HttpPipeline pipeline) {
+ this.pipeline = pipeline;
+ return this;
+ }
+
+ /*
+ * The default poll interval for long-running operation
+ */
+ private Duration defaultPollInterval;
+
+ /**
+ * Sets The default poll interval for long-running operation.
+ *
+ * @param defaultPollInterval the defaultPollInterval value.
+ * @return the CodeSigningManagementClientBuilder.
+ */
+ public CodeSigningManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = defaultPollInterval;
+ return this;
+ }
+
+ /*
+ * The serializer to serialize an object into a string
+ */
+ private SerializerAdapter serializerAdapter;
+
+ /**
+ * Sets The serializer to serialize an object into a string.
+ *
+ * @param serializerAdapter the serializerAdapter value.
+ * @return the CodeSigningManagementClientBuilder.
+ */
+ public CodeSigningManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
+ this.serializerAdapter = serializerAdapter;
+ return this;
+ }
+
+ /**
+ * Builds an instance of CodeSigningManagementClientImpl with the provided parameters.
+ *
+ * @return an instance of CodeSigningManagementClientImpl.
+ */
+ public CodeSigningManagementClientImpl buildClient() {
+ String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com";
+ AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE;
+ HttpPipeline localPipeline = (pipeline != null)
+ ? pipeline
+ : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build();
+ Duration localDefaultPollInterval
+ = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30);
+ SerializerAdapter localSerializerAdapter = (serializerAdapter != null)
+ ? serializerAdapter
+ : SerializerFactory.createDefaultManagementSerializerAdapter();
+ CodeSigningManagementClientImpl client = new CodeSigningManagementClientImpl(localPipeline,
+ localSerializerAdapter, localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint);
+ return client;
+ }
+}
diff --git a/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/implementation/CodeSigningManagementClientImpl.java b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/implementation/CodeSigningManagementClientImpl.java
new file mode 100644
index 0000000000000..32b68ae8280d0
--- /dev/null
+++ b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/implementation/CodeSigningManagementClientImpl.java
@@ -0,0 +1,320 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.codesigning.implementation;
+
+import com.azure.core.annotation.ServiceClient;
+import com.azure.core.http.HttpHeaderName;
+import com.azure.core.http.HttpHeaders;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpResponse;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.AzureEnvironment;
+import com.azure.core.management.exception.ManagementError;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollerFactory;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.CoreUtils;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.util.polling.AsyncPollResponse;
+import com.azure.core.util.polling.LongRunningOperationStatus;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.serializer.SerializerAdapter;
+import com.azure.core.util.serializer.SerializerEncoding;
+import com.azure.resourcemanager.codesigning.fluent.CertificateProfilesClient;
+import com.azure.resourcemanager.codesigning.fluent.CodeSigningAccountsClient;
+import com.azure.resourcemanager.codesigning.fluent.CodeSigningManagementClient;
+import com.azure.resourcemanager.codesigning.fluent.OperationsClient;
+import java.io.IOException;
+import java.lang.reflect.Type;
+import java.nio.ByteBuffer;
+import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
+import java.time.Duration;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/**
+ * Initializes a new instance of the CodeSigningManagementClientImpl type.
+ */
+@ServiceClient(builder = CodeSigningManagementClientBuilder.class)
+public final class CodeSigningManagementClientImpl implements CodeSigningManagementClient {
+ /**
+ * The ID of the target subscription. The value must be an UUID.
+ */
+ private final String subscriptionId;
+
+ /**
+ * Gets The ID of the target subscription. The value must be an UUID.
+ *
+ * @return the subscriptionId value.
+ */
+ public String getSubscriptionId() {
+ return this.subscriptionId;
+ }
+
+ /**
+ * server parameter.
+ */
+ private final String endpoint;
+
+ /**
+ * Gets server parameter.
+ *
+ * @return the endpoint value.
+ */
+ public String getEndpoint() {
+ return this.endpoint;
+ }
+
+ /**
+ * Api Version.
+ */
+ private final String apiVersion;
+
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ public String getApiVersion() {
+ return this.apiVersion;
+ }
+
+ /**
+ * 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.
+ */
+ SerializerAdapter getSerializerAdapter() {
+ return this.serializerAdapter;
+ }
+
+ /**
+ * The default poll interval for long-running operation.
+ */
+ private final Duration defaultPollInterval;
+
+ /**
+ * Gets The default poll interval for long-running operation.
+ *
+ * @return the defaultPollInterval value.
+ */
+ public Duration getDefaultPollInterval() {
+ return this.defaultPollInterval;
+ }
+
+ /**
+ * The OperationsClient object to access its operations.
+ */
+ private final OperationsClient operations;
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ public OperationsClient getOperations() {
+ return this.operations;
+ }
+
+ /**
+ * The CodeSigningAccountsClient object to access its operations.
+ */
+ private final CodeSigningAccountsClient codeSigningAccounts;
+
+ /**
+ * Gets the CodeSigningAccountsClient object to access its operations.
+ *
+ * @return the CodeSigningAccountsClient object.
+ */
+ public CodeSigningAccountsClient getCodeSigningAccounts() {
+ return this.codeSigningAccounts;
+ }
+
+ /**
+ * The CertificateProfilesClient object to access its operations.
+ */
+ private final CertificateProfilesClient certificateProfiles;
+
+ /**
+ * Gets the CertificateProfilesClient object to access its operations.
+ *
+ * @return the CertificateProfilesClient object.
+ */
+ public CertificateProfilesClient getCertificateProfiles() {
+ return this.certificateProfiles;
+ }
+
+ /**
+ * Initializes an instance of CodeSigningManagementClient client.
+ *
+ * @param httpPipeline The HTTP pipeline to send requests through.
+ * @param serializerAdapter The serializer to serialize an object into a string.
+ * @param defaultPollInterval The default poll interval for long-running operation.
+ * @param environment The Azure environment.
+ * @param subscriptionId The ID of the target subscription. The value must be an UUID.
+ * @param endpoint server parameter.
+ */
+ CodeSigningManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter,
+ Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) {
+ this.httpPipeline = httpPipeline;
+ this.serializerAdapter = serializerAdapter;
+ this.defaultPollInterval = defaultPollInterval;
+ this.subscriptionId = subscriptionId;
+ this.endpoint = endpoint;
+ this.apiVersion = "2024-09-30-preview";
+ this.operations = new OperationsClientImpl(this);
+ this.codeSigningAccounts = new CodeSigningAccountsClientImpl(this);
+ this.certificateProfiles = new CertificateProfilesClientImpl(this);
+ }
+
+ /**
+ * Gets default client context.
+ *
+ * @return the default client context.
+ */
+ public Context getContext() {
+ return Context.NONE;
+ }
+
+ /**
+ * Merges default client context with provided context.
+ *
+ * @param context the context to be merged with default client context.
+ * @return the merged context.
+ */
+ public Context mergeContext(Context context) {
+ return CoreUtils.mergeContexts(this.getContext(), context);
+ }
+
+ /**
+ * Gets long running operation result.
+ *
+ * @param activationResponse the response of activation operation.
+ * @param httpPipeline the http pipeline.
+ * @param pollResultType type of poll result.
+ * @param finalResultType type of final result.
+ * @param context the context shared by all requests.
+ * @param type of poll result.
+ * @param type of final result.
+ * @return poller flux for poll result and final result.
+ */
+ public PollerFlux, U> getLroResult(Mono>> activationResponse,
+ HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) {
+ return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType,
+ defaultPollInterval, activationResponse, context);
+ }
+
+ /**
+ * Gets the final result, or an error, based on last async poll response.
+ *
+ * @param response the last async poll response.
+ * @param type of poll result.
+ * @param type of final result.
+ * @return the final result, or an error.
+ */
+ public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) {
+ if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) {
+ String errorMessage;
+ ManagementError managementError = null;
+ HttpResponse errorResponse = null;
+ PollResult.Error lroError = response.getValue().getError();
+ if (lroError != null) {
+ errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(),
+ lroError.getResponseBody());
+
+ errorMessage = response.getValue().getError().getMessage();
+ String errorBody = response.getValue().getError().getResponseBody();
+ if (errorBody != null) {
+ // try to deserialize error body to ManagementError
+ try {
+ managementError = this.getSerializerAdapter()
+ .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON);
+ if (managementError.getCode() == null || managementError.getMessage() == null) {
+ managementError = null;
+ }
+ } catch (IOException | RuntimeException ioe) {
+ LOGGER.logThrowableAsWarning(ioe);
+ }
+ }
+ } else {
+ // fallback to default error message
+ errorMessage = "Long running operation failed.";
+ }
+ if (managementError == null) {
+ // fallback to default ManagementError
+ managementError = new ManagementError(response.getStatus().toString(), errorMessage);
+ }
+ return Mono.error(new ManagementException(errorMessage, errorResponse, managementError));
+ } else {
+ return response.getFinalResult();
+ }
+ }
+
+ private static final class HttpResponseImpl extends HttpResponse {
+ private final int statusCode;
+
+ private final byte[] responseBody;
+
+ private final HttpHeaders httpHeaders;
+
+ HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) {
+ super(null);
+ this.statusCode = statusCode;
+ this.httpHeaders = httpHeaders;
+ this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8);
+ }
+
+ public int getStatusCode() {
+ return statusCode;
+ }
+
+ public String getHeaderValue(String s) {
+ return httpHeaders.getValue(HttpHeaderName.fromString(s));
+ }
+
+ public HttpHeaders getHeaders() {
+ return httpHeaders;
+ }
+
+ public Flux getBody() {
+ return Flux.just(ByteBuffer.wrap(responseBody));
+ }
+
+ public Mono getBodyAsByteArray() {
+ return Mono.just(responseBody);
+ }
+
+ public Mono getBodyAsString() {
+ return Mono.just(new String(responseBody, StandardCharsets.UTF_8));
+ }
+
+ public Mono getBodyAsString(Charset charset) {
+ return Mono.just(new String(responseBody, charset));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(CodeSigningManagementClientImpl.class);
+}
diff --git a/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/implementation/OperationImpl.java b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/implementation/OperationImpl.java
new file mode 100644
index 0000000000000..6920aea4dc6ec
--- /dev/null
+++ b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/implementation/OperationImpl.java
@@ -0,0 +1,50 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.codesigning.implementation;
+
+import com.azure.resourcemanager.codesigning.fluent.models.OperationInner;
+import com.azure.resourcemanager.codesigning.models.ActionType;
+import com.azure.resourcemanager.codesigning.models.Operation;
+import com.azure.resourcemanager.codesigning.models.OperationDisplay;
+import com.azure.resourcemanager.codesigning.models.Origin;
+
+public final class OperationImpl implements Operation {
+ private OperationInner innerObject;
+
+ private final com.azure.resourcemanager.codesigning.CodeSigningManager serviceManager;
+
+ OperationImpl(OperationInner innerObject, com.azure.resourcemanager.codesigning.CodeSigningManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public Boolean isDataAction() {
+ return this.innerModel().isDataAction();
+ }
+
+ public OperationDisplay display() {
+ return this.innerModel().display();
+ }
+
+ public Origin origin() {
+ return this.innerModel().origin();
+ }
+
+ public ActionType actionType() {
+ return this.innerModel().actionType();
+ }
+
+ public OperationInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.codesigning.CodeSigningManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/implementation/OperationsClientImpl.java b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/implementation/OperationsClientImpl.java
new file mode 100644
index 0000000000000..1cceddbc9d41a
--- /dev/null
+++ b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/implementation/OperationsClientImpl.java
@@ -0,0 +1,235 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.codesigning.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+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.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.resourcemanager.codesigning.fluent.OperationsClient;
+import com.azure.resourcemanager.codesigning.fluent.models.OperationInner;
+import com.azure.resourcemanager.codesigning.models.OperationListResult;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in OperationsClient.
+ */
+public final class OperationsClientImpl implements OperationsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final OperationsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final CodeSigningManagementClientImpl client;
+
+ /**
+ * Initializes an instance of OperationsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ OperationsClientImpl(CodeSigningManagementClientImpl client) {
+ this.service
+ = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for CodeSigningManagementClientOperations to be used by the proxy service
+ * to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "CodeSigningManagemen")
+ public interface OperationsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/providers/Microsoft.CodeSigning/operations")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * List the operations for the provider.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync() {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List the operations for the provider.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * List the operations for the provider.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List the operations for the provider.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(() -> listSinglePageAsync(context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List the operations for the provider.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * List the operations for the provider.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+}
diff --git a/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/implementation/OperationsImpl.java b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/implementation/OperationsImpl.java
new file mode 100644
index 0000000000000..5b00c5c2cb085
--- /dev/null
+++ b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/implementation/OperationsImpl.java
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.codesigning.implementation;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.codesigning.fluent.OperationsClient;
+import com.azure.resourcemanager.codesigning.fluent.models.OperationInner;
+import com.azure.resourcemanager.codesigning.models.Operation;
+import com.azure.resourcemanager.codesigning.models.Operations;
+
+public final class OperationsImpl implements Operations {
+ private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class);
+
+ private final OperationsClient innerClient;
+
+ private final com.azure.resourcemanager.codesigning.CodeSigningManager serviceManager;
+
+ public OperationsImpl(OperationsClient innerClient,
+ com.azure.resourcemanager.codesigning.CodeSigningManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationImpl(inner1, this.manager()));
+ }
+
+ private OperationsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.codesigning.CodeSigningManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/implementation/ResourceManagerUtils.java b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/implementation/ResourceManagerUtils.java
new file mode 100644
index 0000000000000..03583b80bc50d
--- /dev/null
+++ b/sdk/codesigning/azure-resourcemanager-codesigning/src/main/java/com/azure/resourcemanager/codesigning/implementation/ResourceManagerUtils.java
@@ -0,0 +1,195 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.codesigning.implementation;
+
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.util.CoreUtils;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.function.Function;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+import reactor.core.publisher.Flux;
+
+final class ResourceManagerUtils {
+ private ResourceManagerUtils() {
+ }
+
+ static String getValueFromIdByName(String id, String name) {
+ if (id == null) {
+ return null;
+ }
+ Iterator itr = Arrays.stream(id.split("/")).iterator();
+ while (itr.hasNext()) {
+ String part = itr.next();
+ if (part != null && !part.trim().isEmpty()) {
+ if (part.equalsIgnoreCase(name)) {
+ if (itr.hasNext()) {
+ return itr.next();
+ } else {
+ return null;
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) {
+ if (id == null || pathTemplate == null) {
+ return null;
+ }
+ String parameterNameParentheses = "{" + parameterName + "}";
+ List idSegmentsReverted = Arrays.asList(id.split("/"));
+ List pathSegments = Arrays.asList(pathTemplate.split("/"));
+ Collections.reverse(idSegmentsReverted);
+ Iterator idItrReverted = idSegmentsReverted.iterator();
+ int pathIndex = pathSegments.size();
+ while (idItrReverted.hasNext() && pathIndex > 0) {
+ String idSegment = idItrReverted.next();
+ String pathSegment = pathSegments.get(--pathIndex);
+ if (!CoreUtils.isNullOrEmpty(idSegment) && !CoreUtils.isNullOrEmpty(pathSegment)) {
+ if (pathSegment.equalsIgnoreCase(parameterNameParentheses)) {
+ if (pathIndex == 0 || (pathIndex == 1 && pathSegments.get(0).isEmpty())) {
+ List segments = new ArrayList<>();
+ segments.add(idSegment);
+ idItrReverted.forEachRemaining(segments::add);
+ Collections.reverse(segments);
+ if (!segments.isEmpty() && segments.get(0).isEmpty()) {
+ segments.remove(0);
+ }
+ return String.join("/", segments);
+ } else {
+ return idSegment;
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) {
+ return new PagedIterableImpl<>(pageIterable, mapper);
+ }
+
+ private static final class PagedIterableImpl extends PagedIterable {
+
+ private final PagedIterable pagedIterable;
+ private final Function mapper;
+ private final Function, PagedResponse> pageMapper;
+
+ private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) {
+ super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux
+ .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper)))));
+ this.pagedIterable = pagedIterable;
+ this.mapper = mapper;
+ this.pageMapper = getPageMapper(mapper);
+ }
+
+ private static Function, PagedResponse> getPageMapper(Function mapper) {
+ return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(),
+ page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(),
+ null);
+ }
+
+ @Override
+ public Stream stream() {
+ return pagedIterable.stream().map(mapper);
+ }
+
+ @Override
+ public Stream> streamByPage() {
+ return pagedIterable.streamByPage().map(pageMapper);
+ }
+
+ @Override
+ public Stream> streamByPage(String continuationToken) {
+ return pagedIterable.streamByPage(continuationToken).map(pageMapper);
+ }
+
+ @Override
+ public Stream> streamByPage(int preferredPageSize) {
+ return pagedIterable.streamByPage(preferredPageSize).map(pageMapper);
+ }
+
+ @Override
+ public Stream> streamByPage(String continuationToken, int preferredPageSize) {
+ return pagedIterable.streamByPage(continuationToken, preferredPageSize).map(pageMapper);
+ }
+
+ @Override
+ public Iterator iterator() {
+ return new IteratorImpl<>(pagedIterable.iterator(), mapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage() {
+ return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage(String continuationToken) {
+ return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage(int preferredPageSize) {
+ return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper);
+ }
+
+ @Override
+ public Iterable> iterableByPage(String continuationToken, int preferredPageSize) {
+ return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper);
+ }
+ }
+
+ private static final class IteratorImpl implements Iterator