list(String resourceGroupName, String workspaceName, Context context);
+}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/WorkspacePurgesClient.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/WorkspacePurgesClient.java
new file mode 100644
index 000000000000..bda23fb4fe2a
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/WorkspacePurgesClient.java
@@ -0,0 +1,86 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loganalytics.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.loganalytics.fluent.models.WorkspacePurgeResponseInner;
+import com.azure.resourcemanager.loganalytics.fluent.models.WorkspacePurgeStatusResponseInner;
+import com.azure.resourcemanager.loganalytics.models.WorkspacePurgeBody;
+
+/** An instance of this class provides access to all the operations defined in WorkspacePurgesClient. */
+public interface WorkspacePurgesClient {
+ /**
+ * Purges data in an Log Analytics workspace by a set of user-defined filters.
+ *
+ * In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch
+ * the execution of purge requests by sending a single command whose predicate includes all user identities that
+ * require purging. Use the in operator to specify multiple identities. You should run the query prior to using for
+ * a purge request to verify that the results are expected.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param body Describes the body of a request to purge data in a single table of an Log Analytics Workspace.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return response containing operationId for a specific purge action.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ WorkspacePurgeResponseInner purge(String resourceGroupName, String workspaceName, WorkspacePurgeBody body);
+
+ /**
+ * Purges data in an Log Analytics workspace by a set of user-defined filters.
+ *
+ *
In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch
+ * the execution of purge requests by sending a single command whose predicate includes all user identities that
+ * require purging. Use the in operator to specify multiple identities. You should run the query prior to using for
+ * a purge request to verify that the results are expected.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param body Describes the body of a request to purge data in a single table of an Log Analytics Workspace.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return response containing operationId for a specific purge action.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response purgeWithResponse(
+ String resourceGroupName, String workspaceName, WorkspacePurgeBody body, Context context);
+
+ /**
+ * Gets status of an ongoing purge operation.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param purgeId In a purge status request, this is the Id of the operation the status of which is returned.
+ * @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 status of an ongoing purge operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ WorkspacePurgeStatusResponseInner getPurgeStatus(String resourceGroupName, String workspaceName, String purgeId);
+
+ /**
+ * Gets status of an ongoing purge operation.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param purgeId In a purge status request, this is the Id of the operation the status of which is returned.
+ * @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 status of an ongoing purge operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getPurgeStatusWithResponse(
+ String resourceGroupName, String workspaceName, String purgeId, Context context);
+}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/WorkspacesClient.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/WorkspacesClient.java
new file mode 100644
index 000000000000..e73903b64ee2
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/WorkspacesClient.java
@@ -0,0 +1,267 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loganalytics.fluent;
+
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.Response;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.loganalytics.fluent.models.WorkspaceInner;
+import com.azure.resourcemanager.loganalytics.models.WorkspacePatch;
+
+/** An instance of this class provides access to all the operations defined in WorkspacesClient. */
+public interface WorkspacesClient {
+ /**
+ * Gets the workspaces in a subscription.
+ *
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the workspaces in a subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list();
+
+ /**
+ * Gets the workspaces in a subscription.
+ *
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the workspaces in a subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable list(Context context);
+
+ /**
+ * Gets workspaces in a resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return workspaces in a resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName);
+
+ /**
+ * Gets workspaces in a resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return workspaces in a resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ PagedIterable listByResourceGroup(String resourceGroupName, Context context);
+
+ /**
+ * Create or update a workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param parameters The parameters required to create or update a workspace.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the top level Workspace resource container.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, WorkspaceInner> beginCreateOrUpdate(
+ String resourceGroupName, String workspaceName, WorkspaceInner parameters);
+
+ /**
+ * Create or update a workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param parameters The parameters required to create or update a workspace.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the top level Workspace resource container.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, WorkspaceInner> beginCreateOrUpdate(
+ String resourceGroupName, String workspaceName, WorkspaceInner parameters, Context context);
+
+ /**
+ * Create or update a workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param parameters The parameters required to create or update a workspace.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the top level Workspace resource container.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ WorkspaceInner createOrUpdate(String resourceGroupName, String workspaceName, WorkspaceInner parameters);
+
+ /**
+ * Create or update a workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param parameters The parameters required to create or update a workspace.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the top level Workspace resource container.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ WorkspaceInner createOrUpdate(
+ String resourceGroupName, String workspaceName, WorkspaceInner parameters, Context context);
+
+ /**
+ * Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same
+ * subscription, resource group and location. The name is kept for 14 days and cannot be used for another workspace.
+ * To remove the workspace completely and release the name, use the force flag.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param force Deletes the workspace without the recovery option. A workspace that was deleted with this flag
+ * cannot be recovered.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, Boolean force);
+
+ /**
+ * Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same
+ * subscription, resource group and location. The name is kept for 14 days and cannot be used for another workspace.
+ * To remove the workspace completely and release the name, use the force flag.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param force Deletes the workspace without the recovery option. A workspace that was deleted with this flag
+ * cannot be recovered.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String workspaceName, Boolean force, Context context);
+
+ /**
+ * Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same
+ * subscription, resource group and location. The name is kept for 14 days and cannot be used for another workspace.
+ * To remove the workspace completely and release the name, use the force flag.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param force Deletes the workspace without the recovery option. A workspace that was deleted with this flag
+ * cannot be recovered.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String workspaceName, Boolean force);
+
+ /**
+ * Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same
+ * subscription, resource group and location. The name is kept for 14 days and cannot be used for another workspace.
+ * To remove the workspace completely and release the name, use the force flag.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String workspaceName);
+
+ /**
+ * Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same
+ * subscription, resource group and location. The name is kept for 14 days and cannot be used for another workspace.
+ * To remove the workspace completely and release the name, use the force flag.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param force Deletes the workspace without the recovery option. A workspace that was deleted with this flag
+ * cannot be recovered.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ void delete(String resourceGroupName, String workspaceName, Boolean force, Context context);
+
+ /**
+ * Gets a workspace instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @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 workspace instance.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ WorkspaceInner getByResourceGroup(String resourceGroupName, String workspaceName);
+
+ /**
+ * Gets a workspace instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @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 workspace instance.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response getByResourceGroupWithResponse(
+ String resourceGroupName, String workspaceName, Context context);
+
+ /**
+ * Updates a workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param parameters The parameters required to patch a workspace.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the top level Workspace resource container.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspacePatch parameters);
+
+ /**
+ * Updates a workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param parameters The parameters required to patch a workspace.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the top level Workspace resource container.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response updateWithResponse(
+ String resourceGroupName, String workspaceName, WorkspacePatch parameters, Context context);
+}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/AvailableServiceTierInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/AvailableServiceTierInner.java
new file mode 100644
index 000000000000..dfa21413205f
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/AvailableServiceTierInner.java
@@ -0,0 +1,134 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loganalytics.fluent.models;
+
+import com.azure.core.annotation.Immutable;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.loganalytics.models.SkuNameEnum;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Service Tier details. */
+@Immutable
+public final class AvailableServiceTierInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(AvailableServiceTierInner.class);
+
+ /*
+ * The name of the Service Tier.
+ */
+ @JsonProperty(value = "serviceTier", access = JsonProperty.Access.WRITE_ONLY)
+ private SkuNameEnum serviceTier;
+
+ /*
+ * True if the Service Tier is enabled for the workspace.
+ */
+ @JsonProperty(value = "enabled", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean enabled;
+
+ /*
+ * The minimum retention for the Service Tier, in days.
+ */
+ @JsonProperty(value = "minimumRetention", access = JsonProperty.Access.WRITE_ONLY)
+ private Long minimumRetention;
+
+ /*
+ * The maximum retention for the Service Tier, in days.
+ */
+ @JsonProperty(value = "maximumRetention", access = JsonProperty.Access.WRITE_ONLY)
+ private Long maximumRetention;
+
+ /*
+ * The default retention for the Service Tier, in days.
+ */
+ @JsonProperty(value = "defaultRetention", access = JsonProperty.Access.WRITE_ONLY)
+ private Long defaultRetention;
+
+ /*
+ * The capacity reservation level in GB per day. Returned for the Capacity
+ * Reservation Service Tier.
+ */
+ @JsonProperty(value = "capacityReservationLevel", access = JsonProperty.Access.WRITE_ONLY)
+ private Long capacityReservationLevel;
+
+ /*
+ * Time when the sku was last updated for the workspace. Returned for the
+ * Capacity Reservation Service Tier.
+ */
+ @JsonProperty(value = "lastSkuUpdate", access = JsonProperty.Access.WRITE_ONLY)
+ private String lastSkuUpdate;
+
+ /**
+ * Get the serviceTier property: The name of the Service Tier.
+ *
+ * @return the serviceTier value.
+ */
+ public SkuNameEnum serviceTier() {
+ return this.serviceTier;
+ }
+
+ /**
+ * Get the enabled property: True if the Service Tier is enabled for the workspace.
+ *
+ * @return the enabled value.
+ */
+ public Boolean enabled() {
+ return this.enabled;
+ }
+
+ /**
+ * Get the minimumRetention property: The minimum retention for the Service Tier, in days.
+ *
+ * @return the minimumRetention value.
+ */
+ public Long minimumRetention() {
+ return this.minimumRetention;
+ }
+
+ /**
+ * Get the maximumRetention property: The maximum retention for the Service Tier, in days.
+ *
+ * @return the maximumRetention value.
+ */
+ public Long maximumRetention() {
+ return this.maximumRetention;
+ }
+
+ /**
+ * Get the defaultRetention property: The default retention for the Service Tier, in days.
+ *
+ * @return the defaultRetention value.
+ */
+ public Long defaultRetention() {
+ return this.defaultRetention;
+ }
+
+ /**
+ * Get the capacityReservationLevel property: The capacity reservation level in GB per day. Returned for the
+ * Capacity Reservation Service Tier.
+ *
+ * @return the capacityReservationLevel value.
+ */
+ public Long capacityReservationLevel() {
+ return this.capacityReservationLevel;
+ }
+
+ /**
+ * Get the lastSkuUpdate property: Time when the sku was last updated for the workspace. Returned for the Capacity
+ * Reservation Service Tier.
+ *
+ * @return the lastSkuUpdate value.
+ */
+ public String lastSkuUpdate() {
+ return this.lastSkuUpdate;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/ClusterInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/ClusterInner.java
new file mode 100644
index 000000000000..d5bc163290d3
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/ClusterInner.java
@@ -0,0 +1,189 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loganalytics.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.Resource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.loganalytics.models.ClusterEntityStatus;
+import com.azure.resourcemanager.loganalytics.models.ClusterSku;
+import com.azure.resourcemanager.loganalytics.models.Identity;
+import com.azure.resourcemanager.loganalytics.models.KeyVaultProperties;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** The top level Log Analytics cluster resource container. */
+@JsonFlatten
+@Fluent
+public class ClusterInner extends Resource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterInner.class);
+
+ /*
+ * The identity of the resource.
+ */
+ @JsonProperty(value = "identity")
+ private Identity identity;
+
+ /*
+ * The sku properties.
+ */
+ @JsonProperty(value = "sku")
+ private ClusterSku sku;
+
+ /*
+ * The link used to get the next page of recommendations.
+ */
+ @JsonProperty(value = "properties.nextLink")
+ private String nextLink;
+
+ /*
+ * The ID associated with the cluster.
+ */
+ @JsonProperty(value = "properties.clusterId", access = JsonProperty.Access.WRITE_ONLY)
+ private String clusterId;
+
+ /*
+ * The provisioning state of the cluster.
+ */
+ @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ClusterEntityStatus provisioningState;
+
+ /*
+ * The associated key properties.
+ */
+ @JsonProperty(value = "properties.keyVaultProperties")
+ private KeyVaultProperties keyVaultProperties;
+
+ /**
+ * Get the identity property: The identity of the resource.
+ *
+ * @return the identity value.
+ */
+ public Identity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: The identity of the resource.
+ *
+ * @param identity the identity value to set.
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withIdentity(Identity identity) {
+ this.identity = identity;
+ return this;
+ }
+
+ /**
+ * Get the sku property: The sku properties.
+ *
+ * @return the sku value.
+ */
+ public ClusterSku sku() {
+ return this.sku;
+ }
+
+ /**
+ * Set the sku property: The sku properties.
+ *
+ * @param sku the sku value to set.
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withSku(ClusterSku sku) {
+ this.sku = sku;
+ return this;
+ }
+
+ /**
+ * Get the nextLink property: The link used to get the next page of recommendations.
+ *
+ * @return the nextLink value.
+ */
+ public String nextLink() {
+ return this.nextLink;
+ }
+
+ /**
+ * Set the nextLink property: The link used to get the next page of recommendations.
+ *
+ * @param nextLink the nextLink value to set.
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withNextLink(String nextLink) {
+ this.nextLink = nextLink;
+ return this;
+ }
+
+ /**
+ * Get the clusterId property: The ID associated with the cluster.
+ *
+ * @return the clusterId value.
+ */
+ public String clusterId() {
+ return this.clusterId;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of the cluster.
+ *
+ * @return the provisioningState value.
+ */
+ public ClusterEntityStatus provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Get the keyVaultProperties property: The associated key properties.
+ *
+ * @return the keyVaultProperties value.
+ */
+ public KeyVaultProperties keyVaultProperties() {
+ return this.keyVaultProperties;
+ }
+
+ /**
+ * Set the keyVaultProperties property: The associated key properties.
+ *
+ * @param keyVaultProperties the keyVaultProperties value to set.
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withKeyVaultProperties(KeyVaultProperties keyVaultProperties) {
+ this.keyVaultProperties = keyVaultProperties;
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public ClusterInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public ClusterInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (identity() != null) {
+ identity().validate();
+ }
+ if (sku() != null) {
+ sku().validate();
+ }
+ if (keyVaultProperties() != null) {
+ keyVaultProperties().validate();
+ }
+ }
+}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/DataExportInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/DataExportInner.java
new file mode 100644
index 000000000000..293aa39a13ea
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/DataExportInner.java
@@ -0,0 +1,232 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loganalytics.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.loganalytics.models.Type;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** The top level data export resource container. */
+@JsonFlatten
+@Fluent
+public class DataExportInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(DataExportInner.class);
+
+ /*
+ * The data export rule ID.
+ */
+ @JsonProperty(value = "properties.dataExportId")
+ private String dataExportId;
+
+ /*
+ * An array of tables to export, for example: [“Heartbeat, SecurityEvent”].
+ */
+ @JsonProperty(value = "properties.tableNames")
+ private List tableNames;
+
+ /*
+ * Active when enabled.
+ */
+ @JsonProperty(value = "properties.enable")
+ private Boolean enable;
+
+ /*
+ * The latest data export rule modification time.
+ */
+ @JsonProperty(value = "properties.createdDate")
+ private String createdDate;
+
+ /*
+ * Date and time when the export was last modified.
+ */
+ @JsonProperty(value = "properties.lastModifiedDate")
+ private String lastModifiedDate;
+
+ /*
+ * The destination resource ID. This can be copied from the Properties
+ * entry of the destination resource in Azure.
+ */
+ @JsonProperty(value = "properties.destination.resourceId")
+ private String resourceId;
+
+ /*
+ * The type of the destination resource
+ */
+ @JsonProperty(value = "properties.destination.type", access = JsonProperty.Access.WRITE_ONLY)
+ private Type typePropertiesDestinationType;
+
+ /*
+ * Optional. Allows to define an Event Hub name. Not applicable when
+ * destination is Storage Account.
+ */
+ @JsonProperty(value = "properties.destination.metaData.eventHubName")
+ private String eventHubName;
+
+ /**
+ * Get the dataExportId property: The data export rule ID.
+ *
+ * @return the dataExportId value.
+ */
+ public String dataExportId() {
+ return this.dataExportId;
+ }
+
+ /**
+ * Set the dataExportId property: The data export rule ID.
+ *
+ * @param dataExportId the dataExportId value to set.
+ * @return the DataExportInner object itself.
+ */
+ public DataExportInner withDataExportId(String dataExportId) {
+ this.dataExportId = dataExportId;
+ return this;
+ }
+
+ /**
+ * Get the tableNames property: An array of tables to export, for example: [“Heartbeat, SecurityEvent”].
+ *
+ * @return the tableNames value.
+ */
+ public List tableNames() {
+ return this.tableNames;
+ }
+
+ /**
+ * Set the tableNames property: An array of tables to export, for example: [“Heartbeat, SecurityEvent”].
+ *
+ * @param tableNames the tableNames value to set.
+ * @return the DataExportInner object itself.
+ */
+ public DataExportInner withTableNames(List tableNames) {
+ this.tableNames = tableNames;
+ return this;
+ }
+
+ /**
+ * Get the enable property: Active when enabled.
+ *
+ * @return the enable value.
+ */
+ public Boolean enable() {
+ return this.enable;
+ }
+
+ /**
+ * Set the enable property: Active when enabled.
+ *
+ * @param enable the enable value to set.
+ * @return the DataExportInner object itself.
+ */
+ public DataExportInner withEnable(Boolean enable) {
+ this.enable = enable;
+ return this;
+ }
+
+ /**
+ * Get the createdDate property: The latest data export rule modification time.
+ *
+ * @return the createdDate value.
+ */
+ public String createdDate() {
+ return this.createdDate;
+ }
+
+ /**
+ * Set the createdDate property: The latest data export rule modification time.
+ *
+ * @param createdDate the createdDate value to set.
+ * @return the DataExportInner object itself.
+ */
+ public DataExportInner withCreatedDate(String createdDate) {
+ this.createdDate = createdDate;
+ return this;
+ }
+
+ /**
+ * Get the lastModifiedDate property: Date and time when the export was last modified.
+ *
+ * @return the lastModifiedDate value.
+ */
+ public String lastModifiedDate() {
+ return this.lastModifiedDate;
+ }
+
+ /**
+ * Set the lastModifiedDate property: Date and time when the export was last modified.
+ *
+ * @param lastModifiedDate the lastModifiedDate value to set.
+ * @return the DataExportInner object itself.
+ */
+ public DataExportInner withLastModifiedDate(String lastModifiedDate) {
+ this.lastModifiedDate = lastModifiedDate;
+ return this;
+ }
+
+ /**
+ * Get the resourceId property: The destination resource ID. This can be copied from the Properties entry of the
+ * destination resource in Azure.
+ *
+ * @return the resourceId value.
+ */
+ public String resourceId() {
+ return this.resourceId;
+ }
+
+ /**
+ * Set the resourceId property: The destination resource ID. This can be copied from the Properties entry of the
+ * destination resource in Azure.
+ *
+ * @param resourceId the resourceId value to set.
+ * @return the DataExportInner object itself.
+ */
+ public DataExportInner withResourceId(String resourceId) {
+ this.resourceId = resourceId;
+ return this;
+ }
+
+ /**
+ * Get the typePropertiesDestinationType property: The type of the destination resource.
+ *
+ * @return the typePropertiesDestinationType value.
+ */
+ public Type typePropertiesDestinationType() {
+ return this.typePropertiesDestinationType;
+ }
+
+ /**
+ * Get the eventHubName property: Optional. Allows to define an Event Hub name. Not applicable when destination is
+ * Storage Account.
+ *
+ * @return the eventHubName value.
+ */
+ public String eventHubName() {
+ return this.eventHubName;
+ }
+
+ /**
+ * Set the eventHubName property: Optional. Allows to define an Event Hub name. Not applicable when destination is
+ * Storage Account.
+ *
+ * @param eventHubName the eventHubName value to set.
+ * @return the DataExportInner object itself.
+ */
+ public DataExportInner withEventHubName(String eventHubName) {
+ this.eventHubName = eventHubName;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/DataSourceInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/DataSourceInner.java
new file mode 100644
index 000000000000..df0abde01f4c
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/DataSourceInner.java
@@ -0,0 +1,144 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loganalytics.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.loganalytics.models.DataSourceKind;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** Datasources under OMS Workspace. */
+@Fluent
+public final class DataSourceInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(DataSourceInner.class);
+
+ /*
+ * The data source properties in raw json format, each kind of data source
+ * have it's own schema.
+ */
+ @JsonProperty(value = "properties", required = true)
+ private Object properties;
+
+ /*
+ * The ETag of the data source.
+ */
+ @JsonProperty(value = "etag")
+ private String etag;
+
+ /*
+ * The kind of the DataSource.
+ */
+ @JsonProperty(value = "kind", required = true)
+ private DataSourceKind kind;
+
+ /*
+ * Resource tags.
+ */
+ @JsonProperty(value = "tags")
+ private Map tags;
+
+ /**
+ * Get the properties property: The data source properties in raw json format, each kind of data source have it's
+ * own schema.
+ *
+ * @return the properties value.
+ */
+ public Object properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set the properties property: The data source properties in raw json format, each kind of data source have it's
+ * own schema.
+ *
+ * @param properties the properties value to set.
+ * @return the DataSourceInner object itself.
+ */
+ public DataSourceInner withProperties(Object properties) {
+ this.properties = properties;
+ return this;
+ }
+
+ /**
+ * Get the etag property: The ETag of the data source.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Set the etag property: The ETag of the data source.
+ *
+ * @param etag the etag value to set.
+ * @return the DataSourceInner object itself.
+ */
+ public DataSourceInner withEtag(String etag) {
+ this.etag = etag;
+ return this;
+ }
+
+ /**
+ * Get the kind property: The kind of the DataSource.
+ *
+ * @return the kind value.
+ */
+ public DataSourceKind kind() {
+ return this.kind;
+ }
+
+ /**
+ * Set the kind property: The kind of the DataSource.
+ *
+ * @param kind the kind value to set.
+ * @return the DataSourceInner object itself.
+ */
+ public DataSourceInner withKind(DataSourceKind kind) {
+ this.kind = kind;
+ return this;
+ }
+
+ /**
+ * Get the tags property: Resource tags.
+ *
+ * @return the tags value.
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Set the tags property: Resource tags.
+ *
+ * @param tags the tags value to set.
+ * @return the DataSourceInner object itself.
+ */
+ public DataSourceInner withTags(Map tags) {
+ this.tags = tags;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (properties() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property properties in model DataSourceInner"));
+ }
+ if (kind() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property kind in model DataSourceInner"));
+ }
+ }
+}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/IntelligencePackInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/IntelligencePackInner.java
new file mode 100644
index 000000000000..21cbb135a612
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/IntelligencePackInner.java
@@ -0,0 +1,102 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loganalytics.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Intelligence Pack containing a string name and boolean indicating if it's enabled. */
+@Fluent
+public final class IntelligencePackInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(IntelligencePackInner.class);
+
+ /*
+ * The name of the intelligence pack.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /*
+ * The enabled boolean for the intelligence pack.
+ */
+ @JsonProperty(value = "enabled")
+ private Boolean enabled;
+
+ /*
+ * The display name of the intelligence pack.
+ */
+ @JsonProperty(value = "displayName")
+ private String displayName;
+
+ /**
+ * Get the name property: The name of the intelligence pack.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: The name of the intelligence pack.
+ *
+ * @param name the name value to set.
+ * @return the IntelligencePackInner object itself.
+ */
+ public IntelligencePackInner withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the enabled property: The enabled boolean for the intelligence pack.
+ *
+ * @return the enabled value.
+ */
+ public Boolean enabled() {
+ return this.enabled;
+ }
+
+ /**
+ * Set the enabled property: The enabled boolean for the intelligence pack.
+ *
+ * @param enabled the enabled value to set.
+ * @return the IntelligencePackInner object itself.
+ */
+ public IntelligencePackInner withEnabled(Boolean enabled) {
+ this.enabled = enabled;
+ return this;
+ }
+
+ /**
+ * Get the displayName property: The display name of the intelligence pack.
+ *
+ * @return the displayName value.
+ */
+ public String displayName() {
+ return this.displayName;
+ }
+
+ /**
+ * Set the displayName property: The display name of the intelligence pack.
+ *
+ * @param displayName the displayName value to set.
+ * @return the IntelligencePackInner object itself.
+ */
+ public IntelligencePackInner withDisplayName(String displayName) {
+ this.displayName = displayName;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/LinkedServiceInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/LinkedServiceInner.java
new file mode 100644
index 000000000000..91c7206aaeba
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/LinkedServiceInner.java
@@ -0,0 +1,139 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loganalytics.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.loganalytics.models.LinkedServiceEntityStatus;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.Map;
+
+/** The top level Linked service resource container. */
+@JsonFlatten
+@Fluent
+public class LinkedServiceInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(LinkedServiceInner.class);
+
+ /*
+ * Resource tags.
+ */
+ @JsonProperty(value = "tags")
+ private Map tags;
+
+ /*
+ * The resource id of the resource that will be linked to the workspace.
+ * This should be used for linking resources which require read access
+ */
+ @JsonProperty(value = "properties.resourceId")
+ private String resourceId;
+
+ /*
+ * The resource id of the resource that will be linked to the workspace.
+ * This should be used for linking resources which require write access
+ */
+ @JsonProperty(value = "properties.writeAccessResourceId")
+ private String writeAccessResourceId;
+
+ /*
+ * The provisioning state of the linked service.
+ */
+ @JsonProperty(value = "properties.provisioningState")
+ private LinkedServiceEntityStatus provisioningState;
+
+ /**
+ * Get the tags property: Resource tags.
+ *
+ * @return the tags value.
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Set the tags property: Resource tags.
+ *
+ * @param tags the tags value to set.
+ * @return the LinkedServiceInner object itself.
+ */
+ public LinkedServiceInner withTags(Map tags) {
+ this.tags = tags;
+ return this;
+ }
+
+ /**
+ * Get the resourceId property: The resource id of the resource that will be linked to the workspace. This should be
+ * used for linking resources which require read access.
+ *
+ * @return the resourceId value.
+ */
+ public String resourceId() {
+ return this.resourceId;
+ }
+
+ /**
+ * Set the resourceId property: The resource id of the resource that will be linked to the workspace. This should be
+ * used for linking resources which require read access.
+ *
+ * @param resourceId the resourceId value to set.
+ * @return the LinkedServiceInner object itself.
+ */
+ public LinkedServiceInner withResourceId(String resourceId) {
+ this.resourceId = resourceId;
+ return this;
+ }
+
+ /**
+ * Get the writeAccessResourceId property: The resource id of the resource that will be linked to the workspace.
+ * This should be used for linking resources which require write access.
+ *
+ * @return the writeAccessResourceId value.
+ */
+ public String writeAccessResourceId() {
+ return this.writeAccessResourceId;
+ }
+
+ /**
+ * Set the writeAccessResourceId property: The resource id of the resource that will be linked to the workspace.
+ * This should be used for linking resources which require write access.
+ *
+ * @param writeAccessResourceId the writeAccessResourceId value to set.
+ * @return the LinkedServiceInner object itself.
+ */
+ public LinkedServiceInner withWriteAccessResourceId(String writeAccessResourceId) {
+ this.writeAccessResourceId = writeAccessResourceId;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of the linked service.
+ *
+ * @return the provisioningState value.
+ */
+ public LinkedServiceEntityStatus provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Set the provisioningState property: The provisioning state of the linked service.
+ *
+ * @param provisioningState the provisioningState value to set.
+ * @return the LinkedServiceInner object itself.
+ */
+ public LinkedServiceInner withProvisioningState(LinkedServiceEntityStatus provisioningState) {
+ this.provisioningState = provisioningState;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/LinkedStorageAccountsResourceInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/LinkedStorageAccountsResourceInner.java
new file mode 100644
index 000000000000..01639e3857bc
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/LinkedStorageAccountsResourceInner.java
@@ -0,0 +1,70 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loganalytics.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.loganalytics.models.DataSourceType;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Linked storage accounts top level resource container. */
+@JsonFlatten
+@Fluent
+public class LinkedStorageAccountsResourceInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(LinkedStorageAccountsResourceInner.class);
+
+ /*
+ * Linked storage accounts type.
+ */
+ @JsonProperty(value = "properties.dataSourceType", access = JsonProperty.Access.WRITE_ONLY)
+ private DataSourceType dataSourceType;
+
+ /*
+ * Linked storage accounts resources ids.
+ */
+ @JsonProperty(value = "properties.storageAccountIds")
+ private List storageAccountIds;
+
+ /**
+ * Get the dataSourceType property: Linked storage accounts type.
+ *
+ * @return the dataSourceType value.
+ */
+ public DataSourceType dataSourceType() {
+ return this.dataSourceType;
+ }
+
+ /**
+ * Get the storageAccountIds property: Linked storage accounts resources ids.
+ *
+ * @return the storageAccountIds value.
+ */
+ public List storageAccountIds() {
+ return this.storageAccountIds;
+ }
+
+ /**
+ * Set the storageAccountIds property: Linked storage accounts resources ids.
+ *
+ * @param storageAccountIds the storageAccountIds value to set.
+ * @return the LinkedStorageAccountsResourceInner object itself.
+ */
+ public LinkedStorageAccountsResourceInner withStorageAccountIds(List storageAccountIds) {
+ this.storageAccountIds = storageAccountIds;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/ManagementGroupInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/ManagementGroupInner.java
new file mode 100644
index 000000000000..210342b8a60f
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/ManagementGroupInner.java
@@ -0,0 +1,236 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loganalytics.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** A management group that is connected to a workspace. */
+@JsonFlatten
+@Fluent
+public class ManagementGroupInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagementGroupInner.class);
+
+ /*
+ * The number of servers connected to the management group.
+ */
+ @JsonProperty(value = "properties.serverCount")
+ private Integer serverCount;
+
+ /*
+ * Gets or sets a value indicating whether the management group is a
+ * gateway.
+ */
+ @JsonProperty(value = "properties.isGateway")
+ private Boolean isGateway;
+
+ /*
+ * The name of the management group.
+ */
+ @JsonProperty(value = "properties.name")
+ private String name;
+
+ /*
+ * The unique ID of the management group.
+ */
+ @JsonProperty(value = "properties.id")
+ private String id;
+
+ /*
+ * The datetime that the management group was created.
+ */
+ @JsonProperty(value = "properties.created")
+ private OffsetDateTime created;
+
+ /*
+ * The last datetime that the management group received data.
+ */
+ @JsonProperty(value = "properties.dataReceived")
+ private OffsetDateTime dataReceived;
+
+ /*
+ * The version of System Center that is managing the management group.
+ */
+ @JsonProperty(value = "properties.version")
+ private String version;
+
+ /*
+ * The SKU of System Center that is managing the management group.
+ */
+ @JsonProperty(value = "properties.sku")
+ private String sku;
+
+ /**
+ * Get the serverCount property: The number of servers connected to the management group.
+ *
+ * @return the serverCount value.
+ */
+ public Integer serverCount() {
+ return this.serverCount;
+ }
+
+ /**
+ * Set the serverCount property: The number of servers connected to the management group.
+ *
+ * @param serverCount the serverCount value to set.
+ * @return the ManagementGroupInner object itself.
+ */
+ public ManagementGroupInner withServerCount(Integer serverCount) {
+ this.serverCount = serverCount;
+ return this;
+ }
+
+ /**
+ * Get the isGateway property: Gets or sets a value indicating whether the management group is a gateway.
+ *
+ * @return the isGateway value.
+ */
+ public Boolean isGateway() {
+ return this.isGateway;
+ }
+
+ /**
+ * Set the isGateway property: Gets or sets a value indicating whether the management group is a gateway.
+ *
+ * @param isGateway the isGateway value to set.
+ * @return the ManagementGroupInner object itself.
+ */
+ public ManagementGroupInner withIsGateway(Boolean isGateway) {
+ this.isGateway = isGateway;
+ return this;
+ }
+
+ /**
+ * Get the name property: The name of the management group.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: The name of the management group.
+ *
+ * @param name the name value to set.
+ * @return the ManagementGroupInner object itself.
+ */
+ public ManagementGroupInner withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the id property: The unique ID of the management group.
+ *
+ * @return the id value.
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Set the id property: The unique ID of the management group.
+ *
+ * @param id the id value to set.
+ * @return the ManagementGroupInner object itself.
+ */
+ public ManagementGroupInner withId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get the created property: The datetime that the management group was created.
+ *
+ * @return the created value.
+ */
+ public OffsetDateTime created() {
+ return this.created;
+ }
+
+ /**
+ * Set the created property: The datetime that the management group was created.
+ *
+ * @param created the created value to set.
+ * @return the ManagementGroupInner object itself.
+ */
+ public ManagementGroupInner withCreated(OffsetDateTime created) {
+ this.created = created;
+ return this;
+ }
+
+ /**
+ * Get the dataReceived property: The last datetime that the management group received data.
+ *
+ * @return the dataReceived value.
+ */
+ public OffsetDateTime dataReceived() {
+ return this.dataReceived;
+ }
+
+ /**
+ * Set the dataReceived property: The last datetime that the management group received data.
+ *
+ * @param dataReceived the dataReceived value to set.
+ * @return the ManagementGroupInner object itself.
+ */
+ public ManagementGroupInner withDataReceived(OffsetDateTime dataReceived) {
+ this.dataReceived = dataReceived;
+ return this;
+ }
+
+ /**
+ * Get the version property: The version of System Center that is managing the management group.
+ *
+ * @return the version value.
+ */
+ public String version() {
+ return this.version;
+ }
+
+ /**
+ * Set the version property: The version of System Center that is managing the management group.
+ *
+ * @param version the version value to set.
+ * @return the ManagementGroupInner object itself.
+ */
+ public ManagementGroupInner withVersion(String version) {
+ this.version = version;
+ return this;
+ }
+
+ /**
+ * Get the sku property: The SKU of System Center that is managing the management group.
+ *
+ * @return the sku value.
+ */
+ public String sku() {
+ return this.sku;
+ }
+
+ /**
+ * Set the sku property: The SKU of System Center that is managing the management group.
+ *
+ * @param sku the sku value to set.
+ * @return the ManagementGroupInner object itself.
+ */
+ public ManagementGroupInner withSku(String sku) {
+ this.sku = sku;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/OperationInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/OperationInner.java
new file mode 100644
index 000000000000..d0cd3f670f0c
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/OperationInner.java
@@ -0,0 +1,80 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loganalytics.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.loganalytics.models.OperationDisplay;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Supported operation of OperationalInsights resource provider. */
+@Fluent
+public final class OperationInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class);
+
+ /*
+ * Operation name: {provider}/{resource}/{operation}
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /*
+ * Display metadata associated with the operation.
+ */
+ @JsonProperty(value = "display")
+ private OperationDisplay display;
+
+ /**
+ * Get the name property: Operation name: {provider}/{resource}/{operation}.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: Operation name: {provider}/{resource}/{operation}.
+ *
+ * @param name the name value to set.
+ * @return the OperationInner object itself.
+ */
+ public OperationInner withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the display property: Display metadata associated with the operation.
+ *
+ * @return the display value.
+ */
+ public OperationDisplay display() {
+ return this.display;
+ }
+
+ /**
+ * Set the display property: Display metadata associated with the operation.
+ *
+ * @param display the display value to set.
+ * @return the OperationInner object itself.
+ */
+ public OperationInner withDisplay(OperationDisplay display) {
+ this.display = display;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (display() != null) {
+ display().validate();
+ }
+ }
+}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/OperationStatusInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/OperationStatusInner.java
new file mode 100644
index 000000000000..39d0e82438ae
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/OperationStatusInner.java
@@ -0,0 +1,181 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loganalytics.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.management.exception.ManagementError;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The status of operation. */
+@Fluent
+public final class OperationStatusInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationStatusInner.class);
+
+ /*
+ * The operation Id.
+ */
+ @JsonProperty(value = "id")
+ private String id;
+
+ /*
+ * The operation name.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /*
+ * The start time of the operation.
+ */
+ @JsonProperty(value = "startTime")
+ private String startTime;
+
+ /*
+ * The end time of the operation.
+ */
+ @JsonProperty(value = "endTime")
+ private String endTime;
+
+ /*
+ * The status of the operation.
+ */
+ @JsonProperty(value = "status")
+ private String status;
+
+ /*
+ * The error detail of the operation if any.
+ */
+ @JsonProperty(value = "error")
+ private ManagementError error;
+
+ /**
+ * Get the id property: The operation Id.
+ *
+ * @return the id value.
+ */
+ public String id() {
+ return this.id;
+ }
+
+ /**
+ * Set the id property: The operation Id.
+ *
+ * @param id the id value to set.
+ * @return the OperationStatusInner object itself.
+ */
+ public OperationStatusInner withId(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * Get the name property: The operation name.
+ *
+ * @return the name value.
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: The operation name.
+ *
+ * @param name the name value to set.
+ * @return the OperationStatusInner object itself.
+ */
+ public OperationStatusInner withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the startTime property: The start time of the operation.
+ *
+ * @return the startTime value.
+ */
+ public String startTime() {
+ return this.startTime;
+ }
+
+ /**
+ * Set the startTime property: The start time of the operation.
+ *
+ * @param startTime the startTime value to set.
+ * @return the OperationStatusInner object itself.
+ */
+ public OperationStatusInner withStartTime(String startTime) {
+ this.startTime = startTime;
+ return this;
+ }
+
+ /**
+ * Get the endTime property: The end time of the operation.
+ *
+ * @return the endTime value.
+ */
+ public String endTime() {
+ return this.endTime;
+ }
+
+ /**
+ * Set the endTime property: The end time of the operation.
+ *
+ * @param endTime the endTime value to set.
+ * @return the OperationStatusInner object itself.
+ */
+ public OperationStatusInner withEndTime(String endTime) {
+ this.endTime = endTime;
+ return this;
+ }
+
+ /**
+ * Get the status property: The status of the operation.
+ *
+ * @return the status value.
+ */
+ public String status() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: The status of the operation.
+ *
+ * @param status the status value to set.
+ * @return the OperationStatusInner object itself.
+ */
+ public OperationStatusInner withStatus(String status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the error property: The error detail of the operation if any.
+ *
+ * @return the error value.
+ */
+ public ManagementError error() {
+ return this.error;
+ }
+
+ /**
+ * Set the error property: The error detail of the operation if any.
+ *
+ * @param error the error value to set.
+ * @return the OperationStatusInner object itself.
+ */
+ public OperationStatusInner withError(ManagementError error) {
+ this.error = error;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/SavedSearchInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/SavedSearchInner.java
new file mode 100644
index 000000000000..69d58886efe6
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/SavedSearchInner.java
@@ -0,0 +1,267 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loganalytics.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.loganalytics.models.Tag;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Value object for saved search results. */
+@JsonFlatten
+@Fluent
+public class SavedSearchInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(SavedSearchInner.class);
+
+ /*
+ * The ETag of the saved search.
+ */
+ @JsonProperty(value = "etag")
+ private String etag;
+
+ /*
+ * The category of the saved search. This helps the user to find a saved
+ * search faster.
+ */
+ @JsonProperty(value = "properties.category", required = true)
+ private String category;
+
+ /*
+ * Saved search display name.
+ */
+ @JsonProperty(value = "properties.displayName", required = true)
+ private String displayName;
+
+ /*
+ * The query expression for the saved search.
+ */
+ @JsonProperty(value = "properties.query", required = true)
+ private String query;
+
+ /*
+ * The function alias if query serves as a function.
+ */
+ @JsonProperty(value = "properties.functionAlias")
+ private String functionAlias;
+
+ /*
+ * The optional function parameters if query serves as a function. Value
+ * should be in the following format: 'param-name1:type1 = default_value1,
+ * param-name2:type2 = default_value2'. For more examples and proper syntax
+ * please refer to
+ * https://docs.microsoft.com/en-us/azure/kusto/query/functions/user-defined-functions.
+ */
+ @JsonProperty(value = "properties.functionParameters")
+ private String functionParameters;
+
+ /*
+ * The version number of the query language. The current version is 2 and
+ * is the default.
+ */
+ @JsonProperty(value = "properties.version")
+ private Long version;
+
+ /*
+ * The tags attached to the saved search.
+ */
+ @JsonProperty(value = "properties.tags")
+ private List tags;
+
+ /**
+ * Get the etag property: The ETag of the saved search.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Set the etag property: The ETag of the saved search.
+ *
+ * @param etag the etag value to set.
+ * @return the SavedSearchInner object itself.
+ */
+ public SavedSearchInner withEtag(String etag) {
+ this.etag = etag;
+ return this;
+ }
+
+ /**
+ * Get the category property: The category of the saved search. This helps the user to find a saved search faster.
+ *
+ * @return the category value.
+ */
+ public String category() {
+ return this.category;
+ }
+
+ /**
+ * Set the category property: The category of the saved search. This helps the user to find a saved search faster.
+ *
+ * @param category the category value to set.
+ * @return the SavedSearchInner object itself.
+ */
+ public SavedSearchInner withCategory(String category) {
+ this.category = category;
+ return this;
+ }
+
+ /**
+ * Get the displayName property: Saved search display name.
+ *
+ * @return the displayName value.
+ */
+ public String displayName() {
+ return this.displayName;
+ }
+
+ /**
+ * Set the displayName property: Saved search display name.
+ *
+ * @param displayName the displayName value to set.
+ * @return the SavedSearchInner object itself.
+ */
+ public SavedSearchInner withDisplayName(String displayName) {
+ this.displayName = displayName;
+ return this;
+ }
+
+ /**
+ * Get the query property: The query expression for the saved search.
+ *
+ * @return the query value.
+ */
+ public String query() {
+ return this.query;
+ }
+
+ /**
+ * Set the query property: The query expression for the saved search.
+ *
+ * @param query the query value to set.
+ * @return the SavedSearchInner object itself.
+ */
+ public SavedSearchInner withQuery(String query) {
+ this.query = query;
+ return this;
+ }
+
+ /**
+ * Get the functionAlias property: The function alias if query serves as a function.
+ *
+ * @return the functionAlias value.
+ */
+ public String functionAlias() {
+ return this.functionAlias;
+ }
+
+ /**
+ * Set the functionAlias property: The function alias if query serves as a function.
+ *
+ * @param functionAlias the functionAlias value to set.
+ * @return the SavedSearchInner object itself.
+ */
+ public SavedSearchInner withFunctionAlias(String functionAlias) {
+ this.functionAlias = functionAlias;
+ return this;
+ }
+
+ /**
+ * Get the functionParameters property: The optional function parameters if query serves as a function. Value should
+ * be in the following format: 'param-name1:type1 = default_value1, param-name2:type2 = default_value2'. For more
+ * examples and proper syntax please refer to
+ * https://docs.microsoft.com/en-us/azure/kusto/query/functions/user-defined-functions.
+ *
+ * @return the functionParameters value.
+ */
+ public String functionParameters() {
+ return this.functionParameters;
+ }
+
+ /**
+ * Set the functionParameters property: The optional function parameters if query serves as a function. Value should
+ * be in the following format: 'param-name1:type1 = default_value1, param-name2:type2 = default_value2'. For more
+ * examples and proper syntax please refer to
+ * https://docs.microsoft.com/en-us/azure/kusto/query/functions/user-defined-functions.
+ *
+ * @param functionParameters the functionParameters value to set.
+ * @return the SavedSearchInner object itself.
+ */
+ public SavedSearchInner withFunctionParameters(String functionParameters) {
+ this.functionParameters = functionParameters;
+ return this;
+ }
+
+ /**
+ * Get the version property: The version number of the query language. The current version is 2 and is the default.
+ *
+ * @return the version value.
+ */
+ public Long version() {
+ return this.version;
+ }
+
+ /**
+ * Set the version property: The version number of the query language. The current version is 2 and is the default.
+ *
+ * @param version the version value to set.
+ * @return the SavedSearchInner object itself.
+ */
+ public SavedSearchInner withVersion(Long version) {
+ this.version = version;
+ return this;
+ }
+
+ /**
+ * Get the tags property: The tags attached to the saved search.
+ *
+ * @return the tags value.
+ */
+ public List tags() {
+ return this.tags;
+ }
+
+ /**
+ * Set the tags property: The tags attached to the saved search.
+ *
+ * @param tags the tags value to set.
+ * @return the SavedSearchInner object itself.
+ */
+ public SavedSearchInner withTags(List tags) {
+ this.tags = tags;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (category() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property category in model SavedSearchInner"));
+ }
+ if (displayName() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property displayName in model SavedSearchInner"));
+ }
+ if (query() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property query in model SavedSearchInner"));
+ }
+ if (tags() != null) {
+ tags().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/SavedSearchesListResultInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/SavedSearchesListResultInner.java
new file mode 100644
index 000000000000..eab26be41e29
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/SavedSearchesListResultInner.java
@@ -0,0 +1,54 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loganalytics.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** The saved search list operation response. */
+@Fluent
+public final class SavedSearchesListResultInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(SavedSearchesListResultInner.class);
+
+ /*
+ * The array of result values.
+ */
+ @JsonProperty(value = "value")
+ private List value;
+
+ /**
+ * Get the value property: The array of result values.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Set the value property: The array of result values.
+ *
+ * @param value the value value to set.
+ * @return the SavedSearchesListResultInner object itself.
+ */
+ public SavedSearchesListResultInner withValue(List value) {
+ this.value = value;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (value() != null) {
+ value().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/SearchGetSchemaResponseInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/SearchGetSchemaResponseInner.java
new file mode 100644
index 000000000000..1f860762e99f
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/SearchGetSchemaResponseInner.java
@@ -0,0 +1,85 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loganalytics.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.loganalytics.models.SearchMetadata;
+import com.azure.resourcemanager.loganalytics.models.SearchSchemaValue;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** The get schema operation response. */
+@Fluent
+public final class SearchGetSchemaResponseInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(SearchGetSchemaResponseInner.class);
+
+ /*
+ * The metadata from search results.
+ */
+ @JsonProperty(value = "metadata")
+ private SearchMetadata metadata;
+
+ /*
+ * The array of result values.
+ */
+ @JsonProperty(value = "value")
+ private List value;
+
+ /**
+ * Get the metadata property: The metadata from search results.
+ *
+ * @return the metadata value.
+ */
+ public SearchMetadata metadata() {
+ return this.metadata;
+ }
+
+ /**
+ * Set the metadata property: The metadata from search results.
+ *
+ * @param metadata the metadata value to set.
+ * @return the SearchGetSchemaResponseInner object itself.
+ */
+ public SearchGetSchemaResponseInner withMetadata(SearchMetadata metadata) {
+ this.metadata = metadata;
+ return this;
+ }
+
+ /**
+ * Get the value property: The array of result values.
+ *
+ * @return the value value.
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Set the value property: The array of result values.
+ *
+ * @param value the value value to set.
+ * @return the SearchGetSchemaResponseInner object itself.
+ */
+ public SearchGetSchemaResponseInner withValue(List value) {
+ this.value = value;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (metadata() != null) {
+ metadata().validate();
+ }
+ if (value() != null) {
+ value().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/SharedKeysInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/SharedKeysInner.java
new file mode 100644
index 000000000000..f691605aad1b
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/SharedKeysInner.java
@@ -0,0 +1,76 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loganalytics.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The shared keys for a workspace. */
+@Fluent
+public final class SharedKeysInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(SharedKeysInner.class);
+
+ /*
+ * The primary shared key of a workspace.
+ */
+ @JsonProperty(value = "primarySharedKey")
+ private String primarySharedKey;
+
+ /*
+ * The secondary shared key of a workspace.
+ */
+ @JsonProperty(value = "secondarySharedKey")
+ private String secondarySharedKey;
+
+ /**
+ * Get the primarySharedKey property: The primary shared key of a workspace.
+ *
+ * @return the primarySharedKey value.
+ */
+ public String primarySharedKey() {
+ return this.primarySharedKey;
+ }
+
+ /**
+ * Set the primarySharedKey property: The primary shared key of a workspace.
+ *
+ * @param primarySharedKey the primarySharedKey value to set.
+ * @return the SharedKeysInner object itself.
+ */
+ public SharedKeysInner withPrimarySharedKey(String primarySharedKey) {
+ this.primarySharedKey = primarySharedKey;
+ return this;
+ }
+
+ /**
+ * Get the secondarySharedKey property: The secondary shared key of a workspace.
+ *
+ * @return the secondarySharedKey value.
+ */
+ public String secondarySharedKey() {
+ return this.secondarySharedKey;
+ }
+
+ /**
+ * Set the secondarySharedKey property: The secondary shared key of a workspace.
+ *
+ * @param secondarySharedKey the secondarySharedKey value to set.
+ * @return the SharedKeysInner object itself.
+ */
+ public SharedKeysInner withSecondarySharedKey(String secondarySharedKey) {
+ this.secondarySharedKey = secondarySharedKey;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/StorageInsightInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/StorageInsightInner.java
new file mode 100644
index 000000000000..035a1a22ef07
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/StorageInsightInner.java
@@ -0,0 +1,182 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loganalytics.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.loganalytics.models.StorageAccount;
+import com.azure.resourcemanager.loganalytics.models.StorageInsightStatus;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+import java.util.Map;
+
+/** The top level storage insight resource container. */
+@JsonFlatten
+@Fluent
+public class StorageInsightInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(StorageInsightInner.class);
+
+ /*
+ * The ETag of the storage insight.
+ */
+ @JsonProperty(value = "eTag")
+ private String etag;
+
+ /*
+ * Resource tags.
+ */
+ @JsonProperty(value = "tags")
+ private Map tags;
+
+ /*
+ * The names of the blob containers that the workspace should read
+ */
+ @JsonProperty(value = "properties.containers")
+ private List containers;
+
+ /*
+ * The names of the Azure tables that the workspace should read
+ */
+ @JsonProperty(value = "properties.tables")
+ private List tables;
+
+ /*
+ * The storage account connection details
+ */
+ @JsonProperty(value = "properties.storageAccount")
+ private StorageAccount storageAccount;
+
+ /*
+ * The status of the storage insight
+ */
+ @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY)
+ private StorageInsightStatus status;
+
+ /**
+ * Get the etag property: The ETag of the storage insight.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Set the etag property: The ETag of the storage insight.
+ *
+ * @param etag the etag value to set.
+ * @return the StorageInsightInner object itself.
+ */
+ public StorageInsightInner withEtag(String etag) {
+ this.etag = etag;
+ return this;
+ }
+
+ /**
+ * Get the tags property: Resource tags.
+ *
+ * @return the tags value.
+ */
+ public Map tags() {
+ return this.tags;
+ }
+
+ /**
+ * Set the tags property: Resource tags.
+ *
+ * @param tags the tags value to set.
+ * @return the StorageInsightInner object itself.
+ */
+ public StorageInsightInner withTags(Map tags) {
+ this.tags = tags;
+ return this;
+ }
+
+ /**
+ * Get the containers property: The names of the blob containers that the workspace should read.
+ *
+ * @return the containers value.
+ */
+ public List containers() {
+ return this.containers;
+ }
+
+ /**
+ * Set the containers property: The names of the blob containers that the workspace should read.
+ *
+ * @param containers the containers value to set.
+ * @return the StorageInsightInner object itself.
+ */
+ public StorageInsightInner withContainers(List containers) {
+ this.containers = containers;
+ return this;
+ }
+
+ /**
+ * Get the tables property: The names of the Azure tables that the workspace should read.
+ *
+ * @return the tables value.
+ */
+ public List tables() {
+ return this.tables;
+ }
+
+ /**
+ * Set the tables property: The names of the Azure tables that the workspace should read.
+ *
+ * @param tables the tables value to set.
+ * @return the StorageInsightInner object itself.
+ */
+ public StorageInsightInner withTables(List tables) {
+ this.tables = tables;
+ return this;
+ }
+
+ /**
+ * Get the storageAccount property: The storage account connection details.
+ *
+ * @return the storageAccount value.
+ */
+ public StorageAccount storageAccount() {
+ return this.storageAccount;
+ }
+
+ /**
+ * Set the storageAccount property: The storage account connection details.
+ *
+ * @param storageAccount the storageAccount value to set.
+ * @return the StorageInsightInner object itself.
+ */
+ public StorageInsightInner withStorageAccount(StorageAccount storageAccount) {
+ this.storageAccount = storageAccount;
+ return this;
+ }
+
+ /**
+ * Get the status property: The status of the storage insight.
+ *
+ * @return the status value.
+ */
+ public StorageInsightStatus status() {
+ return this.status;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (storageAccount() != null) {
+ storageAccount().validate();
+ }
+ if (status() != null) {
+ status().validate();
+ }
+ }
+}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/TableInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/TableInner.java
new file mode 100644
index 000000000000..97f0a3960707
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/TableInner.java
@@ -0,0 +1,56 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loganalytics.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.ProxyResource;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Workspace data table definition. */
+@JsonFlatten
+@Fluent
+public class TableInner extends ProxyResource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(TableInner.class);
+
+ /*
+ * The data table data retention in days, between 30 and 730. Setting this
+ * property to null will default to the workspace retention.
+ */
+ @JsonProperty(value = "properties.retentionInDays")
+ private Integer retentionInDays;
+
+ /**
+ * Get the retentionInDays property: The data table data retention in days, between 30 and 730. Setting this
+ * property to null will default to the workspace retention.
+ *
+ * @return the retentionInDays value.
+ */
+ public Integer retentionInDays() {
+ return this.retentionInDays;
+ }
+
+ /**
+ * Set the retentionInDays property: The data table data retention in days, between 30 and 730. Setting this
+ * property to null will default to the workspace retention.
+ *
+ * @param retentionInDays the retentionInDays value to set.
+ * @return the TableInner object itself.
+ */
+ public TableInner withRetentionInDays(Integer retentionInDays) {
+ this.retentionInDays = retentionInDays;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ }
+}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/UsageMetricInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/UsageMetricInner.java
new file mode 100644
index 000000000000..cfed6590e933
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/UsageMetricInner.java
@@ -0,0 +1,186 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loganalytics.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.loganalytics.models.MetricName;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.time.OffsetDateTime;
+
+/** A metric describing the usage of a resource. */
+@Fluent
+public final class UsageMetricInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(UsageMetricInner.class);
+
+ /*
+ * The name of the metric.
+ */
+ @JsonProperty(value = "name")
+ private MetricName name;
+
+ /*
+ * The units used for the metric.
+ */
+ @JsonProperty(value = "unit")
+ private String unit;
+
+ /*
+ * The current value of the metric.
+ */
+ @JsonProperty(value = "currentValue")
+ private Double currentValue;
+
+ /*
+ * The quota limit for the metric.
+ */
+ @JsonProperty(value = "limit")
+ private Double limit;
+
+ /*
+ * The time that the metric's value will reset.
+ */
+ @JsonProperty(value = "nextResetTime")
+ private OffsetDateTime nextResetTime;
+
+ /*
+ * The quota period that determines the length of time between value
+ * resets.
+ */
+ @JsonProperty(value = "quotaPeriod")
+ private String quotaPeriod;
+
+ /**
+ * Get the name property: The name of the metric.
+ *
+ * @return the name value.
+ */
+ public MetricName name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name property: The name of the metric.
+ *
+ * @param name the name value to set.
+ * @return the UsageMetricInner object itself.
+ */
+ public UsageMetricInner withName(MetricName name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the unit property: The units used for the metric.
+ *
+ * @return the unit value.
+ */
+ public String unit() {
+ return this.unit;
+ }
+
+ /**
+ * Set the unit property: The units used for the metric.
+ *
+ * @param unit the unit value to set.
+ * @return the UsageMetricInner object itself.
+ */
+ public UsageMetricInner withUnit(String unit) {
+ this.unit = unit;
+ return this;
+ }
+
+ /**
+ * Get the currentValue property: The current value of the metric.
+ *
+ * @return the currentValue value.
+ */
+ public Double currentValue() {
+ return this.currentValue;
+ }
+
+ /**
+ * Set the currentValue property: The current value of the metric.
+ *
+ * @param currentValue the currentValue value to set.
+ * @return the UsageMetricInner object itself.
+ */
+ public UsageMetricInner withCurrentValue(Double currentValue) {
+ this.currentValue = currentValue;
+ return this;
+ }
+
+ /**
+ * Get the limit property: The quota limit for the metric.
+ *
+ * @return the limit value.
+ */
+ public Double limit() {
+ return this.limit;
+ }
+
+ /**
+ * Set the limit property: The quota limit for the metric.
+ *
+ * @param limit the limit value to set.
+ * @return the UsageMetricInner object itself.
+ */
+ public UsageMetricInner withLimit(Double limit) {
+ this.limit = limit;
+ return this;
+ }
+
+ /**
+ * Get the nextResetTime property: The time that the metric's value will reset.
+ *
+ * @return the nextResetTime value.
+ */
+ public OffsetDateTime nextResetTime() {
+ return this.nextResetTime;
+ }
+
+ /**
+ * Set the nextResetTime property: The time that the metric's value will reset.
+ *
+ * @param nextResetTime the nextResetTime value to set.
+ * @return the UsageMetricInner object itself.
+ */
+ public UsageMetricInner withNextResetTime(OffsetDateTime nextResetTime) {
+ this.nextResetTime = nextResetTime;
+ return this;
+ }
+
+ /**
+ * Get the quotaPeriod property: The quota period that determines the length of time between value resets.
+ *
+ * @return the quotaPeriod value.
+ */
+ public String quotaPeriod() {
+ return this.quotaPeriod;
+ }
+
+ /**
+ * Set the quotaPeriod property: The quota period that determines the length of time between value resets.
+ *
+ * @param quotaPeriod the quotaPeriod value to set.
+ * @return the UsageMetricInner object itself.
+ */
+ public UsageMetricInner withQuotaPeriod(String quotaPeriod) {
+ this.quotaPeriod = quotaPeriod;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (name() != null) {
+ name().validate();
+ }
+ }
+}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/WorkspaceInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/WorkspaceInner.java
new file mode 100644
index 000000000000..42a2262853f1
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/WorkspaceInner.java
@@ -0,0 +1,270 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loganalytics.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.JsonFlatten;
+import com.azure.core.management.Resource;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.loganalytics.models.PrivateLinkScopedResource;
+import com.azure.resourcemanager.loganalytics.models.PublicNetworkAccessType;
+import com.azure.resourcemanager.loganalytics.models.WorkspaceCapping;
+import com.azure.resourcemanager.loganalytics.models.WorkspaceEntityStatus;
+import com.azure.resourcemanager.loganalytics.models.WorkspaceSku;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+import java.util.Map;
+
+/** The top level Workspace resource container. */
+@JsonFlatten
+@Fluent
+public class WorkspaceInner extends Resource {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkspaceInner.class);
+
+ /*
+ * The ETag of the workspace.
+ */
+ @JsonProperty(value = "eTag")
+ private String etag;
+
+ /*
+ * The provisioning state of the workspace.
+ */
+ @JsonProperty(value = "properties.provisioningState")
+ private WorkspaceEntityStatus provisioningState;
+
+ /*
+ * This is a read-only property. Represents the ID associated with the
+ * workspace.
+ */
+ @JsonProperty(value = "properties.customerId", access = JsonProperty.Access.WRITE_ONLY)
+ private String customerId;
+
+ /*
+ * The SKU of the workspace.
+ */
+ @JsonProperty(value = "properties.sku")
+ private WorkspaceSku sku;
+
+ /*
+ * The workspace data retention in days, between 30 and 730.
+ */
+ @JsonProperty(value = "properties.retentionInDays")
+ private Integer retentionInDays;
+
+ /*
+ * The daily volume cap for ingestion.
+ */
+ @JsonProperty(value = "properties.workspaceCapping")
+ private WorkspaceCapping workspaceCapping;
+
+ /*
+ * The network access type for accessing Log Analytics ingestion.
+ */
+ @JsonProperty(value = "properties.publicNetworkAccessForIngestion")
+ private PublicNetworkAccessType publicNetworkAccessForIngestion;
+
+ /*
+ * The network access type for accessing Log Analytics query.
+ */
+ @JsonProperty(value = "properties.publicNetworkAccessForQuery")
+ private PublicNetworkAccessType publicNetworkAccessForQuery;
+
+ /*
+ * List of linked private link scope resources.
+ */
+ @JsonProperty(value = "properties.privateLinkScopedResources", access = JsonProperty.Access.WRITE_ONLY)
+ private List privateLinkScopedResources;
+
+ /**
+ * Get the etag property: The ETag of the workspace.
+ *
+ * @return the etag value.
+ */
+ public String etag() {
+ return this.etag;
+ }
+
+ /**
+ * Set the etag property: The ETag of the workspace.
+ *
+ * @param etag the etag value to set.
+ * @return the WorkspaceInner object itself.
+ */
+ public WorkspaceInner withEtag(String etag) {
+ this.etag = etag;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: The provisioning state of the workspace.
+ *
+ * @return the provisioningState value.
+ */
+ public WorkspaceEntityStatus provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Set the provisioningState property: The provisioning state of the workspace.
+ *
+ * @param provisioningState the provisioningState value to set.
+ * @return the WorkspaceInner object itself.
+ */
+ public WorkspaceInner withProvisioningState(WorkspaceEntityStatus provisioningState) {
+ this.provisioningState = provisioningState;
+ return this;
+ }
+
+ /**
+ * Get the customerId property: This is a read-only property. Represents the ID associated with the workspace.
+ *
+ * @return the customerId value.
+ */
+ public String customerId() {
+ return this.customerId;
+ }
+
+ /**
+ * Get the sku property: The SKU of the workspace.
+ *
+ * @return the sku value.
+ */
+ public WorkspaceSku sku() {
+ return this.sku;
+ }
+
+ /**
+ * Set the sku property: The SKU of the workspace.
+ *
+ * @param sku the sku value to set.
+ * @return the WorkspaceInner object itself.
+ */
+ public WorkspaceInner withSku(WorkspaceSku sku) {
+ this.sku = sku;
+ return this;
+ }
+
+ /**
+ * Get the retentionInDays property: The workspace data retention in days, between 30 and 730.
+ *
+ * @return the retentionInDays value.
+ */
+ public Integer retentionInDays() {
+ return this.retentionInDays;
+ }
+
+ /**
+ * Set the retentionInDays property: The workspace data retention in days, between 30 and 730.
+ *
+ * @param retentionInDays the retentionInDays value to set.
+ * @return the WorkspaceInner object itself.
+ */
+ public WorkspaceInner withRetentionInDays(Integer retentionInDays) {
+ this.retentionInDays = retentionInDays;
+ return this;
+ }
+
+ /**
+ * Get the workspaceCapping property: The daily volume cap for ingestion.
+ *
+ * @return the workspaceCapping value.
+ */
+ public WorkspaceCapping workspaceCapping() {
+ return this.workspaceCapping;
+ }
+
+ /**
+ * Set the workspaceCapping property: The daily volume cap for ingestion.
+ *
+ * @param workspaceCapping the workspaceCapping value to set.
+ * @return the WorkspaceInner object itself.
+ */
+ public WorkspaceInner withWorkspaceCapping(WorkspaceCapping workspaceCapping) {
+ this.workspaceCapping = workspaceCapping;
+ return this;
+ }
+
+ /**
+ * Get the publicNetworkAccessForIngestion property: The network access type for accessing Log Analytics ingestion.
+ *
+ * @return the publicNetworkAccessForIngestion value.
+ */
+ public PublicNetworkAccessType publicNetworkAccessForIngestion() {
+ return this.publicNetworkAccessForIngestion;
+ }
+
+ /**
+ * Set the publicNetworkAccessForIngestion property: The network access type for accessing Log Analytics ingestion.
+ *
+ * @param publicNetworkAccessForIngestion the publicNetworkAccessForIngestion value to set.
+ * @return the WorkspaceInner object itself.
+ */
+ public WorkspaceInner withPublicNetworkAccessForIngestion(PublicNetworkAccessType publicNetworkAccessForIngestion) {
+ this.publicNetworkAccessForIngestion = publicNetworkAccessForIngestion;
+ return this;
+ }
+
+ /**
+ * Get the publicNetworkAccessForQuery property: The network access type for accessing Log Analytics query.
+ *
+ * @return the publicNetworkAccessForQuery value.
+ */
+ public PublicNetworkAccessType publicNetworkAccessForQuery() {
+ return this.publicNetworkAccessForQuery;
+ }
+
+ /**
+ * Set the publicNetworkAccessForQuery property: The network access type for accessing Log Analytics query.
+ *
+ * @param publicNetworkAccessForQuery the publicNetworkAccessForQuery value to set.
+ * @return the WorkspaceInner object itself.
+ */
+ public WorkspaceInner withPublicNetworkAccessForQuery(PublicNetworkAccessType publicNetworkAccessForQuery) {
+ this.publicNetworkAccessForQuery = publicNetworkAccessForQuery;
+ return this;
+ }
+
+ /**
+ * Get the privateLinkScopedResources property: List of linked private link scope resources.
+ *
+ * @return the privateLinkScopedResources value.
+ */
+ public List privateLinkScopedResources() {
+ return this.privateLinkScopedResources;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public WorkspaceInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public WorkspaceInner withTags(Map tags) {
+ super.withTags(tags);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (sku() != null) {
+ sku().validate();
+ }
+ if (workspaceCapping() != null) {
+ workspaceCapping().validate();
+ }
+ if (privateLinkScopedResources() != null) {
+ privateLinkScopedResources().forEach(e -> e.validate());
+ }
+ }
+}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/WorkspacePurgeResponseInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/WorkspacePurgeResponseInner.java
new file mode 100644
index 000000000000..4e2c6552bc25
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/WorkspacePurgeResponseInner.java
@@ -0,0 +1,56 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loganalytics.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Response containing operationId for a specific purge action. */
+@Fluent
+public final class WorkspacePurgeResponseInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkspacePurgeResponseInner.class);
+
+ /*
+ * Id to use when querying for status for a particular purge operation.
+ */
+ @JsonProperty(value = "operationId", required = true)
+ private String operationId;
+
+ /**
+ * Get the operationId property: Id to use when querying for status for a particular purge operation.
+ *
+ * @return the operationId value.
+ */
+ public String operationId() {
+ return this.operationId;
+ }
+
+ /**
+ * Set the operationId property: Id to use when querying for status for a particular purge operation.
+ *
+ * @param operationId the operationId value to set.
+ * @return the WorkspacePurgeResponseInner object itself.
+ */
+ public WorkspacePurgeResponseInner withOperationId(String operationId) {
+ this.operationId = operationId;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (operationId() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property operationId in model WorkspacePurgeResponseInner"));
+ }
+ }
+}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/WorkspacePurgeStatusResponseInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/WorkspacePurgeStatusResponseInner.java
new file mode 100644
index 000000000000..f7890495f6e5
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/WorkspacePurgeStatusResponseInner.java
@@ -0,0 +1,57 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loganalytics.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.loganalytics.models.PurgeState;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Response containing status for a specific purge operation. */
+@Fluent
+public final class WorkspacePurgeStatusResponseInner {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkspacePurgeStatusResponseInner.class);
+
+ /*
+ * Status of the operation represented by the requested Id.
+ */
+ @JsonProperty(value = "status", required = true)
+ private PurgeState status;
+
+ /**
+ * Get the status property: Status of the operation represented by the requested Id.
+ *
+ * @return the status value.
+ */
+ public PurgeState status() {
+ return this.status;
+ }
+
+ /**
+ * Set the status property: Status of the operation represented by the requested Id.
+ *
+ * @param status the status value to set.
+ * @return the WorkspacePurgeStatusResponseInner object itself.
+ */
+ public WorkspacePurgeStatusResponseInner withStatus(PurgeState status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (status() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property status in model WorkspacePurgeStatusResponseInner"));
+ }
+ }
+}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/package-info.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/package-info.java
new file mode 100644
index 000000000000..2b0aff4ecedf
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/package-info.java
@@ -0,0 +1,6 @@
+// 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 OperationalInsightsManagementClient. Operational Insights Client. */
+package com.azure.resourcemanager.loganalytics.fluent.models;
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/package-info.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/package-info.java
new file mode 100644
index 000000000000..47a29a11cfb3
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/package-info.java
@@ -0,0 +1,6 @@
+// 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 OperationalInsightsManagementClient. Operational Insights Client. */
+package com.azure.resourcemanager.loganalytics.fluent;
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/AvailableServiceTierImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/AvailableServiceTierImpl.java
new file mode 100644
index 000000000000..53da8cb15afd
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/AvailableServiceTierImpl.java
@@ -0,0 +1,57 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loganalytics.implementation;
+
+import com.azure.resourcemanager.loganalytics.LogAnalyticsManager;
+import com.azure.resourcemanager.loganalytics.fluent.models.AvailableServiceTierInner;
+import com.azure.resourcemanager.loganalytics.models.AvailableServiceTier;
+import com.azure.resourcemanager.loganalytics.models.SkuNameEnum;
+
+public final class AvailableServiceTierImpl implements AvailableServiceTier {
+ private AvailableServiceTierInner innerObject;
+
+ private final LogAnalyticsManager serviceManager;
+
+ AvailableServiceTierImpl(AvailableServiceTierInner innerObject, LogAnalyticsManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ }
+
+ public SkuNameEnum serviceTier() {
+ return this.innerModel().serviceTier();
+ }
+
+ public Boolean enabled() {
+ return this.innerModel().enabled();
+ }
+
+ public Long minimumRetention() {
+ return this.innerModel().minimumRetention();
+ }
+
+ public Long maximumRetention() {
+ return this.innerModel().maximumRetention();
+ }
+
+ public Long defaultRetention() {
+ return this.innerModel().defaultRetention();
+ }
+
+ public Long capacityReservationLevel() {
+ return this.innerModel().capacityReservationLevel();
+ }
+
+ public String lastSkuUpdate() {
+ return this.innerModel().lastSkuUpdate();
+ }
+
+ public AvailableServiceTierInner innerModel() {
+ return this.innerObject;
+ }
+
+ private LogAnalyticsManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/AvailableServiceTiersClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/AvailableServiceTiersClientImpl.java
new file mode 100644
index 000000000000..6351619ef420
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/AvailableServiceTiersClientImpl.java
@@ -0,0 +1,223 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loganalytics.implementation;
+
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.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.loganalytics.fluent.AvailableServiceTiersClient;
+import com.azure.resourcemanager.loganalytics.fluent.models.AvailableServiceTierInner;
+import java.util.List;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in AvailableServiceTiersClient. */
+public final class AvailableServiceTiersClientImpl implements AvailableServiceTiersClient {
+ private final ClientLogger logger = new ClientLogger(AvailableServiceTiersClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final AvailableServiceTiersService service;
+
+ /** The service client containing this operation class. */
+ private final OperationalInsightsManagementClientImpl client;
+
+ /**
+ * Initializes an instance of AvailableServiceTiersClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ AvailableServiceTiersClientImpl(OperationalInsightsManagementClientImpl client) {
+ this.service =
+ RestProxy
+ .create(AvailableServiceTiersService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for OperationalInsightsManagementClientAvailableServiceTiers to be used
+ * by the proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "OperationalInsightsM")
+ private interface AvailableServiceTiersService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights"
+ + "/workspaces/{workspaceName}/availableServiceTiers")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> listByWorkspace(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("workspaceName") String workspaceName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Gets the available service tiers for the workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 available service tiers for the workspace.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> listByWorkspaceWithResponseAsync(
+ String resourceGroupName, String workspaceName) {
+ 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 (workspaceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listByWorkspace(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ workspaceName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Gets the available service tiers for the workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @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 available service tiers for the workspace.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> listByWorkspaceWithResponseAsync(
+ String resourceGroupName, String workspaceName, 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 (workspaceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByWorkspace(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ workspaceName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Gets the available service tiers for the workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 available service tiers for the workspace.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByWorkspaceAsync(String resourceGroupName, String workspaceName) {
+ return listByWorkspaceWithResponseAsync(resourceGroupName, workspaceName)
+ .flatMap(
+ (Response> res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Gets the available service tiers for the workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 available service tiers for the workspace.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public List listByWorkspace(String resourceGroupName, String workspaceName) {
+ return listByWorkspaceAsync(resourceGroupName, workspaceName).block();
+ }
+
+ /**
+ * Gets the available service tiers for the workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @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 available service tiers for the workspace.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response> listByWorkspaceWithResponse(
+ String resourceGroupName, String workspaceName, Context context) {
+ return listByWorkspaceWithResponseAsync(resourceGroupName, workspaceName, context).block();
+ }
+}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/AvailableServiceTiersImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/AvailableServiceTiersImpl.java
new file mode 100644
index 000000000000..d0285aa05207
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/AvailableServiceTiersImpl.java
@@ -0,0 +1,73 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loganalytics.implementation;
+
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.SimpleResponse;
+import com.azure.core.util.Context;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.loganalytics.LogAnalyticsManager;
+import com.azure.resourcemanager.loganalytics.fluent.AvailableServiceTiersClient;
+import com.azure.resourcemanager.loganalytics.fluent.models.AvailableServiceTierInner;
+import com.azure.resourcemanager.loganalytics.models.AvailableServiceTier;
+import com.azure.resourcemanager.loganalytics.models.AvailableServiceTiers;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public final class AvailableServiceTiersImpl implements AvailableServiceTiers {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(AvailableServiceTiersImpl.class);
+
+ private final AvailableServiceTiersClient innerClient;
+
+ private final LogAnalyticsManager serviceManager;
+
+ public AvailableServiceTiersImpl(AvailableServiceTiersClient innerClient, LogAnalyticsManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public List listByWorkspace(String resourceGroupName, String workspaceName) {
+ List inner = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName);
+ if (inner != null) {
+ return Collections
+ .unmodifiableList(
+ inner
+ .stream()
+ .map(inner1 -> new AvailableServiceTierImpl(inner1, this.manager()))
+ .collect(Collectors.toList()));
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public Response> listByWorkspaceWithResponse(
+ String resourceGroupName, String workspaceName, Context context) {
+ Response> inner =
+ this.serviceClient().listByWorkspaceWithResponse(resourceGroupName, workspaceName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ inner
+ .getValue()
+ .stream()
+ .map(inner1 -> new AvailableServiceTierImpl(inner1, this.manager()))
+ .collect(Collectors.toList()));
+ } else {
+ return null;
+ }
+ }
+
+ private AvailableServiceTiersClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private LogAnalyticsManager manager() {
+ return this.serviceManager;
+ }
+}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ClusterImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ClusterImpl.java
new file mode 100644
index 000000000000..3cdde5a1e850
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ClusterImpl.java
@@ -0,0 +1,230 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loganalytics.implementation;
+
+import com.azure.core.management.Region;
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.loganalytics.LogAnalyticsManager;
+import com.azure.resourcemanager.loganalytics.fluent.models.ClusterInner;
+import com.azure.resourcemanager.loganalytics.models.Cluster;
+import com.azure.resourcemanager.loganalytics.models.ClusterEntityStatus;
+import com.azure.resourcemanager.loganalytics.models.ClusterPatch;
+import com.azure.resourcemanager.loganalytics.models.ClusterSku;
+import com.azure.resourcemanager.loganalytics.models.Identity;
+import com.azure.resourcemanager.loganalytics.models.KeyVaultProperties;
+import java.util.Collections;
+import java.util.Map;
+
+public final class ClusterImpl implements Cluster, Cluster.Definition, Cluster.Update {
+ private ClusterInner innerObject;
+
+ private final LogAnalyticsManager 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 Identity identity() {
+ return this.innerModel().identity();
+ }
+
+ public ClusterSku sku() {
+ return this.innerModel().sku();
+ }
+
+ public String nextLink() {
+ return this.innerModel().nextLink();
+ }
+
+ public String clusterId() {
+ return this.innerModel().clusterId();
+ }
+
+ public ClusterEntityStatus provisioningState() {
+ return this.innerModel().provisioningState();
+ }
+
+ public KeyVaultProperties keyVaultProperties() {
+ return this.innerModel().keyVaultProperties();
+ }
+
+ public Region region() {
+ return Region.fromName(this.regionName());
+ }
+
+ public String regionName() {
+ return this.location();
+ }
+
+ public ClusterInner innerModel() {
+ return this.innerObject;
+ }
+
+ private LogAnalyticsManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String clusterName;
+
+ private ClusterPatch updateParameters;
+
+ public ClusterImpl withExistingResourceGroup(String resourceGroupName) {
+ this.resourceGroupName = resourceGroupName;
+ return this;
+ }
+
+ public Cluster create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getClusters()
+ .createOrUpdate(resourceGroupName, clusterName, this.innerModel(), Context.NONE);
+ return this;
+ }
+
+ public Cluster create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getClusters()
+ .createOrUpdate(resourceGroupName, clusterName, this.innerModel(), context);
+ return this;
+ }
+
+ ClusterImpl(String name, LogAnalyticsManager serviceManager) {
+ this.innerObject = new ClusterInner();
+ this.serviceManager = serviceManager;
+ this.clusterName = name;
+ }
+
+ public ClusterImpl update() {
+ this.updateParameters = new ClusterPatch();
+ return this;
+ }
+
+ public Cluster apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getClusters()
+ .updateWithResponse(resourceGroupName, clusterName, updateParameters, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Cluster apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getClusters()
+ .updateWithResponse(resourceGroupName, clusterName, updateParameters, context)
+ .getValue();
+ return this;
+ }
+
+ ClusterImpl(ClusterInner innerObject, LogAnalyticsManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourcegroups");
+ this.clusterName = Utils.getValueFromIdByName(innerObject.id(), "clusters");
+ }
+
+ public Cluster refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getClusters()
+ .getByResourceGroupWithResponse(resourceGroupName, clusterName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public Cluster refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getClusters()
+ .getByResourceGroupWithResponse(resourceGroupName, clusterName, context)
+ .getValue();
+ return this;
+ }
+
+ public ClusterImpl withRegion(Region location) {
+ this.innerModel().withLocation(location.toString());
+ return this;
+ }
+
+ public ClusterImpl withRegion(String location) {
+ this.innerModel().withLocation(location);
+ return this;
+ }
+
+ public ClusterImpl withTags(Map tags) {
+ if (isInCreateMode()) {
+ this.innerModel().withTags(tags);
+ return this;
+ } else {
+ this.updateParameters.withTags(tags);
+ return this;
+ }
+ }
+
+ public ClusterImpl withIdentity(Identity identity) {
+ this.innerModel().withIdentity(identity);
+ return this;
+ }
+
+ public ClusterImpl withSku(ClusterSku sku) {
+ if (isInCreateMode()) {
+ this.innerModel().withSku(sku);
+ return this;
+ } else {
+ this.updateParameters.withSku(sku);
+ return this;
+ }
+ }
+
+ public ClusterImpl withNextLink(String nextLink) {
+ this.innerModel().withNextLink(nextLink);
+ return this;
+ }
+
+ public ClusterImpl withKeyVaultProperties(KeyVaultProperties keyVaultProperties) {
+ if (isInCreateMode()) {
+ this.innerModel().withKeyVaultProperties(keyVaultProperties);
+ return this;
+ } else {
+ this.updateParameters.withKeyVaultProperties(keyVaultProperties);
+ return this;
+ }
+ }
+
+ private boolean isInCreateMode() {
+ return this.innerModel().id() == null;
+ }
+}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ClustersClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ClustersClientImpl.java
new file mode 100644
index 000000000000..8bed9d94b26d
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ClustersClientImpl.java
@@ -0,0 +1,1427 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loganalytics.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.management.polling.PollResult;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.SyncPoller;
+import com.azure.resourcemanager.loganalytics.fluent.ClustersClient;
+import com.azure.resourcemanager.loganalytics.fluent.models.ClusterInner;
+import com.azure.resourcemanager.loganalytics.models.ClusterListResult;
+import com.azure.resourcemanager.loganalytics.models.ClusterPatch;
+import java.nio.ByteBuffer;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in ClustersClient. */
+public final class ClustersClientImpl implements ClustersClient {
+ private final ClientLogger logger = new ClientLogger(ClustersClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final ClustersService service;
+
+ /** The service client containing this operation class. */
+ private final OperationalInsightsManagementClientImpl client;
+
+ /**
+ * Initializes an instance of ClustersClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ ClustersClientImpl(OperationalInsightsManagementClientImpl client) {
+ this.service = RestProxy.create(ClustersService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for OperationalInsightsManagementClientClusters to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "OperationalInsightsM")
+ private interface ClustersService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights"
+ + "/clusters")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/clusters")
+ @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"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights"
+ + "/clusters/{clusterName}")
+ @ExpectedResponses({200, 201, 202})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("clusterName") String clusterName,
+ @BodyParam("application/json") ClusterInner parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights"
+ + "/clusters/{clusterName}")
+ @ExpectedResponses({200, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono>> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @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.OperationalInsights"
+ + "/clusters/{clusterName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("clusterName") String clusterName,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Patch(
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights"
+ + "/clusters/{clusterName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> update(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("clusterName") String clusterName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @BodyParam("application/json") ClusterPatch parameters,
+ @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);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Gets Log Analytics clusters in a resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return log Analytics clusters in a 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 (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName 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
+ .listByResourceGroup(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ 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))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Gets Log Analytics clusters in a resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return log Analytics clusters in a 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 (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName 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
+ .listByResourceGroup(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ 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 Log Analytics clusters in a resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return log Analytics clusters in a resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Gets Log Analytics clusters in a resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return log Analytics clusters in a resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) {
+ return new PagedFlux<>(
+ () -> listByResourceGroupSinglePageAsync(resourceGroupName, context),
+ nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Gets Log Analytics clusters in a resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return log Analytics clusters in a resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName));
+ }
+
+ /**
+ * Gets Log Analytics clusters in a resource group.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return log Analytics clusters in a resource group.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context));
+ }
+
+ /**
+ * Gets the Log Analytics clusters in a subscription.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the Log Analytics clusters in a 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))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Gets the Log Analytics clusters in a subscription.
+ *
+ * @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 Log Analytics clusters in a 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 the Log Analytics clusters in a subscription.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the Log Analytics clusters in a subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync() {
+ return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listNextSinglePageAsync(nextLink));
+ }
+
+ /**
+ * Gets the Log Analytics clusters in a subscription.
+ *
+ * @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 Log Analytics clusters in a subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listAsync(Context context) {
+ return new PagedFlux<>(
+ () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context));
+ }
+
+ /**
+ * Gets the Log Analytics clusters in a subscription.
+ *
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the Log Analytics clusters in a subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list() {
+ return new PagedIterable<>(listAsync());
+ }
+
+ /**
+ * Gets the Log Analytics clusters in a subscription.
+ *
+ * @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 Log Analytics clusters in a subscription.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable list(Context context) {
+ return new PagedIterable<>(listAsync(context));
+ }
+
+ /**
+ * Create or update a Log Analytics cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the Log Analytics cluster.
+ * @param parameters The parameters required to create or update a Log Analytics cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 top level Log Analytics cluster resource container.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String clusterName, ClusterInner parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName 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 (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ clusterName,
+ parameters,
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Create or update a Log Analytics cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the Log Analytics cluster.
+ * @param parameters The parameters required to create or update a Log Analytics cluster.
+ * @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 top level Log Analytics cluster resource container.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String clusterName, ClusterInner parameters, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName 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 (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ clusterName,
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * Create or update a Log Analytics cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the Log Analytics cluster.
+ * @param parameters The parameters required to create or update a Log Analytics cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 top level Log Analytics cluster resource container.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, ClusterInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String clusterName, ClusterInner parameters) {
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, clusterName, parameters);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), ClusterInner.class, ClusterInner.class, Context.NONE);
+ }
+
+ /**
+ * Create or update a Log Analytics cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the Log Analytics cluster.
+ * @param parameters The parameters required to create or update a Log Analytics cluster.
+ * @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 top level Log Analytics cluster resource container.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, ClusterInner> beginCreateOrUpdateAsync(
+ String resourceGroupName, String clusterName, ClusterInner parameters, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono =
+ createOrUpdateWithResponseAsync(resourceGroupName, clusterName, parameters, context);
+ return this
+ .client
+ .getLroResult(
+ mono, this.client.getHttpPipeline(), ClusterInner.class, ClusterInner.class, context);
+ }
+
+ /**
+ * Create or update a Log Analytics cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the Log Analytics cluster.
+ * @param parameters The parameters required to create or update a Log Analytics cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 top level Log Analytics cluster resource container.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, ClusterInner> beginCreateOrUpdate(
+ String resourceGroupName, String clusterName, ClusterInner parameters) {
+ return beginCreateOrUpdateAsync(resourceGroupName, clusterName, parameters).getSyncPoller();
+ }
+
+ /**
+ * Create or update a Log Analytics cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the Log Analytics cluster.
+ * @param parameters The parameters required to create or update a Log Analytics cluster.
+ * @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 top level Log Analytics cluster resource container.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, ClusterInner> beginCreateOrUpdate(
+ String resourceGroupName, String clusterName, ClusterInner parameters, Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, clusterName, parameters, context).getSyncPoller();
+ }
+
+ /**
+ * Create or update a Log Analytics cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the Log Analytics cluster.
+ * @param parameters The parameters required to create or update a Log Analytics cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 top level Log Analytics cluster resource container.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String clusterName, ClusterInner parameters) {
+ return beginCreateOrUpdateAsync(resourceGroupName, clusterName, parameters)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create or update a Log Analytics cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the Log Analytics cluster.
+ * @param parameters The parameters required to create or update a Log Analytics cluster.
+ * @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 top level Log Analytics cluster resource container.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String clusterName, ClusterInner parameters, Context context) {
+ return beginCreateOrUpdateAsync(resourceGroupName, clusterName, parameters, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Create or update a Log Analytics cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the Log Analytics cluster.
+ * @param parameters The parameters required to create or update a Log Analytics cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 top level Log Analytics cluster resource container.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ClusterInner createOrUpdate(String resourceGroupName, String clusterName, ClusterInner parameters) {
+ return createOrUpdateAsync(resourceGroupName, clusterName, parameters).block();
+ }
+
+ /**
+ * Create or update a Log Analytics cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName The name of the Log Analytics cluster.
+ * @param parameters The parameters required to create or update a Log Analytics cluster.
+ * @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 top level Log Analytics cluster resource container.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ClusterInner createOrUpdate(
+ String resourceGroupName, String clusterName, ClusterInner parameters, Context context) {
+ return createOrUpdateAsync(resourceGroupName, clusterName, parameters, context).block();
+ }
+
+ /**
+ * Deletes a cluster instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Name of the Log Analytics Cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(String resourceGroupName, String clusterName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName 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
+ .delete(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ clusterName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Deletes a cluster instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Name of the Log Analytics Cluster.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono>> deleteWithResponseAsync(
+ String resourceGroupName, String clusterName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName 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
+ .delete(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ clusterName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ accept,
+ context);
+ }
+
+ /**
+ * Deletes a cluster instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Name of the Log Analytics Cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String clusterName) {
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, Context.NONE);
+ }
+
+ /**
+ * Deletes a cluster instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Name of the Log Analytics Cluster.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private PollerFlux, Void> beginDeleteAsync(
+ String resourceGroupName, String clusterName, Context context) {
+ context = this.client.mergeContext(context);
+ Mono>> mono = deleteWithResponseAsync(resourceGroupName, clusterName, context);
+ return this
+ .client
+ .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context);
+ }
+
+ /**
+ * Deletes a cluster instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Name of the Log Analytics Cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName) {
+ return beginDeleteAsync(resourceGroupName, clusterName).getSyncPoller();
+ }
+
+ /**
+ * Deletes a cluster instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Name of the Log Analytics Cluster.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public SyncPoller, Void> beginDelete(
+ String resourceGroupName, String clusterName, Context context) {
+ return beginDeleteAsync(resourceGroupName, clusterName, context).getSyncPoller();
+ }
+
+ /**
+ * Deletes a cluster instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Name of the Log Analytics Cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String clusterName) {
+ return beginDeleteAsync(resourceGroupName, clusterName).last().flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes a cluster instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Name of the Log Analytics Cluster.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String clusterName, Context context) {
+ return beginDeleteAsync(resourceGroupName, clusterName, context)
+ .last()
+ .flatMap(this.client::getLroFinalResultOrError);
+ }
+
+ /**
+ * Deletes a cluster instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Name of the Log Analytics Cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String clusterName) {
+ deleteAsync(resourceGroupName, clusterName).block();
+ }
+
+ /**
+ * Deletes a cluster instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Name of the Log Analytics Cluster.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String clusterName, Context context) {
+ deleteAsync(resourceGroupName, clusterName, context).block();
+ }
+
+ /**
+ * Gets a Log Analytics cluster instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Name of the Log Analytics Cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 Log Analytics cluster instance.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String clusterName) {
+ 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 (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ clusterName,
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Gets a Log Analytics cluster instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Name of the Log Analytics Cluster.
+ * @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 Log Analytics cluster instance.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String clusterName, 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 (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ this.client.getApiVersion(),
+ clusterName,
+ accept,
+ context);
+ }
+
+ /**
+ * Gets a Log Analytics cluster instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Name of the Log Analytics Cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 Log Analytics cluster instance.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getByResourceGroupAsync(String resourceGroupName, String clusterName) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, clusterName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Gets a Log Analytics cluster instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Name of the Log Analytics Cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 Log Analytics cluster instance.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ClusterInner getByResourceGroup(String resourceGroupName, String clusterName) {
+ return getByResourceGroupAsync(resourceGroupName, clusterName).block();
+ }
+
+ /**
+ * Gets a Log Analytics cluster instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Name of the Log Analytics Cluster.
+ * @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 Log Analytics cluster instance.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String clusterName, Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, clusterName, context).block();
+ }
+
+ /**
+ * Updates a Log Analytics cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Name of the Log Analytics Cluster.
+ * @param parameters The parameters required to patch a Log Analytics cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 top level Log Analytics cluster resource container.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName, String clusterName, ClusterPatch parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName 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 (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .update(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ clusterName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ parameters,
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Updates a Log Analytics cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Name of the Log Analytics Cluster.
+ * @param parameters The parameters required to patch a Log Analytics cluster.
+ * @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 top level Log Analytics cluster resource container.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> updateWithResponseAsync(
+ String resourceGroupName, String clusterName, ClusterPatch parameters, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (clusterName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter clusterName 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 (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .update(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ clusterName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * Updates a Log Analytics cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Name of the Log Analytics Cluster.
+ * @param parameters The parameters required to patch a Log Analytics cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 top level Log Analytics cluster resource container.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono updateAsync(String resourceGroupName, String clusterName, ClusterPatch parameters) {
+ return updateWithResponseAsync(resourceGroupName, clusterName, parameters)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Updates a Log Analytics cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Name of the Log Analytics Cluster.
+ * @param parameters The parameters required to patch a Log Analytics cluster.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 top level Log Analytics cluster resource container.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public ClusterInner update(String resourceGroupName, String clusterName, ClusterPatch parameters) {
+ return updateAsync(resourceGroupName, clusterName, parameters).block();
+ }
+
+ /**
+ * Updates a Log Analytics cluster.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param clusterName Name of the Log Analytics Cluster.
+ * @param parameters The parameters required to patch a Log Analytics cluster.
+ * @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 top level Log Analytics cluster resource container.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response updateWithResponse(
+ String resourceGroupName, String clusterName, ClusterPatch parameters, Context context) {
+ return updateWithResponseAsync(resourceGroupName, clusterName, parameters, context).block();
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list clusters operation response.
+ */
+ @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))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list clusters operation response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list clusters operation response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Get the next page of items.
+ *
+ * @param nextLink The nextLink parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the list clusters operation response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listNextSinglePageAsync(String nextLink, Context context) {
+ if (nextLink == null) {
+ return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
+ }
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listNext(nextLink, this.client.getEndpoint(), accept, context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(),
+ res.getStatusCode(),
+ res.getHeaders(),
+ res.getValue().value(),
+ res.getValue().nextLink(),
+ null));
+ }
+}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ClustersImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ClustersImpl.java
new file mode 100644
index 000000000000..9bea08f4bf99
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ClustersImpl.java
@@ -0,0 +1,170 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loganalytics.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.loganalytics.LogAnalyticsManager;
+import com.azure.resourcemanager.loganalytics.fluent.ClustersClient;
+import com.azure.resourcemanager.loganalytics.fluent.models.ClusterInner;
+import com.azure.resourcemanager.loganalytics.models.Cluster;
+import com.azure.resourcemanager.loganalytics.models.Clusters;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class ClustersImpl implements Clusters {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ClustersImpl.class);
+
+ private final ClustersClient innerClient;
+
+ private final LogAnalyticsManager serviceManager;
+
+ public ClustersImpl(ClustersClient innerClient, LogAnalyticsManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
+ return inner.mapPage(inner1 -> new ClusterImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
+ PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context);
+ return inner.mapPage(inner1 -> new ClusterImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list() {
+ PagedIterable inner = this.serviceClient().list();
+ return inner.mapPage(inner1 -> new ClusterImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable list(Context context) {
+ PagedIterable inner = this.serviceClient().list(context);
+ return inner.mapPage(inner1 -> new ClusterImpl(inner1, this.manager()));
+ }
+
+ public void deleteByResourceGroup(String resourceGroupName, String clusterName) {
+ this.serviceClient().delete(resourceGroupName, clusterName);
+ }
+
+ public void delete(String resourceGroupName, String clusterName, Context context) {
+ this.serviceClient().delete(resourceGroupName, clusterName, context);
+ }
+
+ public Cluster getByResourceGroup(String resourceGroupName, String clusterName) {
+ ClusterInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, clusterName);
+ if (inner != null) {
+ return new ClusterImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getByResourceGroupWithResponse(
+ String resourceGroupName, String clusterName, Context context) {
+ Response inner =
+ this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, clusterName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new ClusterImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public Cluster getById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourcegroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id)));
+ }
+ String clusterName = Utils.getValueFromIdByName(id, "clusters");
+ if (clusterName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, clusterName, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourcegroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id)));
+ }
+ String clusterName = Utils.getValueFromIdByName(id, "clusters");
+ if (clusterName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id)));
+ }
+ return this.getByResourceGroupWithResponse(resourceGroupName, clusterName, context);
+ }
+
+ public void deleteById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourcegroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id)));
+ }
+ String clusterName = Utils.getValueFromIdByName(id, "clusters");
+ if (clusterName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id)));
+ }
+ this.delete(resourceGroupName, clusterName, Context.NONE);
+ }
+
+ public void deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourcegroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id)));
+ }
+ String clusterName = Utils.getValueFromIdByName(id, "clusters");
+ if (clusterName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id)));
+ }
+ this.delete(resourceGroupName, clusterName, context);
+ }
+
+ private ClustersClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private LogAnalyticsManager manager() {
+ return this.serviceManager;
+ }
+
+ public ClusterImpl define(String name) {
+ return new ClusterImpl(name, this.manager());
+ }
+}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataExportImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataExportImpl.java
new file mode 100644
index 000000000000..a78692ffe89f
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataExportImpl.java
@@ -0,0 +1,205 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loganalytics.implementation;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.loganalytics.LogAnalyticsManager;
+import com.azure.resourcemanager.loganalytics.fluent.models.DataExportInner;
+import com.azure.resourcemanager.loganalytics.models.DataExport;
+import com.azure.resourcemanager.loganalytics.models.Type;
+import java.util.Collections;
+import java.util.List;
+
+public final class DataExportImpl implements DataExport, DataExport.Definition, DataExport.Update {
+ private DataExportInner innerObject;
+
+ private final LogAnalyticsManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public String dataExportId() {
+ return this.innerModel().dataExportId();
+ }
+
+ public List tableNames() {
+ List inner = this.innerModel().tableNames();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public Boolean enable() {
+ return this.innerModel().enable();
+ }
+
+ public String createdDate() {
+ return this.innerModel().createdDate();
+ }
+
+ public String lastModifiedDate() {
+ return this.innerModel().lastModifiedDate();
+ }
+
+ public String resourceId() {
+ return this.innerModel().resourceId();
+ }
+
+ public Type typePropertiesDestinationType() {
+ return this.innerModel().typePropertiesDestinationType();
+ }
+
+ public String eventHubName() {
+ return this.innerModel().eventHubName();
+ }
+
+ public DataExportInner innerModel() {
+ return this.innerObject;
+ }
+
+ private LogAnalyticsManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String workspaceName;
+
+ private String dataExportName;
+
+ public DataExportImpl withExistingWorkspace(String resourceGroupName, String workspaceName) {
+ this.resourceGroupName = resourceGroupName;
+ this.workspaceName = workspaceName;
+ return this;
+ }
+
+ public DataExport create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDataExports()
+ .createOrUpdateWithResponse(
+ resourceGroupName, workspaceName, dataExportName, this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public DataExport create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDataExports()
+ .createOrUpdateWithResponse(
+ resourceGroupName, workspaceName, dataExportName, this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ DataExportImpl(String name, LogAnalyticsManager serviceManager) {
+ this.innerObject = new DataExportInner();
+ this.serviceManager = serviceManager;
+ this.dataExportName = name;
+ }
+
+ public DataExportImpl update() {
+ return this;
+ }
+
+ public DataExport apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDataExports()
+ .createOrUpdateWithResponse(
+ resourceGroupName, workspaceName, dataExportName, this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public DataExport apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDataExports()
+ .createOrUpdateWithResponse(
+ resourceGroupName, workspaceName, dataExportName, this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ DataExportImpl(DataExportInner innerObject, LogAnalyticsManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourcegroups");
+ this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces");
+ this.dataExportName = Utils.getValueFromIdByName(innerObject.id(), "dataExports");
+ }
+
+ public DataExport refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDataExports()
+ .getWithResponse(resourceGroupName, workspaceName, dataExportName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public DataExport refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDataExports()
+ .getWithResponse(resourceGroupName, workspaceName, dataExportName, context)
+ .getValue();
+ return this;
+ }
+
+ public DataExportImpl withDataExportId(String dataExportId) {
+ this.innerModel().withDataExportId(dataExportId);
+ return this;
+ }
+
+ public DataExportImpl withTableNames(List tableNames) {
+ this.innerModel().withTableNames(tableNames);
+ return this;
+ }
+
+ public DataExportImpl withEnable(Boolean enable) {
+ this.innerModel().withEnable(enable);
+ return this;
+ }
+
+ public DataExportImpl withCreatedDate(String createdDate) {
+ this.innerModel().withCreatedDate(createdDate);
+ return this;
+ }
+
+ public DataExportImpl withLastModifiedDate(String lastModifiedDate) {
+ this.innerModel().withLastModifiedDate(lastModifiedDate);
+ return this;
+ }
+
+ public DataExportImpl withResourceId(String resourceId) {
+ this.innerModel().withResourceId(resourceId);
+ return this;
+ }
+
+ public DataExportImpl withEventHubName(String eventHubName) {
+ this.innerModel().withEventHubName(eventHubName);
+ return this;
+ }
+}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataExportsClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataExportsClientImpl.java
new file mode 100644
index 000000000000..e78a66c7e875
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataExportsClientImpl.java
@@ -0,0 +1,801 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loganalytics.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.loganalytics.fluent.DataExportsClient;
+import com.azure.resourcemanager.loganalytics.fluent.models.DataExportInner;
+import com.azure.resourcemanager.loganalytics.models.DataExportListResult;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in DataExportsClient. */
+public final class DataExportsClientImpl implements DataExportsClient {
+ private final ClientLogger logger = new ClientLogger(DataExportsClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final DataExportsService service;
+
+ /** The service client containing this operation class. */
+ private final OperationalInsightsManagementClientImpl client;
+
+ /**
+ * Initializes an instance of DataExportsClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ DataExportsClientImpl(OperationalInsightsManagementClientImpl client) {
+ this.service =
+ RestProxy.create(DataExportsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for OperationalInsightsManagementClientDataExports to be used by the
+ * proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "OperationalInsightsM")
+ private interface DataExportsService {
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights"
+ + "/workspaces/{workspaceName}/dataExports")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByWorkspace(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("workspaceName") String workspaceName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights"
+ + "/workspaces/{workspaceName}/dataExports/{dataExportName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("workspaceName") String workspaceName,
+ @PathParam("dataExportName") String dataExportName,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") DataExportInner parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights"
+ + "/workspaces/{workspaceName}/dataExports/{dataExportName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("workspaceName") String workspaceName,
+ @PathParam("dataExportName") String dataExportName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights"
+ + "/workspaces/{workspaceName}/dataExports/{dataExportName}")
+ @ExpectedResponses({200, 404})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("subscriptionId") String subscriptionId,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("workspaceName") String workspaceName,
+ @PathParam("dataExportName") String dataExportName,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Lists the data export instances within a workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of the request to list data exports.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByWorkspaceSinglePageAsync(
+ String resourceGroupName, String workspaceName) {
+ 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 (workspaceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .listByWorkspace(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ workspaceName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .>map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Lists the data export instances within a workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @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 result of the request to list data exports.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> listByWorkspaceSinglePageAsync(
+ String resourceGroupName, String workspaceName, 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 (workspaceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .listByWorkspace(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ workspaceName,
+ this.client.getApiVersion(),
+ accept,
+ context)
+ .map(
+ res ->
+ new PagedResponseBase<>(
+ res.getRequest(), res.getStatusCode(), res.getHeaders(), res.getValue().value(), null, null));
+ }
+
+ /**
+ * Lists the data export instances within a workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of the request to list data exports.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByWorkspaceAsync(String resourceGroupName, String workspaceName) {
+ return new PagedFlux<>(() -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName));
+ }
+
+ /**
+ * Lists the data export instances within a workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @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 result of the request to list data exports.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ private PagedFlux listByWorkspaceAsync(
+ String resourceGroupName, String workspaceName, Context context) {
+ return new PagedFlux<>(() -> listByWorkspaceSinglePageAsync(resourceGroupName, workspaceName, context));
+ }
+
+ /**
+ * Lists the data export instances within a workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return result of the request to list data exports.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName) {
+ return new PagedIterable<>(listByWorkspaceAsync(resourceGroupName, workspaceName));
+ }
+
+ /**
+ * Lists the data export instances within a workspace.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @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 result of the request to list data exports.
+ */
+ @ServiceMethod(returns = ReturnType.COLLECTION)
+ public PagedIterable listByWorkspace(
+ String resourceGroupName, String workspaceName, Context context) {
+ return new PagedIterable<>(listByWorkspaceAsync(resourceGroupName, workspaceName, context));
+ }
+
+ /**
+ * Create or update a data export.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param dataExportName The data export rule name.
+ * @param parameters The parameters required to create or update a data export.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 top level data export resource container.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String workspaceName, String dataExportName, DataExportInner parameters) {
+ 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 (workspaceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null."));
+ }
+ if (dataExportName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter dataExportName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ workspaceName,
+ dataExportName,
+ this.client.getApiVersion(),
+ parameters,
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Create or update a data export.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param dataExportName The data export rule name.
+ * @param parameters The parameters required to create or update a data export.
+ * @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 top level data export resource container.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(
+ String resourceGroupName,
+ String workspaceName,
+ String dataExportName,
+ DataExportInner parameters,
+ 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 (workspaceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null."));
+ }
+ if (dataExportName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter dataExportName is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ workspaceName,
+ dataExportName,
+ this.client.getApiVersion(),
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * Create or update a data export.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param dataExportName The data export rule name.
+ * @param parameters The parameters required to create or update a data export.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 top level data export resource container.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String workspaceName, String dataExportName, DataExportInner parameters) {
+ return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, dataExportName, parameters)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Create or update a data export.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param dataExportName The data export rule name.
+ * @param parameters The parameters required to create or update a data export.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws 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 top level data export resource container.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DataExportInner createOrUpdate(
+ String resourceGroupName, String workspaceName, String dataExportName, DataExportInner parameters) {
+ return createOrUpdateAsync(resourceGroupName, workspaceName, dataExportName, parameters).block();
+ }
+
+ /**
+ * Create or update a data export.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param dataExportName The data export rule name.
+ * @param parameters The parameters required to create or update a data export.
+ * @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 top level data export resource container.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createOrUpdateWithResponse(
+ String resourceGroupName,
+ String workspaceName,
+ String dataExportName,
+ DataExportInner parameters,
+ Context context) {
+ return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, dataExportName, parameters, context)
+ .block();
+ }
+
+ /**
+ * Gets a data export instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param dataExportName The data export rule name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a data export instance.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String workspaceName, String dataExportName) {
+ 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 (workspaceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null."));
+ }
+ if (dataExportName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter dataExportName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ workspaceName,
+ dataExportName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Gets a data export instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param dataExportName The data export rule name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a data export instance.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> getWithResponseAsync(
+ String resourceGroupName, String workspaceName, String dataExportName, 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 (workspaceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null."));
+ }
+ if (dataExportName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter dataExportName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .get(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ workspaceName,
+ dataExportName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Gets a data export instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param dataExportName The data export rule name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a data export instance.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono getAsync(String resourceGroupName, String workspaceName, String dataExportName) {
+ return getWithResponseAsync(resourceGroupName, workspaceName, dataExportName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Gets a data export instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param dataExportName The data export rule name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a data export instance.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DataExportInner get(String resourceGroupName, String workspaceName, String dataExportName) {
+ return getAsync(resourceGroupName, workspaceName, dataExportName).block();
+ }
+
+ /**
+ * Gets a data export instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param dataExportName The data export rule name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return a data export instance.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response getWithResponse(
+ String resourceGroupName, String workspaceName, String dataExportName, Context context) {
+ return getWithResponseAsync(resourceGroupName, workspaceName, dataExportName, context).block();
+ }
+
+ /**
+ * Deletes the specified data export in a given workspace..
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param dataExportName The data export rule name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(
+ String resourceGroupName, String workspaceName, String dataExportName) {
+ 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 (workspaceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null."));
+ }
+ if (dataExportName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter dataExportName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ workspaceName,
+ dataExportName,
+ this.client.getApiVersion(),
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Deletes the specified data export in a given workspace..
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param dataExportName The data export rule name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(
+ String resourceGroupName, String workspaceName, String dataExportName, 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 (workspaceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null."));
+ }
+ if (dataExportName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter dataExportName is required and cannot be null."));
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ this.client.getSubscriptionId(),
+ resourceGroupName,
+ workspaceName,
+ dataExportName,
+ this.client.getApiVersion(),
+ accept,
+ context);
+ }
+
+ /**
+ * Deletes the specified data export in a given workspace..
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param dataExportName The data export rule name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono deleteAsync(String resourceGroupName, String workspaceName, String dataExportName) {
+ return deleteWithResponseAsync(resourceGroupName, workspaceName, dataExportName)
+ .flatMap((Response res) -> Mono.empty());
+ }
+
+ /**
+ * Deletes the specified data export in a given workspace..
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param dataExportName The data export rule name.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void delete(String resourceGroupName, String workspaceName, String dataExportName) {
+ deleteAsync(resourceGroupName, workspaceName, dataExportName).block();
+ }
+
+ /**
+ * Deletes the specified data export in a given workspace..
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param dataExportName The data export rule name.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response deleteWithResponse(
+ String resourceGroupName, String workspaceName, String dataExportName, Context context) {
+ return deleteWithResponseAsync(resourceGroupName, workspaceName, dataExportName, context).block();
+ }
+}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataExportsImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataExportsImpl.java
new file mode 100644
index 000000000000..4efe7bdc4ff6
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataExportsImpl.java
@@ -0,0 +1,190 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loganalytics.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.loganalytics.LogAnalyticsManager;
+import com.azure.resourcemanager.loganalytics.fluent.DataExportsClient;
+import com.azure.resourcemanager.loganalytics.fluent.models.DataExportInner;
+import com.azure.resourcemanager.loganalytics.models.DataExport;
+import com.azure.resourcemanager.loganalytics.models.DataExports;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+
+public final class DataExportsImpl implements DataExports {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(DataExportsImpl.class);
+
+ private final DataExportsClient innerClient;
+
+ private final LogAnalyticsManager serviceManager;
+
+ public DataExportsImpl(DataExportsClient innerClient, LogAnalyticsManager serviceManager) {
+ this.innerClient = innerClient;
+ this.serviceManager = serviceManager;
+ }
+
+ public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName) {
+ PagedIterable inner = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName);
+ return inner.mapPage(inner1 -> new DataExportImpl(inner1, this.manager()));
+ }
+
+ public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, Context context) {
+ PagedIterable inner =
+ this.serviceClient().listByWorkspace(resourceGroupName, workspaceName, context);
+ return inner.mapPage(inner1 -> new DataExportImpl(inner1, this.manager()));
+ }
+
+ public DataExport get(String resourceGroupName, String workspaceName, String dataExportName) {
+ DataExportInner inner = this.serviceClient().get(resourceGroupName, workspaceName, dataExportName);
+ if (inner != null) {
+ return new DataExportImpl(inner, this.manager());
+ } else {
+ return null;
+ }
+ }
+
+ public Response getWithResponse(
+ String resourceGroupName, String workspaceName, String dataExportName, Context context) {
+ Response inner =
+ this.serviceClient().getWithResponse(resourceGroupName, workspaceName, dataExportName, context);
+ if (inner != null) {
+ return new SimpleResponse<>(
+ inner.getRequest(),
+ inner.getStatusCode(),
+ inner.getHeaders(),
+ new DataExportImpl(inner.getValue(), this.manager()));
+ } else {
+ return null;
+ }
+ }
+
+ public void delete(String resourceGroupName, String workspaceName, String dataExportName) {
+ this.serviceClient().delete(resourceGroupName, workspaceName, dataExportName);
+ }
+
+ public Response deleteWithResponse(
+ String resourceGroupName, String workspaceName, String dataExportName, Context context) {
+ return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, dataExportName, context);
+ }
+
+ public DataExport getById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourcegroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id)));
+ }
+ String workspaceName = Utils.getValueFromIdByName(id, "workspaces");
+ if (workspaceName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id)));
+ }
+ String dataExportName = Utils.getValueFromIdByName(id, "dataExports");
+ if (dataExportName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'dataExports'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, workspaceName, dataExportName, Context.NONE).getValue();
+ }
+
+ public Response getByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourcegroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id)));
+ }
+ String workspaceName = Utils.getValueFromIdByName(id, "workspaces");
+ if (workspaceName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id)));
+ }
+ String dataExportName = Utils.getValueFromIdByName(id, "dataExports");
+ if (dataExportName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'dataExports'.", id)));
+ }
+ return this.getWithResponse(resourceGroupName, workspaceName, dataExportName, context);
+ }
+
+ public void deleteById(String id) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourcegroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id)));
+ }
+ String workspaceName = Utils.getValueFromIdByName(id, "workspaces");
+ if (workspaceName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id)));
+ }
+ String dataExportName = Utils.getValueFromIdByName(id, "dataExports");
+ if (dataExportName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'dataExports'.", id)));
+ }
+ this.deleteWithResponse(resourceGroupName, workspaceName, dataExportName, Context.NONE).getValue();
+ }
+
+ public Response deleteByIdWithResponse(String id, Context context) {
+ String resourceGroupName = Utils.getValueFromIdByName(id, "resourcegroups");
+ if (resourceGroupName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String
+ .format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id)));
+ }
+ String workspaceName = Utils.getValueFromIdByName(id, "workspaces");
+ if (workspaceName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id)));
+ }
+ String dataExportName = Utils.getValueFromIdByName(id, "dataExports");
+ if (dataExportName == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ String.format("The resource ID '%s' is not valid. Missing path segment 'dataExports'.", id)));
+ }
+ return this.deleteWithResponse(resourceGroupName, workspaceName, dataExportName, context);
+ }
+
+ private DataExportsClient serviceClient() {
+ return this.innerClient;
+ }
+
+ private LogAnalyticsManager manager() {
+ return this.serviceManager;
+ }
+
+ public DataExportImpl define(String name) {
+ return new DataExportImpl(name, this.manager());
+ }
+}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataSourceImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataSourceImpl.java
new file mode 100644
index 000000000000..1e4a3b644dd2
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataSourceImpl.java
@@ -0,0 +1,174 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loganalytics.implementation;
+
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.loganalytics.LogAnalyticsManager;
+import com.azure.resourcemanager.loganalytics.fluent.models.DataSourceInner;
+import com.azure.resourcemanager.loganalytics.models.DataSource;
+import com.azure.resourcemanager.loganalytics.models.DataSourceKind;
+import java.util.Collections;
+import java.util.Map;
+
+public final class DataSourceImpl implements DataSource, DataSource.Definition, DataSource.Update {
+ private DataSourceInner innerObject;
+
+ private final LogAnalyticsManager serviceManager;
+
+ public String id() {
+ return this.innerModel().id();
+ }
+
+ public String name() {
+ return this.innerModel().name();
+ }
+
+ public String type() {
+ return this.innerModel().type();
+ }
+
+ public Object properties() {
+ return this.innerModel().properties();
+ }
+
+ public String etag() {
+ return this.innerModel().etag();
+ }
+
+ public DataSourceKind kind() {
+ return this.innerModel().kind();
+ }
+
+ public Map tags() {
+ Map inner = this.innerModel().tags();
+ if (inner != null) {
+ return Collections.unmodifiableMap(inner);
+ } else {
+ return Collections.emptyMap();
+ }
+ }
+
+ public DataSourceInner innerModel() {
+ return this.innerObject;
+ }
+
+ private LogAnalyticsManager manager() {
+ return this.serviceManager;
+ }
+
+ private String resourceGroupName;
+
+ private String workspaceName;
+
+ private String dataSourceName;
+
+ public DataSourceImpl withExistingWorkspace(String resourceGroupName, String workspaceName) {
+ this.resourceGroupName = resourceGroupName;
+ this.workspaceName = workspaceName;
+ return this;
+ }
+
+ public DataSource create() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDataSources()
+ .createOrUpdateWithResponse(
+ resourceGroupName, workspaceName, dataSourceName, this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public DataSource create(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDataSources()
+ .createOrUpdateWithResponse(
+ resourceGroupName, workspaceName, dataSourceName, this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ DataSourceImpl(String name, LogAnalyticsManager serviceManager) {
+ this.innerObject = new DataSourceInner();
+ this.serviceManager = serviceManager;
+ this.dataSourceName = name;
+ }
+
+ public DataSourceImpl update() {
+ return this;
+ }
+
+ public DataSource apply() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDataSources()
+ .createOrUpdateWithResponse(
+ resourceGroupName, workspaceName, dataSourceName, this.innerModel(), Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public DataSource apply(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDataSources()
+ .createOrUpdateWithResponse(
+ resourceGroupName, workspaceName, dataSourceName, this.innerModel(), context)
+ .getValue();
+ return this;
+ }
+
+ DataSourceImpl(DataSourceInner innerObject, LogAnalyticsManager serviceManager) {
+ this.innerObject = innerObject;
+ this.serviceManager = serviceManager;
+ this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourcegroups");
+ this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces");
+ this.dataSourceName = Utils.getValueFromIdByName(innerObject.id(), "dataSources");
+ }
+
+ public DataSource refresh() {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDataSources()
+ .getWithResponse(resourceGroupName, workspaceName, dataSourceName, Context.NONE)
+ .getValue();
+ return this;
+ }
+
+ public DataSource refresh(Context context) {
+ this.innerObject =
+ serviceManager
+ .serviceClient()
+ .getDataSources()
+ .getWithResponse(resourceGroupName, workspaceName, dataSourceName, context)
+ .getValue();
+ return this;
+ }
+
+ public DataSourceImpl withProperties(Object properties) {
+ this.innerModel().withProperties(properties);
+ return this;
+ }
+
+ public DataSourceImpl withKind(DataSourceKind kind) {
+ this.innerModel().withKind(kind);
+ return this;
+ }
+
+ public DataSourceImpl withTags(Map tags) {
+ this.innerModel().withTags(tags);
+ return this;
+ }
+
+ public DataSourceImpl withEtag(String etag) {
+ this.innerModel().withEtag(etag);
+ return this;
+ }
+}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataSourcesClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataSourcesClientImpl.java
new file mode 100644
index 000000000000..6a285ef1c4f8
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataSourcesClientImpl.java
@@ -0,0 +1,937 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loganalytics.implementation;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.HeaderParam;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.loganalytics.fluent.DataSourcesClient;
+import com.azure.resourcemanager.loganalytics.fluent.models.DataSourceInner;
+import com.azure.resourcemanager.loganalytics.models.DataSourceListResult;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in DataSourcesClient. */
+public final class DataSourcesClientImpl implements DataSourcesClient {
+ private final ClientLogger logger = new ClientLogger(DataSourcesClientImpl.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final DataSourcesService service;
+
+ /** The service client containing this operation class. */
+ private final OperationalInsightsManagementClientImpl client;
+
+ /**
+ * Initializes an instance of DataSourcesClientImpl.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ DataSourcesClientImpl(OperationalInsightsManagementClientImpl client) {
+ this.service =
+ RestProxy.create(DataSourcesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for OperationalInsightsManagementClientDataSources to be used by the
+ * proxy service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "OperationalInsightsM")
+ private interface DataSourcesService {
+ @Headers({"Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights"
+ + "/workspaces/{workspaceName}/dataSources/{dataSourceName}")
+ @ExpectedResponses({200, 201})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("workspaceName") String workspaceName,
+ @PathParam("dataSourceName") String dataSourceName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @BodyParam("application/json") DataSourceInner parameters,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights"
+ + "/workspaces/{workspaceName}/dataSources/{dataSourceName}")
+ @ExpectedResponses({200, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("workspaceName") String workspaceName,
+ @PathParam("dataSourceName") String dataSourceName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights"
+ + "/workspaces/{workspaceName}/dataSources/{dataSourceName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> get(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("workspaceName") String workspaceName,
+ @PathParam("dataSourceName") String dataSourceName,
+ @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.OperationalInsights"
+ + "/workspaces/{workspaceName}/dataSources")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByWorkspace(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("workspaceName") String workspaceName,
+ @QueryParam("$filter") String filter,
+ @QueryParam("$skiptoken") String skiptoken,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Headers({"Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByWorkspaceNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink,
+ @HostParam("$host") String endpoint,
+ @HeaderParam("Accept") String accept,
+ Context context);
+ }
+
+ /**
+ * Create or update a data source.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param dataSourceName The name of the datasource resource.
+ * @param parameters The parameters required to create or update a datasource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return datasources under OMS Workspace.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String workspaceName, String dataSourceName, DataSourceInner parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (workspaceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null."));
+ }
+ if (dataSourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter dataSourceName 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 (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ workspaceName,
+ dataSourceName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ parameters,
+ accept,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Create or update a data source.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param dataSourceName The name of the datasource resource.
+ * @param parameters The parameters required to create or update a datasource.
+ * @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 datasources under OMS Workspace.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> createOrUpdateWithResponseAsync(
+ String resourceGroupName,
+ String workspaceName,
+ String dataSourceName,
+ DataSourceInner parameters,
+ Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (workspaceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null."));
+ }
+ if (dataSourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter dataSourceName 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 (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String accept = "application/json";
+ context = this.client.mergeContext(context);
+ return service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ workspaceName,
+ dataSourceName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ parameters,
+ accept,
+ context);
+ }
+
+ /**
+ * Create or update a data source.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param dataSourceName The name of the datasource resource.
+ * @param parameters The parameters required to create or update a datasource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return datasources under OMS Workspace.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono createOrUpdateAsync(
+ String resourceGroupName, String workspaceName, String dataSourceName, DataSourceInner parameters) {
+ return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, dataSourceName, parameters)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Create or update a data source.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param dataSourceName The name of the datasource resource.
+ * @param parameters The parameters required to create or update a datasource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return datasources under OMS Workspace.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public DataSourceInner createOrUpdate(
+ String resourceGroupName, String workspaceName, String dataSourceName, DataSourceInner parameters) {
+ return createOrUpdateAsync(resourceGroupName, workspaceName, dataSourceName, parameters).block();
+ }
+
+ /**
+ * Create or update a data source.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param dataSourceName The name of the datasource resource.
+ * @param parameters The parameters required to create or update a datasource.
+ * @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 datasources under OMS Workspace.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response createOrUpdateWithResponse(
+ String resourceGroupName,
+ String workspaceName,
+ String dataSourceName,
+ DataSourceInner parameters,
+ Context context) {
+ return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, dataSourceName, parameters, context)
+ .block();
+ }
+
+ /**
+ * Deletes a data source instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param dataSourceName Name of the datasource.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono> deleteWithResponseAsync(
+ String resourceGroupName, String workspaceName, String dataSourceName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (workspaceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null."));
+ }
+ if (dataSourceName == null) {
+ return Mono.error(new IllegalArgumentException("Parameter dataSourceName 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."));
+ }
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ workspaceName,
+ dataSourceName,
+ this.client.getApiVersion(),
+ this.client.getSubscriptionId(),
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Deletes a data source instance.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param dataSourceName Name of the datasource.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ private Mono