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 EdgeMarketplace service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the EdgeMarketplace 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 Publishers.
+ *
+ * @return Resource collection API of Publishers.
+ */
+ public Publishers publishers() {
+ if (this.publishers == null) {
+ this.publishers = new PublishersImpl(clientObject.getPublishers(), this);
+ }
+ return publishers;
+ }
+
+ /**
+ * 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 wrapped service client EdgeMarketplaceClient providing direct access to the underlying auto-generated API
+ * implementation, based on Azure REST API.
+ *
+ * @return Wrapped service client EdgeMarketplaceClient.
+ */
+ public EdgeMarketplaceClient serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/fluent/EdgeMarketplaceClient.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/fluent/EdgeMarketplaceClient.java
new file mode 100644
index 000000000000..752d8bd84660
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/fluent/EdgeMarketplaceClient.java
@@ -0,0 +1,69 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.edgemarketplace.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/**
+ * The interface for EdgeMarketplaceClient class.
+ */
+public interface EdgeMarketplaceClient {
+ /**
+ * Gets The ID of the target subscription.
+ *
+ * @return the subscriptionId value.
+ */
+ String getSubscriptionId();
+
+ /**
+ * Gets server parameter.
+ *
+ * @return the endpoint value.
+ */
+ String getEndpoint();
+
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ String getApiVersion();
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ HttpPipeline getHttpPipeline();
+
+ /**
+ * Gets The default poll interval for long-running operation.
+ *
+ * @return the defaultPollInterval value.
+ */
+ Duration getDefaultPollInterval();
+
+ /**
+ * Gets the PublishersClient object to access its operations.
+ *
+ * @return the PublishersClient object.
+ */
+ PublishersClient getPublishers();
+
+ /**
+ * 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();
+}
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..83f5bf3ef79f
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/fluent/OffersClient.java
@@ -0,0 +1,199 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest 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 {
+ /**
+ * 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);
+
+ /**
+ * List Offer resources by subscription.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Offer list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listBySubscription();
+
+ /**
+ * List Offer resources by subscription.
+ *
+ * @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 listBySubscription(Integer top, Integer skip, Integer maxPageSize, String filter,
+ String skipToken, Context context);
+
+ /**
+ * 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);
+
+ /**
+ * 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 the disk access token.
+ */
+ @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 the disk access token.
+ */
+ @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 disk access token.
+ */
+ @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 disk access token.
+ */
+ @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);
+}
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..01d35dd7d1c8
--- /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) AutoRest 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..4856f0d2b09b
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/fluent/PublishersClient.java
@@ -0,0 +1,103 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest 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 {
+ /**
+ * 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 in subscription.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Publisher list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listBySubscription();
+
+ /**
+ * List Publisher resources in subscription.
+ *
+ * @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 listBySubscription(Integer top, Integer skip, Integer maxPageSize, String filter,
+ String skipToken, Context context);
+
+ /**
+ * 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);
+}
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..bb1aec350751
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/fluent/models/DiskAccessTokenInner.java
@@ -0,0 +1,158 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.edgemarketplace.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * The disk access token.
+ */
+@Fluent
+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.
+ */
+ public DiskAccessTokenInner() {
+ }
+
+ /**
+ * Get the diskId property: The disk id.
+ *
+ * @return the diskId value.
+ */
+ public String diskId() {
+ return this.diskId;
+ }
+
+ /**
+ * Set the diskId property: The disk id.
+ *
+ * @param diskId the diskId value to set.
+ * @return the DiskAccessTokenInner object itself.
+ */
+ public DiskAccessTokenInner withDiskId(String diskId) {
+ this.diskId = diskId;
+ return this;
+ }
+
+ /**
+ * Get the status property: The access token creation status.
+ *
+ * @return the status value.
+ */
+ public String status() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: The access token creation status.
+ *
+ * @param status the status value to set.
+ * @return the DiskAccessTokenInner object itself.
+ */
+ public DiskAccessTokenInner withStatus(String status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the accessToken property: The access token.
+ *
+ * @return the accessToken value.
+ */
+ public String accessToken() {
+ return this.accessToken;
+ }
+
+ /**
+ * Set the accessToken property: The access token.
+ *
+ * @param accessToken the accessToken value to set.
+ * @return the DiskAccessTokenInner object itself.
+ */
+ public DiskAccessTokenInner withAccessToken(String accessToken) {
+ this.accessToken = accessToken;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (accessToken() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property accessToken in model DiskAccessTokenInner"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(DiskAccessTokenInner.class);
+
+ /**
+ * {@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..3d215c805e84
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/fluent/models/OfferInner.java
@@ -0,0 +1,166 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.edgemarketplace.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.edgemarketplace.models.OfferProperties;
+import java.io.IOException;
+
+/**
+ * An offer.
+ */
+@Fluent
+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.
+ */
+ public OfferInner() {
+ }
+
+ /**
+ * Get the properties property: The resource-specific properties for this resource.
+ *
+ * @return the properties value.
+ */
+ public OfferProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The resource-specific properties for this resource.
+ *
+ * @param properties the properties value to set.
+ * @return the OfferInner object itself.
+ */
+ public OfferInner withProperties(OfferProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+
+ /**
+ * {@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..75aac1524af3
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/fluent/models/OperationInner.java
@@ -0,0 +1,172 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.edgemarketplace.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.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.
+ */
+@Fluent
+public final class OperationInner implements JsonSerializable {
+ /*
+ * The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
+ * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action"
+ */
+ private String name;
+
+ /*
+ * Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for
+ * ARM/control-plane operations.
+ */
+ private Boolean isDataAction;
+
+ /*
+ * Localized display information for this particular operation.
+ */
+ private OperationDisplay display;
+
+ /*
+ * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default
+ * value is "user,system"
+ */
+ private Origin origin;
+
+ /*
+ * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
+ */
+ private ActionType actionType;
+
+ /**
+ * Creates an instance of OperationInner class.
+ */
+ public OperationInner() {
+ }
+
+ /**
+ * Get the name property: The name of the operation, as per Resource-Based Access Control (RBAC). Examples:
+ * "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action".
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane
+ * operations and "false" for ARM/control-plane operations.
+ *
+ * @return the isDataAction value.
+ */
+ public Boolean isDataAction() {
+ return this.isDataAction;
+ }
+
+ /**
+ * Get the display property: Localized display information for this particular operation.
+ *
+ * @return the display value.
+ */
+ public OperationDisplay display() {
+ return this.display;
+ }
+
+ /**
+ * Set the display property: Localized display information for this particular operation.
+ *
+ * @param display the display value to set.
+ * @return the OperationInner object itself.
+ */
+ public OperationInner withDisplay(OperationDisplay display) {
+ this.display = display;
+ return this;
+ }
+
+ /**
+ * Get the origin property: The intended executor of the operation; as in Resource Based Access Control (RBAC) and
+ * audit logs UX. Default value is "user,system".
+ *
+ * @return the origin value.
+ */
+ public Origin origin() {
+ return this.origin;
+ }
+
+ /**
+ * Get the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal
+ * only APIs.
+ *
+ * @return the actionType value.
+ */
+ public ActionType actionType() {
+ return this.actionType;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (display() != null) {
+ display().validate();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("display", this.display);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OperationInner from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OperationInner if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the OperationInner.
+ */
+ public static OperationInner fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OperationInner deserializedOperationInner = new OperationInner();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("name".equals(fieldName)) {
+ deserializedOperationInner.name = reader.getString();
+ } else if ("isDataAction".equals(fieldName)) {
+ deserializedOperationInner.isDataAction = reader.getNullable(JsonReader::getBoolean);
+ } else if ("display".equals(fieldName)) {
+ deserializedOperationInner.display = OperationDisplay.fromJson(reader);
+ } else if ("origin".equals(fieldName)) {
+ deserializedOperationInner.origin = Origin.fromString(reader.getString());
+ } else if ("actionType".equals(fieldName)) {
+ deserializedOperationInner.actionType = ActionType.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOperationInner;
+ });
+ }
+}
diff --git a/sdk/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..501627e9e6a9
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/fluent/models/PublisherInner.java
@@ -0,0 +1,166 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.edgemarketplace.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.edgemarketplace.models.PublisherProperties;
+import java.io.IOException;
+
+/**
+ * A publisher who provides offers.
+ */
+@Fluent
+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.
+ */
+ public PublisherInner() {
+ }
+
+ /**
+ * Get the properties property: The resource-specific properties for this resource.
+ *
+ * @return the properties value.
+ */
+ public PublisherProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The resource-specific properties for this resource.
+ *
+ * @param properties the properties value to set.
+ * @return the PublisherInner object itself.
+ */
+ public PublisherInner withProperties(PublisherProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ @Override
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Get the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ @Override
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ @Override
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ }
+
+ /**
+ * {@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..adf1a2420331
--- /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) AutoRest Code Generator.
+
+/**
+ * Package containing the inner data models for EdgeMarketplaceClient.
+ * 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..e438a9217409
--- /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) AutoRest Code Generator.
+
+/**
+ * Package containing the service clients for EdgeMarketplaceClient.
+ * 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..041bb4084c8d
--- /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) AutoRest 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/EdgeMarketplaceClientBuilder.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/EdgeMarketplaceClientBuilder.java
new file mode 100644
index 000000000000..a006a6f30334
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/EdgeMarketplaceClientBuilder.java
@@ -0,0 +1,138 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.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 EdgeMarketplaceClientImpl type.
+ */
+@ServiceClientBuilder(serviceClients = { EdgeMarketplaceClientImpl.class })
+public final class EdgeMarketplaceClientBuilder {
+ /*
+ * The ID of the target subscription.
+ */
+ private String subscriptionId;
+
+ /**
+ * Sets The ID of the target subscription.
+ *
+ * @param subscriptionId the subscriptionId value.
+ * @return the EdgeMarketplaceClientBuilder.
+ */
+ public EdgeMarketplaceClientBuilder subscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /*
+ * server parameter
+ */
+ private String endpoint;
+
+ /**
+ * Sets server parameter.
+ *
+ * @param endpoint the endpoint value.
+ * @return the EdgeMarketplaceClientBuilder.
+ */
+ public EdgeMarketplaceClientBuilder endpoint(String endpoint) {
+ this.endpoint = endpoint;
+ return this;
+ }
+
+ /*
+ * The environment to connect to
+ */
+ private AzureEnvironment environment;
+
+ /**
+ * Sets The environment to connect to.
+ *
+ * @param environment the environment value.
+ * @return the EdgeMarketplaceClientBuilder.
+ */
+ public EdgeMarketplaceClientBuilder 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 EdgeMarketplaceClientBuilder.
+ */
+ public EdgeMarketplaceClientBuilder 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 EdgeMarketplaceClientBuilder.
+ */
+ public EdgeMarketplaceClientBuilder 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 EdgeMarketplaceClientBuilder.
+ */
+ public EdgeMarketplaceClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
+ this.serializerAdapter = serializerAdapter;
+ return this;
+ }
+
+ /**
+ * Builds an instance of EdgeMarketplaceClientImpl with the provided parameters.
+ *
+ * @return an instance of EdgeMarketplaceClientImpl.
+ */
+ public EdgeMarketplaceClientImpl 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();
+ EdgeMarketplaceClientImpl client = new EdgeMarketplaceClientImpl(localPipeline, localSerializerAdapter,
+ localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint);
+ return client;
+ }
+}
diff --git a/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/EdgeMarketplaceClientImpl.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/EdgeMarketplaceClientImpl.java
new file mode 100644
index 000000000000..8112ac695120
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/EdgeMarketplaceClientImpl.java
@@ -0,0 +1,320 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.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.util.Context;
+import com.azure.core.util.CoreUtils;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.util.polling.AsyncPollResponse;
+import com.azure.core.util.polling.LongRunningOperationStatus;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.serializer.SerializerAdapter;
+import com.azure.core.util.serializer.SerializerEncoding;
+import com.azure.resourcemanager.edgemarketplace.fluent.EdgeMarketplaceClient;
+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 EdgeMarketplaceClientImpl type.
+ */
+@ServiceClient(builder = EdgeMarketplaceClientBuilder.class)
+public final class EdgeMarketplaceClientImpl implements EdgeMarketplaceClient {
+ /**
+ * The ID of the target subscription.
+ */
+ private final String subscriptionId;
+
+ /**
+ * Gets The ID of the target subscription.
+ *
+ * @return the subscriptionId value.
+ */
+ public String getSubscriptionId() {
+ return this.subscriptionId;
+ }
+
+ /**
+ * server parameter.
+ */
+ private final String endpoint;
+
+ /**
+ * Gets server parameter.
+ *
+ * @return the endpoint value.
+ */
+ public String getEndpoint() {
+ return this.endpoint;
+ }
+
+ /**
+ * Api Version.
+ */
+ private final String apiVersion;
+
+ /**
+ * Gets Api Version.
+ *
+ * @return the apiVersion value.
+ */
+ public String getApiVersion() {
+ return this.apiVersion;
+ }
+
+ /**
+ * The HTTP pipeline to send requests through.
+ */
+ private final HttpPipeline httpPipeline;
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ public HttpPipeline getHttpPipeline() {
+ return this.httpPipeline;
+ }
+
+ /**
+ * The serializer to serialize an object into a string.
+ */
+ private final SerializerAdapter serializerAdapter;
+
+ /**
+ * Gets The serializer to serialize an object into a string.
+ *
+ * @return the serializerAdapter value.
+ */
+ SerializerAdapter getSerializerAdapter() {
+ return this.serializerAdapter;
+ }
+
+ /**
+ * The default poll interval for long-running operation.
+ */
+ private final Duration defaultPollInterval;
+
+ /**
+ * Gets The default poll interval for long-running operation.
+ *
+ * @return the defaultPollInterval value.
+ */
+ public Duration getDefaultPollInterval() {
+ return this.defaultPollInterval;
+ }
+
+ /**
+ * The 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;
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * Initializes an instance of EdgeMarketplaceClient client.
+ *
+ * @param httpPipeline The HTTP pipeline to send requests through.
+ * @param serializerAdapter The serializer to serialize an object into a string.
+ * @param defaultPollInterval The default poll interval for long-running operation.
+ * @param environment The Azure environment.
+ * @param subscriptionId The ID of the target subscription.
+ * @param endpoint server parameter.
+ */
+ EdgeMarketplaceClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter,
+ Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) {
+ this.httpPipeline = httpPipeline;
+ this.serializerAdapter = serializerAdapter;
+ this.defaultPollInterval = defaultPollInterval;
+ this.subscriptionId = subscriptionId;
+ this.endpoint = endpoint;
+ this.apiVersion = "2023-08-01";
+ this.publishers = new PublishersClientImpl(this);
+ this.operations = new OperationsClientImpl(this);
+ this.offers = new OffersClientImpl(this);
+ }
+
+ /**
+ * Gets default client context.
+ *
+ * @return the default client context.
+ */
+ public Context getContext() {
+ return Context.NONE;
+ }
+
+ /**
+ * Merges default client context with provided context.
+ *
+ * @param context the context to be merged with default client context.
+ * @return the merged context.
+ */
+ public Context mergeContext(Context context) {
+ return CoreUtils.mergeContexts(this.getContext(), context);
+ }
+
+ /**
+ * Gets long running operation result.
+ *
+ * @param activationResponse the response of activation operation.
+ * @param httpPipeline the http pipeline.
+ * @param pollResultType type of poll result.
+ * @param finalResultType type of final result.
+ * @param context the context shared by all requests.
+ * @param type of poll result.
+ * @param type of final result.
+ * @return poller flux for poll result and final result.
+ */
+ public PollerFlux, U> getLroResult(Mono>> activationResponse,
+ HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) {
+ return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType,
+ defaultPollInterval, activationResponse, context);
+ }
+
+ /**
+ * Gets the final result, or an error, based on last async poll response.
+ *
+ * @param response the last async poll response.
+ * @param type of poll result.
+ * @param type of final result.
+ * @return the final result, or an error.
+ */
+ public Mono getLroFinalResultOrError(AsyncPollResponse, U> response) {
+ if (response.getStatus() != LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) {
+ String errorMessage;
+ ManagementError managementError = null;
+ HttpResponse errorResponse = null;
+ PollResult.Error lroError = response.getValue().getError();
+ if (lroError != null) {
+ errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(),
+ lroError.getResponseBody());
+
+ errorMessage = response.getValue().getError().getMessage();
+ String errorBody = response.getValue().getError().getResponseBody();
+ if (errorBody != null) {
+ // try to deserialize error body to ManagementError
+ try {
+ managementError = this.getSerializerAdapter()
+ .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON);
+ if (managementError.getCode() == null || managementError.getMessage() == null) {
+ managementError = null;
+ }
+ } catch (IOException | RuntimeException ioe) {
+ LOGGER.logThrowableAsWarning(ioe);
+ }
+ }
+ } else {
+ // fallback to default error message
+ errorMessage = "Long running operation failed.";
+ }
+ if (managementError == null) {
+ // fallback to default ManagementError
+ managementError = new ManagementError(response.getStatus().toString(), errorMessage);
+ }
+ return Mono.error(new ManagementException(errorMessage, errorResponse, managementError));
+ } else {
+ return response.getFinalResult();
+ }
+ }
+
+ private static final class HttpResponseImpl extends HttpResponse {
+ private final int statusCode;
+
+ private final byte[] responseBody;
+
+ private final HttpHeaders httpHeaders;
+
+ HttpResponseImpl(int statusCode, HttpHeaders httpHeaders, String responseBody) {
+ super(null);
+ this.statusCode = statusCode;
+ this.httpHeaders = httpHeaders;
+ this.responseBody = responseBody == null ? null : responseBody.getBytes(StandardCharsets.UTF_8);
+ }
+
+ public int getStatusCode() {
+ return statusCode;
+ }
+
+ public String getHeaderValue(String s) {
+ return httpHeaders.getValue(HttpHeaderName.fromString(s));
+ }
+
+ public HttpHeaders getHeaders() {
+ return httpHeaders;
+ }
+
+ public Flux getBody() {
+ return Flux.just(ByteBuffer.wrap(responseBody));
+ }
+
+ public Mono getBodyAsByteArray() {
+ return Mono.just(responseBody);
+ }
+
+ public Mono getBodyAsString() {
+ return Mono.just(new String(responseBody, StandardCharsets.UTF_8));
+ }
+
+ public Mono getBodyAsString(Charset charset) {
+ return Mono.just(new String(responseBody, charset));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(EdgeMarketplaceClientImpl.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..c9017cb150fb
--- /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) AutoRest 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..348121d50068
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/OffersClientImpl.java
@@ -0,0 +1,1033 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest 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.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.models.AccessTokenReadRequest;
+import com.azure.resourcemanager.edgemarketplace.models.AccessTokenRequest;
+import com.azure.resourcemanager.edgemarketplace.models.OfferListResult;
+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 EdgeMarketplaceClientImpl client;
+
+ /**
+ * Initializes an instance of OffersClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ OffersClientImpl(EdgeMarketplaceClientImpl client) {
+ this.service = RestProxy.create(OffersService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for EdgeMarketplaceClientOffers to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "EdgeMarketplaceClien")
+ public interface OffersService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/{resourceUri}/providers/Microsoft.EdgeMarketplace/offers")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("$host") 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/offers")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listBySubscription(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @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/{offerId}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(@HostParam("$host") 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" })
+ @Post("/{resourceUri}/providers/Microsoft.EdgeMarketplace/offers/{offerId}/generateAccessToken")
+ @ExpectedResponses({ 200, 202 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> generateAccessToken(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam(value = "resourceUri", encoded = true) String resourceUri, @PathParam("offerId") String offerId,
+ @BodyParam("application/json") AccessTokenRequest body, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Post("/{resourceUri}/providers/Microsoft.EdgeMarketplace/offers/{offerId}/getAccessToken")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getAccessToken(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam(value = "resourceUri", encoded = true) String resourceUri, @PathParam("offerId") String offerId,
+ @BodyParam("application/json") AccessTokenReadRequest body, @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listBySubscriptionNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * 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) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceUri == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null."));
+ }
+ 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.
+ * @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} 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, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceUri == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(this.client.getEndpoint(), this.client.getApiVersion(), 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));
+ }
+
+ /**
+ * 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.
+ * @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 PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceUri, Integer top, Integer skip, Integer maxPageSize,
+ String filter, String skipToken, Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceUri, top, skip, maxPageSize, filter, skipToken, context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * 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<>(listAsync(resourceUri, top, skip, maxPageSize, filter, skipToken));
+ }
+
+ /**
+ * 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<>(listAsync(resourceUri, top, skip, maxPageSize, filter, skipToken, context));
+ }
+
+ /**
+ * List Offer resources by subscription.
+ *
+ * @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> listBySubscriptionSinglePageAsync(Integer top, Integer skip,
+ Integer maxPageSize, String filter, String skipToken) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listBySubscription(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), 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 subscription.
+ *
+ * @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} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionSinglePageAsync(Integer top, Integer skip,
+ Integer maxPageSize, String filter, String skipToken, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listBySubscription(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ top, skip, maxPageSize, filter, skipToken, accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * List Offer resources by subscription.
+ *
+ * @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 listBySubscriptionAsync(Integer top, Integer skip, Integer maxPageSize, String filter,
+ String skipToken) {
+ return new PagedFlux<>(() -> listBySubscriptionSinglePageAsync(top, skip, maxPageSize, filter, skipToken),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List Offer resources by subscription.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Offer list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listBySubscriptionAsync() {
+ final Integer top = null;
+ final Integer skip = null;
+ final Integer maxPageSize = null;
+ final String filter = null;
+ final String skipToken = null;
+ return new PagedFlux<>(() -> listBySubscriptionSinglePageAsync(top, skip, maxPageSize, filter, skipToken),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List Offer resources by subscription.
+ *
+ * @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 PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listBySubscriptionAsync(Integer top, Integer skip, Integer maxPageSize, String filter,
+ String skipToken, Context context) {
+ return new PagedFlux<>(
+ () -> listBySubscriptionSinglePageAsync(top, skip, maxPageSize, filter, skipToken, context),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List Offer resources by subscription.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Offer list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listBySubscription() {
+ final Integer top = null;
+ final Integer skip = null;
+ final Integer maxPageSize = null;
+ final String filter = null;
+ final String skipToken = null;
+ return new PagedIterable<>(listBySubscriptionAsync(top, skip, maxPageSize, filter, skipToken));
+ }
+
+ /**
+ * List Offer resources by subscription.
+ *
+ * @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 listBySubscription(Integer top, Integer skip, Integer maxPageSize, String filter,
+ String skipToken, Context context) {
+ return new PagedIterable<>(listBySubscriptionAsync(top, skip, maxPageSize, filter, skipToken, 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) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceUri == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null."));
+ }
+ if (offerId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter offerId is required and cannot be null."));
+ }
+ 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.
+ * @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} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceUri, String offerId, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceUri == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null."));
+ }
+ if (offerId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter offerId is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.get(this.client.getEndpoint(), this.client.getApiVersion(), 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 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) {
+ return getWithResponseAsync(resourceUri, offerId, context).block();
+ }
+
+ /**
+ * 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();
+ }
+
+ /**
+ * 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 disk access token along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> generateAccessTokenWithResponseAsync(String resourceUri, String offerId,
+ AccessTokenRequest body) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceUri == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null."));
+ }
+ if (offerId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter offerId is required and cannot be null."));
+ }
+ if (body == null) {
+ return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null."));
+ } else {
+ body.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.generateAccessToken(this.client.getEndpoint(), this.client.getApiVersion(),
+ resourceUri, offerId, body, accept, 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.
+ * @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 disk access token along with {@link Response} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> generateAccessTokenWithResponseAsync(String resourceUri, String offerId,
+ AccessTokenRequest body, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceUri == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null."));
+ }
+ if (offerId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter offerId is required and cannot be null."));
+ }
+ if (body == null) {
+ return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null."));
+ } else {
+ body.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.generateAccessToken(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, offerId,
+ body, accept, 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 the disk access token.
+ */
+ @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.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link PollerFlux} for polling of the disk access token.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, DiskAccessTokenInner>
+ beginGenerateAccessTokenAsync(String resourceUri, String offerId, AccessTokenRequest body, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono
+ = generateAccessTokenWithResponseAsync(resourceUri, offerId, body, context);
+ return this.client.getLroResult(mono, this.client.getHttpPipeline(),
+ 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 {@link SyncPoller} for polling of the disk access token.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, DiskAccessTokenInner>
+ beginGenerateAccessToken(String resourceUri, String offerId, AccessTokenRequest body) {
+ return this.beginGenerateAccessTokenAsync(resourceUri, offerId, body).getSyncPoller();
+ }
+
+ /**
+ * 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 the disk access token.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, DiskAccessTokenInner>
+ beginGenerateAccessToken(String resourceUri, String offerId, AccessTokenRequest body, Context context) {
+ return this.beginGenerateAccessTokenAsync(resourceUri, offerId, body, context).getSyncPoller();
+ }
+
+ /**
+ * 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 disk access token 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.
+ * @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 disk access token on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono generateAccessTokenAsync(String resourceUri, String offerId,
+ AccessTokenRequest body, Context context) {
+ return beginGenerateAccessTokenAsync(resourceUri, offerId, body, context).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 disk access token.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DiskAccessTokenInner generateAccessToken(String resourceUri, String offerId, AccessTokenRequest body) {
+ return generateAccessTokenAsync(resourceUri, offerId, body).block();
+ }
+
+ /**
+ * 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 disk access token.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DiskAccessTokenInner generateAccessToken(String resourceUri, String offerId, AccessTokenRequest body,
+ Context context) {
+ return generateAccessTokenAsync(resourceUri, offerId, body, context).block();
+ }
+
+ /**
+ * 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) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceUri == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null."));
+ }
+ if (offerId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter offerId is required and cannot be null."));
+ }
+ if (body == null) {
+ return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null."));
+ } else {
+ body.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.getAccessToken(this.client.getEndpoint(), this.client.getApiVersion(),
+ resourceUri, offerId, body, accept, 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.
+ * @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} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getAccessTokenWithResponseAsync(String resourceUri, String offerId,
+ AccessTokenReadRequest body, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceUri == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null."));
+ }
+ if (offerId == null) {
+ return Mono.error(new IllegalArgumentException("Parameter offerId is required and cannot be null."));
+ }
+ if (body == null) {
+ return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null."));
+ } else {
+ body.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.getAccessToken(this.client.getEndpoint(), this.client.getApiVersion(), resourceUri, offerId,
+ body, accept, 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 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) {
+ return getAccessTokenWithResponseAsync(resourceUri, offerId, body, context).block();
+ }
+
+ /**
+ * 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();
+ }
+
+ /**
+ * 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) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return 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, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * 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) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Offer list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+}
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..000e9aecf559
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/OffersImpl.java
@@ -0,0 +1,124 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest 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 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 PagedIterable listBySubscription() {
+ PagedIterable inner = this.serviceClient().listBySubscription();
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new OfferImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listBySubscription(Integer top, Integer skip, Integer maxPageSize, String filter,
+ String skipToken, Context context) {
+ PagedIterable inner
+ = this.serviceClient().listBySubscription(top, skip, maxPageSize, filter, skipToken, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new OfferImpl(inner1, this.manager()));
+ }
+
+ 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 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;
+ }
+ }
+
+ 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..351e90e10ffc
--- /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) AutoRest 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..f5461bbb52ce
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/OperationsClientImpl.java
@@ -0,0 +1,235 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.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.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 EdgeMarketplaceClientImpl client;
+
+ /**
+ * Initializes an instance of OperationsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ OperationsClientImpl(EdgeMarketplaceClientImpl client) {
+ this.service
+ = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for EdgeMarketplaceClientOperations to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "EdgeMarketplaceClien")
+ public interface OperationsService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/providers/Microsoft.EdgeMarketplace/operations")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * List the operations for the provider.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync() {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * List the operations for the provider.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * List the operations for the provider.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List the operations for the provider.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(() -> listSinglePageAsync(context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List the operations for the provider.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * List the operations for the provider.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider as paginated response with
+ * {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of REST API operations supported by an Azure Resource Provider along with {@link PagedResponse} on
+ * successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+}
diff --git a/sdk/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..fd154ee66554
--- /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) AutoRest 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..28be0f6b34b5
--- /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) AutoRest 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..a35254ad970a
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/PublishersClientImpl.java
@@ -0,0 +1,663 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest 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.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 EdgeMarketplaceClientImpl client;
+
+ /**
+ * Initializes an instance of PublishersClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ PublishersClientImpl(EdgeMarketplaceClientImpl client) {
+ this.service
+ = RestProxy.create(PublishersService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for EdgeMarketplaceClientPublishers to be used by the proxy service to
+ * perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "EdgeMarketplaceClien")
+ public interface PublishersService {
+ @Headers({ "Content-Type: application/json" })
+ @Get("/{resourceUri}/providers/Microsoft.EdgeMarketplace/publishers")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(@HostParam("$host") 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("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId,
+ @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/{publisherName}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(@HostParam("$host") 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("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context);
+
+ @Headers({ "Content-Type: application/json" })
+ @Get("{nextLink}")
+ @ExpectedResponses({ 200 })
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listBySubscriptionNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept, Context context);
+ }
+
+ /**
+ * 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) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceUri == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null."));
+ }
+ 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.
+ * @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} 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, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceUri == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(this.client.getEndpoint(), this.client.getApiVersion(), 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));
+ }
+
+ /**
+ * 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.
+ * @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 PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(String resourceUri, Integer top, Integer skip, Integer maxPageSize,
+ String filter, String skipToken, Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(resourceUri, top, skip, maxPageSize, filter, skipToken, context),
+ nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * 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<>(listAsync(resourceUri, top, skip, maxPageSize, filter, skipToken));
+ }
+
+ /**
+ * 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<>(listAsync(resourceUri, top, skip, maxPageSize, filter, skipToken, context));
+ }
+
+ /**
+ * List Publisher resources in subscription.
+ *
+ * @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> listBySubscriptionSinglePageAsync(Integer top, Integer skip,
+ Integer maxPageSize, String filter, String skipToken) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listBySubscription(this.client.getEndpoint(), this.client.getApiVersion(),
+ this.client.getSubscriptionId(), 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 in subscription.
+ *
+ * @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} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionSinglePageAsync(Integer top, Integer skip,
+ Integer maxPageSize, String filter, String skipToken, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono.error(new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listBySubscription(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(),
+ top, skip, maxPageSize, filter, skipToken, accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * List Publisher resources in subscription.
+ *
+ * @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 listBySubscriptionAsync(Integer top, Integer skip, Integer maxPageSize,
+ String filter, String skipToken) {
+ return new PagedFlux<>(() -> listBySubscriptionSinglePageAsync(top, skip, maxPageSize, filter, skipToken),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List Publisher resources in subscription.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Publisher list operation as paginated response with {@link PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listBySubscriptionAsync() {
+ final Integer top = null;
+ final Integer skip = null;
+ final Integer maxPageSize = null;
+ final String filter = null;
+ final String skipToken = null;
+ return new PagedFlux<>(() -> listBySubscriptionSinglePageAsync(top, skip, maxPageSize, filter, skipToken),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * List Publisher resources in subscription.
+ *
+ * @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 PagedFlux}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listBySubscriptionAsync(Integer top, Integer skip, Integer maxPageSize,
+ String filter, String skipToken, Context context) {
+ return new PagedFlux<>(
+ () -> listBySubscriptionSinglePageAsync(top, skip, maxPageSize, filter, skipToken, context),
+ nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * List Publisher resources in subscription.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Publisher list operation as paginated response with {@link PagedIterable}.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listBySubscription() {
+ final Integer top = null;
+ final Integer skip = null;
+ final Integer maxPageSize = null;
+ final String filter = null;
+ final String skipToken = null;
+ return new PagedIterable<>(listBySubscriptionAsync(top, skip, maxPageSize, filter, skipToken));
+ }
+
+ /**
+ * List Publisher resources in subscription.
+ *
+ * @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 listBySubscription(Integer top, Integer skip, Integer maxPageSize,
+ String filter, String skipToken, Context context) {
+ return new PagedIterable<>(listBySubscriptionAsync(top, skip, maxPageSize, filter, skipToken, 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) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceUri == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null."));
+ }
+ if (publisherName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter publisherName is required and cannot be null."));
+ }
+ 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.
+ * @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} on successful completion of {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(String resourceUri, String publisherName,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceUri == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceUri is required and cannot be null."));
+ }
+ if (publisherName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter publisherName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.get(this.client.getEndpoint(), this.client.getApiVersion(), 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 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) {
+ return getWithResponseAsync(resourceUri, publisherName, context).block();
+ }
+
+ /**
+ * 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();
+ }
+
+ /**
+ * 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) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return 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, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+
+ /**
+ * 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) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(),
+ res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The URL to get the next list of items.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Publisher list operation along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionNextSinglePageAsync(String nextLink,
+ Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono.error(
+ new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
+ res.getValue().value(), res.getValue().nextLink(), null));
+ }
+}
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..4c8e4fb8bb2d
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/implementation/PublishersImpl.java
@@ -0,0 +1,80 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest 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 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(Integer top, Integer skip, Integer maxPageSize, String filter,
+ String skipToken, Context context) {
+ PagedIterable inner
+ = this.serviceClient().listBySubscription(top, skip, maxPageSize, filter, skipToken, context);
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new PublisherImpl(inner1, this.manager()));
+ }
+
+ 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;
+ }
+ }
+
+ 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..9a0c218ade5c
--- /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) AutoRest 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/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..308d6e07fa05
--- /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) AutoRest Code Generator.
+
+/**
+ * Package containing the implementations for EdgeMarketplaceClient.
+ * 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..0fb0f08da046
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/AccessTokenReadRequest.java
@@ -0,0 +1,102 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.edgemarketplace.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import 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;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (requestId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property requestId in model AccessTokenReadRequest"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(AccessTokenReadRequest.class);
+
+ /**
+ * {@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..2b4d971d40d1
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/AccessTokenRequest.java
@@ -0,0 +1,298 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.edgemarketplace.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * Access token request object.
+ */
+@Fluent
+public final class AccessTokenRequest implements JsonSerializable {
+ /*
+ * The name of the publisher.
+ */
+ private String publisherName;
+
+ /*
+ * The region where the disk will be created.
+ */
+ private String edgeMarketPlaceRegion;
+
+ /*
+ * The region where the disk will be created.
+ */
+ private String egeMarketPlaceResourceId;
+
+ /*
+ * The hyperv version.
+ */
+ private String hypervGeneration;
+
+ /*
+ * The marketplace sku.
+ */
+ private String marketPlaceSku;
+
+ /*
+ * The marketplace sku version.
+ */
+ private String marketPlaceSkuVersion;
+
+ /*
+ * The device sku.
+ */
+ private String deviceSku;
+
+ /*
+ * The device sku version.
+ */
+ private String deviceVersion;
+
+ /**
+ * Creates an instance of AccessTokenRequest class.
+ */
+ public AccessTokenRequest() {
+ }
+
+ /**
+ * Get the publisherName property: The name of the publisher.
+ *
+ * @return the publisherName value.
+ */
+ public String publisherName() {
+ return this.publisherName;
+ }
+
+ /**
+ * Set the publisherName property: The name of the publisher.
+ *
+ * @param publisherName the publisherName value to set.
+ * @return the AccessTokenRequest object itself.
+ */
+ public AccessTokenRequest withPublisherName(String publisherName) {
+ this.publisherName = publisherName;
+ return this;
+ }
+
+ /**
+ * Get the edgeMarketPlaceRegion property: The region where the disk will be created.
+ *
+ * @return the edgeMarketPlaceRegion value.
+ */
+ public String edgeMarketPlaceRegion() {
+ return this.edgeMarketPlaceRegion;
+ }
+
+ /**
+ * Set the edgeMarketPlaceRegion property: The region where the disk will be created.
+ *
+ * @param edgeMarketPlaceRegion the edgeMarketPlaceRegion value to set.
+ * @return the AccessTokenRequest object itself.
+ */
+ public AccessTokenRequest withEdgeMarketPlaceRegion(String edgeMarketPlaceRegion) {
+ this.edgeMarketPlaceRegion = edgeMarketPlaceRegion;
+ return this;
+ }
+
+ /**
+ * Get the egeMarketPlaceResourceId property: The region where the disk will be created.
+ *
+ * @return the egeMarketPlaceResourceId value.
+ */
+ public String egeMarketPlaceResourceId() {
+ return this.egeMarketPlaceResourceId;
+ }
+
+ /**
+ * Set the egeMarketPlaceResourceId property: The region where the disk will be created.
+ *
+ * @param egeMarketPlaceResourceId the egeMarketPlaceResourceId value to set.
+ * @return the AccessTokenRequest object itself.
+ */
+ public AccessTokenRequest withEgeMarketPlaceResourceId(String egeMarketPlaceResourceId) {
+ this.egeMarketPlaceResourceId = egeMarketPlaceResourceId;
+ return this;
+ }
+
+ /**
+ * Get the hypervGeneration property: The hyperv version.
+ *
+ * @return the hypervGeneration value.
+ */
+ public String hypervGeneration() {
+ return this.hypervGeneration;
+ }
+
+ /**
+ * Set the hypervGeneration property: The hyperv version.
+ *
+ * @param hypervGeneration the hypervGeneration value to set.
+ * @return the AccessTokenRequest object itself.
+ */
+ public AccessTokenRequest withHypervGeneration(String hypervGeneration) {
+ this.hypervGeneration = hypervGeneration;
+ return this;
+ }
+
+ /**
+ * Get the marketPlaceSku property: The marketplace sku.
+ *
+ * @return the marketPlaceSku value.
+ */
+ public String marketPlaceSku() {
+ return this.marketPlaceSku;
+ }
+
+ /**
+ * Set the marketPlaceSku property: The marketplace sku.
+ *
+ * @param marketPlaceSku the marketPlaceSku value to set.
+ * @return the AccessTokenRequest object itself.
+ */
+ public AccessTokenRequest withMarketPlaceSku(String marketPlaceSku) {
+ this.marketPlaceSku = marketPlaceSku;
+ return this;
+ }
+
+ /**
+ * Get the marketPlaceSkuVersion property: The marketplace sku version.
+ *
+ * @return the marketPlaceSkuVersion value.
+ */
+ public String marketPlaceSkuVersion() {
+ return this.marketPlaceSkuVersion;
+ }
+
+ /**
+ * Set the marketPlaceSkuVersion property: The marketplace sku version.
+ *
+ * @param marketPlaceSkuVersion the marketPlaceSkuVersion value to set.
+ * @return the AccessTokenRequest object itself.
+ */
+ public AccessTokenRequest withMarketPlaceSkuVersion(String marketPlaceSkuVersion) {
+ this.marketPlaceSkuVersion = marketPlaceSkuVersion;
+ return this;
+ }
+
+ /**
+ * Get the deviceSku property: The device sku.
+ *
+ * @return the deviceSku value.
+ */
+ public String deviceSku() {
+ return this.deviceSku;
+ }
+
+ /**
+ * Set the deviceSku property: The device sku.
+ *
+ * @param deviceSku the deviceSku value to set.
+ * @return the AccessTokenRequest object itself.
+ */
+ public AccessTokenRequest withDeviceSku(String deviceSku) {
+ this.deviceSku = deviceSku;
+ return this;
+ }
+
+ /**
+ * Get the deviceVersion property: The device sku version.
+ *
+ * @return the deviceVersion value.
+ */
+ public String deviceVersion() {
+ return this.deviceVersion;
+ }
+
+ /**
+ * Set the deviceVersion property: The device sku version.
+ *
+ * @param deviceVersion the deviceVersion value to set.
+ * @return the AccessTokenRequest object itself.
+ */
+ public AccessTokenRequest withDeviceVersion(String deviceVersion) {
+ this.deviceVersion = deviceVersion;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (edgeMarketPlaceRegion() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property edgeMarketPlaceRegion in model AccessTokenRequest"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(AccessTokenRequest.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("edgeMarketPlaceRegion", this.edgeMarketPlaceRegion);
+ jsonWriter.writeStringField("publisherName", this.publisherName);
+ jsonWriter.writeStringField("egeMarketPlaceResourceId", this.egeMarketPlaceResourceId);
+ jsonWriter.writeStringField("hypervGeneration", this.hypervGeneration);
+ jsonWriter.writeStringField("marketPlaceSku", this.marketPlaceSku);
+ jsonWriter.writeStringField("marketPlaceSkuVersion", this.marketPlaceSkuVersion);
+ jsonWriter.writeStringField("deviceSku", this.deviceSku);
+ jsonWriter.writeStringField("deviceVersion", this.deviceVersion);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of AccessTokenRequest from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of AccessTokenRequest 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 AccessTokenRequest.
+ */
+ public static AccessTokenRequest fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ AccessTokenRequest deserializedAccessTokenRequest = new AccessTokenRequest();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("edgeMarketPlaceRegion".equals(fieldName)) {
+ deserializedAccessTokenRequest.edgeMarketPlaceRegion = reader.getString();
+ } else if ("publisherName".equals(fieldName)) {
+ deserializedAccessTokenRequest.publisherName = reader.getString();
+ } else if ("egeMarketPlaceResourceId".equals(fieldName)) {
+ deserializedAccessTokenRequest.egeMarketPlaceResourceId = reader.getString();
+ } else if ("hypervGeneration".equals(fieldName)) {
+ deserializedAccessTokenRequest.hypervGeneration = reader.getString();
+ } else if ("marketPlaceSku".equals(fieldName)) {
+ deserializedAccessTokenRequest.marketPlaceSku = reader.getString();
+ } else if ("marketPlaceSkuVersion".equals(fieldName)) {
+ deserializedAccessTokenRequest.marketPlaceSkuVersion = reader.getString();
+ } else if ("deviceSku".equals(fieldName)) {
+ deserializedAccessTokenRequest.deviceSku = reader.getString();
+ } else if ("deviceVersion".equals(fieldName)) {
+ deserializedAccessTokenRequest.deviceVersion = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedAccessTokenRequest;
+ });
+ }
+}
diff --git a/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/ActionType.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/ActionType.java
new file mode 100644
index 000000000000..1d8de7295963
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/ActionType.java
@@ -0,0 +1,46 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.edgemarketplace.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import java.util.Collection;
+
+/**
+ * Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs.
+ */
+public final class ActionType extends ExpandableStringEnum {
+ /**
+ * Static value Internal for ActionType.
+ */
+ public static final ActionType INTERNAL = fromString("Internal");
+
+ /**
+ * Creates a new instance of ActionType value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public ActionType() {
+ }
+
+ /**
+ * Creates or finds a ActionType from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding ActionType.
+ */
+ public static ActionType fromString(String name) {
+ return fromString(name, ActionType.class);
+ }
+
+ /**
+ * Gets known ActionType values.
+ *
+ * @return known ActionType values.
+ */
+ public static Collection values() {
+ return values(ActionType.class);
+ }
+}
diff --git a/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/DiskAccessToken.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/DiskAccessToken.java
new file mode 100644
index 000000000000..08a10753a4b4
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/DiskAccessToken.java
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.edgemarketplace.models;
+
+import com.azure.resourcemanager.edgemarketplace.fluent.models.DiskAccessTokenInner;
+
+/**
+ * An immutable client-side representation of DiskAccessToken.
+ */
+public interface DiskAccessToken {
+ /**
+ * Gets the diskId property: The disk id.
+ *
+ * @return the diskId value.
+ */
+ String diskId();
+
+ /**
+ * Gets the status property: The access token creation status.
+ *
+ * @return the status value.
+ */
+ String status();
+
+ /**
+ * Gets the accessToken property: The access token.
+ *
+ * @return the accessToken value.
+ */
+ String accessToken();
+
+ /**
+ * Gets the inner com.azure.resourcemanager.edgemarketplace.fluent.models.DiskAccessTokenInner object.
+ *
+ * @return the inner object.
+ */
+ DiskAccessTokenInner innerModel();
+}
diff --git a/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/IconFileUris.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/IconFileUris.java
new file mode 100644
index 000000000000..2dba6d4b0355
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/IconFileUris.java
@@ -0,0 +1,177 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest 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;
+
+/**
+ * Icon files.
+ */
+@Fluent
+public final class IconFileUris implements JsonSerializable {
+ /*
+ * uri of small icon
+ */
+ private String small;
+
+ /*
+ * uri of medium icon
+ */
+ private String medium;
+
+ /*
+ * uri of wide icon
+ */
+ private String wide;
+
+ /*
+ * uri of large icon
+ */
+ private String large;
+
+ /**
+ * Creates an instance of IconFileUris class.
+ */
+ public IconFileUris() {
+ }
+
+ /**
+ * Get the small property: uri of small icon.
+ *
+ * @return the small value.
+ */
+ public String small() {
+ return this.small;
+ }
+
+ /**
+ * Set the small property: uri of small icon.
+ *
+ * @param small the small value to set.
+ * @return the IconFileUris object itself.
+ */
+ public IconFileUris withSmall(String small) {
+ this.small = small;
+ return this;
+ }
+
+ /**
+ * Get the medium property: uri of medium icon.
+ *
+ * @return the medium value.
+ */
+ public String medium() {
+ return this.medium;
+ }
+
+ /**
+ * Set the medium property: uri of medium icon.
+ *
+ * @param medium the medium value to set.
+ * @return the IconFileUris object itself.
+ */
+ public IconFileUris withMedium(String medium) {
+ this.medium = medium;
+ return this;
+ }
+
+ /**
+ * Get the wide property: uri of wide icon.
+ *
+ * @return the wide value.
+ */
+ public String wide() {
+ return this.wide;
+ }
+
+ /**
+ * Set the wide property: uri of wide icon.
+ *
+ * @param wide the wide value to set.
+ * @return the IconFileUris object itself.
+ */
+ public IconFileUris withWide(String wide) {
+ this.wide = wide;
+ return this;
+ }
+
+ /**
+ * Get the large property: uri of large icon.
+ *
+ * @return the large value.
+ */
+ public String large() {
+ return this.large;
+ }
+
+ /**
+ * Set the large property: uri of large icon.
+ *
+ * @param large the large value to set.
+ * @return the IconFileUris object itself.
+ */
+ public IconFileUris withLarge(String large) {
+ this.large = large;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("small", this.small);
+ jsonWriter.writeStringField("medium", this.medium);
+ jsonWriter.writeStringField("wide", this.wide);
+ jsonWriter.writeStringField("large", this.large);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of IconFileUris from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of IconFileUris 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 IconFileUris.
+ */
+ public static IconFileUris fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ IconFileUris deserializedIconFileUris = new IconFileUris();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("small".equals(fieldName)) {
+ deserializedIconFileUris.small = reader.getString();
+ } else if ("medium".equals(fieldName)) {
+ deserializedIconFileUris.medium = reader.getString();
+ } else if ("wide".equals(fieldName)) {
+ deserializedIconFileUris.wide = reader.getString();
+ } else if ("large".equals(fieldName)) {
+ deserializedIconFileUris.large = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedIconFileUris;
+ });
+ }
+}
diff --git a/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/MarketplaceSku.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/MarketplaceSku.java
new file mode 100644
index 000000000000..d8ee0700b595
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/MarketplaceSku.java
@@ -0,0 +1,396 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.edgemarketplace.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * The marketplace sku.
+ */
+@Fluent
+public final class MarketplaceSku implements JsonSerializable {
+ /*
+ * The catalog plan id
+ */
+ private String catalogPlanId;
+
+ /*
+ * The marketplace sku id
+ */
+ private String marketplaceSkuId;
+
+ /*
+ * The type of marketplace sku
+ */
+ private String type;
+
+ /*
+ * The display name of marketplace sku
+ */
+ private String displayName;
+
+ /*
+ * The summary
+ */
+ private String summary;
+
+ /*
+ * The long summary
+ */
+ private String longSummary;
+
+ /*
+ * The description
+ */
+ private String description;
+
+ /*
+ * The generation
+ */
+ private String generation;
+
+ /*
+ * The display rank of the sku
+ */
+ private Integer displayRank;
+
+ /*
+ * The operating system supported
+ */
+ private SkuOperatingSystem operatingSystem;
+
+ /*
+ * The marketplace sku version
+ */
+ private List marketplaceSkuVersions;
+
+ /**
+ * Creates an instance of MarketplaceSku class.
+ */
+ public MarketplaceSku() {
+ }
+
+ /**
+ * Get the catalogPlanId property: The catalog plan id.
+ *
+ * @return the catalogPlanId value.
+ */
+ public String catalogPlanId() {
+ return this.catalogPlanId;
+ }
+
+ /**
+ * Set the catalogPlanId property: The catalog plan id.
+ *
+ * @param catalogPlanId the catalogPlanId value to set.
+ * @return the MarketplaceSku object itself.
+ */
+ public MarketplaceSku withCatalogPlanId(String catalogPlanId) {
+ this.catalogPlanId = catalogPlanId;
+ return this;
+ }
+
+ /**
+ * Get the marketplaceSkuId property: The marketplace sku id.
+ *
+ * @return the marketplaceSkuId value.
+ */
+ public String marketplaceSkuId() {
+ return this.marketplaceSkuId;
+ }
+
+ /**
+ * Set the marketplaceSkuId property: The marketplace sku id.
+ *
+ * @param marketplaceSkuId the marketplaceSkuId value to set.
+ * @return the MarketplaceSku object itself.
+ */
+ public MarketplaceSku withMarketplaceSkuId(String marketplaceSkuId) {
+ this.marketplaceSkuId = marketplaceSkuId;
+ return this;
+ }
+
+ /**
+ * Get the type property: The type of marketplace sku.
+ *
+ * @return the type value.
+ */
+ public String type() {
+ return this.type;
+ }
+
+ /**
+ * Set the type property: The type of marketplace sku.
+ *
+ * @param type the type value to set.
+ * @return the MarketplaceSku object itself.
+ */
+ public MarketplaceSku withType(String type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Get the displayName property: The display name of marketplace sku.
+ *
+ * @return the displayName value.
+ */
+ public String displayName() {
+ return this.displayName;
+ }
+
+ /**
+ * Set the displayName property: The display name of marketplace sku.
+ *
+ * @param displayName the displayName value to set.
+ * @return the MarketplaceSku object itself.
+ */
+ public MarketplaceSku withDisplayName(String displayName) {
+ this.displayName = displayName;
+ return this;
+ }
+
+ /**
+ * Get the summary property: The summary.
+ *
+ * @return the summary value.
+ */
+ public String summary() {
+ return this.summary;
+ }
+
+ /**
+ * Set the summary property: The summary.
+ *
+ * @param summary the summary value to set.
+ * @return the MarketplaceSku object itself.
+ */
+ public MarketplaceSku withSummary(String summary) {
+ this.summary = summary;
+ return this;
+ }
+
+ /**
+ * Get the longSummary property: The long summary.
+ *
+ * @return the longSummary value.
+ */
+ public String longSummary() {
+ return this.longSummary;
+ }
+
+ /**
+ * Set the longSummary property: The long summary.
+ *
+ * @param longSummary the longSummary value to set.
+ * @return the MarketplaceSku object itself.
+ */
+ public MarketplaceSku withLongSummary(String longSummary) {
+ this.longSummary = longSummary;
+ return this;
+ }
+
+ /**
+ * Get the description property: The description.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: The description.
+ *
+ * @param description the description value to set.
+ * @return the MarketplaceSku object itself.
+ */
+ public MarketplaceSku withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the generation property: The generation.
+ *
+ * @return the generation value.
+ */
+ public String generation() {
+ return this.generation;
+ }
+
+ /**
+ * Set the generation property: The generation.
+ *
+ * @param generation the generation value to set.
+ * @return the MarketplaceSku object itself.
+ */
+ public MarketplaceSku withGeneration(String generation) {
+ this.generation = generation;
+ return this;
+ }
+
+ /**
+ * Get the displayRank property: The display rank of the sku.
+ *
+ * @return the displayRank value.
+ */
+ public Integer displayRank() {
+ return this.displayRank;
+ }
+
+ /**
+ * Set the displayRank property: The display rank of the sku.
+ *
+ * @param displayRank the displayRank value to set.
+ * @return the MarketplaceSku object itself.
+ */
+ public MarketplaceSku withDisplayRank(Integer displayRank) {
+ this.displayRank = displayRank;
+ return this;
+ }
+
+ /**
+ * Get the operatingSystem property: The operating system supported.
+ *
+ * @return the operatingSystem value.
+ */
+ public SkuOperatingSystem operatingSystem() {
+ return this.operatingSystem;
+ }
+
+ /**
+ * Set the operatingSystem property: The operating system supported.
+ *
+ * @param operatingSystem the operatingSystem value to set.
+ * @return the MarketplaceSku object itself.
+ */
+ public MarketplaceSku withOperatingSystem(SkuOperatingSystem operatingSystem) {
+ this.operatingSystem = operatingSystem;
+ return this;
+ }
+
+ /**
+ * Get the marketplaceSkuVersions property: The marketplace sku version.
+ *
+ * @return the marketplaceSkuVersions value.
+ */
+ public List marketplaceSkuVersions() {
+ return this.marketplaceSkuVersions;
+ }
+
+ /**
+ * Set the marketplaceSkuVersions property: The marketplace sku version.
+ *
+ * @param marketplaceSkuVersions the marketplaceSkuVersions value to set.
+ * @return the MarketplaceSku object itself.
+ */
+ public MarketplaceSku withMarketplaceSkuVersions(List marketplaceSkuVersions) {
+ this.marketplaceSkuVersions = marketplaceSkuVersions;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (catalogPlanId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Missing required property catalogPlanId in model MarketplaceSku"));
+ }
+ if (marketplaceSkuId() == null) {
+ throw LOGGER.atError()
+ .log(
+ new IllegalArgumentException("Missing required property marketplaceSkuId in model MarketplaceSku"));
+ }
+ if (operatingSystem() != null) {
+ operatingSystem().validate();
+ }
+ if (marketplaceSkuVersions() != null) {
+ marketplaceSkuVersions().forEach(e -> e.validate());
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(MarketplaceSku.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("catalogPlanId", this.catalogPlanId);
+ jsonWriter.writeStringField("marketplaceSkuId", this.marketplaceSkuId);
+ jsonWriter.writeStringField("type", this.type);
+ jsonWriter.writeStringField("displayName", this.displayName);
+ jsonWriter.writeStringField("summary", this.summary);
+ jsonWriter.writeStringField("longSummary", this.longSummary);
+ jsonWriter.writeStringField("description", this.description);
+ jsonWriter.writeStringField("generation", this.generation);
+ jsonWriter.writeNumberField("displayRank", this.displayRank);
+ jsonWriter.writeJsonField("operatingSystem", this.operatingSystem);
+ jsonWriter.writeArrayField("marketplaceSkuVersions", this.marketplaceSkuVersions,
+ (writer, element) -> writer.writeJson(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of MarketplaceSku from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of MarketplaceSku 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 MarketplaceSku.
+ */
+ public static MarketplaceSku fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ MarketplaceSku deserializedMarketplaceSku = new MarketplaceSku();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("catalogPlanId".equals(fieldName)) {
+ deserializedMarketplaceSku.catalogPlanId = reader.getString();
+ } else if ("marketplaceSkuId".equals(fieldName)) {
+ deserializedMarketplaceSku.marketplaceSkuId = reader.getString();
+ } else if ("type".equals(fieldName)) {
+ deserializedMarketplaceSku.type = reader.getString();
+ } else if ("displayName".equals(fieldName)) {
+ deserializedMarketplaceSku.displayName = reader.getString();
+ } else if ("summary".equals(fieldName)) {
+ deserializedMarketplaceSku.summary = reader.getString();
+ } else if ("longSummary".equals(fieldName)) {
+ deserializedMarketplaceSku.longSummary = reader.getString();
+ } else if ("description".equals(fieldName)) {
+ deserializedMarketplaceSku.description = reader.getString();
+ } else if ("generation".equals(fieldName)) {
+ deserializedMarketplaceSku.generation = reader.getString();
+ } else if ("displayRank".equals(fieldName)) {
+ deserializedMarketplaceSku.displayRank = reader.getNullable(JsonReader::getInt);
+ } else if ("operatingSystem".equals(fieldName)) {
+ deserializedMarketplaceSku.operatingSystem = SkuOperatingSystem.fromJson(reader);
+ } else if ("marketplaceSkuVersions".equals(fieldName)) {
+ List marketplaceSkuVersions
+ = reader.readArray(reader1 -> MarketplaceSkuVersion.fromJson(reader1));
+ deserializedMarketplaceSku.marketplaceSkuVersions = marketplaceSkuVersions;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedMarketplaceSku;
+ });
+ }
+}
diff --git a/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/MarketplaceSkuVersion.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/MarketplaceSkuVersion.java
new file mode 100644
index 000000000000..a578a4a4ff13
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/MarketplaceSkuVersion.java
@@ -0,0 +1,185 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.edgemarketplace.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * The marketplace sku version.
+ */
+@Fluent
+public final class MarketplaceSkuVersion implements JsonSerializable {
+ /*
+ * The name of sku version
+ */
+ private String name;
+
+ /*
+ * The size of the image
+ */
+ private Integer sizeOnDiskInMb;
+
+ /*
+ * The size of the download
+ */
+ private Integer minimumDownloadSizeInMb;
+
+ /*
+ * The stage name
+ */
+ private String stageName;
+
+ /**
+ * Creates an instance of MarketplaceSkuVersion class.
+ */
+ public MarketplaceSkuVersion() {
+ }
+
+ /**
+ * Get the name property: The name of sku version.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: The name of sku version.
+ *
+ * @param name the name value to set.
+ * @return the MarketplaceSkuVersion object itself.
+ */
+ public MarketplaceSkuVersion withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the sizeOnDiskInMb property: The size of the image.
+ *
+ * @return the sizeOnDiskInMb value.
+ */
+ public Integer sizeOnDiskInMb() {
+ return this.sizeOnDiskInMb;
+ }
+
+ /**
+ * Set the sizeOnDiskInMb property: The size of the image.
+ *
+ * @param sizeOnDiskInMb the sizeOnDiskInMb value to set.
+ * @return the MarketplaceSkuVersion object itself.
+ */
+ public MarketplaceSkuVersion withSizeOnDiskInMb(Integer sizeOnDiskInMb) {
+ this.sizeOnDiskInMb = sizeOnDiskInMb;
+ return this;
+ }
+
+ /**
+ * Get the minimumDownloadSizeInMb property: The size of the download.
+ *
+ * @return the minimumDownloadSizeInMb value.
+ */
+ public Integer minimumDownloadSizeInMb() {
+ return this.minimumDownloadSizeInMb;
+ }
+
+ /**
+ * Set the minimumDownloadSizeInMb property: The size of the download.
+ *
+ * @param minimumDownloadSizeInMb the minimumDownloadSizeInMb value to set.
+ * @return the MarketplaceSkuVersion object itself.
+ */
+ public MarketplaceSkuVersion withMinimumDownloadSizeInMb(Integer minimumDownloadSizeInMb) {
+ this.minimumDownloadSizeInMb = minimumDownloadSizeInMb;
+ return this;
+ }
+
+ /**
+ * Get the stageName property: The stage name.
+ *
+ * @return the stageName value.
+ */
+ public String stageName() {
+ return this.stageName;
+ }
+
+ /**
+ * Set the stageName property: The stage name.
+ *
+ * @param stageName the stageName value to set.
+ * @return the MarketplaceSkuVersion object itself.
+ */
+ public MarketplaceSkuVersion withStageName(String stageName) {
+ this.stageName = stageName;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (name() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Missing required property name in model MarketplaceSkuVersion"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(MarketplaceSkuVersion.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("name", this.name);
+ jsonWriter.writeNumberField("sizeOnDiskInMb", this.sizeOnDiskInMb);
+ jsonWriter.writeNumberField("minimumDownloadSizeInMb", this.minimumDownloadSizeInMb);
+ jsonWriter.writeStringField("stageName", this.stageName);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of MarketplaceSkuVersion from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of MarketplaceSkuVersion 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 MarketplaceSkuVersion.
+ */
+ public static MarketplaceSkuVersion fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ MarketplaceSkuVersion deserializedMarketplaceSkuVersion = new MarketplaceSkuVersion();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("name".equals(fieldName)) {
+ deserializedMarketplaceSkuVersion.name = reader.getString();
+ } else if ("sizeOnDiskInMb".equals(fieldName)) {
+ deserializedMarketplaceSkuVersion.sizeOnDiskInMb = reader.getNullable(JsonReader::getInt);
+ } else if ("minimumDownloadSizeInMb".equals(fieldName)) {
+ deserializedMarketplaceSkuVersion.minimumDownloadSizeInMb = reader.getNullable(JsonReader::getInt);
+ } else if ("stageName".equals(fieldName)) {
+ deserializedMarketplaceSkuVersion.stageName = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedMarketplaceSkuVersion;
+ });
+ }
+}
diff --git a/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/Offer.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/Offer.java
new file mode 100644
index 000000000000..9a7f41f6cce1
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/Offer.java
@@ -0,0 +1,55 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.edgemarketplace.models;
+
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.edgemarketplace.fluent.models.OfferInner;
+
+/**
+ * An immutable client-side representation of Offer.
+ */
+public interface Offer {
+ /**
+ * Gets the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * Gets the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * Gets the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * Gets the properties property: The resource-specific properties for this resource.
+ *
+ * @return the properties value.
+ */
+ OfferProperties properties();
+
+ /**
+ * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ SystemData systemData();
+
+ /**
+ * Gets the inner com.azure.resourcemanager.edgemarketplace.fluent.models.OfferInner object.
+ *
+ * @return the inner object.
+ */
+ OfferInner innerModel();
+}
diff --git a/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/OfferAvailability.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/OfferAvailability.java
new file mode 100644
index 000000000000..fa8fd9833313
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/OfferAvailability.java
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.edgemarketplace.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import java.util.Collection;
+
+/**
+ * Says if the offer is public/private.
+ */
+public final class OfferAvailability extends ExpandableStringEnum {
+ /**
+ * Static value Private for OfferAvailability.
+ */
+ public static final OfferAvailability PRIVATE = fromString("Private");
+
+ /**
+ * Static value Public for OfferAvailability.
+ */
+ public static final OfferAvailability PUBLIC = fromString("Public");
+
+ /**
+ * Creates a new instance of OfferAvailability value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public OfferAvailability() {
+ }
+
+ /**
+ * Creates or finds a OfferAvailability from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding OfferAvailability.
+ */
+ public static OfferAvailability fromString(String name) {
+ return fromString(name, OfferAvailability.class);
+ }
+
+ /**
+ * Gets known OfferAvailability values.
+ *
+ * @return known OfferAvailability values.
+ */
+ public static Collection values() {
+ return values(OfferAvailability.class);
+ }
+}
diff --git a/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/OfferContent.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/OfferContent.java
new file mode 100644
index 000000000000..39ac3ee24cf3
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/OfferContent.java
@@ -0,0 +1,510 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.edgemarketplace.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * The offer content.
+ */
+@Fluent
+public final class OfferContent implements JsonSerializable {
+ /*
+ * The display name of the offer
+ */
+ private String displayName;
+
+ /*
+ * The summary
+ */
+ private String summary;
+
+ /*
+ * The long summary
+ */
+ private String longSummary;
+
+ /*
+ * The description
+ */
+ private String description;
+
+ /*
+ * The offer id
+ */
+ private String offerId;
+
+ /*
+ * The offer type
+ */
+ private String offerType;
+
+ /*
+ * The support uri
+ */
+ private String supportUri;
+
+ /*
+ * The popularity of the offer
+ */
+ private Integer popularity;
+
+ /*
+ * The publisher of the offer
+ */
+ private OfferPublisher offerPublisher;
+
+ /*
+ * The availability of the offer
+ */
+ private OfferAvailability availability;
+
+ /*
+ * The release type of the offer
+ */
+ private OfferReleaseType releaseType;
+
+ /*
+ * The icon files
+ */
+ private IconFileUris iconFileUris;
+
+ /*
+ * The terms and conditions
+ */
+ private TermsAndConditions termsAndConditions;
+
+ /*
+ * The category ids
+ */
+ private List categoryIds;
+
+ /*
+ * The operating systems
+ */
+ private List operatingSystems;
+
+ /**
+ * Creates an instance of OfferContent class.
+ */
+ public OfferContent() {
+ }
+
+ /**
+ * Get the displayName property: The display name of the offer.
+ *
+ * @return the displayName value.
+ */
+ public String displayName() {
+ return this.displayName;
+ }
+
+ /**
+ * Set the displayName property: The display name of the offer.
+ *
+ * @param displayName the displayName value to set.
+ * @return the OfferContent object itself.
+ */
+ public OfferContent withDisplayName(String displayName) {
+ this.displayName = displayName;
+ return this;
+ }
+
+ /**
+ * Get the summary property: The summary.
+ *
+ * @return the summary value.
+ */
+ public String summary() {
+ return this.summary;
+ }
+
+ /**
+ * Set the summary property: The summary.
+ *
+ * @param summary the summary value to set.
+ * @return the OfferContent object itself.
+ */
+ public OfferContent withSummary(String summary) {
+ this.summary = summary;
+ return this;
+ }
+
+ /**
+ * Get the longSummary property: The long summary.
+ *
+ * @return the longSummary value.
+ */
+ public String longSummary() {
+ return this.longSummary;
+ }
+
+ /**
+ * Set the longSummary property: The long summary.
+ *
+ * @param longSummary the longSummary value to set.
+ * @return the OfferContent object itself.
+ */
+ public OfferContent withLongSummary(String longSummary) {
+ this.longSummary = longSummary;
+ return this;
+ }
+
+ /**
+ * Get the description property: The description.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set the description property: The description.
+ *
+ * @param description the description value to set.
+ * @return the OfferContent object itself.
+ */
+ public OfferContent withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get the offerId property: The offer id.
+ *
+ * @return the offerId value.
+ */
+ public String offerId() {
+ return this.offerId;
+ }
+
+ /**
+ * Set the offerId property: The offer id.
+ *
+ * @param offerId the offerId value to set.
+ * @return the OfferContent object itself.
+ */
+ public OfferContent withOfferId(String offerId) {
+ this.offerId = offerId;
+ return this;
+ }
+
+ /**
+ * Get the offerType property: The offer type.
+ *
+ * @return the offerType value.
+ */
+ public String offerType() {
+ return this.offerType;
+ }
+
+ /**
+ * Set the offerType property: The offer type.
+ *
+ * @param offerType the offerType value to set.
+ * @return the OfferContent object itself.
+ */
+ public OfferContent withOfferType(String offerType) {
+ this.offerType = offerType;
+ return this;
+ }
+
+ /**
+ * Get the supportUri property: The support uri.
+ *
+ * @return the supportUri value.
+ */
+ public String supportUri() {
+ return this.supportUri;
+ }
+
+ /**
+ * Set the supportUri property: The support uri.
+ *
+ * @param supportUri the supportUri value to set.
+ * @return the OfferContent object itself.
+ */
+ public OfferContent withSupportUri(String supportUri) {
+ this.supportUri = supportUri;
+ return this;
+ }
+
+ /**
+ * Get the popularity property: The popularity of the offer.
+ *
+ * @return the popularity value.
+ */
+ public Integer popularity() {
+ return this.popularity;
+ }
+
+ /**
+ * Set the popularity property: The popularity of the offer.
+ *
+ * @param popularity the popularity value to set.
+ * @return the OfferContent object itself.
+ */
+ public OfferContent withPopularity(Integer popularity) {
+ this.popularity = popularity;
+ return this;
+ }
+
+ /**
+ * Get the offerPublisher property: The publisher of the offer.
+ *
+ * @return the offerPublisher value.
+ */
+ public OfferPublisher offerPublisher() {
+ return this.offerPublisher;
+ }
+
+ /**
+ * Set the offerPublisher property: The publisher of the offer.
+ *
+ * @param offerPublisher the offerPublisher value to set.
+ * @return the OfferContent object itself.
+ */
+ public OfferContent withOfferPublisher(OfferPublisher offerPublisher) {
+ this.offerPublisher = offerPublisher;
+ return this;
+ }
+
+ /**
+ * Get the availability property: The availability of the offer.
+ *
+ * @return the availability value.
+ */
+ public OfferAvailability availability() {
+ return this.availability;
+ }
+
+ /**
+ * Set the availability property: The availability of the offer.
+ *
+ * @param availability the availability value to set.
+ * @return the OfferContent object itself.
+ */
+ public OfferContent withAvailability(OfferAvailability availability) {
+ this.availability = availability;
+ return this;
+ }
+
+ /**
+ * Get the releaseType property: The release type of the offer.
+ *
+ * @return the releaseType value.
+ */
+ public OfferReleaseType releaseType() {
+ return this.releaseType;
+ }
+
+ /**
+ * Set the releaseType property: The release type of the offer.
+ *
+ * @param releaseType the releaseType value to set.
+ * @return the OfferContent object itself.
+ */
+ public OfferContent withReleaseType(OfferReleaseType releaseType) {
+ this.releaseType = releaseType;
+ return this;
+ }
+
+ /**
+ * Get the iconFileUris property: The icon files.
+ *
+ * @return the iconFileUris value.
+ */
+ public IconFileUris iconFileUris() {
+ return this.iconFileUris;
+ }
+
+ /**
+ * Set the iconFileUris property: The icon files.
+ *
+ * @param iconFileUris the iconFileUris value to set.
+ * @return the OfferContent object itself.
+ */
+ public OfferContent withIconFileUris(IconFileUris iconFileUris) {
+ this.iconFileUris = iconFileUris;
+ return this;
+ }
+
+ /**
+ * Get the termsAndConditions property: The terms and conditions.
+ *
+ * @return the termsAndConditions value.
+ */
+ public TermsAndConditions termsAndConditions() {
+ return this.termsAndConditions;
+ }
+
+ /**
+ * Set the termsAndConditions property: The terms and conditions.
+ *
+ * @param termsAndConditions the termsAndConditions value to set.
+ * @return the OfferContent object itself.
+ */
+ public OfferContent withTermsAndConditions(TermsAndConditions termsAndConditions) {
+ this.termsAndConditions = termsAndConditions;
+ return this;
+ }
+
+ /**
+ * Get the categoryIds property: The category ids.
+ *
+ * @return the categoryIds value.
+ */
+ public List categoryIds() {
+ return this.categoryIds;
+ }
+
+ /**
+ * Set the categoryIds property: The category ids.
+ *
+ * @param categoryIds the categoryIds value to set.
+ * @return the OfferContent object itself.
+ */
+ public OfferContent withCategoryIds(List categoryIds) {
+ this.categoryIds = categoryIds;
+ return this;
+ }
+
+ /**
+ * Get the operatingSystems property: The operating systems.
+ *
+ * @return the operatingSystems value.
+ */
+ public List operatingSystems() {
+ return this.operatingSystems;
+ }
+
+ /**
+ * Set the operatingSystems property: The operating systems.
+ *
+ * @param operatingSystems the operatingSystems value to set.
+ * @return the OfferContent object itself.
+ */
+ public OfferContent withOperatingSystems(List operatingSystems) {
+ this.operatingSystems = operatingSystems;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (displayName() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Missing required property displayName in model OfferContent"));
+ }
+ if (offerId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Missing required property offerId in model OfferContent"));
+ }
+ if (offerPublisher() != null) {
+ offerPublisher().validate();
+ }
+ if (iconFileUris() != null) {
+ iconFileUris().validate();
+ }
+ if (termsAndConditions() != null) {
+ termsAndConditions().validate();
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(OfferContent.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("displayName", this.displayName);
+ jsonWriter.writeStringField("offerId", this.offerId);
+ jsonWriter.writeStringField("summary", this.summary);
+ jsonWriter.writeStringField("longSummary", this.longSummary);
+ jsonWriter.writeStringField("description", this.description);
+ jsonWriter.writeStringField("offerType", this.offerType);
+ jsonWriter.writeStringField("supportUri", this.supportUri);
+ jsonWriter.writeNumberField("popularity", this.popularity);
+ jsonWriter.writeJsonField("offerPublisher", this.offerPublisher);
+ jsonWriter.writeStringField("availability", this.availability == null ? null : this.availability.toString());
+ jsonWriter.writeStringField("releaseType", this.releaseType == null ? null : this.releaseType.toString());
+ jsonWriter.writeJsonField("iconFileUris", this.iconFileUris);
+ jsonWriter.writeJsonField("termsAndConditions", this.termsAndConditions);
+ jsonWriter.writeArrayField("categoryIds", this.categoryIds, (writer, element) -> writer.writeString(element));
+ jsonWriter.writeArrayField("operatingSystems", this.operatingSystems,
+ (writer, element) -> writer.writeString(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OfferContent from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OfferContent 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 OfferContent.
+ */
+ public static OfferContent fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OfferContent deserializedOfferContent = new OfferContent();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("displayName".equals(fieldName)) {
+ deserializedOfferContent.displayName = reader.getString();
+ } else if ("offerId".equals(fieldName)) {
+ deserializedOfferContent.offerId = reader.getString();
+ } else if ("summary".equals(fieldName)) {
+ deserializedOfferContent.summary = reader.getString();
+ } else if ("longSummary".equals(fieldName)) {
+ deserializedOfferContent.longSummary = reader.getString();
+ } else if ("description".equals(fieldName)) {
+ deserializedOfferContent.description = reader.getString();
+ } else if ("offerType".equals(fieldName)) {
+ deserializedOfferContent.offerType = reader.getString();
+ } else if ("supportUri".equals(fieldName)) {
+ deserializedOfferContent.supportUri = reader.getString();
+ } else if ("popularity".equals(fieldName)) {
+ deserializedOfferContent.popularity = reader.getNullable(JsonReader::getInt);
+ } else if ("offerPublisher".equals(fieldName)) {
+ deserializedOfferContent.offerPublisher = OfferPublisher.fromJson(reader);
+ } else if ("availability".equals(fieldName)) {
+ deserializedOfferContent.availability = OfferAvailability.fromString(reader.getString());
+ } else if ("releaseType".equals(fieldName)) {
+ deserializedOfferContent.releaseType = OfferReleaseType.fromString(reader.getString());
+ } else if ("iconFileUris".equals(fieldName)) {
+ deserializedOfferContent.iconFileUris = IconFileUris.fromJson(reader);
+ } else if ("termsAndConditions".equals(fieldName)) {
+ deserializedOfferContent.termsAndConditions = TermsAndConditions.fromJson(reader);
+ } else if ("categoryIds".equals(fieldName)) {
+ List categoryIds = reader.readArray(reader1 -> reader1.getString());
+ deserializedOfferContent.categoryIds = categoryIds;
+ } else if ("operatingSystems".equals(fieldName)) {
+ List operatingSystems = reader.readArray(reader1 -> reader1.getString());
+ deserializedOfferContent.operatingSystems = operatingSystems;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOfferContent;
+ });
+ }
+}
diff --git a/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/OfferListResult.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/OfferListResult.java
new file mode 100644
index 000000000000..e72b0902095a
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/OfferListResult.java
@@ -0,0 +1,134 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.edgemarketplace.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.edgemarketplace.fluent.models.OfferInner;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * The response of a Offer list operation.
+ */
+@Fluent
+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.
+ */
+ public OfferListResult() {
+ }
+
+ /**
+ * Get the value property: The Offer items on this page.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Set the value property: The Offer items on this page.
+ *
+ * @param value the value value to set.
+ * @return the OfferListResult object itself.
+ */
+ public OfferListResult withValue(List value) {
+ this.value = value;
+ return this;
+ }
+
+ /**
+ * Get the nextLink property: The link to the next page of items.
+ *
+ * @return the nextLink value.
+ */
+ public String nextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * Set the nextLink property: The link to the next page of items.
+ *
+ * @param nextLink the nextLink value to set.
+ * @return the OfferListResult object itself.
+ */
+ public OfferListResult withNextLink(String nextLink) {
+ this.nextLink = nextLink;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (value() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Missing required property value in model OfferListResult"));
+ } else {
+ value().forEach(e -> e.validate());
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(OfferListResult.class);
+
+ /**
+ * {@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/models/OfferProperties.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/OfferProperties.java
new file mode 100644
index 000000000000..9af347b54a39
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/OfferProperties.java
@@ -0,0 +1,224 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.edgemarketplace.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * The offer properties.
+ */
+@Fluent
+public final class OfferProperties implements JsonSerializable {
+ /*
+ * The content version
+ */
+ private String contentVersion;
+
+ /*
+ * The content url
+ */
+ private String contentUrl;
+
+ /*
+ * The offer content
+ */
+ private OfferContent offerContent;
+
+ /*
+ * The resource provisioning state
+ */
+ private ResourceProvisioningState provisioningState;
+
+ /*
+ * The marketplace skus
+ */
+ private List marketplaceSkus;
+
+ /**
+ * Creates an instance of OfferProperties class.
+ */
+ public OfferProperties() {
+ }
+
+ /**
+ * Get the contentVersion property: The content version.
+ *
+ * @return the contentVersion value.
+ */
+ public String contentVersion() {
+ return this.contentVersion;
+ }
+
+ /**
+ * Set the contentVersion property: The content version.
+ *
+ * @param contentVersion the contentVersion value to set.
+ * @return the OfferProperties object itself.
+ */
+ public OfferProperties withContentVersion(String contentVersion) {
+ this.contentVersion = contentVersion;
+ return this;
+ }
+
+ /**
+ * Get the contentUrl property: The content url.
+ *
+ * @return the contentUrl value.
+ */
+ public String contentUrl() {
+ return this.contentUrl;
+ }
+
+ /**
+ * Set the contentUrl property: The content url.
+ *
+ * @param contentUrl the contentUrl value to set.
+ * @return the OfferProperties object itself.
+ */
+ public OfferProperties withContentUrl(String contentUrl) {
+ this.contentUrl = contentUrl;
+ return this;
+ }
+
+ /**
+ * Get the offerContent property: The offer content.
+ *
+ * @return the offerContent value.
+ */
+ public OfferContent offerContent() {
+ return this.offerContent;
+ }
+
+ /**
+ * Set the offerContent property: The offer content.
+ *
+ * @param offerContent the offerContent value to set.
+ * @return the OfferProperties object itself.
+ */
+ public OfferProperties withOfferContent(OfferContent offerContent) {
+ this.offerContent = offerContent;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The resource provisioning state.
+ *
+ * @return the provisioningState value.
+ */
+ public ResourceProvisioningState provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Set the provisioningState property: The resource provisioning state.
+ *
+ * @param provisioningState the provisioningState value to set.
+ * @return the OfferProperties object itself.
+ */
+ public OfferProperties withProvisioningState(ResourceProvisioningState provisioningState) {
+ this.provisioningState = provisioningState;
+ return this;
+ }
+
+ /**
+ * Get the marketplaceSkus property: The marketplace skus.
+ *
+ * @return the marketplaceSkus value.
+ */
+ public List marketplaceSkus() {
+ return this.marketplaceSkus;
+ }
+
+ /**
+ * Set the marketplaceSkus property: The marketplace skus.
+ *
+ * @param marketplaceSkus the marketplaceSkus value to set.
+ * @return the OfferProperties object itself.
+ */
+ public OfferProperties withMarketplaceSkus(List marketplaceSkus) {
+ this.marketplaceSkus = marketplaceSkus;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (offerContent() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Missing required property offerContent in model OfferProperties"));
+ } else {
+ offerContent().validate();
+ }
+ if (marketplaceSkus() != null) {
+ marketplaceSkus().forEach(e -> e.validate());
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(OfferProperties.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("offerContent", this.offerContent);
+ jsonWriter.writeStringField("contentVersion", this.contentVersion);
+ jsonWriter.writeStringField("contentUrl", this.contentUrl);
+ jsonWriter.writeStringField("provisioningState",
+ this.provisioningState == null ? null : this.provisioningState.toString());
+ jsonWriter.writeArrayField("marketplaceSkus", this.marketplaceSkus,
+ (writer, element) -> writer.writeJson(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OfferProperties from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OfferProperties 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 OfferProperties.
+ */
+ public static OfferProperties fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OfferProperties deserializedOfferProperties = new OfferProperties();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("offerContent".equals(fieldName)) {
+ deserializedOfferProperties.offerContent = OfferContent.fromJson(reader);
+ } else if ("contentVersion".equals(fieldName)) {
+ deserializedOfferProperties.contentVersion = reader.getString();
+ } else if ("contentUrl".equals(fieldName)) {
+ deserializedOfferProperties.contentUrl = reader.getString();
+ } else if ("provisioningState".equals(fieldName)) {
+ deserializedOfferProperties.provisioningState
+ = ResourceProvisioningState.fromString(reader.getString());
+ } else if ("marketplaceSkus".equals(fieldName)) {
+ List marketplaceSkus
+ = reader.readArray(reader1 -> MarketplaceSku.fromJson(reader1));
+ deserializedOfferProperties.marketplaceSkus = marketplaceSkus;
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOfferProperties;
+ });
+ }
+}
diff --git a/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/OfferPublisher.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/OfferPublisher.java
new file mode 100644
index 000000000000..c8b2bb358bb7
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/OfferPublisher.java
@@ -0,0 +1,134 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.edgemarketplace.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * The offer publisher.
+ */
+@Fluent
+public final class OfferPublisher implements JsonSerializable {
+ /*
+ * The publisher Id
+ */
+ private String publisherId;
+
+ /*
+ * The publisher name
+ */
+ private String publisherDisplayName;
+
+ /**
+ * Creates an instance of OfferPublisher class.
+ */
+ public OfferPublisher() {
+ }
+
+ /**
+ * Get the publisherId property: The publisher Id.
+ *
+ * @return the publisherId value.
+ */
+ public String publisherId() {
+ return this.publisherId;
+ }
+
+ /**
+ * Set the publisherId property: The publisher Id.
+ *
+ * @param publisherId the publisherId value to set.
+ * @return the OfferPublisher object itself.
+ */
+ public OfferPublisher withPublisherId(String publisherId) {
+ this.publisherId = publisherId;
+ return this;
+ }
+
+ /**
+ * Get the publisherDisplayName property: The publisher name.
+ *
+ * @return the publisherDisplayName value.
+ */
+ public String publisherDisplayName() {
+ return this.publisherDisplayName;
+ }
+
+ /**
+ * Set the publisherDisplayName property: The publisher name.
+ *
+ * @param publisherDisplayName the publisherDisplayName value to set.
+ * @return the OfferPublisher object itself.
+ */
+ public OfferPublisher withPublisherDisplayName(String publisherDisplayName) {
+ this.publisherDisplayName = publisherDisplayName;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (publisherId() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException("Missing required property publisherId in model OfferPublisher"));
+ }
+ if (publisherDisplayName() == null) {
+ throw LOGGER.atError()
+ .log(new IllegalArgumentException(
+ "Missing required property publisherDisplayName in model OfferPublisher"));
+ }
+ }
+
+ private static final ClientLogger LOGGER = new ClientLogger(OfferPublisher.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("publisherId", this.publisherId);
+ jsonWriter.writeStringField("publisherDisplayName", this.publisherDisplayName);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OfferPublisher from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OfferPublisher 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 OfferPublisher.
+ */
+ public static OfferPublisher fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OfferPublisher deserializedOfferPublisher = new OfferPublisher();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("publisherId".equals(fieldName)) {
+ deserializedOfferPublisher.publisherId = reader.getString();
+ } else if ("publisherDisplayName".equals(fieldName)) {
+ deserializedOfferPublisher.publisherDisplayName = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOfferPublisher;
+ });
+ }
+}
diff --git a/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/OfferReleaseType.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/OfferReleaseType.java
new file mode 100644
index 000000000000..85bfe08d6dfb
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/OfferReleaseType.java
@@ -0,0 +1,51 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.edgemarketplace.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import java.util.Collection;
+
+/**
+ * Offer release type.
+ */
+public final class OfferReleaseType extends ExpandableStringEnum {
+ /**
+ * Static value Preview for OfferReleaseType.
+ */
+ public static final OfferReleaseType PREVIEW = fromString("Preview");
+
+ /**
+ * Static value GA for OfferReleaseType.
+ */
+ public static final OfferReleaseType GA = fromString("GA");
+
+ /**
+ * Creates a new instance of OfferReleaseType value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public OfferReleaseType() {
+ }
+
+ /**
+ * Creates or finds a OfferReleaseType from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding OfferReleaseType.
+ */
+ public static OfferReleaseType fromString(String name) {
+ return fromString(name, OfferReleaseType.class);
+ }
+
+ /**
+ * Gets known OfferReleaseType values.
+ *
+ * @return known OfferReleaseType values.
+ */
+ public static Collection values() {
+ return values(OfferReleaseType.class);
+ }
+}
diff --git a/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/Offers.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/Offers.java
new file mode 100644
index 000000000000..8153e1c4f468
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/Offers.java
@@ -0,0 +1,149 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.edgemarketplace.models;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+
+/**
+ * Resource collection API of Offers.
+ */
+public interface Offers {
+ /**
+ * 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}.
+ */
+ 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}.
+ */
+ PagedIterable list(String resourceUri, Integer top, Integer skip, Integer maxPageSize, String filter,
+ String skipToken, Context context);
+
+ /**
+ * List Offer resources by subscription.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response of a Offer list operation as paginated response with {@link PagedIterable}.
+ */
+ PagedIterable listBySubscription();
+
+ /**
+ * List Offer resources by subscription.
+ *
+ * @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}.
+ */
+ PagedIterable listBySubscription(Integer top, Integer skip, Integer maxPageSize, String filter,
+ String skipToken, Context context);
+
+ /**
+ * 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}.
+ */
+ 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.
+ */
+ Offer get(String resourceUri, String offerId);
+
+ /**
+ * 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 disk access token.
+ */
+ DiskAccessToken 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 disk access token.
+ */
+ DiskAccessToken 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}.
+ */
+ 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.
+ */
+ DiskAccessToken getAccessToken(String resourceUri, String offerId, AccessTokenReadRequest body);
+}
diff --git a/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/Operation.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/Operation.java
new file mode 100644
index 000000000000..b417915729b8
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/Operation.java
@@ -0,0 +1,58 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.edgemarketplace.models;
+
+import com.azure.resourcemanager.edgemarketplace.fluent.models.OperationInner;
+
+/**
+ * An immutable client-side representation of Operation.
+ */
+public interface Operation {
+ /**
+ * Gets 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.
+ */
+ String name();
+
+ /**
+ * Gets the isDataAction property: Whether the operation applies to data-plane. This is "true" for data-plane
+ * operations and "false" for ARM/control-plane operations.
+ *
+ * @return the isDataAction value.
+ */
+ Boolean isDataAction();
+
+ /**
+ * Gets the display property: Localized display information for this particular operation.
+ *
+ * @return the display value.
+ */
+ OperationDisplay display();
+
+ /**
+ * Gets 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.
+ */
+ Origin origin();
+
+ /**
+ * Gets the actionType property: Enum. Indicates the action type. "Internal" refers to actions that are for internal
+ * only APIs.
+ *
+ * @return the actionType value.
+ */
+ ActionType actionType();
+
+ /**
+ * Gets the inner com.azure.resourcemanager.edgemarketplace.fluent.models.OperationInner object.
+ *
+ * @return the inner object.
+ */
+ OperationInner innerModel();
+}
diff --git a/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/OperationDisplay.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/OperationDisplay.java
new file mode 100644
index 000000000000..ec23a758028a
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/OperationDisplay.java
@@ -0,0 +1,136 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.edgemarketplace.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;
+
+/**
+ * Localized display information for this particular operation.
+ */
+@Immutable
+public final class OperationDisplay implements JsonSerializable {
+ /*
+ * The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or
+ * "Microsoft Compute".
+ */
+ private String provider;
+
+ /*
+ * The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or
+ * "Job Schedule Collections".
+ */
+ private String resource;
+
+ /*
+ * The concise, localized friendly name for the operation; suitable for dropdowns. E.g.
+ * "Create or Update Virtual Machine", "Restart Virtual Machine".
+ */
+ private String operation;
+
+ /*
+ * The short, localized friendly description of the operation; suitable for tool tips and detailed views.
+ */
+ private String description;
+
+ /**
+ * Creates an instance of OperationDisplay class.
+ */
+ public OperationDisplay() {
+ }
+
+ /**
+ * Get the provider property: The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring
+ * Insights" or "Microsoft Compute".
+ *
+ * @return the provider value.
+ */
+ public String provider() {
+ return this.provider;
+ }
+
+ /**
+ * Get the resource property: The localized friendly name of the resource type related to this operation. E.g.
+ * "Virtual Machines" or "Job Schedule Collections".
+ *
+ * @return the resource value.
+ */
+ public String resource() {
+ return this.resource;
+ }
+
+ /**
+ * Get the operation property: The concise, localized friendly name for the operation; suitable for dropdowns. E.g.
+ * "Create or Update Virtual Machine", "Restart Virtual Machine".
+ *
+ * @return the operation value.
+ */
+ public String operation() {
+ return this.operation;
+ }
+
+ /**
+ * Get the description property: The short, localized friendly description of the operation; suitable for tool tips
+ * and detailed views.
+ *
+ * @return the description value.
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of OperationDisplay from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of OperationDisplay 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 OperationDisplay.
+ */
+ public static OperationDisplay fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ OperationDisplay deserializedOperationDisplay = new OperationDisplay();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("provider".equals(fieldName)) {
+ deserializedOperationDisplay.provider = reader.getString();
+ } else if ("resource".equals(fieldName)) {
+ deserializedOperationDisplay.resource = reader.getString();
+ } else if ("operation".equals(fieldName)) {
+ deserializedOperationDisplay.operation = reader.getString();
+ } else if ("description".equals(fieldName)) {
+ deserializedOperationDisplay.description = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedOperationDisplay;
+ });
+ }
+}
diff --git a/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/OperationListResult.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/OperationListResult.java
new file mode 100644
index 000000000000..2391f75b6912
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/OperationListResult.java
@@ -0,0 +1,104 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.edgemarketplace.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 {
+ /*
+ * List of operations supported by the resource provider
+ */
+ private List value;
+
+ /*
+ * URL to get the next set of operation list results (if there are any).
+ */
+ private String nextLink;
+
+ /**
+ * Creates an instance of OperationListResult class.
+ */
+ public OperationListResult() {
+ }
+
+ /**
+ * Get the value property: List of operations supported by the resource provider.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Get the nextLink property: URL to get the next set of operation list results (if there are any).
+ *
+ * @return the nextLink value.
+ */
+ public String nextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (value() != null) {
+ value().forEach(e -> e.validate());
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ 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 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/models/Operations.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/Operations.java
new file mode 100644
index 000000000000..de9c7bfd2ec4
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/Operations.java
@@ -0,0 +1,35 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.edgemarketplace.models;
+
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+
+/**
+ * Resource collection API of Operations.
+ */
+public interface Operations {
+ /**
+ * 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}.
+ */
+ 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}.
+ */
+ PagedIterable list(Context context);
+}
diff --git a/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/Origin.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/Origin.java
new file mode 100644
index 000000000000..c001b051c128
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/Origin.java
@@ -0,0 +1,57 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.edgemarketplace.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import java.util.Collection;
+
+/**
+ * The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value
+ * is "user,system".
+ */
+public final class Origin extends ExpandableStringEnum {
+ /**
+ * Static value user for Origin.
+ */
+ public static final Origin USER = fromString("user");
+
+ /**
+ * Static value system for Origin.
+ */
+ public static final Origin SYSTEM = fromString("system");
+
+ /**
+ * Static value user,system for Origin.
+ */
+ public static final Origin USER_SYSTEM = fromString("user,system");
+
+ /**
+ * Creates a new instance of Origin value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Deprecated
+ public Origin() {
+ }
+
+ /**
+ * Creates or finds a Origin from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding Origin.
+ */
+ public static Origin fromString(String name) {
+ return fromString(name, Origin.class);
+ }
+
+ /**
+ * Gets known Origin values.
+ *
+ * @return known Origin values.
+ */
+ public static Collection values() {
+ return values(Origin.class);
+ }
+}
diff --git a/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/Publisher.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/Publisher.java
new file mode 100644
index 000000000000..b7d0c45b1ef8
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/Publisher.java
@@ -0,0 +1,55 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.edgemarketplace.models;
+
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.edgemarketplace.fluent.models.PublisherInner;
+
+/**
+ * An immutable client-side representation of Publisher.
+ */
+public interface Publisher {
+ /**
+ * Gets the id property: Fully qualified resource Id for the resource.
+ *
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * Gets the name property: The name of the resource.
+ *
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * Gets the type property: The type of the resource.
+ *
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * Gets the properties property: The resource-specific properties for this resource.
+ *
+ * @return the properties value.
+ */
+ PublisherProperties properties();
+
+ /**
+ * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
+ *
+ * @return the systemData value.
+ */
+ SystemData systemData();
+
+ /**
+ * Gets the inner com.azure.resourcemanager.edgemarketplace.fluent.models.PublisherInner object.
+ *
+ * @return the inner object.
+ */
+ PublisherInner innerModel();
+}
diff --git a/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/PublisherListResult.java b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/PublisherListResult.java
new file mode 100644
index 000000000000..49ce84612bc1
--- /dev/null
+++ b/sdk/edgemarketplace/azure-resourcemanager-edgemarketplace/src/main/java/com/azure/resourcemanager/edgemarketplace/models/PublisherListResult.java
@@ -0,0 +1,134 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.edgemarketplace.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import com.azure.resourcemanager.edgemarketplace.fluent.models.PublisherInner;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * The response of a Publisher list operation.
+ */
+@Fluent
+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.
+ */
+ public PublisherListResult() {
+ }
+
+ /**
+ * Get the value property: The Publisher items on this page.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Set the value property: The Publisher items on this page.
+ *
+ * @param value the value value to set.
+ * @return the PublisherListResult object itself.
+ */
+ public PublisherListResult withValue(List