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 Edge Marketplace service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the Edge Marketplace service API instance.
+ */
+ public EdgeMarketplaceManager 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.edgemarketplace")
+ .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 EdgeMarketplaceManager(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 Offers.
+ *
+ * @return Resource collection API of Offers.
+ */
+ public Offers offers() {
+ if (this.offers == null) {
+ this.offers = new OffersImpl(clientObject.getOffers(), this);
+ }
+ return offers;
+ }
+
+ /**
+ * Gets the resource collection API of Publishers.
+ *
+ * @return Resource collection API of Publishers.
+ */
+ public Publishers publishers() {
+ if (this.publishers == null) {
+ this.publishers = new PublishersImpl(clientObject.getPublishers(), this);
+ }
+ return publishers;
+ }
+
+ /**
+ * Gets wrapped service client EdgeMarketplaceManagementClient providing direct access to the underlying
+ * auto-generated API implementation, based on Azure REST API.
+ *
+ * @return Wrapped service client EdgeMarketplaceManagementClient.
+ */
+ public EdgeMarketplaceManagementClient serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/fluent/EdgeMarketplaceManagementClient.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/fluent/EdgeMarketplaceManagementClient.java
new file mode 100644
index 000000000000..46691ef05da5
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/fluent/EdgeMarketplaceManagementClient.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.edgemarketplace.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/**
+ * The interface for EdgeMarketplaceManagementClient class.
+ */
+public interface EdgeMarketplaceManagementClient {
+ /**
+ * 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 OffersClient object to access its operations.
+ *
+ * @return the OffersClient object.
+ */
+ OffersClient getOffers();
+
+ /**
+ * Gets the PublishersClient object to access its operations.
+ *
+ * @return the PublishersClient object.
+ */
+ PublishersClient getPublishers();
+}
diff --git a/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/fluent/OffersClient.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/fluent/OffersClient.java
new file mode 100644
index 000000000000..bba726976845
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/fluent/OffersClient.java
@@ -0,0 +1,193 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.edgemarketplace.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.edgemarketplace.fluent.models.DiskAccessTokenInner;
+import com.azure.resourcemanager.edgemarketplace.fluent.models.OfferInner;
+import com.azure.resourcemanager.edgemarketplace.models.AccessTokenReadRequest;
+import com.azure.resourcemanager.edgemarketplace.models.AccessTokenRequest;
+
+/**
+ * An instance of this class provides access to all the operations defined in OffersClient.
+ */
+public interface OffersClient {
+ /**
+ * Get a Offer.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param offerId Id of the offer.
+ * @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 Offer along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceUri, String offerId, Context context);
+
+ /**
+ * Get a Offer.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param offerId Id of the offer.
+ * @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 Offer.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OfferInner get(String resourceUri, String offerId);
+
+ /**
+ * List Offer resources by parent.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the 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 response of a Offer list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceUri);
+
+ /**
+ * List Offer resources by parent.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @param maxPageSize The maximum number of result items per page.
+ * @param filter Filter the result list using the given expression.
+ * @param skipToken Skip over when retrieving results.
+ * @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 Offer list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceUri, Integer top, Integer skip, Integer maxPageSize, String filter,
+ String skipToken, Context context);
+
+ /**
+ * A long-running resource action.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param offerId Id of the offer.
+ * @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, DiskAccessTokenInner> beginGenerateAccessToken(String resourceUri,
+ String offerId, AccessTokenRequest body);
+
+ /**
+ * A long-running resource action.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param offerId Id of the offer.
+ * @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, DiskAccessTokenInner> beginGenerateAccessToken(String resourceUri,
+ String offerId, AccessTokenRequest body, Context context);
+
+ /**
+ * A long-running resource action.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param offerId Id of the offer.
+ * @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)
+ DiskAccessTokenInner generateAccessToken(String resourceUri, String offerId, AccessTokenRequest body);
+
+ /**
+ * A long-running resource action.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param offerId Id of the offer.
+ * @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)
+ DiskAccessTokenInner generateAccessToken(String resourceUri, String offerId, AccessTokenRequest body,
+ Context context);
+
+ /**
+ * get access token.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param offerId Id of the offer.
+ * @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 access token along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getAccessTokenWithResponse(String resourceUri, String offerId,
+ AccessTokenReadRequest body, Context context);
+
+ /**
+ * get access token.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param offerId Id of the offer.
+ * @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 access token.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ DiskAccessTokenInner getAccessToken(String resourceUri, String offerId, AccessTokenReadRequest body);
+
+ /**
+ * List Offer 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 Offer list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listBySubscription();
+
+ /**
+ * List Offer 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 Offer list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listBySubscription(Context context);
+}
diff --git a/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/fluent/OperationsClient.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/fluent/OperationsClient.java
new file mode 100644
index 000000000000..a44d34920703
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/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.edgemarketplace.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.edgemarketplace.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/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/fluent/PublishersClient.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/fluent/PublishersClient.java
new file mode 100644
index 000000000000..f3c9c7db8cf4
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/fluent/PublishersClient.java
@@ -0,0 +1,97 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.edgemarketplace.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.util.Context;
+import com.azure.resourcemanager.edgemarketplace.fluent.models.PublisherInner;
+
+/**
+ * An instance of this class provides access to all the operations defined in PublishersClient.
+ */
+public interface PublishersClient {
+ /**
+ * Get a Publisher.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param publisherName Name of the publisher.
+ * @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 Publisher along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getWithResponse(String resourceUri, String publisherName, Context context);
+
+ /**
+ * Get a Publisher.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param publisherName Name of the publisher.
+ * @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 Publisher.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ PublisherInner get(String resourceUri, String publisherName);
+
+ /**
+ * List Publisher resources by parent.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the 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 response of a Publisher list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceUri);
+
+ /**
+ * List Publisher resources by parent.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @param maxPageSize The maximum number of result items per page.
+ * @param filter Filter the result list using the given expression.
+ * @param skipToken Skip over when retrieving results.
+ * @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 Publisher list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(String resourceUri, Integer top, Integer skip, Integer maxPageSize,
+ String filter, String skipToken, Context context);
+
+ /**
+ * List Publisher 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 Publisher list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listBySubscription();
+
+ /**
+ * List Publisher 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 Publisher list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listBySubscription(Context context);
+}
diff --git a/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/fluent/models/DiskAccessTokenInner.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/fluent/models/DiskAccessTokenInner.java
new file mode 100644
index 000000000000..a51f44d94bdf
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/fluent/models/DiskAccessTokenInner.java
@@ -0,0 +1,109 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.edgemarketplace.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;
+
+/**
+ * The disk access token.
+ */
+@Immutable
+public final class DiskAccessTokenInner implements JsonSerializable {
+ /*
+ * The disk id.
+ */
+ private String diskId;
+
+ /*
+ * The access token creation status.
+ */
+ private String status;
+
+ /*
+ * The access token.
+ */
+ private String accessToken;
+
+ /**
+ * Creates an instance of DiskAccessTokenInner class.
+ */
+ private DiskAccessTokenInner() {
+ }
+
+ /**
+ * Get the diskId property: The disk id.
+ *
+ * @return the diskId value.
+ */
+ public String diskId() {
+ return this.diskId;
+ }
+
+ /**
+ * Get the status property: The access token creation status.
+ *
+ * @return the status value.
+ */
+ public String status() {
+ return this.status;
+ }
+
+ /**
+ * Get the accessToken property: The access token.
+ *
+ * @return the accessToken value.
+ */
+ public String accessToken() {
+ return this.accessToken;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("accessToken", this.accessToken);
+ jsonWriter.writeStringField("diskId", this.diskId);
+ jsonWriter.writeStringField("status", this.status);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of DiskAccessTokenInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of DiskAccessTokenInner 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 DiskAccessTokenInner.
+ */
+ public static DiskAccessTokenInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ DiskAccessTokenInner deserializedDiskAccessTokenInner = new DiskAccessTokenInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("accessToken".equals(fieldName)) {
+ deserializedDiskAccessTokenInner.accessToken = reader.getString();
+ } else if ("diskId".equals(fieldName)) {
+ deserializedDiskAccessTokenInner.diskId = reader.getString();
+ } else if ("status".equals(fieldName)) {
+ deserializedDiskAccessTokenInner.status = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedDiskAccessTokenInner;
+ });
+ }
+}
diff --git a/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/fluent/models/OfferInner.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/fluent/models/OfferInner.java
new file mode 100644
index 000000000000..973581174bc6
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/fluent/models/OfferInner.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.edgemarketplace.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 com.azure.resourcemanager.edgemarketplace.models.OfferProperties;
+import java.io.IOException;
+
+/**
+ * An offer.
+ */
+@Immutable
+public final class OfferInner extends ProxyResource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ private OfferProperties properties;
+
+ /*
+ * 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 OfferInner class.
+ */
+ private OfferInner() {
+ }
+
+ /**
+ * Get the properties property: The resource-specific properties for this resource.
+ *
+ * @return the properties value.
+ */
+ public OfferProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * 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.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OfferInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OfferInner 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 OfferInner.
+ */
+ public static OfferInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OfferInner deserializedOfferInner = new OfferInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedOfferInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedOfferInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedOfferInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedOfferInner.properties = OfferProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedOfferInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOfferInner;
+ });
+ }
+}
diff --git a/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/fluent/models/OperationInner.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/fluent/models/OperationInner.java
new file mode 100644
index 000000000000..2f54e303fb07
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/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.edgemarketplace.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.edgemarketplace.models.ActionType;
+import com.azure.resourcemanager.edgemarketplace.models.OperationDisplay;
+import com.azure.resourcemanager.edgemarketplace.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/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/fluent/models/PublisherInner.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/fluent/models/PublisherInner.java
new file mode 100644
index 000000000000..74e6a14432cf
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/fluent/models/PublisherInner.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.edgemarketplace.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 com.azure.resourcemanager.edgemarketplace.models.PublisherProperties;
+import java.io.IOException;
+
+/**
+ * A publisher who provides offers.
+ */
+@Immutable
+public final class PublisherInner extends ProxyResource {
+ /*
+ * The resource-specific properties for this resource.
+ */
+ private PublisherProperties properties;
+
+ /*
+ * 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 PublisherInner class.
+ */
+ private PublisherInner() {
+ }
+
+ /**
+ * Get the properties property: The resource-specific properties for this resource.
+ *
+ * @return the properties value.
+ */
+ public PublisherProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * 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.writeJsonField("properties", this.properties);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of PublisherInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of PublisherInner 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 PublisherInner.
+ */
+ public static PublisherInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ PublisherInner deserializedPublisherInner = new PublisherInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ deserializedPublisherInner.id = reader.getString();
+ } else if ("name".equals(fieldName)) {
+ deserializedPublisherInner.name = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedPublisherInner.type = reader.getString();
+ } else if ("properties".equals(fieldName)) {
+ deserializedPublisherInner.properties = PublisherProperties.fromJson(reader);
+ } else if ("systemData".equals(fieldName)) {
+ deserializedPublisherInner.systemData = SystemData.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedPublisherInner;
+ });
+ }
+}
diff --git a/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/fluent/models/package-info.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/fluent/models/package-info.java
new file mode 100644
index 000000000000..a6d3d3e18e91
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/fluent/models/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+/**
+ * Package containing the inner data models for EdgeMarketplace.
+ * Edge marketplace extensions.
+ */
+package com.azure.resourcemanager.edgemarketplace.fluent.models;
diff --git a/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/fluent/package-info.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/fluent/package-info.java
new file mode 100644
index 000000000000..93acf4611558
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/fluent/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+/**
+ * Package containing the service clients for EdgeMarketplace.
+ * Edge marketplace extensions.
+ */
+package com.azure.resourcemanager.edgemarketplace.fluent;
diff --git a/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/DiskAccessTokenImpl.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/DiskAccessTokenImpl.java
new file mode 100644
index 000000000000..2707f1abeeba
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/DiskAccessTokenImpl.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.edgemarketplace.implementation;
+
+import com.azure.resourcemanager.edgemarketplace.fluent.models.DiskAccessTokenInner;
+import com.azure.resourcemanager.edgemarketplace.models.DiskAccessToken;
+
+public final class DiskAccessTokenImpl implements DiskAccessToken {
+ private DiskAccessTokenInner innerObject;
+
+ private final com.azure.resourcemanager.edgemarketplace.EdgeMarketplaceManager serviceManager;
+
+ DiskAccessTokenImpl(DiskAccessTokenInner innerObject,
+ com.azure.resourcemanager.edgemarketplace.EdgeMarketplaceManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String diskId() {
+ return this.innerModel().diskId();
+ }
+
+ public String status() {
+ return this.innerModel().status();
+ }
+
+ public String accessToken() {
+ return this.innerModel().accessToken();
+ }
+
+ public DiskAccessTokenInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.edgemarketplace.EdgeMarketplaceManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/EdgeMarketplaceManagementClientBuilder.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/EdgeMarketplaceManagementClientBuilder.java
new file mode 100644
index 000000000000..5a9194866e4d
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/EdgeMarketplaceManagementClientBuilder.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.edgemarketplace.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 EdgeMarketplaceManagementClientImpl type.
+ */
+@ServiceClientBuilder(serviceClients = { EdgeMarketplaceManagementClientImpl.class })
+public final class EdgeMarketplaceManagementClientBuilder {
+ /*
+ * Service host
+ */
+ private String endpoint;
+
+ /**
+ * Sets Service host.
+ *
+ * @param endpoint the endpoint value.
+ * @return the EdgeMarketplaceManagementClientBuilder.
+ */
+ public EdgeMarketplaceManagementClientBuilder 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 EdgeMarketplaceManagementClientBuilder.
+ */
+ public EdgeMarketplaceManagementClientBuilder 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 EdgeMarketplaceManagementClientBuilder.
+ */
+ public EdgeMarketplaceManagementClientBuilder 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 EdgeMarketplaceManagementClientBuilder.
+ */
+ public EdgeMarketplaceManagementClientBuilder 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 EdgeMarketplaceManagementClientBuilder.
+ */
+ public EdgeMarketplaceManagementClientBuilder 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 EdgeMarketplaceManagementClientBuilder.
+ */
+ public EdgeMarketplaceManagementClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
+ this.serializerAdapter = serializerAdapter;
+ return this;
+ }
+
+ /**
+ * Builds an instance of EdgeMarketplaceManagementClientImpl with the provided parameters.
+ *
+ * @return an instance of EdgeMarketplaceManagementClientImpl.
+ */
+ public EdgeMarketplaceManagementClientImpl 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();
+ EdgeMarketplaceManagementClientImpl client = new EdgeMarketplaceManagementClientImpl(localPipeline,
+ localSerializerAdapter, localDefaultPollInterval, localEnvironment, localEndpoint, this.subscriptionId);
+ return client;
+ }
+}
diff --git a/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/EdgeMarketplaceManagementClientImpl.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/EdgeMarketplaceManagementClientImpl.java
new file mode 100644
index 000000000000..6c8c382c0f31
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/EdgeMarketplaceManagementClientImpl.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.edgemarketplace.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.edgemarketplace.fluent.EdgeMarketplaceManagementClient;
+import com.azure.resourcemanager.edgemarketplace.fluent.OffersClient;
+import com.azure.resourcemanager.edgemarketplace.fluent.OperationsClient;
+import com.azure.resourcemanager.edgemarketplace.fluent.PublishersClient;
+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 EdgeMarketplaceManagementClientImpl type.
+ */
+@ServiceClient(builder = EdgeMarketplaceManagementClientBuilder.class)
+public final class EdgeMarketplaceManagementClientImpl implements EdgeMarketplaceManagementClient {
+ /**
+ * 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 OffersClient object to access its operations.
+ */
+ private final OffersClient offers;
+
+ /**
+ * Gets the OffersClient object to access its operations.
+ *
+ * @return the OffersClient object.
+ */
+ public OffersClient getOffers() {
+ return this.offers;
+ }
+
+ /**
+ * The PublishersClient object to access its operations.
+ */
+ private final PublishersClient publishers;
+
+ /**
+ * Gets the PublishersClient object to access its operations.
+ *
+ * @return the PublishersClient object.
+ */
+ public PublishersClient getPublishers() {
+ return this.publishers;
+ }
+
+ /**
+ * Initializes an instance of EdgeMarketplaceManagementClient 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.
+ */
+ EdgeMarketplaceManagementClientImpl(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-10-01-preview";
+ this.operations = new OperationsClientImpl(this);
+ this.offers = new OffersClientImpl(this);
+ this.publishers = new PublishersClientImpl(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(EdgeMarketplaceManagementClientImpl.class);
+}
diff --git a/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/OfferImpl.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/OfferImpl.java
new file mode 100644
index 000000000000..09bf31ffa7cf
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/OfferImpl.java
@@ -0,0 +1,49 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.edgemarketplace.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.edgemarketplace.fluent.models.OfferInner;
+import com.azure.resourcemanager.edgemarketplace.models.Offer;
+import com.azure.resourcemanager.edgemarketplace.models.OfferProperties;
+
+public final class OfferImpl implements Offer {
+ private OfferInner innerObject;
+
+ private final com.azure.resourcemanager.edgemarketplace.EdgeMarketplaceManager serviceManager;
+
+ OfferImpl(OfferInner innerObject, com.azure.resourcemanager.edgemarketplace.EdgeMarketplaceManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public OfferProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public OfferInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.edgemarketplace.EdgeMarketplaceManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/OffersClientImpl.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/OffersClientImpl.java
new file mode 100644
index 000000000000..c4937d3fa00d
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/OffersClientImpl.java
@@ -0,0 +1,880 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.edgemarketplace.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Post;
+import com.azure.core.annotation.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.edgemarketplace.fluent.OffersClient;
+import com.azure.resourcemanager.edgemarketplace.fluent.models.DiskAccessTokenInner;
+import com.azure.resourcemanager.edgemarketplace.fluent.models.OfferInner;
+import com.azure.resourcemanager.edgemarketplace.implementation.models.OfferListResult;
+import com.azure.resourcemanager.edgemarketplace.models.AccessTokenReadRequest;
+import com.azure.resourcemanager.edgemarketplace.models.AccessTokenRequest;
+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 OffersClient.
+ */
+public final class OffersClientImpl implements OffersClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final OffersService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final EdgeMarketplaceManagementClientImpl client;
+
+ /**
+ * Initializes an instance of OffersClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ OffersClientImpl(EdgeMarketplaceManagementClientImpl client) {
+ this.service = RestProxy.create(OffersService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for EdgeMarketplaceManagementClientOffers to be used by the proxy service
+ * to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "EdgeMarketplaceManagementClientOffers")
+ public interface OffersService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/{resourceUri}/providers/Microsoft.EdgeMarketplace/offers/{offerId}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam(value = "resourceUri", encoded = true) String resourceUri, @PathParam("offerId") String offerId,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/{resourceUri}/providers/Microsoft.EdgeMarketplace/offers/{offerId}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam(value = "resourceUri", encoded = true) String resourceUri, @PathParam("offerId") String offerId,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/{resourceUri}/providers/Microsoft.EdgeMarketplace/offers")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam(value = "resourceUri", encoded = true) String resourceUri, @QueryParam("$top") Integer top,
+ @QueryParam("skip") Integer skip, @QueryParam("maxpagesize") Integer maxPageSize,
+ @QueryParam("$filter") String filter, @QueryParam("$skipToken") String skipToken,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/{resourceUri}/providers/Microsoft.EdgeMarketplace/offers")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam(value = "resourceUri", encoded = true) String resourceUri, @QueryParam("$top") Integer top,
+ @QueryParam("skip") Integer skip, @QueryParam("maxpagesize") Integer maxPageSize,
+ @QueryParam("$filter") String filter, @QueryParam("$skipToken") String skipToken,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Post("/{resourceUri}/providers/Microsoft.EdgeMarketplace/offers/{offerId}/generateAccessToken")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> generateAccessToken(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam(value = "resourceUri", encoded = true) String resourceUri, @PathParam("offerId") String offerId,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") AccessTokenRequest body, Context context);
+
+ @Post("/{resourceUri}/providers/Microsoft.EdgeMarketplace/offers/{offerId}/generateAccessToken")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response generateAccessTokenSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam(value = "resourceUri", encoded = true) String resourceUri, @PathParam("offerId") String offerId,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") AccessTokenRequest body, Context context);
+
+ @Post("/{resourceUri}/providers/Microsoft.EdgeMarketplace/offers/{offerId}/getAccessToken")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getAccessToken(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam(value = "resourceUri", encoded = true) String resourceUri, @PathParam("offerId") String offerId,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") AccessTokenReadRequest body, Context context);
+
+ @Post("/{resourceUri}/providers/Microsoft.EdgeMarketplace/offers/{offerId}/getAccessToken")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getAccessTokenSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam(value = "resourceUri", encoded = true) String resourceUri, @PathParam("offerId") String offerId,
+ @HeaderParam("Content-Type") String contentType, @HeaderParam("Accept") String accept,
+ @BodyParam("application/json") AccessTokenReadRequest body, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EdgeMarketplace/offers")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listBySubscription(@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/Microsoft.EdgeMarketplace/offers")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listBySubscriptionSync(@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("{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);
+
+ @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 Offer.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param offerId Id of the offer.
+ * @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 Offer along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceUri, String offerId) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri,
+ offerId, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a Offer.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param offerId Id of the offer.
+ * @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 Offer on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceUri, String offerId) {
+ return getWithResponseAsync(resourceUri, offerId).flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get a Offer.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param offerId Id of the offer.
+ * @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 Offer along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String resourceUri, String offerId, Context context) {
+ final String accept = "application/json";
+ return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, offerId, accept,
+ context);
+ }
+
+ /**
+ * Get a Offer.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param offerId Id of the offer.
+ * @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 Offer.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public OfferInner get(String resourceUri, String offerId) {
+ return getWithResponse(resourceUri, offerId, Context.NONE).getValue();
+ }
+
+ /**
+ * List Offer resources by parent.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @param maxPageSize The maximum number of result items per page.
+ * @param filter Filter the result list using the given expression.
+ * @param skipToken Skip over when retrieving results.
+ * @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 Offer list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(String resourceUri, Integer top, Integer skip,
+ Integer maxPageSize, String filter, String skipToken) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri,
+ top, skip, maxPageSize, filter, skipToken, 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 Offer resources by parent.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @param maxPageSize The maximum number of result items per page.
+ * @param filter Filter the result list using the given expression.
+ * @param skipToken Skip over when retrieving results.
+ * @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 Offer list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceUri, Integer top, Integer skip, Integer maxPageSize,
+ String filter, String skipToken) {
+ return new PagedFlux<>(() -> listSinglePageAsync(resourceUri, top, skip, maxPageSize, filter, skipToken),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List Offer resources by parent.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the 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 of a Offer list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceUri) {
+ final Integer top = null;
+ final Integer skip = null;
+ final Integer maxPageSize = null;
+ final String filter = null;
+ final String skipToken = null;
+ return new PagedFlux<>(() -> listSinglePageAsync(resourceUri, top, skip, maxPageSize, filter, skipToken),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List Offer resources by parent.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @param maxPageSize The maximum number of result items per page.
+ * @param filter Filter the result list using the given expression.
+ * @param skipToken Skip over when retrieving results.
+ * @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 Offer list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(String resourceUri, Integer top, Integer skip, Integer maxPageSize,
+ String filter, String skipToken) {
+ final String accept = "application/json";
+ Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ resourceUri, top, skip, maxPageSize, filter, skipToken, accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * List Offer resources by parent.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @param maxPageSize The maximum number of result items per page.
+ * @param filter Filter the result list using the given expression.
+ * @param skipToken Skip over when retrieving results.
+ * @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 Offer list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(String resourceUri, Integer top, Integer skip, Integer maxPageSize,
+ String filter, String skipToken, Context context) {
+ final String accept = "application/json";
+ Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ resourceUri, top, skip, maxPageSize, filter, skipToken, accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * List Offer resources by parent.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the 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 of a Offer list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceUri) {
+ final Integer top = null;
+ final Integer skip = null;
+ final Integer maxPageSize = null;
+ final String filter = null;
+ final String skipToken = null;
+ return new PagedIterable<>(() -> listSinglePage(resourceUri, top, skip, maxPageSize, filter, skipToken),
+ nextLink -> listNextSinglePage(nextLink));
+ }
+
+ /**
+ * List Offer resources by parent.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @param maxPageSize The maximum number of result items per page.
+ * @param filter Filter the result list using the given expression.
+ * @param skipToken Skip over when retrieving results.
+ * @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 Offer list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceUri, Integer top, Integer skip, Integer maxPageSize,
+ String filter, String skipToken, Context context) {
+ return new PagedIterable<>(
+ () -> listSinglePage(resourceUri, top, skip, maxPageSize, filter, skipToken, context),
+ nextLink -> listNextSinglePage(nextLink, context));
+ }
+
+ /**
+ * A long-running resource action.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param offerId Id of the offer.
+ * @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>> generateAccessTokenWithResponseAsync(String resourceUri, String offerId,
+ AccessTokenRequest body) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.generateAccessToken(this.client.getEndpoint(), this.client.getApiVersion(),
+ resourceUri, offerId, contentType, accept, body, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * A long-running resource action.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param offerId Id of the offer.
+ * @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 generateAccessTokenWithResponse(String resourceUri, String offerId,
+ AccessTokenRequest body) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.generateAccessTokenSync(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri,
+ offerId, contentType, accept, body, Context.NONE);
+ }
+
+ /**
+ * A long-running resource action.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param offerId Id of the offer.
+ * @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 generateAccessTokenWithResponse(String resourceUri, String offerId,
+ AccessTokenRequest body, Context context) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.generateAccessTokenSync(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri,
+ offerId, contentType, accept, body, context);
+ }
+
+ /**
+ * A long-running resource action.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param offerId Id of the offer.
+ * @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, DiskAccessTokenInner>
+ beginGenerateAccessTokenAsync(String resourceUri, String offerId, AccessTokenRequest body) {
+ Mono>> mono = generateAccessTokenWithResponseAsync(resourceUri, offerId, body);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(),
+ DiskAccessTokenInner.class, DiskAccessTokenInner.class, this.client.getContext());
+ }
+
+ /**
+ * A long-running resource action.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param offerId Id of the offer.
+ * @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, DiskAccessTokenInner>
+ beginGenerateAccessToken(String resourceUri, String offerId, AccessTokenRequest body) {
+ Response response = generateAccessTokenWithResponse(resourceUri, offerId, body);
+ return this.client.getLroResult(response,
+ DiskAccessTokenInner.class, DiskAccessTokenInner.class, Context.NONE);
+ }
+
+ /**
+ * A long-running resource action.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param offerId Id of the offer.
+ * @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, DiskAccessTokenInner>
+ beginGenerateAccessToken(String resourceUri, String offerId, AccessTokenRequest body, Context context) {
+ Response response = generateAccessTokenWithResponse(resourceUri, offerId, body, context);
+ return this.client.getLroResult(response,
+ DiskAccessTokenInner.class, DiskAccessTokenInner.class, context);
+ }
+
+ /**
+ * A long-running resource action.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param offerId Id of the offer.
+ * @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 generateAccessTokenAsync(String resourceUri, String offerId,
+ AccessTokenRequest body) {
+ return beginGenerateAccessTokenAsync(resourceUri, offerId, body).last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * A long-running resource action.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param offerId Id of the offer.
+ * @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 DiskAccessTokenInner generateAccessToken(String resourceUri, String offerId, AccessTokenRequest body) {
+ return beginGenerateAccessToken(resourceUri, offerId, body).getFinalResult();
+ }
+
+ /**
+ * A long-running resource action.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param offerId Id of the offer.
+ * @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 DiskAccessTokenInner generateAccessToken(String resourceUri, String offerId, AccessTokenRequest body,
+ Context context) {
+ return beginGenerateAccessToken(resourceUri, offerId, body, context).getFinalResult();
+ }
+
+ /**
+ * get access token.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param offerId Id of the offer.
+ * @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 access token along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getAccessTokenWithResponseAsync(String resourceUri, String offerId,
+ AccessTokenReadRequest body) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.getAccessToken(this.client.getEndpoint(), this.client.getApiVersion(),
+ resourceUri, offerId, contentType, accept, body, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * get access token.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param offerId Id of the offer.
+ * @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 access token on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAccessTokenAsync(String resourceUri, String offerId,
+ AccessTokenReadRequest body) {
+ return getAccessTokenWithResponseAsync(resourceUri, offerId, body)
+ .flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * get access token.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param offerId Id of the offer.
+ * @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 access token along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getAccessTokenWithResponse(String resourceUri, String offerId,
+ AccessTokenReadRequest body, Context context) {
+ final String contentType = "application/json";
+ final String accept = "application/json";
+ return service.getAccessTokenSync(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, offerId,
+ contentType, accept, body, context);
+ }
+
+ /**
+ * get access token.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param offerId Id of the offer.
+ * @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 access token.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DiskAccessTokenInner getAccessToken(String resourceUri, String offerId, AccessTokenReadRequest body) {
+ return getAccessTokenWithResponse(resourceUri, offerId, body, Context.NONE).getValue();
+ }
+
+ /**
+ * List Offer 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 Offer list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionSinglePageAsync() {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listBySubscription(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 Offer 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 Offer list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listBySubscriptionAsync() {
+ return new PagedFlux<>(() -> listBySubscriptionSinglePageAsync(),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List Offer 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 Offer list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listBySubscriptionSinglePage() {
+ final String accept = "application/json";
+ Response res = service.listBySubscriptionSync(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 Offer 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 Offer list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listBySubscriptionSinglePage(Context context) {
+ final String accept = "application/json";
+ Response res = service.listBySubscriptionSync(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 Offer 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 Offer list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listBySubscription() {
+ return new PagedIterable<>(() -> listBySubscriptionSinglePage(),
+ nextLink -> listBySubscriptionNextSinglePage(nextLink));
+ }
+
+ /**
+ * List Offer 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 Offer list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listBySubscription(Context context) {
+ return new PagedIterable<>(() -> listBySubscriptionSinglePage(context),
+ nextLink -> listBySubscriptionNextSinglePage(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 the response of a Offer list operation 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 the response of a Offer list operation 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 the response of a Offer list operation 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);
+ }
+
+ /**
+ * 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 Offer 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 Offer 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 Offer 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/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/OffersImpl.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/OffersImpl.java
new file mode 100644
index 000000000000..252501bb2ab4
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/OffersImpl.java
@@ -0,0 +1,122 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.edgemarketplace.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.edgemarketplace.fluent.OffersClient;
+import com.azure.resourcemanager.edgemarketplace.fluent.models.DiskAccessTokenInner;
+import com.azure.resourcemanager.edgemarketplace.fluent.models.OfferInner;
+import com.azure.resourcemanager.edgemarketplace.models.AccessTokenReadRequest;
+import com.azure.resourcemanager.edgemarketplace.models.AccessTokenRequest;
+import com.azure.resourcemanager.edgemarketplace.models.DiskAccessToken;
+import com.azure.resourcemanager.edgemarketplace.models.Offer;
+import com.azure.resourcemanager.edgemarketplace.models.Offers;
+
+public final class OffersImpl implements Offers {
+ private static final ClientLogger LOGGER = new ClientLogger(OffersImpl.class);
+
+ private final OffersClient innerClient;
+
+ private final com.azure.resourcemanager.edgemarketplace.EdgeMarketplaceManager serviceManager;
+
+ public OffersImpl(OffersClient innerClient,
+ com.azure.resourcemanager.edgemarketplace.EdgeMarketplaceManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getWithResponse(String resourceUri, String offerId, Context context) {
+ Response inner = this.serviceClient().getWithResponse(resourceUri, offerId, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new OfferImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public Offer get(String resourceUri, String offerId) {
+ OfferInner inner = this.serviceClient().get(resourceUri, offerId);
+ if (inner != null) {
+ return new OfferImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public PagedIterable list(String resourceUri) {
+ PagedIterable inner = this.serviceClient().list(resourceUri);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new OfferImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(String resourceUri, Integer top, Integer skip, Integer maxPageSize, String filter,
+ String skipToken, Context context) {
+ PagedIterable inner
+ = this.serviceClient().list(resourceUri, top, skip, maxPageSize, filter, skipToken, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new OfferImpl(inner1, this.manager()));
+ }
+
+ public DiskAccessToken generateAccessToken(String resourceUri, String offerId, AccessTokenRequest body) {
+ DiskAccessTokenInner inner = this.serviceClient().generateAccessToken(resourceUri, offerId, body);
+ if (inner != null) {
+ return new DiskAccessTokenImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public DiskAccessToken generateAccessToken(String resourceUri, String offerId, AccessTokenRequest body,
+ Context context) {
+ DiskAccessTokenInner inner = this.serviceClient().generateAccessToken(resourceUri, offerId, body, context);
+ if (inner != null) {
+ return new DiskAccessTokenImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getAccessTokenWithResponse(String resourceUri, String offerId,
+ AccessTokenReadRequest body, Context context) {
+ Response inner
+ = this.serviceClient().getAccessTokenWithResponse(resourceUri, offerId, body, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new DiskAccessTokenImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public DiskAccessToken getAccessToken(String resourceUri, String offerId, AccessTokenReadRequest body) {
+ DiskAccessTokenInner inner = this.serviceClient().getAccessToken(resourceUri, offerId, body);
+ if (inner != null) {
+ return new DiskAccessTokenImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public PagedIterable listBySubscription() {
+ PagedIterable inner = this.serviceClient().listBySubscription();
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new OfferImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listBySubscription(Context context) {
+ PagedIterable inner = this.serviceClient().listBySubscription(context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new OfferImpl(inner1, this.manager()));
+ }
+
+ private OffersClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.edgemarketplace.EdgeMarketplaceManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/OperationImpl.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/OperationImpl.java
new file mode 100644
index 000000000000..9e138a23c80e
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/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.edgemarketplace.implementation;
+
+import com.azure.resourcemanager.edgemarketplace.fluent.models.OperationInner;
+import com.azure.resourcemanager.edgemarketplace.models.ActionType;
+import com.azure.resourcemanager.edgemarketplace.models.Operation;
+import com.azure.resourcemanager.edgemarketplace.models.OperationDisplay;
+import com.azure.resourcemanager.edgemarketplace.models.Origin;
+
+public final class OperationImpl implements Operation {
+ private OperationInner innerObject;
+
+ private final com.azure.resourcemanager.edgemarketplace.EdgeMarketplaceManager serviceManager;
+
+ OperationImpl(OperationInner innerObject,
+ com.azure.resourcemanager.edgemarketplace.EdgeMarketplaceManager 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.edgemarketplace.EdgeMarketplaceManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/OperationsClientImpl.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/OperationsClientImpl.java
new file mode 100644
index 000000000000..8d900bcd86fc
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/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.edgemarketplace.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.edgemarketplace.fluent.OperationsClient;
+import com.azure.resourcemanager.edgemarketplace.fluent.models.OperationInner;
+import com.azure.resourcemanager.edgemarketplace.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 EdgeMarketplaceManagementClientImpl client;
+
+ /**
+ * Initializes an instance of OperationsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ OperationsClientImpl(EdgeMarketplaceManagementClientImpl client) {
+ this.service
+ = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for EdgeMarketplaceManagementClientOperations to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "EdgeMarketplaceManagementClientOperations")
+ public interface OperationsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/providers/Microsoft.EdgeMarketplace/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/Microsoft.EdgeMarketplace/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/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/OperationsImpl.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/OperationsImpl.java
new file mode 100644
index 000000000000..37f799056425
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/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.edgemarketplace.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.edgemarketplace.fluent.OperationsClient;
+import com.azure.resourcemanager.edgemarketplace.fluent.models.OperationInner;
+import com.azure.resourcemanager.edgemarketplace.models.Operation;
+import com.azure.resourcemanager.edgemarketplace.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.edgemarketplace.EdgeMarketplaceManager serviceManager;
+
+ public OperationsImpl(OperationsClient innerClient,
+ com.azure.resourcemanager.edgemarketplace.EdgeMarketplaceManager 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.edgemarketplace.EdgeMarketplaceManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/PublisherImpl.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/PublisherImpl.java
new file mode 100644
index 000000000000..d521b49d1825
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/PublisherImpl.java
@@ -0,0 +1,50 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.edgemarketplace.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.edgemarketplace.fluent.models.PublisherInner;
+import com.azure.resourcemanager.edgemarketplace.models.Publisher;
+import com.azure.resourcemanager.edgemarketplace.models.PublisherProperties;
+
+public final class PublisherImpl implements Publisher {
+ private PublisherInner innerObject;
+
+ private final com.azure.resourcemanager.edgemarketplace.EdgeMarketplaceManager serviceManager;
+
+ PublisherImpl(PublisherInner innerObject,
+ com.azure.resourcemanager.edgemarketplace.EdgeMarketplaceManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public PublisherProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public PublisherInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.edgemarketplace.EdgeMarketplaceManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/PublishersClientImpl.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/PublishersClientImpl.java
new file mode 100644
index 000000000000..9059181d3cf4
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/PublishersClientImpl.java
@@ -0,0 +1,585 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.edgemarketplace.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.edgemarketplace.fluent.PublishersClient;
+import com.azure.resourcemanager.edgemarketplace.fluent.models.PublisherInner;
+import com.azure.resourcemanager.edgemarketplace.implementation.models.PublisherListResult;
+import reactor.core.publisher.Mono;
+
+/**
+ * An instance of this class provides access to all the operations defined in PublishersClient.
+ */
+public final class PublishersClientImpl implements PublishersClient {
+ /**
+ * The proxy service used to perform REST calls.
+ */
+ private final PublishersService service;
+
+ /**
+ * The service client containing this operation class.
+ */
+ private final EdgeMarketplaceManagementClientImpl client;
+
+ /**
+ * Initializes an instance of PublishersClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ PublishersClientImpl(EdgeMarketplaceManagementClientImpl client) {
+ this.service
+ = RestProxy.create(PublishersService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for EdgeMarketplaceManagementClientPublishers to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{endpoint}")
+ @ServiceInterface(name = "EdgeMarketplaceManagementClientPublishers")
+ public interface PublishersService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/{resourceUri}/providers/Microsoft.EdgeMarketplace/publishers/{publisherName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam(value = "resourceUri", encoded = true) String resourceUri,
+ @PathParam("publisherName") String publisherName, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/{resourceUri}/providers/Microsoft.EdgeMarketplace/publishers/{publisherName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response getSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam(value = "resourceUri", encoded = true) String resourceUri,
+ @PathParam("publisherName") String publisherName, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/{resourceUri}/providers/Microsoft.EdgeMarketplace/publishers")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam(value = "resourceUri", encoded = true) String resourceUri, @QueryParam("$top") Integer top,
+ @QueryParam("skip") Integer skip, @QueryParam("maxpagesize") Integer maxPageSize,
+ @QueryParam("$filter") String filter, @QueryParam("$skipToken") String skipToken,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/{resourceUri}/providers/Microsoft.EdgeMarketplace/publishers")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listSync(@HostParam("endpoint") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam(value = "resourceUri", encoded = true) String resourceUri, @QueryParam("$top") Integer top,
+ @QueryParam("skip") Integer skip, @QueryParam("maxpagesize") Integer maxPageSize,
+ @QueryParam("$filter") String filter, @QueryParam("$skipToken") String skipToken,
+ @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.EdgeMarketplace/publishers")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listBySubscription(@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/Microsoft.EdgeMarketplace/publishers")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Response listBySubscriptionSync(@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("{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);
+
+ @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 Publisher.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param publisherName Name of the publisher.
+ * @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 Publisher along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceUri, String publisherName) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri,
+ publisherName, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get a Publisher.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param publisherName Name of the publisher.
+ * @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 Publisher on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceUri, String publisherName) {
+ return getWithResponseAsync(resourceUri, publisherName).flatMap(res -> Mono.justOrEmpty(res.getValue()));
+ }
+
+ /**
+ * Get a Publisher.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param publisherName Name of the publisher.
+ * @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 Publisher along with {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(String resourceUri, String publisherName, Context context) {
+ final String accept = "application/json";
+ return service.getSync(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, publisherName,
+ accept, context);
+ }
+
+ /**
+ * Get a Publisher.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param publisherName Name of the publisher.
+ * @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 Publisher.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public PublisherInner get(String resourceUri, String publisherName) {
+ return getWithResponse(resourceUri, publisherName, Context.NONE).getValue();
+ }
+
+ /**
+ * List Publisher resources by parent.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @param maxPageSize The maximum number of result items per page.
+ * @param filter Filter the result list using the given expression.
+ * @param skipToken Skip over when retrieving results.
+ * @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 Publisher list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(String resourceUri, Integer top, Integer skip,
+ Integer maxPageSize, String filter, String skipToken) {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri,
+ top, skip, maxPageSize, filter, skipToken, 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 Publisher resources by parent.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @param maxPageSize The maximum number of result items per page.
+ * @param filter Filter the result list using the given expression.
+ * @param skipToken Skip over when retrieving results.
+ * @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 Publisher list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceUri, Integer top, Integer skip, Integer maxPageSize,
+ String filter, String skipToken) {
+ return new PagedFlux<>(() -> listSinglePageAsync(resourceUri, top, skip, maxPageSize, filter, skipToken),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List Publisher resources by parent.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the 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 of a Publisher list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceUri) {
+ final Integer top = null;
+ final Integer skip = null;
+ final Integer maxPageSize = null;
+ final String filter = null;
+ final String skipToken = null;
+ return new PagedFlux<>(() -> listSinglePageAsync(resourceUri, top, skip, maxPageSize, filter, skipToken),
+ nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List Publisher resources by parent.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @param maxPageSize The maximum number of result items per page.
+ * @param filter Filter the result list using the given expression.
+ * @param skipToken Skip over when retrieving results.
+ * @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 Publisher list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(String resourceUri, Integer top, Integer skip,
+ Integer maxPageSize, String filter, String skipToken) {
+ final String accept = "application/json";
+ Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ resourceUri, top, skip, maxPageSize, filter, skipToken, accept, Context.NONE);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * List Publisher resources by parent.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @param maxPageSize The maximum number of result items per page.
+ * @param filter Filter the result list using the given expression.
+ * @param skipToken Skip over when retrieving results.
+ * @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 Publisher list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listSinglePage(String resourceUri, Integer top, Integer skip,
+ Integer maxPageSize, String filter, String skipToken, Context context) {
+ final String accept = "application/json";
+ Response res = service.listSync(this.client.getEndpoint(), this.client.getApiVersion(),
+ resourceUri, top, skip, maxPageSize, filter, skipToken, accept, context);
+ return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(),
+ res.getValue().nextLink(), null);
+ }
+
+ /**
+ * List Publisher resources by parent.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the 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 of a Publisher list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceUri) {
+ final Integer top = null;
+ final Integer skip = null;
+ final Integer maxPageSize = null;
+ final String filter = null;
+ final String skipToken = null;
+ return new PagedIterable<>(() -> listSinglePage(resourceUri, top, skip, maxPageSize, filter, skipToken),
+ nextLink -> listNextSinglePage(nextLink));
+ }
+
+ /**
+ * List Publisher resources by parent.
+ *
+ * @param resourceUri The fully qualified Azure Resource manager identifier of the resource.
+ * @param top The number of result items to return.
+ * @param skip The number of result items to skip.
+ * @param maxPageSize The maximum number of result items per page.
+ * @param filter Filter the result list using the given expression.
+ * @param skipToken Skip over when retrieving results.
+ * @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 Publisher list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(String resourceUri, Integer top, Integer skip, Integer maxPageSize,
+ String filter, String skipToken, Context context) {
+ return new PagedIterable<>(
+ () -> listSinglePage(resourceUri, top, skip, maxPageSize, filter, skipToken, context),
+ nextLink -> listNextSinglePage(nextLink, context));
+ }
+
+ /**
+ * List Publisher 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 Publisher list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionSinglePageAsync() {
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listBySubscription(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 Publisher 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 Publisher list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listBySubscriptionAsync() {
+ return new PagedFlux<>(() -> listBySubscriptionSinglePageAsync(),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List Publisher 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 Publisher list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listBySubscriptionSinglePage() {
+ final String accept = "application/json";
+ Response res = service.listBySubscriptionSync(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 Publisher 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 Publisher list operation along with {@link PagedResponse}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PagedResponse listBySubscriptionSinglePage(Context context) {
+ final String accept = "application/json";
+ Response res = service.listBySubscriptionSync(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 Publisher 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 Publisher list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listBySubscription() {
+ return new PagedIterable<>(() -> listBySubscriptionSinglePage(),
+ nextLink -> listBySubscriptionNextSinglePage(nextLink));
+ }
+
+ /**
+ * List Publisher 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 Publisher list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listBySubscription(Context context) {
+ return new PagedIterable<>(() -> listBySubscriptionSinglePage(context),
+ nextLink -> listBySubscriptionNextSinglePage(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 the response of a Publisher list operation 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 the response of a Publisher list operation 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 the response of a Publisher list operation 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);
+ }
+
+ /**
+ * 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 Publisher 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 Publisher 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 Publisher 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/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/PublishersImpl.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/PublishersImpl.java
new file mode 100644
index 000000000000..1d37bde31b02
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/PublishersImpl.java
@@ -0,0 +1,78 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.edgemarketplace.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.edgemarketplace.fluent.PublishersClient;
+import com.azure.resourcemanager.edgemarketplace.fluent.models.PublisherInner;
+import com.azure.resourcemanager.edgemarketplace.models.Publisher;
+import com.azure.resourcemanager.edgemarketplace.models.Publishers;
+
+public final class PublishersImpl implements Publishers {
+ private static final ClientLogger LOGGER = new ClientLogger(PublishersImpl.class);
+
+ private final PublishersClient innerClient;
+
+ private final com.azure.resourcemanager.edgemarketplace.EdgeMarketplaceManager serviceManager;
+
+ public PublishersImpl(PublishersClient innerClient,
+ com.azure.resourcemanager.edgemarketplace.EdgeMarketplaceManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public Response getWithResponse(String resourceUri, String publisherName, Context context) {
+ Response inner = this.serviceClient().getWithResponse(resourceUri, publisherName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(),
+ new PublisherImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public Publisher get(String resourceUri, String publisherName) {
+ PublisherInner inner = this.serviceClient().get(resourceUri, publisherName);
+ if (inner != null) {
+ return new PublisherImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public PagedIterable list(String resourceUri) {
+ PagedIterable inner = this.serviceClient().list(resourceUri);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new PublisherImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(String resourceUri, Integer top, Integer skip, Integer maxPageSize,
+ String filter, String skipToken, Context context) {
+ PagedIterable inner
+ = this.serviceClient().list(resourceUri, top, skip, maxPageSize, filter, skipToken, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new PublisherImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listBySubscription() {
+ PagedIterable inner = this.serviceClient().listBySubscription();
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new PublisherImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listBySubscription(Context context) {
+ PagedIterable inner = this.serviceClient().listBySubscription(context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new PublisherImpl(inner1, this.manager()));
+ }
+
+ private PublishersClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.edgemarketplace.EdgeMarketplaceManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/ResourceManagerUtils.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/ResourceManagerUtils.java
new file mode 100644
index 000000000000..028406579160
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/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.edgemarketplace.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/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/models/OfferListResult.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/models/OfferListResult.java
new file mode 100644
index 000000000000..7191454da54b
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/models/OfferListResult.java
@@ -0,0 +1,95 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.edgemarketplace.implementation.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.edgemarketplace.fluent.models.OfferInner;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * The response of a Offer list operation.
+ */
+@Immutable
+public final class OfferListResult implements JsonSerializable {
+ /*
+ * The Offer items on this page
+ */
+ private List value;
+
+ /*
+ * The link to the next page of items
+ */
+ private String nextLink;
+
+ /**
+ * Creates an instance of OfferListResult class.
+ */
+ private OfferListResult() {
+ }
+
+ /**
+ * Get the value property: The Offer items on this page.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Get the nextLink property: The link to the next page of items.
+ *
+ * @return the nextLink value.
+ */
+ public String nextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeStringField("nextLink", this.nextLink);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OfferListResult from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OfferListResult 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 OfferListResult.
+ */
+ public static OfferListResult fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OfferListResult deserializedOfferListResult = new OfferListResult();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value = reader.readArray(reader1 -> OfferInner.fromJson(reader1));
+ deserializedOfferListResult.value = value;
+ } else if ("nextLink".equals(fieldName)) {
+ deserializedOfferListResult.nextLink = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOfferListResult;
+ });
+ }
+}
diff --git a/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/models/OperationListResult.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/models/OperationListResult.java
new file mode 100644
index 000000000000..662975ed87c7
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/models/OperationListResult.java
@@ -0,0 +1,96 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.edgemarketplace.implementation.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.edgemarketplace.fluent.models.OperationInner;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of
+ * results.
+ */
+@Immutable
+public final class OperationListResult implements JsonSerializable {
+ /*
+ * The Operation items on this page
+ */
+ private List value;
+
+ /*
+ * The link to the next page of items
+ */
+ private String nextLink;
+
+ /**
+ * Creates an instance of OperationListResult class.
+ */
+ private OperationListResult() {
+ }
+
+ /**
+ * Get the value property: The Operation items on this page.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Get the nextLink property: The link to the next page of items.
+ *
+ * @return the nextLink value.
+ */
+ public String nextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeStringField("nextLink", this.nextLink);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OperationListResult from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OperationListResult 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 OperationListResult.
+ */
+ public static OperationListResult fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OperationListResult deserializedOperationListResult = new OperationListResult();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value = reader.readArray(reader1 -> OperationInner.fromJson(reader1));
+ deserializedOperationListResult.value = value;
+ } else if ("nextLink".equals(fieldName)) {
+ deserializedOperationListResult.nextLink = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOperationListResult;
+ });
+ }
+}
diff --git a/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/models/PublisherListResult.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/models/PublisherListResult.java
new file mode 100644
index 000000000000..1334a9f82b40
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/models/PublisherListResult.java
@@ -0,0 +1,95 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.edgemarketplace.implementation.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.edgemarketplace.fluent.models.PublisherInner;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * The response of a Publisher list operation.
+ */
+@Immutable
+public final class PublisherListResult implements JsonSerializable {
+ /*
+ * The Publisher items on this page
+ */
+ private List value;
+
+ /*
+ * The link to the next page of items
+ */
+ private String nextLink;
+
+ /**
+ * Creates an instance of PublisherListResult class.
+ */
+ private PublisherListResult() {
+ }
+
+ /**
+ * Get the value property: The Publisher items on this page.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Get the nextLink property: The link to the next page of items.
+ *
+ * @return the nextLink value.
+ */
+ public String nextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("value", this.value, (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeStringField("nextLink", this.nextLink);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of PublisherListResult from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of PublisherListResult 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 PublisherListResult.
+ */
+ public static PublisherListResult fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ PublisherListResult deserializedPublisherListResult = new PublisherListResult();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("value".equals(fieldName)) {
+ List value = reader.readArray(reader1 -> PublisherInner.fromJson(reader1));
+ deserializedPublisherListResult.value = value;
+ } else if ("nextLink".equals(fieldName)) {
+ deserializedPublisherListResult.nextLink = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedPublisherListResult;
+ });
+ }
+}
diff --git a/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/package-info.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/package-info.java
new file mode 100644
index 000000000000..4542d7f975a2
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/package-info.java
@@ -0,0 +1,9 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+/**
+ * Package containing the implementations for EdgeMarketplace.
+ * Edge marketplace extensions.
+ */
+package com.azure.resourcemanager.edgemarketplace.implementation;
diff --git a/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/AccessTokenReadRequest.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/AccessTokenReadRequest.java
new file mode 100644
index 000000000000..2705d03128f5
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/AccessTokenReadRequest.java
@@ -0,0 +1,86 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.edgemarketplace.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * Access token request object.
+ */
+@Fluent
+public final class AccessTokenReadRequest implements JsonSerializable {
+ /*
+ * The name of the publisher.
+ */
+ private String requestId;
+
+ /**
+ * Creates an instance of AccessTokenReadRequest class.
+ */
+ public AccessTokenReadRequest() {
+ }
+
+ /**
+ * Get the requestId property: The name of the publisher.
+ *
+ * @return the requestId value.
+ */
+ public String requestId() {
+ return this.requestId;
+ }
+
+ /**
+ * Set the requestId property: The name of the publisher.
+ *
+ * @param requestId the requestId value to set.
+ * @return the AccessTokenReadRequest object itself.
+ */
+ public AccessTokenReadRequest withRequestId(String requestId) {
+ this.requestId = requestId;
+ return this;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("requestId", this.requestId);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of AccessTokenReadRequest from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of AccessTokenReadRequest 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 AccessTokenReadRequest.
+ */
+ public static AccessTokenReadRequest fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ AccessTokenReadRequest deserializedAccessTokenReadRequest = new AccessTokenReadRequest();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("requestId".equals(fieldName)) {
+ deserializedAccessTokenReadRequest.requestId = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedAccessTokenReadRequest;
+ });
+ }
+}
diff --git a/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/AccessTokenRequest.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/AccessTokenRequest.java
new file mode 100644
index 000000000000..a62e37d2237f
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/AccessTokenRequest.java
@@ -0,0 +1,282 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.resourcemanager.edgemarketplace.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * Access token request object.
+ */
+@Fluent
+public final class AccessTokenRequest implements JsonSerializable