diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index b7a2f80351770..b221210b4328e 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -331,6 +331,7 @@ com.azure.resourcemanager:azure-resourcemanager-desktopvirtualization;1.0.0-beta
com.azure.resourcemanager:azure-resourcemanager-loadtestservice;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-automanage;1.0.0-beta.1;1.0.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-edgeorder;1.0.0-beta.1;1.0.0-beta.2
+com.azure.resourcemanager:azure-resourcemanager-oep;1.0.0-beta.1;1.0.0-beta.1
com.azure.tools:azure-sdk-archetype;1.0.0;1.0.0
# Unreleased dependencies: Copy the entry from above, prepend "unreleased_" and remove the current
diff --git a/pom.xml b/pom.xml
index aab77f33ebeb9..6997f73761050 100644
--- a/pom.xml
+++ b/pom.xml
@@ -802,6 +802,7 @@
sdk/mysqlflexibleserver
sdk/netapp
sdk/notificationhubs
+ sdk/oep
sdk/operationsmanagement
sdk/parents
sdk/peering
diff --git a/sdk/oep/azure-resourcemanager-oep/CHANGELOG.md b/sdk/oep/azure-resourcemanager-oep/CHANGELOG.md
new file mode 100644
index 0000000000000..8ec77d69d5a50
--- /dev/null
+++ b/sdk/oep/azure-resourcemanager-oep/CHANGELOG.md
@@ -0,0 +1,5 @@
+# Release History
+
+## 1.0.0-beta.1 (2022-01-06)
+
+- Azure Resource Manager oep client library for Java. This package contains Microsoft Azure SDK for oep Management SDK. Open Energy Platform Management Service APIs. Package tag package-2021-06-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
diff --git a/sdk/oep/azure-resourcemanager-oep/README.md b/sdk/oep/azure-resourcemanager-oep/README.md
new file mode 100644
index 0000000000000..e030e65d2214b
--- /dev/null
+++ b/sdk/oep/azure-resourcemanager-oep/README.md
@@ -0,0 +1,102 @@
+# Azure Resource Manager oep client library for Java
+
+Azure Resource Manager oep client library for Java.
+
+This package contains Microsoft Azure SDK for oep Management SDK. Open Energy Platform Management Service APIs. Package tag package-2021-06-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+
+## We'd love to hear your feedback
+
+We're always working on improving our products and the way we communicate with our users. So we'd love to learn what's working and how we can do better.
+
+If you haven't already, please take a few minutes to [complete this short survey][survey] we have put together.
+
+Thank you in advance for your collaboration. We really appreciate your time!
+
+## Documentation
+
+Various documentation is available to help you get started
+
+- [API reference documentation][docs]
+
+## Getting started
+
+### Prerequisites
+
+- [Java Development Kit (JDK)][jdk] with version 8 or above
+- [Azure Subscription][azure_subscription]
+
+### Adding the package to your product
+
+[//]: # ({x-version-update-start;com.azure.resourcemanager:azure-resourcemanager-oep;current})
+```xml
+
+ com.azure.resourcemanager
+ azure-resourcemanager-oep
+ 1.0.0-beta.1
+
+```
+[//]: # ({x-version-update-end})
+
+### Include the recommended packages
+
+Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client.
+
+[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation.
+
+### Authentication
+
+By default, Azure Active Directory token authentication depends on correct configure of following environment variables.
+
+- `AZURE_CLIENT_ID` for Azure client ID.
+- `AZURE_TENANT_ID` for Azure tenant ID.
+- `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate.
+
+In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
+
+With above configuration, `azure` client can be authenticated by following code:
+
+```java
+AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
+TokenCredential credential = new DefaultAzureCredentialBuilder()
+ .authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
+ .build();
+OepManager manager = OepManager
+ .authenticate(credential, profile);
+```
+
+The sample code assumes global Azure. Please change `AzureEnvironment.AZURE` variable if otherwise.
+
+See [Authentication][authenticate] for more options.
+
+## Key concepts
+
+See [API design][design] for general introduction on design and key concepts on Azure Management Libraries.
+
+## Examples
+
+[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/oep/azure-resourcemanager-oep/SAMPLE.md)
+
+
+## Troubleshooting
+
+## Next steps
+
+## Contributing
+
+For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md).
+
+1. Fork it
+1. Create your feature branch (`git checkout -b my-new-feature`)
+1. Commit your changes (`git commit -am 'Add some feature'`)
+1. Push to the branch (`git push origin my-new-feature`)
+1. Create new Pull Request
+
+
+[survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS
+[docs]: https://azure.github.io/azure-sdk-for-java/
+[jdk]: https://docs.microsoft.com/java/azure/jdk/
+[azure_subscription]: https://azure.microsoft.com/free/
+[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
+[azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty
+[authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md
+[design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md
diff --git a/sdk/oep/azure-resourcemanager-oep/SAMPLE.md b/sdk/oep/azure-resourcemanager-oep/SAMPLE.md
new file mode 100644
index 0000000000000..a1642f1c945c6
--- /dev/null
+++ b/sdk/oep/azure-resourcemanager-oep/SAMPLE.md
@@ -0,0 +1,203 @@
+# Code snippets and samples
+
+
+## EnergyServices
+
+- [Create](#energyservices_create)
+- [Delete](#energyservices_delete)
+- [GetByResourceGroup](#energyservices_getbyresourcegroup)
+- [List](#energyservices_list)
+- [ListByResourceGroup](#energyservices_listbyresourcegroup)
+- [Update](#energyservices_update)
+
+## Locations
+
+- [CheckNameAvailability](#locations_checknameavailability)
+
+## Operations
+
+- [List](#operations_list)
+### EnergyServices_Create
+
+```java
+/** Samples for EnergyServices Create. */
+public final class EnergyServicesCreateSamples {
+ /*
+ * x-ms-original-file: specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2021-06-01-preview/examples/OepResource_Create.json
+ */
+ /**
+ * Sample code: OepResource_Create.
+ *
+ * @param manager Entry point to OepManager.
+ */
+ public static void oepResourceCreate(com.azure.resourcemanager.oep.OepManager manager) {
+ manager
+ .energyServices()
+ .define("DummyResourceName")
+ .withRegion((String) null)
+ .withExistingResourceGroup("DummyResourceGroupName")
+ .create();
+ }
+}
+```
+
+### EnergyServices_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for EnergyServices Delete. */
+public final class EnergyServicesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2021-06-01-preview/examples/OepResource_Delete.json
+ */
+ /**
+ * Sample code: OepResource_Delete.
+ *
+ * @param manager Entry point to OepManager.
+ */
+ public static void oepResourceDelete(com.azure.resourcemanager.oep.OepManager manager) {
+ manager.energyServices().delete("DummyResourceGroupName", "DummyResourceName", Context.NONE);
+ }
+}
+```
+
+### EnergyServices_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for EnergyServices GetByResourceGroup. */
+public final class EnergyServicesGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2021-06-01-preview/examples/OepResource_Get.json
+ */
+ /**
+ * Sample code: OepResource_Get.
+ *
+ * @param manager Entry point to OepManager.
+ */
+ public static void oepResourceGet(com.azure.resourcemanager.oep.OepManager manager) {
+ manager
+ .energyServices()
+ .getByResourceGroupWithResponse("DummyResourceGroupName", "DummyResourceName", Context.NONE);
+ }
+}
+```
+
+### EnergyServices_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for EnergyServices List. */
+public final class EnergyServicesListSamples {
+ /*
+ * x-ms-original-file: specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2021-06-01-preview/examples/OepResource_ListBySubscriptionId.json
+ */
+ /**
+ * Sample code: OepResource_ListBySubscriptionId.
+ *
+ * @param manager Entry point to OepManager.
+ */
+ public static void oepResourceListBySubscriptionId(com.azure.resourcemanager.oep.OepManager manager) {
+ manager.energyServices().list(Context.NONE);
+ }
+}
+```
+
+### EnergyServices_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for EnergyServices ListByResourceGroup. */
+public final class EnergyServicesListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2021-06-01-preview/examples/OepResource_ListByResourceGroup.json
+ */
+ /**
+ * Sample code: OepResource_ListByResourceGroup.
+ *
+ * @param manager Entry point to OepManager.
+ */
+ public static void oepResourceListByResourceGroup(com.azure.resourcemanager.oep.OepManager manager) {
+ manager.energyServices().listByResourceGroup("DummyResourceGroupName", Context.NONE);
+ }
+}
+```
+
+### EnergyServices_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.oep.models.EnergyService;
+
+/** Samples for EnergyServices Update. */
+public final class EnergyServicesUpdateSamples {
+ /*
+ * x-ms-original-file: specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2021-06-01-preview/examples/OepResource_Update.json
+ */
+ /**
+ * Sample code: OepResource_Update.
+ *
+ * @param manager Entry point to OepManager.
+ */
+ public static void oepResourceUpdate(com.azure.resourcemanager.oep.OepManager manager) {
+ EnergyService resource =
+ manager
+ .energyServices()
+ .getByResourceGroupWithResponse("DummyResourceGroupName", "DummyResourceName", Context.NONE)
+ .getValue();
+ resource.update().apply();
+ }
+}
+```
+
+### Locations_CheckNameAvailability
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.oep.models.CheckNameAvailabilityRequest;
+
+/** Samples for Locations CheckNameAvailability. */
+public final class LocationsCheckNameAvailabilitySamples {
+ /*
+ * x-ms-original-file: specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2021-06-01-preview/examples/Locations_CheckNameAvailability.json
+ */
+ /**
+ * Sample code: Locations_CheckNameAvailability.
+ *
+ * @param manager Entry point to OepManager.
+ */
+ public static void locationsCheckNameAvailability(com.azure.resourcemanager.oep.OepManager manager) {
+ manager
+ .locations()
+ .checkNameAvailabilityWithResponse(
+ new CheckNameAvailabilityRequest().withName("sample-name").withType("Microsoft.OEP/oepResource"),
+ Context.NONE);
+ }
+}
+```
+
+### Operations_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Operations List. */
+public final class OperationsListSamples {
+ /*
+ * x-ms-original-file: specification/oep/resource-manager/Microsoft.OpenEnergyPlatform/preview/2021-06-01-preview/examples/Operations_List.json
+ */
+ /**
+ * Sample code: Operations_List.
+ *
+ * @param manager Entry point to OepManager.
+ */
+ public static void operationsList(com.azure.resourcemanager.oep.OepManager manager) {
+ manager.operations().listWithResponse(Context.NONE);
+ }
+}
+```
+
diff --git a/sdk/oep/azure-resourcemanager-oep/pom.xml b/sdk/oep/azure-resourcemanager-oep/pom.xml
new file mode 100644
index 0000000000000..b9f5a62762d9f
--- /dev/null
+++ b/sdk/oep/azure-resourcemanager-oep/pom.xml
@@ -0,0 +1,81 @@
+
+ 4.0.0
+
+ com.azure
+ azure-client-sdk-parent
+ 1.7.0
+ ../../parents/azure-client-sdk-parent
+
+
+ com.azure.resourcemanager
+ azure-resourcemanager-oep
+ 1.0.0-beta.1
+ jar
+
+ Microsoft Azure SDK for oep Management
+ This package contains Microsoft Azure SDK for oep Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Open Energy Platform Management Service APIs. Package tag package-2021-06-01-preview.
+ https://github.com/Azure/azure-sdk-for-java
+
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
+
+
+ https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+
+ microsoft
+ Microsoft
+
+
+
+ UTF-8
+ true
+ false
+
+
+
+
+
+ com.azure
+ azure-core
+ 1.23.1
+
+
+ com.azure
+ azure-core-management
+ 1.4.4
+
+
+
+
+
+ org.revapi
+ revapi-maven-plugin
+ 0.11.2
+
+
+
+ -
+
java.method.addedToInterface
+
+ -
+ true
+
.*
+ com\.azure\.resourcemanager(\.[^.]+)+\.fluent(\.[^.]+)*
+
+
+
+
+
+
+
+
diff --git a/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/OepManager.java b/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/OepManager.java
new file mode 100644
index 0000000000000..8c455e7e4edbc
--- /dev/null
+++ b/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/OepManager.java
@@ -0,0 +1,266 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.oep;
+
+import com.azure.core.credential.TokenCredential;
+import com.azure.core.http.HttpClient;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.HttpPipelinePosition;
+import com.azure.core.http.policy.AddDatePolicy;
+import com.azure.core.http.policy.HttpLogOptions;
+import com.azure.core.http.policy.HttpLoggingPolicy;
+import com.azure.core.http.policy.HttpPipelinePolicy;
+import com.azure.core.http.policy.HttpPolicyProviders;
+import com.azure.core.http.policy.RequestIdPolicy;
+import com.azure.core.http.policy.RetryPolicy;
+import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
+import com.azure.core.management.profile.AzureProfile;
+import com.azure.core.util.Configuration;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.oep.fluent.OpenEnergyPlatformManagementServiceAPIs;
+import com.azure.resourcemanager.oep.implementation.EnergyServicesImpl;
+import com.azure.resourcemanager.oep.implementation.LocationsImpl;
+import com.azure.resourcemanager.oep.implementation.OpenEnergyPlatformManagementServiceAPIsBuilder;
+import com.azure.resourcemanager.oep.implementation.OperationsImpl;
+import com.azure.resourcemanager.oep.models.EnergyServices;
+import com.azure.resourcemanager.oep.models.Locations;
+import com.azure.resourcemanager.oep.models.Operations;
+import java.time.Duration;
+import java.time.temporal.ChronoUnit;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+/** Entry point to OepManager. Open Energy Platform Management Service APIs. */
+public final class OepManager {
+ private Locations locations;
+
+ private EnergyServices energyServices;
+
+ private Operations operations;
+
+ private final OpenEnergyPlatformManagementServiceAPIs clientObject;
+
+ private OepManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
+ Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ this.clientObject =
+ new OpenEnergyPlatformManagementServiceAPIsBuilder()
+ .pipeline(httpPipeline)
+ .endpoint(profile.getEnvironment().getResourceManagerEndpoint())
+ .subscriptionId(profile.getSubscriptionId())
+ .defaultPollInterval(defaultPollInterval)
+ .buildClient();
+ }
+
+ /**
+ * Creates an instance of oep service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the oep service API instance.
+ */
+ public static OepManager authenticate(TokenCredential credential, AzureProfile profile) {
+ Objects.requireNonNull(credential, "'credential' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ return configure().authenticate(credential, profile);
+ }
+
+ /**
+ * Gets a Configurable instance that can be used to create OepManager with optional configuration.
+ *
+ * @return the Configurable instance allowing configurations.
+ */
+ public static Configurable configure() {
+ return new OepManager.Configurable();
+ }
+
+ /** The Configurable allowing configurations to be set. */
+ public static final class Configurable {
+ private final ClientLogger logger = new ClientLogger(Configurable.class);
+
+ private HttpClient httpClient;
+ private HttpLogOptions httpLogOptions;
+ private final List policies = new ArrayList<>();
+ private final List scopes = new ArrayList<>();
+ private RetryPolicy retryPolicy;
+ 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 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, "'retryPolicy' cannot be null.");
+ if (this.defaultPollInterval.isNegative()) {
+ throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative"));
+ }
+ return this;
+ }
+
+ /**
+ * Creates an instance of oep service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the oep service API instance.
+ */
+ public OepManager authenticate(TokenCredential credential, AzureProfile profile) {
+ Objects.requireNonNull(credential, "'credential' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+
+ StringBuilder userAgentBuilder = new StringBuilder();
+ userAgentBuilder
+ .append("azsdk-java")
+ .append("-")
+ .append("com.azure.resourcemanager.oep")
+ .append("/")
+ .append("1.0.0-beta.1");
+ if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
+ userAgentBuilder
+ .append(" (")
+ .append(Configuration.getGlobalConfiguration().get("java.version"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.name"))
+ .append("; ")
+ .append(Configuration.getGlobalConfiguration().get("os.version"))
+ .append("; auto-generated)");
+ } else {
+ userAgentBuilder.append(" (auto-generated)");
+ }
+
+ if (scopes.isEmpty()) {
+ scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
+ }
+ if (retryPolicy == null) {
+ retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
+ }
+ List policies = new ArrayList<>();
+ policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
+ policies.add(new RequestIdPolicy());
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .collect(Collectors.toList()));
+ HttpPolicyProviders.addBeforeRetryPolicies(policies);
+ policies.add(retryPolicy);
+ policies.add(new AddDatePolicy());
+ policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
+ HttpPolicyProviders.addAfterRetryPolicies(policies);
+ policies.add(new HttpLoggingPolicy(httpLogOptions));
+ HttpPipeline httpPipeline =
+ new HttpPipelineBuilder()
+ .httpClient(httpClient)
+ .policies(policies.toArray(new HttpPipelinePolicy[0]))
+ .build();
+ return new OepManager(httpPipeline, profile, defaultPollInterval);
+ }
+ }
+
+ /** @return Resource collection API of Locations. */
+ public Locations locations() {
+ if (this.locations == null) {
+ this.locations = new LocationsImpl(clientObject.getLocations(), this);
+ }
+ return locations;
+ }
+
+ /** @return Resource collection API of EnergyServices. */
+ public EnergyServices energyServices() {
+ if (this.energyServices == null) {
+ this.energyServices = new EnergyServicesImpl(clientObject.getEnergyServices(), this);
+ }
+ return energyServices;
+ }
+
+ /** @return Resource collection API of Operations. */
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(clientObject.getOperations(), this);
+ }
+ return operations;
+ }
+
+ /**
+ * @return Wrapped service client OpenEnergyPlatformManagementServiceAPIs providing direct access to the underlying
+ * auto-generated API implementation, based on Azure REST API.
+ */
+ public OpenEnergyPlatformManagementServiceAPIs serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/fluent/EnergyServicesClient.java b/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/fluent/EnergyServicesClient.java
new file mode 100644
index 0000000000000..dc7f421a6bfa4
--- /dev/null
+++ b/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/fluent/EnergyServicesClient.java
@@ -0,0 +1,243 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.oep.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.oep.fluent.models.EnergyServiceInner;
+import com.azure.resourcemanager.oep.models.EnergyResourceUpdate;
+
+/** An instance of this class provides access to all the operations defined in EnergyServicesClient. */
+public interface EnergyServicesClient {
+ /**
+ * Returns list of oep resources..
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of oep resources.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * Returns list of oep resources..
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of oep resources.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * Lists a collection of oep resources under the given Azure Subscription ID.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of oep resources.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Lists a collection of oep resources under the given Azure Subscription ID.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of oep resources.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
+ /**
+ * Returns oep resource for a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ EnergyServiceInner getByResourceGroup(String resourceGroupName, String resourceName);
+
+ /**
+ * Returns oep resource for a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String resourceName, Context context);
+
+ /**
+ * Method that gets called if subscribed for ResourceCreationBegin trigger.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @param body Request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, EnergyServiceInner> beginCreate(
+ String resourceGroupName, String resourceName, EnergyServiceInner body);
+
+ /**
+ * Method that gets called if subscribed for ResourceCreationBegin trigger.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @param body Request body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, EnergyServiceInner> beginCreate(
+ String resourceGroupName, String resourceName, EnergyServiceInner body, Context context);
+
+ /**
+ * Method that gets called if subscribed for ResourceCreationBegin trigger.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @param body Request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ EnergyServiceInner create(String resourceGroupName, String resourceName, EnergyServiceInner body);
+
+ /**
+ * Method that gets called if subscribed for ResourceCreationBegin trigger.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ EnergyServiceInner create(String resourceGroupName, String resourceName);
+
+ /**
+ * Method that gets called if subscribed for ResourceCreationBegin trigger.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @param body Request body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ EnergyServiceInner create(String resourceGroupName, String resourceName, EnergyServiceInner body, Context context);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ EnergyServiceInner update(String resourceGroupName, String resourceName);
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @param body The resource model definition used for updating a tracked ARM resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String resourceGroupName, String resourceName, EnergyResourceUpdate body, Context context);
+
+ /**
+ * Deletes oep resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName);
+
+ /**
+ * Deletes oep resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName, Context context);
+
+ /**
+ * Deletes oep resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String resourceName);
+
+ /**
+ * Deletes oep resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String resourceName, Context context);
+}
diff --git a/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/fluent/LocationsClient.java b/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/fluent/LocationsClient.java
new file mode 100644
index 0000000000000..582673ead6e16
--- /dev/null
+++ b/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/fluent/LocationsClient.java
@@ -0,0 +1,41 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.oep.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.oep.fluent.models.CheckNameAvailabilityResponseInner;
+import com.azure.resourcemanager.oep.models.CheckNameAvailabilityRequest;
+
+/** An instance of this class provides access to all the operations defined in LocationsClient. */
+public interface LocationsClient {
+ /**
+ * Checks the name availability of the resource with requested resource name.
+ *
+ * @param body NameAvailabilityRequest object.
+ * @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 check availability result.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ CheckNameAvailabilityResponseInner checkNameAvailability(CheckNameAvailabilityRequest body);
+
+ /**
+ * Checks the name availability of the resource with requested resource name.
+ *
+ * @param body NameAvailabilityRequest object.
+ * @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 check availability result.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response checkNameAvailabilityWithResponse(
+ CheckNameAvailabilityRequest body, Context context);
+}
diff --git a/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/fluent/OpenEnergyPlatformManagementServiceAPIs.java b/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/fluent/OpenEnergyPlatformManagementServiceAPIs.java
new file mode 100644
index 0000000000000..d996e73d36e97
--- /dev/null
+++ b/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/fluent/OpenEnergyPlatformManagementServiceAPIs.java
@@ -0,0 +1,67 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.oep.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/** The interface for OpenEnergyPlatformManagementServiceAPIs class. */
+public interface OpenEnergyPlatformManagementServiceAPIs {
+ /**
+ * 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 LocationsClient object to access its operations.
+ *
+ * @return the LocationsClient object.
+ */
+ LocationsClient getLocations();
+
+ /**
+ * Gets the EnergyServicesClient object to access its operations.
+ *
+ * @return the EnergyServicesClient object.
+ */
+ EnergyServicesClient getEnergyServices();
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ OperationsClient getOperations();
+}
diff --git a/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/fluent/OperationsClient.java b/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/fluent/OperationsClient.java
new file mode 100644
index 0000000000000..27434386b12ae
--- /dev/null
+++ b/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/fluent/OperationsClient.java
@@ -0,0 +1,36 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.oep.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.oep.fluent.models.OperationListResultInner;
+
+/** An instance of this class provides access to all the operations defined in OperationsClient. */
+public interface OperationsClient {
+ /**
+ * Lists the available operations of Microsoft.OpenEnergyPlatform resource 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ OperationListResultInner list();
+
+ /**
+ * Lists the available operations of Microsoft.OpenEnergyPlatform resource 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response listWithResponse(Context context);
+}
diff --git a/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/fluent/models/CheckNameAvailabilityResponseInner.java b/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/fluent/models/CheckNameAvailabilityResponseInner.java
new file mode 100644
index 0000000000000..5f3c36bb4c026
--- /dev/null
+++ b/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/fluent/models/CheckNameAvailabilityResponseInner.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.oep.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.oep.models.CheckNameAvailabilityReason;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The check availability result. */
+@Fluent
+public final class CheckNameAvailabilityResponseInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(CheckNameAvailabilityResponseInner.class);
+
+ /*
+ * Indicates if the resource name is available.
+ */
+ @JsonProperty(value = "nameAvailable")
+ private Boolean nameAvailable;
+
+ /*
+ * The reason why the given name is not available.
+ */
+ @JsonProperty(value = "reason")
+ private CheckNameAvailabilityReason reason;
+
+ /*
+ * Detailed reason why the given name is available.
+ */
+ @JsonProperty(value = "message")
+ private String message;
+
+ /**
+ * Get the nameAvailable property: Indicates if the resource name is available.
+ *
+ * @return the nameAvailable value.
+ */
+ public Boolean nameAvailable() {
+ return this.nameAvailable;
+ }
+
+ /**
+ * Set the nameAvailable property: Indicates if the resource name is available.
+ *
+ * @param nameAvailable the nameAvailable value to set.
+ * @return the CheckNameAvailabilityResponseInner object itself.
+ */
+ public CheckNameAvailabilityResponseInner withNameAvailable(Boolean nameAvailable) {
+ this.nameAvailable = nameAvailable;
+ return this;
+ }
+
+ /**
+ * Get the reason property: The reason why the given name is not available.
+ *
+ * @return the reason value.
+ */
+ public CheckNameAvailabilityReason reason() {
+ return this.reason;
+ }
+
+ /**
+ * Set the reason property: The reason why the given name is not available.
+ *
+ * @param reason the reason value to set.
+ * @return the CheckNameAvailabilityResponseInner object itself.
+ */
+ public CheckNameAvailabilityResponseInner withReason(CheckNameAvailabilityReason reason) {
+ this.reason = reason;
+ return this;
+ }
+
+ /**
+ * Get the message property: Detailed reason why the given name is available.
+ *
+ * @return the message value.
+ */
+ public String message() {
+ return this.message;
+ }
+
+ /**
+ * Set the message property: Detailed reason why the given name is available.
+ *
+ * @param message the message value to set.
+ * @return the CheckNameAvailabilityResponseInner object itself.
+ */
+ public CheckNameAvailabilityResponseInner withMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/fluent/models/EnergyServiceInner.java b/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/fluent/models/EnergyServiceInner.java
new file mode 100644
index 0000000000000..438e1b1e7a173
--- /dev/null
+++ b/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/fluent/models/EnergyServiceInner.java
@@ -0,0 +1,132 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.oep.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.oep.models.EnergyServiceProperties;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** The EnergyService model. */
+@Fluent
+public final class EnergyServiceInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(EnergyServiceInner.class);
+
+ /*
+ * The properties property.
+ */
+ @JsonProperty(value = "properties")
+ private EnergyServiceProperties properties;
+
+ /*
+ * Resource tags.
+ */
+ @JsonProperty(value = "tags")
+ @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
+ private Map tags;
+
+ /*
+ * Geo-location where the resource lives.
+ */
+ @JsonProperty(value = "location", required = true)
+ private String location;
+
+ /*
+ * Azure Resource Manager metadata containing createdBy and modifiedBy
+ * information.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /**
+ * Get the properties property: The properties property.
+ *
+ * @return the properties value.
+ */
+ public EnergyServiceProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The properties property.
+ *
+ * @param properties the properties value to set.
+ * @return the EnergyServiceInner object itself.
+ */
+ public EnergyServiceInner withProperties(EnergyServiceProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the tags property: Resource tags.
+ *
+ * @return the tags value.
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Set the tags property: Resource tags.
+ *
+ * @param tags the tags value to set.
+ * @return the EnergyServiceInner object itself.
+ */
+ public EnergyServiceInner withTags(Map tags) {
+ this.tags = tags;
+ return this;
+ }
+
+ /**
+ * Get the location property: Geo-location where the resource lives.
+ *
+ * @return the location value.
+ */
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Set the location property: Geo-location where the resource lives.
+ *
+ * @param location the location value to set.
+ * @return the EnergyServiceInner object itself.
+ */
+ public EnergyServiceInner withLocation(String location) {
+ this.location = location;
+ 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;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() != null) {
+ properties().validate();
+ }
+ if (location() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property location in model EnergyServiceInner"));
+ }
+ }
+}
diff --git a/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/fluent/models/OperationListResultInner.java b/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/fluent/models/OperationListResultInner.java
new file mode 100644
index 0000000000000..dade200583161
--- /dev/null
+++ b/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/fluent/models/OperationListResultInner.java
@@ -0,0 +1,62 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.oep.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.oep.models.Operation;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+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 OperationListResultInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationListResultInner.class);
+
+ /*
+ * List of operations supported by the resource provider
+ */
+ @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY)
+ private List value;
+
+ /*
+ * URL to get the next set of operation list results (if there are any).
+ */
+ @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY)
+ private String nextLink;
+
+ /**
+ * 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());
+ }
+ }
+}
diff --git a/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/fluent/models/package-info.java b/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/fluent/models/package-info.java
new file mode 100644
index 0000000000000..8adfeea7a0186
--- /dev/null
+++ b/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/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 OpenEnergyPlatformManagementServiceAPIs. Open Energy Platform Management
+ * Service APIs.
+ */
+package com.azure.resourcemanager.oep.fluent.models;
diff --git a/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/fluent/package-info.java b/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/fluent/package-info.java
new file mode 100644
index 0000000000000..f3f6795e6ca82
--- /dev/null
+++ b/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/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 OpenEnergyPlatformManagementServiceAPIs. Open Energy Platform Management
+ * Service APIs.
+ */
+package com.azure.resourcemanager.oep.fluent;
diff --git a/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/implementation/CheckNameAvailabilityResponseImpl.java b/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/implementation/CheckNameAvailabilityResponseImpl.java
new file mode 100644
index 0000000000000..9ec742d5b8d09
--- /dev/null
+++ b/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/implementation/CheckNameAvailabilityResponseImpl.java
@@ -0,0 +1,41 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.oep.implementation;
+
+import com.azure.resourcemanager.oep.fluent.models.CheckNameAvailabilityResponseInner;
+import com.azure.resourcemanager.oep.models.CheckNameAvailabilityReason;
+import com.azure.resourcemanager.oep.models.CheckNameAvailabilityResponse;
+
+public final class CheckNameAvailabilityResponseImpl implements CheckNameAvailabilityResponse {
+ private CheckNameAvailabilityResponseInner innerObject;
+
+ private final com.azure.resourcemanager.oep.OepManager serviceManager;
+
+ CheckNameAvailabilityResponseImpl(
+ CheckNameAvailabilityResponseInner innerObject, com.azure.resourcemanager.oep.OepManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public Boolean nameAvailable() {
+ return this.innerModel().nameAvailable();
+ }
+
+ public CheckNameAvailabilityReason reason() {
+ return this.innerModel().reason();
+ }
+
+ public String message() {
+ return this.innerModel().message();
+ }
+
+ public CheckNameAvailabilityResponseInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.oep.OepManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/implementation/EnergyServiceImpl.java b/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/implementation/EnergyServiceImpl.java
new file mode 100644
index 0000000000000..5610bda284da0
--- /dev/null
+++ b/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/implementation/EnergyServiceImpl.java
@@ -0,0 +1,186 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.oep.implementation;
+
+import com.azure.core.management.Region;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.oep.fluent.models.EnergyServiceInner;
+import com.azure.resourcemanager.oep.models.EnergyResourceUpdate;
+import com.azure.resourcemanager.oep.models.EnergyService;
+import com.azure.resourcemanager.oep.models.EnergyServiceProperties;
+import java.util.Collections;
+import java.util.Map;
+
+public final class EnergyServiceImpl implements EnergyService, EnergyService.Definition, EnergyService.Update {
+ private EnergyServiceInner innerObject;
+
+ private final com.azure.resourcemanager.oep.OepManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public EnergyServiceProperties properties() {
+ return this.innerModel().properties();
+ }
+
+ public Map tags() {
+ Map inner = this.innerModel().tags();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public String location() {
+ return this.innerModel().location();
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public EnergyServiceInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.oep.OepManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String resourceName;
+
+ private EnergyResourceUpdate updateBody;
+
+ public EnergyServiceImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public EnergyService create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getEnergyServices()
+ .create(resourceGroupName, resourceName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public EnergyService create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getEnergyServices()
+ .create(resourceGroupName, resourceName, this.innerModel(), context);
+ return this;
+ }
+
+ EnergyServiceImpl(String name, com.azure.resourcemanager.oep.OepManager serviceManager) {
+ this.innerObject = new EnergyServiceInner();
+ this.serviceManager = serviceManager;
+ this.resourceName = name;
+ }
+
+ public EnergyServiceImpl update() {
+ this.updateBody = new EnergyResourceUpdate();
+ return this;
+ }
+
+ public EnergyService apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getEnergyServices()
+ .updateWithResponse(resourceGroupName, resourceName, updateBody, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public EnergyService apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getEnergyServices()
+ .updateWithResponse(resourceGroupName, resourceName, updateBody, context)
+ .getValue();
+ return this;
+ }
+
+ EnergyServiceImpl(EnergyServiceInner innerObject, com.azure.resourcemanager.oep.OepManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.resourceName = Utils.getValueFromIdByName(innerObject.id(), "energyServices");
+ }
+
+ public EnergyService refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getEnergyServices()
+ .getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public EnergyService refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getEnergyServices()
+ .getByResourceGroupWithResponse(resourceGroupName, resourceName, context)
+ .getValue();
+ return this;
+ }
+
+ public EnergyServiceImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public EnergyServiceImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public EnergyServiceImpl withTags(Map tags) {
+ if (isInCreateMode()) {
+ this.innerModel().withTags(tags);
+ return this;
+ } else {
+ this.updateBody.withTags(tags);
+ return this;
+ }
+ }
+
+ public EnergyServiceImpl withProperties(EnergyServiceProperties properties) {
+ this.innerModel().withProperties(properties);
+ return this;
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/implementation/EnergyServicesClientImpl.java b/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/implementation/EnergyServicesClientImpl.java
new file mode 100644
index 0000000000000..bbbc2fd04c327
--- /dev/null
+++ b/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/implementation/EnergyServicesClientImpl.java
@@ -0,0 +1,1466 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.oep.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.oep.fluent.EnergyServicesClient;
+import com.azure.resourcemanager.oep.fluent.models.EnergyServiceInner;
+import com.azure.resourcemanager.oep.models.EnergyResourceUpdate;
+import com.azure.resourcemanager.oep.models.EnergyServiceList;
+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 EnergyServicesClient. */
+public final class EnergyServicesClientImpl implements EnergyServicesClient {
+ private final ClientLogger logger = new ClientLogger(EnergyServicesClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final EnergyServicesService service;
+
+ /** The service client containing this operation class. */
+ private final OpenEnergyPlatformManagementServiceAPIsImpl client;
+
+ /**
+ * Initializes an instance of EnergyServicesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ EnergyServicesClientImpl(OpenEnergyPlatformManagementServiceAPIsImpl client) {
+ this.service =
+ RestProxy.create(EnergyServicesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for OpenEnergyPlatformManagementServiceAPIsEnergyServices to be used by
+ * the proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "OpenEnergyPlatformMa")
+ private interface EnergyServicesService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OpenEnergyPlatform"
+ + "/energyServices")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.OpenEnergyPlatform/energyServices")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OpenEnergyPlatform"
+ + "/energyServices/{resourceName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("resourceName") String resourceName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OpenEnergyPlatform"
+ + "/energyServices/{resourceName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> create(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("resourceName") String resourceName,
+ @BodyParam("application/json") EnergyServiceInner body,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Patch(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OpenEnergyPlatform"
+ + "/energyServices/{resourceName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> update(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("resourceName") String resourceName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") EnergyResourceUpdate body,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OpenEnergyPlatform"
+ + "/energyServices/{resourceName}")
+ @ExpectedResponses({200, 202, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("resourceName") String resourceName,
+ @QueryParam("api-version") String apiVersion,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroupNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @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);
+ }
+
+ /**
+ * Returns list of oep resources..
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of oep resources.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ 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()));
+ }
+
+ /**
+ * Returns list of oep resources..
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of oep resources.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(
+ String resourceGroupName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Returns list of oep resources..
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of oep resources.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Returns list of oep resources..
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of oep resources.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) {
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName, context),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Returns list of oep resources..
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of oep resources.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName));
+ }
+
+ /**
+ * Returns list of oep resources..
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of oep resources.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context));
+ }
+
+ /**
+ * Lists a collection of oep resources under the given Azure Subscription ID.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of oep resources.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync() {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ 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()));
+ }
+
+ /**
+ * Lists a collection of oep resources under the given Azure Subscription ID.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of oep resources.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ this.client.getApiVersion(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Lists a collection of oep resources under the given Azure Subscription ID.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of oep resources.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Lists a collection of oep resources under the given Azure Subscription ID.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of oep resources.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Lists a collection of oep resources under the given Azure Subscription ID.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of oep resources.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * Lists a collection of oep resources under the given Azure Subscription ID.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list of oep resources.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * Returns oep resource for a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String resourceName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Returns oep resource for a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String resourceName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Returns oep resource for a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getByResourceGroupAsync(String resourceGroupName, String resourceName) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Returns oep resource for a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public EnergyServiceInner getByResourceGroup(String resourceGroupName, String resourceName) {
+ return getByResourceGroupAsync(resourceGroupName, resourceName).block();
+ }
+
+ /**
+ * Returns oep resource for a given name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String resourceName, Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, resourceName, context).block();
+ }
+
+ /**
+ * Method that gets called if subscribed for ResourceCreationBegin trigger.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @param body Request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(
+ String resourceGroupName, String resourceName, EnergyServiceInner body) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ if (body != null) {
+ body.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .create(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ body,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Method that gets called if subscribed for ResourceCreationBegin trigger.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @param body Request body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createWithResponseAsync(
+ String resourceGroupName, String resourceName, EnergyServiceInner body, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ if (body != null) {
+ body.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .create(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ body,
+ accept,
+ context);
+ }
+
+ /**
+ * Method that gets called if subscribed for ResourceCreationBegin trigger.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @param body Request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, EnergyServiceInner> beginCreateAsync(
+ String resourceGroupName, String resourceName, EnergyServiceInner body) {
+ Mono>> mono = createWithResponseAsync(resourceGroupName, resourceName, body);
+ return this
+ .client
+ .getLroResult(
+ mono,
+ this.client.getHttpPipeline(),
+ EnergyServiceInner.class,
+ EnergyServiceInner.class,
+ this.client.getContext());
+ }
+
+ /**
+ * Method that gets called if subscribed for ResourceCreationBegin trigger.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @param body Request body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, EnergyServiceInner> beginCreateAsync(
+ String resourceGroupName, String resourceName, EnergyServiceInner body, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono = createWithResponseAsync(resourceGroupName, resourceName, body, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), EnergyServiceInner.class, EnergyServiceInner.class, context);
+ }
+
+ /**
+ * Method that gets called if subscribed for ResourceCreationBegin trigger.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @param body Request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, EnergyServiceInner> beginCreate(
+ String resourceGroupName, String resourceName, EnergyServiceInner body) {
+ return beginCreateAsync(resourceGroupName, resourceName, body).getSyncPoller();
+ }
+
+ /**
+ * Method that gets called if subscribed for ResourceCreationBegin trigger.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @param body Request body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, EnergyServiceInner> beginCreate(
+ String resourceGroupName, String resourceName, EnergyServiceInner body, Context context) {
+ return beginCreateAsync(resourceGroupName, resourceName, body, context).getSyncPoller();
+ }
+
+ /**
+ * Method that gets called if subscribed for ResourceCreationBegin trigger.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @param body Request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(
+ String resourceGroupName, String resourceName, EnergyServiceInner body) {
+ return beginCreateAsync(resourceGroupName, resourceName, body)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Method that gets called if subscribed for ResourceCreationBegin trigger.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(String resourceGroupName, String resourceName) {
+ final EnergyServiceInner body = null;
+ return beginCreateAsync(resourceGroupName, resourceName, body)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Method that gets called if subscribed for ResourceCreationBegin trigger.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @param body Request body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createAsync(
+ String resourceGroupName, String resourceName, EnergyServiceInner body, Context context) {
+ return beginCreateAsync(resourceGroupName, resourceName, body, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Method that gets called if subscribed for ResourceCreationBegin trigger.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @param body Request body.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public EnergyServiceInner create(String resourceGroupName, String resourceName, EnergyServiceInner body) {
+ return createAsync(resourceGroupName, resourceName, body).block();
+ }
+
+ /**
+ * Method that gets called if subscribed for ResourceCreationBegin trigger.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public EnergyServiceInner create(String resourceGroupName, String resourceName) {
+ final EnergyServiceInner body = null;
+ return createAsync(resourceGroupName, resourceName, body).block();
+ }
+
+ /**
+ * Method that gets called if subscribed for ResourceCreationBegin trigger.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @param body Request body.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public EnergyServiceInner create(
+ String resourceGroupName, String resourceName, EnergyServiceInner body, Context context) {
+ return createAsync(resourceGroupName, resourceName, body, context).block();
+ }
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @param body The resource model definition used for updating a tracked ARM 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName, String resourceName, EnergyResourceUpdate body) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ if (body != null) {
+ body.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ this.client.getApiVersion(),
+ body,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @param body The resource model definition used for updating a tracked ARM resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName, String resourceName, EnergyResourceUpdate body, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ if (body != null) {
+ body.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ this.client.getApiVersion(),
+ body,
+ accept,
+ context);
+ }
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @param body The resource model definition used for updating a tracked ARM 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.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(
+ String resourceGroupName, String resourceName, EnergyResourceUpdate body) {
+ return updateWithResponseAsync(resourceGroupName, resourceName, body)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(String resourceGroupName, String resourceName) {
+ final EnergyResourceUpdate body = null;
+ return updateWithResponseAsync(resourceGroupName, resourceName, body)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public EnergyServiceInner update(String resourceGroupName, String resourceName) {
+ final EnergyResourceUpdate body = null;
+ return updateAsync(resourceGroupName, resourceName, body).block();
+ }
+
+ /**
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @param body The resource model definition used for updating a tracked ARM resource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response updateWithResponse(
+ String resourceGroupName, String resourceName, EnergyResourceUpdate body, Context context) {
+ return updateWithResponseAsync(resourceGroupName, resourceName, body, context).block();
+ }
+
+ /**
+ * Deletes oep resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(String resourceGroupName, String resourceName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ this.client.getApiVersion(),
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Deletes oep resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String resourceName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (resourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter resourceName is required and cannot be null."));
+ }
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ resourceName,
+ this.client.getApiVersion(),
+ context);
+ }
+
+ /**
+ * Deletes oep resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String resourceName) {
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext());
+ }
+
+ /**
+ * Deletes oep resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String resourceName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, resourceName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Deletes oep resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String resourceName) {
+ return beginDeleteAsync(resourceGroupName, resourceName).getSyncPoller();
+ }
+
+ /**
+ * Deletes oep resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName, String resourceName, Context context) {
+ return beginDeleteAsync(resourceGroupName, resourceName, context).getSyncPoller();
+ }
+
+ /**
+ * Deletes oep resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String resourceName) {
+ return beginDeleteAsync(resourceGroupName, resourceName).last().flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes oep resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String resourceName, Context context) {
+ return beginDeleteAsync(resourceGroupName, resourceName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes oep resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String resourceName) {
+ deleteAsync(resourceGroupName, resourceName).block();
+ }
+
+ /**
+ * Deletes oep resource.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param resourceName The resource name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String resourceName, Context context) {
+ deleteAsync(resourceGroupName, resourceName, context).block();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 list of oep resources.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @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 list of oep resources.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(
+ String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 list of oep resources.
+ */
+ @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 nextLink parameter.
+ * @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 list of oep resources.
+ */
+ @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/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/implementation/EnergyServicesImpl.java b/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/implementation/EnergyServicesImpl.java
new file mode 100644
index 0000000000000..b1ae5dd0eae6d
--- /dev/null
+++ b/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/implementation/EnergyServicesImpl.java
@@ -0,0 +1,174 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.oep.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.oep.fluent.EnergyServicesClient;
+import com.azure.resourcemanager.oep.fluent.models.EnergyServiceInner;
+import com.azure.resourcemanager.oep.models.EnergyService;
+import com.azure.resourcemanager.oep.models.EnergyServices;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class EnergyServicesImpl implements EnergyServices {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(EnergyServicesImpl.class);
+
+ private final EnergyServicesClient innerClient;
+
+ private final com.azure.resourcemanager.oep.OepManager serviceManager;
+
+ public EnergyServicesImpl(
+ EnergyServicesClient innerClient, com.azure.resourcemanager.oep.OepManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
+ return Utils.mapPage(inner, inner1 -> new EnergyServiceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context);
+ return Utils.mapPage(inner, inner1 -> new EnergyServiceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return Utils.mapPage(inner, inner1 -> new EnergyServiceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return Utils.mapPage(inner, inner1 -> new EnergyServiceImpl(inner1, this.manager()));
+ }
+
+ public EnergyService getByResourceGroup(String resourceGroupName, String resourceName) {
+ EnergyServiceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, resourceName);
+ if (inner != null) {
+ return new EnergyServiceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String resourceName, Context context) {
+ Response inner =
+ this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, resourceName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new EnergyServiceImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public void deleteByResourceGroup(String resourceGroupName, String resourceName) {
+ this.serviceClient().delete(resourceGroupName, resourceName);
+ }
+
+ public void delete(String resourceGroupName, String resourceName, Context context) {
+ this.serviceClient().delete(resourceGroupName, resourceName, context);
+ }
+
+ public EnergyService getById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String resourceName = Utils.getValueFromIdByName(id, "energyServices");
+ if (resourceName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'energyServices'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, resourceName, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String resourceName = Utils.getValueFromIdByName(id, "energyServices");
+ if (resourceName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'energyServices'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, resourceName, context);
+ }
+
+ public void deleteById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String resourceName = Utils.getValueFromIdByName(id, "energyServices");
+ if (resourceName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'energyServices'.", id)));
+ }
+ this.delete(resourceGroupName, resourceName, Context.NONE);
+ }
+
+ public void deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
+ }
+ String resourceName = Utils.getValueFromIdByName(id, "energyServices");
+ if (resourceName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'energyServices'.", id)));
+ }
+ this.delete(resourceGroupName, resourceName, context);
+ }
+
+ private EnergyServicesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.oep.OepManager manager() {
+ return this.serviceManager;
+ }
+
+ public EnergyServiceImpl define(String name) {
+ return new EnergyServiceImpl(name, this.manager());
+ }
+}
diff --git a/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/implementation/LocationsClientImpl.java b/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/implementation/LocationsClientImpl.java
new file mode 100644
index 0000000000000..0888c0d402461
--- /dev/null
+++ b/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/implementation/LocationsClientImpl.java
@@ -0,0 +1,196 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.oep.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.ExpectedResponses;
+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.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.oep.fluent.LocationsClient;
+import com.azure.resourcemanager.oep.fluent.models.CheckNameAvailabilityResponseInner;
+import com.azure.resourcemanager.oep.models.CheckNameAvailabilityRequest;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in LocationsClient. */
+public final class LocationsClientImpl implements LocationsClient {
+ private final ClientLogger logger = new ClientLogger(LocationsClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final LocationsService service;
+
+ /** The service client containing this operation class. */
+ private final OpenEnergyPlatformManagementServiceAPIsImpl client;
+
+ /**
+ * Initializes an instance of LocationsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ LocationsClientImpl(OpenEnergyPlatformManagementServiceAPIsImpl client) {
+ this.service =
+ RestProxy.create(LocationsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for OpenEnergyPlatformManagementServiceAPIsLocations to be used by the
+ * proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "OpenEnergyPlatformMa")
+ private interface LocationsService {
+ @Headers({"Content-Type: application/json"})
+ @Post("/subscriptions/{subscriptionId}/providers/Microsoft.OpenEnergyPlatform/checkNameAvailability")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> checkNameAvailability(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @BodyParam("application/json") CheckNameAvailabilityRequest body,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Checks the name availability of the resource with requested resource name.
+ *
+ * @param body NameAvailabilityRequest object.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 check availability result.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> checkNameAvailabilityWithResponseAsync(
+ CheckNameAvailabilityRequest body) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (body == null) {
+ return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null."));
+ } else {
+ body.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .checkNameAvailability(
+ this.client.getEndpoint(), this.client.getSubscriptionId(), body, accept, context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Checks the name availability of the resource with requested resource name.
+ *
+ * @param body NameAvailabilityRequest object.
+ * @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 check availability result.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> checkNameAvailabilityWithResponseAsync(
+ CheckNameAvailabilityRequest body, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (body == null) {
+ return Mono.error(new IllegalArgumentException("Parameter body is required and cannot be null."));
+ } else {
+ body.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .checkNameAvailability(this.client.getEndpoint(), this.client.getSubscriptionId(), body, accept, context);
+ }
+
+ /**
+ * Checks the name availability of the resource with requested resource name.
+ *
+ * @param body NameAvailabilityRequest object.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 check availability result.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono checkNameAvailabilityAsync(CheckNameAvailabilityRequest body) {
+ return checkNameAvailabilityWithResponseAsync(body)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Checks the name availability of the resource with requested resource name.
+ *
+ * @param body NameAvailabilityRequest object.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 check availability result.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public CheckNameAvailabilityResponseInner checkNameAvailability(CheckNameAvailabilityRequest body) {
+ return checkNameAvailabilityAsync(body).block();
+ }
+
+ /**
+ * Checks the name availability of the resource with requested resource name.
+ *
+ * @param body NameAvailabilityRequest object.
+ * @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 check availability result.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response checkNameAvailabilityWithResponse(
+ CheckNameAvailabilityRequest body, Context context) {
+ return checkNameAvailabilityWithResponseAsync(body, context).block();
+ }
+}
diff --git a/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/implementation/LocationsImpl.java b/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/implementation/LocationsImpl.java
new file mode 100644
index 0000000000000..8795314cd6757
--- /dev/null
+++ b/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/implementation/LocationsImpl.java
@@ -0,0 +1,61 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.oep.implementation;
+
+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.oep.fluent.LocationsClient;
+import com.azure.resourcemanager.oep.fluent.models.CheckNameAvailabilityResponseInner;
+import com.azure.resourcemanager.oep.models.CheckNameAvailabilityRequest;
+import com.azure.resourcemanager.oep.models.CheckNameAvailabilityResponse;
+import com.azure.resourcemanager.oep.models.Locations;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class LocationsImpl implements Locations {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(LocationsImpl.class);
+
+ private final LocationsClient innerClient;
+
+ private final com.azure.resourcemanager.oep.OepManager serviceManager;
+
+ public LocationsImpl(LocationsClient innerClient, com.azure.resourcemanager.oep.OepManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public CheckNameAvailabilityResponse checkNameAvailability(CheckNameAvailabilityRequest body) {
+ CheckNameAvailabilityResponseInner inner = this.serviceClient().checkNameAvailability(body);
+ if (inner != null) {
+ return new CheckNameAvailabilityResponseImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response checkNameAvailabilityWithResponse(
+ CheckNameAvailabilityRequest body, Context context) {
+ Response inner =
+ this.serviceClient().checkNameAvailabilityWithResponse(body, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new CheckNameAvailabilityResponseImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ private LocationsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.oep.OepManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/implementation/OpenEnergyPlatformManagementServiceAPIsBuilder.java b/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/implementation/OpenEnergyPlatformManagementServiceAPIsBuilder.java
new file mode 100644
index 0000000000000..f79576cbcc809
--- /dev/null
+++ b/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/implementation/OpenEnergyPlatformManagementServiceAPIsBuilder.java
@@ -0,0 +1,146 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.oep.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.CookiePolicy;
+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 OpenEnergyPlatformManagementServiceAPIsImpl type. */
+@ServiceClientBuilder(serviceClients = {OpenEnergyPlatformManagementServiceAPIsImpl.class})
+public final class OpenEnergyPlatformManagementServiceAPIsBuilder {
+ /*
+ * The ID of the target subscription.
+ */
+ private String subscriptionId;
+
+ /**
+ * Sets The ID of the target subscription.
+ *
+ * @param subscriptionId the subscriptionId value.
+ * @return the OpenEnergyPlatformManagementServiceAPIsBuilder.
+ */
+ public OpenEnergyPlatformManagementServiceAPIsBuilder subscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /*
+ * server parameter
+ */
+ private String endpoint;
+
+ /**
+ * Sets server parameter.
+ *
+ * @param endpoint the endpoint value.
+ * @return the OpenEnergyPlatformManagementServiceAPIsBuilder.
+ */
+ public OpenEnergyPlatformManagementServiceAPIsBuilder 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 OpenEnergyPlatformManagementServiceAPIsBuilder.
+ */
+ public OpenEnergyPlatformManagementServiceAPIsBuilder environment(AzureEnvironment environment) {
+ this.environment = environment;
+ 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 OpenEnergyPlatformManagementServiceAPIsBuilder.
+ */
+ public OpenEnergyPlatformManagementServiceAPIsBuilder defaultPollInterval(Duration defaultPollInterval) {
+ this.defaultPollInterval = defaultPollInterval;
+ 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 OpenEnergyPlatformManagementServiceAPIsBuilder.
+ */
+ public OpenEnergyPlatformManagementServiceAPIsBuilder pipeline(HttpPipeline pipeline) {
+ this.pipeline = pipeline;
+ 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 OpenEnergyPlatformManagementServiceAPIsBuilder.
+ */
+ public OpenEnergyPlatformManagementServiceAPIsBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
+ this.serializerAdapter = serializerAdapter;
+ return this;
+ }
+
+ /**
+ * Builds an instance of OpenEnergyPlatformManagementServiceAPIsImpl with the provided parameters.
+ *
+ * @return an instance of OpenEnergyPlatformManagementServiceAPIsImpl.
+ */
+ public OpenEnergyPlatformManagementServiceAPIsImpl buildClient() {
+ if (endpoint == null) {
+ this.endpoint = "https://management.azure.com";
+ }
+ if (environment == null) {
+ this.environment = AzureEnvironment.AZURE;
+ }
+ if (defaultPollInterval == null) {
+ this.defaultPollInterval = Duration.ofSeconds(30);
+ }
+ if (pipeline == null) {
+ this.pipeline =
+ new HttpPipelineBuilder()
+ .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy())
+ .build();
+ }
+ if (serializerAdapter == null) {
+ this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter();
+ }
+ OpenEnergyPlatformManagementServiceAPIsImpl client =
+ new OpenEnergyPlatformManagementServiceAPIsImpl(
+ pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint);
+ return client;
+ }
+}
diff --git a/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/implementation/OpenEnergyPlatformManagementServiceAPIsImpl.java b/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/implementation/OpenEnergyPlatformManagementServiceAPIsImpl.java
new file mode 100644
index 0000000000000..6b0b0dea4baef
--- /dev/null
+++ b/sdk/oep/azure-resourcemanager-oep/src/main/java/com/azure/resourcemanager/oep/implementation/OpenEnergyPlatformManagementServiceAPIsImpl.java
@@ -0,0 +1,321 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.oep.implementation;
+
+import com.azure.core.annotation.ServiceClient;
+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.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.oep.fluent.EnergyServicesClient;
+import com.azure.resourcemanager.oep.fluent.LocationsClient;
+import com.azure.resourcemanager.oep.fluent.OpenEnergyPlatformManagementServiceAPIs;
+import com.azure.resourcemanager.oep.fluent.OperationsClient;
+import java.io.IOException;
+import java.lang.reflect.Type;
+import java.nio.ByteBuffer;
+import java.nio.charset.Charset;
+import java.nio.charset.StandardCharsets;
+import java.time.Duration;
+import java.util.Map;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** Initializes a new instance of the OpenEnergyPlatformManagementServiceAPIsImpl type. */
+@ServiceClient(builder = OpenEnergyPlatformManagementServiceAPIsBuilder.class)
+public final class OpenEnergyPlatformManagementServiceAPIsImpl implements OpenEnergyPlatformManagementServiceAPIs {
+ private final ClientLogger logger = new ClientLogger(OpenEnergyPlatformManagementServiceAPIsImpl.class);
+
+ /** 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 LocationsClient object to access its operations. */
+ private final LocationsClient locations;
+
+ /**
+ * Gets the LocationsClient object to access its operations.
+ *
+ * @return the LocationsClient object.
+ */
+ public LocationsClient getLocations() {
+ return this.locations;
+ }
+
+ /** The EnergyServicesClient object to access its operations. */
+ private final EnergyServicesClient energyServices;
+
+ /**
+ * Gets the EnergyServicesClient object to access its operations.
+ *
+ * @return the EnergyServicesClient object.
+ */
+ public EnergyServicesClient getEnergyServices() {
+ return this.energyServices;
+ }
+
+ /** 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;
+ }
+
+ /**
+ * Initializes an instance of OpenEnergyPlatformManagementServiceAPIs 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.
+ */
+ OpenEnergyPlatformManagementServiceAPIsImpl(
+ 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 = "2021-06-01-preview";
+ this.locations = new LocationsClientImpl(this);
+ this.energyServices = new EnergyServicesClientImpl(this);
+ this.operations = new OperationsClientImpl(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) {
+ for (Map.Entry