diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index 5b6b5d55c0c3..387c6bb89815 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -314,6 +314,7 @@ com.azure.resourcemanager:azure-resourcemanager-security;1.0.0-beta.1;1.0.0-beta
com.azure.resourcemanager:azure-resourcemanager-azurearcdata;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-hybridnetwork;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-purview;1.0.0-beta.1;1.0.0-beta.2
+com.azure.resourcemanager:azure-resourcemanager-baremetalinfrastructure;1.0.0-beta.1;1.0.0-beta.1
# Unreleased dependencies: Copy the entry from above, prepend "unreleased_" and remove the current
# version. Unreleased dependencies are only valid for dependency versions.
diff --git a/pom.xml b/pom.xml
index b401f32c5d15..27adf9ec6d2f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -725,6 +725,7 @@
sdk/azurearcdatasdk/azurestacksdk/azurestackhci
+ sdk/baremetalinfrastructuresdk/batchsdk/batchaisdk/billing
diff --git a/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/CHANGELOG.md b/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/CHANGELOG.md
new file mode 100644
index 000000000000..852db093e3d9
--- /dev/null
+++ b/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/CHANGELOG.md
@@ -0,0 +1,5 @@
+# Release History
+
+## 1.0.0-beta.1 (2021-09-08)
+
+- Azure Resource Manager BareMetalInfrastructure client library for Java. This package contains Microsoft Azure SDK for BareMetalInfrastructure Management SDK. The BareMetalInfrastructure Management client. Package tag package-2021-08-09. 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/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/README.md b/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/README.md
new file mode 100644
index 000000000000..1d04cb9f4eb5
--- /dev/null
+++ b/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/README.md
@@ -0,0 +1,101 @@
+# Azure Resource Manager BareMetalInfrastructure client library for Java
+
+Azure Resource Manager BareMetalInfrastructure client library for Java.
+
+This package contains Microsoft Azure SDK for BareMetalInfrastructure Management SDK. The BareMetalInfrastructure Management client. Package tag package-2021-08-09. 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-baremetalinfrastructure;current})
+```xml
+
+ com.azure.resourcemanager
+ azure-resourcemanager-baremetalinfrastructure
+ 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();
+BareMetalInfrastructureManager manager = BareMetalInfrastructureManager
+ .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
+
+
+
+## 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/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/pom.xml b/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/pom.xml
new file mode 100644
index 000000000000..a7c0e596c15c
--- /dev/null
+++ b/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/pom.xml
@@ -0,0 +1,86 @@
+
+ 4.0.0
+
+ com.azure
+ azure-client-sdk-parent
+ 1.7.0
+ ../../parents/azure-client-sdk-parent
+
+
+ com.azure.resourcemanager
+ azure-resourcemanager-baremetalinfrastructure
+ 1.0.0-beta.1
+ jar
+
+ Microsoft Azure SDK for BareMetalInfrastructure Management
+ This package contains Microsoft Azure SDK for BareMetalInfrastructure Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The BareMetalInfrastructure Management client. Package tag package-2021-08-09.
+ 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
+
+
+
+
+ com.azure
+ azure-core
+ 1.20.0
+
+
+ com.azure
+ azure-core-management
+ 1.4.1
+
+
+
+
+
+ org.jacoco
+ jacoco-maven-plugin
+ 0.8.5
+
+ true
+
+
+
+ org.revapi
+ revapi-maven-plugin
+ 0.11.2
+
+
+
+
+ java.method.addedToInterface
+
+
+ true
+ .*
+ com\.azure\.resourcemanager(\.[^.]+)+\.fluent(\.[^.]+)*
+
+
+
+
+
+
+
+
diff --git a/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/src/main/java/com/azure/resourcemanager/baremetalinfrastructure/BareMetalInfrastructureManager.java b/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/src/main/java/com/azure/resourcemanager/baremetalinfrastructure/BareMetalInfrastructureManager.java
new file mode 100644
index 000000000000..e8c313d7ec1e
--- /dev/null
+++ b/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/src/main/java/com/azure/resourcemanager/baremetalinfrastructure/BareMetalInfrastructureManager.java
@@ -0,0 +1,242 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.baremetalinfrastructure;
+
+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.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.baremetalinfrastructure.fluent.BareMetalInfrastructureClient;
+import com.azure.resourcemanager.baremetalinfrastructure.implementation.AzureBareMetalInstancesImpl;
+import com.azure.resourcemanager.baremetalinfrastructure.implementation.BareMetalInfrastructureClientBuilder;
+import com.azure.resourcemanager.baremetalinfrastructure.implementation.OperationsImpl;
+import com.azure.resourcemanager.baremetalinfrastructure.models.AzureBareMetalInstances;
+import com.azure.resourcemanager.baremetalinfrastructure.models.Operations;
+import java.time.Duration;
+import java.time.temporal.ChronoUnit;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+/** Entry point to BareMetalInfrastructureManager. The BareMetalInfrastructure Management client. */
+public final class BareMetalInfrastructureManager {
+ private AzureBareMetalInstances azureBareMetalInstances;
+
+ private Operations operations;
+
+ private final BareMetalInfrastructureClient clientObject;
+
+ private BareMetalInfrastructureManager(
+ HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) {
+ Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null.");
+ Objects.requireNonNull(profile, "'profile' cannot be null.");
+ this.clientObject =
+ new BareMetalInfrastructureClientBuilder()
+ .pipeline(httpPipeline)
+ .endpoint(profile.getEnvironment().getResourceManagerEndpoint())
+ .subscriptionId(profile.getSubscriptionId())
+ .defaultPollInterval(defaultPollInterval)
+ .buildClient();
+ }
+
+ /**
+ * Creates an instance of BareMetalInfrastructure service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the BareMetalInfrastructure service API instance.
+ */
+ public static BareMetalInfrastructureManager 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 BareMetalInfrastructureManager with optional
+ * configuration.
+ *
+ * @return the Configurable instance allowing configurations.
+ */
+ public static Configurable configure() {
+ return new BareMetalInfrastructureManager.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 BareMetalInfrastructure service API entry point.
+ *
+ * @param credential the credential to use.
+ * @param profile the Azure profile for client.
+ * @return the BareMetalInfrastructure service API instance.
+ */
+ public BareMetalInfrastructureManager 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.baremetalinfrastructure")
+ .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());
+ HttpPolicyProviders.addBeforeRetryPolicies(policies);
+ policies.add(retryPolicy);
+ policies.add(new AddDatePolicy());
+ policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
+ policies.addAll(this.policies);
+ HttpPolicyProviders.addAfterRetryPolicies(policies);
+ policies.add(new HttpLoggingPolicy(httpLogOptions));
+ HttpPipeline httpPipeline =
+ new HttpPipelineBuilder()
+ .httpClient(httpClient)
+ .policies(policies.toArray(new HttpPipelinePolicy[0]))
+ .build();
+ return new BareMetalInfrastructureManager(httpPipeline, profile, defaultPollInterval);
+ }
+ }
+
+ /** @return Resource collection API of AzureBareMetalInstances. */
+ public AzureBareMetalInstances azureBareMetalInstances() {
+ if (this.azureBareMetalInstances == null) {
+ this.azureBareMetalInstances =
+ new AzureBareMetalInstancesImpl(clientObject.getAzureBareMetalInstances(), this);
+ }
+ return azureBareMetalInstances;
+ }
+
+ /** @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 BareMetalInfrastructureClient providing direct access to the underlying
+ * auto-generated API implementation, based on Azure REST API.
+ */
+ public BareMetalInfrastructureClient serviceClient() {
+ return this.clientObject;
+ }
+}
diff --git a/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/src/main/java/com/azure/resourcemanager/baremetalinfrastructure/fluent/AzureBareMetalInstancesClient.java b/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/src/main/java/com/azure/resourcemanager/baremetalinfrastructure/fluent/AzureBareMetalInstancesClient.java
new file mode 100644
index 000000000000..0ce3cabc72ad
--- /dev/null
+++ b/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/src/main/java/com/azure/resourcemanager/baremetalinfrastructure/fluent/AzureBareMetalInstancesClient.java
@@ -0,0 +1,127 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.baremetalinfrastructure.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.baremetalinfrastructure.fluent.models.AzureBareMetalInstanceInner;
+import com.azure.resourcemanager.baremetalinfrastructure.models.Tags;
+
+/** An instance of this class provides access to all the operations defined in AzureBareMetalInstancesClient. */
+public interface AzureBareMetalInstancesClient {
+ /**
+ * Gets a list of AzureBareMetal instances in the specified subscription. The operations returns various properties
+ * of each Azure BareMetal instance.
+ *
+ * @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 AzureBareMetal instances in the specified subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Gets a list of AzureBareMetal instances in the specified subscription. The operations returns various properties
+ * of each Azure BareMetal instance.
+ *
+ * @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 AzureBareMetal instances in the specified subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
+ /**
+ * Gets a list of AzureBareMetal instances in the specified subscription and resource group. The operations returns
+ * various properties of each Azure BareMetal instance.
+ *
+ * @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 a list of AzureBareMetal instances in the specified subscription and resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * Gets a list of AzureBareMetal instances in the specified subscription and resource group. The operations returns
+ * various properties of each Azure BareMetal instance.
+ *
+ * @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 a list of AzureBareMetal instances in the specified subscription and resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * Gets an Azure BareMetal instance for the specified subscription, resource group, and instance name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureBareMetalInstanceName Name of the Azure BareMetal on Azure instance.
+ * @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 an Azure BareMetal instance for the specified subscription, resource group, and instance name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AzureBareMetalInstanceInner getByResourceGroup(String resourceGroupName, String azureBareMetalInstanceName);
+
+ /**
+ * Gets an Azure BareMetal instance for the specified subscription, resource group, and instance name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureBareMetalInstanceName Name of the Azure BareMetal on Azure instance.
+ * @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 an Azure BareMetal instance for the specified subscription, resource group, and instance name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String azureBareMetalInstanceName, Context context);
+
+ /**
+ * Patches the Tags field of a Azure BareMetal instance for the specified subscription, resource group, and instance
+ * name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureBareMetalInstanceName Name of the Azure BareMetal on Azure instance.
+ * @param tagsParameter Request body that only contains the new Tags field.
+ * @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 azureBareMetal instance info on Azure (ARM properties and AzureBareMetal properties).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ AzureBareMetalInstanceInner update(String resourceGroupName, String azureBareMetalInstanceName, Tags tagsParameter);
+
+ /**
+ * Patches the Tags field of a Azure BareMetal instance for the specified subscription, resource group, and instance
+ * name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureBareMetalInstanceName Name of the Azure BareMetal on Azure instance.
+ * @param tagsParameter Request body that only contains the new Tags field.
+ * @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 azureBareMetal instance info on Azure (ARM properties and AzureBareMetal properties).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String resourceGroupName, String azureBareMetalInstanceName, Tags tagsParameter, Context context);
+}
diff --git a/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/src/main/java/com/azure/resourcemanager/baremetalinfrastructure/fluent/BareMetalInfrastructureClient.java b/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/src/main/java/com/azure/resourcemanager/baremetalinfrastructure/fluent/BareMetalInfrastructureClient.java
new file mode 100644
index 000000000000..0e679b0817ee
--- /dev/null
+++ b/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/src/main/java/com/azure/resourcemanager/baremetalinfrastructure/fluent/BareMetalInfrastructureClient.java
@@ -0,0 +1,60 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.baremetalinfrastructure.fluent;
+
+import com.azure.core.http.HttpPipeline;
+import java.time.Duration;
+
+/** The interface for BareMetalInfrastructureClient class. */
+public interface BareMetalInfrastructureClient {
+ /**
+ * 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 AzureBareMetalInstancesClient object to access its operations.
+ *
+ * @return the AzureBareMetalInstancesClient object.
+ */
+ AzureBareMetalInstancesClient getAzureBareMetalInstances();
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ OperationsClient getOperations();
+}
diff --git a/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/src/main/java/com/azure/resourcemanager/baremetalinfrastructure/fluent/OperationsClient.java b/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/src/main/java/com/azure/resourcemanager/baremetalinfrastructure/fluent/OperationsClient.java
new file mode 100644
index 000000000000..12388fb9a7f5
--- /dev/null
+++ b/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/src/main/java/com/azure/resourcemanager/baremetalinfrastructure/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.baremetalinfrastructure.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.baremetalinfrastructure.fluent.models.OperationInner;
+
+/** An instance of this class provides access to all the operations defined in OperationsClient. */
+public interface OperationsClient {
+ /**
+ * Gets a list of AzureBareMetal management operations.
+ *
+ * @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 AzureBareMetal management operations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Gets a list of AzureBareMetal management operations.
+ *
+ * @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 AzureBareMetal management operations.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+}
diff --git a/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/src/main/java/com/azure/resourcemanager/baremetalinfrastructure/fluent/models/AzureBareMetalInstanceInner.java b/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/src/main/java/com/azure/resourcemanager/baremetalinfrastructure/fluent/models/AzureBareMetalInstanceInner.java
new file mode 100644
index 000000000000..722008681ed5
--- /dev/null
+++ b/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/src/main/java/com/azure/resourcemanager/baremetalinfrastructure/fluent/models/AzureBareMetalInstanceInner.java
@@ -0,0 +1,284 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.baremetalinfrastructure.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.Resource;
+import com.azure.core.management.SystemData;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.baremetalinfrastructure.models.AzureBareMetalInstancePowerStateEnum;
+import com.azure.resourcemanager.baremetalinfrastructure.models.AzureBareMetalProvisioningStatesEnum;
+import com.azure.resourcemanager.baremetalinfrastructure.models.HardwareProfile;
+import com.azure.resourcemanager.baremetalinfrastructure.models.NetworkProfile;
+import com.azure.resourcemanager.baremetalinfrastructure.models.OSProfile;
+import com.azure.resourcemanager.baremetalinfrastructure.models.StorageProfile;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** AzureBareMetal instance info on Azure (ARM properties and AzureBareMetal properties). */
+@JsonFlatten
+@Fluent
+public class AzureBareMetalInstanceInner extends Resource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureBareMetalInstanceInner.class);
+
+ /*
+ * The system metadata relating to this resource.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /*
+ * Specifies the hardware settings for the AzureBareMetal instance.
+ */
+ @JsonProperty(value = "properties.hardwareProfile")
+ private HardwareProfile hardwareProfile;
+
+ /*
+ * Specifies the storage settings for the AzureBareMetal instance disks.
+ */
+ @JsonProperty(value = "properties.storageProfile")
+ private StorageProfile storageProfile;
+
+ /*
+ * Specifies the operating system settings for the AzureBareMetal instance.
+ */
+ @JsonProperty(value = "properties.osProfile")
+ private OSProfile osProfile;
+
+ /*
+ * Specifies the network settings for the AzureBareMetal instance.
+ */
+ @JsonProperty(value = "properties.networkProfile")
+ private NetworkProfile networkProfile;
+
+ /*
+ * Specifies the AzureBareMetal instance unique ID.
+ */
+ @JsonProperty(value = "properties.azureBareMetalInstanceId", access = JsonProperty.Access.WRITE_ONLY)
+ private String azureBareMetalInstanceId;
+
+ /*
+ * Resource power state
+ */
+ @JsonProperty(value = "properties.powerState", access = JsonProperty.Access.WRITE_ONLY)
+ private AzureBareMetalInstancePowerStateEnum powerState;
+
+ /*
+ * Resource proximity placement group
+ */
+ @JsonProperty(value = "properties.proximityPlacementGroup", access = JsonProperty.Access.WRITE_ONLY)
+ private String proximityPlacementGroup;
+
+ /*
+ * Hardware revision of an AzureBareMetal instance
+ */
+ @JsonProperty(value = "properties.hwRevision", access = JsonProperty.Access.WRITE_ONLY)
+ private String hwRevision;
+
+ /*
+ * ARM ID of another AzureBareMetalInstance that will share a network with
+ * this AzureBareMetalInstance
+ */
+ @JsonProperty(value = "properties.partnerNodeId")
+ private String partnerNodeId;
+
+ /*
+ * State of provisioning of the AzureBareMetalInstance
+ */
+ @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private AzureBareMetalProvisioningStatesEnum provisioningState;
+
+ /**
+ * Get the systemData property: The system metadata relating to this resource.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
+
+ /**
+ * Get the hardwareProfile property: Specifies the hardware settings for the AzureBareMetal instance.
+ *
+ * @return the hardwareProfile value.
+ */
+ public HardwareProfile hardwareProfile() {
+ return this.hardwareProfile;
+ }
+
+ /**
+ * Set the hardwareProfile property: Specifies the hardware settings for the AzureBareMetal instance.
+ *
+ * @param hardwareProfile the hardwareProfile value to set.
+ * @return the AzureBareMetalInstanceInner object itself.
+ */
+ public AzureBareMetalInstanceInner withHardwareProfile(HardwareProfile hardwareProfile) {
+ this.hardwareProfile = hardwareProfile;
+ return this;
+ }
+
+ /**
+ * Get the storageProfile property: Specifies the storage settings for the AzureBareMetal instance disks.
+ *
+ * @return the storageProfile value.
+ */
+ public StorageProfile storageProfile() {
+ return this.storageProfile;
+ }
+
+ /**
+ * Set the storageProfile property: Specifies the storage settings for the AzureBareMetal instance disks.
+ *
+ * @param storageProfile the storageProfile value to set.
+ * @return the AzureBareMetalInstanceInner object itself.
+ */
+ public AzureBareMetalInstanceInner withStorageProfile(StorageProfile storageProfile) {
+ this.storageProfile = storageProfile;
+ return this;
+ }
+
+ /**
+ * Get the osProfile property: Specifies the operating system settings for the AzureBareMetal instance.
+ *
+ * @return the osProfile value.
+ */
+ public OSProfile osProfile() {
+ return this.osProfile;
+ }
+
+ /**
+ * Set the osProfile property: Specifies the operating system settings for the AzureBareMetal instance.
+ *
+ * @param osProfile the osProfile value to set.
+ * @return the AzureBareMetalInstanceInner object itself.
+ */
+ public AzureBareMetalInstanceInner withOsProfile(OSProfile osProfile) {
+ this.osProfile = osProfile;
+ return this;
+ }
+
+ /**
+ * Get the networkProfile property: Specifies the network settings for the AzureBareMetal instance.
+ *
+ * @return the networkProfile value.
+ */
+ public NetworkProfile networkProfile() {
+ return this.networkProfile;
+ }
+
+ /**
+ * Set the networkProfile property: Specifies the network settings for the AzureBareMetal instance.
+ *
+ * @param networkProfile the networkProfile value to set.
+ * @return the AzureBareMetalInstanceInner object itself.
+ */
+ public AzureBareMetalInstanceInner withNetworkProfile(NetworkProfile networkProfile) {
+ this.networkProfile = networkProfile;
+ return this;
+ }
+
+ /**
+ * Get the azureBareMetalInstanceId property: Specifies the AzureBareMetal instance unique ID.
+ *
+ * @return the azureBareMetalInstanceId value.
+ */
+ public String azureBareMetalInstanceId() {
+ return this.azureBareMetalInstanceId;
+ }
+
+ /**
+ * Get the powerState property: Resource power state.
+ *
+ * @return the powerState value.
+ */
+ public AzureBareMetalInstancePowerStateEnum powerState() {
+ return this.powerState;
+ }
+
+ /**
+ * Get the proximityPlacementGroup property: Resource proximity placement group.
+ *
+ * @return the proximityPlacementGroup value.
+ */
+ public String proximityPlacementGroup() {
+ return this.proximityPlacementGroup;
+ }
+
+ /**
+ * Get the hwRevision property: Hardware revision of an AzureBareMetal instance.
+ *
+ * @return the hwRevision value.
+ */
+ public String hwRevision() {
+ return this.hwRevision;
+ }
+
+ /**
+ * Get the partnerNodeId property: ARM ID of another AzureBareMetalInstance that will share a network with this
+ * AzureBareMetalInstance.
+ *
+ * @return the partnerNodeId value.
+ */
+ public String partnerNodeId() {
+ return this.partnerNodeId;
+ }
+
+ /**
+ * Set the partnerNodeId property: ARM ID of another AzureBareMetalInstance that will share a network with this
+ * AzureBareMetalInstance.
+ *
+ * @param partnerNodeId the partnerNodeId value to set.
+ * @return the AzureBareMetalInstanceInner object itself.
+ */
+ public AzureBareMetalInstanceInner withPartnerNodeId(String partnerNodeId) {
+ this.partnerNodeId = partnerNodeId;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: State of provisioning of the AzureBareMetalInstance.
+ *
+ * @return the provisioningState value.
+ */
+ public AzureBareMetalProvisioningStatesEnum provisioningState() {
+ return this.provisioningState;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public AzureBareMetalInstanceInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public AzureBareMetalInstanceInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (hardwareProfile() != null) {
+ hardwareProfile().validate();
+ }
+ if (storageProfile() != null) {
+ storageProfile().validate();
+ }
+ if (osProfile() != null) {
+ osProfile().validate();
+ }
+ if (networkProfile() != null) {
+ networkProfile().validate();
+ }
+ }
+}
diff --git a/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/src/main/java/com/azure/resourcemanager/baremetalinfrastructure/fluent/models/OperationInner.java b/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/src/main/java/com/azure/resourcemanager/baremetalinfrastructure/fluent/models/OperationInner.java
new file mode 100644
index 000000000000..212b8e4287c3
--- /dev/null
+++ b/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/src/main/java/com/azure/resourcemanager/baremetalinfrastructure/fluent/models/OperationInner.java
@@ -0,0 +1,87 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.baremetalinfrastructure.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.baremetalinfrastructure.models.Display;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** AzureBareMetal operation information. */
+@Fluent
+public final class OperationInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class);
+
+ /*
+ * The name of the operation being performed on this particular object.
+ * This name should match the action name that appears in RBAC / the event
+ * service.
+ */
+ @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY)
+ private String name;
+
+ /*
+ * Displayed AzureBareMetal operation information
+ */
+ @JsonProperty(value = "display")
+ private Display display;
+
+ /*
+ * indicates whether an operation is a data action or not.
+ */
+ @JsonProperty(value = "isDataAction", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isDataAction;
+
+ /**
+ * Get the name property: The name of the operation being performed on this particular object. This name should
+ * match the action name that appears in RBAC / the event service.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Get the display property: Displayed AzureBareMetal operation information.
+ *
+ * @return the display value.
+ */
+ public Display display() {
+ return this.display;
+ }
+
+ /**
+ * Set the display property: Displayed AzureBareMetal operation information.
+ *
+ * @param display the display value to set.
+ * @return the OperationInner object itself.
+ */
+ public OperationInner withDisplay(Display display) {
+ this.display = display;
+ return this;
+ }
+
+ /**
+ * Get the isDataAction property: indicates whether an operation is a data action or not.
+ *
+ * @return the isDataAction value.
+ */
+ public Boolean isDataAction() {
+ return this.isDataAction;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (display() != null) {
+ display().validate();
+ }
+ }
+}
diff --git a/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/src/main/java/com/azure/resourcemanager/baremetalinfrastructure/fluent/models/package-info.java b/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/src/main/java/com/azure/resourcemanager/baremetalinfrastructure/fluent/models/package-info.java
new file mode 100644
index 000000000000..5557ef276a7c
--- /dev/null
+++ b/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/src/main/java/com/azure/resourcemanager/baremetalinfrastructure/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 BareMetalInfrastructureClient. The BareMetalInfrastructure Management
+ * client.
+ */
+package com.azure.resourcemanager.baremetalinfrastructure.fluent.models;
diff --git a/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/src/main/java/com/azure/resourcemanager/baremetalinfrastructure/fluent/package-info.java b/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/src/main/java/com/azure/resourcemanager/baremetalinfrastructure/fluent/package-info.java
new file mode 100644
index 000000000000..e4a08b47d8b1
--- /dev/null
+++ b/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/src/main/java/com/azure/resourcemanager/baremetalinfrastructure/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 BareMetalInfrastructureClient. The BareMetalInfrastructure Management
+ * client.
+ */
+package com.azure.resourcemanager.baremetalinfrastructure.fluent;
diff --git a/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/src/main/java/com/azure/resourcemanager/baremetalinfrastructure/implementation/AzureBareMetalInstanceImpl.java b/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/src/main/java/com/azure/resourcemanager/baremetalinfrastructure/implementation/AzureBareMetalInstanceImpl.java
new file mode 100644
index 000000000000..fbaa13bba9a5
--- /dev/null
+++ b/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/src/main/java/com/azure/resourcemanager/baremetalinfrastructure/implementation/AzureBareMetalInstanceImpl.java
@@ -0,0 +1,107 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.baremetalinfrastructure.implementation;
+
+import com.azure.core.management.SystemData;
+import com.azure.resourcemanager.baremetalinfrastructure.fluent.models.AzureBareMetalInstanceInner;
+import com.azure.resourcemanager.baremetalinfrastructure.models.AzureBareMetalInstance;
+import com.azure.resourcemanager.baremetalinfrastructure.models.AzureBareMetalInstancePowerStateEnum;
+import com.azure.resourcemanager.baremetalinfrastructure.models.AzureBareMetalProvisioningStatesEnum;
+import com.azure.resourcemanager.baremetalinfrastructure.models.HardwareProfile;
+import com.azure.resourcemanager.baremetalinfrastructure.models.NetworkProfile;
+import com.azure.resourcemanager.baremetalinfrastructure.models.OSProfile;
+import com.azure.resourcemanager.baremetalinfrastructure.models.StorageProfile;
+import java.util.Collections;
+import java.util.Map;
+
+public final class AzureBareMetalInstanceImpl implements AzureBareMetalInstance {
+ private AzureBareMetalInstanceInner innerObject;
+
+ private final com.azure.resourcemanager.baremetalinfrastructure.BareMetalInfrastructureManager serviceManager;
+
+ AzureBareMetalInstanceImpl(
+ AzureBareMetalInstanceInner innerObject,
+ com.azure.resourcemanager.baremetalinfrastructure.BareMetalInfrastructureManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String location() {
+ return this.innerModel().location();
+ }
+
+ public Map tags() {
+ Map inner = this.innerModel().tags();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public SystemData systemData() {
+ return this.innerModel().systemData();
+ }
+
+ public HardwareProfile hardwareProfile() {
+ return this.innerModel().hardwareProfile();
+ }
+
+ public StorageProfile storageProfile() {
+ return this.innerModel().storageProfile();
+ }
+
+ public OSProfile osProfile() {
+ return this.innerModel().osProfile();
+ }
+
+ public NetworkProfile networkProfile() {
+ return this.innerModel().networkProfile();
+ }
+
+ public String azureBareMetalInstanceId() {
+ return this.innerModel().azureBareMetalInstanceId();
+ }
+
+ public AzureBareMetalInstancePowerStateEnum powerState() {
+ return this.innerModel().powerState();
+ }
+
+ public String proximityPlacementGroup() {
+ return this.innerModel().proximityPlacementGroup();
+ }
+
+ public String hwRevision() {
+ return this.innerModel().hwRevision();
+ }
+
+ public String partnerNodeId() {
+ return this.innerModel().partnerNodeId();
+ }
+
+ public AzureBareMetalProvisioningStatesEnum provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public AzureBareMetalInstanceInner innerModel() {
+ return this.innerObject;
+ }
+
+ private com.azure.resourcemanager.baremetalinfrastructure.BareMetalInfrastructureManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/src/main/java/com/azure/resourcemanager/baremetalinfrastructure/implementation/AzureBareMetalInstancesClientImpl.java b/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/src/main/java/com/azure/resourcemanager/baremetalinfrastructure/implementation/AzureBareMetalInstancesClientImpl.java
new file mode 100644
index 000000000000..f3a572929ce4
--- /dev/null
+++ b/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/src/main/java/com/azure/resourcemanager/baremetalinfrastructure/implementation/AzureBareMetalInstancesClientImpl.java
@@ -0,0 +1,940 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.baremetalinfrastructure.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.baremetalinfrastructure.fluent.AzureBareMetalInstancesClient;
+import com.azure.resourcemanager.baremetalinfrastructure.fluent.models.AzureBareMetalInstanceInner;
+import com.azure.resourcemanager.baremetalinfrastructure.models.AzureBareMetalInstancesListResult;
+import com.azure.resourcemanager.baremetalinfrastructure.models.Tags;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in AzureBareMetalInstancesClient. */
+public final class AzureBareMetalInstancesClientImpl implements AzureBareMetalInstancesClient {
+ private final ClientLogger logger = new ClientLogger(AzureBareMetalInstancesClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final AzureBareMetalInstancesService service;
+
+ /** The service client containing this operation class. */
+ private final BareMetalInfrastructureClientImpl client;
+
+ /**
+ * Initializes an instance of AzureBareMetalInstancesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ AzureBareMetalInstancesClientImpl(BareMetalInfrastructureClientImpl client) {
+ this.service =
+ RestProxy
+ .create(AzureBareMetalInstancesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for BareMetalInfrastructureClientAzureBareMetalInstances to be used by
+ * the proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "BareMetalInfrastruct")
+ private interface AzureBareMetalInstancesService {
+ @Headers({"Content-Type: application/json"})
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.BareMetalInfrastructure/bareMetalInstances")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers"
+ + "/Microsoft.BareMetalInfrastructure/bareMetalInstances")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers"
+ + "/Microsoft.BareMetalInfrastructure/bareMetalInstances/{azureBareMetalInstanceName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("azureBareMetalInstanceName") String azureBareMetalInstanceName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Patch(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers"
+ + "/Microsoft.BareMetalInfrastructure/bareMetalInstances/{azureBareMetalInstanceName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> update(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("azureBareMetalInstanceName") String azureBareMetalInstanceName,
+ @BodyParam("application/json") Tags tagsParameter,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listBySubscriptionNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroupNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Gets a list of AzureBareMetal instances in the specified subscription. The operations returns various properties
+ * of each Azure BareMetal instance.
+ *
+ * @throws 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 AzureBareMetal instances in the specified subscription.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync() {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets a list of AzureBareMetal instances in the specified subscription. The operations returns various properties
+ * of each Azure BareMetal instance.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of AzureBareMetal instances in the specified subscription.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listSinglePageAsync(Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .list(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Gets a list of AzureBareMetal instances in the specified subscription. The operations returns various properties
+ * of each Azure BareMetal instance.
+ *
+ * @throws 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 AzureBareMetal instances in the specified subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Gets a list of AzureBareMetal instances in the specified subscription. The operations returns various properties
+ * of each Azure BareMetal instance.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of AzureBareMetal instances in the specified subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Gets a list of AzureBareMetal instances in the specified subscription. The operations returns various properties
+ * of each Azure BareMetal instance.
+ *
+ * @throws 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 AzureBareMetal instances in the specified subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * Gets a list of AzureBareMetal instances in the specified subscription. The operations returns various properties
+ * of each Azure BareMetal instance.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a list of AzureBareMetal instances in the specified subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * Gets a list of AzureBareMetal instances in the specified subscription and resource group. The operations returns
+ * various properties of each Azure BareMetal instance.
+ *
+ * @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 a list of AzureBareMetal instances in the specified subscription and resource group.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(
+ String resourceGroupName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets a list of AzureBareMetal instances in the specified subscription and resource group. The operations returns
+ * various properties of each Azure BareMetal instance.
+ *
+ * @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 a list of AzureBareMetal instances in the specified subscription and resource group.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupSinglePageAsync(
+ String resourceGroupName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Gets a list of AzureBareMetal instances in the specified subscription and resource group. The operations returns
+ * various properties of each Azure BareMetal instance.
+ *
+ * @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 a list of AzureBareMetal instances in the specified subscription and resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Gets a list of AzureBareMetal instances in the specified subscription and resource group. The operations returns
+ * various properties of each Azure BareMetal instance.
+ *
+ * @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 a list of AzureBareMetal instances in the specified subscription and resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) {
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName, context),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Gets a list of AzureBareMetal instances in the specified subscription and resource group. The operations returns
+ * various properties of each Azure BareMetal instance.
+ *
+ * @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 a list of AzureBareMetal instances in the specified subscription and resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName));
+ }
+
+ /**
+ * Gets a list of AzureBareMetal instances in the specified subscription and resource group. The operations returns
+ * various properties of each Azure BareMetal instance.
+ *
+ * @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 a list of AzureBareMetal instances in the specified subscription and resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context));
+ }
+
+ /**
+ * Gets an Azure BareMetal instance for the specified subscription, resource group, and instance name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureBareMetalInstanceName Name of the Azure BareMetal on Azure instance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure BareMetal instance for the specified subscription, resource group, and instance name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String azureBareMetalInstanceName) {
+ 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 (azureBareMetalInstanceName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter azureBareMetalInstanceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ azureBareMetalInstanceName,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Gets an Azure BareMetal instance for the specified subscription, resource group, and instance name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureBareMetalInstanceName Name of the Azure BareMetal on Azure instance.
+ * @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 an Azure BareMetal instance for the specified subscription, resource group, and instance name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String azureBareMetalInstanceName, 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 (azureBareMetalInstanceName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter azureBareMetalInstanceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ azureBareMetalInstanceName,
+ accept,
+ context);
+ }
+
+ /**
+ * Gets an Azure BareMetal instance for the specified subscription, resource group, and instance name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureBareMetalInstanceName Name of the Azure BareMetal on Azure instance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure BareMetal instance for the specified subscription, resource group, and instance name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getByResourceGroupAsync(
+ String resourceGroupName, String azureBareMetalInstanceName) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, azureBareMetalInstanceName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Gets an Azure BareMetal instance for the specified subscription, resource group, and instance name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureBareMetalInstanceName Name of the Azure BareMetal on Azure instance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return an Azure BareMetal instance for the specified subscription, resource group, and instance name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AzureBareMetalInstanceInner getByResourceGroup(String resourceGroupName, String azureBareMetalInstanceName) {
+ return getByResourceGroupAsync(resourceGroupName, azureBareMetalInstanceName).block();
+ }
+
+ /**
+ * Gets an Azure BareMetal instance for the specified subscription, resource group, and instance name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureBareMetalInstanceName Name of the Azure BareMetal on Azure instance.
+ * @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 an Azure BareMetal instance for the specified subscription, resource group, and instance name.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String azureBareMetalInstanceName, Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, azureBareMetalInstanceName, context).block();
+ }
+
+ /**
+ * Patches the Tags field of a Azure BareMetal instance for the specified subscription, resource group, and instance
+ * name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureBareMetalInstanceName Name of the Azure BareMetal on Azure instance.
+ * @param tagsParameter Request body that only contains the new Tags field.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return azureBareMetal instance info on Azure (ARM properties and AzureBareMetal properties).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName, String azureBareMetalInstanceName, Tags tagsParameter) {
+ 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 (azureBareMetalInstanceName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter azureBareMetalInstanceName is required and cannot be null."));
+ }
+ if (tagsParameter == null) {
+ return Mono.error(new IllegalArgumentException("Parameter tagsParameter is required and cannot be null."));
+ } else {
+ tagsParameter.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ azureBareMetalInstanceName,
+ tagsParameter,
+ accept,
+ context))
+ .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
+ }
+
+ /**
+ * Patches the Tags field of a Azure BareMetal instance for the specified subscription, resource group, and instance
+ * name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureBareMetalInstanceName Name of the Azure BareMetal on Azure instance.
+ * @param tagsParameter Request body that only contains the new Tags field.
+ * @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 azureBareMetal instance info on Azure (ARM properties and AzureBareMetal properties).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName, String azureBareMetalInstanceName, Tags tagsParameter, 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 (azureBareMetalInstanceName == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter azureBareMetalInstanceName is required and cannot be null."));
+ }
+ if (tagsParameter == null) {
+ return Mono.error(new IllegalArgumentException("Parameter tagsParameter is required and cannot be null."));
+ } else {
+ tagsParameter.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .update(
+ this.client.getEndpoint(),
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ azureBareMetalInstanceName,
+ tagsParameter,
+ accept,
+ context);
+ }
+
+ /**
+ * Patches the Tags field of a Azure BareMetal instance for the specified subscription, resource group, and instance
+ * name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureBareMetalInstanceName Name of the Azure BareMetal on Azure instance.
+ * @param tagsParameter Request body that only contains the new Tags field.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return azureBareMetal instance info on Azure (ARM properties and AzureBareMetal properties).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(
+ String resourceGroupName, String azureBareMetalInstanceName, Tags tagsParameter) {
+ return updateWithResponseAsync(resourceGroupName, azureBareMetalInstanceName, tagsParameter)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Patches the Tags field of a Azure BareMetal instance for the specified subscription, resource group, and instance
+ * name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureBareMetalInstanceName Name of the Azure BareMetal on Azure instance.
+ * @param tagsParameter Request body that only contains the new Tags field.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return azureBareMetal instance info on Azure (ARM properties and AzureBareMetal properties).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AzureBareMetalInstanceInner update(
+ String resourceGroupName, String azureBareMetalInstanceName, Tags tagsParameter) {
+ return updateAsync(resourceGroupName, azureBareMetalInstanceName, tagsParameter).block();
+ }
+
+ /**
+ * Patches the Tags field of a Azure BareMetal instance for the specified subscription, resource group, and instance
+ * name.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param azureBareMetalInstanceName Name of the Azure BareMetal on Azure instance.
+ * @param tagsParameter Request body that only contains the new Tags field.
+ * @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 azureBareMetal instance info on Azure (ARM properties and AzureBareMetal properties).
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response updateWithResponse(
+ String resourceGroupName, String azureBareMetalInstanceName, Tags tagsParameter, Context context) {
+ return updateWithResponseAsync(resourceGroupName, azureBareMetalInstanceName, tagsParameter, 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 response from the List AzureBareMetal Instances operation.
+ */
+ @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 response from the List AzureBareMetal Instances operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listBySubscriptionNextSinglePageAsync(
+ String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The 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 response from the List AzureBareMetal Instances operation.
+ */
+ @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 response from the List AzureBareMetal Instances operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(
+ String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/src/main/java/com/azure/resourcemanager/baremetalinfrastructure/implementation/AzureBareMetalInstancesImpl.java b/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/src/main/java/com/azure/resourcemanager/baremetalinfrastructure/implementation/AzureBareMetalInstancesImpl.java
new file mode 100644
index 000000000000..63d85d2dffe7
--- /dev/null
+++ b/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/src/main/java/com/azure/resourcemanager/baremetalinfrastructure/implementation/AzureBareMetalInstancesImpl.java
@@ -0,0 +1,114 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.baremetalinfrastructure.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.baremetalinfrastructure.fluent.AzureBareMetalInstancesClient;
+import com.azure.resourcemanager.baremetalinfrastructure.fluent.models.AzureBareMetalInstanceInner;
+import com.azure.resourcemanager.baremetalinfrastructure.models.AzureBareMetalInstance;
+import com.azure.resourcemanager.baremetalinfrastructure.models.AzureBareMetalInstances;
+import com.azure.resourcemanager.baremetalinfrastructure.models.Tags;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class AzureBareMetalInstancesImpl implements AzureBareMetalInstances {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureBareMetalInstancesImpl.class);
+
+ private final AzureBareMetalInstancesClient innerClient;
+
+ private final com.azure.resourcemanager.baremetalinfrastructure.BareMetalInfrastructureManager serviceManager;
+
+ public AzureBareMetalInstancesImpl(
+ AzureBareMetalInstancesClient innerClient,
+ com.azure.resourcemanager.baremetalinfrastructure.BareMetalInfrastructureManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return Utils.mapPage(inner, inner1 -> new AzureBareMetalInstanceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return Utils.mapPage(inner, inner1 -> new AzureBareMetalInstanceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
+ return Utils.mapPage(inner, inner1 -> new AzureBareMetalInstanceImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ PagedIterable inner =
+ this.serviceClient().listByResourceGroup(resourceGroupName, context);
+ return Utils.mapPage(inner, inner1 -> new AzureBareMetalInstanceImpl(inner1, this.manager()));
+ }
+
+ public AzureBareMetalInstance getByResourceGroup(String resourceGroupName, String azureBareMetalInstanceName) {
+ AzureBareMetalInstanceInner inner =
+ this.serviceClient().getByResourceGroup(resourceGroupName, azureBareMetalInstanceName);
+ if (inner != null) {
+ return new AzureBareMetalInstanceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String azureBareMetalInstanceName, Context context) {
+ Response inner =
+ this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, azureBareMetalInstanceName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new AzureBareMetalInstanceImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public AzureBareMetalInstance update(
+ String resourceGroupName, String azureBareMetalInstanceName, Tags tagsParameter) {
+ AzureBareMetalInstanceInner inner =
+ this.serviceClient().update(resourceGroupName, azureBareMetalInstanceName, tagsParameter);
+ if (inner != null) {
+ return new AzureBareMetalInstanceImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response updateWithResponse(
+ String resourceGroupName, String azureBareMetalInstanceName, Tags tagsParameter, Context context) {
+ Response inner =
+ this
+ .serviceClient()
+ .updateWithResponse(resourceGroupName, azureBareMetalInstanceName, tagsParameter, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new AzureBareMetalInstanceImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ private AzureBareMetalInstancesClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private com.azure.resourcemanager.baremetalinfrastructure.BareMetalInfrastructureManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/src/main/java/com/azure/resourcemanager/baremetalinfrastructure/implementation/BareMetalInfrastructureClientBuilder.java b/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/src/main/java/com/azure/resourcemanager/baremetalinfrastructure/implementation/BareMetalInfrastructureClientBuilder.java
new file mode 100644
index 000000000000..41946c35c425
--- /dev/null
+++ b/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/src/main/java/com/azure/resourcemanager/baremetalinfrastructure/implementation/BareMetalInfrastructureClientBuilder.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.baremetalinfrastructure.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 BareMetalInfrastructureClientImpl type. */
+@ServiceClientBuilder(serviceClients = {BareMetalInfrastructureClientImpl.class})
+public final class BareMetalInfrastructureClientBuilder {
+ /*
+ * The ID of the target subscription.
+ */
+ private String subscriptionId;
+
+ /**
+ * Sets The ID of the target subscription.
+ *
+ * @param subscriptionId the subscriptionId value.
+ * @return the BareMetalInfrastructureClientBuilder.
+ */
+ public BareMetalInfrastructureClientBuilder subscriptionId(String subscriptionId) {
+ this.subscriptionId = subscriptionId;
+ return this;
+ }
+
+ /*
+ * server parameter
+ */
+ private String endpoint;
+
+ /**
+ * Sets server parameter.
+ *
+ * @param endpoint the endpoint value.
+ * @return the BareMetalInfrastructureClientBuilder.
+ */
+ public BareMetalInfrastructureClientBuilder 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 BareMetalInfrastructureClientBuilder.
+ */
+ public BareMetalInfrastructureClientBuilder 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 BareMetalInfrastructureClientBuilder.
+ */
+ public BareMetalInfrastructureClientBuilder 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 BareMetalInfrastructureClientBuilder.
+ */
+ public BareMetalInfrastructureClientBuilder 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 BareMetalInfrastructureClientBuilder.
+ */
+ public BareMetalInfrastructureClientBuilder serializerAdapter(SerializerAdapter serializerAdapter) {
+ this.serializerAdapter = serializerAdapter;
+ return this;
+ }
+
+ /**
+ * Builds an instance of BareMetalInfrastructureClientImpl with the provided parameters.
+ *
+ * @return an instance of BareMetalInfrastructureClientImpl.
+ */
+ public BareMetalInfrastructureClientImpl 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();
+ }
+ BareMetalInfrastructureClientImpl client =
+ new BareMetalInfrastructureClientImpl(
+ pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint);
+ return client;
+ }
+}
diff --git a/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/src/main/java/com/azure/resourcemanager/baremetalinfrastructure/implementation/BareMetalInfrastructureClientImpl.java b/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/src/main/java/com/azure/resourcemanager/baremetalinfrastructure/implementation/BareMetalInfrastructureClientImpl.java
new file mode 100644
index 000000000000..84836702d882
--- /dev/null
+++ b/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/src/main/java/com/azure/resourcemanager/baremetalinfrastructure/implementation/BareMetalInfrastructureClientImpl.java
@@ -0,0 +1,307 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.baremetalinfrastructure.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.baremetalinfrastructure.fluent.AzureBareMetalInstancesClient;
+import com.azure.resourcemanager.baremetalinfrastructure.fluent.BareMetalInfrastructureClient;
+import com.azure.resourcemanager.baremetalinfrastructure.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 BareMetalInfrastructureClientImpl type. */
+@ServiceClient(builder = BareMetalInfrastructureClientBuilder.class)
+public final class BareMetalInfrastructureClientImpl implements BareMetalInfrastructureClient {
+ private final ClientLogger logger = new ClientLogger(BareMetalInfrastructureClientImpl.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 AzureBareMetalInstancesClient object to access its operations. */
+ private final AzureBareMetalInstancesClient azureBareMetalInstances;
+
+ /**
+ * Gets the AzureBareMetalInstancesClient object to access its operations.
+ *
+ * @return the AzureBareMetalInstancesClient object.
+ */
+ public AzureBareMetalInstancesClient getAzureBareMetalInstances() {
+ return this.azureBareMetalInstances;
+ }
+
+ /** 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 BareMetalInfrastructureClient 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.
+ */
+ BareMetalInfrastructureClientImpl(
+ 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-08-09";
+ this.azureBareMetalInstances = new AzureBareMetalInstancesClientImpl(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