diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/CHANGELOG.md b/sdk/loganalytics/azure-resourcemanager-loganalytics/CHANGELOG.md
index 9b3c85a23bad..3be3ea23c056 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/CHANGELOG.md
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/CHANGELOG.md
@@ -1,7 +1,8 @@
# Release History
-## 1.0.0-beta.3 (Unreleased)
+## 1.0.0-beta.1 (2022-03-02)
+- Azure Resource Manager LogAnalytics client library for Java. This package contains Microsoft Azure SDK for LogAnalytics Management SDK. Operational Insights Client. Package tag package-2021-12-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## 1.0.0-beta.2 (2021-03-30)
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/README.md b/sdk/loganalytics/azure-resourcemanager-loganalytics/README.md
index 275123ad963c..71db21315c42 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/README.md
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/README.md
@@ -2,7 +2,7 @@
Azure Resource Manager LogAnalytics client library for Java.
-This package contains Microsoft Azure SDK for LogAnalytics Management SDK. Operational Insights Client. Package tag package-2020-08. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+This package contains Microsoft Azure SDK for LogAnalytics Management SDK. Operational Insights Client. Package tag package-2021-12-01-preview. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## We'd love to hear your feedback
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanager
azure-resourcemanager-loganalytics
- 1.0.0-beta.2
+ 1.0.0-beta.3
```
[//]: # ({x-version-update-end})
@@ -74,6 +74,9 @@ See [API design][design] for general introduction on design and key concepts on
## Examples
+[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/loganalytics/azure-resourcemanager-loganalytics/SAMPLE.md)
+
+
## Troubleshooting
## Next steps
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/SAMPLE.md b/sdk/loganalytics/azure-resourcemanager-loganalytics/SAMPLE.md
new file mode 100644
index 000000000000..c1032137937d
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/SAMPLE.md
@@ -0,0 +1,1576 @@
+# Code snippets and samples
+
+
+## AvailableServiceTiers
+
+- [ListByWorkspace](#availableservicetiers_listbyworkspace)
+
+## Clusters
+
+- [CreateOrUpdate](#clusters_createorupdate)
+- [Delete](#clusters_delete)
+- [GetByResourceGroup](#clusters_getbyresourcegroup)
+- [List](#clusters_list)
+- [ListByResourceGroup](#clusters_listbyresourcegroup)
+- [Update](#clusters_update)
+
+## DataExports
+
+- [CreateOrUpdate](#dataexports_createorupdate)
+- [Delete](#dataexports_delete)
+- [Get](#dataexports_get)
+- [ListByWorkspace](#dataexports_listbyworkspace)
+
+## DataSources
+
+- [CreateOrUpdate](#datasources_createorupdate)
+- [Delete](#datasources_delete)
+- [Get](#datasources_get)
+- [ListByWorkspace](#datasources_listbyworkspace)
+
+## DeletedWorkspaces
+
+- [List](#deletedworkspaces_list)
+- [ListByResourceGroup](#deletedworkspaces_listbyresourcegroup)
+
+## Gateways
+
+- [Delete](#gateways_delete)
+
+## IntelligencePacks
+
+- [Disable](#intelligencepacks_disable)
+- [Enable](#intelligencepacks_enable)
+- [List](#intelligencepacks_list)
+
+## LinkedServices
+
+- [CreateOrUpdate](#linkedservices_createorupdate)
+- [Delete](#linkedservices_delete)
+- [Get](#linkedservices_get)
+- [ListByWorkspace](#linkedservices_listbyworkspace)
+
+## LinkedStorageAccounts
+
+- [CreateOrUpdate](#linkedstorageaccounts_createorupdate)
+- [Delete](#linkedstorageaccounts_delete)
+- [Get](#linkedstorageaccounts_get)
+- [ListByWorkspace](#linkedstorageaccounts_listbyworkspace)
+
+## ManagementGroups
+
+- [List](#managementgroups_list)
+
+## OperationStatuses
+
+- [Get](#operationstatuses_get)
+
+## Operations
+
+- [List](#operations_list)
+
+## SavedSearches
+
+- [CreateOrUpdate](#savedsearches_createorupdate)
+- [Delete](#savedsearches_delete)
+- [Get](#savedsearches_get)
+- [ListByWorkspace](#savedsearches_listbyworkspace)
+
+## Schema
+
+- [Get](#schema_get)
+
+## SharedKeysOperation
+
+- [GetSharedKeys](#sharedkeysoperation_getsharedkeys)
+- [Regenerate](#sharedkeysoperation_regenerate)
+
+## StorageInsightConfigs
+
+- [CreateOrUpdate](#storageinsightconfigs_createorupdate)
+- [Delete](#storageinsightconfigs_delete)
+- [Get](#storageinsightconfigs_get)
+- [ListByWorkspace](#storageinsightconfigs_listbyworkspace)
+
+## Tables
+
+- [CreateOrUpdate](#tables_createorupdate)
+- [Delete](#tables_delete)
+- [Get](#tables_get)
+- [ListByWorkspace](#tables_listbyworkspace)
+- [Migrate](#tables_migrate)
+- [Update](#tables_update)
+
+## Usages
+
+- [List](#usages_list)
+
+## WorkspacePurge
+
+- [GetPurgeStatus](#workspacepurge_getpurgestatus)
+- [Purge](#workspacepurge_purge)
+
+## Workspaces
+
+- [CreateOrUpdate](#workspaces_createorupdate)
+- [Delete](#workspaces_delete)
+- [GetByResourceGroup](#workspaces_getbyresourcegroup)
+- [List](#workspaces_list)
+- [ListByResourceGroup](#workspaces_listbyresourcegroup)
+- [Update](#workspaces_update)
+### AvailableServiceTiers_ListByWorkspace
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for AvailableServiceTiers ListByWorkspace. */
+public final class AvailableServiceTiersListByWorkspaceSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/WorkspacesAvailableServiceTiers.json
+ */
+ /**
+ * Sample code: AvailableServiceTiers.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void availableServiceTiers(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.availableServiceTiers().listByWorkspaceWithResponse("rg1", "workspace1", Context.NONE);
+ }
+}
+```
+
+### Clusters_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.loganalytics.models.Capacity;
+import com.azure.resourcemanager.loganalytics.models.ClusterSku;
+import com.azure.resourcemanager.loganalytics.models.ClusterSkuNameEnum;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Clusters CreateOrUpdate. */
+public final class ClustersCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/ClustersCreate.json
+ */
+ /**
+ * Sample code: ClustersCreate.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void clustersCreate(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager
+ .clusters()
+ .define("oiautorest6685")
+ .withRegion("australiasoutheast")
+ .withExistingResourceGroup("oiautorest6685")
+ .withTags(mapOf("tag1", "val1"))
+ .withSku(
+ new ClusterSku()
+ .withCapacity(Capacity.ONE_ZERO_ZERO_ZERO)
+ .withName(ClusterSkuNameEnum.CAPACITY_RESERVATION))
+ .create();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### Clusters_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Clusters Delete. */
+public final class ClustersDeleteSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/ClustersDelete.json
+ */
+ /**
+ * Sample code: ClustersDelete.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void clustersDelete(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.clusters().delete("oiautorest6685", "oiautorest6685", Context.NONE);
+ }
+}
+```
+
+### Clusters_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Clusters GetByResourceGroup. */
+public final class ClustersGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/ClustersGet.json
+ */
+ /**
+ * Sample code: ClustersGet.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void clustersGet(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.clusters().getByResourceGroupWithResponse("oiautorest6685", "oiautorest6685", Context.NONE);
+ }
+}
+```
+
+### Clusters_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Clusters List. */
+public final class ClustersListSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/ClustersSubscriptionList.json
+ */
+ /**
+ * Sample code: ClustersSubscriptionList.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void clustersSubscriptionList(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.clusters().list(Context.NONE);
+ }
+}
+```
+
+### Clusters_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Clusters ListByResourceGroup. */
+public final class ClustersListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/ClustersListByResourceGroup.json
+ */
+ /**
+ * Sample code: ClustersGet.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void clustersGet(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.clusters().listByResourceGroup("oiautorest6685", Context.NONE);
+ }
+}
+```
+
+### Clusters_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.loganalytics.models.Capacity;
+import com.azure.resourcemanager.loganalytics.models.Cluster;
+import com.azure.resourcemanager.loganalytics.models.ClusterSku;
+import com.azure.resourcemanager.loganalytics.models.ClusterSkuNameEnum;
+import com.azure.resourcemanager.loganalytics.models.Identity;
+import com.azure.resourcemanager.loganalytics.models.IdentityType;
+import com.azure.resourcemanager.loganalytics.models.KeyVaultProperties;
+import com.azure.resourcemanager.loganalytics.models.UserIdentityProperties;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Clusters Update. */
+public final class ClustersUpdateSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/ClustersUpdate.json
+ */
+ /**
+ * Sample code: ClustersPatch.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void clustersPatch(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ Cluster resource =
+ manager
+ .clusters()
+ .getByResourceGroupWithResponse("oiautorest6685", "oiautorest6685", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withTags(mapOf("tag1", "val1"))
+ .withIdentity(
+ new Identity()
+ .withType(IdentityType.USER_ASSIGNED)
+ .withUserAssignedIdentities(
+ mapOf(
+ "/subscriptions/00000000-0000-0000-0000-00000000000/resourcegroups/oiautorest6685/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity",
+ new UserIdentityProperties())))
+ .withSku(
+ new ClusterSku()
+ .withCapacity(Capacity.ONE_ZERO_ZERO_ZERO)
+ .withName(ClusterSkuNameEnum.CAPACITY_RESERVATION))
+ .withKeyVaultProperties(
+ new KeyVaultProperties()
+ .withKeyVaultUri("https://aztest2170.vault.azure.net")
+ .withKeyName("aztest2170cert")
+ .withKeyVersion("654ft6c4e63845cbb50fd6fg51540429")
+ .withKeyRsaSize(1024))
+ .apply();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### DataExports_CreateOrUpdate
+
+```java
+import java.util.Arrays;
+
+/** Samples for DataExports CreateOrUpdate. */
+public final class DataExportsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/DataExportCreateOrUpdate.json
+ */
+ /**
+ * Sample code: DataExportCreate.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void dataExportCreate(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager
+ .dataExports()
+ .define("export1")
+ .withExistingWorkspace("RgTest1", "DeWnTest1234")
+ .withTableNames(Arrays.asList("Heartbeat"))
+ .withResourceId(
+ "/subscriptions/192b9f85-a39a-4276-b96d-d5cd351703f9/resourceGroups/OIAutoRest1234/providers/Microsoft.EventHub/namespaces/test")
+ .create();
+ }
+}
+```
+
+### DataExports_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DataExports Delete. */
+public final class DataExportsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/DataExportDelete.json
+ */
+ /**
+ * Sample code: DataExportDelete.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void dataExportDelete(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.dataExports().deleteWithResponse("RgTest1", "DeWnTest1234", "export1", Context.NONE);
+ }
+}
+```
+
+### DataExports_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DataExports Get. */
+public final class DataExportsGetSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/DataExportGet.json
+ */
+ /**
+ * Sample code: DataExportGet.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void dataExportGet(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.dataExports().getWithResponse("RgTest1", "DeWnTest1234", "export1", Context.NONE);
+ }
+}
+```
+
+### DataExports_ListByWorkspace
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DataExports ListByWorkspace. */
+public final class DataExportsListByWorkspaceSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/DataExportListByWorkspace.json
+ */
+ /**
+ * Sample code: DataExportGet.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void dataExportGet(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.dataExports().listByWorkspace("RgTest1", "DeWnTest1234", Context.NONE);
+ }
+}
+```
+
+### DataSources_CreateOrUpdate
+
+```java
+import com.azure.core.management.serializer.SerializerFactory;
+import com.azure.core.util.serializer.SerializerEncoding;
+import com.azure.resourcemanager.loganalytics.models.DataSourceKind;
+import java.io.IOException;
+
+/** Samples for DataSources CreateOrUpdate. */
+public final class DataSourcesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/DataSourcesCreate.json
+ */
+ /**
+ * Sample code: DataSourcesCreate.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void dataSourcesCreate(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager)
+ throws IOException {
+ manager
+ .dataSources()
+ .define("AzTestDS774")
+ .withExistingWorkspace("OIAutoRest5123", "AzTest9724")
+ .withProperties(
+ SerializerFactory
+ .createDefaultManagementSerializerAdapter()
+ .deserialize(
+ "{\"LinkedResourceId\":\"/subscriptions/00000000-0000-0000-0000-00000000000/providers/microsoft.insights/eventtypes/management\"}",
+ Object.class,
+ SerializerEncoding.JSON))
+ .withKind(DataSourceKind.AZURE_ACTIVITY_LOG)
+ .create();
+ }
+}
+```
+
+### DataSources_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DataSources Delete. */
+public final class DataSourcesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/DataSourcesDelete.json
+ */
+ /**
+ * Sample code: DataSourcesDelete.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void dataSourcesDelete(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.dataSources().deleteWithResponse("OIAutoRest5123", "AzTest9724", "AzTestDS774", Context.NONE);
+ }
+}
+```
+
+### DataSources_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DataSources Get. */
+public final class DataSourcesGetSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/DataSourcesGet.json
+ */
+ /**
+ * Sample code: DataSourcesGet.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void dataSourcesGet(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.dataSources().getWithResponse("OIAutoRest5123", "AzTest9724", "AzTestDS774", Context.NONE);
+ }
+}
+```
+
+### DataSources_ListByWorkspace
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DataSources ListByWorkspace. */
+public final class DataSourcesListByWorkspaceSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/DataSourcesListByWorkspace.json
+ */
+ /**
+ * Sample code: DataSourcesListByWorkspace.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void dataSourcesListByWorkspace(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager
+ .dataSources()
+ .listByWorkspace("OIAutoRest5123", "AzTest9724", "kind='WindowsEvent'", null, Context.NONE);
+ }
+}
+```
+
+### DeletedWorkspaces_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DeletedWorkspaces List. */
+public final class DeletedWorkspacesListSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesSubscriptionList.json
+ */
+ /**
+ * Sample code: WorkspacesSubscriptionList.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void workspacesSubscriptionList(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.deletedWorkspaces().list(Context.NONE);
+ }
+}
+```
+
+### DeletedWorkspaces_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for DeletedWorkspaces ListByResourceGroup. */
+public final class DeletedWorkspacesListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesListByResourceGroup.json
+ */
+ /**
+ * Sample code: WorkspacesGet.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void workspacesGet(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.deletedWorkspaces().listByResourceGroup("oiautorest6685", Context.NONE);
+ }
+}
+```
+
+### Gateways_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Gateways Delete. */
+public final class GatewaysDeleteSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/WorkspacesGatewaysDelete.json
+ */
+ /**
+ * Sample code: DeleteGateways.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void deleteGateways(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager
+ .gateways()
+ .deleteWithResponse("OIAutoRest5123", "aztest5048", "00000000-0000-0000-0000-00000000000", Context.NONE);
+ }
+}
+```
+
+### IntelligencePacks_Disable
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for IntelligencePacks Disable. */
+public final class IntelligencePacksDisableSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/WorkspacesDisableIntelligencePack.json
+ */
+ /**
+ * Sample code: IntelligencePacksDisable.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void intelligencePacksDisable(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.intelligencePacks().disableWithResponse("rg1", "TestLinkWS", "ChangeTracking", Context.NONE);
+ }
+}
+```
+
+### IntelligencePacks_Enable
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for IntelligencePacks Enable. */
+public final class IntelligencePacksEnableSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/WorkspacesEnableIntelligencePack.json
+ */
+ /**
+ * Sample code: IntelligencePacksEnable.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void intelligencePacksEnable(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.intelligencePacks().enableWithResponse("rg1", "TestLinkWS", "ChangeTracking", Context.NONE);
+ }
+}
+```
+
+### IntelligencePacks_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for IntelligencePacks List. */
+public final class IntelligencePacksListSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/WorkspacesListIntelligencePacks.json
+ */
+ /**
+ * Sample code: IntelligencePacksList.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void intelligencePacksList(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.intelligencePacks().listWithResponse("rg1", "TestLinkWS", Context.NONE);
+ }
+}
+```
+
+### LinkedServices_CreateOrUpdate
+
+```java
+/** Samples for LinkedServices CreateOrUpdate. */
+public final class LinkedServicesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/LinkedServicesCreate.json
+ */
+ /**
+ * Sample code: LinkedServicesCreate.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void linkedServicesCreate(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager
+ .linkedServices()
+ .define("Cluster")
+ .withExistingWorkspace("mms-eus", "TestLinkWS")
+ .withWriteAccessResourceId(
+ "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/mms-eus/providers/Microsoft.OperationalInsights/clusters/testcluster")
+ .create();
+ }
+}
+```
+
+### LinkedServices_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for LinkedServices Delete. */
+public final class LinkedServicesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/LinkedServicesDelete.json
+ */
+ /**
+ * Sample code: LinkedServicesDelete.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void linkedServicesDelete(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.linkedServices().delete("rg1", "TestLinkWS", "Cluster", Context.NONE);
+ }
+}
+```
+
+### LinkedServices_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for LinkedServices Get. */
+public final class LinkedServicesGetSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/LinkedServicesGet.json
+ */
+ /**
+ * Sample code: LinkedServicesGet.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void linkedServicesGet(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.linkedServices().getWithResponse("mms-eus", "TestLinkWS", "Cluster", Context.NONE);
+ }
+}
+```
+
+### LinkedServices_ListByWorkspace
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for LinkedServices ListByWorkspace. */
+public final class LinkedServicesListByWorkspaceSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/LinkedServicesListByWorkspace.json
+ */
+ /**
+ * Sample code: LinkedServicesListByWorkspace.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void linkedServicesListByWorkspace(
+ com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.linkedServices().listByWorkspace("mms-eus", "TestLinkWS", Context.NONE);
+ }
+}
+```
+
+### LinkedStorageAccounts_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.loganalytics.models.DataSourceType;
+import java.util.Arrays;
+
+/** Samples for LinkedStorageAccounts CreateOrUpdate. */
+public final class LinkedStorageAccountsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/LinkedStorageAccountsCreate.json
+ */
+ /**
+ * Sample code: LinkedStorageAccountsCreate.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void linkedStorageAccountsCreate(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager
+ .linkedStorageAccounts()
+ .define(DataSourceType.CUSTOM_LOGS)
+ .withExistingWorkspace("mms-eus", "testLinkStorageAccountsWS")
+ .withStorageAccountIds(
+ Arrays
+ .asList(
+ "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/mms-eus/providers/Microsoft.Storage/storageAccounts/testStorageA",
+ "/subscriptions/00000000-0000-0000-0000-00000000000/resourceGroups/mms-eus/providers/Microsoft.Storage/storageAccounts/testStorageB"))
+ .create();
+ }
+}
+```
+
+### LinkedStorageAccounts_Delete
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.loganalytics.models.DataSourceType;
+
+/** Samples for LinkedStorageAccounts Delete. */
+public final class LinkedStorageAccountsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/LinkedStorageAccountsDelete.json
+ */
+ /**
+ * Sample code: LinkedStorageAccountsDelete.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void linkedStorageAccountsDelete(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager
+ .linkedStorageAccounts()
+ .deleteWithResponse("mms-eus", "testLinkStorageAccountsWS", DataSourceType.CUSTOM_LOGS, Context.NONE);
+ }
+}
+```
+
+### LinkedStorageAccounts_Get
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.loganalytics.models.DataSourceType;
+
+/** Samples for LinkedStorageAccounts Get. */
+public final class LinkedStorageAccountsGetSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/LinkedStorageAccountsGet.json
+ */
+ /**
+ * Sample code: LinkedStorageAccountsGet.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void linkedStorageAccountsGet(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager
+ .linkedStorageAccounts()
+ .getWithResponse("mms-eus", "testLinkStorageAccountsWS", DataSourceType.CUSTOM_LOGS, Context.NONE);
+ }
+}
+```
+
+### LinkedStorageAccounts_ListByWorkspace
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for LinkedStorageAccounts ListByWorkspace. */
+public final class LinkedStorageAccountsListByWorkspaceSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/LinkedStorageAccountsListByWorkspace.json
+ */
+ /**
+ * Sample code: Gets list of linked storage accounts on a workspace.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void getsListOfLinkedStorageAccountsOnAWorkspace(
+ com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.linkedStorageAccounts().listByWorkspace("mms-eus", "testLinkStorageAccountsWS", Context.NONE);
+ }
+}
+```
+
+### ManagementGroups_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for ManagementGroups List. */
+public final class ManagementGroupsListSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/WorkspacesListManagementGroups.json
+ */
+ /**
+ * Sample code: WorkspacesListManagementGroups.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void workspacesListManagementGroups(
+ com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.managementGroups().list("rg1", "TestLinkWS", Context.NONE);
+ }
+}
+```
+
+### OperationStatuses_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for OperationStatuses Get. */
+public final class OperationStatusesGetSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/OperationStatusesGet.json
+ */
+ /**
+ * Sample code: Get specific operation status.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void getSpecificOperationStatus(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.operationStatuses().getWithResponse("West US", "713192d7-503f-477a-9cfe-4efc3ee2bd11", Context.NONE);
+ }
+}
+```
+
+### Operations_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Operations List. */
+public final class OperationsListSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/OperationsListByTenant.json
+ */
+ /**
+ * Sample code: Get specific operation status.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void getSpecificOperationStatus(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.operations().list(Context.NONE);
+ }
+}
+```
+
+### SavedSearches_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.loganalytics.models.Tag;
+import java.util.Arrays;
+
+/** Samples for SavedSearches CreateOrUpdate. */
+public final class SavedSearchesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/WorkspacesSavedSearchesCreateOrUpdate.json
+ */
+ /**
+ * Sample code: SavedSearchCreateOrUpdate.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void savedSearchCreateOrUpdate(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager
+ .savedSearches()
+ .define("00000000-0000-0000-0000-00000000000")
+ .withExistingWorkspace("TestRG", "TestWS")
+ .withCategory("Saved Search Test Category")
+ .withDisplayName("Create or Update Saved Search Test")
+ .withQuery("Heartbeat | summarize Count() by Computer | take a")
+ .withTags(Arrays.asList(new Tag().withName("Group").withValue("Computer")))
+ .withFunctionAlias("heartbeat_func")
+ .withFunctionParameters("a:int=1")
+ .withVersion(2L)
+ .create();
+ }
+}
+```
+
+### SavedSearches_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SavedSearches Delete. */
+public final class SavedSearchesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/WorkspacesDeleteSavedSearches.json
+ */
+ /**
+ * Sample code: SavedSearchesDelete.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void savedSearchesDelete(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager
+ .savedSearches()
+ .deleteWithResponse("TestRG", "TestWS", "00000000-0000-0000-0000-00000000000", Context.NONE);
+ }
+}
+```
+
+### SavedSearches_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SavedSearches Get. */
+public final class SavedSearchesGetSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/WorkspacesSavedSearchesGet.json
+ */
+ /**
+ * Sample code: SavedSearchesGet.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void savedSearchesGet(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager
+ .savedSearches()
+ .getWithResponse("TestRG", "TestWS", "00000000-0000-0000-0000-00000000000", Context.NONE);
+ }
+}
+```
+
+### SavedSearches_ListByWorkspace
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SavedSearches ListByWorkspace. */
+public final class SavedSearchesListByWorkspaceSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/SavedSearchesListByWorkspace.json
+ */
+ /**
+ * Sample code: SavedSearchesList.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void savedSearchesList(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.savedSearches().listByWorkspaceWithResponse("TestRG", "TestWS", Context.NONE);
+ }
+}
+```
+
+### Schema_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Schema Get. */
+public final class SchemaGetSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/SavedSearchesGetSchema.json
+ */
+ /**
+ * Sample code: WorkspacesGetSchema.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void workspacesGetSchema(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.schemas().getWithResponse("mms-eus", "atlantisdemo", Context.NONE);
+ }
+}
+```
+
+### SharedKeysOperation_GetSharedKeys
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SharedKeysOperation GetSharedKeys. */
+public final class SharedKeysOperationGetSharedKeysSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/WorkspacesGetSharedKeys.json
+ */
+ /**
+ * Sample code: SharedKeysList.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void sharedKeysList(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.sharedKeysOperations().getSharedKeysWithResponse("rg1", "TestLinkWS", Context.NONE);
+ }
+}
+```
+
+### SharedKeysOperation_Regenerate
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for SharedKeysOperation Regenerate. */
+public final class SharedKeysOperationRegenerateSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/WorkspacesRegenerateSharedKeys.json
+ */
+ /**
+ * Sample code: RegenerateSharedKeys.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void regenerateSharedKeys(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.sharedKeysOperations().regenerateWithResponse("rg1", "workspace1", Context.NONE);
+ }
+}
+```
+
+### StorageInsightConfigs_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.loganalytics.models.StorageAccount;
+import java.util.Arrays;
+
+/** Samples for StorageInsightConfigs CreateOrUpdate. */
+public final class StorageInsightConfigsCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/StorageInsightsCreateOrUpdate.json
+ */
+ /**
+ * Sample code: StorageInsightsCreate.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void storageInsightsCreate(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager
+ .storageInsightConfigs()
+ .define("AzTestSI1110")
+ .withExistingWorkspace("OIAutoRest5123", "aztest5048")
+ .withContainers(Arrays.asList("wad-iis-logfiles"))
+ .withTables(Arrays.asList("WADWindowsEventLogsTable", "LinuxSyslogVer2v0"))
+ .withStorageAccount(
+ new StorageAccount()
+ .withId(
+ "/subscriptions/00000000-0000-0000-0000-000000000005/resourcegroups/OIAutoRest6987/providers/microsoft.storage/storageaccounts/AzTestFakeSA9945")
+ .withKey("1234"))
+ .create();
+ }
+}
+```
+
+### StorageInsightConfigs_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for StorageInsightConfigs Delete. */
+public final class StorageInsightConfigsDeleteSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/StorageInsightsDelete.json
+ */
+ /**
+ * Sample code: StorageInsightsDelete.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void storageInsightsDelete(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager
+ .storageInsightConfigs()
+ .deleteWithResponse("OIAutoRest5123", "aztest5048", "AzTestSI1110", Context.NONE);
+ }
+}
+```
+
+### StorageInsightConfigs_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for StorageInsightConfigs Get. */
+public final class StorageInsightConfigsGetSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/StorageInsightsGet.json
+ */
+ /**
+ * Sample code: StorageInsightsGet.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void storageInsightsGet(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.storageInsightConfigs().getWithResponse("OIAutoRest5123", "aztest5048", "AzTestSI1110", Context.NONE);
+ }
+}
+```
+
+### StorageInsightConfigs_ListByWorkspace
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for StorageInsightConfigs ListByWorkspace. */
+public final class StorageInsightConfigsListByWorkspaceSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/StorageInsightsListByWorkspace.json
+ */
+ /**
+ * Sample code: StorageInsightsList.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void storageInsightsList(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.storageInsightConfigs().listByWorkspace("OIAutoRest5123", "aztest5048", Context.NONE);
+ }
+}
+```
+
+### Tables_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.loganalytics.models.Column;
+import com.azure.resourcemanager.loganalytics.models.ColumnTypeEnum;
+import com.azure.resourcemanager.loganalytics.models.Schema;
+import java.util.Arrays;
+
+/** Samples for Tables CreateOrUpdate. */
+public final class TablesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/TablesUpsert.json
+ */
+ /**
+ * Sample code: TablesUpsert.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void tablesUpsert(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager
+ .tables()
+ .define("AzureNetworkFlow")
+ .withExistingWorkspace("oiautorest6685", "oiautorest6685")
+ .withRetentionInDays(45)
+ .withTotalRetentionInDays(70)
+ .withSchema(
+ new Schema()
+ .withName("AzureNetworkFlow")
+ .withColumns(Arrays.asList(new Column().withName("MyNewColumn").withType(ColumnTypeEnum.GUID))))
+ .create();
+ }
+}
+```
+
+### Tables_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Tables Delete. */
+public final class TablesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/TablesDelete.json
+ */
+ /**
+ * Sample code: TablesGet.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void tablesGet(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.tables().delete("oiautorest6685", "oiautorest6685", "table1_CL", Context.NONE);
+ }
+}
+```
+
+### Tables_Get
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Tables Get. */
+public final class TablesGetSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/TablesGet.json
+ */
+ /**
+ * Sample code: TablesGet.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void tablesGet(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.tables().getWithResponse("oiautorest6685", "oiautorest6685", "table1_SRCH", Context.NONE);
+ }
+}
+```
+
+### Tables_ListByWorkspace
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Tables ListByWorkspace. */
+public final class TablesListByWorkspaceSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/TablesList.json
+ */
+ /**
+ * Sample code: TablesListByWorkspace.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void tablesListByWorkspace(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.tables().listByWorkspace("oiautorest6685", "oiautorest6685", Context.NONE);
+ }
+}
+```
+
+### Tables_Migrate
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Tables Migrate. */
+public final class TablesMigrateSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/TablesMigrate.json
+ */
+ /**
+ * Sample code: TablesGet.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void tablesGet(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.tables().migrateWithResponse("oiautorest6685", "oiautorest6685", "table1_CL", Context.NONE);
+ }
+}
+```
+
+### Tables_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.loganalytics.models.Column;
+import com.azure.resourcemanager.loganalytics.models.ColumnTypeEnum;
+import com.azure.resourcemanager.loganalytics.models.Schema;
+import com.azure.resourcemanager.loganalytics.models.Table;
+import java.util.Arrays;
+
+/** Samples for Tables Update. */
+public final class TablesUpdateSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/TablesUpsert.json
+ */
+ /**
+ * Sample code: TablesUpsert.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void tablesUpsert(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ Table resource =
+ manager
+ .tables()
+ .getWithResponse("oiautorest6685", "oiautorest6685", "AzureNetworkFlow", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withRetentionInDays(45)
+ .withTotalRetentionInDays(70)
+ .withSchema(
+ new Schema()
+ .withName("AzureNetworkFlow")
+ .withColumns(Arrays.asList(new Column().withName("MyNewColumn").withType(ColumnTypeEnum.GUID))))
+ .apply();
+ }
+}
+```
+
+### Usages_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Usages List. */
+public final class UsagesListSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/WorkspacesListUsages.json
+ */
+ /**
+ * Sample code: UsagesList.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void usagesList(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.usages().list("rg1", "TestLinkWS", Context.NONE);
+ }
+}
+```
+
+### WorkspacePurge_GetPurgeStatus
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for WorkspacePurge GetPurgeStatus. */
+public final class WorkspacePurgeGetPurgeStatusSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/WorkspacesPurgeOperation.json
+ */
+ /**
+ * Sample code: WorkspacePurgeOperation.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void workspacePurgeOperation(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager
+ .workspacePurges()
+ .getPurgeStatusWithResponse(
+ "OIAutoRest5123", "aztest5048", "purge-970318e7-b859-4edb-8903-83b1b54d0b74", Context.NONE);
+ }
+}
+```
+
+### WorkspacePurge_Purge
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.loganalytics.models.WorkspacePurgeBody;
+import com.azure.resourcemanager.loganalytics.models.WorkspacePurgeBodyFilters;
+import java.util.Arrays;
+
+/** Samples for WorkspacePurge Purge. */
+public final class WorkspacePurgePurgeSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/WorkspacesPurge.json
+ */
+ /**
+ * Sample code: WorkspacePurge.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void workspacePurge(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager
+ .workspacePurges()
+ .purgeWithResponse(
+ "OIAutoRest5123",
+ "aztest5048",
+ new WorkspacePurgeBody()
+ .withTable("Heartbeat")
+ .withFilters(
+ Arrays
+ .asList(
+ new WorkspacePurgeBodyFilters()
+ .withColumn("TimeGenerated")
+ .withOperator(">")
+ .withValue("2017-09-01T00:00:00"))),
+ Context.NONE);
+ }
+}
+```
+
+### Workspaces_CreateOrUpdate
+
+```java
+import com.azure.resourcemanager.loganalytics.models.WorkspaceSku;
+import com.azure.resourcemanager.loganalytics.models.WorkspaceSkuNameEnum;
+import java.util.HashMap;
+import java.util.Map;
+
+/** Samples for Workspaces CreateOrUpdate. */
+public final class WorkspacesCreateOrUpdateSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesCreate.json
+ */
+ /**
+ * Sample code: WorkspacesCreate.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void workspacesCreate(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager
+ .workspaces()
+ .define("oiautorest6685")
+ .withRegion("australiasoutheast")
+ .withExistingResourceGroup("oiautorest6685")
+ .withTags(mapOf("tag1", "val1"))
+ .withSku(new WorkspaceSku().withName(WorkspaceSkuNameEnum.PER_GB2018))
+ .withRetentionInDays(30)
+ .create();
+ }
+
+ @SuppressWarnings("unchecked")
+ private static Map mapOf(Object... inputs) {
+ Map map = new HashMap<>();
+ for (int i = 0; i < inputs.length; i += 2) {
+ String key = (String) inputs[i];
+ T value = (T) inputs[i + 1];
+ map.put(key, value);
+ }
+ return map;
+ }
+}
+```
+
+### Workspaces_Delete
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Workspaces Delete. */
+public final class WorkspacesDeleteSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesDelete.json
+ */
+ /**
+ * Sample code: WorkspacesDelete.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void workspacesDelete(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.workspaces().delete("oiautorest6685", "oiautorest6685", null, Context.NONE);
+ }
+}
+```
+
+### Workspaces_GetByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Workspaces GetByResourceGroup. */
+public final class WorkspacesGetByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesGet.json
+ */
+ /**
+ * Sample code: WorkspaceGet.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void workspaceGet(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.workspaces().getByResourceGroupWithResponse("oiautorest6685", "oiautorest6685", Context.NONE);
+ }
+}
+```
+
+### Workspaces_List
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Workspaces List. */
+public final class WorkspacesListSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesSubscriptionList.json
+ */
+ /**
+ * Sample code: WorkspacesSubscriptionList.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void workspacesSubscriptionList(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.workspaces().list(Context.NONE);
+ }
+}
+```
+
+### Workspaces_ListByResourceGroup
+
+```java
+import com.azure.core.util.Context;
+
+/** Samples for Workspaces ListByResourceGroup. */
+public final class WorkspacesListByResourceGroupSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesListByResourceGroup.json
+ */
+ /**
+ * Sample code: WorkspacesGet.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void workspacesGet(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ manager.workspaces().listByResourceGroup("oiautorest6685", Context.NONE);
+ }
+}
+```
+
+### Workspaces_Update
+
+```java
+import com.azure.core.util.Context;
+import com.azure.resourcemanager.loganalytics.models.Workspace;
+import com.azure.resourcemanager.loganalytics.models.WorkspaceCapping;
+import com.azure.resourcemanager.loganalytics.models.WorkspaceSku;
+import com.azure.resourcemanager.loganalytics.models.WorkspaceSkuNameEnum;
+
+/** Samples for Workspaces Update. */
+public final class WorkspacesUpdateSamples {
+ /*
+ * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesUpdate.json
+ */
+ /**
+ * Sample code: WorkspacesPatch.
+ *
+ * @param manager Entry point to LogAnalyticsManager.
+ */
+ public static void workspacesPatch(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) {
+ Workspace resource =
+ manager
+ .workspaces()
+ .getByResourceGroupWithResponse("oiautorest6685", "oiautorest6685", Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withSku(new WorkspaceSku().withName(WorkspaceSkuNameEnum.PER_GB2018))
+ .withRetentionInDays(30)
+ .withWorkspaceCapping(new WorkspaceCapping().withDailyQuotaGb(-1.0))
+ .apply();
+ }
+}
+```
+
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/pom.xml b/sdk/loganalytics/azure-resourcemanager-loganalytics/pom.xml
index 7f4411c8a257..2d9df834da79 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/pom.xml
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/pom.xml
@@ -1,55 +1,55 @@
- 4.0.0
-
- com.azure
- azure-client-sdk-parent
- 1.7.0
- ../../parents/azure-client-sdk-parent
-
+ 4.0.0
+
+ com.azure
+ azure-client-sdk-parent
+ 1.7.0
+ ../../parents/azure-client-sdk-parent
+
- com.azure.resourcemanager
- azure-resourcemanager-loganalytics
- 1.0.0-beta.3
- jar
+ com.azure.resourcemanager
+ azure-resourcemanager-loganalytics
+ 1.0.0-beta.3
+ jar
- Microsoft Azure SDK for LogAnalytics Management
- This package contains Microsoft Azure SDK for LogAnalytics Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Operational Insights Client. Package tag package-2020-08.
- https://github.com/Azure/azure-sdk-for-java
+ Microsoft Azure SDK for LogAnalytics Management
+ This package contains Microsoft Azure SDK for LogAnalytics Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Operational Insights Client. Package tag package-2021-12-01-preview.
+ https://github.com/Azure/azure-sdk-for-java
-
-
- The MIT License (MIT)
- http://opensource.org/licenses/MIT
- repo
-
-
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
-
- https://github.com/Azure/azure-sdk-for-java
- scm:git:git@github.com:Azure/azure-sdk-for-java.git
- scm:git:git@github.com:Azure/azure-sdk-for-java.git
- HEAD
-
-
-
- microsoft
- Microsoft
-
-
-
- UTF-8
- true
-
-
-
- com.azure
- azure-core
- 1.25.0
-
-
- com.azure
- azure-core-management
- 1.5.2
-
-
+
+ https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
+ HEAD
+
+
+
+ microsoft
+ Microsoft
+
+
+
+ UTF-8
+ true
+
+
+
+ com.azure
+ azure-core
+ 1.25.0
+
+
+ com.azure
+ azure-core-management
+ 1.5.2
+
+
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/LogAnalyticsManager.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/LogAnalyticsManager.java
index 376975bad8cd..7c51602d61fa 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/LogAnalyticsManager.java
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/LogAnalyticsManager.java
@@ -8,8 +8,8 @@
import com.azure.core.http.HttpClient;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.HttpPipelinePosition;
import com.azure.core.http.policy.AddDatePolicy;
-import com.azure.core.http.policy.BearerTokenAuthenticationPolicy;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
@@ -17,6 +17,7 @@
import com.azure.core.http.policy.RequestIdPolicy;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
+import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy;
import com.azure.core.management.profile.AzureProfile;
import com.azure.core.util.Configuration;
import com.azure.core.util.logging.ClientLogger;
@@ -67,9 +68,18 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
+import java.util.stream.Collectors;
/** Entry point to LogAnalyticsManager. Operational Insights Client. */
public final class LogAnalyticsManager {
+ private Operations operations;
+
+ private Workspaces workspaces;
+
+ private DeletedWorkspaces deletedWorkspaces;
+
+ private Tables tables;
+
private DataExports dataExports;
private DataSources dataSources;
@@ -82,20 +92,12 @@ public final class LogAnalyticsManager {
private ManagementGroups managementGroups;
- private Operations operations;
-
private OperationStatuses operationStatuses;
private SharedKeysOperations sharedKeysOperations;
private Usages usages;
- private Workspaces workspaces;
-
- private DeletedWorkspaces deletedWorkspaces;
-
- private Clusters clusters;
-
private StorageInsightConfigs storageInsightConfigs;
private SavedSearches savedSearches;
@@ -108,7 +110,7 @@ public final class LogAnalyticsManager {
private WorkspacePurges workspacePurges;
- private Tables tables;
+ private Clusters clusters;
private final OperationalInsightsManagementClient clientObject;
@@ -153,6 +155,7 @@ public static final class Configurable {
private HttpClient httpClient;
private HttpLogOptions httpLogOptions;
private final List policies = new ArrayList<>();
+ private final List scopes = new ArrayList<>();
private RetryPolicy retryPolicy;
private Duration defaultPollInterval;
@@ -192,6 +195,17 @@ public Configurable withPolicy(HttpPipelinePolicy policy) {
return this;
}
+ /**
+ * Adds the scope to permission sets.
+ *
+ * @param scope the scope.
+ * @return the configurable object itself.
+ */
+ public Configurable withScope(String scope) {
+ this.scopes.add(Objects.requireNonNull(scope, "'scope' cannot be null."));
+ return this;
+ }
+
/**
* Sets the retry policy to the HTTP pipeline.
*
@@ -234,7 +248,7 @@ public LogAnalyticsManager authenticate(TokenCredential credential, AzureProfile
.append("-")
.append("com.azure.resourcemanager.loganalytics")
.append("/")
- .append("1.0.0-beta.2");
+ .append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
@@ -248,19 +262,33 @@ public LogAnalyticsManager authenticate(TokenCredential credential, AzureProfile
userAgentBuilder.append(" (auto-generated)");
}
+ if (scopes.isEmpty()) {
+ scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default");
+ }
if (retryPolicy == null) {
retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS);
}
List policies = new ArrayList<>();
policies.add(new UserAgentPolicy(userAgentBuilder.toString()));
policies.add(new RequestIdPolicy());
+ policies
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addBeforeRetryPolicies(policies);
policies.add(retryPolicy);
policies.add(new AddDatePolicy());
+ policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0])));
policies
- .add(
- new BearerTokenAuthenticationPolicy(
- credential, profile.getEnvironment().getManagementEndpoint() + "/.default"));
+ .addAll(
+ this
+ .policies
+ .stream()
+ .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)
+ .collect(Collectors.toList()));
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
HttpPipeline httpPipeline =
@@ -272,6 +300,38 @@ public LogAnalyticsManager authenticate(TokenCredential credential, AzureProfile
}
}
+ /** @return Resource collection API of Operations. */
+ public Operations operations() {
+ if (this.operations == null) {
+ this.operations = new OperationsImpl(clientObject.getOperations(), this);
+ }
+ return operations;
+ }
+
+ /** @return Resource collection API of Workspaces. */
+ public Workspaces workspaces() {
+ if (this.workspaces == null) {
+ this.workspaces = new WorkspacesImpl(clientObject.getWorkspaces(), this);
+ }
+ return workspaces;
+ }
+
+ /** @return Resource collection API of DeletedWorkspaces. */
+ public DeletedWorkspaces deletedWorkspaces() {
+ if (this.deletedWorkspaces == null) {
+ this.deletedWorkspaces = new DeletedWorkspacesImpl(clientObject.getDeletedWorkspaces(), this);
+ }
+ return deletedWorkspaces;
+ }
+
+ /** @return Resource collection API of Tables. */
+ public Tables tables() {
+ if (this.tables == null) {
+ this.tables = new TablesImpl(clientObject.getTables(), this);
+ }
+ return tables;
+ }
+
/** @return Resource collection API of DataExports. */
public DataExports dataExports() {
if (this.dataExports == null) {
@@ -320,14 +380,6 @@ public ManagementGroups managementGroups() {
return managementGroups;
}
- /** @return Resource collection API of Operations. */
- public Operations operations() {
- if (this.operations == null) {
- this.operations = new OperationsImpl(clientObject.getOperations(), this);
- }
- return operations;
- }
-
/** @return Resource collection API of OperationStatuses. */
public OperationStatuses operationStatuses() {
if (this.operationStatuses == null) {
@@ -352,30 +404,6 @@ public Usages usages() {
return usages;
}
- /** @return Resource collection API of Workspaces. */
- public Workspaces workspaces() {
- if (this.workspaces == null) {
- this.workspaces = new WorkspacesImpl(clientObject.getWorkspaces(), this);
- }
- return workspaces;
- }
-
- /** @return Resource collection API of DeletedWorkspaces. */
- public DeletedWorkspaces deletedWorkspaces() {
- if (this.deletedWorkspaces == null) {
- this.deletedWorkspaces = new DeletedWorkspacesImpl(clientObject.getDeletedWorkspaces(), this);
- }
- return deletedWorkspaces;
- }
-
- /** @return Resource collection API of Clusters. */
- public Clusters clusters() {
- if (this.clusters == null) {
- this.clusters = new ClustersImpl(clientObject.getClusters(), this);
- }
- return clusters;
- }
-
/** @return Resource collection API of StorageInsightConfigs. */
public StorageInsightConfigs storageInsightConfigs() {
if (this.storageInsightConfigs == null) {
@@ -424,12 +452,12 @@ public WorkspacePurges workspacePurges() {
return workspacePurges;
}
- /** @return Resource collection API of Tables. */
- public Tables tables() {
- if (this.tables == null) {
- this.tables = new TablesImpl(clientObject.getTables(), this);
+ /** @return Resource collection API of Clusters. */
+ public Clusters clusters() {
+ if (this.clusters == null) {
+ this.clusters = new ClustersImpl(clientObject.getClusters(), this);
}
- return tables;
+ return clusters;
}
/**
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/AvailableServiceTiersClient.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/AvailableServiceTiersClient.java
index 87da77ea3418..c6120a4bb8f9 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/AvailableServiceTiersClient.java
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/AvailableServiceTiersClient.java
@@ -35,7 +35,7 @@ public interface AvailableServiceTiersClient {
* @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 available service tiers for the workspace.
+ * @return the available service tiers for the workspace along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response> listByWorkspaceWithResponse(
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/ClustersClient.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/ClustersClient.java
index ea21003519bd..c7df2eb352fa 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/ClustersClient.java
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/ClustersClient.java
@@ -23,7 +23,7 @@ public interface ClustersClient {
* @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 log Analytics clusters in a resource group.
+ * @return log Analytics clusters in a resource group as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName);
@@ -36,7 +36,7 @@ public interface ClustersClient {
* @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 log Analytics clusters in a resource group.
+ * @return log Analytics clusters in a resource group as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName, Context context);
@@ -46,7 +46,7 @@ public interface ClustersClient {
*
* @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 Log Analytics clusters in a subscription.
+ * @return the Log Analytics clusters in a subscription as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -58,7 +58,7 @@ public interface ClustersClient {
* @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 Log Analytics clusters in a subscription.
+ * @return the Log Analytics clusters in a subscription as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
@@ -72,9 +72,9 @@ public interface ClustersClient {
* @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 Log Analytics cluster resource container.
+ * @return the {@link SyncPoller} for polling of the top level Log Analytics cluster resource container.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, ClusterInner> beginCreateOrUpdate(
String resourceGroupName, String clusterName, ClusterInner parameters);
@@ -88,9 +88,9 @@ SyncPoller, ClusterInner> beginCreateOrUpdate(
* @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 Log Analytics cluster resource container.
+ * @return the {@link SyncPoller} for polling of the top level Log Analytics cluster resource container.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, ClusterInner> beginCreateOrUpdate(
String resourceGroupName, String clusterName, ClusterInner parameters, Context context);
@@ -131,9 +131,9 @@ SyncPoller, ClusterInner> beginCreateOrUpdate(
* @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.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName);
/**
@@ -145,9 +145,9 @@ SyncPoller, ClusterInner> beginCreateOrUpdate(
* @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.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName, Context context);
/**
@@ -197,12 +197,43 @@ SyncPoller, ClusterInner> beginCreateOrUpdate(
* @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 Log Analytics cluster instance.
+ * @return a Log Analytics cluster instance along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getByResourceGroupWithResponse(
String resourceGroupName, String clusterName, Context 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of the top level Log Analytics cluster resource container.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ClusterInner> beginUpdate(
+ String resourceGroupName, String clusterName, ClusterPatch parameters);
+
+ /**
+ * 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 com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of the top level Log Analytics cluster resource container.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, ClusterInner> beginUpdate(
+ String resourceGroupName, String clusterName, ClusterPatch parameters, Context context);
+
/**
* Updates a Log Analytics cluster.
*
@@ -230,6 +261,5 @@ Response getByResourceGroupWithResponse(
* @return the top level Log Analytics cluster resource container.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response updateWithResponse(
- String resourceGroupName, String clusterName, ClusterPatch parameters, Context context);
+ ClusterInner update(String resourceGroupName, String clusterName, ClusterPatch parameters, Context context);
}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/DataExportsClient.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/DataExportsClient.java
index 909ceda84a3e..94ec80673103 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/DataExportsClient.java
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/DataExportsClient.java
@@ -21,7 +21,7 @@ public interface DataExportsClient {
* @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 result of the request to list data exports.
+ * @return result of the request to list data exports as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByWorkspace(String resourceGroupName, String workspaceName);
@@ -35,7 +35,7 @@ public interface DataExportsClient {
* @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 result of the request to list data exports.
+ * @return result of the request to list data exports as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, Context context);
@@ -67,7 +67,7 @@ DataExportInner createOrUpdate(
* @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 data export resource container.
+ * @return the top level data export resource container along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response createOrUpdateWithResponse(
@@ -101,7 +101,7 @@ Response createOrUpdateWithResponse(
* @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 data export instance.
+ * @return a data export instance along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(
@@ -130,7 +130,7 @@ Response getWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response deleteWithResponse(
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/DataSourcesClient.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/DataSourcesClient.java
index 7136276001b8..4971182048e5 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/DataSourcesClient.java
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/DataSourcesClient.java
@@ -40,7 +40,7 @@ DataSourceInner createOrUpdate(
* @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 datasources under OMS Workspace.
+ * @return datasources under OMS Workspace along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response createOrUpdateWithResponse(
@@ -73,7 +73,7 @@ Response createOrUpdateWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response deleteWithResponse(
@@ -103,7 +103,7 @@ Response deleteWithResponse(
* @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 datasource instance.
+ * @return a datasource instance along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(
@@ -118,7 +118,8 @@ Response getWithResponse(
* @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 first page of data source instances in a workspace with the link to the next page.
+ * @return the first page of data source instances in a workspace with the link to the next page as paginated
+ * response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, String filter);
@@ -134,7 +135,8 @@ Response getWithResponse(
* @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 first page of data source instances in a workspace with the link to the next page.
+ * @return the first page of data source instances in a workspace with the link to the next page as paginated
+ * response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByWorkspace(
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/DeletedWorkspacesClient.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/DeletedWorkspacesClient.java
index bfe3d7e6f65e..0c0bfc73924b 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/DeletedWorkspacesClient.java
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/DeletedWorkspacesClient.java
@@ -17,7 +17,8 @@ public interface DeletedWorkspacesClient {
*
* @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 recently deleted workspaces in a subscription, available for recovery.
+ * @return recently deleted workspaces in a subscription, available for recovery as paginated response with {@link
+ * PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -29,7 +30,8 @@ public interface DeletedWorkspacesClient {
* @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 recently deleted workspaces in a subscription, available for recovery.
+ * @return recently deleted workspaces in a subscription, available for recovery as paginated response with {@link
+ * PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
@@ -41,7 +43,8 @@ public interface DeletedWorkspacesClient {
* @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 recently deleted workspaces in a resource group, available for recovery.
+ * @return recently deleted workspaces in a resource group, available for recovery as paginated response with {@link
+ * PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName);
@@ -54,7 +57,8 @@ public interface DeletedWorkspacesClient {
* @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 recently deleted workspaces in a resource group, available for recovery.
+ * @return recently deleted workspaces in a resource group, available for recovery as paginated response with {@link
+ * PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName, Context context);
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/GatewaysClient.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/GatewaysClient.java
index 67166742fd62..0f1f4f4c1796 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/GatewaysClient.java
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/GatewaysClient.java
@@ -34,7 +34,7 @@ public interface GatewaysClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response deleteWithResponse(
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/IntelligencePacksClient.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/IntelligencePacksClient.java
index f9f450e40ec3..68913d829b3c 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/IntelligencePacksClient.java
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/IntelligencePacksClient.java
@@ -36,7 +36,7 @@ public interface IntelligencePacksClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response disableWithResponse(
@@ -65,7 +65,7 @@ Response disableWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response enableWithResponse(
@@ -93,7 +93,7 @@ Response enableWithResponse(
* @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 array of IntelligencePack.
+ * @return array of IntelligencePack along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response> listWithResponse(
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/LinkedServicesClient.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/LinkedServicesClient.java
index 52d5ed546759..b4d809df0fda 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/LinkedServicesClient.java
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/LinkedServicesClient.java
@@ -25,9 +25,9 @@ public interface LinkedServicesClient {
* @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 Linked service resource container.
+ * @return the {@link SyncPoller} for polling of the top level Linked service resource container.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, LinkedServiceInner> beginCreateOrUpdate(
String resourceGroupName, String workspaceName, String linkedServiceName, LinkedServiceInner parameters);
@@ -42,9 +42,9 @@ SyncPoller, LinkedServiceInner> beginCreateOrUpda
* @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 Linked service resource container.
+ * @return the {@link SyncPoller} for polling of the top level Linked service resource container.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, LinkedServiceInner> beginCreateOrUpdate(
String resourceGroupName,
String workspaceName,
@@ -98,9 +98,9 @@ LinkedServiceInner createOrUpdate(
* @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 Linked service resource container.
+ * @return the {@link SyncPoller} for polling of the top level Linked service resource container.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, LinkedServiceInner> beginDelete(
String resourceGroupName, String workspaceName, String linkedServiceName);
@@ -114,9 +114,9 @@ SyncPoller, LinkedServiceInner> beginDelete(
* @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 Linked service resource container.
+ * @return the {@link SyncPoller} for polling of the top level Linked service resource container.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, LinkedServiceInner> beginDelete(
String resourceGroupName, String workspaceName, String linkedServiceName, Context context);
@@ -174,7 +174,7 @@ LinkedServiceInner delete(
* @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 linked service instance.
+ * @return a linked service instance along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(
@@ -188,7 +188,7 @@ Response getWithResponse(
* @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 linked services instances in a workspace.
+ * @return the linked services instances in a workspace as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByWorkspace(String resourceGroupName, String workspaceName);
@@ -202,7 +202,7 @@ Response getWithResponse(
* @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 linked services instances in a workspace.
+ * @return the linked services instances in a workspace as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, Context context);
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/LinkedStorageAccountsClient.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/LinkedStorageAccountsClient.java
index db9567cfed52..a4a108f8a888 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/LinkedStorageAccountsClient.java
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/LinkedStorageAccountsClient.java
@@ -46,7 +46,7 @@ LinkedStorageAccountsResourceInner createOrUpdate(
* @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 linked storage accounts top level resource container.
+ * @return linked storage accounts top level resource container along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response createOrUpdateWithResponse(
@@ -79,7 +79,7 @@ Response createOrUpdateWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response deleteWithResponse(
@@ -110,7 +110,8 @@ LinkedStorageAccountsResourceInner get(
* @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 all linked storage account of a specific data source type associated with the specified workspace.
+ * @return all linked storage account of a specific data source type associated with the specified workspace along
+ * with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(
@@ -126,7 +127,7 @@ Response getWithResponse(
* @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 all linked storage accounts associated with the specified workspace, storage accounts will be sorted by
- * their data source type.
+ * their data source type as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByWorkspace(String resourceGroupName, String workspaceName);
@@ -142,7 +143,7 @@ Response getWithResponse(
* @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 all linked storage accounts associated with the specified workspace, storage accounts will be sorted by
- * their data source type.
+ * their data source type as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByWorkspace(
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/ManagementGroupsClient.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/ManagementGroupsClient.java
index 827ffa214064..70871d7802d8 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/ManagementGroupsClient.java
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/ManagementGroupsClient.java
@@ -20,7 +20,7 @@ public interface ManagementGroupsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of management groups connected to a workspace.
+ * @return a list of management groups connected to a workspace as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String resourceGroupName, String workspaceName);
@@ -34,7 +34,7 @@ public interface ManagementGroupsClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of management groups connected to a workspace.
+ * @return a list of management groups connected to a workspace as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String resourceGroupName, String workspaceName, Context context);
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/OperationStatusesClient.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/OperationStatusesClient.java
index d28d2e657878..63d4779ef512 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/OperationStatusesClient.java
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/OperationStatusesClient.java
@@ -34,7 +34,7 @@ public interface OperationStatusesClient {
* @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 status of a long running azure asynchronous operation.
+ * @return the status of a long running azure asynchronous operation along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(String location, String asyncOperationId, Context context);
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/OperationalInsightsManagementClient.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/OperationalInsightsManagementClient.java
index ecb9e1ead6dc..d739f9196524 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/OperationalInsightsManagementClient.java
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/OperationalInsightsManagementClient.java
@@ -23,13 +23,6 @@ public interface OperationalInsightsManagementClient {
*/
String getEndpoint();
- /**
- * Gets Api Version.
- *
- * @return the apiVersion value.
- */
- String getApiVersion();
-
/**
* Gets The HTTP pipeline to send requests through.
*
@@ -44,6 +37,34 @@ public interface OperationalInsightsManagementClient {
*/
Duration getDefaultPollInterval();
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ OperationsClient getOperations();
+
+ /**
+ * Gets the WorkspacesClient object to access its operations.
+ *
+ * @return the WorkspacesClient object.
+ */
+ WorkspacesClient getWorkspaces();
+
+ /**
+ * Gets the DeletedWorkspacesClient object to access its operations.
+ *
+ * @return the DeletedWorkspacesClient object.
+ */
+ DeletedWorkspacesClient getDeletedWorkspaces();
+
+ /**
+ * Gets the TablesClient object to access its operations.
+ *
+ * @return the TablesClient object.
+ */
+ TablesClient getTables();
+
/**
* Gets the DataExportsClient object to access its operations.
*
@@ -86,13 +107,6 @@ public interface OperationalInsightsManagementClient {
*/
ManagementGroupsClient getManagementGroups();
- /**
- * Gets the OperationsClient object to access its operations.
- *
- * @return the OperationsClient object.
- */
- OperationsClient getOperations();
-
/**
* Gets the OperationStatusesClient object to access its operations.
*
@@ -114,27 +128,6 @@ public interface OperationalInsightsManagementClient {
*/
UsagesClient getUsages();
- /**
- * Gets the WorkspacesClient object to access its operations.
- *
- * @return the WorkspacesClient object.
- */
- WorkspacesClient getWorkspaces();
-
- /**
- * Gets the DeletedWorkspacesClient object to access its operations.
- *
- * @return the DeletedWorkspacesClient object.
- */
- DeletedWorkspacesClient getDeletedWorkspaces();
-
- /**
- * Gets the ClustersClient object to access its operations.
- *
- * @return the ClustersClient object.
- */
- ClustersClient getClusters();
-
/**
* Gets the StorageInsightConfigsClient object to access its operations.
*
@@ -178,9 +171,9 @@ public interface OperationalInsightsManagementClient {
WorkspacePurgesClient getWorkspacePurges();
/**
- * Gets the TablesClient object to access its operations.
+ * Gets the ClustersClient object to access its operations.
*
- * @return the TablesClient object.
+ * @return the ClustersClient object.
*/
- TablesClient getTables();
+ ClustersClient getClusters();
}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/OperationsClient.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/OperationsClient.java
index d96ce122c9e6..64f88e37380c 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/OperationsClient.java
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/OperationsClient.java
@@ -17,7 +17,7 @@ public interface OperationsClient {
*
* @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 result of the request to list solution operations.
+ * @return result of the request to list solution operations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -29,7 +29,7 @@ public interface OperationsClient {
* @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 result of the request to list solution operations.
+ * @return result of the request to list solution operations as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/SavedSearchesClient.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/SavedSearchesClient.java
index b0d762b2d209..f57c5f69c0c4 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/SavedSearchesClient.java
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/SavedSearchesClient.java
@@ -36,7 +36,7 @@ public interface SavedSearchesClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response deleteWithResponse(
@@ -69,7 +69,7 @@ SavedSearchInner createOrUpdate(
* @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 value object for saved search results.
+ * @return value object for saved search results along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response createOrUpdateWithResponse(
@@ -103,7 +103,7 @@ Response createOrUpdateWithResponse(
* @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 specified saved search for a given workspace.
+ * @return the specified saved search for a given workspace along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(
@@ -131,7 +131,7 @@ Response getWithResponse(
* @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 saved searches for a given Log Analytics Workspace.
+ * @return the saved searches for a given Log Analytics Workspace along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response listByWorkspaceWithResponse(
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/SchemasClient.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/SchemasClient.java
index d7470e311ab7..e08bdd698234 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/SchemasClient.java
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/SchemasClient.java
@@ -34,7 +34,7 @@ public interface SchemasClient {
* @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 schema for a given workspace.
+ * @return the schema for a given workspace along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/SharedKeysOperationsClient.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/SharedKeysOperationsClient.java
index 7cf817523364..01fb6729182c 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/SharedKeysOperationsClient.java
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/SharedKeysOperationsClient.java
@@ -34,7 +34,7 @@ public interface SharedKeysOperationsClient {
* @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 shared keys for a workspace.
+ * @return the shared keys for a workspace along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getSharedKeysWithResponse(
@@ -64,7 +64,7 @@ Response getSharedKeysWithResponse(
* @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 shared keys for a workspace.
+ * @return the shared keys for a workspace along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response regenerateWithResponse(String resourceGroupName, String workspaceName, Context context);
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/StorageInsightConfigsClient.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/StorageInsightConfigsClient.java
index acce922c504d..8d5e32ecec19 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/StorageInsightConfigsClient.java
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/StorageInsightConfigsClient.java
@@ -40,7 +40,7 @@ StorageInsightInner createOrUpdate(
* @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 storage insight resource container.
+ * @return the top level storage insight resource container along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response createOrUpdateWithResponse(
@@ -74,7 +74,7 @@ Response createOrUpdateWithResponse(
* @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 storage insight instance.
+ * @return a storage insight instance along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(
@@ -103,7 +103,7 @@ Response getWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the response.
+ * @return the {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response deleteWithResponse(
@@ -117,7 +117,7 @@ Response deleteWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list storage insights operation response.
+ * @return the list storage insights operation response as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByWorkspace(String resourceGroupName, String workspaceName);
@@ -131,7 +131,7 @@ Response deleteWithResponse(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the list storage insights operation response.
+ * @return the list storage insights operation response as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, Context context);
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/TablesClient.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/TablesClient.java
index 0f784c4e5ca9..bb27c20458ed 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/TablesClient.java
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/TablesClient.java
@@ -8,7 +8,9 @@
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.TableInner;
/** An instance of this class provides access to all the operations defined in TablesClient. */
@@ -21,7 +23,8 @@ public interface TablesClient {
* @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 all the tables for the specified Log Analytics workspace.
+ * @return all the tables for the specified Log Analytics workspace as paginated response with {@link
+ * PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByWorkspace(String resourceGroupName, String workspaceName);
@@ -35,13 +38,112 @@ public interface TablesClient {
* @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 all the tables for the specified Log Analytics workspace.
+ * @return all the tables for the specified Log Analytics workspace as paginated response with {@link
+ * PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, Context context);
/**
- * Updates a Log Analytics workspace table properties.
+ * Update or Create a Log Analytics workspace table.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param tableName The name of the table.
+ * @param parameters The parameters required to update table properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of workspace data table definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, TableInner> beginCreateOrUpdate(
+ String resourceGroupName, String workspaceName, String tableName, TableInner parameters);
+
+ /**
+ * Update or Create a Log Analytics workspace table.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param tableName The name of the table.
+ * @param parameters The parameters required to update table properties.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of workspace data table definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, TableInner> beginCreateOrUpdate(
+ String resourceGroupName, String workspaceName, String tableName, TableInner parameters, Context context);
+
+ /**
+ * Update or Create a Log Analytics workspace table.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param tableName The name of the table.
+ * @param parameters The parameters required to update table properties.
+ * @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 workspace data table definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ TableInner createOrUpdate(String resourceGroupName, String workspaceName, String tableName, TableInner parameters);
+
+ /**
+ * Update or Create a Log Analytics workspace table.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param tableName The name of the table.
+ * @param parameters The parameters required to update table properties.
+ * @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 workspace data table definition.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ TableInner createOrUpdate(
+ String resourceGroupName, String workspaceName, String tableName, TableInner parameters, Context context);
+
+ /**
+ * Update a Log Analytics workspace table.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param tableName The name of the table.
+ * @param parameters The parameters required to update table properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of workspace data table definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, TableInner> beginUpdate(
+ String resourceGroupName, String workspaceName, String tableName, TableInner parameters);
+
+ /**
+ * Update a Log Analytics workspace table.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param tableName The name of the table.
+ * @param parameters The parameters required to update table properties.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of workspace data table definition.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, TableInner> beginUpdate(
+ String resourceGroupName, String workspaceName, String tableName, TableInner parameters, Context context);
+
+ /**
+ * Update a Log Analytics workspace table.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param workspaceName The name of the workspace.
@@ -56,7 +158,7 @@ public interface TablesClient {
TableInner update(String resourceGroupName, String workspaceName, String tableName, TableInner parameters);
/**
- * Updates a Log Analytics workspace table properties.
+ * Update a Log Analytics workspace table.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param workspaceName The name of the workspace.
@@ -69,7 +171,7 @@ public interface TablesClient {
* @return workspace data table definition.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- Response updateWithResponse(
+ TableInner update(
String resourceGroupName, String workspaceName, String tableName, TableInner parameters, Context context);
/**
@@ -96,9 +198,97 @@ Response updateWithResponse(
* @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 Log Analytics workspace table.
+ * @return a Log Analytics workspace table along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getWithResponse(
String resourceGroupName, String workspaceName, String tableName, Context context);
+
+ /**
+ * Delete a Log Analytics workspace table.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param tableName The name of the table.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, String tableName);
+
+ /**
+ * Delete a Log Analytics workspace table.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param tableName The name of the table.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link SyncPoller} for polling of long-running operation.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ SyncPoller, Void> beginDelete(
+ String resourceGroupName, String workspaceName, String tableName, Context context);
+
+ /**
+ * Delete a Log Analytics workspace table.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param tableName The name of the table.
+ * @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, String tableName);
+
+ /**
+ * Delete a Log Analytics workspace table.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param tableName The name of the table.
+ * @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, String tableName, Context context);
+
+ /**
+ * Migrate a Log Analytics table from support of the Data Collector API and Custom Fields features to support of
+ * Data Collection Rule-based Custom Logs.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param tableName The name of the table.
+ * @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 migrate(String resourceGroupName, String workspaceName, String tableName);
+
+ /**
+ * Migrate a Log Analytics table from support of the Data Collector API and Custom Fields features to support of
+ * Data Collection Rule-based Custom Logs.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param workspaceName The name of the workspace.
+ * @param tableName The name of the table.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the {@link Response}.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ Response migrateWithResponse(
+ String resourceGroupName, String workspaceName, String tableName, Context context);
}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/UsagesClient.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/UsagesClient.java
index 17a73a511dc3..2fd82f76a963 100644
--- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/UsagesClient.java
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/UsagesClient.java
@@ -20,7 +20,7 @@ public interface UsagesClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of usage metrics for a workspace.
+ * @return a list of usage metrics for a workspace as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(String resourceGroupName, String workspaceName);
@@ -34,7 +34,7 @@ public interface UsagesClient {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return a list of usage metrics for a workspace.
+ * @return a list of usage metrics for a workspace as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable 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
index 38e33b4d2648..0da7cf343ac3 100644
--- 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
@@ -79,7 +79,7 @@ WorkspacePurgesPurgeResponse purgeWithResponse(
* @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.
+ * @return status of an ongoing purge operation along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getPurgeStatusWithResponse(
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
index e73903b64ee2..5fcad1925d47 100644
--- 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
@@ -21,7 +21,7 @@ public interface WorkspacesClient {
*
* @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.
+ * @return the workspaces in a subscription as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list();
@@ -33,7 +33,7 @@ public interface WorkspacesClient {
* @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.
+ * @return the workspaces in a subscription as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable list(Context context);
@@ -45,7 +45,7 @@ public interface WorkspacesClient {
* @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.
+ * @return workspaces in a resource group as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName);
@@ -58,7 +58,7 @@ public interface WorkspacesClient {
* @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.
+ * @return workspaces in a resource group as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedIterable listByResourceGroup(String resourceGroupName, Context context);
@@ -72,9 +72,9 @@ public interface WorkspacesClient {
* @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.
+ * @return the {@link SyncPoller} for polling of the top level Workspace resource container.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, WorkspaceInner> beginCreateOrUpdate(
String resourceGroupName, String workspaceName, WorkspaceInner parameters);
@@ -88,9 +88,9 @@ SyncPoller, WorkspaceInner> beginCreateOrUpdate(
* @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.
+ * @return the {@link SyncPoller} for polling of the top level Workspace resource container.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, WorkspaceInner> beginCreateOrUpdate(
String resourceGroupName, String workspaceName, WorkspaceInner parameters, Context context);
@@ -136,9 +136,9 @@ WorkspaceInner createOrUpdate(
* @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.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, Boolean force);
/**
@@ -154,9 +154,9 @@ WorkspaceInner createOrUpdate(
* @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.
+ * @return the {@link SyncPoller} for polling of long-running operation.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
SyncPoller, Void> beginDelete(
String resourceGroupName, String workspaceName, Boolean force, Context context);
@@ -229,7 +229,7 @@ SyncPoller, Void> beginDelete(
* @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.
+ * @return a workspace instance along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response getByResourceGroupWithResponse(
@@ -259,7 +259,7 @@ Response getByResourceGroupWithResponse(
* @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.
+ * @return the top level Workspace resource container along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
Response updateWithResponse(
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
index d5bc163290d3..ea767cfab7d8 100644
--- 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
@@ -5,21 +5,23 @@
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.AssociatedWorkspace;
+import com.azure.resourcemanager.loganalytics.models.BillingType;
+import com.azure.resourcemanager.loganalytics.models.CapacityReservationProperties;
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.List;
import java.util.Map;
/** The top level Log Analytics cluster resource container. */
-@JsonFlatten
@Fluent
-public class ClusterInner extends Resource {
+public final class ClusterInner extends Resource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterInner.class);
/*
@@ -35,28 +37,10 @@ public class ClusterInner extends Resource {
private ClusterSku sku;
/*
- * The link used to get the next page of recommendations.
+ * Log Analytics cluster properties.
*/
- @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;
+ @JsonProperty(value = "properties")
+ private ClusterProperties innerProperties;
/**
* Get the identity property: The identity of the resource.
@@ -99,22 +83,25 @@ public ClusterInner withSku(ClusterSku sku) {
}
/**
- * Get the nextLink property: The link used to get the next page of recommendations.
+ * Get the innerProperties property: Log Analytics cluster properties.
*
- * @return the nextLink value.
+ * @return the innerProperties value.
*/
- public String nextLink() {
- return this.nextLink;
+ private ClusterProperties innerProperties() {
+ return this.innerProperties;
}
- /**
- * 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;
+ /** {@inheritDoc} */
+ @Override
+ public ClusterInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public ClusterInner withTags(Map tags) {
+ super.withTags(tags);
return this;
}
@@ -124,7 +111,7 @@ public ClusterInner withNextLink(String nextLink) {
* @return the clusterId value.
*/
public String clusterId() {
- return this.clusterId;
+ return this.innerProperties() == null ? null : this.innerProperties().clusterId();
}
/**
@@ -133,7 +120,82 @@ public String clusterId() {
* @return the provisioningState value.
*/
public ClusterEntityStatus provisioningState() {
- return this.provisioningState;
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
+ /**
+ * Get the isDoubleEncryptionEnabled property: Configures whether cluster will use double encryption. This Property
+ * can not be modified after cluster creation. Default value is 'true'.
+ *
+ * @return the isDoubleEncryptionEnabled value.
+ */
+ public Boolean isDoubleEncryptionEnabled() {
+ return this.innerProperties() == null ? null : this.innerProperties().isDoubleEncryptionEnabled();
+ }
+
+ /**
+ * Set the isDoubleEncryptionEnabled property: Configures whether cluster will use double encryption. This Property
+ * can not be modified after cluster creation. Default value is 'true'.
+ *
+ * @param isDoubleEncryptionEnabled the isDoubleEncryptionEnabled value to set.
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withIsDoubleEncryptionEnabled(Boolean isDoubleEncryptionEnabled) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterProperties();
+ }
+ this.innerProperties().withIsDoubleEncryptionEnabled(isDoubleEncryptionEnabled);
+ return this;
+ }
+
+ /**
+ * Get the isAvailabilityZonesEnabled property: Sets whether the cluster will support availability zones. This can
+ * be set as true only in regions where Azure Data Explorer support Availability Zones. This Property can not be
+ * modified after cluster creation. Default value is 'true' if region supports Availability Zones.
+ *
+ * @return the isAvailabilityZonesEnabled value.
+ */
+ public Boolean isAvailabilityZonesEnabled() {
+ return this.innerProperties() == null ? null : this.innerProperties().isAvailabilityZonesEnabled();
+ }
+
+ /**
+ * Set the isAvailabilityZonesEnabled property: Sets whether the cluster will support availability zones. This can
+ * be set as true only in regions where Azure Data Explorer support Availability Zones. This Property can not be
+ * modified after cluster creation. Default value is 'true' if region supports Availability Zones.
+ *
+ * @param isAvailabilityZonesEnabled the isAvailabilityZonesEnabled value to set.
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withIsAvailabilityZonesEnabled(Boolean isAvailabilityZonesEnabled) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterProperties();
+ }
+ this.innerProperties().withIsAvailabilityZonesEnabled(isAvailabilityZonesEnabled);
+ return this;
+ }
+
+ /**
+ * Get the billingType property: The cluster's billing type.
+ *
+ * @return the billingType value.
+ */
+ public BillingType billingType() {
+ return this.innerProperties() == null ? null : this.innerProperties().billingType();
+ }
+
+ /**
+ * Set the billingType property: The cluster's billing type.
+ *
+ * @param billingType the billingType value to set.
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withBillingType(BillingType billingType) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterProperties();
+ }
+ this.innerProperties().withBillingType(billingType);
+ return this;
}
/**
@@ -142,7 +204,7 @@ public ClusterEntityStatus provisioningState() {
* @return the keyVaultProperties value.
*/
public KeyVaultProperties keyVaultProperties() {
- return this.keyVaultProperties;
+ return this.innerProperties() == null ? null : this.innerProperties().keyVaultProperties();
}
/**
@@ -152,21 +214,74 @@ public KeyVaultProperties keyVaultProperties() {
* @return the ClusterInner object itself.
*/
public ClusterInner withKeyVaultProperties(KeyVaultProperties keyVaultProperties) {
- this.keyVaultProperties = keyVaultProperties;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterProperties();
+ }
+ this.innerProperties().withKeyVaultProperties(keyVaultProperties);
return this;
}
- /** {@inheritDoc} */
- @Override
- public ClusterInner withLocation(String location) {
- super.withLocation(location);
+ /**
+ * Get the lastModifiedDate property: The last time the cluster was updated.
+ *
+ * @return the lastModifiedDate value.
+ */
+ public String lastModifiedDate() {
+ return this.innerProperties() == null ? null : this.innerProperties().lastModifiedDate();
+ }
+
+ /**
+ * Get the createdDate property: The cluster creation time.
+ *
+ * @return the createdDate value.
+ */
+ public String createdDate() {
+ return this.innerProperties() == null ? null : this.innerProperties().createdDate();
+ }
+
+ /**
+ * Get the associatedWorkspaces property: The list of Log Analytics workspaces associated with the cluster.
+ *
+ * @return the associatedWorkspaces value.
+ */
+ public List associatedWorkspaces() {
+ return this.innerProperties() == null ? null : this.innerProperties().associatedWorkspaces();
+ }
+
+ /**
+ * Set the associatedWorkspaces property: The list of Log Analytics workspaces associated with the cluster.
+ *
+ * @param associatedWorkspaces the associatedWorkspaces value to set.
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withAssociatedWorkspaces(List associatedWorkspaces) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterProperties();
+ }
+ this.innerProperties().withAssociatedWorkspaces(associatedWorkspaces);
return this;
}
- /** {@inheritDoc} */
- @Override
- public ClusterInner withTags(Map tags) {
- super.withTags(tags);
+ /**
+ * Get the capacityReservationProperties property: Additional properties for capacity reservation.
+ *
+ * @return the capacityReservationProperties value.
+ */
+ public CapacityReservationProperties capacityReservationProperties() {
+ return this.innerProperties() == null ? null : this.innerProperties().capacityReservationProperties();
+ }
+
+ /**
+ * Set the capacityReservationProperties property: Additional properties for capacity reservation.
+ *
+ * @param capacityReservationProperties the capacityReservationProperties value to set.
+ * @return the ClusterInner object itself.
+ */
+ public ClusterInner withCapacityReservationProperties(CapacityReservationProperties capacityReservationProperties) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ClusterProperties();
+ }
+ this.innerProperties().withCapacityReservationProperties(capacityReservationProperties);
return this;
}
@@ -182,8 +297,8 @@ public void validate() {
if (sku() != null) {
sku().validate();
}
- if (keyVaultProperties() != null) {
- keyVaultProperties().validate();
+ if (innerProperties() != null) {
+ innerProperties().validate();
}
}
}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/ClusterPatchProperties.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/ClusterPatchProperties.java
new file mode 100644
index 000000000000..b52450fbc7b4
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/ClusterPatchProperties.java
@@ -0,0 +1,81 @@
+// 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.BillingType;
+import com.azure.resourcemanager.loganalytics.models.KeyVaultProperties;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Log Analytics cluster patch properties. */
+@Fluent
+public final class ClusterPatchProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterPatchProperties.class);
+
+ /*
+ * The associated key properties.
+ */
+ @JsonProperty(value = "keyVaultProperties")
+ private KeyVaultProperties keyVaultProperties;
+
+ /*
+ * The cluster's billing type.
+ */
+ @JsonProperty(value = "billingType")
+ private BillingType billingType;
+
+ /**
+ * 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 ClusterPatchProperties object itself.
+ */
+ public ClusterPatchProperties withKeyVaultProperties(KeyVaultProperties keyVaultProperties) {
+ this.keyVaultProperties = keyVaultProperties;
+ return this;
+ }
+
+ /**
+ * Get the billingType property: The cluster's billing type.
+ *
+ * @return the billingType value.
+ */
+ public BillingType billingType() {
+ return this.billingType;
+ }
+
+ /**
+ * Set the billingType property: The cluster's billing type.
+ *
+ * @param billingType the billingType value to set.
+ * @return the ClusterPatchProperties object itself.
+ */
+ public ClusterPatchProperties withBillingType(BillingType billingType) {
+ this.billingType = billingType;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (keyVaultProperties() != null) {
+ keyVaultProperties().validate();
+ }
+ }
+}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/ClusterProperties.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/ClusterProperties.java
new file mode 100644
index 000000000000..1a7d213a1987
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/ClusterProperties.java
@@ -0,0 +1,266 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loganalytics.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.loganalytics.models.AssociatedWorkspace;
+import com.azure.resourcemanager.loganalytics.models.BillingType;
+import com.azure.resourcemanager.loganalytics.models.CapacityReservationProperties;
+import com.azure.resourcemanager.loganalytics.models.ClusterEntityStatus;
+import com.azure.resourcemanager.loganalytics.models.KeyVaultProperties;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Cluster properties. */
+@Fluent
+public final class ClusterProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterProperties.class);
+
+ /*
+ * The ID associated with the cluster.
+ */
+ @JsonProperty(value = "clusterId", access = JsonProperty.Access.WRITE_ONLY)
+ private String clusterId;
+
+ /*
+ * The provisioning state of the cluster.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ClusterEntityStatus provisioningState;
+
+ /*
+ * Configures whether cluster will use double encryption. This Property can
+ * not be modified after cluster creation. Default value is 'true'
+ */
+ @JsonProperty(value = "isDoubleEncryptionEnabled")
+ private Boolean isDoubleEncryptionEnabled;
+
+ /*
+ * Sets whether the cluster will support availability zones. This can be
+ * set as true only in regions where Azure Data Explorer support
+ * Availability Zones. This Property can not be modified after cluster
+ * creation. Default value is 'true' if region supports Availability Zones.
+ */
+ @JsonProperty(value = "isAvailabilityZonesEnabled")
+ private Boolean isAvailabilityZonesEnabled;
+
+ /*
+ * The cluster's billing type.
+ */
+ @JsonProperty(value = "billingType")
+ private BillingType billingType;
+
+ /*
+ * The associated key properties.
+ */
+ @JsonProperty(value = "keyVaultProperties")
+ private KeyVaultProperties keyVaultProperties;
+
+ /*
+ * The last time the cluster was updated.
+ */
+ @JsonProperty(value = "lastModifiedDate", access = JsonProperty.Access.WRITE_ONLY)
+ private String lastModifiedDate;
+
+ /*
+ * The cluster creation time
+ */
+ @JsonProperty(value = "createdDate", access = JsonProperty.Access.WRITE_ONLY)
+ private String createdDate;
+
+ /*
+ * The list of Log Analytics workspaces associated with the cluster
+ */
+ @JsonProperty(value = "associatedWorkspaces")
+ private List associatedWorkspaces;
+
+ /*
+ * Additional properties for capacity reservation
+ */
+ @JsonProperty(value = "capacityReservationProperties")
+ private CapacityReservationProperties capacityReservationProperties;
+
+ /**
+ * 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 isDoubleEncryptionEnabled property: Configures whether cluster will use double encryption. This Property
+ * can not be modified after cluster creation. Default value is 'true'.
+ *
+ * @return the isDoubleEncryptionEnabled value.
+ */
+ public Boolean isDoubleEncryptionEnabled() {
+ return this.isDoubleEncryptionEnabled;
+ }
+
+ /**
+ * Set the isDoubleEncryptionEnabled property: Configures whether cluster will use double encryption. This Property
+ * can not be modified after cluster creation. Default value is 'true'.
+ *
+ * @param isDoubleEncryptionEnabled the isDoubleEncryptionEnabled value to set.
+ * @return the ClusterProperties object itself.
+ */
+ public ClusterProperties withIsDoubleEncryptionEnabled(Boolean isDoubleEncryptionEnabled) {
+ this.isDoubleEncryptionEnabled = isDoubleEncryptionEnabled;
+ return this;
+ }
+
+ /**
+ * Get the isAvailabilityZonesEnabled property: Sets whether the cluster will support availability zones. This can
+ * be set as true only in regions where Azure Data Explorer support Availability Zones. This Property can not be
+ * modified after cluster creation. Default value is 'true' if region supports Availability Zones.
+ *
+ * @return the isAvailabilityZonesEnabled value.
+ */
+ public Boolean isAvailabilityZonesEnabled() {
+ return this.isAvailabilityZonesEnabled;
+ }
+
+ /**
+ * Set the isAvailabilityZonesEnabled property: Sets whether the cluster will support availability zones. This can
+ * be set as true only in regions where Azure Data Explorer support Availability Zones. This Property can not be
+ * modified after cluster creation. Default value is 'true' if region supports Availability Zones.
+ *
+ * @param isAvailabilityZonesEnabled the isAvailabilityZonesEnabled value to set.
+ * @return the ClusterProperties object itself.
+ */
+ public ClusterProperties withIsAvailabilityZonesEnabled(Boolean isAvailabilityZonesEnabled) {
+ this.isAvailabilityZonesEnabled = isAvailabilityZonesEnabled;
+ return this;
+ }
+
+ /**
+ * Get the billingType property: The cluster's billing type.
+ *
+ * @return the billingType value.
+ */
+ public BillingType billingType() {
+ return this.billingType;
+ }
+
+ /**
+ * Set the billingType property: The cluster's billing type.
+ *
+ * @param billingType the billingType value to set.
+ * @return the ClusterProperties object itself.
+ */
+ public ClusterProperties withBillingType(BillingType billingType) {
+ this.billingType = billingType;
+ return this;
+ }
+
+ /**
+ * 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 ClusterProperties object itself.
+ */
+ public ClusterProperties withKeyVaultProperties(KeyVaultProperties keyVaultProperties) {
+ this.keyVaultProperties = keyVaultProperties;
+ return this;
+ }
+
+ /**
+ * Get the lastModifiedDate property: The last time the cluster was updated.
+ *
+ * @return the lastModifiedDate value.
+ */
+ public String lastModifiedDate() {
+ return this.lastModifiedDate;
+ }
+
+ /**
+ * Get the createdDate property: The cluster creation time.
+ *
+ * @return the createdDate value.
+ */
+ public String createdDate() {
+ return this.createdDate;
+ }
+
+ /**
+ * Get the associatedWorkspaces property: The list of Log Analytics workspaces associated with the cluster.
+ *
+ * @return the associatedWorkspaces value.
+ */
+ public List associatedWorkspaces() {
+ return this.associatedWorkspaces;
+ }
+
+ /**
+ * Set the associatedWorkspaces property: The list of Log Analytics workspaces associated with the cluster.
+ *
+ * @param associatedWorkspaces the associatedWorkspaces value to set.
+ * @return the ClusterProperties object itself.
+ */
+ public ClusterProperties withAssociatedWorkspaces(List associatedWorkspaces) {
+ this.associatedWorkspaces = associatedWorkspaces;
+ return this;
+ }
+
+ /**
+ * Get the capacityReservationProperties property: Additional properties for capacity reservation.
+ *
+ * @return the capacityReservationProperties value.
+ */
+ public CapacityReservationProperties capacityReservationProperties() {
+ return this.capacityReservationProperties;
+ }
+
+ /**
+ * Set the capacityReservationProperties property: Additional properties for capacity reservation.
+ *
+ * @param capacityReservationProperties the capacityReservationProperties value to set.
+ * @return the ClusterProperties object itself.
+ */
+ public ClusterProperties withCapacityReservationProperties(
+ CapacityReservationProperties capacityReservationProperties) {
+ this.capacityReservationProperties = capacityReservationProperties;
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (keyVaultProperties() != null) {
+ keyVaultProperties().validate();
+ }
+ if (associatedWorkspaces() != null) {
+ associatedWorkspaces().forEach(e -> e.validate());
+ }
+ if (capacityReservationProperties() != null) {
+ capacityReservationProperties().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
index 293aa39a13ea..6216e5fb8ce5 100644
--- 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
@@ -5,7 +5,6 @@
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;
@@ -14,60 +13,24 @@
import java.util.List;
/** The top level data export resource container. */
-@JsonFlatten
@Fluent
-public class DataExportInner extends ProxyResource {
+public final class DataExportInner extends ProxyResource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(DataExportInner.class);
/*
- * The data export rule ID.
+ * data export properties.
*/
- @JsonProperty(value = "properties.dataExportId")
- private String dataExportId;
+ @JsonProperty(value = "properties")
+ private DataExportProperties innerProperties;
- /*
- * 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.
+ /**
+ * Get the innerProperties property: data export properties.
+ *
+ * @return the innerProperties value.
*/
- @JsonProperty(value = "properties.destination.metaData.eventHubName")
- private String eventHubName;
+ private DataExportProperties innerProperties() {
+ return this.innerProperties;
+ }
/**
* Get the dataExportId property: The data export rule ID.
@@ -75,7 +38,7 @@ public class DataExportInner extends ProxyResource {
* @return the dataExportId value.
*/
public String dataExportId() {
- return this.dataExportId;
+ return this.innerProperties() == null ? null : this.innerProperties().dataExportId();
}
/**
@@ -85,7 +48,10 @@ public String dataExportId() {
* @return the DataExportInner object itself.
*/
public DataExportInner withDataExportId(String dataExportId) {
- this.dataExportId = dataExportId;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new DataExportProperties();
+ }
+ this.innerProperties().withDataExportId(dataExportId);
return this;
}
@@ -95,7 +61,7 @@ public DataExportInner withDataExportId(String dataExportId) {
* @return the tableNames value.
*/
public List tableNames() {
- return this.tableNames;
+ return this.innerProperties() == null ? null : this.innerProperties().tableNames();
}
/**
@@ -105,7 +71,10 @@ public List tableNames() {
* @return the DataExportInner object itself.
*/
public DataExportInner withTableNames(List tableNames) {
- this.tableNames = tableNames;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new DataExportProperties();
+ }
+ this.innerProperties().withTableNames(tableNames);
return this;
}
@@ -115,7 +84,7 @@ public DataExportInner withTableNames(List tableNames) {
* @return the enable value.
*/
public Boolean enable() {
- return this.enable;
+ return this.innerProperties() == null ? null : this.innerProperties().enable();
}
/**
@@ -125,7 +94,10 @@ public Boolean enable() {
* @return the DataExportInner object itself.
*/
public DataExportInner withEnable(Boolean enable) {
- this.enable = enable;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new DataExportProperties();
+ }
+ this.innerProperties().withEnable(enable);
return this;
}
@@ -135,7 +107,7 @@ public DataExportInner withEnable(Boolean enable) {
* @return the createdDate value.
*/
public String createdDate() {
- return this.createdDate;
+ return this.innerProperties() == null ? null : this.innerProperties().createdDate();
}
/**
@@ -145,7 +117,10 @@ public String createdDate() {
* @return the DataExportInner object itself.
*/
public DataExportInner withCreatedDate(String createdDate) {
- this.createdDate = createdDate;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new DataExportProperties();
+ }
+ this.innerProperties().withCreatedDate(createdDate);
return this;
}
@@ -155,7 +130,7 @@ public DataExportInner withCreatedDate(String createdDate) {
* @return the lastModifiedDate value.
*/
public String lastModifiedDate() {
- return this.lastModifiedDate;
+ return this.innerProperties() == null ? null : this.innerProperties().lastModifiedDate();
}
/**
@@ -165,7 +140,10 @@ public String lastModifiedDate() {
* @return the DataExportInner object itself.
*/
public DataExportInner withLastModifiedDate(String lastModifiedDate) {
- this.lastModifiedDate = lastModifiedDate;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new DataExportProperties();
+ }
+ this.innerProperties().withLastModifiedDate(lastModifiedDate);
return this;
}
@@ -176,7 +154,7 @@ public DataExportInner withLastModifiedDate(String lastModifiedDate) {
* @return the resourceId value.
*/
public String resourceId() {
- return this.resourceId;
+ return this.innerProperties() == null ? null : this.innerProperties().resourceId();
}
/**
@@ -187,17 +165,20 @@ public String resourceId() {
* @return the DataExportInner object itself.
*/
public DataExportInner withResourceId(String resourceId) {
- this.resourceId = resourceId;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new DataExportProperties();
+ }
+ this.innerProperties().withResourceId(resourceId);
return this;
}
/**
- * Get the typePropertiesDestinationType property: The type of the destination resource.
+ * Get the type property: The type of the destination resource.
*
- * @return the typePropertiesDestinationType value.
+ * @return the type value.
*/
- public Type typePropertiesDestinationType() {
- return this.typePropertiesDestinationType;
+ public Type typePropertiesType() {
+ return this.innerProperties() == null ? null : this.innerProperties().type();
}
/**
@@ -207,7 +188,7 @@ public Type typePropertiesDestinationType() {
* @return the eventHubName value.
*/
public String eventHubName() {
- return this.eventHubName;
+ return this.innerProperties() == null ? null : this.innerProperties().eventHubName();
}
/**
@@ -218,7 +199,10 @@ public String eventHubName() {
* @return the DataExportInner object itself.
*/
public DataExportInner withEventHubName(String eventHubName) {
- this.eventHubName = eventHubName;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new DataExportProperties();
+ }
+ this.innerProperties().withEventHubName(eventHubName);
return this;
}
@@ -228,5 +212,8 @@ public DataExportInner withEventHubName(String eventHubName) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
}
}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/DataExportProperties.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/DataExportProperties.java
new file mode 100644
index 000000000000..e06783f82648
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/DataExportProperties.java
@@ -0,0 +1,238 @@
+// 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.Type;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Data Export properties. */
+@Fluent
+public final class DataExportProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(DataExportProperties.class);
+
+ /*
+ * The data export rule ID.
+ */
+ @JsonProperty(value = "dataExportId")
+ private String dataExportId;
+
+ /*
+ * An array of tables to export, for example: [“Heartbeat, SecurityEvent”].
+ */
+ @JsonProperty(value = "tableNames", required = true)
+ private List tableNames;
+
+ /*
+ * destination properties.
+ */
+ @JsonProperty(value = "destination")
+ private Destination innerDestination;
+
+ /*
+ * Active when enabled.
+ */
+ @JsonProperty(value = "enable")
+ private Boolean enable;
+
+ /*
+ * The latest data export rule modification time.
+ */
+ @JsonProperty(value = "createdDate")
+ private String createdDate;
+
+ /*
+ * Date and time when the export was last modified.
+ */
+ @JsonProperty(value = "lastModifiedDate")
+ private String lastModifiedDate;
+
+ /**
+ * 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 DataExportProperties object itself.
+ */
+ public DataExportProperties 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 DataExportProperties object itself.
+ */
+ public DataExportProperties withTableNames(List tableNames) {
+ this.tableNames = tableNames;
+ return this;
+ }
+
+ /**
+ * Get the innerDestination property: destination properties.
+ *
+ * @return the innerDestination value.
+ */
+ private Destination innerDestination() {
+ return this.innerDestination;
+ }
+
+ /**
+ * 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 DataExportProperties object itself.
+ */
+ public DataExportProperties 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 DataExportProperties object itself.
+ */
+ public DataExportProperties 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 DataExportProperties object itself.
+ */
+ public DataExportProperties 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.innerDestination() == null ? null : this.innerDestination().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 DataExportProperties object itself.
+ */
+ public DataExportProperties withResourceId(String resourceId) {
+ if (this.innerDestination() == null) {
+ this.innerDestination = new Destination();
+ }
+ this.innerDestination().withResourceId(resourceId);
+ return this;
+ }
+
+ /**
+ * Get the type property: The type of the destination resource.
+ *
+ * @return the type value.
+ */
+ public Type type() {
+ return this.innerDestination() == null ? null : this.innerDestination().type();
+ }
+
+ /**
+ * 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.innerDestination() == null ? null : this.innerDestination().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 DataExportProperties object itself.
+ */
+ public DataExportProperties withEventHubName(String eventHubName) {
+ if (this.innerDestination() == null) {
+ this.innerDestination = new Destination();
+ }
+ this.innerDestination().withEventHubName(eventHubName);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (tableNames() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property tableNames in model DataExportProperties"));
+ }
+ if (innerDestination() != null) {
+ innerDestination().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
index df0abde01f4c..7cf83485106b 100644
--- 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
@@ -9,6 +9,7 @@
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.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
@@ -40,6 +41,7 @@ public final class DataSourceInner extends ProxyResource {
* Resource tags.
*/
@JsonProperty(value = "tags")
+ @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
private Map tags;
/**
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/Destination.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/Destination.java
new file mode 100644
index 000000000000..b0061aecc1e9
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/Destination.java
@@ -0,0 +1,117 @@
+// 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.Type;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Destination properties. */
+@Fluent
+public final class Destination {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(Destination.class);
+
+ /*
+ * The destination resource ID. This can be copied from the Properties
+ * entry of the destination resource in Azure.
+ */
+ @JsonProperty(value = "resourceId", required = true)
+ private String resourceId;
+
+ /*
+ * The type of the destination resource
+ */
+ @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY)
+ private Type type;
+
+ /*
+ * destination meta data.
+ */
+ @JsonProperty(value = "metaData")
+ private DestinationMetadata innerMetadata;
+
+ /**
+ * 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 Destination object itself.
+ */
+ public Destination withResourceId(String resourceId) {
+ this.resourceId = resourceId;
+ return this;
+ }
+
+ /**
+ * Get the type property: The type of the destination resource.
+ *
+ * @return the type value.
+ */
+ public Type type() {
+ return this.type;
+ }
+
+ /**
+ * Get the innerMetadata property: destination meta data.
+ *
+ * @return the innerMetadata value.
+ */
+ private DestinationMetadata innerMetadata() {
+ return this.innerMetadata;
+ }
+
+ /**
+ * 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.innerMetadata() == null ? null : this.innerMetadata().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 Destination object itself.
+ */
+ public Destination withEventHubName(String eventHubName) {
+ if (this.innerMetadata() == null) {
+ this.innerMetadata = new DestinationMetadata();
+ }
+ this.innerMetadata().withEventHubName(eventHubName);
+ return this;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (resourceId() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property resourceId in model Destination"));
+ }
+ if (innerMetadata() != null) {
+ innerMetadata().validate();
+ }
+ }
+}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/DestinationMetadata.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/DestinationMetadata.java
new file mode 100644
index 000000000000..6022ebda022d
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/DestinationMetadata.java
@@ -0,0 +1,53 @@
+// 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;
+
+/** Destination meta data. */
+@Fluent
+public final class DestinationMetadata {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(DestinationMetadata.class);
+
+ /*
+ * Optional. Allows to define an Event Hub name. Not applicable when
+ * destination is Storage Account.
+ */
+ @JsonProperty(value = "eventHubName")
+ private String eventHubName;
+
+ /**
+ * 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 DestinationMetadata object itself.
+ */
+ public DestinationMetadata 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/LinkedServiceInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/LinkedServiceInner.java
index 91c7206aaeba..b90740304158 100644
--- 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
@@ -5,45 +5,40 @@
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.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
/** The top level Linked service resource container. */
-@JsonFlatten
@Fluent
-public class LinkedServiceInner extends ProxyResource {
+public final class LinkedServiceInner extends ProxyResource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(LinkedServiceInner.class);
/*
- * Resource tags.
+ * The properties of the linked service.
*/
- @JsonProperty(value = "tags")
- private Map tags;
+ @JsonProperty(value = "properties", required = true)
+ private LinkedServiceProperties innerProperties = new LinkedServiceProperties();
/*
- * 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
+ * Resource tags.
*/
- @JsonProperty(value = "properties.writeAccessResourceId")
- private String writeAccessResourceId;
+ @JsonProperty(value = "tags")
+ @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
+ private Map tags;
- /*
- * The provisioning state of the linked service.
+ /**
+ * Get the innerProperties property: The properties of the linked service.
+ *
+ * @return the innerProperties value.
*/
- @JsonProperty(value = "properties.provisioningState")
- private LinkedServiceEntityStatus provisioningState;
+ private LinkedServiceProperties innerProperties() {
+ return this.innerProperties;
+ }
/**
* Get the tags property: Resource tags.
@@ -72,7 +67,7 @@ public LinkedServiceInner withTags(Map tags) {
* @return the resourceId value.
*/
public String resourceId() {
- return this.resourceId;
+ return this.innerProperties() == null ? null : this.innerProperties().resourceId();
}
/**
@@ -83,7 +78,10 @@ public String resourceId() {
* @return the LinkedServiceInner object itself.
*/
public LinkedServiceInner withResourceId(String resourceId) {
- this.resourceId = resourceId;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new LinkedServiceProperties();
+ }
+ this.innerProperties().withResourceId(resourceId);
return this;
}
@@ -94,7 +92,7 @@ public LinkedServiceInner withResourceId(String resourceId) {
* @return the writeAccessResourceId value.
*/
public String writeAccessResourceId() {
- return this.writeAccessResourceId;
+ return this.innerProperties() == null ? null : this.innerProperties().writeAccessResourceId();
}
/**
@@ -105,7 +103,10 @@ public String writeAccessResourceId() {
* @return the LinkedServiceInner object itself.
*/
public LinkedServiceInner withWriteAccessResourceId(String writeAccessResourceId) {
- this.writeAccessResourceId = writeAccessResourceId;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new LinkedServiceProperties();
+ }
+ this.innerProperties().withWriteAccessResourceId(writeAccessResourceId);
return this;
}
@@ -115,7 +116,7 @@ public LinkedServiceInner withWriteAccessResourceId(String writeAccessResourceId
* @return the provisioningState value.
*/
public LinkedServiceEntityStatus provisioningState() {
- return this.provisioningState;
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
}
/**
@@ -125,7 +126,10 @@ public LinkedServiceEntityStatus provisioningState() {
* @return the LinkedServiceInner object itself.
*/
public LinkedServiceInner withProvisioningState(LinkedServiceEntityStatus provisioningState) {
- this.provisioningState = provisioningState;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new LinkedServiceProperties();
+ }
+ this.innerProperties().withProvisioningState(provisioningState);
return this;
}
@@ -135,5 +139,13 @@ public LinkedServiceInner withProvisioningState(LinkedServiceEntityStatus provis
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (innerProperties() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property innerProperties in model LinkedServiceInner"));
+ } else {
+ innerProperties().validate();
+ }
}
}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/LinkedServiceProperties.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/LinkedServiceProperties.java
new file mode 100644
index 000000000000..f8a2becbc436
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/LinkedServiceProperties.java
@@ -0,0 +1,109 @@
+// 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.LinkedServiceEntityStatus;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Linked service properties. */
+@Fluent
+public final class LinkedServiceProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(LinkedServiceProperties.class);
+
+ /*
+ * 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 = "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 = "writeAccessResourceId")
+ private String writeAccessResourceId;
+
+ /*
+ * The provisioning state of the linked service.
+ */
+ @JsonProperty(value = "provisioningState")
+ private LinkedServiceEntityStatus provisioningState;
+
+ /**
+ * 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 LinkedServiceProperties object itself.
+ */
+ public LinkedServiceProperties 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 LinkedServiceProperties object itself.
+ */
+ public LinkedServiceProperties 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 LinkedServiceProperties object itself.
+ */
+ public LinkedServiceProperties 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/LinkedStorageAccountsProperties.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/LinkedStorageAccountsProperties.java
new file mode 100644
index 000000000000..d40d59434006
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/LinkedStorageAccountsProperties.java
@@ -0,0 +1,67 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.resourcemanager.loganalytics.fluent.models;
+
+import com.azure.core.annotation.Fluent;
+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 properties. */
+@Fluent
+public final class LinkedStorageAccountsProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(LinkedStorageAccountsProperties.class);
+
+ /*
+ * Linked storage accounts type.
+ */
+ @JsonProperty(value = "dataSourceType", access = JsonProperty.Access.WRITE_ONLY)
+ private DataSourceType dataSourceType;
+
+ /*
+ * Linked storage accounts resources ids.
+ */
+ @JsonProperty(value = "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 LinkedStorageAccountsProperties object itself.
+ */
+ public LinkedStorageAccountsProperties 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/LinkedStorageAccountsResourceInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/LinkedStorageAccountsResourceInner.java
index 01639e3857bc..b13c16fe42e1 100644
--- 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
@@ -5,7 +5,6 @@
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;
@@ -14,22 +13,24 @@
import java.util.List;
/** Linked storage accounts top level resource container. */
-@JsonFlatten
@Fluent
-public class LinkedStorageAccountsResourceInner extends ProxyResource {
+public final class LinkedStorageAccountsResourceInner extends ProxyResource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(LinkedStorageAccountsResourceInner.class);
/*
- * Linked storage accounts type.
+ * Linked storage accounts properties.
*/
- @JsonProperty(value = "properties.dataSourceType", access = JsonProperty.Access.WRITE_ONLY)
- private DataSourceType dataSourceType;
+ @JsonProperty(value = "properties", required = true)
+ private LinkedStorageAccountsProperties innerProperties = new LinkedStorageAccountsProperties();
- /*
- * Linked storage accounts resources ids.
+ /**
+ * Get the innerProperties property: Linked storage accounts properties.
+ *
+ * @return the innerProperties value.
*/
- @JsonProperty(value = "properties.storageAccountIds")
- private List storageAccountIds;
+ private LinkedStorageAccountsProperties innerProperties() {
+ return this.innerProperties;
+ }
/**
* Get the dataSourceType property: Linked storage accounts type.
@@ -37,7 +38,7 @@ public class LinkedStorageAccountsResourceInner extends ProxyResource {
* @return the dataSourceType value.
*/
public DataSourceType dataSourceType() {
- return this.dataSourceType;
+ return this.innerProperties() == null ? null : this.innerProperties().dataSourceType();
}
/**
@@ -46,7 +47,7 @@ public DataSourceType dataSourceType() {
* @return the storageAccountIds value.
*/
public List storageAccountIds() {
- return this.storageAccountIds;
+ return this.innerProperties() == null ? null : this.innerProperties().storageAccountIds();
}
/**
@@ -56,7 +57,10 @@ public List storageAccountIds() {
* @return the LinkedStorageAccountsResourceInner object itself.
*/
public LinkedStorageAccountsResourceInner withStorageAccountIds(List storageAccountIds) {
- this.storageAccountIds = storageAccountIds;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new LinkedStorageAccountsProperties();
+ }
+ this.innerProperties().withStorageAccountIds(storageAccountIds);
return this;
}
@@ -66,5 +70,13 @@ public LinkedStorageAccountsResourceInner withStorageAccountIds(List sto
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (innerProperties() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property innerProperties in model LinkedStorageAccountsResourceInner"));
+ } else {
+ innerProperties().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
index 210342b8a60f..9e98c36c374c 100644
--- 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
@@ -5,66 +5,30 @@
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 {
+public final class ManagementGroupInner {
@JsonIgnore private final ClientLogger logger = new ClientLogger(ManagementGroupInner.class);
/*
- * The number of servers connected to the management group.
+ * The properties of the management group.
*/
- @JsonProperty(value = "properties.serverCount")
- private Integer serverCount;
+ @JsonProperty(value = "properties")
+ private ManagementGroupProperties innerProperties;
- /*
- * 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.
+ /**
+ * Get the innerProperties property: The properties of the management group.
+ *
+ * @return the innerProperties value.
*/
- @JsonProperty(value = "properties.sku")
- private String sku;
+ private ManagementGroupProperties innerProperties() {
+ return this.innerProperties;
+ }
/**
* Get the serverCount property: The number of servers connected to the management group.
@@ -72,7 +36,7 @@ public class ManagementGroupInner {
* @return the serverCount value.
*/
public Integer serverCount() {
- return this.serverCount;
+ return this.innerProperties() == null ? null : this.innerProperties().serverCount();
}
/**
@@ -82,7 +46,10 @@ public Integer serverCount() {
* @return the ManagementGroupInner object itself.
*/
public ManagementGroupInner withServerCount(Integer serverCount) {
- this.serverCount = serverCount;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ManagementGroupProperties();
+ }
+ this.innerProperties().withServerCount(serverCount);
return this;
}
@@ -92,7 +59,7 @@ public ManagementGroupInner withServerCount(Integer serverCount) {
* @return the isGateway value.
*/
public Boolean isGateway() {
- return this.isGateway;
+ return this.innerProperties() == null ? null : this.innerProperties().isGateway();
}
/**
@@ -102,7 +69,10 @@ public Boolean isGateway() {
* @return the ManagementGroupInner object itself.
*/
public ManagementGroupInner withIsGateway(Boolean isGateway) {
- this.isGateway = isGateway;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ManagementGroupProperties();
+ }
+ this.innerProperties().withIsGateway(isGateway);
return this;
}
@@ -112,7 +82,7 @@ public ManagementGroupInner withIsGateway(Boolean isGateway) {
* @return the name value.
*/
public String name() {
- return this.name;
+ return this.innerProperties() == null ? null : this.innerProperties().name();
}
/**
@@ -122,7 +92,10 @@ public String name() {
* @return the ManagementGroupInner object itself.
*/
public ManagementGroupInner withName(String name) {
- this.name = name;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ManagementGroupProperties();
+ }
+ this.innerProperties().withName(name);
return this;
}
@@ -132,7 +105,7 @@ public ManagementGroupInner withName(String name) {
* @return the id value.
*/
public String id() {
- return this.id;
+ return this.innerProperties() == null ? null : this.innerProperties().id();
}
/**
@@ -142,7 +115,10 @@ public String id() {
* @return the ManagementGroupInner object itself.
*/
public ManagementGroupInner withId(String id) {
- this.id = id;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ManagementGroupProperties();
+ }
+ this.innerProperties().withId(id);
return this;
}
@@ -152,7 +128,7 @@ public ManagementGroupInner withId(String id) {
* @return the created value.
*/
public OffsetDateTime created() {
- return this.created;
+ return this.innerProperties() == null ? null : this.innerProperties().created();
}
/**
@@ -162,7 +138,10 @@ public OffsetDateTime created() {
* @return the ManagementGroupInner object itself.
*/
public ManagementGroupInner withCreated(OffsetDateTime created) {
- this.created = created;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ManagementGroupProperties();
+ }
+ this.innerProperties().withCreated(created);
return this;
}
@@ -172,7 +151,7 @@ public ManagementGroupInner withCreated(OffsetDateTime created) {
* @return the dataReceived value.
*/
public OffsetDateTime dataReceived() {
- return this.dataReceived;
+ return this.innerProperties() == null ? null : this.innerProperties().dataReceived();
}
/**
@@ -182,7 +161,10 @@ public OffsetDateTime dataReceived() {
* @return the ManagementGroupInner object itself.
*/
public ManagementGroupInner withDataReceived(OffsetDateTime dataReceived) {
- this.dataReceived = dataReceived;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ManagementGroupProperties();
+ }
+ this.innerProperties().withDataReceived(dataReceived);
return this;
}
@@ -192,7 +174,7 @@ public ManagementGroupInner withDataReceived(OffsetDateTime dataReceived) {
* @return the version value.
*/
public String version() {
- return this.version;
+ return this.innerProperties() == null ? null : this.innerProperties().version();
}
/**
@@ -202,7 +184,10 @@ public String version() {
* @return the ManagementGroupInner object itself.
*/
public ManagementGroupInner withVersion(String version) {
- this.version = version;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ManagementGroupProperties();
+ }
+ this.innerProperties().withVersion(version);
return this;
}
@@ -212,7 +197,7 @@ public ManagementGroupInner withVersion(String version) {
* @return the sku value.
*/
public String sku() {
- return this.sku;
+ return this.innerProperties() == null ? null : this.innerProperties().sku();
}
/**
@@ -222,7 +207,10 @@ public String sku() {
* @return the ManagementGroupInner object itself.
*/
public ManagementGroupInner withSku(String sku) {
- this.sku = sku;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new ManagementGroupProperties();
+ }
+ this.innerProperties().withSku(sku);
return this;
}
@@ -232,5 +220,8 @@ public ManagementGroupInner withSku(String sku) {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
}
}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/ManagementGroupProperties.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/ManagementGroupProperties.java
new file mode 100644
index 000000000000..4bd9823d638a
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/ManagementGroupProperties.java
@@ -0,0 +1,234 @@
+// 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.time.OffsetDateTime;
+
+/** Management group properties. */
+@Fluent
+public final class ManagementGroupProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagementGroupProperties.class);
+
+ /*
+ * The number of servers connected to the management group.
+ */
+ @JsonProperty(value = "serverCount")
+ private Integer serverCount;
+
+ /*
+ * Gets or sets a value indicating whether the management group is a
+ * gateway.
+ */
+ @JsonProperty(value = "isGateway")
+ private Boolean isGateway;
+
+ /*
+ * The name of the management group.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /*
+ * The unique ID of the management group.
+ */
+ @JsonProperty(value = "id")
+ private String id;
+
+ /*
+ * The datetime that the management group was created.
+ */
+ @JsonProperty(value = "created")
+ private OffsetDateTime created;
+
+ /*
+ * The last datetime that the management group received data.
+ */
+ @JsonProperty(value = "dataReceived")
+ private OffsetDateTime dataReceived;
+
+ /*
+ * The version of System Center that is managing the management group.
+ */
+ @JsonProperty(value = "version")
+ private String version;
+
+ /*
+ * The SKU of System Center that is managing the management group.
+ */
+ @JsonProperty(value = "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 ManagementGroupProperties object itself.
+ */
+ public ManagementGroupProperties 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 ManagementGroupProperties object itself.
+ */
+ public ManagementGroupProperties 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 ManagementGroupProperties object itself.
+ */
+ public ManagementGroupProperties 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 ManagementGroupProperties object itself.
+ */
+ public ManagementGroupProperties 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 ManagementGroupProperties object itself.
+ */
+ public ManagementGroupProperties 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 ManagementGroupProperties object itself.
+ */
+ public ManagementGroupProperties 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 ManagementGroupProperties object itself.
+ */
+ public ManagementGroupProperties 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 ManagementGroupProperties object itself.
+ */
+ public ManagementGroupProperties 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/OperationStatusInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/OperationStatusInner.java
index 39d0e82438ae..22ec67cfc7c4 100644
--- 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
@@ -46,7 +46,7 @@ public final class OperationStatusInner {
private String status;
/*
- * The error detail of the operation if any.
+ * Error response The error detail of the operation if any.
*/
@JsonProperty(value = "error")
private ManagementError error;
@@ -152,7 +152,7 @@ public OperationStatusInner withStatus(String status) {
}
/**
- * Get the error property: The error detail of the operation if any.
+ * Get the error property: Error response The error detail of the operation if any.
*
* @return the error value.
*/
@@ -161,7 +161,7 @@ public ManagementError error() {
}
/**
- * Set the error property: The error detail of the operation if any.
+ * Set the error property: Error response The error detail of the operation if any.
*
* @param error the error value to set.
* @return the OperationStatusInner object itself.
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
index 69d58886efe6..78b83bf2cbc0 100644
--- 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
@@ -5,7 +5,6 @@
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;
@@ -14,67 +13,26 @@
import java.util.List;
/** Value object for saved search results. */
-@JsonFlatten
@Fluent
-public class SavedSearchInner extends ProxyResource {
+public final class SavedSearchInner extends ProxyResource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(SavedSearchInner.class);
/*
- * The ETag of the saved search.
+ * The ETag of the saved search. To override an existing saved search, use
+ * "*" or specify the current Etag
*/
@JsonProperty(value = "etag")
private String etag;
/*
- * The category of the saved search. This helps the user to find a saved
- * search faster.
+ * The properties of the saved search.
*/
- @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;
+ @JsonProperty(value = "properties", required = true)
+ private SavedSearchProperties innerProperties = new SavedSearchProperties();
/**
- * Get the etag property: The ETag of the saved search.
+ * Get the etag property: The ETag of the saved search. To override an existing saved search, use "*" or specify the
+ * current Etag.
*
* @return the etag value.
*/
@@ -83,7 +41,8 @@ public String etag() {
}
/**
- * Set the etag property: The ETag of the saved search.
+ * Set the etag property: The ETag of the saved search. To override an existing saved search, use "*" or specify the
+ * current Etag.
*
* @param etag the etag value to set.
* @return the SavedSearchInner object itself.
@@ -93,13 +52,22 @@ public SavedSearchInner withEtag(String etag) {
return this;
}
+ /**
+ * Get the innerProperties property: The properties of the saved search.
+ *
+ * @return the innerProperties value.
+ */
+ private SavedSearchProperties innerProperties() {
+ return this.innerProperties;
+ }
+
/**
* 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;
+ return this.innerProperties() == null ? null : this.innerProperties().category();
}
/**
@@ -109,7 +77,10 @@ public String category() {
* @return the SavedSearchInner object itself.
*/
public SavedSearchInner withCategory(String category) {
- this.category = category;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SavedSearchProperties();
+ }
+ this.innerProperties().withCategory(category);
return this;
}
@@ -119,7 +90,7 @@ public SavedSearchInner withCategory(String category) {
* @return the displayName value.
*/
public String displayName() {
- return this.displayName;
+ return this.innerProperties() == null ? null : this.innerProperties().displayName();
}
/**
@@ -129,7 +100,10 @@ public String displayName() {
* @return the SavedSearchInner object itself.
*/
public SavedSearchInner withDisplayName(String displayName) {
- this.displayName = displayName;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SavedSearchProperties();
+ }
+ this.innerProperties().withDisplayName(displayName);
return this;
}
@@ -139,7 +113,7 @@ public SavedSearchInner withDisplayName(String displayName) {
* @return the query value.
*/
public String query() {
- return this.query;
+ return this.innerProperties() == null ? null : this.innerProperties().query();
}
/**
@@ -149,7 +123,10 @@ public String query() {
* @return the SavedSearchInner object itself.
*/
public SavedSearchInner withQuery(String query) {
- this.query = query;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SavedSearchProperties();
+ }
+ this.innerProperties().withQuery(query);
return this;
}
@@ -159,7 +136,7 @@ public SavedSearchInner withQuery(String query) {
* @return the functionAlias value.
*/
public String functionAlias() {
- return this.functionAlias;
+ return this.innerProperties() == null ? null : this.innerProperties().functionAlias();
}
/**
@@ -169,7 +146,10 @@ public String functionAlias() {
* @return the SavedSearchInner object itself.
*/
public SavedSearchInner withFunctionAlias(String functionAlias) {
- this.functionAlias = functionAlias;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SavedSearchProperties();
+ }
+ this.innerProperties().withFunctionAlias(functionAlias);
return this;
}
@@ -182,7 +162,7 @@ public SavedSearchInner withFunctionAlias(String functionAlias) {
* @return the functionParameters value.
*/
public String functionParameters() {
- return this.functionParameters;
+ return this.innerProperties() == null ? null : this.innerProperties().functionParameters();
}
/**
@@ -195,7 +175,10 @@ public String functionParameters() {
* @return the SavedSearchInner object itself.
*/
public SavedSearchInner withFunctionParameters(String functionParameters) {
- this.functionParameters = functionParameters;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SavedSearchProperties();
+ }
+ this.innerProperties().withFunctionParameters(functionParameters);
return this;
}
@@ -205,7 +188,7 @@ public SavedSearchInner withFunctionParameters(String functionParameters) {
* @return the version value.
*/
public Long version() {
- return this.version;
+ return this.innerProperties() == null ? null : this.innerProperties().version();
}
/**
@@ -215,7 +198,10 @@ public Long version() {
* @return the SavedSearchInner object itself.
*/
public SavedSearchInner withVersion(Long version) {
- this.version = version;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SavedSearchProperties();
+ }
+ this.innerProperties().withVersion(version);
return this;
}
@@ -225,7 +211,7 @@ public SavedSearchInner withVersion(Long version) {
* @return the tags value.
*/
public List tags() {
- return this.tags;
+ return this.innerProperties() == null ? null : this.innerProperties().tags();
}
/**
@@ -235,7 +221,10 @@ public List tags() {
* @return the SavedSearchInner object itself.
*/
public SavedSearchInner withTags(List tags) {
- this.tags = tags;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new SavedSearchProperties();
+ }
+ this.innerProperties().withTags(tags);
return this;
}
@@ -245,23 +234,13 @@ public SavedSearchInner withTags(List tags) {
* @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) {
+ if (innerProperties() == 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());
+ new IllegalArgumentException(
+ "Missing required property innerProperties in model SavedSearchInner"));
+ } else {
+ innerProperties().validate();
}
}
}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/SavedSearchProperties.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/SavedSearchProperties.java
new file mode 100644
index 000000000000..e9a16e791a8e
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/SavedSearchProperties.java
@@ -0,0 +1,239 @@
+// 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.Tag;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Value object for saved search results. */
+@Fluent
+public final class SavedSearchProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(SavedSearchProperties.class);
+
+ /*
+ * The category of the saved search. This helps the user to find a saved
+ * search faster.
+ */
+ @JsonProperty(value = "category", required = true)
+ private String category;
+
+ /*
+ * Saved search display name.
+ */
+ @JsonProperty(value = "displayName", required = true)
+ private String displayName;
+
+ /*
+ * The query expression for the saved search.
+ */
+ @JsonProperty(value = "query", required = true)
+ private String query;
+
+ /*
+ * The function alias if query serves as a function.
+ */
+ @JsonProperty(value = "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 = "functionParameters")
+ private String functionParameters;
+
+ /*
+ * The version number of the query language. The current version is 2 and
+ * is the default.
+ */
+ @JsonProperty(value = "version")
+ private Long version;
+
+ /*
+ * The tags attached to the saved search.
+ */
+ @JsonProperty(value = "tags")
+ private List tags;
+
+ /**
+ * 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 SavedSearchProperties object itself.
+ */
+ public SavedSearchProperties 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 SavedSearchProperties object itself.
+ */
+ public SavedSearchProperties 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 SavedSearchProperties object itself.
+ */
+ public SavedSearchProperties 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 SavedSearchProperties object itself.
+ */
+ public SavedSearchProperties 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 SavedSearchProperties object itself.
+ */
+ public SavedSearchProperties 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 SavedSearchProperties object itself.
+ */
+ public SavedSearchProperties 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 SavedSearchProperties object itself.
+ */
+ public SavedSearchProperties 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 SavedSearchProperties"));
+ }
+ if (displayName() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property displayName in model SavedSearchProperties"));
+ }
+ if (query() == null) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException("Missing required property query in model SavedSearchProperties"));
+ }
+ 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/StorageInsightInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/StorageInsightInner.java
index 035a1a22ef07..cda82eddc895 100644
--- 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
@@ -5,22 +5,27 @@
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.JsonInclude;
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 {
+public final class StorageInsightInner extends ProxyResource {
@JsonIgnore private final ClientLogger logger = new ClientLogger(StorageInsightInner.class);
+ /*
+ * Storage insight properties.
+ */
+ @JsonProperty(value = "properties")
+ private StorageInsightProperties innerProperties;
+
/*
* The ETag of the storage insight.
*/
@@ -31,31 +36,17 @@ public class StorageInsightInner extends ProxyResource {
* Resource tags.
*/
@JsonProperty(value = "tags")
+ @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS)
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
+ /**
+ * Get the innerProperties property: Storage insight properties.
+ *
+ * @return the innerProperties value.
*/
- @JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY)
- private StorageInsightStatus status;
+ private StorageInsightProperties innerProperties() {
+ return this.innerProperties;
+ }
/**
* Get the etag property: The ETag of the storage insight.
@@ -103,7 +94,7 @@ public StorageInsightInner withTags(Map tags) {
* @return the containers value.
*/
public List containers() {
- return this.containers;
+ return this.innerProperties() == null ? null : this.innerProperties().containers();
}
/**
@@ -113,7 +104,10 @@ public List containers() {
* @return the StorageInsightInner object itself.
*/
public StorageInsightInner withContainers(List containers) {
- this.containers = containers;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new StorageInsightProperties();
+ }
+ this.innerProperties().withContainers(containers);
return this;
}
@@ -123,7 +117,7 @@ public StorageInsightInner withContainers(List containers) {
* @return the tables value.
*/
public List tables() {
- return this.tables;
+ return this.innerProperties() == null ? null : this.innerProperties().tables();
}
/**
@@ -133,7 +127,10 @@ public List tables() {
* @return the StorageInsightInner object itself.
*/
public StorageInsightInner withTables(List tables) {
- this.tables = tables;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new StorageInsightProperties();
+ }
+ this.innerProperties().withTables(tables);
return this;
}
@@ -143,7 +140,7 @@ public StorageInsightInner withTables(List tables) {
* @return the storageAccount value.
*/
public StorageAccount storageAccount() {
- return this.storageAccount;
+ return this.innerProperties() == null ? null : this.innerProperties().storageAccount();
}
/**
@@ -153,7 +150,10 @@ public StorageAccount storageAccount() {
* @return the StorageInsightInner object itself.
*/
public StorageInsightInner withStorageAccount(StorageAccount storageAccount) {
- this.storageAccount = storageAccount;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new StorageInsightProperties();
+ }
+ this.innerProperties().withStorageAccount(storageAccount);
return this;
}
@@ -163,7 +163,7 @@ public StorageInsightInner withStorageAccount(StorageAccount storageAccount) {
* @return the status value.
*/
public StorageInsightStatus status() {
- return this.status;
+ return this.innerProperties() == null ? null : this.innerProperties().status();
}
/**
@@ -172,11 +172,8 @@ public StorageInsightStatus status() {
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
- if (storageAccount() != null) {
- storageAccount().validate();
- }
- if (status() != null) {
- status().validate();
+ if (innerProperties() != null) {
+ innerProperties().validate();
}
}
}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/StorageInsightProperties.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/StorageInsightProperties.java
new file mode 100644
index 000000000000..97682fc3d02d
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/StorageInsightProperties.java
@@ -0,0 +1,131 @@
+// 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.StorageAccount;
+import com.azure.resourcemanager.loganalytics.models.StorageInsightStatus;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Storage insight properties. */
+@Fluent
+public final class StorageInsightProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(StorageInsightProperties.class);
+
+ /*
+ * The names of the blob containers that the workspace should read
+ */
+ @JsonProperty(value = "containers")
+ private List containers;
+
+ /*
+ * The names of the Azure tables that the workspace should read
+ */
+ @JsonProperty(value = "tables")
+ private List tables;
+
+ /*
+ * The storage account connection details
+ */
+ @JsonProperty(value = "storageAccount", required = true)
+ private StorageAccount storageAccount;
+
+ /*
+ * The status of the storage insight
+ */
+ @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY)
+ private StorageInsightStatus status;
+
+ /**
+ * 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 StorageInsightProperties object itself.
+ */
+ public StorageInsightProperties 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 StorageInsightProperties object itself.
+ */
+ public StorageInsightProperties 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 StorageInsightProperties object itself.
+ */
+ public StorageInsightProperties 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) {
+ throw logger
+ .logExceptionAsError(
+ new IllegalArgumentException(
+ "Missing required property storageAccount in model StorageInsightProperties"));
+ } else {
+ 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
index 97f0a3960707..75985881dfb8 100644
--- 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
@@ -5,52 +5,256 @@
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.management.SystemData;
import com.azure.core.util.logging.ClientLogger;
+import com.azure.resourcemanager.loganalytics.models.ProvisioningStateEnum;
+import com.azure.resourcemanager.loganalytics.models.RestoredLogs;
+import com.azure.resourcemanager.loganalytics.models.ResultStatistics;
+import com.azure.resourcemanager.loganalytics.models.Schema;
+import com.azure.resourcemanager.loganalytics.models.SearchResults;
+import com.azure.resourcemanager.loganalytics.models.TablePlanEnum;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** Workspace data table definition. */
-@JsonFlatten
@Fluent
-public class TableInner extends ProxyResource {
+public final 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.
+ * Table's properties.
*/
- @JsonProperty(value = "properties.retentionInDays")
- private Integer retentionInDays;
+ @JsonProperty(value = "properties")
+ private TableProperties innerProperties;
+
+ /*
+ * Metadata pertaining to creation and last modification of the resource.
+ */
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
+
+ /**
+ * Get the innerProperties property: Table's properties.
+ *
+ * @return the innerProperties value.
+ */
+ private TableProperties innerProperties() {
+ return this.innerProperties;
+ }
+
+ /**
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
+ */
+ public SystemData systemData() {
+ return this.systemData;
+ }
/**
- * 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.
+ * Get the retentionInDays property: The table retention in days, between 4 and 730. Setting this property to -1
+ * will default to the workspace retention.
*
* @return the retentionInDays value.
*/
public Integer retentionInDays() {
- return this.retentionInDays;
+ return this.innerProperties() == null ? null : this.innerProperties().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.
+ * Set the retentionInDays property: The table retention in days, between 4 and 730. Setting this property to -1
+ * 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;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new TableProperties();
+ }
+ this.innerProperties().withRetentionInDays(retentionInDays);
+ return this;
+ }
+
+ /**
+ * Get the totalRetentionInDays property: The table total retention in days, between 4 and 2555. Setting this
+ * property to -1 will default to table retention.
+ *
+ * @return the totalRetentionInDays value.
+ */
+ public Integer totalRetentionInDays() {
+ return this.innerProperties() == null ? null : this.innerProperties().totalRetentionInDays();
+ }
+
+ /**
+ * Set the totalRetentionInDays property: The table total retention in days, between 4 and 2555. Setting this
+ * property to -1 will default to table retention.
+ *
+ * @param totalRetentionInDays the totalRetentionInDays value to set.
+ * @return the TableInner object itself.
+ */
+ public TableInner withTotalRetentionInDays(Integer totalRetentionInDays) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new TableProperties();
+ }
+ this.innerProperties().withTotalRetentionInDays(totalRetentionInDays);
+ return this;
+ }
+
+ /**
+ * Get the archiveRetentionInDays property: The table data archive retention in days. Calculated as
+ * (totalRetentionInDays-retentionInDays).
+ *
+ * @return the archiveRetentionInDays value.
+ */
+ public Integer archiveRetentionInDays() {
+ return this.innerProperties() == null ? null : this.innerProperties().archiveRetentionInDays();
+ }
+
+ /**
+ * Get the searchResults property: Parameters of the search job that initiated this table.
+ *
+ * @return the searchResults value.
+ */
+ public SearchResults searchResults() {
+ return this.innerProperties() == null ? null : this.innerProperties().searchResults();
+ }
+
+ /**
+ * Set the searchResults property: Parameters of the search job that initiated this table.
+ *
+ * @param searchResults the searchResults value to set.
+ * @return the TableInner object itself.
+ */
+ public TableInner withSearchResults(SearchResults searchResults) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new TableProperties();
+ }
+ this.innerProperties().withSearchResults(searchResults);
+ return this;
+ }
+
+ /**
+ * Get the restoredLogs property: Parameters of the restore operation that initiated this table.
+ *
+ * @return the restoredLogs value.
+ */
+ public RestoredLogs restoredLogs() {
+ return this.innerProperties() == null ? null : this.innerProperties().restoredLogs();
+ }
+
+ /**
+ * Set the restoredLogs property: Parameters of the restore operation that initiated this table.
+ *
+ * @param restoredLogs the restoredLogs value to set.
+ * @return the TableInner object itself.
+ */
+ public TableInner withRestoredLogs(RestoredLogs restoredLogs) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new TableProperties();
+ }
+ this.innerProperties().withRestoredLogs(restoredLogs);
+ return this;
+ }
+
+ /**
+ * Get the resultStatistics property: Search job execution statistics.
+ *
+ * @return the resultStatistics value.
+ */
+ public ResultStatistics resultStatistics() {
+ return this.innerProperties() == null ? null : this.innerProperties().resultStatistics();
+ }
+
+ /**
+ * Set the resultStatistics property: Search job execution statistics.
+ *
+ * @param resultStatistics the resultStatistics value to set.
+ * @return the TableInner object itself.
+ */
+ public TableInner withResultStatistics(ResultStatistics resultStatistics) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new TableProperties();
+ }
+ this.innerProperties().withResultStatistics(resultStatistics);
+ return this;
+ }
+
+ /**
+ * Get the plan property: Instruct the system how to handle and charge the logs ingested to this table.
+ *
+ * @return the plan value.
+ */
+ public TablePlanEnum plan() {
+ return this.innerProperties() == null ? null : this.innerProperties().plan();
+ }
+
+ /**
+ * Set the plan property: Instruct the system how to handle and charge the logs ingested to this table.
+ *
+ * @param plan the plan value to set.
+ * @return the TableInner object itself.
+ */
+ public TableInner withPlan(TablePlanEnum plan) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new TableProperties();
+ }
+ this.innerProperties().withPlan(plan);
return this;
}
+ /**
+ * Get the lastPlanModifiedDate property: The timestamp that table plan was last modified (UTC).
+ *
+ * @return the lastPlanModifiedDate value.
+ */
+ public String lastPlanModifiedDate() {
+ return this.innerProperties() == null ? null : this.innerProperties().lastPlanModifiedDate();
+ }
+
+ /**
+ * Get the schema property: Table schema.
+ *
+ * @return the schema value.
+ */
+ public Schema schema() {
+ return this.innerProperties() == null ? null : this.innerProperties().schema();
+ }
+
+ /**
+ * Set the schema property: Table schema.
+ *
+ * @param schema the schema value to set.
+ * @return the TableInner object itself.
+ */
+ public TableInner withSchema(Schema schema) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new TableProperties();
+ }
+ this.innerProperties().withSchema(schema);
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: Table's current provisioning state. If set to 'updating', indicates a
+ * resource lock due to ongoing operation, forbidding any update to the table until the ongoing operation is
+ * concluded.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningStateEnum provisioningState() {
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
+ }
+
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
+ if (innerProperties() != null) {
+ innerProperties().validate();
+ }
}
}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/TableProperties.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/TableProperties.java
new file mode 100644
index 000000000000..836e6bc285a9
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/TableProperties.java
@@ -0,0 +1,282 @@
+// 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.ProvisioningStateEnum;
+import com.azure.resourcemanager.loganalytics.models.RestoredLogs;
+import com.azure.resourcemanager.loganalytics.models.ResultStatistics;
+import com.azure.resourcemanager.loganalytics.models.Schema;
+import com.azure.resourcemanager.loganalytics.models.SearchResults;
+import com.azure.resourcemanager.loganalytics.models.TablePlanEnum;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Table properties. */
+@Fluent
+public final class TableProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(TableProperties.class);
+
+ /*
+ * The table retention in days, between 4 and 730. Setting this property to
+ * -1 will default to the workspace retention.
+ */
+ @JsonProperty(value = "retentionInDays")
+ private Integer retentionInDays;
+
+ /*
+ * The table total retention in days, between 4 and 2555. Setting this
+ * property to -1 will default to table retention.
+ */
+ @JsonProperty(value = "totalRetentionInDays")
+ private Integer totalRetentionInDays;
+
+ /*
+ * The table data archive retention in days. Calculated as
+ * (totalRetentionInDays-retentionInDays)
+ */
+ @JsonProperty(value = "archiveRetentionInDays", access = JsonProperty.Access.WRITE_ONLY)
+ private Integer archiveRetentionInDays;
+
+ /*
+ * Parameters of the search job that initiated this table.
+ */
+ @JsonProperty(value = "searchResults")
+ private SearchResults searchResults;
+
+ /*
+ * Parameters of the restore operation that initiated this table.
+ */
+ @JsonProperty(value = "restoredLogs")
+ private RestoredLogs restoredLogs;
+
+ /*
+ * Search job execution statistics.
+ */
+ @JsonProperty(value = "resultStatistics")
+ private ResultStatistics resultStatistics;
+
+ /*
+ * Instruct the system how to handle and charge the logs ingested to this
+ * table.
+ */
+ @JsonProperty(value = "plan")
+ private TablePlanEnum plan;
+
+ /*
+ * The timestamp that table plan was last modified (UTC).
+ */
+ @JsonProperty(value = "lastPlanModifiedDate", access = JsonProperty.Access.WRITE_ONLY)
+ private String lastPlanModifiedDate;
+
+ /*
+ * Table schema.
+ */
+ @JsonProperty(value = "schema")
+ private Schema schema;
+
+ /*
+ * Table's current provisioning state. If set to 'updating', indicates a
+ * resource lock due to ongoing operation, forbidding any update to the
+ * table until the ongoing operation is concluded.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private ProvisioningStateEnum provisioningState;
+
+ /**
+ * Get the retentionInDays property: The table retention in days, between 4 and 730. Setting this property to -1
+ * will default to the workspace retention.
+ *
+ * @return the retentionInDays value.
+ */
+ public Integer retentionInDays() {
+ return this.retentionInDays;
+ }
+
+ /**
+ * Set the retentionInDays property: The table retention in days, between 4 and 730. Setting this property to -1
+ * will default to the workspace retention.
+ *
+ * @param retentionInDays the retentionInDays value to set.
+ * @return the TableProperties object itself.
+ */
+ public TableProperties withRetentionInDays(Integer retentionInDays) {
+ this.retentionInDays = retentionInDays;
+ return this;
+ }
+
+ /**
+ * Get the totalRetentionInDays property: The table total retention in days, between 4 and 2555. Setting this
+ * property to -1 will default to table retention.
+ *
+ * @return the totalRetentionInDays value.
+ */
+ public Integer totalRetentionInDays() {
+ return this.totalRetentionInDays;
+ }
+
+ /**
+ * Set the totalRetentionInDays property: The table total retention in days, between 4 and 2555. Setting this
+ * property to -1 will default to table retention.
+ *
+ * @param totalRetentionInDays the totalRetentionInDays value to set.
+ * @return the TableProperties object itself.
+ */
+ public TableProperties withTotalRetentionInDays(Integer totalRetentionInDays) {
+ this.totalRetentionInDays = totalRetentionInDays;
+ return this;
+ }
+
+ /**
+ * Get the archiveRetentionInDays property: The table data archive retention in days. Calculated as
+ * (totalRetentionInDays-retentionInDays).
+ *
+ * @return the archiveRetentionInDays value.
+ */
+ public Integer archiveRetentionInDays() {
+ return this.archiveRetentionInDays;
+ }
+
+ /**
+ * Get the searchResults property: Parameters of the search job that initiated this table.
+ *
+ * @return the searchResults value.
+ */
+ public SearchResults searchResults() {
+ return this.searchResults;
+ }
+
+ /**
+ * Set the searchResults property: Parameters of the search job that initiated this table.
+ *
+ * @param searchResults the searchResults value to set.
+ * @return the TableProperties object itself.
+ */
+ public TableProperties withSearchResults(SearchResults searchResults) {
+ this.searchResults = searchResults;
+ return this;
+ }
+
+ /**
+ * Get the restoredLogs property: Parameters of the restore operation that initiated this table.
+ *
+ * @return the restoredLogs value.
+ */
+ public RestoredLogs restoredLogs() {
+ return this.restoredLogs;
+ }
+
+ /**
+ * Set the restoredLogs property: Parameters of the restore operation that initiated this table.
+ *
+ * @param restoredLogs the restoredLogs value to set.
+ * @return the TableProperties object itself.
+ */
+ public TableProperties withRestoredLogs(RestoredLogs restoredLogs) {
+ this.restoredLogs = restoredLogs;
+ return this;
+ }
+
+ /**
+ * Get the resultStatistics property: Search job execution statistics.
+ *
+ * @return the resultStatistics value.
+ */
+ public ResultStatistics resultStatistics() {
+ return this.resultStatistics;
+ }
+
+ /**
+ * Set the resultStatistics property: Search job execution statistics.
+ *
+ * @param resultStatistics the resultStatistics value to set.
+ * @return the TableProperties object itself.
+ */
+ public TableProperties withResultStatistics(ResultStatistics resultStatistics) {
+ this.resultStatistics = resultStatistics;
+ return this;
+ }
+
+ /**
+ * Get the plan property: Instruct the system how to handle and charge the logs ingested to this table.
+ *
+ * @return the plan value.
+ */
+ public TablePlanEnum plan() {
+ return this.plan;
+ }
+
+ /**
+ * Set the plan property: Instruct the system how to handle and charge the logs ingested to this table.
+ *
+ * @param plan the plan value to set.
+ * @return the TableProperties object itself.
+ */
+ public TableProperties withPlan(TablePlanEnum plan) {
+ this.plan = plan;
+ return this;
+ }
+
+ /**
+ * Get the lastPlanModifiedDate property: The timestamp that table plan was last modified (UTC).
+ *
+ * @return the lastPlanModifiedDate value.
+ */
+ public String lastPlanModifiedDate() {
+ return this.lastPlanModifiedDate;
+ }
+
+ /**
+ * Get the schema property: Table schema.
+ *
+ * @return the schema value.
+ */
+ public Schema schema() {
+ return this.schema;
+ }
+
+ /**
+ * Set the schema property: Table schema.
+ *
+ * @param schema the schema value to set.
+ * @return the TableProperties object itself.
+ */
+ public TableProperties withSchema(Schema schema) {
+ this.schema = schema;
+ return this;
+ }
+
+ /**
+ * Get the provisioningState property: Table's current provisioning state. If set to 'updating', indicates a
+ * resource lock due to ongoing operation, forbidding any update to the table until the ongoing operation is
+ * concluded.
+ *
+ * @return the provisioningState value.
+ */
+ public ProvisioningStateEnum provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * Validates the instance.
+ *
+ * @throws IllegalArgumentException thrown if the instance is not valid.
+ */
+ public void validate() {
+ if (searchResults() != null) {
+ searchResults().validate();
+ }
+ if (restoredLogs() != null) {
+ restoredLogs().validate();
+ }
+ if (resultStatistics() != null) {
+ resultStatistics().validate();
+ }
+ if (schema() != null) {
+ schema().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
index ff5401ba2e35..025e30c31665 100644
--- 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
@@ -5,13 +5,14 @@
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.management.SystemData;
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.WorkspaceFeatures;
import com.azure.resourcemanager.loganalytics.models.WorkspaceSku;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -19,91 +20,45 @@
import java.util.Map;
/** The top level Workspace resource container. */
-@JsonFlatten
@Fluent
-public class WorkspaceInner extends Resource {
+public final 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. Allowed values are per pricing
- * plan. See pricing tiers documentation for details.
+ * Workspace properties.
*/
- @JsonProperty(value = "properties.retentionInDays")
- private Integer retentionInDays;
+ @JsonProperty(value = "properties")
+ private WorkspaceProperties innerProperties;
/*
- * The daily volume cap for ingestion.
+ * Metadata pertaining to creation and last modification of the resource.
*/
- @JsonProperty(value = "properties.workspaceCapping")
- private WorkspaceCapping workspaceCapping;
+ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY)
+ private SystemData systemData;
/*
- * Workspace creation date.
- */
- @JsonProperty(value = "properties.createdDate", access = JsonProperty.Access.WRITE_ONLY)
- private String createdDate;
-
- /*
- * Workspace modification date.
- */
- @JsonProperty(value = "properties.modifiedDate", access = JsonProperty.Access.WRITE_ONLY)
- private String modifiedDate;
-
- /*
- * 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;
-
- /*
- * Indicates whether customer managed storage is mandatory for query
- * management.
+ * The ETag of the workspace.
*/
- @JsonProperty(value = "properties.forceCmkForQuery")
- private Boolean forceCmkForQuery;
+ @JsonProperty(value = "eTag")
+ private String etag;
- /*
- * List of linked private link scope resources.
+ /**
+ * Get the innerProperties property: Workspace properties.
+ *
+ * @return the innerProperties value.
*/
- @JsonProperty(value = "properties.privateLinkScopedResources", access = JsonProperty.Access.WRITE_ONLY)
- private List privateLinkScopedResources;
+ private WorkspaceProperties innerProperties() {
+ return this.innerProperties;
+ }
- /*
- * Workspace features.
+ /**
+ * Get the systemData property: Metadata pertaining to creation and last modification of the resource.
+ *
+ * @return the systemData value.
*/
- @JsonProperty(value = "properties.features")
- private Map features;
+ public SystemData systemData() {
+ return this.systemData;
+ }
/**
* Get the etag property: The ETag of the workspace.
@@ -125,24 +80,27 @@ public WorkspaceInner withEtag(String etag) {
return this;
}
+ /** {@inheritDoc} */
+ @Override
+ public WorkspaceInner withLocation(String location) {
+ super.withLocation(location);
+ return this;
+ }
+
+ /** {@inheritDoc} */
+ @Override
+ public WorkspaceInner withTags(Map tags) {
+ super.withTags(tags);
+ 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;
+ return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
}
/**
@@ -151,7 +109,7 @@ public WorkspaceInner withProvisioningState(WorkspaceEntityStatus provisioningSt
* @return the customerId value.
*/
public String customerId() {
- return this.customerId;
+ return this.innerProperties() == null ? null : this.innerProperties().customerId();
}
/**
@@ -160,7 +118,7 @@ public String customerId() {
* @return the sku value.
*/
public WorkspaceSku sku() {
- return this.sku;
+ return this.innerProperties() == null ? null : this.innerProperties().sku();
}
/**
@@ -170,7 +128,10 @@ public WorkspaceSku sku() {
* @return the WorkspaceInner object itself.
*/
public WorkspaceInner withSku(WorkspaceSku sku) {
- this.sku = sku;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new WorkspaceProperties();
+ }
+ this.innerProperties().withSku(sku);
return this;
}
@@ -181,7 +142,7 @@ public WorkspaceInner withSku(WorkspaceSku sku) {
* @return the retentionInDays value.
*/
public Integer retentionInDays() {
- return this.retentionInDays;
+ return this.innerProperties() == null ? null : this.innerProperties().retentionInDays();
}
/**
@@ -192,7 +153,10 @@ public Integer retentionInDays() {
* @return the WorkspaceInner object itself.
*/
public WorkspaceInner withRetentionInDays(Integer retentionInDays) {
- this.retentionInDays = retentionInDays;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new WorkspaceProperties();
+ }
+ this.innerProperties().withRetentionInDays(retentionInDays);
return this;
}
@@ -202,7 +166,7 @@ public WorkspaceInner withRetentionInDays(Integer retentionInDays) {
* @return the workspaceCapping value.
*/
public WorkspaceCapping workspaceCapping() {
- return this.workspaceCapping;
+ return this.innerProperties() == null ? null : this.innerProperties().workspaceCapping();
}
/**
@@ -212,7 +176,10 @@ public WorkspaceCapping workspaceCapping() {
* @return the WorkspaceInner object itself.
*/
public WorkspaceInner withWorkspaceCapping(WorkspaceCapping workspaceCapping) {
- this.workspaceCapping = workspaceCapping;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new WorkspaceProperties();
+ }
+ this.innerProperties().withWorkspaceCapping(workspaceCapping);
return this;
}
@@ -222,7 +189,7 @@ public WorkspaceInner withWorkspaceCapping(WorkspaceCapping workspaceCapping) {
* @return the createdDate value.
*/
public String createdDate() {
- return this.createdDate;
+ return this.innerProperties() == null ? null : this.innerProperties().createdDate();
}
/**
@@ -231,7 +198,7 @@ public String createdDate() {
* @return the modifiedDate value.
*/
public String modifiedDate() {
- return this.modifiedDate;
+ return this.innerProperties() == null ? null : this.innerProperties().modifiedDate();
}
/**
@@ -240,7 +207,7 @@ public String modifiedDate() {
* @return the publicNetworkAccessForIngestion value.
*/
public PublicNetworkAccessType publicNetworkAccessForIngestion() {
- return this.publicNetworkAccessForIngestion;
+ return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccessForIngestion();
}
/**
@@ -250,7 +217,10 @@ public PublicNetworkAccessType publicNetworkAccessForIngestion() {
* @return the WorkspaceInner object itself.
*/
public WorkspaceInner withPublicNetworkAccessForIngestion(PublicNetworkAccessType publicNetworkAccessForIngestion) {
- this.publicNetworkAccessForIngestion = publicNetworkAccessForIngestion;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new WorkspaceProperties();
+ }
+ this.innerProperties().withPublicNetworkAccessForIngestion(publicNetworkAccessForIngestion);
return this;
}
@@ -260,7 +230,7 @@ public WorkspaceInner withPublicNetworkAccessForIngestion(PublicNetworkAccessTyp
* @return the publicNetworkAccessForQuery value.
*/
public PublicNetworkAccessType publicNetworkAccessForQuery() {
- return this.publicNetworkAccessForQuery;
+ return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccessForQuery();
}
/**
@@ -270,7 +240,10 @@ public PublicNetworkAccessType publicNetworkAccessForQuery() {
* @return the WorkspaceInner object itself.
*/
public WorkspaceInner withPublicNetworkAccessForQuery(PublicNetworkAccessType publicNetworkAccessForQuery) {
- this.publicNetworkAccessForQuery = publicNetworkAccessForQuery;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new WorkspaceProperties();
+ }
+ this.innerProperties().withPublicNetworkAccessForQuery(publicNetworkAccessForQuery);
return this;
}
@@ -280,7 +253,7 @@ public WorkspaceInner withPublicNetworkAccessForQuery(PublicNetworkAccessType pu
* @return the forceCmkForQuery value.
*/
public Boolean forceCmkForQuery() {
- return this.forceCmkForQuery;
+ return this.innerProperties() == null ? null : this.innerProperties().forceCmkForQuery();
}
/**
@@ -290,7 +263,10 @@ public Boolean forceCmkForQuery() {
* @return the WorkspaceInner object itself.
*/
public WorkspaceInner withForceCmkForQuery(Boolean forceCmkForQuery) {
- this.forceCmkForQuery = forceCmkForQuery;
+ if (this.innerProperties() == null) {
+ this.innerProperties = new WorkspaceProperties();
+ }
+ this.innerProperties().withForceCmkForQuery(forceCmkForQuery);
return this;
}
@@ -300,7 +276,7 @@ public WorkspaceInner withForceCmkForQuery(Boolean forceCmkForQuery) {
* @return the privateLinkScopedResources value.
*/
public List privateLinkScopedResources() {
- return this.privateLinkScopedResources;
+ return this.innerProperties() == null ? null : this.innerProperties().privateLinkScopedResources();
}
/**
@@ -308,8 +284,8 @@ public List privateLinkScopedResources() {
*
* @return the features value.
*/
- public Map features() {
- return this.features;
+ public WorkspaceFeatures features() {
+ return this.innerProperties() == null ? null : this.innerProperties().features();
}
/**
@@ -318,22 +294,38 @@ public Map features() {
* @param features the features value to set.
* @return the WorkspaceInner object itself.
*/
- public WorkspaceInner withFeatures(Map features) {
- this.features = features;
+ public WorkspaceInner withFeatures(WorkspaceFeatures features) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new WorkspaceProperties();
+ }
+ this.innerProperties().withFeatures(features);
return this;
}
- /** {@inheritDoc} */
- @Override
- public WorkspaceInner withLocation(String location) {
- super.withLocation(location);
- return this;
+ /**
+ * Get the defaultDataCollectionRuleResourceId property: The resource ID of the default Data Collection Rule to use
+ * for this workspace. Expected format is -
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dcrName}.
+ *
+ * @return the defaultDataCollectionRuleResourceId value.
+ */
+ public String defaultDataCollectionRuleResourceId() {
+ return this.innerProperties() == null ? null : this.innerProperties().defaultDataCollectionRuleResourceId();
}
- /** {@inheritDoc} */
- @Override
- public WorkspaceInner withTags(Map tags) {
- super.withTags(tags);
+ /**
+ * Set the defaultDataCollectionRuleResourceId property: The resource ID of the default Data Collection Rule to use
+ * for this workspace. Expected format is -
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dcrName}.
+ *
+ * @param defaultDataCollectionRuleResourceId the defaultDataCollectionRuleResourceId value to set.
+ * @return the WorkspaceInner object itself.
+ */
+ public WorkspaceInner withDefaultDataCollectionRuleResourceId(String defaultDataCollectionRuleResourceId) {
+ if (this.innerProperties() == null) {
+ this.innerProperties = new WorkspaceProperties();
+ }
+ this.innerProperties().withDefaultDataCollectionRuleResourceId(defaultDataCollectionRuleResourceId);
return this;
}
@@ -343,14 +335,8 @@ public WorkspaceInner withTags(Map tags) {
* @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());
+ if (innerProperties() != null) {
+ innerProperties().validate();
}
}
}
diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/WorkspaceProperties.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/WorkspaceProperties.java
new file mode 100644
index 000000000000..b6b11cc86ea5
--- /dev/null
+++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/WorkspaceProperties.java
@@ -0,0 +1,338 @@
+// 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.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.WorkspaceFeatures;
+import com.azure.resourcemanager.loganalytics.models.WorkspaceSku;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import java.util.List;
+
+/** Workspace properties. */
+@Fluent
+public final class WorkspaceProperties {
+ @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkspaceProperties.class);
+
+ /*
+ * The provisioning state of the workspace.
+ */
+ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
+ private WorkspaceEntityStatus provisioningState;
+
+ /*
+ * This is a read-only property. Represents the ID associated with the
+ * workspace.
+ */
+ @JsonProperty(value = "customerId", access = JsonProperty.Access.WRITE_ONLY)
+ private String customerId;
+
+ /*
+ * The SKU of the workspace.
+ */
+ @JsonProperty(value = "sku")
+ private WorkspaceSku sku;
+
+ /*
+ * The workspace data retention in days. Allowed values are per pricing
+ * plan. See pricing tiers documentation for details.
+ */
+ @JsonProperty(value = "retentionInDays")
+ private Integer retentionInDays;
+
+ /*
+ * The daily volume cap for ingestion.
+ */
+ @JsonProperty(value = "workspaceCapping")
+ private WorkspaceCapping workspaceCapping;
+
+ /*
+ * Workspace creation date.
+ */
+ @JsonProperty(value = "createdDate", access = JsonProperty.Access.WRITE_ONLY)
+ private String createdDate;
+
+ /*
+ * Workspace modification date.
+ */
+ @JsonProperty(value = "modifiedDate", access = JsonProperty.Access.WRITE_ONLY)
+ private String modifiedDate;
+
+ /*
+ * The network access type for accessing Log Analytics ingestion.
+ */
+ @JsonProperty(value = "publicNetworkAccessForIngestion")
+ private PublicNetworkAccessType publicNetworkAccessForIngestion;
+
+ /*
+ * The network access type for accessing Log Analytics query.
+ */
+ @JsonProperty(value = "publicNetworkAccessForQuery")
+ private PublicNetworkAccessType publicNetworkAccessForQuery;
+
+ /*
+ * Indicates whether customer managed storage is mandatory for query
+ * management.
+ */
+ @JsonProperty(value = "forceCmkForQuery")
+ private Boolean forceCmkForQuery;
+
+ /*
+ * List of linked private link scope resources.
+ */
+ @JsonProperty(value = "privateLinkScopedResources", access = JsonProperty.Access.WRITE_ONLY)
+ private List privateLinkScopedResources;
+
+ /*
+ * Workspace features.
+ */
+ @JsonProperty(value = "features")
+ private WorkspaceFeatures features;
+
+ /*
+ * The resource ID of the default Data Collection Rule to use for this
+ * workspace. Expected format is -
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dcrName}.
+ */
+ @JsonProperty(value = "defaultDataCollectionRuleResourceId")
+ private String defaultDataCollectionRuleResourceId;
+
+ /**
+ * Get the provisioningState property: The provisioning state of the workspace.
+ *
+ * @return the provisioningState value.
+ */
+ public WorkspaceEntityStatus provisioningState() {
+ return this.provisioningState;
+ }
+
+ /**
+ * 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 WorkspaceProperties object itself.
+ */
+ public WorkspaceProperties withSku(WorkspaceSku sku) {
+ this.sku = sku;
+ return this;
+ }
+
+ /**
+ * Get the retentionInDays property: The workspace data retention in days. Allowed values are per pricing plan. See
+ * pricing tiers documentation for details.
+ *
+ * @return the retentionInDays value.
+ */
+ public Integer retentionInDays() {
+ return this.retentionInDays;
+ }
+
+ /**
+ * Set the retentionInDays property: The workspace data retention in days. Allowed values are per pricing plan. See
+ * pricing tiers documentation for details.
+ *
+ * @param retentionInDays the retentionInDays value to set.
+ * @return the WorkspaceProperties object itself.
+ */
+ public WorkspaceProperties 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 WorkspaceProperties object itself.
+ */
+ public WorkspaceProperties withWorkspaceCapping(WorkspaceCapping workspaceCapping) {
+ this.workspaceCapping = workspaceCapping;
+ return this;
+ }
+
+ /**
+ * Get the createdDate property: Workspace creation date.
+ *
+ * @return the createdDate value.
+ */
+ public String createdDate() {
+ return this.createdDate;
+ }
+
+ /**
+ * Get the modifiedDate property: Workspace modification date.
+ *
+ * @return the modifiedDate value.
+ */
+ public String modifiedDate() {
+ return this.modifiedDate;
+ }
+
+ /**
+ * 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 WorkspaceProperties object itself.
+ */
+ public WorkspaceProperties 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 WorkspaceProperties object itself.
+ */
+ public WorkspaceProperties withPublicNetworkAccessForQuery(PublicNetworkAccessType publicNetworkAccessForQuery) {
+ this.publicNetworkAccessForQuery = publicNetworkAccessForQuery;
+ return this;
+ }
+
+ /**
+ * Get the forceCmkForQuery property: Indicates whether customer managed storage is mandatory for query management.
+ *
+ * @return the forceCmkForQuery value.
+ */
+ public Boolean forceCmkForQuery() {
+ return this.forceCmkForQuery;
+ }
+
+ /**
+ * Set the forceCmkForQuery property: Indicates whether customer managed storage is mandatory for query management.
+ *
+ * @param forceCmkForQuery the forceCmkForQuery value to set.
+ * @return the WorkspaceProperties object itself.
+ */
+ public WorkspaceProperties withForceCmkForQuery(Boolean forceCmkForQuery) {
+ this.forceCmkForQuery = forceCmkForQuery;
+ return this;
+ }
+
+ /**
+ * Get the privateLinkScopedResources property: List of linked private link scope resources.
+ *
+ * @return the privateLinkScopedResources value.
+ */
+ public List privateLinkScopedResources() {
+ return this.privateLinkScopedResources;
+ }
+
+ /**
+ * Get the features property: Workspace features.
+ *
+ * @return the features value.
+ */
+ public WorkspaceFeatures features() {
+ return this.features;
+ }
+
+ /**
+ * Set the features property: Workspace features.
+ *
+ * @param features the features value to set.
+ * @return the WorkspaceProperties object itself.
+ */
+ public WorkspaceProperties withFeatures(WorkspaceFeatures features) {
+ this.features = features;
+ return this;
+ }
+
+ /**
+ * Get the defaultDataCollectionRuleResourceId property: The resource ID of the default Data Collection Rule to use
+ * for this workspace. Expected format is -
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dcrName}.
+ *
+ * @return the defaultDataCollectionRuleResourceId value.
+ */
+ public String defaultDataCollectionRuleResourceId() {
+ return this.defaultDataCollectionRuleResourceId;
+ }
+
+ /**
+ * Set the defaultDataCollectionRuleResourceId property: The resource ID of the default Data Collection Rule to use
+ * for this workspace. Expected format is -
+ * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dcrName}.
+ *
+ * @param defaultDataCollectionRuleResourceId the defaultDataCollectionRuleResourceId value to set.
+ * @return the WorkspaceProperties object itself.
+ */
+ public WorkspaceProperties withDefaultDataCollectionRuleResourceId(String defaultDataCollectionRuleResourceId) {
+ this.defaultDataCollectionRuleResourceId = defaultDataCollectionRuleResourceId;
+ 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());
+ }
+ if (features() != null) {
+ features().validate();
+ }
+ }
+}
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
index 57f13aa48eeb..bfa886b23fae 100644
--- 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
@@ -80,7 +80,8 @@ Mono>> listByWorkspace(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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.
+ * @return the available service tiers for the workspace along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> listByWorkspaceWithResponseAsync(
@@ -104,6 +105,7 @@ private Mono>> listByWorkspaceWithRespo
if (workspaceName == null) {
return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null."));
}
+ final String apiVersion = "2020-08-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -114,7 +116,7 @@ private Mono>> listByWorkspaceWithRespo
this.client.getSubscriptionId(),
resourceGroupName,
workspaceName,
- this.client.getApiVersion(),
+ apiVersion,
accept,
context))
.contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly()));
@@ -129,7 +131,8 @@ private Mono>> listByWorkspaceWithRespo
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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.
+ * @return the available service tiers for the workspace along with {@link Response} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> listByWorkspaceWithResponseAsync(
@@ -153,6 +156,7 @@ private Mono>> listByWorkspaceWithRespo
if (workspaceName == null) {
return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null."));
}
+ final String apiVersion = "2020-08-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
@@ -161,7 +165,7 @@ private Mono>> listByWorkspaceWithRespo
this.client.getSubscriptionId(),
resourceGroupName,
workspaceName,
- this.client.getApiVersion(),
+ apiVersion,
accept,
context);
}
@@ -174,7 +178,7 @@ private Mono>> listByWorkspaceWithRespo
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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.
+ * @return the available service tiers for the workspace on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByWorkspaceAsync(String resourceGroupName, String workspaceName) {
@@ -213,7 +217,7 @@ public List listByWorkspace(String resourceGroupName,
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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.
+ * @return the available service tiers for the workspace along with {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response> listByWorkspaceWithResponse(
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
index fdb30b089399..4257dfae682d 100644
--- 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
@@ -7,6 +7,9 @@
import com.azure.core.management.Region;
import com.azure.core.util.Context;
import com.azure.resourcemanager.loganalytics.fluent.models.ClusterInner;
+import com.azure.resourcemanager.loganalytics.models.AssociatedWorkspace;
+import com.azure.resourcemanager.loganalytics.models.BillingType;
+import com.azure.resourcemanager.loganalytics.models.CapacityReservationProperties;
import com.azure.resourcemanager.loganalytics.models.Cluster;
import com.azure.resourcemanager.loganalytics.models.ClusterEntityStatus;
import com.azure.resourcemanager.loganalytics.models.ClusterPatch;
@@ -14,6 +17,7 @@
import com.azure.resourcemanager.loganalytics.models.Identity;
import com.azure.resourcemanager.loganalytics.models.KeyVaultProperties;
import java.util.Collections;
+import java.util.List;
import java.util.Map;
public final class ClusterImpl implements Cluster, Cluster.Definition, Cluster.Update {
@@ -54,10 +58,6 @@ public ClusterSku sku() {
return this.innerModel().sku();
}
- public String nextLink() {
- return this.innerModel().nextLink();
- }
-
public String clusterId() {
return this.innerModel().clusterId();
}
@@ -66,10 +66,43 @@ public ClusterEntityStatus provisioningState() {
return this.innerModel().provisioningState();
}
+ public Boolean isDoubleEncryptionEnabled() {
+ return this.innerModel().isDoubleEncryptionEnabled();
+ }
+
+ public Boolean isAvailabilityZonesEnabled() {
+ return this.innerModel().isAvailabilityZonesEnabled();
+ }
+
+ public BillingType billingType() {
+ return this.innerModel().billingType();
+ }
+
public KeyVaultProperties keyVaultProperties() {
return this.innerModel().keyVaultProperties();
}
+ public String lastModifiedDate() {
+ return this.innerModel().lastModifiedDate();
+ }
+
+ public String createdDate() {
+ return this.innerModel().createdDate();
+ }
+
+ public List associatedWorkspaces() {
+ List inner = this.innerModel().associatedWorkspaces();
+ if (inner != null) {
+ return Collections.unmodifiableList(inner);
+ } else {
+ return Collections.emptyList();
+ }
+ }
+
+ public CapacityReservationProperties capacityReservationProperties() {
+ return this.innerModel().capacityReservationProperties();
+ }
+
public Region region() {
return Region.fromName(this.regionName());
}
@@ -131,8 +164,7 @@ public Cluster apply() {
serviceManager
.serviceClient()
.getClusters()
- .updateWithResponse(resourceGroupName, clusterName, updateParameters, Context.NONE)
- .getValue();
+ .update(resourceGroupName, clusterName, updateParameters, Context.NONE);
return this;
}
@@ -141,8 +173,7 @@ public Cluster apply(Context context) {
serviceManager
.serviceClient()
.getClusters()
- .updateWithResponse(resourceGroupName, clusterName, updateParameters, context)
- .getValue();
+ .update(resourceGroupName, clusterName, updateParameters, context);
return this;
}
@@ -194,8 +225,13 @@ public ClusterImpl withTags(Map tags) {
}
public ClusterImpl withIdentity(Identity identity) {
- this.innerModel().withIdentity(identity);
- return this;
+ if (isInCreateMode()) {
+ this.innerModel().withIdentity(identity);
+ return this;
+ } else {
+ this.updateParameters.withIdentity(identity);
+ return this;
+ }
}
public ClusterImpl withSku(ClusterSku sku) {
@@ -208,11 +244,26 @@ public ClusterImpl withSku(ClusterSku sku) {
}
}
- public ClusterImpl withNextLink(String nextLink) {
- this.innerModel().withNextLink(nextLink);
+ public ClusterImpl withIsDoubleEncryptionEnabled(Boolean isDoubleEncryptionEnabled) {
+ this.innerModel().withIsDoubleEncryptionEnabled(isDoubleEncryptionEnabled);
return this;
}
+ public ClusterImpl withIsAvailabilityZonesEnabled(Boolean isAvailabilityZonesEnabled) {
+ this.innerModel().withIsAvailabilityZonesEnabled(isAvailabilityZonesEnabled);
+ return this;
+ }
+
+ public ClusterImpl withBillingType(BillingType billingType) {
+ if (isInCreateMode()) {
+ this.innerModel().withBillingType(billingType);
+ return this;
+ } else {
+ this.updateParameters.withBillingType(billingType);
+ return this;
+ }
+ }
+
public ClusterImpl withKeyVaultProperties(KeyVaultProperties keyVaultProperties) {
if (isInCreateMode()) {
this.innerModel().withKeyVaultProperties(keyVaultProperties);
@@ -223,6 +274,16 @@ public ClusterImpl withKeyVaultProperties(KeyVaultProperties keyVaultProperties)
}
}
+ public ClusterImpl withAssociatedWorkspaces(List associatedWorkspaces) {
+ this.innerModel().withAssociatedWorkspaces(associatedWorkspaces);
+ return this;
+ }
+
+ public ClusterImpl withCapacityReservationProperties(CapacityReservationProperties capacityReservationProperties) {
+ this.innerModel().withCapacityReservationProperties(capacityReservationProperties);
+ 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
index d9baac701372..5037dc74c828 100644
--- 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
@@ -113,7 +113,7 @@ Mono>> createOrUpdate(
@Delete(
"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights"
+ "/clusters/{clusterName}")
- @ExpectedResponses({200, 204})
+ @ExpectedResponses({200, 202, 204})
@UnexpectedResponseExceptionType(ManagementException.class)
Mono>> delete(
@HostParam("$host") String endpoint,
@@ -145,7 +145,7 @@ Mono> getByResourceGroup(
+ "/clusters/{clusterName}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(ManagementException.class)
- Mono> update(
+ Mono>> update(
@HostParam("$host") String endpoint,
@PathParam("resourceGroupName") String resourceGroupName,
@PathParam("clusterName") String clusterName,
@@ -183,7 +183,8 @@ Mono> listNext(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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.
+ * @return log Analytics clusters in a resource group along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) {
@@ -203,6 +204,7 @@ private Mono> listByResourceGroupSinglePageAsync(Str
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ final String apiVersion = "2021-06-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -211,7 +213,7 @@ private Mono> listByResourceGroupSinglePageAsync(Str
.listByResourceGroup(
this.client.getEndpoint(),
resourceGroupName,
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
accept,
context))
@@ -235,7 +237,8 @@ private Mono> listByResourceGroupSinglePageAsync(Str
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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.
+ * @return log Analytics clusters in a resource group along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listByResourceGroupSinglePageAsync(
@@ -256,13 +259,14 @@ private Mono> listByResourceGroupSinglePageAsync(
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ final String apiVersion = "2021-06-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
.listByResourceGroup(
this.client.getEndpoint(),
resourceGroupName,
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
accept,
context)
@@ -284,7 +288,7 @@ private Mono> listByResourceGroupSinglePageAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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.
+ * @return log Analytics clusters in a resource group as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listByResourceGroupAsync(String resourceGroupName) {
@@ -301,7 +305,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupNam
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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.
+ * @return log Analytics clusters in a resource group as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) {
@@ -317,7 +321,7 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupNam
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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.
+ * @return log Analytics clusters in a resource group as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listByResourceGroup(String resourceGroupName) {
@@ -332,7 +336,7 @@ public PagedIterable listByResourceGroup(String resourceGroupName)
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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.
+ * @return log Analytics clusters in a resource group as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
@@ -344,7 +348,8 @@ public PagedIterable listByResourceGroup(String resourceGroupName,
*
* @throws 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.
+ * @return the Log Analytics clusters in a subscription along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync() {
@@ -360,17 +365,13 @@ private Mono> listSinglePageAsync() {
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ final String apiVersion = "2021-06-01";
final String accept = "application/json";
return FluxUtil
.withContext(
context ->
service
- .list(
- this.client.getEndpoint(),
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- accept,
- context))
+ .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context))
.>map(
res ->
new PagedResponseBase<>(
@@ -390,7 +391,8 @@ private Mono> listSinglePageAsync() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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.
+ * @return the Log Analytics clusters in a subscription along with {@link PagedResponse} on successful completion of
+ * {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono> listSinglePageAsync(Context context) {
@@ -406,15 +408,11 @@ private Mono> listSinglePageAsync(Context context) {
new IllegalArgumentException(
"Parameter this.client.getSubscriptionId() is required and cannot be null."));
}
+ final String apiVersion = "2021-06-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
- .list(
- this.client.getEndpoint(),
- this.client.getApiVersion(),
- this.client.getSubscriptionId(),
- accept,
- context)
+ .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), accept, context)
.map(
res ->
new PagedResponseBase<>(
@@ -431,7 +429,7 @@ private Mono> listSinglePageAsync(Context context) {
*
* @throws 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.
+ * @return the Log Analytics clusters in a subscription as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync() {
@@ -445,7 +443,7 @@ private PagedFlux listAsync() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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.
+ * @return the Log Analytics clusters in a subscription as paginated response with {@link PagedFlux}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux listAsync(Context context) {
@@ -458,7 +456,7 @@ private PagedFlux listAsync(Context context) {
*
* @throws 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.
+ * @return the Log Analytics clusters in a subscription as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list() {
@@ -472,7 +470,7 @@ public PagedIterable list() {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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.
+ * @return the Log Analytics clusters in a subscription as paginated response with {@link PagedIterable}.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable list(Context context) {
@@ -488,7 +486,8 @@ public PagedIterable list(Context context) {
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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.
+ * @return the top level Log Analytics cluster resource container along with {@link Response} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> createOrUpdateWithResponseAsync(
@@ -517,6 +516,7 @@ private Mono>> createOrUpdateWithResponseAsync(
} else {
parameters.validate();
}
+ final String apiVersion = "2021-06-01";
final String accept = "application/json";
return FluxUtil
.withContext(
@@ -525,7 +525,7 @@ private Mono>> createOrUpdateWithResponseAsync(
.createOrUpdate(
this.client.getEndpoint(),
resourceGroupName,
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
clusterName,
parameters,
@@ -544,7 +544,8 @@ private Mono>> createOrUpdateWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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.
+ * @return the top level Log Analytics cluster resource container along with {@link Response} on successful
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono>> createOrUpdateWithResponseAsync(
@@ -573,13 +574,14 @@ private Mono>> createOrUpdateWithResponseAsync(
} else {
parameters.validate();
}
+ final String apiVersion = "2021-06-01";
final String accept = "application/json";
context = this.client.mergeContext(context);
return service
.createOrUpdate(
this.client.getEndpoint(),
resourceGroupName,
- this.client.getApiVersion(),
+ apiVersion,
this.client.getSubscriptionId(),
clusterName,
parameters,
@@ -596,9 +598,9 @@ private Mono>> createOrUpdateWithResponseAsync(
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws 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.
+ * @return the {@link PollerFlux} for polling of the top level Log Analytics cluster resource container.
*/
- @ServiceMethod(returns = ReturnType.SINGLE)
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
private PollerFlux, ClusterInner> beginCreateOrUpdateAsync(
String resourceGroupName, String clusterName, ClusterInner parameters) {
Mono>> mono =
@@ -606,7 +608,7 @@ private PollerFlux, ClusterInner> beginCreateOrUpdateAs
return this
.client
.