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 NapsterOmniagentApi service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the NapsterOmniagentApi service API instance.
+ */
+ public NapsterOmniagentApiManager authenticate(TokenCredential credential, AzureProfile profile) {
+ Objects.requireNonNull(credential, "'credential' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+
+ String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, "UnknownVersion");
+
+ StringBuilder userAgentBuilder = new StringBuilder();
+ userAgentBuilder.append("azsdk-java")
+ .append("-")
+ .append("com.azure.resourcemanager.napsteromniagentapi")
+ .append("/")
+ .append(clientVersion);
+ 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 BearerTokenAuthenticationPolicy(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 NapsterOmniagentApiManager(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 Organizations. It manages OrganizationResource.
+ *
+ * @return Resource collection API of Organizations.
+ */
+ public Organizations organizations() {
+ if (this.organizations == null) {
+ this.organizations = new OrganizationsImpl(clientObject.getOrganizations(), this);
+ }
+ return organizations;
+ }
+
+ /**
+ * Gets the resource collection API of SaaSOperationGroups.
+ *
+ * @return Resource collection API of SaaSOperationGroups.
+ */
+ public SaaSOperationGroups saaSOperationGroups() {
+ if (this.saaSOperationGroups == null) {
+ this.saaSOperationGroups = new SaaSOperationGroupsImpl(clientObject.getSaaSOperationGroups(), this);
+ }
+ return saaSOperationGroups;
+ }
+
+ /**
+ * Gets wrapped service client NapsterOmniagentApiManagementClient providing direct access to the underlying
+ * auto-generated API implementation, based on Azure REST API.
+ *
+ * @return Wrapped service client NapsterOmniagentApiManagementClient.
+ */
+ public NapsterOmniagentApiManagementClient serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/NapsterOmniagentApiManagementClient.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/NapsterOmniagentApiManagementClient.java
new file mode 100644
index 000000000000..741513fe64a5
--- /dev/null
+++ b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/NapsterOmniagentApiManagementClient.java
@@ -0,0 +1,69 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.napsteromniagentapi.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/**
+ * The interface for NapsterOmniagentApiManagementClient class.
+ */
+public interface NapsterOmniagentApiManagementClient {
+ /**
+ * Gets Service host.
+ *
+ * @return the endpoint value.
+ */
+ String getEndpoint();
+
+ /**
+ * Gets Version parameter.
+ *
+ * @return the apiVersion value.
+ */
+ String getApiVersion();
+
+ /**
+ * Gets The ID of the target subscription. The value must be an UUID.
+ *
+ * @return the subscriptionId value.
+ */
+ String getSubscriptionId();
+
+ /**
+ * 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 OrganizationsClient object to access its operations.
+ *
+ * @return the OrganizationsClient object.
+ */
+ OrganizationsClient getOrganizations();
+
+ /**
+ * Gets the SaaSOperationGroupsClient object to access its operations.
+ *
+ * @return the SaaSOperationGroupsClient object.
+ */
+ SaaSOperationGroupsClient getSaaSOperationGroups();
+}
diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/OperationsClient.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/OperationsClient.java
new file mode 100644
index 000000000000..3221d5db4d07
--- /dev/null
+++ b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/OperationsClient.java
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.napsteromniagentapi.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.napsteromniagentapi.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/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/OrganizationsClient.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/OrganizationsClient.java
new file mode 100644
index 000000000000..ee387873d2f7
--- /dev/null
+++ b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/OrganizationsClient.java
@@ -0,0 +1,366 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.napsteromniagentapi.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.napsteromniagentapi.fluent.models.LatestLinkedSaaSResponseInner;
+import com.azure.resourcemanager.napsteromniagentapi.fluent.models.OrganizationResourceInner;
+import com.azure.resourcemanager.napsteromniagentapi.models.OrganizationResourceUpdate;
+import com.azure.resourcemanager.napsteromniagentapi.models.SaaSData;
+
+/**
+ * An instance of this class provides access to all the operations defined in OrganizationsClient.
+ */
+public interface OrganizationsClient {
+ /**
+ * Get a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @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 OrganizationResource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(String resourceGroupName,
+ String organizationname, Context context);
+
+ /**
+ * Get a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @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 OrganizationResource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OrganizationResourceInner getByResourceGroup(String resourceGroupName, String organizationname);
+
+ /**
+ * Create a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @param resource Resource create parameters.
+ * @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 concrete tracked resource types can be created by aliasing this
+ * type using a specific property type.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, OrganizationResourceInner>
+ beginCreateOrUpdate(String resourceGroupName, String organizationname, OrganizationResourceInner resource);
+
+ /**
+ * Create a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @param resource Resource create parameters.
+ * @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 concrete tracked resource types can be created by aliasing this
+ * type using a specific property type.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, OrganizationResourceInner> beginCreateOrUpdate(
+ String resourceGroupName, String organizationname, OrganizationResourceInner resource, Context context);
+
+ /**
+ * Create a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @param resource Resource create parameters.
+ * @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 concrete tracked resource types can be created by aliasing this type using a specific property type.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OrganizationResourceInner createOrUpdate(String resourceGroupName, String organizationname,
+ OrganizationResourceInner resource);
+
+ /**
+ * Create a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @param resource Resource create parameters.
+ * @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 concrete tracked resource types can be created by aliasing this type using a specific property type.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OrganizationResourceInner createOrUpdate(String resourceGroupName, String organizationname,
+ OrganizationResourceInner resource, Context context);
+
+ /**
+ * Update a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @param properties The resource properties to be updated.
+ * @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 concrete tracked resource types can be created by aliasing this
+ * type using a specific property type.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, OrganizationResourceInner> beginUpdate(String resourceGroupName,
+ String organizationname, OrganizationResourceUpdate properties);
+
+ /**
+ * Update a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @param properties The resource properties to be updated.
+ * @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 concrete tracked resource types can be created by aliasing this
+ * type using a specific property type.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, OrganizationResourceInner> beginUpdate(String resourceGroupName,
+ String organizationname, OrganizationResourceUpdate properties, Context context);
+
+ /**
+ * Update a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @param properties The resource properties to be updated.
+ * @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 concrete tracked resource types can be created by aliasing this type using a specific property type.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OrganizationResourceInner update(String resourceGroupName, String organizationname,
+ OrganizationResourceUpdate properties);
+
+ /**
+ * Update a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @param properties The resource properties to be updated.
+ * @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 concrete tracked resource types can be created by aliasing this type using a specific property type.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OrganizationResourceInner update(String resourceGroupName, String organizationname,
+ OrganizationResourceUpdate properties, Context context);
+
+ /**
+ * Delete a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @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 organizationname);
+
+ /**
+ * Delete a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @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 organizationname, Context context);
+
+ /**
+ * Delete a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @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 organizationname);
+
+ /**
+ * Delete a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @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 organizationname, Context context);
+
+ /**
+ * List OrganizationResource resources by 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 OrganizationResource list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * List OrganizationResource resources by 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 OrganizationResource list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * List OrganizationResource resources by subscription ID.
+ *
+ * @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 OrganizationResource list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * List OrganizationResource resources by subscription ID.
+ *
+ * @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 OrganizationResource list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
+ /**
+ * Links a new SaaS to the Napster organization of the underlying monitor.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @param body The content of the action 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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, OrganizationResourceInner> beginLinkSaaS(String resourceGroupName,
+ String organizationname, SaaSData body);
+
+ /**
+ * Links a new SaaS to the Napster organization of the underlying monitor.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @param body The content of the action 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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, OrganizationResourceInner> beginLinkSaaS(String resourceGroupName,
+ String organizationname, SaaSData body, Context context);
+
+ /**
+ * Links a new SaaS to the Napster organization of the underlying monitor.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @param body The content of the action 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 response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OrganizationResourceInner linkSaaS(String resourceGroupName, String organizationname, SaaSData body);
+
+ /**
+ * Links a new SaaS to the Napster organization of the underlying monitor.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @param body The content of the action 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 response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OrganizationResourceInner linkSaaS(String resourceGroupName, String organizationname, SaaSData body,
+ Context context);
+
+ /**
+ * Returns the latest SaaS linked to the Napster organization of the underlying monitor.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @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 response of get latest linked SaaS resource operation along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response latestLinkedSaaSWithResponse(String resourceGroupName,
+ String organizationname, Context context);
+
+ /**
+ * Returns the latest SaaS linked to the Napster organization of the underlying monitor.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @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 response of get latest linked SaaS resource operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ LatestLinkedSaaSResponseInner latestLinkedSaaS(String resourceGroupName, String organizationname);
+}
diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/SaaSOperationGroupsClient.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/SaaSOperationGroupsClient.java
new file mode 100644
index 000000000000..58bd05943487
--- /dev/null
+++ b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/SaaSOperationGroupsClient.java
@@ -0,0 +1,70 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.napsteromniagentapi.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.napsteromniagentapi.fluent.models.SaaSResourceDetailsResponseInner;
+import com.azure.resourcemanager.napsteromniagentapi.models.ActivateSaaSParameterRequest;
+
+/**
+ * An instance of this class provides access to all the operations defined in SaaSOperationGroupsClient.
+ */
+public interface SaaSOperationGroupsClient {
+ /**
+ * Resolve the token to get the SaaS resource ID and activate the SaaS resource.
+ *
+ * @param body The request body.
+ * @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 marketplace SaaS resource details.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, SaaSResourceDetailsResponseInner>
+ beginActivateResource(ActivateSaaSParameterRequest body);
+
+ /**
+ * Resolve the token to get the SaaS resource ID and activate the SaaS resource.
+ *
+ * @param body The request body.
+ * @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 marketplace SaaS resource details.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, SaaSResourceDetailsResponseInner>
+ beginActivateResource(ActivateSaaSParameterRequest body, Context context);
+
+ /**
+ * Resolve the token to get the SaaS resource ID and activate the SaaS resource.
+ *
+ * @param body The request body.
+ * @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 marketplace SaaS resource details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SaaSResourceDetailsResponseInner activateResource(ActivateSaaSParameterRequest body);
+
+ /**
+ * Resolve the token to get the SaaS resource ID and activate the SaaS resource.
+ *
+ * @param body The request body.
+ * @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 marketplace SaaS resource details.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SaaSResourceDetailsResponseInner activateResource(ActivateSaaSParameterRequest body, Context context);
+}
diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/models/LatestLinkedSaaSResponseInner.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/models/LatestLinkedSaaSResponseInner.java
new file mode 100644
index 000000000000..79bf0900e944
--- /dev/null
+++ b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/models/LatestLinkedSaaSResponseInner.java
@@ -0,0 +1,92 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.napsteromniagentapi.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 java.io.IOException;
+
+/**
+ * Response of get latest linked SaaS resource operation.
+ */
+@Immutable
+public final class LatestLinkedSaaSResponseInner implements JsonSerializable {
+ /*
+ * SaaS resource id
+ */
+ private String saaSResourceId;
+
+ /*
+ * Flag indicating if the SaaS resource is hidden
+ */
+ private Boolean isHiddenSaaS;
+
+ /**
+ * Creates an instance of LatestLinkedSaaSResponseInner class.
+ */
+ private LatestLinkedSaaSResponseInner() {
+ }
+
+ /**
+ * Get the saaSResourceId property: SaaS resource id.
+ *
+ * @return the saaSResourceId value.
+ */
+ public String saaSResourceId() {
+ return this.saaSResourceId;
+ }
+
+ /**
+ * Get the isHiddenSaaS property: Flag indicating if the SaaS resource is hidden.
+ *
+ * @return the isHiddenSaaS value.
+ */
+ public Boolean isHiddenSaaS() {
+ return this.isHiddenSaaS;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("saaSResourceId", this.saaSResourceId);
+ jsonWriter.writeBooleanField("isHiddenSaaS", this.isHiddenSaaS);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of LatestLinkedSaaSResponseInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of LatestLinkedSaaSResponseInner 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 LatestLinkedSaaSResponseInner.
+ */
+ public static LatestLinkedSaaSResponseInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ LatestLinkedSaaSResponseInner deserializedLatestLinkedSaaSResponseInner
+ = new LatestLinkedSaaSResponseInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("saaSResourceId".equals(fieldName)) {
+ deserializedLatestLinkedSaaSResponseInner.saaSResourceId = reader.getString();
+ } else if ("isHiddenSaaS".equals(fieldName)) {
+ deserializedLatestLinkedSaaSResponseInner.isHiddenSaaS = reader.getNullable(JsonReader::getBoolean);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedLatestLinkedSaaSResponseInner;
+ });
+ }
+}
diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/models/OperationInner.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/models/OperationInner.java
new file mode 100644
index 000000000000..a3ad304316da
--- /dev/null
+++ b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/models/OperationInner.java
@@ -0,0 +1,150 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.napsteromniagentapi.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.napsteromniagentapi.models.ActionType;
+import com.azure.resourcemanager.napsteromniagentapi.models.OperationDisplay;
+import com.azure.resourcemanager.napsteromniagentapi.models.Origin;
+import java.io.IOException;
+
+/**
+ * REST API Operation
+ *
+ * Details of a REST API operation, returned from the Resource Provider Operations API.
+ */
+@Immutable
+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 Azure
+ * Resource Manager/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;
+
+ /*
+ * Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
+ */
+ private ActionType actionType;
+
+ /**
+ * Creates an instance of OperationInner class.
+ */
+ private 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 Azure Resource Manager/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;
+ }
+
+ /**
+ * 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: Extensible 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;
+ }
+
+ /**
+ * {@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/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/models/OrganizationResourceInner.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/models/OrganizationResourceInner.java
new file mode 100644
index 000000000000..104ab0dcdc39
--- /dev/null
+++ b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/models/OrganizationResourceInner.java
@@ -0,0 +1,210 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.napsteromniagentapi.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.napsteromniagentapi.models.ManagedServiceIdentity;
+import com.azure.resourcemanager.napsteromniagentapi.models.OrganizationProperties;
+import java.io.IOException;
+import java.util.Map;
+
+/**
+ * Concrete tracked resource types can be created by aliasing this type using a specific property type.
+ */
+@Fluent
+public final class OrganizationResourceInner extends Resource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ private OrganizationProperties properties;
+
+ /*
+ * The managed service identities assigned to this resource.
+ */
+ private ManagedServiceIdentity identity;
+
+ /*
+ * 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 OrganizationResourceInner class.
+ */
+ public OrganizationResourceInner() {
+ }
+
+ /**
+ * Get the properties property: The resource-specific properties for this resource.
+ *
+ * @return the properties value.
+ */
+ public OrganizationProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The resource-specific properties for this resource.
+ *
+ * @param properties the properties value to set.
+ * @return the OrganizationResourceInner object itself.
+ */
+ public OrganizationResourceInner withProperties(OrganizationProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the identity property: The managed service identities assigned to this resource.
+ *
+ * @return the identity value.
+ */
+ public ManagedServiceIdentity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: The managed service identities assigned to this resource.
+ *
+ * @param identity the identity value to set.
+ * @return the OrganizationResourceInner object itself.
+ */
+ public OrganizationResourceInner withIdentity(ManagedServiceIdentity identity) {
+ this.identity = identity;
+ return this;
+ }
+
+ /**
+ * 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 OrganizationResourceInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public OrganizationResourceInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * {@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.properties);
+ jsonWriter.writeJsonField("identity", this.identity);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OrganizationResourceInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OrganizationResourceInner 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 OrganizationResourceInner.
+ */
+ public static OrganizationResourceInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OrganizationResourceInner deserializedOrganizationResourceInner = new OrganizationResourceInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedOrganizationResourceInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedOrganizationResourceInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedOrganizationResourceInner.type = reader.getString();
+ } else if ("location".equals(fieldName)) {
+ deserializedOrganizationResourceInner.withLocation(reader.getString());
+ } else if ("tags".equals(fieldName)) {
+ Map tags = reader.readMap(reader1 -> reader1.getString());
+ deserializedOrganizationResourceInner.withTags(tags);
+ } else if ("properties".equals(fieldName)) {
+ deserializedOrganizationResourceInner.properties = OrganizationProperties.fromJson(reader);
+ } else if ("identity".equals(fieldName)) {
+ deserializedOrganizationResourceInner.identity = ManagedServiceIdentity.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedOrganizationResourceInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOrganizationResourceInner;
+ });
+ }
+}
diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/models/SaaSResourceDetailsResponseInner.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/models/SaaSResourceDetailsResponseInner.java
new file mode 100644
index 000000000000..f7eee6a564b3
--- /dev/null
+++ b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/models/SaaSResourceDetailsResponseInner.java
@@ -0,0 +1,144 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.napsteromniagentapi.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+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 java.io.IOException;
+
+/**
+ * Marketplace SaaS resource details.
+ */
+@Immutable
+public final class SaaSResourceDetailsResponseInner extends ProxyResource {
+ /*
+ * Id of the Marketplace SaaS Resource
+ */
+ private String saasId;
+
+ /*
+ * 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 SaaSResourceDetailsResponseInner class.
+ */
+ private SaaSResourceDetailsResponseInner() {
+ }
+
+ /**
+ * Get the saasId property: Id of the Marketplace SaaS Resource.
+ *
+ * @return the saasId value.
+ */
+ public String saasId() {
+ return this.saasId;
+ }
+
+ /**
+ * 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 JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("saasId", this.saasId);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of SaaSResourceDetailsResponseInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of SaaSResourceDetailsResponseInner 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 SaaSResourceDetailsResponseInner.
+ */
+ public static SaaSResourceDetailsResponseInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ SaaSResourceDetailsResponseInner deserializedSaaSResourceDetailsResponseInner
+ = new SaaSResourceDetailsResponseInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedSaaSResourceDetailsResponseInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedSaaSResourceDetailsResponseInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedSaaSResourceDetailsResponseInner.type = reader.getString();
+ } else if ("saasId".equals(fieldName)) {
+ deserializedSaaSResourceDetailsResponseInner.saasId = reader.getString();
+ } else if ("systemData".equals(fieldName)) {
+ deserializedSaaSResourceDetailsResponseInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedSaaSResourceDetailsResponseInner;
+ });
+ }
+}
diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/models/package-info.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/models/package-info.java
new file mode 100644
index 000000000000..eef4f0ef2c49
--- /dev/null
+++ b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/models/package-info.java
@@ -0,0 +1,8 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+/**
+ * Package containing the inner data models for NapsterOmniagentApi.
+ */
+package com.azure.resourcemanager.napsteromniagentapi.fluent.models;
diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/package-info.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/package-info.java
new file mode 100644
index 000000000000..4894e9f742b4
--- /dev/null
+++ b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/fluent/package-info.java
@@ -0,0 +1,8 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+/**
+ * Package containing the service clients for NapsterOmniagentApi.
+ */
+package com.azure.resourcemanager.napsteromniagentapi.fluent;
diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/LatestLinkedSaaSResponseImpl.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/LatestLinkedSaaSResponseImpl.java
new file mode 100644
index 000000000000..d0ccc67bc872
--- /dev/null
+++ b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/LatestLinkedSaaSResponseImpl.java
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.napsteromniagentapi.implementation;
+
+import com.azure.resourcemanager.napsteromniagentapi.fluent.models.LatestLinkedSaaSResponseInner;
+import com.azure.resourcemanager.napsteromniagentapi.models.LatestLinkedSaaSResponse;
+
+public final class LatestLinkedSaaSResponseImpl implements LatestLinkedSaaSResponse {
+ private LatestLinkedSaaSResponseInner innerObject;
+
+ private final com.azure.resourcemanager.napsteromniagentapi.NapsterOmniagentApiManager serviceManager;
+
+ LatestLinkedSaaSResponseImpl(LatestLinkedSaaSResponseInner innerObject,
+ com.azure.resourcemanager.napsteromniagentapi.NapsterOmniagentApiManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String saaSResourceId() {
+ return this.innerModel().saaSResourceId();
+ }
+
+ public Boolean isHiddenSaaS() {
+ return this.innerModel().isHiddenSaaS();
+ }
+
+ public LatestLinkedSaaSResponseInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.napsteromniagentapi.NapsterOmniagentApiManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/NapsterOmniagentApiManagementClientBuilder.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/NapsterOmniagentApiManagementClientBuilder.java
new file mode 100644
index 000000000000..771f09da4144
--- /dev/null
+++ b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/NapsterOmniagentApiManagementClientBuilder.java
@@ -0,0 +1,138 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.napsteromniagentapi.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 NapsterOmniagentApiManagementClientImpl type.
+ */
+@ServiceClientBuilder(serviceClients = { NapsterOmniagentApiManagementClientImpl.class })
+public final class NapsterOmniagentApiManagementClientBuilder {
+ /*
+ * Service host
+ */
+ private String endpoint;
+
+ /**
+ * Sets Service host.
+ *
+ * @param endpoint the endpoint value.
+ * @return the NapsterOmniagentApiManagementClientBuilder.
+ */
+ public NapsterOmniagentApiManagementClientBuilder endpoint(String endpoint) {
+ this.endpoint = endpoint;
+ return this;
+ }
+
+ /*
+ * 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 NapsterOmniagentApiManagementClientBuilder.
+ */
+ public NapsterOmniagentApiManagementClientBuilder subscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /*
+ * The environment to connect to
+ */
+ private AzureEnvironment environment;
+
+ /**
+ * Sets The environment to connect to.
+ *
+ * @param environment the environment value.
+ * @return the NapsterOmniagentApiManagementClientBuilder.
+ */
+ public NapsterOmniagentApiManagementClientBuilder 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 NapsterOmniagentApiManagementClientBuilder.
+ */
+ public NapsterOmniagentApiManagementClientBuilder 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 NapsterOmniagentApiManagementClientBuilder.
+ */
+ public NapsterOmniagentApiManagementClientBuilder 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 NapsterOmniagentApiManagementClientBuilder.
+ */
+ public NapsterOmniagentApiManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
+ this.serializerAdapter = serializerAdapter;
+ return this;
+ }
+
+ /**
+ * Builds an instance of NapsterOmniagentApiManagementClientImpl with the provided parameters.
+ *
+ * @return an instance of NapsterOmniagentApiManagementClientImpl.
+ */
+ public NapsterOmniagentApiManagementClientImpl 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();
+ NapsterOmniagentApiManagementClientImpl client = new NapsterOmniagentApiManagementClientImpl(localPipeline,
+ localSerializerAdapter, localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId);
+ return client;
+ }
+}
diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/NapsterOmniagentApiManagementClientImpl.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/NapsterOmniagentApiManagementClientImpl.java
new file mode 100644
index 000000000000..75e3ad0e7ed3
--- /dev/null
+++ b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/NapsterOmniagentApiManagementClientImpl.java
@@ -0,0 +1,340 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.napsteromniagentapi.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.PollResult;
+import com.azure.core.management.polling.PollerFactory;
+import com.azure.core.management.polling.SyncPollerFactory;
+import com.azure.core.util.BinaryData;
+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.polling.SyncPoller;
+import com.azure.core.util.serializer.SerializerAdapter;
+import com.azure.core.util.serializer.SerializerEncoding;
+import com.azure.resourcemanager.napsteromniagentapi.fluent.NapsterOmniagentApiManagementClient;
+import com.azure.resourcemanager.napsteromniagentapi.fluent.OperationsClient;
+import com.azure.resourcemanager.napsteromniagentapi.fluent.OrganizationsClient;
+import com.azure.resourcemanager.napsteromniagentapi.fluent.SaaSOperationGroupsClient;
+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 NapsterOmniagentApiManagementClientImpl type.
+ */
+@ServiceClient(builder = NapsterOmniagentApiManagementClientBuilder.class)
+public final class NapsterOmniagentApiManagementClientImpl implements NapsterOmniagentApiManagementClient {
+ /**
+ * Service host.
+ */
+ private final String endpoint;
+
+ /**
+ * Gets Service host.
+ *
+ * @return the endpoint value.
+ */
+ public String getEndpoint() {
+ return this.endpoint;
+ }
+
+ /**
+ * Version parameter.
+ */
+ private final String apiVersion;
+
+ /**
+ * Gets Version parameter.
+ *
+ * @return the apiVersion value.
+ */
+ public String getApiVersion() {
+ return this.apiVersion;
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * 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 OrganizationsClient object to access its operations.
+ */
+ private final OrganizationsClient organizations;
+
+ /**
+ * Gets the OrganizationsClient object to access its operations.
+ *
+ * @return the OrganizationsClient object.
+ */
+ public OrganizationsClient getOrganizations() {
+ return this.organizations;
+ }
+
+ /**
+ * The SaaSOperationGroupsClient object to access its operations.
+ */
+ private final SaaSOperationGroupsClient saaSOperationGroups;
+
+ /**
+ * Gets the SaaSOperationGroupsClient object to access its operations.
+ *
+ * @return the SaaSOperationGroupsClient object.
+ */
+ public SaaSOperationGroupsClient getSaaSOperationGroups() {
+ return this.saaSOperationGroups;
+ }
+
+ /**
+ * Initializes an instance of NapsterOmniagentApiManagementClient 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 endpoint Service host.
+ * @param subscriptionId The ID of the target subscription. The value must be an UUID.
+ */
+ NapsterOmniagentApiManagementClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter,
+ Duration defaultPollInterval, AzureEnvironment environment, String endpoint, String subscriptionId) {
+ this.httpPipeline = httpPipeline;
+ this.serializerAdapter = serializerAdapter;
+ this.defaultPollInterval = defaultPollInterval;
+ this.endpoint = endpoint;
+ this.subscriptionId = subscriptionId;
+ this.apiVersion = "2025-12-24-preview";
+ this.operations = new OperationsClientImpl(this);
+ this.organizations = new OrganizationsClientImpl(this);
+ this.saaSOperationGroups = new SaaSOperationGroupsClientImpl(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 long running operation result.
+ *
+ * @param activationResponse the response of activation operation.
+ * @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 SyncPoller for poll result and final result.
+ */
+ public SyncPoller, U> getLroResult(Response activationResponse,
+ Type pollResultType, Type finalResultType, Context context) {
+ return SyncPollerFactory.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(NapsterOmniagentApiManagementClientImpl.class);
+}
diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/OperationImpl.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/OperationImpl.java
new file mode 100644
index 000000000000..f5459c5f46ae
--- /dev/null
+++ b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/OperationImpl.java
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.napsteromniagentapi.implementation;
+
+import com.azure.resourcemanager.napsteromniagentapi.fluent.models.OperationInner;
+import com.azure.resourcemanager.napsteromniagentapi.models.ActionType;
+import com.azure.resourcemanager.napsteromniagentapi.models.Operation;
+import com.azure.resourcemanager.napsteromniagentapi.models.OperationDisplay;
+import com.azure.resourcemanager.napsteromniagentapi.models.Origin;
+
+public final class OperationImpl implements Operation {
+ private OperationInner innerObject;
+
+ private final com.azure.resourcemanager.napsteromniagentapi.NapsterOmniagentApiManager serviceManager;
+
+ OperationImpl(OperationInner innerObject,
+ com.azure.resourcemanager.napsteromniagentapi.NapsterOmniagentApiManager 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.napsteromniagentapi.NapsterOmniagentApiManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/OperationsClientImpl.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/OperationsClientImpl.java
new file mode 100644
index 000000000000..355167bff5b7
--- /dev/null
+++ b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/OperationsClientImpl.java
@@ -0,0 +1,242 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.napsteromniagentapi.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.napsteromniagentapi.fluent.OperationsClient;
+import com.azure.resourcemanager.napsteromniagentapi.fluent.models.OperationInner;
+import com.azure.resourcemanager.napsteromniagentapi.implementation.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 NapsterOmniagentApiManagementClientImpl client;
+
+ /**
+ * Initializes an instance of OperationsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ OperationsClientImpl(NapsterOmniagentApiManagementClientImpl client) {
+ this.service
+ = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for NapsterOmniagentApiManagementClientOperations to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "NapsterOmniagentApiManagementClientOperations")
+ public interface OperationsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/providers/Napster.CompanionAPI/operations")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/providers/Napster.CompanionAPI/operations")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listSync(@HostParam("endpoint") 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("endpoint") String endpoint, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listNextSync(@PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("endpoint") 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() {
+ 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.
+ *
+ * @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.
+ *
+ * @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}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage() {
+ final String accept = "application/json";
+ Response res
+ = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * 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}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(Context context) {
+ final String accept = "application/json";
+ Response res
+ = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(), accept, context);
+ return 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 PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(() -> listSinglePage(), nextLink -> listNextSinglePage(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 PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(() -> listSinglePage(context), nextLink -> listNextSinglePage(nextLink, 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) {
+ 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.
+ * @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}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listNextSinglePage(String nextLink) {
+ final String accept = "application/json";
+ Response res
+ = service.listNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE);
+ return 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.
+ * @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}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listNextSinglePage(String nextLink, Context context) {
+ final String accept = "application/json";
+ Response res = service.listNextSync(nextLink, this.client.getEndpoint(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+}
diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/OperationsImpl.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/OperationsImpl.java
new file mode 100644
index 000000000000..1286849ca0a0
--- /dev/null
+++ b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/OperationsImpl.java
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.napsteromniagentapi.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.napsteromniagentapi.fluent.OperationsClient;
+import com.azure.resourcemanager.napsteromniagentapi.fluent.models.OperationInner;
+import com.azure.resourcemanager.napsteromniagentapi.models.Operation;
+import com.azure.resourcemanager.napsteromniagentapi.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.napsteromniagentapi.NapsterOmniagentApiManager serviceManager;
+
+ public OperationsImpl(OperationsClient innerClient,
+ com.azure.resourcemanager.napsteromniagentapi.NapsterOmniagentApiManager 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.napsteromniagentapi.NapsterOmniagentApiManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/OrganizationResourceImpl.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/OrganizationResourceImpl.java
new file mode 100644
index 000000000000..30b977905a9a
--- /dev/null
+++ b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/OrganizationResourceImpl.java
@@ -0,0 +1,214 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.napsteromniagentapi.implementation;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.napsteromniagentapi.fluent.models.OrganizationResourceInner;
+import com.azure.resourcemanager.napsteromniagentapi.models.LatestLinkedSaaSResponse;
+import com.azure.resourcemanager.napsteromniagentapi.models.ManagedServiceIdentity;
+import com.azure.resourcemanager.napsteromniagentapi.models.OrganizationProperties;
+import com.azure.resourcemanager.napsteromniagentapi.models.OrganizationResource;
+import com.azure.resourcemanager.napsteromniagentapi.models.OrganizationResourceUpdate;
+import com.azure.resourcemanager.napsteromniagentapi.models.SaaSData;
+import java.util.Collections;
+import java.util.Map;
+
+public final class OrganizationResourceImpl
+ implements OrganizationResource, OrganizationResource.Definition, OrganizationResource.Update {
+ private OrganizationResourceInner innerObject;
+
+ private final com.azure.resourcemanager.napsteromniagentapi.NapsterOmniagentApiManager 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 OrganizationProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public ManagedServiceIdentity identity() {
+ return this.innerModel().identity();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public String resourceGroupName() {
+ return resourceGroupName;
+ }
+
+ public OrganizationResourceInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.napsteromniagentapi.NapsterOmniagentApiManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String organizationname;
+
+ private OrganizationResourceUpdate updateProperties;
+
+ public OrganizationResourceImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public OrganizationResource create() {
+ this.innerObject = serviceManager.serviceClient()
+ .getOrganizations()
+ .createOrUpdate(resourceGroupName, organizationname, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public OrganizationResource create(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getOrganizations()
+ .createOrUpdate(resourceGroupName, organizationname, this.innerModel(), context);
+ return this;
+ }
+
+ OrganizationResourceImpl(String name,
+ com.azure.resourcemanager.napsteromniagentapi.NapsterOmniagentApiManager serviceManager) {
+ this.innerObject = new OrganizationResourceInner();
+ this.serviceManager = serviceManager;
+ this.organizationname = name;
+ }
+
+ public OrganizationResourceImpl update() {
+ this.updateProperties = new OrganizationResourceUpdate();
+ return this;
+ }
+
+ public OrganizationResource apply() {
+ this.innerObject = serviceManager.serviceClient()
+ .getOrganizations()
+ .update(resourceGroupName, organizationname, updateProperties, Context.NONE);
+ return this;
+ }
+
+ public OrganizationResource apply(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getOrganizations()
+ .update(resourceGroupName, organizationname, updateProperties, context);
+ return this;
+ }
+
+ OrganizationResourceImpl(OrganizationResourceInner innerObject,
+ com.azure.resourcemanager.napsteromniagentapi.NapsterOmniagentApiManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.organizationname = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "organizations");
+ }
+
+ public OrganizationResource refresh() {
+ this.innerObject = serviceManager.serviceClient()
+ .getOrganizations()
+ .getByResourceGroupWithResponse(resourceGroupName, organizationname, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public OrganizationResource refresh(Context context) {
+ this.innerObject = serviceManager.serviceClient()
+ .getOrganizations()
+ .getByResourceGroupWithResponse(resourceGroupName, organizationname, context)
+ .getValue();
+ return this;
+ }
+
+ public OrganizationResource linkSaaS(SaaSData body) {
+ return serviceManager.organizations().linkSaaS(resourceGroupName, organizationname, body);
+ }
+
+ public OrganizationResource linkSaaS(SaaSData body, Context context) {
+ return serviceManager.organizations().linkSaaS(resourceGroupName, organizationname, body, context);
+ }
+
+ public Response latestLinkedSaaSWithResponse(Context context) {
+ return serviceManager.organizations()
+ .latestLinkedSaaSWithResponse(resourceGroupName, organizationname, context);
+ }
+
+ public LatestLinkedSaaSResponse latestLinkedSaaS() {
+ return serviceManager.organizations().latestLinkedSaaS(resourceGroupName, organizationname);
+ }
+
+ public OrganizationResourceImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public OrganizationResourceImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public OrganizationResourceImpl withTags(Map tags) {
+ if (isInCreateMode()) {
+ this.innerModel().withTags(tags);
+ return this;
+ } else {
+ this.updateProperties.withTags(tags);
+ return this;
+ }
+ }
+
+ public OrganizationResourceImpl withProperties(OrganizationProperties properties) {
+ this.innerModel().withProperties(properties);
+ return this;
+ }
+
+ public OrganizationResourceImpl withIdentity(ManagedServiceIdentity identity) {
+ if (isInCreateMode()) {
+ this.innerModel().withIdentity(identity);
+ return this;
+ } else {
+ this.updateProperties.withIdentity(identity);
+ return this;
+ }
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel() == null || this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/OrganizationsClientImpl.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/OrganizationsClientImpl.java
new file mode 100644
index 000000000000..60f62eac5827
--- /dev/null
+++ b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/OrganizationsClientImpl.java
@@ -0,0 +1,1416 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.napsteromniagentapi.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.BinaryData;
+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.napsteromniagentapi.fluent.OrganizationsClient;
+import com.azure.resourcemanager.napsteromniagentapi.fluent.models.LatestLinkedSaaSResponseInner;
+import com.azure.resourcemanager.napsteromniagentapi.fluent.models.OrganizationResourceInner;
+import com.azure.resourcemanager.napsteromniagentapi.implementation.models.OrganizationResourceListResult;
+import com.azure.resourcemanager.napsteromniagentapi.models.OrganizationResourceUpdate;
+import com.azure.resourcemanager.napsteromniagentapi.models.SaaSData;
+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 OrganizationsClient.
+ */
+public final class OrganizationsClientImpl implements OrganizationsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final OrganizationsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final NapsterOmniagentApiManagementClientImpl client;
+
+ /**
+ * Initializes an instance of OrganizationsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ OrganizationsClientImpl(NapsterOmniagentApiManagementClientImpl client) {
+ this.service
+ = RestProxy.create(OrganizationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for NapsterOmniagentApiManagementClientOrganizations to be used by the
+ * proxy service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "NapsterOmniagentApiManagementClientOrganizations")
+ public interface OrganizationsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Napster.CompanionAPI/organizations/{organizationname}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResourceGroup(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("organizationname") String organizationname, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Napster.CompanionAPI/organizations/{organizationname}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getByResourceGroupSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("organizationname") String organizationname, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Napster.CompanionAPI/organizations/{organizationname}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrUpdate(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("organizationname") String organizationname, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") OrganizationResourceInner resource,
+ Context context);
+
+ @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Napster.CompanionAPI/organizations/{organizationname}")
+ @ExpectedResponses({ 200, 201 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response createOrUpdateSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("organizationname") String organizationname, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") OrganizationResourceInner resource,
+ Context context);
+
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Napster.CompanionAPI/organizations/{organizationname}")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> update(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("organizationname") String organizationname, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") OrganizationResourceUpdate properties,
+ Context context);
+
+ @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Napster.CompanionAPI/organizations/{organizationname}")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response updateSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("organizationname") String organizationname, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") OrganizationResourceUpdate properties,
+ Context context);
+
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Napster.CompanionAPI/organizations/{organizationname}")
+ @ExpectedResponses({ 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("organizationname") String organizationname, Context context);
+
+ @Headers({ "Accept: application/json;q=0.9", "Content-Type: application/json" })
+ @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Napster.CompanionAPI/organizations/{organizationname}")
+ @ExpectedResponses({ 202, 204 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response deleteSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("organizationname") String organizationname, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Napster.CompanionAPI/organizations")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(@HostParam("endpoint") 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/Napster.CompanionAPI/organizations")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listByResourceGroupSync(@HostParam("endpoint") 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}/providers/Napster.CompanionAPI/organizations")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("endpoint") 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}/providers/Napster.CompanionAPI/organizations")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Napster.CompanionAPI/organizations/{organizationname}/linkSaaS")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> linkSaaS(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("organizationname") String organizationname, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") SaaSData body, Context context);
+
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Napster.CompanionAPI/organizations/{organizationname}/linkSaaS")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response linkSaaSSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("organizationname") String organizationname, @HeaderParam("Content-Type") String contentType,
+ @HeaderParam("Accept") String accept, @BodyParam("application/json") SaaSData body, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Napster.CompanionAPI/organizations/{organizationname}/latestLinkedSaaS")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> latestLinkedSaaS(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("organizationname") String organizationname, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Napster.CompanionAPI/organizations/{organizationname}/latestLinkedSaaS")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response latestLinkedSaaSSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("organizationname") String organizationname, @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("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listByResourceGroupNextSync(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @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("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listBySubscriptionNextSync(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("endpoint") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * Get a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @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 OrganizationResource along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName,
+ String organizationname) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, organizationname, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @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 OrganizationResource on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getByResourceGroupAsync(String resourceGroupName, String organizationname) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, organizationname)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @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 OrganizationResource along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getByResourceGroupWithResponse(String resourceGroupName,
+ String organizationname, Context context) {
+ final String accept = "application/json";
+ return service.getByResourceGroupSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, organizationname, accept, context);
+ }
+
+ /**
+ * Get a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @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 OrganizationResource.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OrganizationResourceInner getByResourceGroup(String resourceGroupName, String organizationname) {
+ return getByResourceGroupWithResponse(resourceGroupName, organizationname, Context.NONE).getValue();
+ }
+
+ /**
+ * Create a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @param resource Resource create parameters.
+ * @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 concrete tracked resource types can be created by aliasing this type using a specific property type along
+ * with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName,
+ String organizationname, OrganizationResourceInner resource) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, organizationname, contentType, accept, resource,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Create a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @param resource Resource create parameters.
+ * @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 concrete tracked resource types can be created by aliasing this type using a specific property type along
+ * with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response createOrUpdateWithResponse(String resourceGroupName, String organizationname,
+ OrganizationResourceInner resource) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, organizationname, contentType, accept, resource,
+ Context.NONE);
+ }
+
+ /**
+ * Create a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @param resource Resource create parameters.
+ * @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 concrete tracked resource types can be created by aliasing this type using a specific property type along
+ * with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response createOrUpdateWithResponse(String resourceGroupName, String organizationname,
+ OrganizationResourceInner resource, Context context) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.createOrUpdateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, organizationname, contentType, accept, resource,
+ context);
+ }
+
+ /**
+ * Create a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @param resource Resource create parameters.
+ * @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 concrete tracked resource types can be created by aliasing this
+ * type using a specific property type.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, OrganizationResourceInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String organizationname, OrganizationResourceInner resource) {
+ Mono>> mono
+ = createOrUpdateWithResponseAsync(resourceGroupName, organizationname, resource);
+ return this.client.getLroResult(mono,
+ this.client.getHttpPipeline(), OrganizationResourceInner.class, OrganizationResourceInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Create a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @param resource Resource create parameters.
+ * @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 concrete tracked resource types can be created by aliasing this
+ * type using a specific property type.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, OrganizationResourceInner>
+ beginCreateOrUpdate(String resourceGroupName, String organizationname, OrganizationResourceInner resource) {
+ Response response = createOrUpdateWithResponse(resourceGroupName, organizationname, resource);
+ return this.client.getLroResult(response,
+ OrganizationResourceInner.class, OrganizationResourceInner.class, Context.NONE);
+ }
+
+ /**
+ * Create a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @param resource Resource create parameters.
+ * @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 concrete tracked resource types can be created by aliasing this
+ * type using a specific property type.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, OrganizationResourceInner> beginCreateOrUpdate(
+ String resourceGroupName, String organizationname, OrganizationResourceInner resource, Context context) {
+ Response response
+ = createOrUpdateWithResponse(resourceGroupName, organizationname, resource, context);
+ return this.client.getLroResult(response,
+ OrganizationResourceInner.class, OrganizationResourceInner.class, context);
+ }
+
+ /**
+ * Create a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @param resource Resource create parameters.
+ * @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 concrete tracked resource types can be created by aliasing this type using a specific property type on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(String resourceGroupName, String organizationname,
+ OrganizationResourceInner resource) {
+ return beginCreateOrUpdateAsync(resourceGroupName, organizationname, resource).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @param resource Resource create parameters.
+ * @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 concrete tracked resource types can be created by aliasing this type using a specific property type.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OrganizationResourceInner createOrUpdate(String resourceGroupName, String organizationname,
+ OrganizationResourceInner resource) {
+ return beginCreateOrUpdate(resourceGroupName, organizationname, resource).getFinalResult();
+ }
+
+ /**
+ * Create a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @param resource Resource create parameters.
+ * @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 concrete tracked resource types can be created by aliasing this type using a specific property type.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OrganizationResourceInner createOrUpdate(String resourceGroupName, String organizationname,
+ OrganizationResourceInner resource, Context context) {
+ return beginCreateOrUpdate(resourceGroupName, organizationname, resource, context).getFinalResult();
+ }
+
+ /**
+ * Update a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @param properties The resource properties to be updated.
+ * @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 concrete tracked resource types can be created by aliasing this type using a specific property type along
+ * with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> updateWithResponseAsync(String resourceGroupName, String organizationname,
+ OrganizationResourceUpdate properties) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, organizationname, contentType, accept, properties,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Update a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @param properties The resource properties to be updated.
+ * @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 concrete tracked resource types can be created by aliasing this type using a specific property type along
+ * with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response updateWithResponse(String resourceGroupName, String organizationname,
+ OrganizationResourceUpdate properties) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, organizationname, contentType, accept, properties,
+ Context.NONE);
+ }
+
+ /**
+ * Update a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @param properties The resource properties to be updated.
+ * @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 concrete tracked resource types can be created by aliasing this type using a specific property type along
+ * with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response updateWithResponse(String resourceGroupName, String organizationname,
+ OrganizationResourceUpdate properties, Context context) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.updateSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, organizationname, contentType, accept, properties,
+ context);
+ }
+
+ /**
+ * Update a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @param properties The resource properties to be updated.
+ * @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 concrete tracked resource types can be created by aliasing this
+ * type using a specific property type.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, OrganizationResourceInner>
+ beginUpdateAsync(String resourceGroupName, String organizationname, OrganizationResourceUpdate properties) {
+ Mono>> mono
+ = updateWithResponseAsync(resourceGroupName, organizationname, properties);
+ return this.client.getLroResult(mono,
+ this.client.getHttpPipeline(), OrganizationResourceInner.class, OrganizationResourceInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Update a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @param properties The resource properties to be updated.
+ * @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 concrete tracked resource types can be created by aliasing this
+ * type using a specific property type.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, OrganizationResourceInner>
+ beginUpdate(String resourceGroupName, String organizationname, OrganizationResourceUpdate properties) {
+ Response response = updateWithResponse(resourceGroupName, organizationname, properties);
+ return this.client.getLroResult(response,
+ OrganizationResourceInner.class, OrganizationResourceInner.class, Context.NONE);
+ }
+
+ /**
+ * Update a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @param properties The resource properties to be updated.
+ * @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 concrete tracked resource types can be created by aliasing this
+ * type using a specific property type.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, OrganizationResourceInner> beginUpdate(
+ String resourceGroupName, String organizationname, OrganizationResourceUpdate properties, Context context) {
+ Response response = updateWithResponse(resourceGroupName, organizationname, properties, context);
+ return this.client.getLroResult(response,
+ OrganizationResourceInner.class, OrganizationResourceInner.class, context);
+ }
+
+ /**
+ * Update a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @param properties The resource properties to be updated.
+ * @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 concrete tracked resource types can be created by aliasing this type using a specific property type on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(String resourceGroupName, String organizationname,
+ OrganizationResourceUpdate properties) {
+ return beginUpdateAsync(resourceGroupName, organizationname, properties).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Update a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @param properties The resource properties to be updated.
+ * @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 concrete tracked resource types can be created by aliasing this type using a specific property type.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OrganizationResourceInner update(String resourceGroupName, String organizationname,
+ OrganizationResourceUpdate properties) {
+ return beginUpdate(resourceGroupName, organizationname, properties).getFinalResult();
+ }
+
+ /**
+ * Update a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @param properties The resource properties to be updated.
+ * @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 concrete tracked resource types can be created by aliasing this type using a specific property type.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OrganizationResourceInner update(String resourceGroupName, String organizationname,
+ OrganizationResourceUpdate properties, Context context) {
+ return beginUpdate(resourceGroupName, organizationname, properties, context).getFinalResult();
+ }
+
+ /**
+ * Delete a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @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 organizationname) {
+ return FluxUtil
+ .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, organizationname, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Delete a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @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 body along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response deleteWithResponse(String resourceGroupName, String organizationname) {
+ return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, organizationname, Context.NONE);
+ }
+
+ /**
+ * Delete a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @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 body along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response deleteWithResponse(String resourceGroupName, String organizationname,
+ Context context) {
+ return service.deleteSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, organizationname, context);
+ }
+
+ /**
+ * Delete a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @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 organizationname) {
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, organizationname);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Delete a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @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 organizationname) {
+ Response response = deleteWithResponse(resourceGroupName, organizationname);
+ return this.client.getLroResult(response, Void.class, Void.class, Context.NONE);
+ }
+
+ /**
+ * Delete a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @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 organizationname,
+ Context context) {
+ Response response = deleteWithResponse(resourceGroupName, organizationname, context);
+ return this.client.getLroResult(response, Void.class, Void.class, context);
+ }
+
+ /**
+ * Delete a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @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 organizationname) {
+ return beginDeleteAsync(resourceGroupName, organizationname).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Delete a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @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 organizationname) {
+ beginDelete(resourceGroupName, organizationname).getFinalResult();
+ }
+
+ /**
+ * Delete a OrganizationResource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @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 organizationname, Context context) {
+ beginDelete(resourceGroupName, organizationname, context).getFinalResult();
+ }
+
+ /**
+ * List OrganizationResource resources by 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 OrganizationResource list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>
+ listByResourceGroupSinglePageAsync(String resourceGroupName) {
+ 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()));
+ }
+
+ /**
+ * List OrganizationResource resources by 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 OrganizationResource 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));
+ }
+
+ /**
+ * List OrganizationResource resources by 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 OrganizationResource list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listByResourceGroupSinglePage(String resourceGroupName) {
+ final String accept = "application/json";
+ Response res = service.listByResourceGroupSync(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * List OrganizationResource resources by 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 OrganizationResource list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listByResourceGroupSinglePage(String resourceGroupName,
+ Context context) {
+ final String accept = "application/json";
+ Response res = service.listByResourceGroupSync(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), resourceGroupName, accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * List OrganizationResource resources by 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 OrganizationResource list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName),
+ nextLink -> listByResourceGroupNextSinglePage(nextLink));
+ }
+
+ /**
+ * List OrganizationResource resources by 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 OrganizationResource list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ return new PagedIterable<>(() -> listByResourceGroupSinglePage(resourceGroupName, context),
+ nextLink -> listByResourceGroupNextSinglePage(nextLink, context));
+ }
+
+ /**
+ * List OrganizationResource resources by subscription ID.
+ *
+ * @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 OrganizationResource list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync() {
+ 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()));
+ }
+
+ /**
+ * List OrganizationResource resources by subscription ID.
+ *
+ * @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 OrganizationResource list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List OrganizationResource resources by subscription ID.
+ *
+ * @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 OrganizationResource list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage() {
+ final String accept = "application/json";
+ Response res = service.listSync(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * List OrganizationResource resources by subscription ID.
+ *
+ * @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 OrganizationResource list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(Context context) {
+ final String accept = "application/json";
+ Response res = service.listSync(this.client.getEndpoint(),
+ this.client.getApiVersion(), this.client.getSubscriptionId(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * List OrganizationResource resources by subscription ID.
+ *
+ * @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 OrganizationResource list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(() -> listSinglePage(), nextLink -> listBySubscriptionNextSinglePage(nextLink));
+ }
+
+ /**
+ * List OrganizationResource resources by subscription ID.
+ *
+ * @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 OrganizationResource list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(() -> listSinglePage(context),
+ nextLink -> listBySubscriptionNextSinglePage(nextLink, context));
+ }
+
+ /**
+ * Links a new SaaS to the Napster organization of the underlying monitor.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @param body The content of the action 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 response body along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> linkSaaSWithResponseAsync(String resourceGroupName,
+ String organizationname, SaaSData body) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil.withContext(context -> service.linkSaaS(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, organizationname, contentType, accept, body, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Links a new SaaS to the Napster organization of the underlying monitor.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @param body The content of the action 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 response body along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response linkSaaSWithResponse(String resourceGroupName, String organizationname,
+ SaaSData body) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.linkSaaSSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, organizationname, contentType, accept, body,
+ Context.NONE);
+ }
+
+ /**
+ * Links a new SaaS to the Napster organization of the underlying monitor.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @param body The content of the action 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 response body along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response linkSaaSWithResponse(String resourceGroupName, String organizationname, SaaSData body,
+ Context context) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.linkSaaSSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, organizationname, contentType, accept, body, context);
+ }
+
+ /**
+ * Links a new SaaS to the Napster organization of the underlying monitor.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @param body The content of the action 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 {@link PollerFlux} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, OrganizationResourceInner>
+ beginLinkSaaSAsync(String resourceGroupName, String organizationname, SaaSData body) {
+ Mono>> mono = linkSaaSWithResponseAsync(resourceGroupName, organizationname, body);
+ return this.client.getLroResult(mono,
+ this.client.getHttpPipeline(), OrganizationResourceInner.class, OrganizationResourceInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Links a new SaaS to the Napster organization of the underlying monitor.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @param body The content of the action 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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, OrganizationResourceInner>
+ beginLinkSaaS(String resourceGroupName, String organizationname, SaaSData body) {
+ Response response = linkSaaSWithResponse(resourceGroupName, organizationname, body);
+ return this.client.getLroResult(response,
+ OrganizationResourceInner.class, OrganizationResourceInner.class, Context.NONE);
+ }
+
+ /**
+ * Links a new SaaS to the Napster organization of the underlying monitor.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @param body The content of the action 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 {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, OrganizationResourceInner>
+ beginLinkSaaS(String resourceGroupName, String organizationname, SaaSData body, Context context) {
+ Response response = linkSaaSWithResponse(resourceGroupName, organizationname, body, context);
+ return this.client.getLroResult(response,
+ OrganizationResourceInner.class, OrganizationResourceInner.class, context);
+ }
+
+ /**
+ * Links a new SaaS to the Napster organization of the underlying monitor.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @param body The content of the action 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 response body on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono linkSaaSAsync(String resourceGroupName, String organizationname,
+ SaaSData body) {
+ return beginLinkSaaSAsync(resourceGroupName, organizationname, body).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Links a new SaaS to the Napster organization of the underlying monitor.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @param body The content of the action 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 response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OrganizationResourceInner linkSaaS(String resourceGroupName, String organizationname, SaaSData body) {
+ return beginLinkSaaS(resourceGroupName, organizationname, body).getFinalResult();
+ }
+
+ /**
+ * Links a new SaaS to the Napster organization of the underlying monitor.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @param body The content of the action 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 response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OrganizationResourceInner linkSaaS(String resourceGroupName, String organizationname, SaaSData body,
+ Context context) {
+ return beginLinkSaaS(resourceGroupName, organizationname, body, context).getFinalResult();
+ }
+
+ /**
+ * Returns the latest SaaS linked to the Napster organization of the underlying monitor.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @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 response of get latest linked SaaS resource operation along with {@link Response} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> latestLinkedSaaSWithResponseAsync(String resourceGroupName,
+ String organizationname) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.latestLinkedSaaS(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, organizationname, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Returns the latest SaaS linked to the Napster organization of the underlying monitor.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @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 response of get latest linked SaaS resource operation on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono latestLinkedSaaSAsync(String resourceGroupName,
+ String organizationname) {
+ return latestLinkedSaaSWithResponseAsync(resourceGroupName, organizationname)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Returns the latest SaaS linked to the Napster organization of the underlying monitor.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @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 response of get latest linked SaaS resource operation along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response latestLinkedSaaSWithResponse(String resourceGroupName,
+ String organizationname, Context context) {
+ final String accept = "application/json";
+ return service.latestLinkedSaaSSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), resourceGroupName, organizationname, accept, context);
+ }
+
+ /**
+ * Returns the latest SaaS linked to the Napster organization of the underlying monitor.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param organizationname Name of the Organization resource.
+ * @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 response of get latest linked SaaS resource operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public LatestLinkedSaaSResponseInner latestLinkedSaaS(String resourceGroupName, String organizationname) {
+ return latestLinkedSaaSWithResponse(resourceGroupName, organizationname, Context.NONE).getValue();
+ }
+
+ /**
+ * 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 OrganizationResource list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) {
+ 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.
+ * @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 OrganizationResource list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listByResourceGroupNextSinglePage(String nextLink) {
+ final String accept = "application/json";
+ Response res
+ = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE);
+ return 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.
+ * @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 OrganizationResource list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listByResourceGroupNextSinglePage(String nextLink,
+ Context context) {
+ final String accept = "application/json";
+ Response res
+ = service.listByResourceGroupNextSync(nextLink, this.client.getEndpoint(), accept, context);
+ return 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 OrganizationResource list operation along with {@link PagedResponse} on successful
+ * completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) {
+ 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.
+ * @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 OrganizationResource list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listBySubscriptionNextSinglePage(String nextLink) {
+ final String accept = "application/json";
+ Response res
+ = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, Context.NONE);
+ return 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.
+ * @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 OrganizationResource list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listBySubscriptionNextSinglePage(String nextLink,
+ Context context) {
+ final String accept = "application/json";
+ Response res
+ = service.listBySubscriptionNextSync(nextLink, this.client.getEndpoint(), accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+}
diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/OrganizationsImpl.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/OrganizationsImpl.java
new file mode 100644
index 000000000000..cc53fd431321
--- /dev/null
+++ b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/OrganizationsImpl.java
@@ -0,0 +1,184 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.napsteromniagentapi.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.napsteromniagentapi.fluent.OrganizationsClient;
+import com.azure.resourcemanager.napsteromniagentapi.fluent.models.LatestLinkedSaaSResponseInner;
+import com.azure.resourcemanager.napsteromniagentapi.fluent.models.OrganizationResourceInner;
+import com.azure.resourcemanager.napsteromniagentapi.models.LatestLinkedSaaSResponse;
+import com.azure.resourcemanager.napsteromniagentapi.models.OrganizationResource;
+import com.azure.resourcemanager.napsteromniagentapi.models.Organizations;
+import com.azure.resourcemanager.napsteromniagentapi.models.SaaSData;
+
+public final class OrganizationsImpl implements Organizations {
+ private static final ClientLogger LOGGER = new ClientLogger(OrganizationsImpl.class);
+
+ private final OrganizationsClient innerClient;
+
+ private final com.azure.resourcemanager.napsteromniagentapi.NapsterOmniagentApiManager serviceManager;
+
+ public OrganizationsImpl(OrganizationsClient innerClient,
+ com.azure.resourcemanager.napsteromniagentapi.NapsterOmniagentApiManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getByResourceGroupWithResponse(String resourceGroupName,
+ String organizationname, Context context) {
+ Response inner
+ = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, organizationname, context);
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new OrganizationResourceImpl(inner.getValue(), this.manager()));
+ }
+
+ public OrganizationResource getByResourceGroup(String resourceGroupName, String organizationname) {
+ OrganizationResourceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, organizationname);
+ if (inner != null) {
+ return new OrganizationResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public void deleteByResourceGroup(String resourceGroupName, String organizationname) {
+ this.serviceClient().delete(resourceGroupName, organizationname);
+ }
+
+ public void delete(String resourceGroupName, String organizationname, Context context) {
+ this.serviceClient().delete(resourceGroupName, organizationname, context);
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new OrganizationResourceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ PagedIterable inner
+ = this.serviceClient().listByResourceGroup(resourceGroupName, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new OrganizationResourceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new OrganizationResourceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new OrganizationResourceImpl(inner1, this.manager()));
+ }
+
+ public OrganizationResource linkSaaS(String resourceGroupName, String organizationname, SaaSData body) {
+ OrganizationResourceInner inner = this.serviceClient().linkSaaS(resourceGroupName, organizationname, body);
+ if (inner != null) {
+ return new OrganizationResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public OrganizationResource linkSaaS(String resourceGroupName, String organizationname, SaaSData body,
+ Context context) {
+ OrganizationResourceInner inner
+ = this.serviceClient().linkSaaS(resourceGroupName, organizationname, body, context);
+ if (inner != null) {
+ return new OrganizationResourceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response latestLinkedSaaSWithResponse(String resourceGroupName,
+ String organizationname, Context context) {
+ Response inner
+ = this.serviceClient().latestLinkedSaaSWithResponse(resourceGroupName, organizationname, context);
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new LatestLinkedSaaSResponseImpl(inner.getValue(), this.manager()));
+ }
+
+ public LatestLinkedSaaSResponse latestLinkedSaaS(String resourceGroupName, String organizationname) {
+ LatestLinkedSaaSResponseInner inner
+ = this.serviceClient().latestLinkedSaaS(resourceGroupName, organizationname);
+ if (inner != null) {
+ return new LatestLinkedSaaSResponseImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public OrganizationResource 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 organizationname = ResourceManagerUtils.getValueFromIdByName(id, "organizations");
+ if (organizationname == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, organizationname, 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 organizationname = ResourceManagerUtils.getValueFromIdByName(id, "organizations");
+ if (organizationname == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, organizationname, 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 organizationname = ResourceManagerUtils.getValueFromIdByName(id, "organizations");
+ if (organizationname == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id)));
+ }
+ this.delete(resourceGroupName, organizationname, 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 organizationname = ResourceManagerUtils.getValueFromIdByName(id, "organizations");
+ if (organizationname == null) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'organizations'.", id)));
+ }
+ this.delete(resourceGroupName, organizationname, context);
+ }
+
+ private OrganizationsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.napsteromniagentapi.NapsterOmniagentApiManager manager() {
+ return this.serviceManager;
+ }
+
+ public OrganizationResourceImpl define(String name) {
+ return new OrganizationResourceImpl(name, this.manager());
+ }
+}
diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/ResourceManagerUtils.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/ResourceManagerUtils.java
new file mode 100644
index 000000000000..89b15cb30ebd
--- /dev/null
+++ b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/ResourceManagerUtils.java
@@ -0,0 +1,195 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.napsteromniagentapi.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 {
+
+ private final Iterator iterator;
+ private final Function mapper;
+
+ private IteratorImpl(Iterator iterator, Function mapper) {
+ this.iterator = iterator;
+ this.mapper = mapper;
+ }
+
+ @Override
+ public boolean hasNext() {
+ return iterator.hasNext();
+ }
+
+ @Override
+ public S next() {
+ return mapper.apply(iterator.next());
+ }
+
+ @Override
+ public void remove() {
+ iterator.remove();
+ }
+ }
+
+ private static final class IterableImpl implements Iterable {
+
+ private final Iterable iterable;
+ private final Function mapper;
+
+ private IterableImpl(Iterable iterable, Function mapper) {
+ this.iterable = iterable;
+ this.mapper = mapper;
+ }
+
+ @Override
+ public Iterator iterator() {
+ return new IteratorImpl<>(iterable.iterator(), mapper);
+ }
+ }
+}
diff --git a/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/SaaSOperationGroupsClientImpl.java b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/SaaSOperationGroupsClientImpl.java
new file mode 100644
index 000000000000..e1195a211261
--- /dev/null
+++ b/sdk/napsteromniagentapi/azure-resourcemanager-napsteromniagentapi/src/main/java/com/azure/resourcemanager/napsteromniagentapi/implementation/SaaSOperationGroupsClientImpl.java
@@ -0,0 +1,233 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.napsteromniagentapi.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.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.BinaryData;
+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.napsteromniagentapi.fluent.SaaSOperationGroupsClient;
+import com.azure.resourcemanager.napsteromniagentapi.fluent.models.SaaSResourceDetailsResponseInner;
+import com.azure.resourcemanager.napsteromniagentapi.models.ActivateSaaSParameterRequest;
+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 SaaSOperationGroupsClient.
+ */
+public final class SaaSOperationGroupsClientImpl implements SaaSOperationGroupsClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final SaaSOperationGroupsService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final NapsterOmniagentApiManagementClientImpl client;
+
+ /**
+ * Initializes an instance of SaaSOperationGroupsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ SaaSOperationGroupsClientImpl(NapsterOmniagentApiManagementClientImpl client) {
+ this.service = RestProxy.create(SaaSOperationGroupsService.class, client.getHttpPipeline(),
+ client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for NapsterOmniagentApiManagementClientSaaSOperationGroups to be used by
+ * the proxy service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "NapsterOmniagentApiManagementClientSaaSOperationGroups")
+ public interface SaaSOperationGroupsService {
+ @Post("/subscriptions/{subscriptionId}/providers/Napster.CompanionAPI/activateSaaS")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> activateResource(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") ActivateSaaSParameterRequest body, Context context);
+
+ @Post("/subscriptions/{subscriptionId}/providers/Napster.CompanionAPI/activateSaaS")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response activateResourceSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") ActivateSaaSParameterRequest body, Context context);
+ }
+
+ /**
+ * Resolve the token to get the SaaS resource ID and activate the SaaS resource.
+ *
+ * @param body The request body.
+ * @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 marketplace SaaS resource details along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> activateResourceWithResponseAsync(ActivateSaaSParameterRequest body) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.activateResource(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), contentType, accept, body, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Resolve the token to get the SaaS resource ID and activate the SaaS resource.
+ *
+ * @param body The request body.
+ * @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 marketplace SaaS resource details along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response activateResourceWithResponse(ActivateSaaSParameterRequest body) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.activateResourceSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), contentType, accept, body, Context.NONE);
+ }
+
+ /**
+ * Resolve the token to get the SaaS resource ID and activate the SaaS resource.
+ *
+ * @param body The request body.
+ * @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 marketplace SaaS resource details along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Response activateResourceWithResponse(ActivateSaaSParameterRequest body, Context context) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.activateResourceSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), contentType, accept, body, context);
+ }
+
+ /**
+ * Resolve the token to get the SaaS resource ID and activate the SaaS resource.
+ *
+ * @param body The request body.
+ * @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 marketplace SaaS resource details.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, SaaSResourceDetailsResponseInner>
+ beginActivateResourceAsync(ActivateSaaSParameterRequest body) {
+ Mono>> mono = activateResourceWithResponseAsync(body);
+ return this.client.