diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/CHANGELOG.md b/sdk/loganalytics/azure-resourcemanager-loganalytics/CHANGELOG.md index 1a49255e9078..65658e6f4a80 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/CHANGELOG.md +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.4 (Unreleased) +## 1.0.0-beta.1 (2023-03-16) + +- Azure Resource Manager LogAnalytics client library for Java. This package contains Microsoft Azure SDK for LogAnalytics Management SDK. Operational Insights Client. Package tag package-2022-10. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/README.md b/sdk/loganalytics/azure-resourcemanager-loganalytics/README.md index 8960c23694d4..985bbf07df5f 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-2022-02. 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-2022-10. 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.3 + 1.0.0-beta.4 ``` [//]: # ({x-version-update-end}) @@ -41,19 +41,19 @@ Various documentation is available to help you get started Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client. -[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation. +[Azure Identity][azure_identity] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation. ### Authentication -By default, Azure Active Directory token authentication depends on correct configure of following environment variables. +By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. - `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate. -In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`. +In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable. -With above configuration, `azure` client can be authenticated by following code: +With above configuration, `azure` client can be authenticated using the following code: ```java AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); @@ -83,13 +83,13 @@ See [API design][design] for general introduction on design and key concepts on ## Contributing -For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md). +For details on contributing to this repository, see the [contributing guide][cg]. -1. Fork it -1. Create your feature branch (`git checkout -b my-new-feature`) -1. Commit your changes (`git commit -am 'Add some feature'`) -1. Push to the branch (`git push origin my-new-feature`) -1. Create new Pull Request +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit . + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact with any additional questions or comments. [survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS @@ -100,3 +100,6 @@ For details on contributing to this repository, see the [contributing guide](htt [azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty [authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md [design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md +[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md +[coc]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/SAMPLE.md b/sdk/loganalytics/azure-resourcemanager-loganalytics/SAMPLE.md index babb3a694aa2..363d9d3a19f4 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/SAMPLE.md +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/SAMPLE.md @@ -81,6 +81,7 @@ ## QueryPacks - [CreateOrUpdate](#querypacks_createorupdate) +- [CreateOrUpdateWithoutName](#querypacks_createorupdatewithoutname) - [Delete](#querypacks_delete) - [GetByResourceGroup](#querypacks_getbyresourcegroup) - [List](#querypacks_list) @@ -112,6 +113,7 @@ ## Tables +- [CancelSearch](#tables_cancelsearch) - [CreateOrUpdate](#tables_createorupdate) - [Delete](#tables_delete) - [Get](#tables_get) @@ -139,8 +141,6 @@ ### AvailableServiceTiers_ListByWorkspace ```java -import com.azure.core.util.Context; - /** Samples for AvailableServiceTiers ListByWorkspace. */ public final class AvailableServiceTiersListByWorkspaceSamples { /* @@ -152,7 +152,9 @@ public final class AvailableServiceTiersListByWorkspaceSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void availableServiceTiers(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.availableServiceTiers().listByWorkspaceWithResponse("rg1", "workspace1", Context.NONE); + manager + .availableServiceTiers() + .listByWorkspaceWithResponse("rg1", "workspace1", com.azure.core.util.Context.NONE); } } ``` @@ -206,8 +208,6 @@ public final class ClustersCreateOrUpdateSamples { ### Clusters_Delete ```java -import com.azure.core.util.Context; - /** Samples for Clusters Delete. */ public final class ClustersDeleteSamples { /* @@ -219,7 +219,7 @@ public final class ClustersDeleteSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void clustersDelete(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.clusters().delete("oiautorest6685", "oiautorest6685", Context.NONE); + manager.clusters().delete("oiautorest6685", "oiautorest6685", com.azure.core.util.Context.NONE); } } ``` @@ -227,8 +227,6 @@ public final class ClustersDeleteSamples { ### Clusters_GetByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for Clusters GetByResourceGroup. */ public final class ClustersGetByResourceGroupSamples { /* @@ -240,7 +238,9 @@ public final class ClustersGetByResourceGroupSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void clustersGet(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.clusters().getByResourceGroupWithResponse("oiautorest6685", "oiautorest6685", Context.NONE); + manager + .clusters() + .getByResourceGroupWithResponse("oiautorest6685", "oiautorest6685", com.azure.core.util.Context.NONE); } } ``` @@ -248,8 +248,6 @@ public final class ClustersGetByResourceGroupSamples { ### Clusters_List ```java -import com.azure.core.util.Context; - /** Samples for Clusters List. */ public final class ClustersListSamples { /* @@ -261,7 +259,7 @@ public final class ClustersListSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void clustersSubscriptionList(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.clusters().list(Context.NONE); + manager.clusters().list(com.azure.core.util.Context.NONE); } } ``` @@ -269,8 +267,6 @@ public final class ClustersListSamples { ### Clusters_ListByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for Clusters ListByResourceGroup. */ public final class ClustersListByResourceGroupSamples { /* @@ -282,7 +278,7 @@ public final class ClustersListByResourceGroupSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void clustersGet(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.clusters().listByResourceGroup("oiautorest6685", Context.NONE); + manager.clusters().listByResourceGroup("oiautorest6685", com.azure.core.util.Context.NONE); } } ``` @@ -290,7 +286,6 @@ public final class ClustersListByResourceGroupSamples { ### 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; @@ -316,7 +311,7 @@ public final class ClustersUpdateSamples { Cluster resource = manager .clusters() - .getByResourceGroupWithResponse("oiautorest6685", "oiautorest6685", Context.NONE) + .getByResourceGroupWithResponse("oiautorest6685", "oiautorest6685", com.azure.core.util.Context.NONE) .getValue(); resource .update() @@ -334,9 +329,9 @@ public final class ClustersUpdateSamples { .withName(ClusterSkuNameEnum.CAPACITY_RESERVATION)) .withKeyVaultProperties( new KeyVaultProperties() - .withKeyVaultUri("https://aztest2170.vault.azure.net") - .withKeyName("aztest2170cert") - .withKeyVersion("654ft6c4e63845cbb50fd6fg51540429") + .withKeyVaultUri("fakeTokenPlaceholder") + .withKeyName("fakeTokenPlaceholder") + .withKeyVersion("fakeTokenPlaceholder") .withKeyRsaSize(1024)) .apply(); } @@ -385,8 +380,6 @@ public final class DataExportsCreateOrUpdateSamples { ### DataExports_Delete ```java -import com.azure.core.util.Context; - /** Samples for DataExports Delete. */ public final class DataExportsDeleteSamples { /* @@ -398,7 +391,9 @@ public final class DataExportsDeleteSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void dataExportDelete(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.dataExports().deleteWithResponse("RgTest1", "DeWnTest1234", "export1", Context.NONE); + manager + .dataExports() + .deleteWithResponse("RgTest1", "DeWnTest1234", "export1", com.azure.core.util.Context.NONE); } } ``` @@ -406,8 +401,6 @@ public final class DataExportsDeleteSamples { ### DataExports_Get ```java -import com.azure.core.util.Context; - /** Samples for DataExports Get. */ public final class DataExportsGetSamples { /* @@ -419,7 +412,7 @@ public final class DataExportsGetSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void dataExportGet(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.dataExports().getWithResponse("RgTest1", "DeWnTest1234", "export1", Context.NONE); + manager.dataExports().getWithResponse("RgTest1", "DeWnTest1234", "export1", com.azure.core.util.Context.NONE); } } ``` @@ -427,8 +420,6 @@ public final class DataExportsGetSamples { ### DataExports_ListByWorkspace ```java -import com.azure.core.util.Context; - /** Samples for DataExports ListByWorkspace. */ public final class DataExportsListByWorkspaceSamples { /* @@ -440,7 +431,7 @@ public final class DataExportsListByWorkspaceSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void dataExportGet(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.dataExports().listByWorkspace("RgTest1", "DeWnTest1234", Context.NONE); + manager.dataExports().listByWorkspace("RgTest1", "DeWnTest1234", com.azure.core.util.Context.NONE); } } ``` @@ -485,8 +476,6 @@ public final class DataSourcesCreateOrUpdateSamples { ### DataSources_Delete ```java -import com.azure.core.util.Context; - /** Samples for DataSources Delete. */ public final class DataSourcesDeleteSamples { /* @@ -498,7 +487,9 @@ public final class DataSourcesDeleteSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void dataSourcesDelete(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.dataSources().deleteWithResponse("OIAutoRest5123", "AzTest9724", "AzTestDS774", Context.NONE); + manager + .dataSources() + .deleteWithResponse("OIAutoRest5123", "AzTest9724", "AzTestDS774", com.azure.core.util.Context.NONE); } } ``` @@ -506,8 +497,6 @@ public final class DataSourcesDeleteSamples { ### DataSources_Get ```java -import com.azure.core.util.Context; - /** Samples for DataSources Get. */ public final class DataSourcesGetSamples { /* @@ -519,7 +508,9 @@ public final class DataSourcesGetSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void dataSourcesGet(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.dataSources().getWithResponse("OIAutoRest5123", "AzTest9724", "AzTestDS774", Context.NONE); + manager + .dataSources() + .getWithResponse("OIAutoRest5123", "AzTest9724", "AzTestDS774", com.azure.core.util.Context.NONE); } } ``` @@ -527,8 +518,6 @@ public final class DataSourcesGetSamples { ### DataSources_ListByWorkspace ```java -import com.azure.core.util.Context; - /** Samples for DataSources ListByWorkspace. */ public final class DataSourcesListByWorkspaceSamples { /* @@ -542,7 +531,8 @@ public final class DataSourcesListByWorkspaceSamples { public static void dataSourcesListByWorkspace(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { manager .dataSources() - .listByWorkspace("OIAutoRest5123", "AzTest9724", "kind='WindowsEvent'", null, Context.NONE); + .listByWorkspace( + "OIAutoRest5123", "AzTest9724", "kind='WindowsEvent'", null, com.azure.core.util.Context.NONE); } } ``` @@ -550,12 +540,10 @@ public final class DataSourcesListByWorkspaceSamples { ### 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 + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/WorkspacesSubscriptionList.json */ /** * Sample code: WorkspacesSubscriptionList. @@ -563,7 +551,7 @@ public final class DeletedWorkspacesListSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void workspacesSubscriptionList(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.deletedWorkspaces().list(Context.NONE); + manager.deletedWorkspaces().list(com.azure.core.util.Context.NONE); } } ``` @@ -571,12 +559,10 @@ public final class DeletedWorkspacesListSamples { ### 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 + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/WorkspacesListByResourceGroup.json */ /** * Sample code: WorkspacesGet. @@ -584,7 +570,7 @@ public final class DeletedWorkspacesListByResourceGroupSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void workspacesGet(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.deletedWorkspaces().listByResourceGroup("oiautorest6685", Context.NONE); + manager.deletedWorkspaces().listByResourceGroup("oiautorest6685", com.azure.core.util.Context.NONE); } } ``` @@ -592,8 +578,6 @@ public final class DeletedWorkspacesListByResourceGroupSamples { ### Gateways_Delete ```java -import com.azure.core.util.Context; - /** Samples for Gateways Delete. */ public final class GatewaysDeleteSamples { /* @@ -607,7 +591,11 @@ public final class GatewaysDeleteSamples { public static void deleteGateways(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { manager .gateways() - .deleteWithResponse("OIAutoRest5123", "aztest5048", "00000000-0000-0000-0000-00000000000", Context.NONE); + .deleteWithResponse( + "OIAutoRest5123", + "aztest5048", + "00000000-0000-0000-0000-00000000000", + com.azure.core.util.Context.NONE); } } ``` @@ -615,8 +603,6 @@ public final class GatewaysDeleteSamples { ### IntelligencePacks_Disable ```java -import com.azure.core.util.Context; - /** Samples for IntelligencePacks Disable. */ public final class IntelligencePacksDisableSamples { /* @@ -628,7 +614,9 @@ public final class IntelligencePacksDisableSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void intelligencePacksDisable(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.intelligencePacks().disableWithResponse("rg1", "TestLinkWS", "ChangeTracking", Context.NONE); + manager + .intelligencePacks() + .disableWithResponse("rg1", "TestLinkWS", "ChangeTracking", com.azure.core.util.Context.NONE); } } ``` @@ -636,8 +624,6 @@ public final class IntelligencePacksDisableSamples { ### IntelligencePacks_Enable ```java -import com.azure.core.util.Context; - /** Samples for IntelligencePacks Enable. */ public final class IntelligencePacksEnableSamples { /* @@ -649,7 +635,9 @@ public final class IntelligencePacksEnableSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void intelligencePacksEnable(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.intelligencePacks().enableWithResponse("rg1", "TestLinkWS", "ChangeTracking", Context.NONE); + manager + .intelligencePacks() + .enableWithResponse("rg1", "TestLinkWS", "ChangeTracking", com.azure.core.util.Context.NONE); } } ``` @@ -657,8 +645,6 @@ public final class IntelligencePacksEnableSamples { ### IntelligencePacks_List ```java -import com.azure.core.util.Context; - /** Samples for IntelligencePacks List. */ public final class IntelligencePacksListSamples { /* @@ -670,7 +656,7 @@ public final class IntelligencePacksListSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void intelligencePacksList(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.intelligencePacks().listWithResponse("rg1", "TestLinkWS", Context.NONE); + manager.intelligencePacks().listWithResponse("rg1", "TestLinkWS", com.azure.core.util.Context.NONE); } } ``` @@ -703,8 +689,6 @@ public final class LinkedServicesCreateOrUpdateSamples { ### LinkedServices_Delete ```java -import com.azure.core.util.Context; - /** Samples for LinkedServices Delete. */ public final class LinkedServicesDeleteSamples { /* @@ -716,7 +700,7 @@ public final class LinkedServicesDeleteSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void linkedServicesDelete(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.linkedServices().delete("rg1", "TestLinkWS", "Cluster", Context.NONE); + manager.linkedServices().delete("rg1", "TestLinkWS", "Cluster", com.azure.core.util.Context.NONE); } } ``` @@ -724,8 +708,6 @@ public final class LinkedServicesDeleteSamples { ### LinkedServices_Get ```java -import com.azure.core.util.Context; - /** Samples for LinkedServices Get. */ public final class LinkedServicesGetSamples { /* @@ -737,7 +719,7 @@ public final class LinkedServicesGetSamples { * @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); + manager.linkedServices().getWithResponse("mms-eus", "TestLinkWS", "Cluster", com.azure.core.util.Context.NONE); } } ``` @@ -745,8 +727,6 @@ public final class LinkedServicesGetSamples { ### LinkedServices_ListByWorkspace ```java -import com.azure.core.util.Context; - /** Samples for LinkedServices ListByWorkspace. */ public final class LinkedServicesListByWorkspaceSamples { /* @@ -759,7 +739,7 @@ public final class LinkedServicesListByWorkspaceSamples { */ public static void linkedServicesListByWorkspace( com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.linkedServices().listByWorkspace("mms-eus", "TestLinkWS", Context.NONE); + manager.linkedServices().listByWorkspace("mms-eus", "TestLinkWS", com.azure.core.util.Context.NONE); } } ``` @@ -798,7 +778,6 @@ public final class LinkedStorageAccountsCreateOrUpdateSamples { ### LinkedStorageAccounts_Delete ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.loganalytics.models.DataSourceType; /** Samples for LinkedStorageAccounts Delete. */ @@ -814,7 +793,8 @@ public final class LinkedStorageAccountsDeleteSamples { public static void linkedStorageAccountsDelete(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { manager .linkedStorageAccounts() - .deleteWithResponse("mms-eus", "testLinkStorageAccountsWS", DataSourceType.CUSTOM_LOGS, Context.NONE); + .deleteWithResponse( + "mms-eus", "testLinkStorageAccountsWS", DataSourceType.CUSTOM_LOGS, com.azure.core.util.Context.NONE); } } ``` @@ -822,7 +802,6 @@ public final class LinkedStorageAccountsDeleteSamples { ### LinkedStorageAccounts_Get ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.loganalytics.models.DataSourceType; /** Samples for LinkedStorageAccounts Get. */ @@ -838,7 +817,8 @@ public final class LinkedStorageAccountsGetSamples { public static void linkedStorageAccountsGet(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { manager .linkedStorageAccounts() - .getWithResponse("mms-eus", "testLinkStorageAccountsWS", DataSourceType.CUSTOM_LOGS, Context.NONE); + .getWithResponse( + "mms-eus", "testLinkStorageAccountsWS", DataSourceType.CUSTOM_LOGS, com.azure.core.util.Context.NONE); } } ``` @@ -846,8 +826,6 @@ public final class LinkedStorageAccountsGetSamples { ### LinkedStorageAccounts_ListByWorkspace ```java -import com.azure.core.util.Context; - /** Samples for LinkedStorageAccounts ListByWorkspace. */ public final class LinkedStorageAccountsListByWorkspaceSamples { /* @@ -860,7 +838,9 @@ public final class LinkedStorageAccountsListByWorkspaceSamples { */ public static void getsListOfLinkedStorageAccountsOnAWorkspace( com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.linkedStorageAccounts().listByWorkspace("mms-eus", "testLinkStorageAccountsWS", Context.NONE); + manager + .linkedStorageAccounts() + .listByWorkspace("mms-eus", "testLinkStorageAccountsWS", com.azure.core.util.Context.NONE); } } ``` @@ -868,8 +848,6 @@ public final class LinkedStorageAccountsListByWorkspaceSamples { ### ManagementGroups_List ```java -import com.azure.core.util.Context; - /** Samples for ManagementGroups List. */ public final class ManagementGroupsListSamples { /* @@ -882,7 +860,7 @@ public final class ManagementGroupsListSamples { */ public static void workspacesListManagementGroups( com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.managementGroups().list("rg1", "TestLinkWS", Context.NONE); + manager.managementGroups().list("rg1", "TestLinkWS", com.azure.core.util.Context.NONE); } } ``` @@ -890,8 +868,6 @@ public final class ManagementGroupsListSamples { ### OperationStatuses_Get ```java -import com.azure.core.util.Context; - /** Samples for OperationStatuses Get. */ public final class OperationStatusesGetSamples { /* @@ -903,7 +879,9 @@ public final class OperationStatusesGetSamples { * @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); + manager + .operationStatuses() + .getWithResponse("West US", "713192d7-503f-477a-9cfe-4efc3ee2bd11", com.azure.core.util.Context.NONE); } } ``` @@ -911,12 +889,10 @@ public final class OperationStatusesGetSamples { ### 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 + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/OperationsListByTenant.json */ /** * Sample code: Get specific operation status. @@ -924,7 +900,7 @@ public final class OperationsListSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void getSpecificOperationStatus(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.operations().list(Context.NONE); + manager.operations().list(com.azure.core.util.Context.NONE); } } ``` @@ -932,8 +908,6 @@ public final class OperationsListSamples { ### Queries_Delete ```java -import com.azure.core.util.Context; - /** Samples for Queries Delete. */ public final class QueriesDeleteSamples { /* @@ -948,7 +922,10 @@ public final class QueriesDeleteSamples { manager .queries() .deleteWithResponse( - "my-resource-group", "my-querypack", "a449f8af-8e64-4b3a-9b16-5a7165ff98c4", Context.NONE); + "my-resource-group", + "my-querypack", + "a449f8af-8e64-4b3a-9b16-5a7165ff98c4", + com.azure.core.util.Context.NONE); } } ``` @@ -956,8 +933,6 @@ public final class QueriesDeleteSamples { ### Queries_Get ```java -import com.azure.core.util.Context; - /** Samples for Queries Get. */ public final class QueriesGetSamples { /* @@ -971,7 +946,11 @@ public final class QueriesGetSamples { public static void queryGet(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { manager .queries() - .getWithResponse("my-resource-group", "my-querypack", "a449f8af-8e64-4b3a-9b16-5a7165ff98c4", Context.NONE); + .getWithResponse( + "my-resource-group", + "my-querypack", + "a449f8af-8e64-4b3a-9b16-5a7165ff98c4", + com.azure.core.util.Context.NONE); } } ``` @@ -979,8 +958,6 @@ public final class QueriesGetSamples { ### Queries_List ```java -import com.azure.core.util.Context; - /** Samples for Queries List. */ public final class QueriesListSamples { /* @@ -992,7 +969,7 @@ public final class QueriesListSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void queryList(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.queries().list("my-resource-group", "my-querypack", null, true, null, Context.NONE); + manager.queries().list("my-resource-group", "my-querypack", null, true, null, com.azure.core.util.Context.NONE); } } ``` @@ -1057,7 +1034,6 @@ public final class QueriesPutSamples { ### Queries_Search ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.loganalytics.models.LogAnalyticsQueryPackQuerySearchProperties; import com.azure.resourcemanager.loganalytics.models.LogAnalyticsQueryPackQuerySearchPropertiesRelated; import java.util.Arrays; @@ -1088,7 +1064,7 @@ public final class QueriesSearchSamples { 3L, true, null, - Context.NONE); + com.azure.core.util.Context.NONE); } @SuppressWarnings("unchecked") @@ -1107,7 +1083,6 @@ public final class QueriesSearchSamples { ### Queries_Update ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.loganalytics.models.LogAnalyticsQueryPackQuery; import com.azure.resourcemanager.loganalytics.models.LogAnalyticsQueryPackQueryPropertiesRelated; import java.util.Arrays; @@ -1129,7 +1104,10 @@ public final class QueriesUpdateSamples { manager .queries() .getWithResponse( - "my-resource-group", "my-querypack", "a449f8af-8e64-4b3a-9b16-5a7165ff98c4", Context.NONE) + "my-resource-group", + "my-querypack", + "a449f8af-8e64-4b3a-9b16-5a7165ff98c4", + com.azure.core.util.Context.NONE) .getValue(); resource .update() @@ -1223,11 +1201,65 @@ public final class QueryPacksCreateOrUpdateSamples { } ``` -### QueryPacks_Delete +### QueryPacks_CreateOrUpdateWithoutName ```java -import com.azure.core.util.Context; +import com.azure.resourcemanager.loganalytics.fluent.models.LogAnalyticsQueryPackInner; +import java.util.HashMap; +import java.util.Map; + +/** Samples for QueryPacks CreateOrUpdateWithoutName. */ +public final class QueryPacksCreateOrUpdateWithoutNameSamples { + /* + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksCreateNoName.json + */ + /** + * Sample code: QueryPackCreateNoName. + * + * @param manager Entry point to LogAnalyticsManager. + */ + public static void queryPackCreateNoName(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { + manager + .queryPacks() + .createOrUpdateWithoutNameWithResponse( + "my-resource-group", + new LogAnalyticsQueryPackInner().withLocation("South Central US"), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackUpdateNoName.json + */ + /** + * Sample code: QueryPackUpdateNoName. + * + * @param manager Entry point to LogAnalyticsManager. + */ + public static void queryPackUpdateNoName(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { + manager + .queryPacks() + .createOrUpdateWithoutNameWithResponse( + "my-resource-group", + new LogAnalyticsQueryPackInner().withLocation("South Central US").withTags(mapOf("Tag1", "Value1")), + com.azure.core.util.Context.NONE); + } + @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; + } +} +``` + +### QueryPacks_Delete + +```java /** Samples for QueryPacks Delete. */ public final class QueryPacksDeleteSamples { /* @@ -1239,7 +1271,9 @@ public final class QueryPacksDeleteSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void queryPacksDelete(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.queryPacks().deleteWithResponse("my-resource-group", "my-querypack", Context.NONE); + manager + .queryPacks() + .deleteByResourceGroupWithResponse("my-resource-group", "my-querypack", com.azure.core.util.Context.NONE); } } ``` @@ -1247,8 +1281,6 @@ public final class QueryPacksDeleteSamples { ### QueryPacks_GetByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for QueryPacks GetByResourceGroup. */ public final class QueryPacksGetByResourceGroupSamples { /* @@ -1260,7 +1292,9 @@ public final class QueryPacksGetByResourceGroupSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void queryPackGet(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.queryPacks().getByResourceGroupWithResponse("my-resource-group", "my-querypack", Context.NONE); + manager + .queryPacks() + .getByResourceGroupWithResponse("my-resource-group", "my-querypack", com.azure.core.util.Context.NONE); } } ``` @@ -1268,8 +1302,6 @@ public final class QueryPacksGetByResourceGroupSamples { ### QueryPacks_List ```java -import com.azure.core.util.Context; - /** Samples for QueryPacks List. */ public final class QueryPacksListSamples { /* @@ -1281,7 +1313,7 @@ public final class QueryPacksListSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void queryPacksList(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.queryPacks().list(Context.NONE); + manager.queryPacks().list(com.azure.core.util.Context.NONE); } } ``` @@ -1289,8 +1321,6 @@ public final class QueryPacksListSamples { ### QueryPacks_ListByResourceGroup ```java -import com.azure.core.util.Context; - /** Samples for QueryPacks ListByResourceGroup. */ public final class QueryPacksListByResourceGroupSamples { /* @@ -1303,7 +1333,7 @@ public final class QueryPacksListByResourceGroupSamples { */ public static void queryPackListByResourceGroup( com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.queryPacks().listByResourceGroup("my-resource-group", Context.NONE); + manager.queryPacks().listByResourceGroup("my-resource-group", com.azure.core.util.Context.NONE); } } ``` @@ -1311,7 +1341,6 @@ public final class QueryPacksListByResourceGroupSamples { ### QueryPacks_UpdateTags ```java -import com.azure.core.util.Context; import com.azure.resourcemanager.loganalytics.models.LogAnalyticsQueryPack; import java.util.HashMap; import java.util.Map; @@ -1330,7 +1359,7 @@ public final class QueryPacksUpdateTagsSamples { LogAnalyticsQueryPack resource = manager .queryPacks() - .getByResourceGroupWithResponse("my-resource-group", "my-querypack", Context.NONE) + .getByResourceGroupWithResponse("my-resource-group", "my-querypack", com.azure.core.util.Context.NONE) .getValue(); resource.update().withTags(mapOf("Tag1", "Value1", "Tag2", "Value2")).apply(); } @@ -1384,8 +1413,6 @@ public final class SavedSearchesCreateOrUpdateSamples { ### SavedSearches_Delete ```java -import com.azure.core.util.Context; - /** Samples for SavedSearches Delete. */ public final class SavedSearchesDeleteSamples { /* @@ -1399,7 +1426,8 @@ public final class SavedSearchesDeleteSamples { public static void savedSearchesDelete(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { manager .savedSearches() - .deleteWithResponse("TestRG", "TestWS", "00000000-0000-0000-0000-00000000000", Context.NONE); + .deleteWithResponse( + "TestRG", "TestWS", "00000000-0000-0000-0000-00000000000", com.azure.core.util.Context.NONE); } } ``` @@ -1407,8 +1435,6 @@ public final class SavedSearchesDeleteSamples { ### SavedSearches_Get ```java -import com.azure.core.util.Context; - /** Samples for SavedSearches Get. */ public final class SavedSearchesGetSamples { /* @@ -1422,7 +1448,8 @@ public final class SavedSearchesGetSamples { public static void savedSearchesGet(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { manager .savedSearches() - .getWithResponse("TestRG", "TestWS", "00000000-0000-0000-0000-00000000000", Context.NONE); + .getWithResponse( + "TestRG", "TestWS", "00000000-0000-0000-0000-00000000000", com.azure.core.util.Context.NONE); } } ``` @@ -1430,8 +1457,6 @@ public final class SavedSearchesGetSamples { ### SavedSearches_ListByWorkspace ```java -import com.azure.core.util.Context; - /** Samples for SavedSearches ListByWorkspace. */ public final class SavedSearchesListByWorkspaceSamples { /* @@ -1443,7 +1468,7 @@ public final class SavedSearchesListByWorkspaceSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void savedSearchesList(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.savedSearches().listByWorkspaceWithResponse("TestRG", "TestWS", Context.NONE); + manager.savedSearches().listByWorkspaceWithResponse("TestRG", "TestWS", com.azure.core.util.Context.NONE); } } ``` @@ -1451,8 +1476,6 @@ public final class SavedSearchesListByWorkspaceSamples { ### Schema_Get ```java -import com.azure.core.util.Context; - /** Samples for Schema Get. */ public final class SchemaGetSamples { /* @@ -1464,7 +1487,7 @@ public final class SchemaGetSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void workspacesGetSchema(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.schemas().getWithResponse("mms-eus", "atlantisdemo", Context.NONE); + manager.schemas().getWithResponse("mms-eus", "atlantisdemo", com.azure.core.util.Context.NONE); } } ``` @@ -1472,8 +1495,6 @@ public final class SchemaGetSamples { ### SharedKeysOperation_GetSharedKeys ```java -import com.azure.core.util.Context; - /** Samples for SharedKeysOperation GetSharedKeys. */ public final class SharedKeysOperationGetSharedKeysSamples { /* @@ -1485,7 +1506,7 @@ public final class SharedKeysOperationGetSharedKeysSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void sharedKeysList(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.sharedKeysOperations().getSharedKeysWithResponse("rg1", "TestLinkWS", Context.NONE); + manager.sharedKeysOperations().getSharedKeysWithResponse("rg1", "TestLinkWS", com.azure.core.util.Context.NONE); } } ``` @@ -1493,8 +1514,6 @@ public final class SharedKeysOperationGetSharedKeysSamples { ### SharedKeysOperation_Regenerate ```java -import com.azure.core.util.Context; - /** Samples for SharedKeysOperation Regenerate. */ public final class SharedKeysOperationRegenerateSamples { /* @@ -1506,7 +1525,7 @@ public final class SharedKeysOperationRegenerateSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void regenerateSharedKeys(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.sharedKeysOperations().regenerateWithResponse("rg1", "workspace1", Context.NONE); + manager.sharedKeysOperations().regenerateWithResponse("rg1", "workspace1", com.azure.core.util.Context.NONE); } } ``` @@ -1538,7 +1557,7 @@ public final class StorageInsightConfigsCreateOrUpdateSamples { new StorageAccount() .withId( "/subscriptions/00000000-0000-0000-0000-000000000005/resourcegroups/OIAutoRest6987/providers/microsoft.storage/storageaccounts/AzTestFakeSA9945") - .withKey("1234")) + .withKey("fakeTokenPlaceholder")) .create(); } } @@ -1547,8 +1566,6 @@ public final class StorageInsightConfigsCreateOrUpdateSamples { ### StorageInsightConfigs_Delete ```java -import com.azure.core.util.Context; - /** Samples for StorageInsightConfigs Delete. */ public final class StorageInsightConfigsDeleteSamples { /* @@ -1562,7 +1579,7 @@ public final class StorageInsightConfigsDeleteSamples { public static void storageInsightsDelete(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { manager .storageInsightConfigs() - .deleteWithResponse("OIAutoRest5123", "aztest5048", "AzTestSI1110", Context.NONE); + .deleteWithResponse("OIAutoRest5123", "aztest5048", "AzTestSI1110", com.azure.core.util.Context.NONE); } } ``` @@ -1570,8 +1587,6 @@ public final class StorageInsightConfigsDeleteSamples { ### StorageInsightConfigs_Get ```java -import com.azure.core.util.Context; - /** Samples for StorageInsightConfigs Get. */ public final class StorageInsightConfigsGetSamples { /* @@ -1583,7 +1598,9 @@ public final class StorageInsightConfigsGetSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void storageInsightsGet(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.storageInsightConfigs().getWithResponse("OIAutoRest5123", "aztest5048", "AzTestSI1110", Context.NONE); + manager + .storageInsightConfigs() + .getWithResponse("OIAutoRest5123", "aztest5048", "AzTestSI1110", com.azure.core.util.Context.NONE); } } ``` @@ -1591,8 +1608,6 @@ public final class StorageInsightConfigsGetSamples { ### StorageInsightConfigs_ListByWorkspace ```java -import com.azure.core.util.Context; - /** Samples for StorageInsightConfigs ListByWorkspace. */ public final class StorageInsightConfigsListByWorkspaceSamples { /* @@ -1604,7 +1619,31 @@ public final class StorageInsightConfigsListByWorkspaceSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void storageInsightsList(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.storageInsightConfigs().listByWorkspace("OIAutoRest5123", "aztest5048", Context.NONE); + manager + .storageInsightConfigs() + .listByWorkspace("OIAutoRest5123", "aztest5048", com.azure.core.util.Context.NONE); + } +} +``` + +### Tables_CancelSearch + +```java +/** Samples for Tables CancelSearch. */ +public final class TablesCancelSearchSamples { + /* + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/TablesSearchCancel.json + */ + /** + * Sample code: TablesSearchCancel. + * + * @param manager Entry point to LogAnalyticsManager. + */ + public static void tablesSearchCancel(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { + manager + .tables() + .cancelSearchWithResponse( + "oiautorest6685", "oiautorest6685", "table1_SRCH", com.azure.core.util.Context.NONE); } } ``` @@ -1620,7 +1659,7 @@ 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 + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/TablesUpsert.json */ /** * Sample code: TablesUpsert. @@ -1646,20 +1685,18 @@ public final class TablesCreateOrUpdateSamples { ### 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 + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/TablesDelete.json */ /** - * Sample code: TablesGet. + * Sample code: TablesDelete. * * @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); + public static void tablesDelete(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { + manager.tables().delete("oiautorest6685", "oiautorest6685", "table1_CL", com.azure.core.util.Context.NONE); } } ``` @@ -1667,12 +1704,10 @@ public final class TablesDeleteSamples { ### 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 + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/TablesGet.json */ /** * Sample code: TablesGet. @@ -1680,7 +1715,9 @@ public final class TablesGetSamples { * @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); + manager + .tables() + .getWithResponse("oiautorest6685", "oiautorest6685", "table1_SRCH", com.azure.core.util.Context.NONE); } } ``` @@ -1688,12 +1725,10 @@ public final class TablesGetSamples { ### 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 + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/TablesList.json */ /** * Sample code: TablesListByWorkspace. @@ -1701,7 +1736,7 @@ public final class TablesListByWorkspaceSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void tablesListByWorkspace(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.tables().listByWorkspace("oiautorest6685", "oiautorest6685", Context.NONE); + manager.tables().listByWorkspace("oiautorest6685", "oiautorest6685", com.azure.core.util.Context.NONE); } } ``` @@ -1709,20 +1744,20 @@ public final class TablesListByWorkspaceSamples { ### 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 + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/TablesMigrate.json */ /** - * Sample code: TablesGet. + * Sample code: TablesMigrate. * * @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); + public static void tablesMigrate(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { + manager + .tables() + .migrateWithResponse("oiautorest6685", "oiautorest6685", "table1_CL", com.azure.core.util.Context.NONE); } } ``` @@ -1730,7 +1765,6 @@ public final class TablesMigrateSamples { ### 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; @@ -1740,7 +1774,7 @@ 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 + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/TablesUpsert.json */ /** * Sample code: TablesUpsert. @@ -1751,7 +1785,8 @@ public final class TablesUpdateSamples { Table resource = manager .tables() - .getWithResponse("oiautorest6685", "oiautorest6685", "AzureNetworkFlow", Context.NONE) + .getWithResponse( + "oiautorest6685", "oiautorest6685", "AzureNetworkFlow", com.azure.core.util.Context.NONE) .getValue(); resource .update() @@ -1769,8 +1804,6 @@ public final class TablesUpdateSamples { ### Usages_List ```java -import com.azure.core.util.Context; - /** Samples for Usages List. */ public final class UsagesListSamples { /* @@ -1782,7 +1815,7 @@ public final class UsagesListSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void usagesList(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.usages().list("rg1", "TestLinkWS", Context.NONE); + manager.usages().list("rg1", "TestLinkWS", com.azure.core.util.Context.NONE); } } ``` @@ -1790,8 +1823,6 @@ public final class UsagesListSamples { ### WorkspacePurge_GetPurgeStatus ```java -import com.azure.core.util.Context; - /** Samples for WorkspacePurge GetPurgeStatus. */ public final class WorkspacePurgeGetPurgeStatusSamples { /* @@ -1806,7 +1837,10 @@ public final class WorkspacePurgeGetPurgeStatusSamples { manager .workspacePurges() .getPurgeStatusWithResponse( - "OIAutoRest5123", "aztest5048", "purge-970318e7-b859-4edb-8903-83b1b54d0b74", Context.NONE); + "OIAutoRest5123", + "aztest5048", + "purge-970318e7-b859-4edb-8903-83b1b54d0b74", + com.azure.core.util.Context.NONE); } } ``` @@ -1814,7 +1848,6 @@ public final class WorkspacePurgeGetPurgeStatusSamples { ### 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; @@ -1845,7 +1878,7 @@ public final class WorkspacePurgePurgeSamples { .withOperator("==") .withValue( "/subscriptions/12341234-1234-1234-1234-123412341234/resourceGroups/SomeResourceGroup/providers/microsoft.insights/components/AppInsightResource"))), - Context.NONE); + com.azure.core.util.Context.NONE); } /* @@ -1871,7 +1904,7 @@ public final class WorkspacePurgePurgeSamples { .withColumn("TimeGenerated") .withOperator(">") .withValue("2017-09-01T00:00:00"))), - Context.NONE); + com.azure.core.util.Context.NONE); } } ``` @@ -1887,7 +1920,7 @@ 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 + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/WorkspacesCreate.json */ /** * Sample code: WorkspacesCreate. @@ -1922,12 +1955,10 @@ public final class WorkspacesCreateOrUpdateSamples { ### 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 + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/WorkspacesDelete.json */ /** * Sample code: WorkspacesDelete. @@ -1935,7 +1966,7 @@ public final class WorkspacesDeleteSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void workspacesDelete(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.workspaces().delete("oiautorest6685", "oiautorest6685", null, Context.NONE); + manager.workspaces().delete("oiautorest6685", "oiautorest6685", null, com.azure.core.util.Context.NONE); } } ``` @@ -1943,12 +1974,10 @@ public final class WorkspacesDeleteSamples { ### 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 + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/WorkspacesGet.json */ /** * Sample code: WorkspaceGet. @@ -1956,7 +1985,9 @@ public final class WorkspacesGetByResourceGroupSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void workspaceGet(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.workspaces().getByResourceGroupWithResponse("oiautorest6685", "oiautorest6685", Context.NONE); + manager + .workspaces() + .getByResourceGroupWithResponse("oiautorest6685", "oiautorest6685", com.azure.core.util.Context.NONE); } } ``` @@ -1964,12 +1995,10 @@ public final class WorkspacesGetByResourceGroupSamples { ### 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 + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/WorkspacesSubscriptionList.json */ /** * Sample code: WorkspacesSubscriptionList. @@ -1977,7 +2006,7 @@ public final class WorkspacesListSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void workspacesSubscriptionList(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.workspaces().list(Context.NONE); + manager.workspaces().list(com.azure.core.util.Context.NONE); } } ``` @@ -1985,12 +2014,10 @@ public final class WorkspacesListSamples { ### 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 + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/WorkspacesListByResourceGroup.json */ /** * Sample code: WorkspacesGet. @@ -1998,7 +2025,7 @@ public final class WorkspacesListByResourceGroupSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void workspacesGet(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.workspaces().listByResourceGroup("oiautorest6685", Context.NONE); + manager.workspaces().listByResourceGroup("oiautorest6685", com.azure.core.util.Context.NONE); } } ``` @@ -2006,7 +2033,6 @@ public final class WorkspacesListByResourceGroupSamples { ### 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; @@ -2015,7 +2041,7 @@ 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 + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/WorkspacesUpdate.json */ /** * Sample code: WorkspacesPatch. @@ -2026,13 +2052,13 @@ public final class WorkspacesUpdateSamples { Workspace resource = manager .workspaces() - .getByResourceGroupWithResponse("oiautorest6685", "oiautorest6685", Context.NONE) + .getByResourceGroupWithResponse("oiautorest6685", "oiautorest6685", com.azure.core.util.Context.NONE) .getValue(); resource .update() .withSku(new WorkspaceSku().withName(WorkspaceSkuNameEnum.PER_GB2018)) .withRetentionInDays(30) - .withWorkspaceCapping(new WorkspaceCapping().withDailyQuotaGb(-1.0)) + .withWorkspaceCapping(new WorkspaceCapping().withDailyQuotaGb(-1.0D)) .apply(); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/pom.xml b/sdk/loganalytics/azure-resourcemanager-loganalytics/pom.xml index 3967b148319f..91cf77894f20 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/pom.xml +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/pom.xml @@ -1,3 +1,8 @@ + 4.0.0 @@ -13,7 +18,7 @@ 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-2022-02. + 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-2022-10. https://github.com/Azure/azure-sdk-for-java @@ -38,7 +43,8 @@ UTF-8 - true + 0 + 0 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 2af536322971..e3c6c2e1b301 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 @@ -287,7 +287,7 @@ public LogAnalyticsManager authenticate(TokenCredential credential, AzureProfile .append("-") .append("com.azure.resourcemanager.loganalytics") .append("/") - .append("1.0.0-beta.3"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") 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 c6120a4bb8f9..89c5dab61757 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 @@ -18,26 +18,26 @@ public interface AvailableServiceTiersClient { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the available service tiers for the workspace. + * @return the available service tiers for the workspace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - List listByWorkspace(String resourceGroupName, String workspaceName); + Response> listByWorkspaceWithResponse( + String resourceGroupName, String workspaceName, Context context); /** * Gets the available service tiers for the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @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 available service tiers for the workspace along with {@link Response}. + * @return the available service tiers for the workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response> listByWorkspaceWithResponse( - String resourceGroupName, String workspaceName, Context context); + List listByWorkspace(String resourceGroupName, String workspaceName); } 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 c7df2eb352fa..05fcb50902b2 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 @@ -180,28 +180,28 @@ SyncPoller, ClusterInner> beginCreateOrUpdate( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName Name of the Log Analytics Cluster. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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) - ClusterInner getByResourceGroup(String resourceGroupName, String clusterName); + Response getByResourceGroupWithResponse( + String resourceGroupName, String clusterName, Context context); /** * Gets a Log Analytics cluster instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName Name of the Log Analytics Cluster. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Log Analytics cluster instance along with {@link Response}. + * @return a Log Analytics cluster instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String clusterName, Context context); + ClusterInner getByResourceGroup(String resourceGroupName, String clusterName); /** * Updates a Log Analytics cluster. 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 94ec80673103..77ac5ee5e3e4 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 @@ -40,22 +40,6 @@ public interface DataExportsClient { @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, Context context); - /** - * Create or update a data export. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataExportName The data export rule name. - * @param parameters The parameters required to create or update a data export. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DataExportInner createOrUpdate( - String resourceGroupName, String workspaceName, String dataExportName, DataExportInner parameters); - /** * Create or update a data export. * @@ -78,18 +62,20 @@ Response createOrUpdateWithResponse( Context context); /** - * Gets a data export instance. + * Create or update a data export. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataExportName The data export rule name. + * @param parameters The parameters required to create or update a data export. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 the top level data export resource container. */ @ServiceMethod(returns = ReturnType.SINGLE) - DataExportInner get(String resourceGroupName, String workspaceName, String dataExportName); + DataExportInner createOrUpdate( + String resourceGroupName, String workspaceName, String dataExportName, DataExportInner parameters); /** * Gets a data export instance. @@ -108,7 +94,7 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String dataExportName, Context context); /** - * Deletes the specified data export in a given workspace.. + * Gets a data export instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -116,9 +102,10 @@ 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 a data export instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String dataExportName); + DataExportInner get(String resourceGroupName, String workspaceName, String dataExportName); /** * Deletes the specified data export in a given workspace.. @@ -135,4 +122,17 @@ Response getWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse( String resourceGroupName, String workspaceName, String dataExportName, Context context); + + /** + * Deletes the specified data export in a given workspace.. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataExportName The data export rule name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 dataExportName); } 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 4971182048e5..a6b4da42704f 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 @@ -13,22 +13,6 @@ /** An instance of this class provides access to all the operations defined in DataSourcesClient. */ public interface DataSourcesClient { - /** - * Create or update a data source. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataSourceName The name of the datasource resource. - * @param parameters The parameters required to create or update a datasource. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws 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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - DataSourceInner createOrUpdate( - String resourceGroupName, String workspaceName, String dataSourceName, DataSourceInner parameters); - /** * Create or update a data source. * @@ -51,17 +35,20 @@ Response createOrUpdateWithResponse( Context context); /** - * Deletes a data source instance. + * Create or update a data source. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param dataSourceName Name of the datasource. + * @param dataSourceName The name of the datasource resource. + * @param parameters The parameters required to create or update a datasource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String dataSourceName); + DataSourceInner createOrUpdate( + String resourceGroupName, String workspaceName, String dataSourceName, DataSourceInner parameters); /** * Deletes a data source instance. @@ -80,7 +67,7 @@ Response deleteWithResponse( String resourceGroupName, String workspaceName, String dataSourceName, Context context); /** - * Gets a datasource instance. + * Deletes a data source instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -88,10 +75,9 @@ 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - DataSourceInner get(String resourceGroupName, String workspaceName, String dataSourceName); + void delete(String resourceGroupName, String workspaceName, String dataSourceName); /** * Gets a datasource instance. @@ -109,6 +95,20 @@ Response deleteWithResponse( Response getWithResponse( String resourceGroupName, String workspaceName, String dataSourceName, Context context); + /** + * Gets a datasource instance. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceName Name of the datasource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DataSourceInner get(String resourceGroupName, String workspaceName, String dataSourceName); + /** * Gets the first page of data source instances in a workspace with the link to the next page. * 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 0f1f4f4c1796..227774b3b82f 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 @@ -17,12 +17,15 @@ public interface GatewaysClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param gatewayId The Log Analytics gateway Id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String gatewayId); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String gatewayId, Context context); /** * Delete a Log Analytics gateway. @@ -30,13 +33,10 @@ public interface GatewaysClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param gatewayId The Log Analytics gateway Id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String gatewayId, Context context); + void delete(String resourceGroupName, String workspaceName, String gatewayId); } 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 68913d829b3c..c580cc245208 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 @@ -19,12 +19,15 @@ public interface IntelligencePacksClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param intelligencePackName The name of the intelligence pack to be disabled. + * @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) - void disable(String resourceGroupName, String workspaceName, String intelligencePackName); + Response disableWithResponse( + String resourceGroupName, String workspaceName, String intelligencePackName, Context context); /** * Disables an intelligence pack for a given workspace. @@ -32,15 +35,12 @@ public interface IntelligencePacksClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param intelligencePackName The name of the intelligence pack to be disabled. - * @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 disableWithResponse( - String resourceGroupName, String workspaceName, String intelligencePackName, Context context); + void disable(String resourceGroupName, String workspaceName, String intelligencePackName); /** * Enables an intelligence pack for a given workspace. @@ -48,12 +48,15 @@ Response disableWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param intelligencePackName The name of the intelligence pack to be enabled. + * @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) - void enable(String resourceGroupName, String workspaceName, String intelligencePackName); + Response enableWithResponse( + String resourceGroupName, String workspaceName, String intelligencePackName, Context context); /** * Enables an intelligence pack for a given workspace. @@ -61,41 +64,38 @@ Response disableWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param intelligencePackName The name of the intelligence pack to be enabled. - * @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 enableWithResponse( - String resourceGroupName, String workspaceName, String intelligencePackName, Context context); + void enable(String resourceGroupName, String workspaceName, String intelligencePackName); /** * Lists all the intelligence packs possible and whether they are enabled or disabled for a given workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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) - List list(String resourceGroupName, String workspaceName); + Response> listWithResponse( + String resourceGroupName, String workspaceName, Context context); /** * Lists all the intelligence packs possible and whether they are enabled or disabled for a given workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 along with {@link Response}. + * @return array of IntelligencePack. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response> listWithResponse( - String resourceGroupName, String workspaceName, Context context); + List list(String resourceGroupName, String workspaceName); } 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 b4d809df0fda..7c0f0f8f253a 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 @@ -156,13 +156,15 @@ LinkedServiceInner delete( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param linkedServiceName Name of the linked service. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a linked service instance. + * @return a linked service instance along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - LinkedServiceInner get(String resourceGroupName, String workspaceName, String linkedServiceName); + Response getWithResponse( + String resourceGroupName, String workspaceName, String linkedServiceName, Context context); /** * Gets a linked service instance. @@ -170,15 +172,13 @@ LinkedServiceInner delete( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param linkedServiceName Name of the linked service. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a linked service instance along with {@link Response}. + * @return a linked service instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String linkedServiceName, Context context); + LinkedServiceInner get(String resourceGroupName, String workspaceName, String linkedServiceName); /** * Gets the linked services instances in a workspace. 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 a4a108f8a888..33e90177f81a 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 @@ -22,17 +22,19 @@ public interface LinkedStorageAccountsClient { * @param workspaceName The name of the workspace. * @param dataSourceType Linked storage accounts type. * @param parameters The parameters required to create or update linked storage accounts. + * @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 linked storage accounts top level resource container. + * @return linked storage accounts top level resource container along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - LinkedStorageAccountsResourceInner createOrUpdate( + Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, DataSourceType dataSourceType, - LinkedStorageAccountsResourceInner parameters); + LinkedStorageAccountsResourceInner parameters, + Context context); /** * Create or Update a link relation between current workspace and a group of storage accounts of a specific data @@ -42,19 +44,17 @@ LinkedStorageAccountsResourceInner createOrUpdate( * @param workspaceName The name of the workspace. * @param dataSourceType Linked storage accounts type. * @param parameters The parameters required to create or update linked storage accounts. - * @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 linked storage accounts top level resource container along with {@link Response}. + * @return linked storage accounts top level resource container. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( + LinkedStorageAccountsResourceInner createOrUpdate( String resourceGroupName, String workspaceName, DataSourceType dataSourceType, - LinkedStorageAccountsResourceInner parameters, - Context context); + LinkedStorageAccountsResourceInner parameters); /** * Deletes all linked storage accounts of a specific data source type associated with the specified workspace. @@ -62,12 +62,15 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataSourceType Linked storage accounts type. + * @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) - void delete(String resourceGroupName, String workspaceName, DataSourceType dataSourceType); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, DataSourceType dataSourceType, Context context); /** * Deletes all linked storage accounts of a specific data source type associated with the specified workspace. @@ -75,15 +78,12 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataSourceType Linked storage accounts type. - * @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 deleteWithResponse( - String resourceGroupName, String workspaceName, DataSourceType dataSourceType, Context context); + void delete(String resourceGroupName, String workspaceName, DataSourceType dataSourceType); /** * Gets all linked storage account of a specific data source type associated with the specified workspace. @@ -91,14 +91,16 @@ Response deleteWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataSourceType Linked storage accounts type. + * @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 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) - LinkedStorageAccountsResourceInner get( - String resourceGroupName, String workspaceName, DataSourceType dataSourceType); + Response getWithResponse( + String resourceGroupName, String workspaceName, DataSourceType dataSourceType, Context context); /** * Gets all linked storage account of a specific data source type associated with the specified workspace. @@ -106,16 +108,14 @@ LinkedStorageAccountsResourceInner get( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataSourceType Linked storage accounts type. - * @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 all linked storage account of a specific data source type associated with the specified workspace along - * with {@link Response}. + * @return all linked storage account of a specific data source type associated with the specified workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, DataSourceType dataSourceType, Context context); + LinkedStorageAccountsResourceInner get( + String resourceGroupName, String workspaceName, DataSourceType dataSourceType); /** * Gets all linked storage accounts associated with the specified workspace, storage accounts will be sorted by 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 63d4779ef512..72d3ed23eb1f 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 @@ -17,25 +17,25 @@ public interface OperationStatusesClient { * * @param location The region name of operation. * @param asyncOperationId The operation Id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the 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) - OperationStatusInner get(String location, String asyncOperationId); + Response getWithResponse(String location, String asyncOperationId, Context context); /** * Get the status of a long running azure asynchronous operation. * * @param location The region name of operation. * @param asyncOperationId The operation Id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of a long running azure asynchronous operation along with {@link Response}. + * @return the status of a long running azure asynchronous operation. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse(String location, String asyncOperationId, Context context); + OperationStatusInner get(String location, String asyncOperationId); } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/QueriesClient.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/QueriesClient.java index b3a8a7f5966a..207357635fde 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/QueriesClient.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/QueriesClient.java @@ -98,20 +98,6 @@ PagedIterable search( String skipToken, Context context); - /** - * Gets a specific Log Analytics Query defined within a Log Analytics QueryPack. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param queryPackName The name of the Log Analytics QueryPack resource. - * @param id The id of a specific query defined in the Log Analytics QueryPack. - * @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 specific Log Analytics Query defined within a Log Analytics QueryPack. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - LogAnalyticsQueryPackQueryInner get(String resourceGroupName, String queryPackName, String id); - /** * Gets a specific Log Analytics Query defined within a Log Analytics QueryPack. * @@ -129,21 +115,18 @@ Response getWithResponse( String resourceGroupName, String queryPackName, String id, Context context); /** - * Adds or Updates a specific Query within a Log Analytics QueryPack. + * Gets a specific Log Analytics Query defined within a Log Analytics QueryPack. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param queryPackName The name of the Log Analytics QueryPack resource. * @param id The id of a specific query defined in the Log Analytics QueryPack. - * @param queryPayload Properties that need to be specified to create a new query and add it to a Log Analytics - * QueryPack. * @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 QueryPack-Query definition. + * @return a specific Log Analytics Query defined within a Log Analytics QueryPack. */ @ServiceMethod(returns = ReturnType.SINGLE) - LogAnalyticsQueryPackQueryInner put( - String resourceGroupName, String queryPackName, String id, LogAnalyticsQueryPackQueryInner queryPayload); + LogAnalyticsQueryPackQueryInner get(String resourceGroupName, String queryPackName, String id); /** * Adds or Updates a specific Query within a Log Analytics QueryPack. @@ -181,7 +164,7 @@ Response putWithResponse( * @return a Log Analytics QueryPack-Query definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - LogAnalyticsQueryPackQueryInner update( + LogAnalyticsQueryPackQueryInner put( String resourceGroupName, String queryPackName, String id, LogAnalyticsQueryPackQueryInner queryPayload); /** @@ -207,17 +190,21 @@ Response updateWithResponse( Context context); /** - * Deletes a specific Query defined within an Log Analytics QueryPack. + * Adds or Updates a specific Query within a Log Analytics QueryPack. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param queryPackName The name of the Log Analytics QueryPack resource. * @param id The id of a specific query defined in the Log Analytics QueryPack. + * @param queryPayload Properties that need to be specified to create a new query and add it to a Log Analytics + * QueryPack. * @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 QueryPack-Query definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String queryPackName, String id); + LogAnalyticsQueryPackQueryInner update( + String resourceGroupName, String queryPackName, String id, LogAnalyticsQueryPackQueryInner queryPayload); /** * Deletes a specific Query defined within an Log Analytics QueryPack. @@ -233,4 +220,17 @@ Response updateWithResponse( */ @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse(String resourceGroupName, String queryPackName, String id, Context context); + + /** + * Deletes a specific Query defined within an Log Analytics QueryPack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param queryPackName The name of the Log Analytics QueryPack resource. + * @param id The id of a specific query defined in the Log Analytics QueryPack. + * @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 queryPackName, String id); } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/QueryPacksClient.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/QueryPacksClient.java index 69613037cf1d..b23d84012dec 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/QueryPacksClient.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/QueryPacksClient.java @@ -66,16 +66,37 @@ public interface QueryPacksClient { PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Deletes a Log Analytics QueryPack. + * Creates a Log Analytics QueryPack. Note: You cannot specify a different value for InstrumentationKey nor AppId in + * the Put operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param queryPackName The name of the Log Analytics QueryPack resource. + * @param logAnalyticsQueryPackPayload Properties that need to be specified to create or update a Log Analytics + * QueryPack. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Log Analytics QueryPack definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String queryPackName); + Response createOrUpdateWithoutNameWithResponse( + String resourceGroupName, LogAnalyticsQueryPackInner logAnalyticsQueryPackPayload, Context context); + + /** + * Creates a Log Analytics QueryPack. Note: You cannot specify a different value for InstrumentationKey nor AppId in + * the Put operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param logAnalyticsQueryPackPayload Properties that need to be specified to create or update a Log Analytics + * QueryPack. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Log Analytics QueryPack definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LogAnalyticsQueryPackInner createOrUpdateWithoutName( + String resourceGroupName, LogAnalyticsQueryPackInner logAnalyticsQueryPackPayload); /** * Deletes a Log Analytics QueryPack. @@ -92,17 +113,16 @@ public interface QueryPacksClient { Response deleteWithResponse(String resourceGroupName, String queryPackName, Context context); /** - * Returns a Log Analytics QueryPack. + * Deletes a Log Analytics QueryPack. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param queryPackName The name of the Log Analytics QueryPack resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Log Analytics QueryPack definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - LogAnalyticsQueryPackInner getByResourceGroup(String resourceGroupName, String queryPackName); + void delete(String resourceGroupName, String queryPackName); /** * Returns a Log Analytics QueryPack. @@ -120,21 +140,17 @@ Response getByResourceGroupWithResponse( String resourceGroupName, String queryPackName, Context context); /** - * Creates (or updates) a Log Analytics QueryPack. Note: You cannot specify a different value for InstrumentationKey - * nor AppId in the Put operation. + * Returns a Log Analytics QueryPack. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param queryPackName The name of the Log Analytics QueryPack resource. - * @param logAnalyticsQueryPackPayload Properties that need to be specified to create or update a Log Analytics - * QueryPack. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an Log Analytics QueryPack definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - LogAnalyticsQueryPackInner createOrUpdate( - String resourceGroupName, String queryPackName, LogAnalyticsQueryPackInner logAnalyticsQueryPackPayload); + LogAnalyticsQueryPackInner getByResourceGroup(String resourceGroupName, String queryPackName); /** * Creates (or updates) a Log Analytics QueryPack. Note: You cannot specify a different value for InstrumentationKey @@ -158,18 +174,21 @@ Response createOrUpdateWithResponse( Context context); /** - * Updates an existing QueryPack's tags. To update other fields use the CreateOrUpdate method. + * Creates (or updates) a Log Analytics QueryPack. Note: You cannot specify a different value for InstrumentationKey + * nor AppId in the Put operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param queryPackName The name of the Log Analytics QueryPack resource. - * @param queryPackTags Updated tag information to set into the QueryPack instance. + * @param logAnalyticsQueryPackPayload Properties that need to be specified to create or update a Log Analytics + * QueryPack. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an Log Analytics QueryPack definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - LogAnalyticsQueryPackInner updateTags(String resourceGroupName, String queryPackName, TagsResource queryPackTags); + LogAnalyticsQueryPackInner createOrUpdate( + String resourceGroupName, String queryPackName, LogAnalyticsQueryPackInner logAnalyticsQueryPackPayload); /** * Updates an existing QueryPack's tags. To update other fields use the CreateOrUpdate method. @@ -186,4 +205,18 @@ Response createOrUpdateWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) Response updateTagsWithResponse( String resourceGroupName, String queryPackName, TagsResource queryPackTags, Context context); + + /** + * Updates an existing QueryPack's tags. To update other fields use the CreateOrUpdate method. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param queryPackName The name of the Log Analytics QueryPack resource. + * @param queryPackTags Updated tag information to set into the QueryPack instance. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Log Analytics QueryPack definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + LogAnalyticsQueryPackInner updateTags(String resourceGroupName, String queryPackName, TagsResource queryPackTags); } 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 f57c5f69c0c4..30c89601cf53 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 @@ -13,19 +13,6 @@ /** An instance of this class provides access to all the operations defined in SavedSearchesClient. */ public interface SavedSearchesClient { - /** - * Deletes the specified saved search in a given workspace. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param savedSearchId The id of the saved search. - * @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 savedSearchId); - /** * Deletes the specified saved search in a given workspace. * @@ -43,20 +30,17 @@ Response deleteWithResponse( String resourceGroupName, String workspaceName, String savedSearchId, Context context); /** - * Creates or updates a saved search for a given workspace. + * Deletes the specified saved search in a given workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param savedSearchId The id of the saved search. - * @param parameters The parameters required to save a search. * @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. */ @ServiceMethod(returns = ReturnType.SINGLE) - SavedSearchInner createOrUpdate( - String resourceGroupName, String workspaceName, String savedSearchId, SavedSearchInner parameters); + void delete(String resourceGroupName, String workspaceName, String savedSearchId); /** * Creates or updates a saved search for a given workspace. @@ -80,18 +64,20 @@ Response createOrUpdateWithResponse( Context context); /** - * Gets the specified saved search for a given workspace. + * Creates or updates a saved search for a given workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param savedSearchId The id of the saved search. + * @param parameters The parameters required to save a search. * @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 value object for saved search results. */ @ServiceMethod(returns = ReturnType.SINGLE) - SavedSearchInner get(String resourceGroupName, String workspaceName, String savedSearchId); + SavedSearchInner createOrUpdate( + String resourceGroupName, String workspaceName, String savedSearchId, SavedSearchInner parameters); /** * Gets the specified saved search for a given workspace. @@ -110,17 +96,18 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String savedSearchId, Context context); /** - * Gets the saved searches for a given Log Analytics Workspace. + * Gets the specified saved search for a given workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param savedSearchId The id of the saved search. * @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 specified saved search for a given workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - SavedSearchesListResultInner listByWorkspace(String resourceGroupName, String workspaceName); + SavedSearchInner get(String resourceGroupName, String workspaceName, String savedSearchId); /** * Gets the saved searches for a given Log Analytics Workspace. @@ -136,4 +123,17 @@ Response getWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) Response listByWorkspaceWithResponse( String resourceGroupName, String workspaceName, Context context); + + /** + * Gets the saved searches for a given Log Analytics Workspace. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + SavedSearchesListResultInner listByWorkspace(String resourceGroupName, String workspaceName); } 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 e08bdd698234..a61c6fef6faa 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 @@ -17,26 +17,26 @@ public interface SchemasClient { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the schema for a given workspace. + * @return the schema for a given workspace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - SearchGetSchemaResponseInner get(String resourceGroupName, String workspaceName); + Response getWithResponse( + String resourceGroupName, String workspaceName, Context context); /** * Gets the schema for a given workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 along with {@link Response}. + * @return the schema for a given workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, Context context); + SearchGetSchemaResponseInner get(String resourceGroupName, String workspaceName); } 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 01fb6729182c..cfc9959e8c49 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 @@ -17,28 +17,28 @@ public interface SharedKeysOperationsClient { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the shared keys for a workspace. + * @return the shared keys for a workspace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - SharedKeysInner getSharedKeys(String resourceGroupName, String workspaceName); + Response getSharedKeysWithResponse( + String resourceGroupName, String workspaceName, Context context); /** * Gets the shared keys for a workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 along with {@link Response}. + * @return the shared keys for a workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getSharedKeysWithResponse( - String resourceGroupName, String workspaceName, Context context); + SharedKeysInner getSharedKeys(String resourceGroupName, String workspaceName); /** * Regenerates the shared keys for a Log Analytics Workspace. These keys are used to connect Microsoft Operational @@ -46,13 +46,14 @@ Response getSharedKeysWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the shared keys for a workspace. + * @return the shared keys for a workspace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - SharedKeysInner regenerate(String resourceGroupName, String workspaceName); + Response regenerateWithResponse(String resourceGroupName, String workspaceName, Context context); /** * Regenerates the shared keys for a Log Analytics Workspace. These keys are used to connect Microsoft Operational @@ -60,12 +61,11 @@ Response getSharedKeysWithResponse( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the shared keys for a workspace along with {@link Response}. + * @return the shared keys for a workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response regenerateWithResponse(String resourceGroupName, String workspaceName, Context context); + SharedKeysInner regenerate(String resourceGroupName, String workspaceName); } 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 8d5e32ecec19..0ba9e9e6588f 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 @@ -13,22 +13,6 @@ /** An instance of this class provides access to all the operations defined in StorageInsightConfigsClient. */ public interface StorageInsightConfigsClient { - /** - * Create or update a storage insight. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param storageInsightName Name of the storageInsightsConfigs resource. - * @param parameters The parameters required to create or update a storage insight. - * @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. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - StorageInsightInner createOrUpdate( - String resourceGroupName, String workspaceName, String storageInsightName, StorageInsightInner parameters); - /** * Create or update a storage insight. * @@ -51,18 +35,20 @@ Response createOrUpdateWithResponse( Context context); /** - * Gets a storage insight instance. + * Create or update a storage insight. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param storageInsightName Name of the storageInsightsConfigs resource. + * @param parameters The parameters required to create or update a storage insight. * @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 the top level storage insight resource container. */ @ServiceMethod(returns = ReturnType.SINGLE) - StorageInsightInner get(String resourceGroupName, String workspaceName, String storageInsightName); + StorageInsightInner createOrUpdate( + String resourceGroupName, String workspaceName, String storageInsightName, StorageInsightInner parameters); /** * Gets a storage insight instance. @@ -81,7 +67,7 @@ Response getWithResponse( String resourceGroupName, String workspaceName, String storageInsightName, Context context); /** - * Deletes a storageInsightsConfigs resource. + * Gets a storage insight instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. @@ -89,9 +75,10 @@ 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 a storage insight instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, String storageInsightName); + StorageInsightInner get(String resourceGroupName, String workspaceName, String storageInsightName); /** * Deletes a storageInsightsConfigs resource. @@ -109,6 +96,19 @@ Response getWithResponse( Response deleteWithResponse( String resourceGroupName, String workspaceName, String storageInsightName, Context context); + /** + * Deletes a storageInsightsConfigs resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param storageInsightName Name of the storageInsightsConfigs resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String workspaceName, String storageInsightName); + /** * Lists the storage insight instances within a workspace. * 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 bb27c20458ed..d3cb254cecf5 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 @@ -180,13 +180,15 @@ TableInner update( * @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 a Log Analytics workspace table. + * @return a Log Analytics workspace table along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - TableInner get(String resourceGroupName, String workspaceName, String tableName); + Response getWithResponse( + String resourceGroupName, String workspaceName, String tableName, Context context); /** * Gets a Log Analytics workspace table. @@ -194,15 +196,13 @@ TableInner update( * @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 a Log Analytics workspace table along with {@link Response}. + * @return a Log Analytics workspace table. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String workspaceName, String tableName, Context context); + TableInner get(String resourceGroupName, String workspaceName, String tableName); /** * Delete a Log Analytics workspace table. @@ -268,12 +268,15 @@ SyncPoller, Void> beginDelete( * @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) - void migrate(String resourceGroupName, String workspaceName, String tableName); + Response migrateWithResponse( + 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 @@ -282,6 +285,19 @@ SyncPoller, Void> beginDelete( * @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); + + /** + * Cancel a log analytics workspace search results table query run. + * + * @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. @@ -289,6 +305,19 @@ SyncPoller, Void> beginDelete( * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response migrateWithResponse( + Response cancelSearchWithResponse( String resourceGroupName, String workspaceName, String tableName, Context context); + + /** + * Cancel a log analytics workspace search results table query run. + * + * @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 cancelSearch(String resourceGroupName, String workspaceName, String tableName); } 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 2019dfe7b423..b8b5e7fa58a8 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 @@ -29,13 +29,15 @@ public interface WorkspacePurgesClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param body Describes the body of a request to purge data in a single table of an Log Analytics Workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return response containing operationId for a specific purge action. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkspacePurgeResponseInner purge(String resourceGroupName, String workspaceName, WorkspacePurgeBody body); + WorkspacePurgesPurgeResponse purgeWithResponse( + String resourceGroupName, String workspaceName, WorkspacePurgeBody body, Context context); /** * Purges data in an Log Analytics workspace by a set of user-defined filters. @@ -51,15 +53,13 @@ public interface WorkspacePurgesClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param body Describes the body of a request to purge data in a single table of an Log Analytics Workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return response containing operationId for a specific purge action. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkspacePurgesPurgeResponse purgeWithResponse( - String resourceGroupName, String workspaceName, WorkspacePurgeBody body, Context context); + WorkspacePurgeResponseInner purge(String resourceGroupName, String workspaceName, WorkspacePurgeBody body); /** * Gets status of an ongoing purge operation. @@ -67,13 +67,15 @@ WorkspacePurgesPurgeResponse purgeWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param purgeId In a purge status request, this is the Id of the operation the status of which is returned. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return status of an ongoing purge operation. + * @return status of an ongoing purge operation along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkspacePurgeStatusResponseInner getPurgeStatus(String resourceGroupName, String workspaceName, String purgeId); + Response getPurgeStatusWithResponse( + String resourceGroupName, String workspaceName, String purgeId, Context context); /** * Gets status of an ongoing purge operation. @@ -81,13 +83,11 @@ WorkspacePurgesPurgeResponse purgeWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param purgeId In a purge status request, this is the Id of the operation the status of which is returned. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return status of an ongoing purge operation along with {@link Response}. + * @return status of an ongoing purge operation. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getPurgeStatusWithResponse( - String resourceGroupName, String workspaceName, String purgeId, Context context); + WorkspacePurgeStatusResponseInner getPurgeStatus(String resourceGroupName, String workspaceName, String purgeId); } 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 5fcad1925d47..294b34cbd6d3 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 @@ -131,15 +131,13 @@ WorkspaceInner createOrUpdate( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param force Deletes the workspace without the recovery option. A workspace that was deleted with this flag - * cannot be recovered. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName, Boolean force); + SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName); /** * Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same @@ -160,22 +158,6 @@ WorkspaceInner createOrUpdate( SyncPoller, Void> beginDelete( String resourceGroupName, String workspaceName, Boolean force, Context context); - /** - * Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same - * subscription, resource group and location. The name is kept for 14 days and cannot be used for another workspace. - * To remove the workspace completely and release the name, use the force flag. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param force Deletes the workspace without the recovery option. A workspace that was deleted with this flag - * cannot be recovered. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String workspaceName, Boolean force); - /** * Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same * subscription, resource group and location. The name is kept for 14 days and cannot be used for another workspace. @@ -212,28 +194,28 @@ SyncPoller, Void> beginDelete( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a workspace instance. + * @return a workspace instance along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceInner getByResourceGroup(String resourceGroupName, String workspaceName); + Response getByResourceGroupWithResponse( + String resourceGroupName, String workspaceName, Context context); /** * Gets a workspace instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a workspace instance along with {@link Response}. + * @return a workspace instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String workspaceName, Context context); + WorkspaceInner getByResourceGroup(String resourceGroupName, String workspaceName); /** * Updates a workspace. @@ -241,13 +223,15 @@ Response getByResourceGroupWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param parameters The parameters required to patch a workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the top level Workspace resource container. + * @return the top level Workspace resource container along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspacePatch parameters); + Response updateWithResponse( + String resourceGroupName, String workspaceName, WorkspacePatch parameters, Context context); /** * Updates a workspace. @@ -255,13 +239,11 @@ Response getByResourceGroupWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param parameters The parameters required to patch a workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the top level Workspace resource container along with {@link Response}. + * @return the top level Workspace resource container. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, String workspaceName, WorkspacePatch parameters, Context context); + WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspacePatch parameters); } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/AvailableServiceTierInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/AvailableServiceTierInner.java index 4132fda7f657..da7c5d4e4aec 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/AvailableServiceTierInner.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/AvailableServiceTierInner.java @@ -42,19 +42,21 @@ public final class AvailableServiceTierInner { private Long defaultRetention; /* - * The capacity reservation level in GB per day. Returned for the Capacity - * Reservation Service Tier. + * The capacity reservation level in GB per day. Returned for the Capacity Reservation Service Tier. */ @JsonProperty(value = "capacityReservationLevel", access = JsonProperty.Access.WRITE_ONLY) private Long capacityReservationLevel; /* - * Time when the sku was last updated for the workspace. Returned for the - * Capacity Reservation Service Tier. + * Time when the sku was last updated for the workspace. Returned for the Capacity Reservation Service Tier. */ @JsonProperty(value = "lastSkuUpdate", access = JsonProperty.Access.WRITE_ONLY) private String lastSkuUpdate; + /** Creates an instance of AvailableServiceTierInner class. */ + public AvailableServiceTierInner() { + } + /** * Get the serviceTier property: The name of the Service Tier. * 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 ae700477cb0c..a4844ddaf9ad 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 @@ -38,6 +38,10 @@ public final class ClusterInner extends Resource { @JsonProperty(value = "properties") private ClusterProperties innerProperties; + /** Creates an instance of ClusterInner class. */ + public ClusterInner() { + } + /** * Get the identity property: The identity of the resource. * 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 index f433e3425339..f71aeff0c897 100644 --- 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 @@ -24,6 +24,10 @@ public final class ClusterPatchProperties { @JsonProperty(value = "billingType") private BillingType billingType; + /** Creates an instance of ClusterPatchProperties class. */ + public ClusterPatchProperties() { + } + /** * Get the keyVaultProperties property: The associated key properties. * 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 index 8a7695d33430..4a0567dcf169 100644 --- 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 @@ -29,17 +29,16 @@ public final class ClusterProperties { private ClusterEntityStatus provisioningState; /* - * Configures whether cluster will use double encryption. This Property can - * not be modified after cluster creation. Default value is 'true' + * 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. + * 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; @@ -80,6 +79,10 @@ public final class ClusterProperties { @JsonProperty(value = "capacityReservationProperties") private CapacityReservationProperties capacityReservationProperties; + /** Creates an instance of ClusterProperties class. */ + public ClusterProperties() { + } + /** * Get the clusterId property: The ID associated with the cluster. * 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 ddca04c9f767..771996fa0660 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 @@ -19,6 +19,10 @@ public final class DataExportInner extends ProxyResource { @JsonProperty(value = "properties") private DataExportProperties innerProperties; + /** Creates an instance of DataExportInner class. */ + public DataExportInner() { + } + /** * Get the innerProperties property: data export properties. * 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 index 96fff01a2a70..e1889cfba6a6 100644 --- 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 @@ -49,6 +49,10 @@ public final class DataExportProperties { @JsonProperty(value = "lastModifiedDate") private String lastModifiedDate; + /** Creates an instance of DataExportProperties class. */ + public DataExportProperties() { + } + /** * Get the dataExportId property: The data export rule ID. * 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 ef09393faf1b..17661a524998 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 @@ -16,8 +16,7 @@ @Fluent public final class DataSourceInner extends ProxyResource { /* - * The data source properties in raw json format, each kind of data source - * have it's own schema. + * The data source properties in raw json format, each kind of data source have it's own schema. */ @JsonProperty(value = "properties", required = true) private Object properties; @@ -41,6 +40,10 @@ public final class DataSourceInner extends ProxyResource { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; + /** Creates an instance of DataSourceInner class. */ + public DataSourceInner() { + } + /** * Get the properties property: The data source properties in raw json format, each kind of data source have it's * own schema. 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 index 4ae7e6fabac3..f45bb272ced2 100644 --- 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 @@ -13,8 +13,7 @@ @Fluent public final class Destination { /* - * The destination resource ID. This can be copied from the Properties - * entry of the destination resource in Azure. + * 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; @@ -31,6 +30,10 @@ public final class Destination { @JsonProperty(value = "metaData") private DestinationMetadata innerMetadata; + /** Creates an instance of Destination class. */ + public Destination() { + } + /** * Get the resourceId property: The destination resource ID. This can be copied from the Properties entry of the * destination resource in Azure. 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 index d7c0bbeb3296..a71a2f420a08 100644 --- 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 @@ -11,12 +11,15 @@ @Fluent public final class DestinationMetadata { /* - * Optional. Allows to define an Event Hub name. Not applicable when - * destination is Storage Account. + * Optional. Allows to define an Event Hub name. Not applicable when destination is Storage Account. */ @JsonProperty(value = "eventHubName") private String eventHubName; + /** Creates an instance of DestinationMetadata class. */ + public DestinationMetadata() { + } + /** * Get the eventHubName property: Optional. Allows to define an Event Hub name. Not applicable when destination is * Storage Account. diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/IntelligencePackInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/IntelligencePackInner.java index 6c8601f08ee9..fc1427fe3d6f 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/IntelligencePackInner.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/IntelligencePackInner.java @@ -28,6 +28,10 @@ public final class IntelligencePackInner { @JsonProperty(value = "displayName") private String displayName; + /** Creates an instance of IntelligencePackInner class. */ + public IntelligencePackInner() { + } + /** * Get the name property: The name of the intelligence pack. * 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 c8784c190106..6650a858eb00 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 @@ -28,6 +28,10 @@ public final class LinkedServiceInner extends ProxyResource { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; + /** Creates an instance of LinkedServiceInner class. */ + public LinkedServiceInner() { + } + /** * Get the innerProperties property: The properties of the linked service. * 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 index f04eb7c07045..22907f0611d6 100644 --- 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 @@ -12,15 +12,15 @@ @Fluent public final class 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 + * 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 + * 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; @@ -31,6 +31,10 @@ public final class LinkedServiceProperties { @JsonProperty(value = "provisioningState") private LinkedServiceEntityStatus provisioningState; + /** Creates an instance of LinkedServiceProperties class. */ + public LinkedServiceProperties() { + } + /** * 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. 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 index 618daa0a2c8d..8c4c86019e9b 100644 --- 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 @@ -24,6 +24,10 @@ public final class LinkedStorageAccountsProperties { @JsonProperty(value = "storageAccountIds") private List storageAccountIds; + /** Creates an instance of LinkedStorageAccountsProperties class. */ + public LinkedStorageAccountsProperties() { + } + /** * Get the dataSourceType property: Linked storage accounts type. * 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 555598d1846f..ce18fc699452 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 @@ -20,6 +20,10 @@ public final class LinkedStorageAccountsResourceInner extends ProxyResource { @JsonProperty(value = "properties", required = true) private LinkedStorageAccountsProperties innerProperties = new LinkedStorageAccountsProperties(); + /** Creates an instance of LinkedStorageAccountsResourceInner class. */ + public LinkedStorageAccountsResourceInner() { + } + /** * Get the innerProperties property: Linked storage accounts properties. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/LogAnalyticsQueryPackInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/LogAnalyticsQueryPackInner.java index 7d670653ab79..e111cbbedc2e 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/LogAnalyticsQueryPackInner.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/LogAnalyticsQueryPackInner.java @@ -20,6 +20,10 @@ public final class LogAnalyticsQueryPackInner extends QueryPacksResource { @JsonProperty(value = "properties", required = true) private LogAnalyticsQueryPackProperties innerProperties = new LogAnalyticsQueryPackProperties(); + /** Creates an instance of LogAnalyticsQueryPackInner class. */ + public LogAnalyticsQueryPackInner() { + } + /** * Get the innerProperties property: Properties that define a Log Analytics QueryPack resource. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/LogAnalyticsQueryPackProperties.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/LogAnalyticsQueryPackProperties.java index d569862c247e..b89381493b02 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/LogAnalyticsQueryPackProperties.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/LogAnalyticsQueryPackProperties.java @@ -30,14 +30,17 @@ public final class LogAnalyticsQueryPackProperties { private OffsetDateTime timeModified; /* - * Current state of this QueryPack: whether or not is has been provisioned - * within the resource group it is defined. Users cannot change this value - * but are able to read from it. Values will include Succeeded, Deploying, - * Canceled, and Failed. + * Current state of this QueryPack: whether or not is has been provisioned within the resource group it is defined. + * Users cannot change this value but are able to read from it. Values will include Succeeded, Deploying, Canceled, + * and Failed. */ @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private String provisioningState; + /** Creates an instance of LogAnalyticsQueryPackProperties class. */ + public LogAnalyticsQueryPackProperties() { + } + /** * Get the queryPackId property: The unique ID of your application. This field cannot be changed. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/LogAnalyticsQueryPackQueryInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/LogAnalyticsQueryPackQueryInner.java index 74711b47452f..08b281fdfc99 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/LogAnalyticsQueryPackQueryInner.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/LogAnalyticsQueryPackQueryInner.java @@ -21,6 +21,10 @@ public final class LogAnalyticsQueryPackQueryInner extends AzureResourceProperti @JsonProperty(value = "properties") private LogAnalyticsQueryPackQueryProperties innerProperties; + /** Creates an instance of LogAnalyticsQueryPackQueryInner class. */ + public LogAnalyticsQueryPackQueryInner() { + } + /** * Get the innerProperties property: Properties that define an Log Analytics QueryPack-Query resource. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/LogAnalyticsQueryPackQueryProperties.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/LogAnalyticsQueryPackQueryProperties.java index 97579626b26d..23713b8245b9 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/LogAnalyticsQueryPackQueryProperties.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/LogAnalyticsQueryPackQueryProperties.java @@ -77,6 +77,10 @@ public final class LogAnalyticsQueryPackQueryProperties { @JsonProperty(value = "properties") private Object properties; + /** Creates an instance of LogAnalyticsQueryPackQueryProperties class. */ + public LogAnalyticsQueryPackQueryProperties() { + } + /** * Get the id property: The unique ID of your application. This field cannot be changed. * 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 6817f85dbcd3..88c9e777a53d 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 @@ -17,6 +17,10 @@ public final class ManagementGroupInner { @JsonProperty(value = "properties") private ManagementGroupProperties innerProperties; + /** Creates an instance of ManagementGroupInner class. */ + public ManagementGroupInner() { + } + /** * Get the innerProperties property: The properties of the management group. * 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 index f9f02fa9fa50..566b9feb29c1 100644 --- 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 @@ -18,8 +18,7 @@ public final class ManagementGroupProperties { private Integer serverCount; /* - * Gets or sets a value indicating whether the management group is a - * gateway. + * Gets or sets a value indicating whether the management group is a gateway. */ @JsonProperty(value = "isGateway") private Boolean isGateway; @@ -60,6 +59,10 @@ public final class ManagementGroupProperties { @JsonProperty(value = "sku") private String sku; + /** Creates an instance of ManagementGroupProperties class. */ + public ManagementGroupProperties() { + } + /** * Get the serverCount property: The number of servers connected to the management group. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/OperationInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/OperationInner.java index 2a2c31edd633..659a335a92b5 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/OperationInner.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/OperationInner.java @@ -23,6 +23,10 @@ public final class OperationInner { @JsonProperty(value = "display") private OperationDisplay display; + /** Creates an instance of OperationInner class. */ + public OperationInner() { + } + /** * Get the name property: Operation name: {provider}/{resource}/{operation}. * 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 191eee031c03..e159ebd4d5f0 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 @@ -42,11 +42,17 @@ public final class OperationStatusInner { private String status; /* - * Error response The error detail of the operation if any. + * Error response + * + * The error detail of the operation if any. */ @JsonProperty(value = "error") private ManagementError error; + /** Creates an instance of OperationStatusInner class. */ + public OperationStatusInner() { + } + /** * Get the id property: The operation Id. * @@ -148,7 +154,9 @@ public OperationStatusInner withStatus(String status) { } /** - * Get the error property: Error response 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. */ @@ -157,7 +165,9 @@ public ManagementError error() { } /** - * Set the error property: Error response 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 3a6bd818875c..c9aa876c5556 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 @@ -15,8 +15,7 @@ @Fluent public final class SavedSearchInner extends ProxyResource { /* - * The ETag of the saved search. To override an existing saved search, use - * "*" or specify the current Etag + * The ETag of the saved search. To override an existing saved search, use "*" or specify the current Etag */ @JsonProperty(value = "etag") private String etag; @@ -27,6 +26,10 @@ public final class SavedSearchInner extends ProxyResource { @JsonProperty(value = "properties", required = true) private SavedSearchProperties innerProperties = new SavedSearchProperties(); + /** Creates an instance of SavedSearchInner class. */ + public SavedSearchInner() { + } + /** * Get the etag property: The ETag of the saved search. To override an existing saved search, use "*" or specify the * current Etag. 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 index 5bf7644a8ee6..f9afdfa34b8c 100644 --- 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 @@ -14,8 +14,7 @@ @Fluent public final class SavedSearchProperties { /* - * The category of the saved search. This helps the user to find a saved - * search faster. + * The category of the saved search. This helps the user to find a saved search faster. */ @JsonProperty(value = "category", required = true) private String category; @@ -39,18 +38,15 @@ public final class SavedSearchProperties { 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. + * 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. + * The version number of the query language. The current version is 2 and is the default. */ @JsonProperty(value = "version") private Long version; @@ -61,6 +57,10 @@ public final class SavedSearchProperties { @JsonProperty(value = "tags") private List tags; + /** Creates an instance of SavedSearchProperties class. */ + public SavedSearchProperties() { + } + /** * Get the category property: The category of the saved search. This helps the user to find a saved search faster. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/SavedSearchesListResultInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/SavedSearchesListResultInner.java index 32adb847cef1..a8106ffc56dc 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/SavedSearchesListResultInner.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/SavedSearchesListResultInner.java @@ -17,6 +17,10 @@ public final class SavedSearchesListResultInner { @JsonProperty(value = "value") private List value; + /** Creates an instance of SavedSearchesListResultInner class. */ + public SavedSearchesListResultInner() { + } + /** * Get the value property: The array of result values. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/SearchGetSchemaResponseInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/SearchGetSchemaResponseInner.java index 7f4a2de48647..a40804920c04 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/SearchGetSchemaResponseInner.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/SearchGetSchemaResponseInner.java @@ -25,6 +25,10 @@ public final class SearchGetSchemaResponseInner { @JsonProperty(value = "value") private List value; + /** Creates an instance of SearchGetSchemaResponseInner class. */ + public SearchGetSchemaResponseInner() { + } + /** * Get the metadata property: The metadata from search results. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/SharedKeysInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/SharedKeysInner.java index 8409043f1466..90428991ddbd 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/SharedKeysInner.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/SharedKeysInner.java @@ -22,6 +22,10 @@ public final class SharedKeysInner { @JsonProperty(value = "secondarySharedKey") private String secondarySharedKey; + /** Creates an instance of SharedKeysInner class. */ + public SharedKeysInner() { + } + /** * Get the primarySharedKey property: The primary shared key of a workspace. * 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 ff67299ddb48..ad515cd47604 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 @@ -35,6 +35,10 @@ public final class StorageInsightInner extends ProxyResource { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; + /** Creates an instance of StorageInsightInner class. */ + public StorageInsightInner() { + } + /** * Get the innerProperties property: Storage insight properties. * 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 index f3cf405b44c8..45bc7652ec79 100644 --- 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 @@ -38,6 +38,10 @@ public final class StorageInsightProperties { @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) private StorageInsightStatus status; + /** Creates an instance of StorageInsightProperties class. */ + public StorageInsightProperties() { + } + /** * Get the containers property: The names of the blob containers that the workspace should read. * 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 c45415a51ff6..9823036cc0bc 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 @@ -30,6 +30,10 @@ public final class TableInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemDataAutoGenerated systemData; + /** Creates an instance of TableInner class. */ + public TableInner() { + } + /** * Get the innerProperties property: Table's properties. * @@ -163,20 +167,6 @@ 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. * @@ -243,6 +233,26 @@ public ProvisioningStateEnum provisioningState() { return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } + /** + * Get the retentionInDaysAsDefault property: True - Value originates from workspace retention in days, False - + * Customer specific. + * + * @return the retentionInDaysAsDefault value. + */ + public Boolean retentionInDaysAsDefault() { + return this.innerProperties() == null ? null : this.innerProperties().retentionInDaysAsDefault(); + } + + /** + * Get the totalRetentionInDaysAsDefault property: True - Value originates from retention in days, False - Customer + * specific. + * + * @return the totalRetentionInDaysAsDefault value. + */ + public Boolean totalRetentionInDaysAsDefault() { + return this.innerProperties() == null ? null : this.innerProperties().totalRetentionInDaysAsDefault(); + } + /** * Validates the instance. * 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 index cae44b73dc3d..c8d185b75df6 100644 --- 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 @@ -17,22 +17,21 @@ @Fluent public final class TableProperties { /* - * The table retention in days, between 4 and 730. Setting this property to - * -1 will default to the workspace retention. + * 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. + * 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) + * The table data archive retention in days. Calculated as (totalRetentionInDays-retentionInDays) */ @JsonProperty(value = "archiveRetentionInDays", access = JsonProperty.Access.WRITE_ONLY) private Integer archiveRetentionInDays; @@ -52,12 +51,11 @@ public final class TableProperties { /* * Search job execution statistics. */ - @JsonProperty(value = "resultStatistics") + @JsonProperty(value = "resultStatistics", access = JsonProperty.Access.WRITE_ONLY) private ResultStatistics resultStatistics; /* - * Instruct the system how to handle and charge the logs ingested to this - * table. + * Instruct the system how to handle and charge the logs ingested to this table. */ @JsonProperty(value = "plan") private TablePlanEnum plan; @@ -75,13 +73,28 @@ public final class TableProperties { 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. + * 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; + /* + * True - Value originates from workspace retention in days, False - Customer specific. + */ + @JsonProperty(value = "retentionInDaysAsDefault", access = JsonProperty.Access.WRITE_ONLY) + private Boolean retentionInDaysAsDefault; + + /* + * True - Value originates from retention in days, False - Customer specific. + */ + @JsonProperty(value = "totalRetentionInDaysAsDefault", access = JsonProperty.Access.WRITE_ONLY) + private Boolean totalRetentionInDaysAsDefault; + + /** Creates an instance of TableProperties class. */ + public TableProperties() { + } + /** * Get the retentionInDays property: The table retention in days, between 4 and 730. Setting this property to -1 * will default to the workspace retention. @@ -185,17 +198,6 @@ 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. * @@ -256,6 +258,26 @@ public ProvisioningStateEnum provisioningState() { return this.provisioningState; } + /** + * Get the retentionInDaysAsDefault property: True - Value originates from workspace retention in days, False - + * Customer specific. + * + * @return the retentionInDaysAsDefault value. + */ + public Boolean retentionInDaysAsDefault() { + return this.retentionInDaysAsDefault; + } + + /** + * Get the totalRetentionInDaysAsDefault property: True - Value originates from retention in days, False - Customer + * specific. + * + * @return the totalRetentionInDaysAsDefault value. + */ + public Boolean totalRetentionInDaysAsDefault() { + return this.totalRetentionInDaysAsDefault; + } + /** * Validates the instance. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/UsageMetricInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/UsageMetricInner.java index 2eaa34c2b61c..297cc0e91859 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/UsageMetricInner.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/UsageMetricInner.java @@ -43,12 +43,15 @@ public final class UsageMetricInner { private OffsetDateTime nextResetTime; /* - * The quota period that determines the length of time between value - * resets. + * The quota period that determines the length of time between value resets. */ @JsonProperty(value = "quotaPeriod") private String quotaPeriod; + /** Creates an instance of UsageMetricInner class. */ + public UsageMetricInner() { + } + /** * Get the name property: The name of the metric. * 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 67b245e380ca..596df080d4e0 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 @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; +import com.azure.resourcemanager.loganalytics.models.Identity; import com.azure.resourcemanager.loganalytics.models.PrivateLinkScopedResource; import com.azure.resourcemanager.loganalytics.models.PublicNetworkAccessType; import com.azure.resourcemanager.loganalytics.models.SystemDataAutoGenerated; @@ -26,6 +27,12 @@ public final class WorkspaceInner extends Resource { @JsonProperty(value = "properties") private WorkspaceProperties innerProperties; + /* + * The identity of the resource. + */ + @JsonProperty(value = "identity") + private Identity identity; + /* * Metadata pertaining to creation and last modification of the resource. */ @@ -33,11 +40,15 @@ public final class WorkspaceInner extends Resource { private SystemDataAutoGenerated systemData; /* - * The ETag of the workspace. + * The etag of the workspace. */ - @JsonProperty(value = "eTag") + @JsonProperty(value = "etag") private String etag; + /** Creates an instance of WorkspaceInner class. */ + public WorkspaceInner() { + } + /** * Get the innerProperties property: Workspace properties. * @@ -47,6 +58,26 @@ private WorkspaceProperties innerProperties() { return this.innerProperties; } + /** + * Get the identity property: The identity of the resource. + * + * @return the identity value. + */ + public Identity identity() { + return this.identity; + } + + /** + * Set the identity property: The identity of the resource. + * + * @param identity the identity value to set. + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withIdentity(Identity identity) { + this.identity = identity; + return this; + } + /** * Get the systemData property: Metadata pertaining to creation and last modification of the resource. * @@ -57,7 +88,7 @@ public SystemDataAutoGenerated systemData() { } /** - * Get the etag property: The ETag of the workspace. + * Get the etag property: The etag of the workspace. * * @return the etag value. */ @@ -66,7 +97,7 @@ public String etag() { } /** - * Set the etag property: The ETag of the workspace. + * Set the etag property: The etag of the workspace. * * @param etag the etag value to set. * @return the WorkspaceInner object itself. @@ -334,6 +365,9 @@ public void validate() { if (innerProperties() != null) { innerProperties().validate(); } + if (identity() != null) { + identity().validate(); + } if (systemData() != null) { systemData().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 index 6891c10c0cc8..74b976aa3078 100644 --- 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 @@ -24,8 +24,7 @@ public final class WorkspaceProperties { private WorkspaceEntityStatus provisioningState; /* - * This is a read-only property. Represents the ID associated with the - * workspace. + * This is a read-only property. Represents the ID associated with the workspace. */ @JsonProperty(value = "customerId", access = JsonProperty.Access.WRITE_ONLY) private String customerId; @@ -37,8 +36,8 @@ public final class WorkspaceProperties { private WorkspaceSku sku; /* - * The workspace data retention in days. Allowed values are per pricing - * plan. See pricing tiers documentation for details. + * The workspace data retention in days. Allowed values are per pricing plan. See pricing tiers documentation for + * details. */ @JsonProperty(value = "retentionInDays") private Integer retentionInDays; @@ -74,8 +73,7 @@ public final class WorkspaceProperties { private PublicNetworkAccessType publicNetworkAccessForQuery; /* - * Indicates whether customer managed storage is mandatory for query - * management. + * Indicates whether customer managed storage is mandatory for query management. */ @JsonProperty(value = "forceCmkForQuery") private Boolean forceCmkForQuery; @@ -93,13 +91,16 @@ public final class WorkspaceProperties { private WorkspaceFeatures features; /* - * The resource ID of the default Data Collection Rule to use for this - * workspace. Expected format is - + * 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; + /** Creates an instance of WorkspaceProperties class. */ + public WorkspaceProperties() { + } + /** * Get the provisioningState property: The provisioning state of the workspace. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/WorkspacePurgeResponseInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/WorkspacePurgeResponseInner.java index 6da7d0706834..8fb347367da9 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/WorkspacePurgeResponseInner.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/WorkspacePurgeResponseInner.java @@ -17,6 +17,10 @@ public final class WorkspacePurgeResponseInner { @JsonProperty(value = "operationId", required = true) private String operationId; + /** Creates an instance of WorkspacePurgeResponseInner class. */ + public WorkspacePurgeResponseInner() { + } + /** * Get the operationId property: Id to use when querying for status for a particular purge operation. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/WorkspacePurgeStatusResponseInner.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/WorkspacePurgeStatusResponseInner.java index cb977373d861..a12fa03a5037 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/WorkspacePurgeStatusResponseInner.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/fluent/models/WorkspacePurgeStatusResponseInner.java @@ -18,6 +18,10 @@ public final class WorkspacePurgeStatusResponseInner { @JsonProperty(value = "status", required = true) private PurgeState status; + /** Creates an instance of WorkspacePurgeStatusResponseInner class. */ + public WorkspacePurgeStatusResponseInner() { + } + /** * Get the status property: Status of the operation represented by the requested Id. * 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 c90b10a29682..8e36bda6c755 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 @@ -52,7 +52,7 @@ public final class AvailableServiceTiersClientImpl implements AvailableServiceTi */ @Host("{$host}") @ServiceInterface(name = "OperationalInsightsM") - private interface AvailableServiceTiersService { + public interface AvailableServiceTiersService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -188,14 +188,16 @@ private Mono> listByWorkspaceAsync(String resour * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the available service tiers for the workspace. + * @return the available service tiers for the workspace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public List listByWorkspace(String resourceGroupName, String workspaceName) { - return listByWorkspaceAsync(resourceGroupName, workspaceName).block(); + public Response> listByWorkspaceWithResponse( + String resourceGroupName, String workspaceName, Context context) { + return listByWorkspaceWithResponseAsync(resourceGroupName, workspaceName, context).block(); } /** @@ -203,15 +205,13 @@ public List listByWorkspace(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the available service tiers for the workspace along with {@link Response}. + * @return the available service tiers for the workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response> listByWorkspaceWithResponse( - String resourceGroupName, String workspaceName, Context context) { - return listByWorkspaceWithResponseAsync(resourceGroupName, workspaceName, context).block(); + public List listByWorkspace(String resourceGroupName, String workspaceName) { + return listByWorkspaceWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/AvailableServiceTiersImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/AvailableServiceTiersImpl.java index 42572aaa7e5f..f8de2dfa0472 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/AvailableServiceTiersImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/AvailableServiceTiersImpl.java @@ -30,20 +30,6 @@ public AvailableServiceTiersImpl( this.serviceManager = serviceManager; } - public List listByWorkspace(String resourceGroupName, String workspaceName) { - List inner = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName); - if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new AvailableServiceTierImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } - } - public Response> listByWorkspaceWithResponse( String resourceGroupName, String workspaceName, Context context) { Response> inner = @@ -63,6 +49,20 @@ public Response> listByWorkspaceWithResponse( } } + public List listByWorkspace(String resourceGroupName, String workspaceName) { + List inner = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName); + if (inner != null) { + return Collections + .unmodifiableList( + inner + .stream() + .map(inner1 -> new AvailableServiceTierImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + private AvailableServiceTiersClient serviceClient() { return this.innerClient; } 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 3c1b58fdce40..2aab720f34bd 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 @@ -64,7 +64,7 @@ public final class ClustersClientImpl implements ClustersClient { */ @Host("{$host}") @ServiceInterface(name = "OperationalInsightsM") - private interface ClustersService { + public interface ClustersService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -646,7 +646,7 @@ private PollerFlux, ClusterInner> beginCreateOrUpdateAs @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ClusterInner> beginCreateOrUpdate( String resourceGroupName, String clusterName, ClusterInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, clusterName, parameters).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, clusterName, parameters).getSyncPoller(); } /** @@ -664,7 +664,7 @@ public SyncPoller, ClusterInner> beginCreateOrUpdate( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ClusterInner> beginCreateOrUpdate( String resourceGroupName, String clusterName, ClusterInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, clusterName, parameters, context).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, clusterName, parameters, context).getSyncPoller(); } /** @@ -887,7 +887,7 @@ private PollerFlux, Void> beginDeleteAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete(String resourceGroupName, String clusterName) { - return beginDeleteAsync(resourceGroupName, clusterName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, clusterName).getSyncPoller(); } /** @@ -904,7 +904,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String clusterName, Context context) { - return beginDeleteAsync(resourceGroupName, clusterName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, clusterName, context).getSyncPoller(); } /** @@ -1086,14 +1086,16 @@ private Mono getByResourceGroupAsync(String resourceGroupName, Str * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName Name of the Log Analytics Cluster. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Log Analytics cluster instance. + * @return a Log Analytics cluster instance along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ClusterInner getByResourceGroup(String resourceGroupName, String clusterName) { - return getByResourceGroupAsync(resourceGroupName, clusterName).block(); + public Response getByResourceGroupWithResponse( + String resourceGroupName, String clusterName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, clusterName, context).block(); } /** @@ -1101,16 +1103,14 @@ public ClusterInner getByResourceGroup(String resourceGroupName, String clusterN * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName Name of the Log Analytics Cluster. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Log Analytics cluster instance along with {@link Response}. + * @return a Log Analytics cluster instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String clusterName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, clusterName, context).block(); + public ClusterInner getByResourceGroup(String resourceGroupName, String clusterName) { + return getByResourceGroupWithResponse(resourceGroupName, clusterName, Context.NONE).getValue(); } /** @@ -1284,7 +1284,7 @@ private PollerFlux, ClusterInner> beginUpdateAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ClusterInner> beginUpdate( String resourceGroupName, String clusterName, ClusterPatch parameters) { - return beginUpdateAsync(resourceGroupName, clusterName, parameters).getSyncPoller(); + return this.beginUpdateAsync(resourceGroupName, clusterName, parameters).getSyncPoller(); } /** @@ -1302,7 +1302,7 @@ public SyncPoller, ClusterInner> beginUpdate( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ClusterInner> beginUpdate( String resourceGroupName, String clusterName, ClusterPatch parameters, Context context) { - return beginUpdateAsync(resourceGroupName, clusterName, parameters, context).getSyncPoller(); + return this.beginUpdateAsync(resourceGroupName, clusterName, parameters, context).getSyncPoller(); } /** @@ -1379,7 +1379,8 @@ public ClusterInner update(String resourceGroupName, String clusterName, Cluster /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1416,7 +1417,8 @@ private Mono> listByResourceGroupNextSinglePageAsync /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1453,7 +1455,8 @@ private Mono> listByResourceGroupNextSinglePageAsync /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1489,7 +1492,8 @@ private Mono> listNextSinglePageAsync(String nextLin /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ClustersImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ClustersImpl.java index 5ff0cdf56838..58a8394c06f9 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ClustersImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ClustersImpl.java @@ -55,15 +55,6 @@ public void delete(String resourceGroupName, String clusterName, Context context this.serviceClient().delete(resourceGroupName, clusterName, context); } - public Cluster getByResourceGroup(String resourceGroupName, String clusterName) { - ClusterInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, clusterName); - if (inner != null) { - return new ClusterImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getByResourceGroupWithResponse( String resourceGroupName, String clusterName, Context context) { Response inner = @@ -79,6 +70,15 @@ public Response getByResourceGroupWithResponse( } } + public Cluster getByResourceGroup(String resourceGroupName, String clusterName) { + ClusterInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, clusterName); + if (inner != null) { + return new ClusterImpl(inner, this.manager()); + } else { + return null; + } + } + public Cluster getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourcegroups"); if (resourceGroupName == null) { diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataExportsClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataExportsClientImpl.java index be43d7ff9cc1..b5d72117edc8 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataExportsClientImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataExportsClientImpl.java @@ -58,7 +58,7 @@ public final class DataExportsClientImpl implements DataExportsClient { */ @Host("{$host}") @ServiceInterface(name = "OperationalInsightsM") - private interface DataExportsService { + public interface DataExportsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -446,15 +446,21 @@ private Mono createOrUpdateAsync( * @param workspaceName The name of the workspace. * @param dataExportName The data export rule name. * @param parameters The parameters required to create or update a data export. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the top level data export resource container. + * @return the top level data export resource container along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DataExportInner createOrUpdate( - String resourceGroupName, String workspaceName, String dataExportName, DataExportInner parameters) { - return createOrUpdateAsync(resourceGroupName, workspaceName, dataExportName, parameters).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String dataExportName, + DataExportInner parameters, + Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, dataExportName, parameters, context) + .block(); } /** @@ -464,21 +470,16 @@ public DataExportInner createOrUpdate( * @param workspaceName The name of the workspace. * @param dataExportName The data export rule name. * @param parameters The parameters required to create or update a data export. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the top level data export resource container along with {@link Response}. + * @return the top level data export resource container. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String dataExportName, - DataExportInner parameters, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, dataExportName, parameters, context) - .block(); + public DataExportInner createOrUpdate( + String resourceGroupName, String workspaceName, String dataExportName, DataExportInner parameters) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, dataExportName, parameters, Context.NONE) + .getValue(); } /** @@ -610,14 +611,16 @@ private Mono getAsync(String resourceGroupName, String workspac * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataExportName The data export rule name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a data export instance. + * @return a data export instance along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DataExportInner get(String resourceGroupName, String workspaceName, String dataExportName) { - return getAsync(resourceGroupName, workspaceName, dataExportName).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String dataExportName, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, dataExportName, context).block(); } /** @@ -626,16 +629,14 @@ public DataExportInner get(String resourceGroupName, String workspaceName, Strin * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataExportName The data export rule name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a data export instance along with {@link Response}. + * @return a data export instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String dataExportName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, dataExportName, context).block(); + public DataExportInner get(String resourceGroupName, String workspaceName, String dataExportName) { + return getWithResponse(resourceGroupName, workspaceName, dataExportName, Context.NONE).getValue(); } /** @@ -767,13 +768,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataExportName The data export rule name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String dataExportName) { - deleteAsync(resourceGroupName, workspaceName, dataExportName).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String dataExportName, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, dataExportName, context).block(); } /** @@ -782,15 +786,12 @@ public void delete(String resourceGroupName, String workspaceName, String dataEx * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataExportName The data export rule name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String dataExportName, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, dataExportName, context).block(); + public void delete(String resourceGroupName, String workspaceName, String dataExportName) { + deleteWithResponse(resourceGroupName, workspaceName, dataExportName, Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataExportsImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataExportsImpl.java index 4dd71cdbc75e..a74341381016 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataExportsImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataExportsImpl.java @@ -38,15 +38,6 @@ public PagedIterable listByWorkspace(String resourceGroupName, Strin return Utils.mapPage(inner, inner1 -> new DataExportImpl(inner1, this.manager())); } - public DataExport get(String resourceGroupName, String workspaceName, String dataExportName) { - DataExportInner inner = this.serviceClient().get(resourceGroupName, workspaceName, dataExportName); - if (inner != null) { - return new DataExportImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String dataExportName, Context context) { Response inner = @@ -62,8 +53,13 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String dataExportName) { - this.serviceClient().delete(resourceGroupName, workspaceName, dataExportName); + public DataExport get(String resourceGroupName, String workspaceName, String dataExportName) { + DataExportInner inner = this.serviceClient().get(resourceGroupName, workspaceName, dataExportName); + if (inner != null) { + return new DataExportImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -71,6 +67,10 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, dataExportName, context); } + public void delete(String resourceGroupName, String workspaceName, String dataExportName) { + this.serviceClient().delete(resourceGroupName, workspaceName, dataExportName); + } + public DataExport getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourcegroups"); if (resourceGroupName == null) { diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataSourcesClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataSourcesClientImpl.java index bfa155ced4b8..f05db3fb330e 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataSourcesClientImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataSourcesClientImpl.java @@ -58,7 +58,7 @@ public final class DataSourcesClientImpl implements DataSourcesClient { */ @Host("{$host}") @ServiceInterface(name = "OperationalInsightsM") - private interface DataSourcesService { + public interface DataSourcesService { @Headers({"Content-Type: application/json"}) @Put( "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -285,15 +285,21 @@ private Mono createOrUpdateAsync( * @param workspaceName The name of the workspace. * @param dataSourceName The name of the datasource resource. * @param parameters The parameters required to create or update a datasource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return datasources under OMS Workspace. + * @return datasources under OMS Workspace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DataSourceInner createOrUpdate( - String resourceGroupName, String workspaceName, String dataSourceName, DataSourceInner parameters) { - return createOrUpdateAsync(resourceGroupName, workspaceName, dataSourceName, parameters).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String dataSourceName, + DataSourceInner parameters, + Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, dataSourceName, parameters, context) + .block(); } /** @@ -303,21 +309,16 @@ public DataSourceInner createOrUpdate( * @param workspaceName The name of the workspace. * @param dataSourceName The name of the datasource resource. * @param parameters The parameters required to create or update a datasource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return datasources under OMS Workspace along with {@link Response}. + * @return datasources under OMS Workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String dataSourceName, - DataSourceInner parameters, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, dataSourceName, parameters, context) - .block(); + public DataSourceInner createOrUpdate( + String resourceGroupName, String workspaceName, String dataSourceName, DataSourceInner parameters) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, dataSourceName, parameters, Context.NONE) + .getValue(); } /** @@ -445,13 +446,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataSourceName Name of the datasource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String dataSourceName) { - deleteAsync(resourceGroupName, workspaceName, dataSourceName).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String dataSourceName, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, dataSourceName, context).block(); } /** @@ -460,16 +464,13 @@ public void delete(String resourceGroupName, String workspaceName, String dataSo * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataSourceName Name of the datasource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String dataSourceName, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, dataSourceName, context).block(); + public void delete(String resourceGroupName, String workspaceName, String dataSourceName) { + deleteWithResponse(resourceGroupName, workspaceName, dataSourceName, Context.NONE); } /** @@ -601,14 +602,16 @@ private Mono getAsync(String resourceGroupName, String workspac * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataSourceName Name of the datasource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a datasource instance. + * @return a datasource instance along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DataSourceInner get(String resourceGroupName, String workspaceName, String dataSourceName) { - return getAsync(resourceGroupName, workspaceName, dataSourceName).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String dataSourceName, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, dataSourceName, context).block(); } /** @@ -617,16 +620,14 @@ public DataSourceInner get(String resourceGroupName, String workspaceName, Strin * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataSourceName Name of the datasource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a datasource instance along with {@link Response}. + * @return a datasource instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String dataSourceName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, dataSourceName, context).block(); + public DataSourceInner get(String resourceGroupName, String workspaceName, String dataSourceName) { + return getWithResponse(resourceGroupName, workspaceName, dataSourceName, Context.NONE).getValue(); } /** @@ -865,7 +866,8 @@ public PagedIterable listByWorkspace( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -901,7 +903,8 @@ private Mono> listByWorkspaceNextSinglePageAsync( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataSourcesImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataSourcesImpl.java index 35598f6b96fd..b7f253e931fc 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataSourcesImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DataSourcesImpl.java @@ -27,22 +27,13 @@ public DataSourcesImpl( this.serviceManager = serviceManager; } - public void delete(String resourceGroupName, String workspaceName, String dataSourceName) { - this.serviceClient().delete(resourceGroupName, workspaceName, dataSourceName); - } - public Response deleteWithResponse( String resourceGroupName, String workspaceName, String dataSourceName, Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, dataSourceName, context); } - public DataSource get(String resourceGroupName, String workspaceName, String dataSourceName) { - DataSourceInner inner = this.serviceClient().get(resourceGroupName, workspaceName, dataSourceName); - if (inner != null) { - return new DataSourceImpl(inner, this.manager()); - } else { - return null; - } + public void delete(String resourceGroupName, String workspaceName, String dataSourceName) { + this.serviceClient().delete(resourceGroupName, workspaceName, dataSourceName); } public Response getWithResponse( @@ -60,6 +51,15 @@ public Response getWithResponse( } } + public DataSource get(String resourceGroupName, String workspaceName, String dataSourceName) { + DataSourceInner inner = this.serviceClient().get(resourceGroupName, workspaceName, dataSourceName); + if (inner != null) { + return new DataSourceImpl(inner, this.manager()); + } else { + return null; + } + } + public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName, String filter) { PagedIterable inner = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName, filter); diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DeletedWorkspacesClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DeletedWorkspacesClientImpl.java index 173adfd4c54a..31177b312816 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DeletedWorkspacesClientImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/DeletedWorkspacesClientImpl.java @@ -55,7 +55,7 @@ public final class DeletedWorkspacesClientImpl implements DeletedWorkspacesClien */ @Host("{$host}") @ServiceInterface(name = "OperationalInsightsM") - private interface DeletedWorkspacesService { + public interface DeletedWorkspacesService { @Headers({"Content-Type: application/json"}) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/deletedWorkspaces") @ExpectedResponses({200}) @@ -104,7 +104,7 @@ private Mono> listSinglePageAsync() { new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2021-12-01-preview"; + final String apiVersion = "2022-10-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -142,7 +142,7 @@ private Mono> listSinglePageAsync(Context context) new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2021-12-01-preview"; + final String apiVersion = "2022-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -237,7 +237,7 @@ private Mono> listByResourceGroupSinglePageAsync(S new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2021-12-01-preview"; + final String apiVersion = "2022-10-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -287,7 +287,7 @@ private Mono> listByResourceGroupSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2021-12-01-preview"; + final String apiVersion = "2022-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/GatewaysClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/GatewaysClientImpl.java index c6840162bcb7..2c5c263c606c 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/GatewaysClientImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/GatewaysClientImpl.java @@ -47,7 +47,7 @@ public final class GatewaysClientImpl implements GatewaysClient { */ @Host("{$host}") @ServiceInterface(name = "OperationalInsightsM") - private interface GatewaysService { + public interface GatewaysService { @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) @Delete( "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -188,13 +188,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param gatewayId The Log Analytics gateway Id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String gatewayId) { - deleteAsync(resourceGroupName, workspaceName, gatewayId).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String gatewayId, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, gatewayId, context).block(); } /** @@ -203,15 +206,12 @@ public void delete(String resourceGroupName, String workspaceName, String gatewa * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param gatewayId The Log Analytics gateway Id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String gatewayId, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, gatewayId, context).block(); + public void delete(String resourceGroupName, String workspaceName, String gatewayId) { + deleteWithResponse(resourceGroupName, workspaceName, gatewayId, Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/GatewaysImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/GatewaysImpl.java index 3c553b69f09a..523987cbc6ec 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/GatewaysImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/GatewaysImpl.java @@ -23,15 +23,15 @@ public GatewaysImpl( this.serviceManager = serviceManager; } - public void delete(String resourceGroupName, String workspaceName, String gatewayId) { - this.serviceClient().delete(resourceGroupName, workspaceName, gatewayId); - } - public Response deleteWithResponse( String resourceGroupName, String workspaceName, String gatewayId, Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, gatewayId, context); } + public void delete(String resourceGroupName, String workspaceName, String gatewayId) { + this.serviceClient().delete(resourceGroupName, workspaceName, gatewayId); + } + private GatewaysClient serviceClient() { return this.innerClient; } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/IntelligencePacksClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/IntelligencePacksClientImpl.java index 457ff0f3d307..b0c91fabd919 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/IntelligencePacksClientImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/IntelligencePacksClientImpl.java @@ -52,7 +52,7 @@ public final class IntelligencePacksClientImpl implements IntelligencePacksClien */ @Host("{$host}") @ServiceInterface(name = "OperationalInsightsM") - private interface IntelligencePacksService { + public interface IntelligencePacksService { @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -226,13 +226,16 @@ private Mono disableAsync(String resourceGroupName, String workspaceName, * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param intelligencePackName The name of the intelligence pack to be disabled. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void disable(String resourceGroupName, String workspaceName, String intelligencePackName) { - disableAsync(resourceGroupName, workspaceName, intelligencePackName).block(); + public Response disableWithResponse( + String resourceGroupName, String workspaceName, String intelligencePackName, Context context) { + return disableWithResponseAsync(resourceGroupName, workspaceName, intelligencePackName, context).block(); } /** @@ -241,16 +244,13 @@ public void disable(String resourceGroupName, String workspaceName, String intel * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param intelligencePackName The name of the intelligence pack to be disabled. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response disableWithResponse( - String resourceGroupName, String workspaceName, String intelligencePackName, Context context) { - return disableWithResponseAsync(resourceGroupName, workspaceName, intelligencePackName, context).block(); + public void disable(String resourceGroupName, String workspaceName, String intelligencePackName) { + disableWithResponse(resourceGroupName, workspaceName, intelligencePackName, Context.NONE); } /** @@ -380,13 +380,16 @@ private Mono enableAsync(String resourceGroupName, String workspaceName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param intelligencePackName The name of the intelligence pack to be enabled. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void enable(String resourceGroupName, String workspaceName, String intelligencePackName) { - enableAsync(resourceGroupName, workspaceName, intelligencePackName).block(); + public Response enableWithResponse( + String resourceGroupName, String workspaceName, String intelligencePackName, Context context) { + return enableWithResponseAsync(resourceGroupName, workspaceName, intelligencePackName, context).block(); } /** @@ -395,16 +398,13 @@ public void enable(String resourceGroupName, String workspaceName, String intell * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param intelligencePackName The name of the intelligence pack to be enabled. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response enableWithResponse( - String resourceGroupName, String workspaceName, String intelligencePackName, Context context) { - return enableWithResponseAsync(resourceGroupName, workspaceName, intelligencePackName, context).block(); + public void enable(String resourceGroupName, String workspaceName, String intelligencePackName) { + enableWithResponse(resourceGroupName, workspaceName, intelligencePackName, Context.NONE); } /** @@ -523,14 +523,16 @@ private Mono> listAsync(String resourceGroupName, St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of IntelligencePack. + * @return array of IntelligencePack along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public List list(String resourceGroupName, String workspaceName) { - return listAsync(resourceGroupName, workspaceName).block(); + public Response> listWithResponse( + String resourceGroupName, String workspaceName, Context context) { + return listWithResponseAsync(resourceGroupName, workspaceName, context).block(); } /** @@ -538,15 +540,13 @@ public List list(String resourceGroupName, String workspa * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return array of IntelligencePack along with {@link Response}. + * @return array of IntelligencePack. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response> listWithResponse( - String resourceGroupName, String workspaceName, Context context) { - return listWithResponseAsync(resourceGroupName, workspaceName, context).block(); + public List list(String resourceGroupName, String workspaceName) { + return listWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/IntelligencePacksImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/IntelligencePacksImpl.java index 98ab039e04fa..329af57adabd 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/IntelligencePacksImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/IntelligencePacksImpl.java @@ -30,10 +30,6 @@ public IntelligencePacksImpl( this.serviceManager = serviceManager; } - public void disable(String resourceGroupName, String workspaceName, String intelligencePackName) { - this.serviceClient().disable(resourceGroupName, workspaceName, intelligencePackName); - } - public Response disableWithResponse( String resourceGroupName, String workspaceName, String intelligencePackName, Context context) { return this @@ -41,8 +37,8 @@ public Response disableWithResponse( .disableWithResponse(resourceGroupName, workspaceName, intelligencePackName, context); } - public void enable(String resourceGroupName, String workspaceName, String intelligencePackName) { - this.serviceClient().enable(resourceGroupName, workspaceName, intelligencePackName); + public void disable(String resourceGroupName, String workspaceName, String intelligencePackName) { + this.serviceClient().disable(resourceGroupName, workspaceName, intelligencePackName); } public Response enableWithResponse( @@ -50,18 +46,8 @@ public Response enableWithResponse( return this.serviceClient().enableWithResponse(resourceGroupName, workspaceName, intelligencePackName, context); } - public List list(String resourceGroupName, String workspaceName) { - List inner = this.serviceClient().list(resourceGroupName, workspaceName); - if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new IntelligencePackImpl(inner1, this.manager())) - .collect(Collectors.toList())); - } else { - return Collections.emptyList(); - } + public void enable(String resourceGroupName, String workspaceName, String intelligencePackName) { + this.serviceClient().enable(resourceGroupName, workspaceName, intelligencePackName); } public Response> listWithResponse( @@ -83,6 +69,20 @@ public Response> listWithResponse( } } + public List list(String resourceGroupName, String workspaceName) { + List inner = this.serviceClient().list(resourceGroupName, workspaceName); + if (inner != null) { + return Collections + .unmodifiableList( + inner + .stream() + .map(inner1 -> new IntelligencePackImpl(inner1, this.manager())) + .collect(Collectors.toList())); + } else { + return Collections.emptyList(); + } + } + private IntelligencePacksClient serviceClient() { return this.innerClient; } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/LinkedServicesClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/LinkedServicesClientImpl.java index a2f412fa6ec4..5c1559c5ca90 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/LinkedServicesClientImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/LinkedServicesClientImpl.java @@ -63,7 +63,7 @@ public final class LinkedServicesClientImpl implements LinkedServicesClient { */ @Host("{$host}") @ServiceInterface(name = "OperationalInsightsM") - private interface LinkedServicesService { + public interface LinkedServicesService { @Headers({"Content-Type: application/json"}) @Put( "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -328,7 +328,8 @@ private PollerFlux, LinkedServiceInner> beginCrea @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, LinkedServiceInner> beginCreateOrUpdate( String resourceGroupName, String workspaceName, String linkedServiceName, LinkedServiceInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, linkedServiceName, parameters) + return this + .beginCreateOrUpdateAsync(resourceGroupName, workspaceName, linkedServiceName, parameters) .getSyncPoller(); } @@ -352,7 +353,8 @@ public SyncPoller, LinkedServiceInner> beginCreat String linkedServiceName, LinkedServiceInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, linkedServiceName, parameters, context) + return this + .beginCreateOrUpdateAsync(resourceGroupName, workspaceName, linkedServiceName, parameters, context) .getSyncPoller(); } @@ -616,7 +618,7 @@ private PollerFlux, LinkedServiceInner> beginDele @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, LinkedServiceInner> beginDelete( String resourceGroupName, String workspaceName, String linkedServiceName) { - return beginDeleteAsync(resourceGroupName, workspaceName, linkedServiceName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, workspaceName, linkedServiceName).getSyncPoller(); } /** @@ -634,7 +636,7 @@ public SyncPoller, LinkedServiceInner> beginDelet @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, LinkedServiceInner> beginDelete( String resourceGroupName, String workspaceName, String linkedServiceName, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, linkedServiceName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, workspaceName, linkedServiceName, context).getSyncPoller(); } /** @@ -842,14 +844,16 @@ private Mono getAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param linkedServiceName Name of the linked service. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a linked service instance. + * @return a linked service instance along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LinkedServiceInner get(String resourceGroupName, String workspaceName, String linkedServiceName) { - return getAsync(resourceGroupName, workspaceName, linkedServiceName).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String linkedServiceName, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, linkedServiceName, context).block(); } /** @@ -858,16 +862,14 @@ public LinkedServiceInner get(String resourceGroupName, String workspaceName, St * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param linkedServiceName Name of the linked service. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a linked service instance along with {@link Response}. + * @return a linked service instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String linkedServiceName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, linkedServiceName, context).block(); + public LinkedServiceInner get(String resourceGroupName, String workspaceName, String linkedServiceName) { + return getWithResponse(resourceGroupName, workspaceName, linkedServiceName, Context.NONE).getValue(); } /** diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/LinkedServicesImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/LinkedServicesImpl.java index d73159139a97..9c8cb73f4b38 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/LinkedServicesImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/LinkedServicesImpl.java @@ -47,15 +47,6 @@ public LinkedService delete( } } - public LinkedService get(String resourceGroupName, String workspaceName, String linkedServiceName) { - LinkedServiceInner inner = this.serviceClient().get(resourceGroupName, workspaceName, linkedServiceName); - if (inner != null) { - return new LinkedServiceImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String linkedServiceName, Context context) { Response inner = @@ -71,6 +62,15 @@ public Response getWithResponse( } } + public LinkedService get(String resourceGroupName, String workspaceName, String linkedServiceName) { + LinkedServiceInner inner = this.serviceClient().get(resourceGroupName, workspaceName, linkedServiceName); + if (inner != null) { + return new LinkedServiceImpl(inner, this.manager()); + } else { + return null; + } + } + public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName) { PagedIterable inner = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName); diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/LinkedStorageAccountsClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/LinkedStorageAccountsClientImpl.java index 4e90a99217d6..b8df59156f19 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/LinkedStorageAccountsClientImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/LinkedStorageAccountsClientImpl.java @@ -60,7 +60,7 @@ public final class LinkedStorageAccountsClientImpl implements LinkedStorageAccou */ @Host("{$host}") @ServiceInterface(name = "OperationalInsightsM") - private interface LinkedStorageAccountsService { + public interface LinkedStorageAccountsService { @Headers({"Content-Type: application/json"}) @Put( "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -287,18 +287,21 @@ private Mono createOrUpdateAsync( * @param workspaceName The name of the workspace. * @param dataSourceType Linked storage accounts type. * @param parameters The parameters required to create or update linked storage accounts. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return linked storage accounts top level resource container. + * @return linked storage accounts top level resource container along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LinkedStorageAccountsResourceInner createOrUpdate( + public Response createOrUpdateWithResponse( String resourceGroupName, String workspaceName, DataSourceType dataSourceType, - LinkedStorageAccountsResourceInner parameters) { - return createOrUpdateAsync(resourceGroupName, workspaceName, dataSourceType, parameters).block(); + LinkedStorageAccountsResourceInner parameters, + Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, dataSourceType, parameters, context) + .block(); } /** @@ -309,21 +312,19 @@ public LinkedStorageAccountsResourceInner createOrUpdate( * @param workspaceName The name of the workspace. * @param dataSourceType Linked storage accounts type. * @param parameters The parameters required to create or update linked storage accounts. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return linked storage accounts top level resource container along with {@link Response}. + * @return linked storage accounts top level resource container. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( + public LinkedStorageAccountsResourceInner createOrUpdate( String resourceGroupName, String workspaceName, DataSourceType dataSourceType, - LinkedStorageAccountsResourceInner parameters, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, dataSourceType, parameters, context) - .block(); + LinkedStorageAccountsResourceInner parameters) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, dataSourceType, parameters, Context.NONE) + .getValue(); } /** @@ -451,13 +452,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, D * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataSourceType Linked storage accounts type. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, DataSourceType dataSourceType) { - deleteAsync(resourceGroupName, workspaceName, dataSourceType).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, DataSourceType dataSourceType, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, dataSourceType, context).block(); } /** @@ -466,16 +470,13 @@ public void delete(String resourceGroupName, String workspaceName, DataSourceTyp * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataSourceType Linked storage accounts type. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, DataSourceType dataSourceType, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, dataSourceType, context).block(); + public void delete(String resourceGroupName, String workspaceName, DataSourceType dataSourceType) { + deleteWithResponse(resourceGroupName, workspaceName, dataSourceType, Context.NONE); } /** @@ -611,15 +612,17 @@ private Mono getAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataSourceType Linked storage accounts type. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return 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) - public LinkedStorageAccountsResourceInner get( - String resourceGroupName, String workspaceName, DataSourceType dataSourceType) { - return getAsync(resourceGroupName, workspaceName, dataSourceType).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, DataSourceType dataSourceType, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, dataSourceType, context).block(); } /** @@ -628,17 +631,15 @@ public LinkedStorageAccountsResourceInner get( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataSourceType Linked storage accounts type. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all linked storage account of a specific data source type associated with the specified workspace along - * with {@link Response}. + * @return all linked storage account of a specific data source type associated with the specified workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, DataSourceType dataSourceType, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, dataSourceType, context).block(); + public LinkedStorageAccountsResourceInner get( + String resourceGroupName, String workspaceName, DataSourceType dataSourceType) { + return getWithResponse(resourceGroupName, workspaceName, dataSourceType, Context.NONE).getValue(); } /** diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/LinkedStorageAccountsImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/LinkedStorageAccountsImpl.java index 51e986a614e1..393a46a8b5ba 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/LinkedStorageAccountsImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/LinkedStorageAccountsImpl.java @@ -29,24 +29,13 @@ public LinkedStorageAccountsImpl( this.serviceManager = serviceManager; } - public void delete(String resourceGroupName, String workspaceName, DataSourceType dataSourceType) { - this.serviceClient().delete(resourceGroupName, workspaceName, dataSourceType); - } - public Response deleteWithResponse( String resourceGroupName, String workspaceName, DataSourceType dataSourceType, Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, dataSourceType, context); } - public LinkedStorageAccountsResource get( - String resourceGroupName, String workspaceName, DataSourceType dataSourceType) { - LinkedStorageAccountsResourceInner inner = - this.serviceClient().get(resourceGroupName, workspaceName, dataSourceType); - if (inner != null) { - return new LinkedStorageAccountsResourceImpl(inner, this.manager()); - } else { - return null; - } + public void delete(String resourceGroupName, String workspaceName, DataSourceType dataSourceType) { + this.serviceClient().delete(resourceGroupName, workspaceName, dataSourceType); } public Response getWithResponse( @@ -64,6 +53,17 @@ public Response getWithResponse( } } + public LinkedStorageAccountsResource get( + String resourceGroupName, String workspaceName, DataSourceType dataSourceType) { + LinkedStorageAccountsResourceInner inner = + this.serviceClient().get(resourceGroupName, workspaceName, dataSourceType); + if (inner != null) { + return new LinkedStorageAccountsResourceImpl(inner, this.manager()); + } else { + return null; + } + } + public PagedIterable listByWorkspace( String resourceGroupName, String workspaceName) { PagedIterable inner = @@ -94,9 +94,8 @@ public LinkedStorageAccountsResource getById(String id) { new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - DataSourceType dataSourceType = - DataSourceType.fromString(Utils.getValueFromIdByName(id, "linkedStorageAccounts")); - if (dataSourceType == null) { + String dataSourceTypeLocal = Utils.getValueFromIdByName(id, "linkedStorageAccounts"); + if (dataSourceTypeLocal == null) { throw LOGGER .logExceptionAsError( new IllegalArgumentException( @@ -105,6 +104,7 @@ public LinkedStorageAccountsResource getById(String id) { "The resource ID '%s' is not valid. Missing path segment 'linkedStorageAccounts'.", id))); } + DataSourceType dataSourceType = DataSourceType.fromString(dataSourceTypeLocal); return this.getWithResponse(resourceGroupName, workspaceName, dataSourceType, Context.NONE).getValue(); } @@ -124,9 +124,8 @@ public Response getByIdWithResponse(String id, Co new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - DataSourceType dataSourceType = - DataSourceType.fromString(Utils.getValueFromIdByName(id, "linkedStorageAccounts")); - if (dataSourceType == null) { + String dataSourceTypeLocal = Utils.getValueFromIdByName(id, "linkedStorageAccounts"); + if (dataSourceTypeLocal == null) { throw LOGGER .logExceptionAsError( new IllegalArgumentException( @@ -135,6 +134,7 @@ public Response getByIdWithResponse(String id, Co "The resource ID '%s' is not valid. Missing path segment 'linkedStorageAccounts'.", id))); } + DataSourceType dataSourceType = DataSourceType.fromString(dataSourceTypeLocal); return this.getWithResponse(resourceGroupName, workspaceName, dataSourceType, context); } @@ -154,9 +154,8 @@ public void deleteById(String id) { new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - DataSourceType dataSourceType = - DataSourceType.fromString(Utils.getValueFromIdByName(id, "linkedStorageAccounts")); - if (dataSourceType == null) { + String dataSourceTypeLocal = Utils.getValueFromIdByName(id, "linkedStorageAccounts"); + if (dataSourceTypeLocal == null) { throw LOGGER .logExceptionAsError( new IllegalArgumentException( @@ -165,6 +164,7 @@ public void deleteById(String id) { "The resource ID '%s' is not valid. Missing path segment 'linkedStorageAccounts'.", id))); } + DataSourceType dataSourceType = DataSourceType.fromString(dataSourceTypeLocal); this.deleteWithResponse(resourceGroupName, workspaceName, dataSourceType, Context.NONE); } @@ -184,9 +184,8 @@ public Response deleteByIdWithResponse(String id, Context context) { new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'workspaces'.", id))); } - DataSourceType dataSourceType = - DataSourceType.fromString(Utils.getValueFromIdByName(id, "linkedStorageAccounts")); - if (dataSourceType == null) { + String dataSourceTypeLocal = Utils.getValueFromIdByName(id, "linkedStorageAccounts"); + if (dataSourceTypeLocal == null) { throw LOGGER .logExceptionAsError( new IllegalArgumentException( @@ -195,6 +194,7 @@ public Response deleteByIdWithResponse(String id, Context context) { "The resource ID '%s' is not valid. Missing path segment 'linkedStorageAccounts'.", id))); } + DataSourceType dataSourceType = DataSourceType.fromString(dataSourceTypeLocal); return this.deleteWithResponse(resourceGroupName, workspaceName, dataSourceType, context); } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ManagementGroupsClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ManagementGroupsClientImpl.java index 1ce366640bca..15db3091030d 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ManagementGroupsClientImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/ManagementGroupsClientImpl.java @@ -55,7 +55,7 @@ public final class ManagementGroupsClientImpl implements ManagementGroupsClient */ @Host("{$host}") @ServiceInterface(name = "OperationalInsightsM") - private interface ManagementGroupsService { + public interface ManagementGroupsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationStatusesClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationStatusesClientImpl.java index 2aa3d7a45eab..a596c0634b8d 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationStatusesClientImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationStatusesClientImpl.java @@ -50,7 +50,7 @@ public final class OperationStatusesClientImpl implements OperationStatusesClien */ @Host("{$host}") @ServiceInterface(name = "OperationalInsightsM") - private interface OperationStatusesService { + public interface OperationStatusesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/locations/{location}" @@ -184,14 +184,15 @@ private Mono getAsync(String location, String asyncOperati * * @param location The region name of operation. * @param asyncOperationId The operation Id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the 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) - public OperationStatusInner get(String location, String asyncOperationId) { - return getAsync(location, asyncOperationId).block(); + public Response getWithResponse(String location, String asyncOperationId, Context context) { + return getWithResponseAsync(location, asyncOperationId, context).block(); } /** @@ -199,14 +200,13 @@ public OperationStatusInner get(String location, String asyncOperationId) { * * @param location The region name of operation. * @param asyncOperationId The operation Id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of a long running azure asynchronous operation along with {@link Response}. + * @return the status of a long running azure asynchronous operation. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse(String location, String asyncOperationId, Context context) { - return getWithResponseAsync(location, asyncOperationId, context).block(); + public OperationStatusInner get(String location, String asyncOperationId) { + return getWithResponse(location, asyncOperationId, Context.NONE).getValue(); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationStatusesImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationStatusesImpl.java index 0cf021749ca2..93e65b9b72b8 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationStatusesImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationStatusesImpl.java @@ -27,15 +27,6 @@ public OperationStatusesImpl( this.serviceManager = serviceManager; } - public OperationStatus get(String location, String asyncOperationId) { - OperationStatusInner inner = this.serviceClient().get(location, asyncOperationId); - if (inner != null) { - return new OperationStatusImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse(String location, String asyncOperationId, Context context) { Response inner = this.serviceClient().getWithResponse(location, asyncOperationId, context); @@ -50,6 +41,15 @@ public Response getWithResponse(String location, String asyncOp } } + public OperationStatus get(String location, String asyncOperationId) { + OperationStatusInner inner = this.serviceClient().get(location, asyncOperationId); + if (inner != null) { + return new OperationStatusImpl(inner, this.manager()); + } else { + return null; + } + } + private OperationStatusesClient serviceClient() { return this.innerClient; } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationalInsightsManagementClientBuilder.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationalInsightsManagementClientBuilder.java index e75f5332e0b5..980586ce24e0 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationalInsightsManagementClientBuilder.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationalInsightsManagementClientBuilder.java @@ -119,24 +119,26 @@ public OperationalInsightsManagementClientBuilder serializerAdapter(SerializerAd * @return an instance of OperationalInsightsManagementClientImpl. */ public OperationalInsightsManagementClientImpl buildClient() { - if (endpoint == null) { - this.endpoint = "https://management.azure.com"; - } - if (environment == null) { - this.environment = AzureEnvironment.AZURE; - } - if (pipeline == null) { - this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - } - if (defaultPollInterval == null) { - this.defaultPollInterval = Duration.ofSeconds(30); - } - if (serializerAdapter == null) { - this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); - } + String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; + AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; + HttpPipeline localPipeline = + (pipeline != null) + ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval = + (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = + (serializerAdapter != null) + ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); OperationalInsightsManagementClientImpl client = new OperationalInsightsManagementClientImpl( - pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint); + localPipeline, + localSerializerAdapter, + localDefaultPollInterval, + localEnvironment, + subscriptionId, + localEndpoint); return client; } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationsClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationsClientImpl.java index bb310d8b851b..bc9a1273ab36 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationsClientImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/OperationsClientImpl.java @@ -55,7 +55,7 @@ public final class OperationsClientImpl implements OperationsClient { */ @Host("{$host}") @ServiceInterface(name = "OperationalInsightsM") - private interface OperationsService { + public interface OperationsService { @Headers({"Content-Type: application/json"}) @Get("/providers/Microsoft.OperationalInsights/operations") @ExpectedResponses({200}) @@ -93,7 +93,7 @@ private Mono> listSinglePageAsync() { new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - final String apiVersion = "2021-12-01-preview"; + final String apiVersion = "2022-10-01"; final String accept = "application/json"; return FluxUtil .withContext(context -> service.list(this.client.getEndpoint(), apiVersion, accept, context)) @@ -127,7 +127,7 @@ private Mono> listSinglePageAsync(Context context) new IllegalArgumentException( "Parameter this.client.getEndpoint() is required and cannot be null.")); } - final String apiVersion = "2021-12-01-preview"; + final String apiVersion = "2022-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -199,7 +199,8 @@ public PagedIterable list(Context context) { /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -235,7 +236,8 @@ private Mono> listNextSinglePageAsync(String nextL /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/QueriesClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/QueriesClientImpl.java index c54cb110b245..4e376f6e7c3d 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/QueriesClientImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/QueriesClientImpl.java @@ -60,7 +60,7 @@ public final class QueriesClientImpl implements QueriesClient { */ @Host("{$host}") @ServiceInterface(name = "OperationalInsightsM") - private interface QueriesService { + public interface QueriesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -870,14 +870,16 @@ private Mono getAsync(String resourceGroupName, * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param queryPackName The name of the Log Analytics QueryPack resource. * @param id The id of a specific query defined in the Log Analytics QueryPack. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific Log Analytics Query defined within a Log Analytics QueryPack. + * @return a specific Log Analytics Query defined within a Log Analytics QueryPack along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LogAnalyticsQueryPackQueryInner get(String resourceGroupName, String queryPackName, String id) { - return getAsync(resourceGroupName, queryPackName, id).block(); + public Response getWithResponse( + String resourceGroupName, String queryPackName, String id, Context context) { + return getWithResponseAsync(resourceGroupName, queryPackName, id, context).block(); } /** @@ -886,16 +888,14 @@ public LogAnalyticsQueryPackQueryInner get(String resourceGroupName, String quer * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param queryPackName The name of the Log Analytics QueryPack resource. * @param id The id of a specific query defined in the Log Analytics QueryPack. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific Log Analytics Query defined within a Log Analytics QueryPack along with {@link Response}. + * @return a specific Log Analytics Query defined within a Log Analytics QueryPack. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String queryPackName, String id, Context context) { - return getWithResponseAsync(resourceGroupName, queryPackName, id, context).block(); + public LogAnalyticsQueryPackQueryInner get(String resourceGroupName, String queryPackName, String id) { + return getWithResponse(resourceGroupName, queryPackName, id, Context.NONE).getValue(); } /** @@ -1054,15 +1054,20 @@ private Mono putAsync( * @param id The id of a specific query defined in the Log Analytics QueryPack. * @param queryPayload Properties that need to be specified to create a new query and add it to a Log Analytics * QueryPack. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Log Analytics QueryPack-Query definition. + * @return a Log Analytics QueryPack-Query definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LogAnalyticsQueryPackQueryInner put( - String resourceGroupName, String queryPackName, String id, LogAnalyticsQueryPackQueryInner queryPayload) { - return putAsync(resourceGroupName, queryPackName, id, queryPayload).block(); + public Response putWithResponse( + String resourceGroupName, + String queryPackName, + String id, + LogAnalyticsQueryPackQueryInner queryPayload, + Context context) { + return putWithResponseAsync(resourceGroupName, queryPackName, id, queryPayload, context).block(); } /** @@ -1073,20 +1078,15 @@ public LogAnalyticsQueryPackQueryInner put( * @param id The id of a specific query defined in the Log Analytics QueryPack. * @param queryPayload Properties that need to be specified to create a new query and add it to a Log Analytics * QueryPack. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Log Analytics QueryPack-Query definition along with {@link Response}. + * @return a Log Analytics QueryPack-Query definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response putWithResponse( - String resourceGroupName, - String queryPackName, - String id, - LogAnalyticsQueryPackQueryInner queryPayload, - Context context) { - return putWithResponseAsync(resourceGroupName, queryPackName, id, queryPayload, context).block(); + public LogAnalyticsQueryPackQueryInner put( + String resourceGroupName, String queryPackName, String id, LogAnalyticsQueryPackQueryInner queryPayload) { + return putWithResponse(resourceGroupName, queryPackName, id, queryPayload, Context.NONE).getValue(); } /** @@ -1245,15 +1245,20 @@ private Mono updateAsync( * @param id The id of a specific query defined in the Log Analytics QueryPack. * @param queryPayload Properties that need to be specified to create a new query and add it to a Log Analytics * QueryPack. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Log Analytics QueryPack-Query definition. + * @return a Log Analytics QueryPack-Query definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LogAnalyticsQueryPackQueryInner update( - String resourceGroupName, String queryPackName, String id, LogAnalyticsQueryPackQueryInner queryPayload) { - return updateAsync(resourceGroupName, queryPackName, id, queryPayload).block(); + public Response updateWithResponse( + String resourceGroupName, + String queryPackName, + String id, + LogAnalyticsQueryPackQueryInner queryPayload, + Context context) { + return updateWithResponseAsync(resourceGroupName, queryPackName, id, queryPayload, context).block(); } /** @@ -1264,20 +1269,15 @@ public LogAnalyticsQueryPackQueryInner update( * @param id The id of a specific query defined in the Log Analytics QueryPack. * @param queryPayload Properties that need to be specified to create a new query and add it to a Log Analytics * QueryPack. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Log Analytics QueryPack-Query definition along with {@link Response}. + * @return a Log Analytics QueryPack-Query definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String queryPackName, - String id, - LogAnalyticsQueryPackQueryInner queryPayload, - Context context) { - return updateWithResponseAsync(resourceGroupName, queryPackName, id, queryPayload, context).block(); + public LogAnalyticsQueryPackQueryInner update( + String resourceGroupName, String queryPackName, String id, LogAnalyticsQueryPackQueryInner queryPayload) { + return updateWithResponse(resourceGroupName, queryPackName, id, queryPayload, Context.NONE).getValue(); } /** @@ -1407,13 +1407,16 @@ private Mono deleteAsync(String resourceGroupName, String queryPackName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param queryPackName The name of the Log Analytics QueryPack resource. * @param id The id of a specific query defined in the Log Analytics QueryPack. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String queryPackName, String id) { - deleteAsync(resourceGroupName, queryPackName, id).block(); + public Response deleteWithResponse( + String resourceGroupName, String queryPackName, String id, Context context) { + return deleteWithResponseAsync(resourceGroupName, queryPackName, id, context).block(); } /** @@ -1422,22 +1425,20 @@ public void delete(String resourceGroupName, String queryPackName, String id) { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param queryPackName The name of the Log Analytics QueryPack resource. * @param id The id of a specific query defined in the Log Analytics QueryPack. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String queryPackName, String id, Context context) { - return deleteWithResponseAsync(resourceGroupName, queryPackName, id, context).block(); + public void delete(String resourceGroupName, String queryPackName, String id) { + deleteWithResponse(resourceGroupName, queryPackName, id, Context.NONE); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1473,7 +1474,8 @@ private Mono> listNextSinglePageA /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1511,7 +1513,8 @@ private Mono> listNextSinglePageA /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1547,7 +1550,8 @@ private Mono> searchNextSinglePag /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/QueriesImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/QueriesImpl.java index cc092ccd0466..2d5f02dbab06 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/QueriesImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/QueriesImpl.java @@ -70,15 +70,6 @@ public PagedIterable search( return Utils.mapPage(inner, inner1 -> new LogAnalyticsQueryPackQueryImpl(inner1, this.manager())); } - public LogAnalyticsQueryPackQuery get(String resourceGroupName, String queryPackName, String id) { - LogAnalyticsQueryPackQueryInner inner = this.serviceClient().get(resourceGroupName, queryPackName, id); - if (inner != null) { - return new LogAnalyticsQueryPackQueryImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String queryPackName, String id, Context context) { Response inner = @@ -94,8 +85,13 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String queryPackName, String id) { - this.serviceClient().delete(resourceGroupName, queryPackName, id); + public LogAnalyticsQueryPackQuery get(String resourceGroupName, String queryPackName, String id) { + LogAnalyticsQueryPackQueryInner inner = this.serviceClient().get(resourceGroupName, queryPackName, id); + if (inner != null) { + return new LogAnalyticsQueryPackQueryImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -103,6 +99,10 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, queryPackName, id, context); } + public void delete(String resourceGroupName, String queryPackName, String id) { + this.serviceClient().delete(resourceGroupName, queryPackName, id); + } + public LogAnalyticsQueryPackQuery getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/QueryPacksClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/QueryPacksClientImpl.java index b3a83be8ad37..76953bf329d3 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/QueryPacksClientImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/QueryPacksClientImpl.java @@ -60,7 +60,7 @@ public final class QueryPacksClientImpl implements QueryPacksClient { */ @Host("{$host}") @ServiceInterface(name = "OperationalInsightsM") - private interface QueryPacksService { + public interface QueryPacksService { @Headers({"Content-Type: application/json"}) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/queryPacks") @ExpectedResponses({200}) @@ -86,6 +86,21 @@ Mono> listByResourceGroup( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Put( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" + + "/queryPacks") + @ExpectedResponses({201}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> createOrUpdateWithoutName( + @HostParam("$host") String endpoint, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("subscriptionId") String subscriptionId, + @BodyParam("application/json") LogAnalyticsQueryPackInner logAnalyticsQueryPackPayload, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Delete( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -477,6 +492,176 @@ public PagedIterable listByResourceGroup(String reso return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); } + /** + * Creates a Log Analytics QueryPack. Note: You cannot specify a different value for InstrumentationKey nor AppId in + * the Put operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param logAnalyticsQueryPackPayload Properties that need to be specified to create or update a Log Analytics + * QueryPack. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Log Analytics QueryPack definition along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithoutNameWithResponseAsync( + String resourceGroupName, LogAnalyticsQueryPackInner logAnalyticsQueryPackPayload) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (logAnalyticsQueryPackPayload == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter logAnalyticsQueryPackPayload is required and cannot be null.")); + } else { + logAnalyticsQueryPackPayload.validate(); + } + final String apiVersion = "2019-09-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .createOrUpdateWithoutName( + this.client.getEndpoint(), + resourceGroupName, + apiVersion, + this.client.getSubscriptionId(), + logAnalyticsQueryPackPayload, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates a Log Analytics QueryPack. Note: You cannot specify a different value for InstrumentationKey nor AppId in + * the Put operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param logAnalyticsQueryPackPayload Properties that need to be specified to create or update a Log Analytics + * QueryPack. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Log Analytics QueryPack definition along with {@link Response} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithoutNameWithResponseAsync( + String resourceGroupName, LogAnalyticsQueryPackInner logAnalyticsQueryPackPayload, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (logAnalyticsQueryPackPayload == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter logAnalyticsQueryPackPayload is required and cannot be null.")); + } else { + logAnalyticsQueryPackPayload.validate(); + } + final String apiVersion = "2019-09-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .createOrUpdateWithoutName( + this.client.getEndpoint(), + resourceGroupName, + apiVersion, + this.client.getSubscriptionId(), + logAnalyticsQueryPackPayload, + accept, + context); + } + + /** + * Creates a Log Analytics QueryPack. Note: You cannot specify a different value for InstrumentationKey nor AppId in + * the Put operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param logAnalyticsQueryPackPayload Properties that need to be specified to create or update a Log Analytics + * QueryPack. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Log Analytics QueryPack definition on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateWithoutNameAsync( + String resourceGroupName, LogAnalyticsQueryPackInner logAnalyticsQueryPackPayload) { + return createOrUpdateWithoutNameWithResponseAsync(resourceGroupName, logAnalyticsQueryPackPayload) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Creates a Log Analytics QueryPack. Note: You cannot specify a different value for InstrumentationKey nor AppId in + * the Put operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param logAnalyticsQueryPackPayload Properties that need to be specified to create or update a Log Analytics + * QueryPack. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Log Analytics QueryPack definition along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithoutNameWithResponse( + String resourceGroupName, LogAnalyticsQueryPackInner logAnalyticsQueryPackPayload, Context context) { + return createOrUpdateWithoutNameWithResponseAsync(resourceGroupName, logAnalyticsQueryPackPayload, context) + .block(); + } + + /** + * Creates a Log Analytics QueryPack. Note: You cannot specify a different value for InstrumentationKey nor AppId in + * the Put operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param logAnalyticsQueryPackPayload Properties that need to be specified to create or update a Log Analytics + * QueryPack. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Log Analytics QueryPack definition. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public LogAnalyticsQueryPackInner createOrUpdateWithoutName( + String resourceGroupName, LogAnalyticsQueryPackInner logAnalyticsQueryPackPayload) { + return createOrUpdateWithoutNameWithResponse(resourceGroupName, logAnalyticsQueryPackPayload, Context.NONE) + .getValue(); + } + /** * Deletes a Log Analytics QueryPack. * @@ -592,13 +777,15 @@ private Mono deleteAsync(String resourceGroupName, String queryPackName) { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param queryPackName The name of the Log Analytics QueryPack resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String queryPackName) { - deleteAsync(resourceGroupName, queryPackName).block(); + public Response deleteWithResponse(String resourceGroupName, String queryPackName, Context context) { + return deleteWithResponseAsync(resourceGroupName, queryPackName, context).block(); } /** @@ -606,15 +793,13 @@ public void delete(String resourceGroupName, String queryPackName) { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param queryPackName The name of the Log Analytics QueryPack resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse(String resourceGroupName, String queryPackName, Context context) { - return deleteWithResponseAsync(resourceGroupName, queryPackName, context).block(); + public void delete(String resourceGroupName, String queryPackName) { + deleteWithResponse(resourceGroupName, queryPackName, Context.NONE); } /** @@ -736,14 +921,16 @@ private Mono getByResourceGroupAsync(String resource * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param queryPackName The name of the Log Analytics QueryPack resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Log Analytics QueryPack definition. + * @return an Log Analytics QueryPack definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LogAnalyticsQueryPackInner getByResourceGroup(String resourceGroupName, String queryPackName) { - return getByResourceGroupAsync(resourceGroupName, queryPackName).block(); + public Response getByResourceGroupWithResponse( + String resourceGroupName, String queryPackName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, queryPackName, context).block(); } /** @@ -751,16 +938,14 @@ public LogAnalyticsQueryPackInner getByResourceGroup(String resourceGroupName, S * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param queryPackName The name of the Log Analytics QueryPack resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Log Analytics QueryPack definition along with {@link Response}. + * @return an Log Analytics QueryPack definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String queryPackName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, queryPackName, context).block(); + public LogAnalyticsQueryPackInner getByResourceGroup(String resourceGroupName, String queryPackName) { + return getByResourceGroupWithResponse(resourceGroupName, queryPackName, Context.NONE).getValue(); } /** @@ -916,15 +1101,20 @@ private Mono createOrUpdateAsync( * @param queryPackName The name of the Log Analytics QueryPack resource. * @param logAnalyticsQueryPackPayload Properties that need to be specified to create or update a Log Analytics * QueryPack. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Log Analytics QueryPack definition. + * @return an Log Analytics QueryPack definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LogAnalyticsQueryPackInner createOrUpdate( - String resourceGroupName, String queryPackName, LogAnalyticsQueryPackInner logAnalyticsQueryPackPayload) { - return createOrUpdateAsync(resourceGroupName, queryPackName, logAnalyticsQueryPackPayload).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, + String queryPackName, + LogAnalyticsQueryPackInner logAnalyticsQueryPackPayload, + Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, queryPackName, logAnalyticsQueryPackPayload, context) + .block(); } /** @@ -935,20 +1125,16 @@ public LogAnalyticsQueryPackInner createOrUpdate( * @param queryPackName The name of the Log Analytics QueryPack resource. * @param logAnalyticsQueryPackPayload Properties that need to be specified to create or update a Log Analytics * QueryPack. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Log Analytics QueryPack definition along with {@link Response}. + * @return an Log Analytics QueryPack definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String queryPackName, - LogAnalyticsQueryPackInner logAnalyticsQueryPackPayload, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, queryPackName, logAnalyticsQueryPackPayload, context) - .block(); + public LogAnalyticsQueryPackInner createOrUpdate( + String resourceGroupName, String queryPackName, LogAnalyticsQueryPackInner logAnalyticsQueryPackPayload) { + return createOrUpdateWithResponse(resourceGroupName, queryPackName, logAnalyticsQueryPackPayload, Context.NONE) + .getValue(); } /** @@ -1087,15 +1273,16 @@ private Mono updateTagsAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param queryPackName The name of the Log Analytics QueryPack resource. * @param queryPackTags Updated tag information to set into the QueryPack instance. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Log Analytics QueryPack definition. + * @return an Log Analytics QueryPack definition along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public LogAnalyticsQueryPackInner updateTags( - String resourceGroupName, String queryPackName, TagsResource queryPackTags) { - return updateTagsAsync(resourceGroupName, queryPackName, queryPackTags).block(); + public Response updateTagsWithResponse( + String resourceGroupName, String queryPackName, TagsResource queryPackTags, Context context) { + return updateTagsWithResponseAsync(resourceGroupName, queryPackName, queryPackTags, context).block(); } /** @@ -1104,22 +1291,22 @@ public LogAnalyticsQueryPackInner updateTags( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param queryPackName The name of the Log Analytics QueryPack resource. * @param queryPackTags Updated tag information to set into the QueryPack instance. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Log Analytics QueryPack definition along with {@link Response}. + * @return an Log Analytics QueryPack definition. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateTagsWithResponse( - String resourceGroupName, String queryPackName, TagsResource queryPackTags, Context context) { - return updateTagsWithResponseAsync(resourceGroupName, queryPackName, queryPackTags, context).block(); + public LogAnalyticsQueryPackInner updateTags( + String resourceGroupName, String queryPackName, TagsResource queryPackTags) { + return updateTagsWithResponse(resourceGroupName, queryPackName, queryPackTags, Context.NONE).getValue(); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1155,7 +1342,8 @@ private Mono> listNextSinglePageAsync( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -1192,7 +1380,8 @@ private Mono> listNextSinglePageAsync( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1229,7 +1418,8 @@ private Mono> listByResourceGroupNextS /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/QueryPacksImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/QueryPacksImpl.java index d72c8383fd4a..f0075ef7db46 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/QueryPacksImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/QueryPacksImpl.java @@ -48,16 +48,27 @@ public PagedIterable listByResourceGroup(String resourceG return Utils.mapPage(inner, inner1 -> new LogAnalyticsQueryPackImpl(inner1, this.manager())); } - public void deleteByResourceGroup(String resourceGroupName, String queryPackName) { - this.serviceClient().delete(resourceGroupName, queryPackName); - } - - public Response deleteWithResponse(String resourceGroupName, String queryPackName, Context context) { - return this.serviceClient().deleteWithResponse(resourceGroupName, queryPackName, context); + public Response createOrUpdateWithoutNameWithResponse( + String resourceGroupName, LogAnalyticsQueryPackInner logAnalyticsQueryPackPayload, Context context) { + Response inner = + this + .serviceClient() + .createOrUpdateWithoutNameWithResponse(resourceGroupName, logAnalyticsQueryPackPayload, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new LogAnalyticsQueryPackImpl(inner.getValue(), this.manager())); + } else { + return null; + } } - public LogAnalyticsQueryPack getByResourceGroup(String resourceGroupName, String queryPackName) { - LogAnalyticsQueryPackInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, queryPackName); + public LogAnalyticsQueryPack createOrUpdateWithoutName( + String resourceGroupName, LogAnalyticsQueryPackInner logAnalyticsQueryPackPayload) { + LogAnalyticsQueryPackInner inner = + this.serviceClient().createOrUpdateWithoutName(resourceGroupName, logAnalyticsQueryPackPayload); if (inner != null) { return new LogAnalyticsQueryPackImpl(inner, this.manager()); } else { @@ -65,6 +76,15 @@ public LogAnalyticsQueryPack getByResourceGroup(String resourceGroupName, String } } + public Response deleteByResourceGroupWithResponse( + String resourceGroupName, String queryPackName, Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, queryPackName, context); + } + + public void deleteByResourceGroup(String resourceGroupName, String queryPackName) { + this.serviceClient().delete(resourceGroupName, queryPackName); + } + public Response getByResourceGroupWithResponse( String resourceGroupName, String queryPackName, Context context) { Response inner = @@ -80,6 +100,15 @@ public Response getByResourceGroupWithResponse( } } + public LogAnalyticsQueryPack getByResourceGroup(String resourceGroupName, String queryPackName) { + LogAnalyticsQueryPackInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, queryPackName); + if (inner != null) { + return new LogAnalyticsQueryPackImpl(inner, this.manager()); + } else { + return null; + } + } + public LogAnalyticsQueryPack getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { @@ -134,7 +163,7 @@ public void deleteById(String id) { new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'queryPacks'.", id))); } - this.deleteWithResponse(resourceGroupName, queryPackName, Context.NONE); + this.deleteByResourceGroupWithResponse(resourceGroupName, queryPackName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { @@ -153,7 +182,7 @@ public Response deleteByIdWithResponse(String id, Context context) { new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'queryPacks'.", id))); } - return this.deleteWithResponse(resourceGroupName, queryPackName, context); + return this.deleteByResourceGroupWithResponse(resourceGroupName, queryPackName, context); } private QueryPacksClient serviceClient() { diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SavedSearchesClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SavedSearchesClientImpl.java index 48f0ac647f95..eb0933800c81 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SavedSearchesClientImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SavedSearchesClientImpl.java @@ -54,7 +54,7 @@ public final class SavedSearchesClientImpl implements SavedSearchesClient { */ @Host("{$host}") @ServiceInterface(name = "OperationalInsightsM") - private interface SavedSearchesService { + public interface SavedSearchesService { @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) @Delete( "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -244,13 +244,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param savedSearchId The id of the saved search. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String savedSearchId) { - deleteAsync(resourceGroupName, workspaceName, savedSearchId).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String savedSearchId, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, savedSearchId, context).block(); } /** @@ -259,16 +262,13 @@ public void delete(String resourceGroupName, String workspaceName, String savedS * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param savedSearchId The id of the saved search. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String savedSearchId, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, savedSearchId, context).block(); + public void delete(String resourceGroupName, String workspaceName, String savedSearchId) { + deleteWithResponse(resourceGroupName, workspaceName, savedSearchId, Context.NONE); } /** @@ -423,15 +423,21 @@ private Mono createOrUpdateAsync( * @param workspaceName The name of the workspace. * @param savedSearchId The id of the saved search. * @param parameters The parameters required to save a search. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return value object for saved search results. + * @return value object for saved search results along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SavedSearchInner createOrUpdate( - String resourceGroupName, String workspaceName, String savedSearchId, SavedSearchInner parameters) { - return createOrUpdateAsync(resourceGroupName, workspaceName, savedSearchId, parameters).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String savedSearchId, + SavedSearchInner parameters, + Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, savedSearchId, parameters, context) + .block(); } /** @@ -441,21 +447,16 @@ public SavedSearchInner createOrUpdate( * @param workspaceName The name of the workspace. * @param savedSearchId The id of the saved search. * @param parameters The parameters required to save a search. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return value object for saved search results along with {@link Response}. + * @return value object for saved search results. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String savedSearchId, - SavedSearchInner parameters, - Context context) { - return createOrUpdateWithResponseAsync(resourceGroupName, workspaceName, savedSearchId, parameters, context) - .block(); + public SavedSearchInner createOrUpdate( + String resourceGroupName, String workspaceName, String savedSearchId, SavedSearchInner parameters) { + return createOrUpdateWithResponse(resourceGroupName, workspaceName, savedSearchId, parameters, Context.NONE) + .getValue(); } /** @@ -589,14 +590,16 @@ private Mono getAsync(String resourceGroupName, String workspa * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param savedSearchId The id of the saved search. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified saved search for a given workspace. + * @return the specified saved search for a given workspace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SavedSearchInner get(String resourceGroupName, String workspaceName, String savedSearchId) { - return getAsync(resourceGroupName, workspaceName, savedSearchId).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String savedSearchId, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, savedSearchId, context).block(); } /** @@ -605,16 +608,14 @@ public SavedSearchInner get(String resourceGroupName, String workspaceName, Stri * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param savedSearchId The id of the saved search. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified saved search for a given workspace along with {@link Response}. + * @return the specified saved search for a given workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String savedSearchId, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, savedSearchId, context).block(); + public SavedSearchInner get(String resourceGroupName, String workspaceName, String savedSearchId) { + return getWithResponse(resourceGroupName, workspaceName, savedSearchId, Context.NONE).getValue(); } /** @@ -736,14 +737,16 @@ private Mono listByWorkspaceAsync(String resourceG * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the 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) - public SavedSearchesListResultInner listByWorkspace(String resourceGroupName, String workspaceName) { - return listByWorkspaceAsync(resourceGroupName, workspaceName).block(); + public Response listByWorkspaceWithResponse( + String resourceGroupName, String workspaceName, Context context) { + return listByWorkspaceWithResponseAsync(resourceGroupName, workspaceName, context).block(); } /** @@ -751,15 +754,13 @@ public SavedSearchesListResultInner listByWorkspace(String resourceGroupName, St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the saved searches for a given Log Analytics Workspace along with {@link Response}. + * @return the saved searches for a given Log Analytics Workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listByWorkspaceWithResponse( - String resourceGroupName, String workspaceName, Context context) { - return listByWorkspaceWithResponseAsync(resourceGroupName, workspaceName, context).block(); + public SavedSearchesListResultInner listByWorkspace(String resourceGroupName, String workspaceName) { + return listByWorkspaceWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SavedSearchesImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SavedSearchesImpl.java index 4b3b7a96391e..572bc302b620 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SavedSearchesImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SavedSearchesImpl.java @@ -28,22 +28,13 @@ public SavedSearchesImpl( this.serviceManager = serviceManager; } - public void delete(String resourceGroupName, String workspaceName, String savedSearchId) { - this.serviceClient().delete(resourceGroupName, workspaceName, savedSearchId); - } - public Response deleteWithResponse( String resourceGroupName, String workspaceName, String savedSearchId, Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, savedSearchId, context); } - public SavedSearch get(String resourceGroupName, String workspaceName, String savedSearchId) { - SavedSearchInner inner = this.serviceClient().get(resourceGroupName, workspaceName, savedSearchId); - if (inner != null) { - return new SavedSearchImpl(inner, this.manager()); - } else { - return null; - } + public void delete(String resourceGroupName, String workspaceName, String savedSearchId) { + this.serviceClient().delete(resourceGroupName, workspaceName, savedSearchId); } public Response getWithResponse( @@ -61,10 +52,10 @@ public Response getWithResponse( } } - public SavedSearchesListResult listByWorkspace(String resourceGroupName, String workspaceName) { - SavedSearchesListResultInner inner = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName); + public SavedSearch get(String resourceGroupName, String workspaceName, String savedSearchId) { + SavedSearchInner inner = this.serviceClient().get(resourceGroupName, workspaceName, savedSearchId); if (inner != null) { - return new SavedSearchesListResultImpl(inner, this.manager()); + return new SavedSearchImpl(inner, this.manager()); } else { return null; } @@ -85,6 +76,15 @@ public Response listByWorkspaceWithResponse( } } + public SavedSearchesListResult listByWorkspace(String resourceGroupName, String workspaceName) { + SavedSearchesListResultInner inner = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName); + if (inner != null) { + return new SavedSearchesListResultImpl(inner, this.manager()); + } else { + return null; + } + } + public SavedSearch getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourcegroups"); if (resourceGroupName == null) { diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SchemasClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SchemasClientImpl.java index 917cdd46981f..8db3d7cce425 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SchemasClientImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SchemasClientImpl.java @@ -49,7 +49,7 @@ public final class SchemasClientImpl implements SchemasClient { */ @Host("{$host}") @ServiceInterface(name = "OperationalInsightsM") - private interface SchemasService { + public interface SchemasService { @Headers({"Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -182,14 +182,16 @@ private Mono getAsync(String resourceGroupName, St * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the schema for a given workspace. + * @return the schema for a given workspace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SearchGetSchemaResponseInner get(String resourceGroupName, String workspaceName) { - return getAsync(resourceGroupName, workspaceName).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, context).block(); } /** @@ -197,15 +199,13 @@ public SearchGetSchemaResponseInner get(String resourceGroupName, String workspa * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the schema for a given workspace along with {@link Response}. + * @return the schema for a given workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, context).block(); + public SearchGetSchemaResponseInner get(String resourceGroupName, String workspaceName) { + return getWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SchemasImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SchemasImpl.java index 713cfe8d6d1d..74402ec64dae 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SchemasImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SchemasImpl.java @@ -26,15 +26,6 @@ public SchemasImpl( this.serviceManager = serviceManager; } - public SearchGetSchemaResponse get(String resourceGroupName, String workspaceName) { - SearchGetSchemaResponseInner inner = this.serviceClient().get(resourceGroupName, workspaceName); - if (inner != null) { - return new SearchGetSchemaResponseImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, Context context) { Response inner = @@ -50,6 +41,15 @@ public Response getWithResponse( } } + public SearchGetSchemaResponse get(String resourceGroupName, String workspaceName) { + SearchGetSchemaResponseInner inner = this.serviceClient().get(resourceGroupName, workspaceName); + if (inner != null) { + return new SearchGetSchemaResponseImpl(inner, this.manager()); + } else { + return null; + } + } + private SchemasClient serviceClient() { return this.innerClient; } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SharedKeysOperationsClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SharedKeysOperationsClientImpl.java index 4bd73cdba11a..16232f91a5c7 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SharedKeysOperationsClientImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SharedKeysOperationsClientImpl.java @@ -51,7 +51,7 @@ public final class SharedKeysOperationsClientImpl implements SharedKeysOperation */ @Host("{$host}") @ServiceInterface(name = "OperationalInsightsM") - private interface SharedKeysOperationsService { + public interface SharedKeysOperationsService { @Headers({"Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -200,14 +200,16 @@ private Mono getSharedKeysAsync(String resourceGroupName, Strin * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the shared keys for a workspace. + * @return the shared keys for a workspace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SharedKeysInner getSharedKeys(String resourceGroupName, String workspaceName) { - return getSharedKeysAsync(resourceGroupName, workspaceName).block(); + public Response getSharedKeysWithResponse( + String resourceGroupName, String workspaceName, Context context) { + return getSharedKeysWithResponseAsync(resourceGroupName, workspaceName, context).block(); } /** @@ -215,16 +217,14 @@ public SharedKeysInner getSharedKeys(String resourceGroupName, String workspaceN * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the shared keys for a workspace along with {@link Response}. + * @return the shared keys for a workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getSharedKeysWithResponse( - String resourceGroupName, String workspaceName, Context context) { - return getSharedKeysWithResponseAsync(resourceGroupName, workspaceName, context).block(); + public SharedKeysInner getSharedKeys(String resourceGroupName, String workspaceName) { + return getSharedKeysWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); } /** @@ -348,14 +348,16 @@ private Mono regenerateAsync(String resourceGroupName, String w * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the shared keys for a workspace. + * @return the shared keys for a workspace along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SharedKeysInner regenerate(String resourceGroupName, String workspaceName) { - return regenerateAsync(resourceGroupName, workspaceName).block(); + public Response regenerateWithResponse( + String resourceGroupName, String workspaceName, Context context) { + return regenerateWithResponseAsync(resourceGroupName, workspaceName, context).block(); } /** @@ -364,15 +366,13 @@ public SharedKeysInner regenerate(String resourceGroupName, String workspaceName * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the shared keys for a workspace along with {@link Response}. + * @return the shared keys for a workspace. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response regenerateWithResponse( - String resourceGroupName, String workspaceName, Context context) { - return regenerateWithResponseAsync(resourceGroupName, workspaceName, context).block(); + public SharedKeysInner regenerate(String resourceGroupName, String workspaceName) { + return regenerateWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SharedKeysOperationsImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SharedKeysOperationsImpl.java index fc86afed9109..8c7062977f2d 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SharedKeysOperationsImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/SharedKeysOperationsImpl.java @@ -27,15 +27,6 @@ public SharedKeysOperationsImpl( this.serviceManager = serviceManager; } - public SharedKeys getSharedKeys(String resourceGroupName, String workspaceName) { - SharedKeysInner inner = this.serviceClient().getSharedKeys(resourceGroupName, workspaceName); - if (inner != null) { - return new SharedKeysImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getSharedKeysWithResponse( String resourceGroupName, String workspaceName, Context context) { Response inner = @@ -51,8 +42,8 @@ public Response getSharedKeysWithResponse( } } - public SharedKeys regenerate(String resourceGroupName, String workspaceName) { - SharedKeysInner inner = this.serviceClient().regenerate(resourceGroupName, workspaceName); + public SharedKeys getSharedKeys(String resourceGroupName, String workspaceName) { + SharedKeysInner inner = this.serviceClient().getSharedKeys(resourceGroupName, workspaceName); if (inner != null) { return new SharedKeysImpl(inner, this.manager()); } else { @@ -75,6 +66,15 @@ public Response regenerateWithResponse( } } + public SharedKeys regenerate(String resourceGroupName, String workspaceName) { + SharedKeysInner inner = this.serviceClient().regenerate(resourceGroupName, workspaceName); + if (inner != null) { + return new SharedKeysImpl(inner, this.manager()); + } else { + return null; + } + } + private SharedKeysOperationsClient serviceClient() { return this.innerClient; } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/StorageInsightConfigsClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/StorageInsightConfigsClientImpl.java index 248d6ad1335c..0ce7c61017d0 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/StorageInsightConfigsClientImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/StorageInsightConfigsClientImpl.java @@ -59,7 +59,7 @@ public final class StorageInsightConfigsClientImpl implements StorageInsightConf */ @Host("{$host}") @ServiceInterface(name = "OperationalInsightsM") - private interface StorageInsightConfigsService { + public interface StorageInsightConfigsService { @Headers({"Content-Type: application/json"}) @Put( "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -288,15 +288,22 @@ private Mono createOrUpdateAsync( * @param workspaceName The name of the workspace. * @param storageInsightName Name of the storageInsightsConfigs resource. * @param parameters The parameters required to create or update a storage insight. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the top level storage insight resource container. + * @return the top level storage insight resource container along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public StorageInsightInner createOrUpdate( - String resourceGroupName, String workspaceName, String storageInsightName, StorageInsightInner parameters) { - return createOrUpdateAsync(resourceGroupName, workspaceName, storageInsightName, parameters).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, + String workspaceName, + String storageInsightName, + StorageInsightInner parameters, + Context context) { + return createOrUpdateWithResponseAsync( + resourceGroupName, workspaceName, storageInsightName, parameters, context) + .block(); } /** @@ -306,22 +313,17 @@ public StorageInsightInner createOrUpdate( * @param workspaceName The name of the workspace. * @param storageInsightName Name of the storageInsightsConfigs resource. * @param parameters The parameters required to create or update a storage insight. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the top level storage insight resource container along with {@link Response}. + * @return the top level storage insight resource container. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String workspaceName, - String storageInsightName, - StorageInsightInner parameters, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, workspaceName, storageInsightName, parameters, context) - .block(); + public StorageInsightInner createOrUpdate( + String resourceGroupName, String workspaceName, String storageInsightName, StorageInsightInner parameters) { + return createOrUpdateWithResponse( + resourceGroupName, workspaceName, storageInsightName, parameters, Context.NONE) + .getValue(); } /** @@ -456,14 +458,16 @@ private Mono getAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param storageInsightName Name of the storageInsightsConfigs resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a storage insight instance. + * @return a storage insight instance along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public StorageInsightInner get(String resourceGroupName, String workspaceName, String storageInsightName) { - return getAsync(resourceGroupName, workspaceName, storageInsightName).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String storageInsightName, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, storageInsightName, context).block(); } /** @@ -472,16 +476,14 @@ public StorageInsightInner get(String resourceGroupName, String workspaceName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param storageInsightName Name of the storageInsightsConfigs resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a storage insight instance along with {@link Response}. + * @return a storage insight instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String storageInsightName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, storageInsightName, context).block(); + public StorageInsightInner get(String resourceGroupName, String workspaceName, String storageInsightName) { + return getWithResponse(resourceGroupName, workspaceName, storageInsightName, Context.NONE).getValue(); } /** @@ -611,13 +613,16 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, S * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param storageInsightName Name of the storageInsightsConfigs resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, String storageInsightName) { - deleteAsync(resourceGroupName, workspaceName, storageInsightName).block(); + public Response deleteWithResponse( + String resourceGroupName, String workspaceName, String storageInsightName, Context context) { + return deleteWithResponseAsync(resourceGroupName, workspaceName, storageInsightName, context).block(); } /** @@ -626,16 +631,13 @@ public void delete(String resourceGroupName, String workspaceName, String storag * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param storageInsightName Name of the storageInsightsConfigs resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String workspaceName, String storageInsightName, Context context) { - return deleteWithResponseAsync(resourceGroupName, workspaceName, storageInsightName, context).block(); + public void delete(String resourceGroupName, String workspaceName, String storageInsightName) { + deleteWithResponse(resourceGroupName, workspaceName, storageInsightName, Context.NONE); } /** @@ -825,7 +827,8 @@ public PagedIterable listByWorkspace( /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -861,7 +864,8 @@ private Mono> listByWorkspaceNextSinglePageAs /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/StorageInsightConfigsImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/StorageInsightConfigsImpl.java index 4edb9e037674..0c2183657be4 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/StorageInsightConfigsImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/StorageInsightConfigsImpl.java @@ -28,15 +28,6 @@ public StorageInsightConfigsImpl( this.serviceManager = serviceManager; } - public StorageInsight get(String resourceGroupName, String workspaceName, String storageInsightName) { - StorageInsightInner inner = this.serviceClient().get(resourceGroupName, workspaceName, storageInsightName); - if (inner != null) { - return new StorageInsightImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String workspaceName, String storageInsightName, Context context) { Response inner = @@ -52,8 +43,13 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String workspaceName, String storageInsightName) { - this.serviceClient().delete(resourceGroupName, workspaceName, storageInsightName); + public StorageInsight get(String resourceGroupName, String workspaceName, String storageInsightName) { + StorageInsightInner inner = this.serviceClient().get(resourceGroupName, workspaceName, storageInsightName); + if (inner != null) { + return new StorageInsightImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -61,6 +57,10 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, workspaceName, storageInsightName, context); } + public void delete(String resourceGroupName, String workspaceName, String storageInsightName) { + this.serviceClient().delete(resourceGroupName, workspaceName, storageInsightName); + } + public PagedIterable listByWorkspace(String resourceGroupName, String workspaceName) { PagedIterable inner = this.serviceClient().listByWorkspace(resourceGroupName, workspaceName); diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/TableImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/TableImpl.java index 58d663126dcb..14d52b1de26a 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/TableImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/TableImpl.java @@ -77,6 +77,14 @@ public ProvisioningStateEnum provisioningState() { return this.innerModel().provisioningState(); } + public Boolean retentionInDaysAsDefault() { + return this.innerModel().retentionInDaysAsDefault(); + } + + public Boolean totalRetentionInDaysAsDefault() { + return this.innerModel().totalRetentionInDaysAsDefault(); + } + public String resourceGroupName() { return resourceGroupName; } @@ -150,7 +158,7 @@ public Table apply(Context context) { TableImpl(TableInner innerObject, com.azure.resourcemanager.loganalytics.LogAnalyticsManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourcegroups"); + this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); this.workspaceName = Utils.getValueFromIdByName(innerObject.id(), "workspaces"); this.tableName = Utils.getValueFromIdByName(innerObject.id(), "tables"); } @@ -175,12 +183,20 @@ public Table refresh(Context context) { return this; } + public Response migrateWithResponse(Context context) { + return serviceManager.tables().migrateWithResponse(resourceGroupName, workspaceName, tableName, context); + } + public void migrate() { serviceManager.tables().migrate(resourceGroupName, workspaceName, tableName); } - public Response migrateWithResponse(Context context) { - return serviceManager.tables().migrateWithResponse(resourceGroupName, workspaceName, tableName, context); + public Response cancelSearchWithResponse(Context context) { + return serviceManager.tables().cancelSearchWithResponse(resourceGroupName, workspaceName, tableName, context); + } + + public void cancelSearch() { + serviceManager.tables().cancelSearch(resourceGroupName, workspaceName, tableName); } public TableImpl withRetentionInDays(Integer retentionInDays) { @@ -203,11 +219,6 @@ public TableImpl withRestoredLogs(RestoredLogs restoredLogs) { return this; } - public TableImpl withResultStatistics(ResultStatistics resultStatistics) { - this.innerModel().withResultStatistics(resultStatistics); - return this; - } - public TableImpl withPlan(TablePlanEnum plan) { this.innerModel().withPlan(plan); return this; diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/TablesClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/TablesClientImpl.java index 14fabdcb57af..cf40976fdd4f 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/TablesClientImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/TablesClientImpl.java @@ -64,10 +64,10 @@ public final class TablesClientImpl implements TablesClient { */ @Host("{$host}") @ServiceInterface(name = "OperationalInsightsM") - private interface TablesService { + public interface TablesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" + "/workspaces/{workspaceName}/tables") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) @@ -82,7 +82,7 @@ Mono> listByWorkspace( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" + "/workspaces/{workspaceName}/tables/{tableName}") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) @@ -99,7 +99,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" + "/workspaces/{workspaceName}/tables/{tableName}") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) @@ -116,7 +116,7 @@ Mono>> update( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" + "/workspaces/{workspaceName}/tables/{tableName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) @@ -132,7 +132,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" + "/workspaces/{workspaceName}/tables/{tableName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) @@ -148,7 +148,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" + "/workspaces/{workspaceName}/tables/{tableName}/migrate") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) @@ -161,6 +161,22 @@ Mono> migrate( @PathParam("tableName") String tableName, @HeaderParam("Accept") String accept, Context context); + + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" + + "/workspaces/{workspaceName}/tables/{tableName}/cancelSearch") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> cancelSearch( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("workspaceName") String workspaceName, + @QueryParam("api-version") String apiVersion, + @PathParam("tableName") String tableName, + @HeaderParam("Accept") String accept, + Context context); } /** @@ -196,7 +212,7 @@ private Mono> listByWorkspaceSinglePageAsync( if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } - final String apiVersion = "2021-12-01-preview"; + final String apiVersion = "2022-10-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -251,7 +267,7 @@ private Mono> listByWorkspaceSinglePageAsync( if (workspaceName == null) { return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); } - final String apiVersion = "2021-12-01-preview"; + final String apiVersion = "2022-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -376,7 +392,7 @@ private Mono>> createOrUpdateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-12-01-preview"; + final String apiVersion = "2022-10-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -438,7 +454,7 @@ private Mono>> createOrUpdateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-12-01-preview"; + final String apiVersion = "2022-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -517,7 +533,7 @@ private PollerFlux, TableInner> beginCreateOrUpdateAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, TableInner> beginCreateOrUpdate( String resourceGroupName, String workspaceName, String tableName, TableInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, tableName, parameters).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, tableName, parameters).getSyncPoller(); } /** @@ -536,7 +552,8 @@ public SyncPoller, TableInner> beginCreateOrUpdate( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, TableInner> beginCreateOrUpdate( String resourceGroupName, String workspaceName, String tableName, TableInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, tableName, parameters, context) + return this + .beginCreateOrUpdateAsync(resourceGroupName, workspaceName, tableName, parameters, context) .getSyncPoller(); } @@ -660,7 +677,7 @@ private Mono>> updateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-12-01-preview"; + final String apiVersion = "2022-10-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -722,7 +739,7 @@ private Mono>> updateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-12-01-preview"; + final String apiVersion = "2022-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -801,7 +818,7 @@ private PollerFlux, TableInner> beginUpdateAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, TableInner> beginUpdate( String resourceGroupName, String workspaceName, String tableName, TableInner parameters) { - return beginUpdateAsync(resourceGroupName, workspaceName, tableName, parameters).getSyncPoller(); + return this.beginUpdateAsync(resourceGroupName, workspaceName, tableName, parameters).getSyncPoller(); } /** @@ -820,7 +837,7 @@ public SyncPoller, TableInner> beginUpdate( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, TableInner> beginUpdate( String resourceGroupName, String workspaceName, String tableName, TableInner parameters, Context context) { - return beginUpdateAsync(resourceGroupName, workspaceName, tableName, parameters, context).getSyncPoller(); + return this.beginUpdateAsync(resourceGroupName, workspaceName, tableName, parameters, context).getSyncPoller(); } /** @@ -936,7 +953,7 @@ private Mono> getWithResponseAsync( if (tableName == null) { return Mono.error(new IllegalArgumentException("Parameter tableName is required and cannot be null.")); } - final String apiVersion = "2021-12-01-preview"; + final String apiVersion = "2022-10-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -991,7 +1008,7 @@ private Mono> getWithResponseAsync( if (tableName == null) { return Mono.error(new IllegalArgumentException("Parameter tableName is required and cannot be null.")); } - final String apiVersion = "2021-12-01-preview"; + final String apiVersion = "2022-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1029,14 +1046,16 @@ private Mono getAsync(String resourceGroupName, String workspaceName * @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 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) - public TableInner get(String resourceGroupName, String workspaceName, String tableName) { - return getAsync(resourceGroupName, workspaceName, tableName).block(); + public Response getWithResponse( + String resourceGroupName, String workspaceName, String tableName, Context context) { + return getWithResponseAsync(resourceGroupName, workspaceName, tableName, context).block(); } /** @@ -1045,16 +1064,14 @@ public TableInner get(String resourceGroupName, String workspaceName, String tab * @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 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 along with {@link Response}. + * @return a Log Analytics workspace table. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String workspaceName, String tableName, Context context) { - return getWithResponseAsync(resourceGroupName, workspaceName, tableName, context).block(); + public TableInner get(String resourceGroupName, String workspaceName, String tableName) { + return getWithResponse(resourceGroupName, workspaceName, tableName, Context.NONE).getValue(); } /** @@ -1093,7 +1110,7 @@ private Mono>> deleteWithResponseAsync( if (tableName == null) { return Mono.error(new IllegalArgumentException("Parameter tableName is required and cannot be null.")); } - final String apiVersion = "2021-12-01-preview"; + final String apiVersion = "2022-10-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1148,7 +1165,7 @@ private Mono>> deleteWithResponseAsync( if (tableName == null) { return Mono.error(new IllegalArgumentException("Parameter tableName is required and cannot be null.")); } - final String apiVersion = "2021-12-01-preview"; + final String apiVersion = "2022-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1221,7 +1238,7 @@ private PollerFlux, Void> beginDeleteAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String workspaceName, String tableName) { - return beginDeleteAsync(resourceGroupName, workspaceName, tableName).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, workspaceName, tableName).getSyncPoller(); } /** @@ -1239,7 +1256,7 @@ public SyncPoller, Void> beginDelete( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String workspaceName, String tableName, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, tableName, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, workspaceName, tableName, context).getSyncPoller(); } /** @@ -1347,7 +1364,7 @@ private Mono> migrateWithResponseAsync( if (tableName == null) { return Mono.error(new IllegalArgumentException("Parameter tableName is required and cannot be null.")); } - final String apiVersion = "2021-12-01-preview"; + final String apiVersion = "2022-10-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1403,7 +1420,7 @@ private Mono> migrateWithResponseAsync( if (tableName == null) { return Mono.error(new IllegalArgumentException("Parameter tableName is required and cannot be null.")); } - final String apiVersion = "2021-12-01-preview"; + final String apiVersion = "2022-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1442,13 +1459,16 @@ private Mono migrateAsync(String resourceGroupName, String workspaceName, * @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 ManagementException 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) - public void migrate(String resourceGroupName, String workspaceName, String tableName) { - migrateAsync(resourceGroupName, workspaceName, tableName).block(); + public Response migrateWithResponse( + String resourceGroupName, String workspaceName, String tableName, Context context) { + return migrateWithResponseAsync(resourceGroupName, workspaceName, tableName, context).block(); } /** @@ -1458,6 +1478,144 @@ public void migrate(String resourceGroupName, String workspaceName, String 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 ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void migrate(String resourceGroupName, String workspaceName, String tableName) { + migrateWithResponse(resourceGroupName, workspaceName, tableName, Context.NONE); + } + + /** + * Cancel a log analytics workspace search results table query run. + * + * @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 ManagementException 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} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> cancelSearchWithResponseAsync( + String resourceGroupName, String workspaceName, String tableName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (tableName == null) { + return Mono.error(new IllegalArgumentException("Parameter tableName is required and cannot be null.")); + } + final String apiVersion = "2022-10-01"; + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .cancelSearch( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + apiVersion, + tableName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Cancel a log analytics workspace search results table query run. + * + * @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 ManagementException 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} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> cancelSearchWithResponseAsync( + String resourceGroupName, String workspaceName, String tableName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (workspaceName == null) { + return Mono.error(new IllegalArgumentException("Parameter workspaceName is required and cannot be null.")); + } + if (tableName == null) { + return Mono.error(new IllegalArgumentException("Parameter tableName is required and cannot be null.")); + } + final String apiVersion = "2022-10-01"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .cancelSearch( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + workspaceName, + apiVersion, + tableName, + accept, + context); + } + + /** + * Cancel a log analytics workspace search results table query run. + * + * @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 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 {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono cancelSearchAsync(String resourceGroupName, String workspaceName, String tableName) { + return cancelSearchWithResponseAsync(resourceGroupName, workspaceName, tableName) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Cancel a log analytics workspace search results table query run. + * + * @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 ManagementException thrown if the request is rejected by server. @@ -1465,8 +1623,23 @@ public void migrate(String resourceGroupName, String workspaceName, String table * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response migrateWithResponse( + public Response cancelSearchWithResponse( String resourceGroupName, String workspaceName, String tableName, Context context) { - return migrateWithResponseAsync(resourceGroupName, workspaceName, tableName, context).block(); + return cancelSearchWithResponseAsync(resourceGroupName, workspaceName, tableName, context).block(); + } + + /** + * Cancel a log analytics workspace search results table query run. + * + * @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 ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void cancelSearch(String resourceGroupName, String workspaceName, String tableName) { + cancelSearchWithResponse(resourceGroupName, workspaceName, tableName, Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/TablesImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/TablesImpl.java index 4c525bbfafeb..ba3f82dda16c 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/TablesImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/TablesImpl.java @@ -38,15 +38,6 @@ public PagedIterable listByWorkspace(String resourceGroupName, String wor return Utils.mapPage(inner, inner1 -> new TableImpl(inner1, this.manager())); } - public Table get(String resourceGroupName, String workspaceName, String tableName) { - TableInner inner = this.serviceClient().get(resourceGroupName, workspaceName, tableName); - if (inner != null) { - return new TableImpl(inner, this.manager()); - } else { - return null; - } - } - public Response
getWithResponse( String resourceGroupName, String workspaceName, String tableName, Context context) { Response inner = @@ -62,6 +53,15 @@ public Response
getWithResponse( } } + public Table get(String resourceGroupName, String workspaceName, String tableName) { + TableInner inner = this.serviceClient().get(resourceGroupName, workspaceName, tableName); + if (inner != null) { + return new TableImpl(inner, this.manager()); + } else { + return null; + } + } + public void delete(String resourceGroupName, String workspaceName, String tableName) { this.serviceClient().delete(resourceGroupName, workspaceName, tableName); } @@ -70,23 +70,32 @@ public void delete(String resourceGroupName, String workspaceName, String tableN this.serviceClient().delete(resourceGroupName, workspaceName, tableName, context); } + public Response migrateWithResponse( + String resourceGroupName, String workspaceName, String tableName, Context context) { + return this.serviceClient().migrateWithResponse(resourceGroupName, workspaceName, tableName, context); + } + public void migrate(String resourceGroupName, String workspaceName, String tableName) { this.serviceClient().migrate(resourceGroupName, workspaceName, tableName); } - public Response migrateWithResponse( + public Response cancelSearchWithResponse( String resourceGroupName, String workspaceName, String tableName, Context context) { - return this.serviceClient().migrateWithResponse(resourceGroupName, workspaceName, tableName, context); + return this.serviceClient().cancelSearchWithResponse(resourceGroupName, workspaceName, tableName, context); + } + + public void cancelSearch(String resourceGroupName, String workspaceName, String tableName) { + this.serviceClient().cancelSearch(resourceGroupName, workspaceName, tableName); } public Table getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourcegroups"); + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER .logExceptionAsError( new IllegalArgumentException( String - .format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id))); + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { @@ -106,13 +115,13 @@ public Table getById(String id) { } public Response
getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourcegroups"); + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER .logExceptionAsError( new IllegalArgumentException( String - .format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id))); + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { @@ -132,13 +141,13 @@ public Response
getByIdWithResponse(String id, Context context) { } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourcegroups"); + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER .logExceptionAsError( new IllegalArgumentException( String - .format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id))); + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { @@ -158,13 +167,13 @@ public void deleteById(String id) { } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourcegroups"); + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { throw LOGGER .logExceptionAsError( new IllegalArgumentException( String - .format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id))); + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } String workspaceName = Utils.getValueFromIdByName(id, "workspaces"); if (workspaceName == null) { diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/UsagesClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/UsagesClientImpl.java index b575116b0674..e1f0011ed3e9 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/UsagesClientImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/UsagesClientImpl.java @@ -54,7 +54,7 @@ public final class UsagesClientImpl implements UsagesClient { */ @Host("{$host}") @ServiceInterface(name = "OperationalInsightsM") - private interface UsagesService { + public interface UsagesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspaceImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspaceImpl.java index eb89a4a6b36d..6e445594a887 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspaceImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspaceImpl.java @@ -7,6 +7,7 @@ import com.azure.core.management.Region; import com.azure.core.util.Context; import com.azure.resourcemanager.loganalytics.fluent.models.WorkspaceInner; +import com.azure.resourcemanager.loganalytics.models.Identity; import com.azure.resourcemanager.loganalytics.models.PrivateLinkScopedResource; import com.azure.resourcemanager.loganalytics.models.PublicNetworkAccessType; import com.azure.resourcemanager.loganalytics.models.SystemDataAutoGenerated; @@ -50,6 +51,10 @@ public Map tags() { } } + public Identity identity() { + return this.innerModel().identity(); + } + public SystemDataAutoGenerated systemData() { return this.innerModel().systemData(); } @@ -243,6 +248,16 @@ public WorkspaceImpl withTags(Map tags) { } } + public WorkspaceImpl withIdentity(Identity identity) { + if (isInCreateMode()) { + this.innerModel().withIdentity(identity); + return this; + } else { + this.updateParameters.withIdentity(identity); + return this; + } + } + public WorkspaceImpl withEtag(String etag) { this.innerModel().withEtag(etag); return this; diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspacePurgesClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspacePurgesClientImpl.java index ae5c8d615640..364072d55040 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspacePurgesClientImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspacePurgesClientImpl.java @@ -55,7 +55,7 @@ public final class WorkspacePurgesClientImpl implements WorkspacePurgesClient { */ @Host("{$host}") @ServiceInterface(name = "OperationalInsightsM") - private interface WorkspacePurgesService { + public interface WorkspacePurgesService { @Headers({"Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights" @@ -255,14 +255,16 @@ private Mono purgeAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param body Describes the body of a request to purge data in a single table of an Log Analytics Workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return response containing operationId for a specific purge action. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspacePurgeResponseInner purge(String resourceGroupName, String workspaceName, WorkspacePurgeBody body) { - return purgeAsync(resourceGroupName, workspaceName, body).block(); + public WorkspacePurgesPurgeResponse purgeWithResponse( + String resourceGroupName, String workspaceName, WorkspacePurgeBody body, Context context) { + return purgeWithResponseAsync(resourceGroupName, workspaceName, body, context).block(); } /** @@ -279,16 +281,14 @@ public WorkspacePurgeResponseInner purge(String resourceGroupName, String worksp * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param body Describes the body of a request to purge data in a single table of an Log Analytics Workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return response containing operationId for a specific purge action. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspacePurgesPurgeResponse purgeWithResponse( - String resourceGroupName, String workspaceName, WorkspacePurgeBody body, Context context) { - return purgeWithResponseAsync(resourceGroupName, workspaceName, body, context).block(); + public WorkspacePurgeResponseInner purge(String resourceGroupName, String workspaceName, WorkspacePurgeBody body) { + return purgeWithResponse(resourceGroupName, workspaceName, body, Context.NONE).getValue(); } /** @@ -423,15 +423,16 @@ private Mono getPurgeStatusAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param purgeId In a purge status request, this is the Id of the operation the status of which is returned. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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) - public WorkspacePurgeStatusResponseInner getPurgeStatus( - String resourceGroupName, String workspaceName, String purgeId) { - return getPurgeStatusAsync(resourceGroupName, workspaceName, purgeId).block(); + public Response getPurgeStatusWithResponse( + String resourceGroupName, String workspaceName, String purgeId, Context context) { + return getPurgeStatusWithResponseAsync(resourceGroupName, workspaceName, purgeId, context).block(); } /** @@ -440,15 +441,14 @@ public WorkspacePurgeStatusResponseInner getPurgeStatus( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param purgeId In a purge status request, this is the Id of the operation the status of which is returned. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 along with {@link Response}. + * @return status of an ongoing purge operation. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getPurgeStatusWithResponse( - String resourceGroupName, String workspaceName, String purgeId, Context context) { - return getPurgeStatusWithResponseAsync(resourceGroupName, workspaceName, purgeId, context).block(); + public WorkspacePurgeStatusResponseInner getPurgeStatus( + String resourceGroupName, String workspaceName, String purgeId) { + return getPurgeStatusWithResponse(resourceGroupName, workspaceName, purgeId, Context.NONE).getValue(); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspacePurgesImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspacePurgesImpl.java index 70ec17a8c02e..f41c4c50c96d 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspacePurgesImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspacePurgesImpl.java @@ -30,15 +30,6 @@ public WorkspacePurgesImpl( this.serviceManager = serviceManager; } - public WorkspacePurgeResponse purge(String resourceGroupName, String workspaceName, WorkspacePurgeBody body) { - WorkspacePurgeResponseInner inner = this.serviceClient().purge(resourceGroupName, workspaceName, body); - if (inner != null) { - return new WorkspacePurgeResponseImpl(inner, this.manager()); - } else { - return null; - } - } - public Response purgeWithResponse( String resourceGroupName, String workspaceName, WorkspacePurgeBody body, Context context) { WorkspacePurgesPurgeResponse inner = @@ -54,11 +45,10 @@ public Response purgeWithResponse( } } - public WorkspacePurgeStatusResponse getPurgeStatus(String resourceGroupName, String workspaceName, String purgeId) { - WorkspacePurgeStatusResponseInner inner = - this.serviceClient().getPurgeStatus(resourceGroupName, workspaceName, purgeId); + public WorkspacePurgeResponse purge(String resourceGroupName, String workspaceName, WorkspacePurgeBody body) { + WorkspacePurgeResponseInner inner = this.serviceClient().purge(resourceGroupName, workspaceName, body); if (inner != null) { - return new WorkspacePurgeStatusResponseImpl(inner, this.manager()); + return new WorkspacePurgeResponseImpl(inner, this.manager()); } else { return null; } @@ -79,6 +69,16 @@ public Response getPurgeStatusWithResponse( } } + public WorkspacePurgeStatusResponse getPurgeStatus(String resourceGroupName, String workspaceName, String purgeId) { + WorkspacePurgeStatusResponseInner inner = + this.serviceClient().getPurgeStatus(resourceGroupName, workspaceName, purgeId); + if (inner != null) { + return new WorkspacePurgeStatusResponseImpl(inner, this.manager()); + } else { + return null; + } + } + private WorkspacePurgesClient serviceClient() { return this.innerClient; } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspacesClientImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspacesClientImpl.java index 54d405f5a70d..e41811f198b2 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspacesClientImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspacesClientImpl.java @@ -65,7 +65,7 @@ public final class WorkspacesClientImpl implements WorkspacesClient { */ @Host("{$host}") @ServiceInterface(name = "OperationalInsightsM") - private interface WorkspacesService { + public interface WorkspacesService { @Headers({"Content-Type: application/json"}) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/workspaces") @ExpectedResponses({200}) @@ -177,7 +177,7 @@ private Mono> listSinglePageAsync() { new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2021-12-01-preview"; + final String apiVersion = "2022-10-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -215,7 +215,7 @@ private Mono> listSinglePageAsync(Context context) new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2021-12-01-preview"; + final String apiVersion = "2022-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -305,7 +305,7 @@ private Mono> listByResourceGroupSinglePageAsync(S new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2021-12-01-preview"; + final String apiVersion = "2022-10-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -354,7 +354,7 @@ private Mono> listByResourceGroupSinglePageAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2021-12-01-preview"; + final String apiVersion = "2022-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -468,7 +468,7 @@ private Mono>> createOrUpdateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-12-01-preview"; + final String apiVersion = "2022-10-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -526,7 +526,7 @@ private Mono>> createOrUpdateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-12-01-preview"; + final String apiVersion = "2022-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -605,7 +605,7 @@ private PollerFlux, WorkspaceInner> beginCreateOrUpda @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkspaceInner> beginCreateOrUpdate( String resourceGroupName, String workspaceName, WorkspaceInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, parameters).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, parameters).getSyncPoller(); } /** @@ -623,7 +623,7 @@ public SyncPoller, WorkspaceInner> beginCreateOrUpdat @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, WorkspaceInner> beginCreateOrUpdate( String resourceGroupName, String workspaceName, WorkspaceInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, workspaceName, parameters, context).getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, workspaceName, parameters, context).getSyncPoller(); } /** @@ -735,7 +735,7 @@ private Mono>> deleteWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2021-12-01-preview"; + final String apiVersion = "2022-10-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -790,7 +790,7 @@ private Mono>> deleteWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2021-12-01-preview"; + final String apiVersion = "2022-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -829,6 +829,28 @@ private PollerFlux, Void> beginDeleteAsync( mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); } + /** + * Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same + * subscription, resource group and location. The name is kept for 14 days and cannot be used for another workspace. + * To remove the workspace completely and release the name, use the force flag. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String workspaceName) { + final Boolean force = null; + Mono>> mono = deleteWithResponseAsync(resourceGroupName, workspaceName, force); + return this + .client + .getLroResult( + mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + } + /** * Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same * subscription, resource group and location. The name is kept for 14 days and cannot be used for another workspace. @@ -862,17 +884,15 @@ private PollerFlux, Void> beginDeleteAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param force Deletes the workspace without the recovery option. A workspace that was deleted with this flag - * cannot be recovered. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String workspaceName, Boolean force) { - return beginDeleteAsync(resourceGroupName, workspaceName, force).getSyncPoller(); + public SyncPoller, Void> beginDelete(String resourceGroupName, String workspaceName) { + final Boolean force = null; + return this.beginDeleteAsync(resourceGroupName, workspaceName, force).getSyncPoller(); } /** @@ -893,7 +913,7 @@ public SyncPoller, Void> beginDelete( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, Void> beginDelete( String resourceGroupName, String workspaceName, Boolean force, Context context) { - return beginDeleteAsync(resourceGroupName, workspaceName, force, context).getSyncPoller(); + return this.beginDeleteAsync(resourceGroupName, workspaceName, force, context).getSyncPoller(); } /** @@ -959,24 +979,6 @@ private Mono deleteAsync(String resourceGroupName, String workspaceName, B .flatMap(this.client::getLroFinalResultOrError); } - /** - * Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same - * subscription, resource group and location. The name is kept for 14 days and cannot be used for another workspace. - * To remove the workspace completely and release the name, use the force flag. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param force Deletes the workspace without the recovery option. A workspace that was deleted with this flag - * cannot be recovered. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public void delete(String resourceGroupName, String workspaceName, Boolean force) { - deleteAsync(resourceGroupName, workspaceName, force).block(); - } - /** * Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same * subscription, resource group and location. The name is kept for 14 days and cannot be used for another workspace. @@ -1045,7 +1047,7 @@ private Mono> getByResourceGroupWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2021-12-01-preview"; + final String apiVersion = "2022-10-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1095,7 +1097,7 @@ private Mono> getByResourceGroupWithResponseAsync( new IllegalArgumentException( "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } - final String apiVersion = "2021-12-01-preview"; + final String apiVersion = "2022-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1130,14 +1132,16 @@ private Mono getByResourceGroupAsync(String resourceGroupName, S * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a workspace instance. + * @return a workspace instance along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public WorkspaceInner getByResourceGroup(String resourceGroupName, String workspaceName) { - return getByResourceGroupAsync(resourceGroupName, workspaceName).block(); + public Response getByResourceGroupWithResponse( + String resourceGroupName, String workspaceName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, workspaceName, context).block(); } /** @@ -1145,16 +1149,14 @@ public WorkspaceInner getByResourceGroup(String resourceGroupName, String worksp * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a workspace instance along with {@link Response}. + * @return a workspace instance. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String workspaceName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, workspaceName, context).block(); + public WorkspaceInner getByResourceGroup(String resourceGroupName, String workspaceName) { + return getByResourceGroupWithResponse(resourceGroupName, workspaceName, Context.NONE).getValue(); } /** @@ -1196,7 +1198,7 @@ private Mono> updateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-12-01-preview"; + final String apiVersion = "2022-10-01"; final String accept = "application/json"; return FluxUtil .withContext( @@ -1254,7 +1256,7 @@ private Mono> updateWithResponseAsync( } else { parameters.validate(); } - final String apiVersion = "2021-12-01-preview"; + final String apiVersion = "2022-10-01"; final String accept = "application/json"; context = this.client.mergeContext(context); return service @@ -1293,14 +1295,16 @@ private Mono updateAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param parameters The parameters required to patch a workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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) - public WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspacePatch parameters) { - return updateAsync(resourceGroupName, workspaceName, parameters).block(); + public Response updateWithResponse( + String resourceGroupName, String workspaceName, WorkspacePatch parameters, Context context) { + return updateWithResponseAsync(resourceGroupName, workspaceName, parameters, context).block(); } /** @@ -1309,15 +1313,13 @@ public WorkspaceInner update(String resourceGroupName, String workspaceName, Wor * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param parameters The parameters required to patch a workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException 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 along with {@link Response}. + * @return the top level Workspace resource container. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, String workspaceName, WorkspacePatch parameters, Context context) { - return updateWithResponseAsync(resourceGroupName, workspaceName, parameters, context).block(); + public WorkspaceInner update(String resourceGroupName, String workspaceName, WorkspacePatch parameters) { + return updateWithResponse(resourceGroupName, workspaceName, parameters, Context.NONE).getValue(); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspacesImpl.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspacesImpl.java index c954fd904b5b..c08baf7a0744 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspacesImpl.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/implementation/WorkspacesImpl.java @@ -47,10 +47,6 @@ public PagedIterable listByResourceGroup(String resourceGroupName, Co return Utils.mapPage(inner, inner1 -> new WorkspaceImpl(inner1, this.manager())); } - public void delete(String resourceGroupName, String workspaceName, Boolean force) { - this.serviceClient().delete(resourceGroupName, workspaceName, force); - } - public void delete(String resourceGroupName, String workspaceName) { this.serviceClient().delete(resourceGroupName, workspaceName); } @@ -59,15 +55,6 @@ public void delete(String resourceGroupName, String workspaceName, Boolean force this.serviceClient().delete(resourceGroupName, workspaceName, force, context); } - public Workspace getByResourceGroup(String resourceGroupName, String workspaceName) { - WorkspaceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, workspaceName); - if (inner != null) { - return new WorkspaceImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getByResourceGroupWithResponse( String resourceGroupName, String workspaceName, Context context) { Response inner = @@ -83,6 +70,15 @@ public Response getByResourceGroupWithResponse( } } + public Workspace getByResourceGroup(String resourceGroupName, String workspaceName) { + WorkspaceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, workspaceName); + if (inner != null) { + return new WorkspaceImpl(inner, this.manager()); + } else { + return null; + } + } + public Workspace getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourcegroups"); if (resourceGroupName == null) { diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/AssociatedWorkspace.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/AssociatedWorkspace.java index 60d9f78a2d2a..67a44127f005 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/AssociatedWorkspace.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/AssociatedWorkspace.java @@ -34,6 +34,10 @@ public final class AssociatedWorkspace { @JsonProperty(value = "associateDate", access = JsonProperty.Access.WRITE_ONLY) private String associateDate; + /** Creates an instance of AssociatedWorkspace class. */ + public AssociatedWorkspace() { + } + /** * Get the workspaceId property: The id of the assigned workspace. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/AvailableServiceTiers.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/AvailableServiceTiers.java index 4dcc29c68cca..faf1e2efefb2 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/AvailableServiceTiers.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/AvailableServiceTiers.java @@ -15,24 +15,24 @@ public interface AvailableServiceTiers { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the available service tiers for the workspace. + * @return the available service tiers for the workspace along with {@link Response}. */ - List listByWorkspace(String resourceGroupName, String workspaceName); + Response> listByWorkspaceWithResponse( + String resourceGroupName, String workspaceName, Context context); /** * Gets the available service tiers for the workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @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 available service tiers for the workspace along with {@link Response}. + * @return the available service tiers for the workspace. */ - Response> listByWorkspaceWithResponse( - String resourceGroupName, String workspaceName, Context context); + List listByWorkspace(String resourceGroupName, String workspaceName); } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/AzureEntityResource.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/AzureEntityResource.java index 12a03b676227..eb861394b7d0 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/AzureEntityResource.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/AzureEntityResource.java @@ -8,7 +8,11 @@ import com.azure.core.management.ProxyResource; import com.fasterxml.jackson.annotation.JsonProperty; -/** Entity Resource The resource model definition for an Azure Resource Manager resource with an etag. */ +/** + * Entity Resource + * + *

The resource model definition for an Azure Resource Manager resource with an etag. + */ @Immutable public class AzureEntityResource extends ProxyResource { /* @@ -17,6 +21,10 @@ public class AzureEntityResource extends ProxyResource { @JsonProperty(value = "etag", access = JsonProperty.Access.WRITE_ONLY) private String etag; + /** Creates an instance of AzureEntityResource class. */ + public AzureEntityResource() { + } + /** * Get the etag property: Resource Etag. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/AzureResourceProperties.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/AzureResourceProperties.java index 4934a624cf7e..f8ffa70867ed 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/AzureResourceProperties.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/AzureResourceProperties.java @@ -35,6 +35,10 @@ public class AzureResourceProperties { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; + /** Creates an instance of AzureResourceProperties class. */ + public AzureResourceProperties() { + } + /** * Get the id property: Azure resource Id. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/BillingType.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/BillingType.java index ad2222dda63f..3993a5ef2f85 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/BillingType.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/BillingType.java @@ -8,7 +8,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for BillingType. */ +/** + * Configures whether billing will be only on the cluster or each workspace will be billed by its proportional use. This + * does not change the overall billing, only how it will be distributed. Default value is 'Cluster'. + */ public final class BillingType extends ExpandableStringEnum { /** Static value Cluster for BillingType. */ public static final BillingType CLUSTER = fromString("Cluster"); @@ -16,6 +19,15 @@ public final class BillingType extends ExpandableStringEnum { /** Static value Workspaces for BillingType. */ public static final BillingType WORKSPACES = fromString("Workspaces"); + /** + * Creates a new instance of BillingType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BillingType() { + } + /** * Creates or finds a BillingType from its string representation. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Capacity.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Capacity.java index 71c46e1df9ef..b992c20cb059 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Capacity.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Capacity.java @@ -7,7 +7,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** Defines values for Capacity. */ +/** The capacity value. */ public enum Capacity { /** Enum value 500. */ FIVE_ZERO_ZERO(500L), diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/CapacityReservationLevel.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/CapacityReservationLevel.java index 5d2ee35e28ce..66f9366cbbb8 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/CapacityReservationLevel.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/CapacityReservationLevel.java @@ -7,7 +7,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** Defines values for CapacityReservationLevel. */ +/** The capacity reservation level in GB for this workspace, when CapacityReservation sku is selected. */ public enum CapacityReservationLevel { /** Enum value 100. */ ONE_ZERO_ZERO(100), diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/CapacityReservationProperties.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/CapacityReservationProperties.java index 278d5f51bed3..1dc5c4b5b375 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/CapacityReservationProperties.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/CapacityReservationProperties.java @@ -22,6 +22,10 @@ public final class CapacityReservationProperties { @JsonProperty(value = "minCapacity", access = JsonProperty.Access.WRITE_ONLY) private Long minCapacity; + /** Creates an instance of CapacityReservationProperties class. */ + public CapacityReservationProperties() { + } + /** * Get the lastSkuUpdate property: The last time Sku was updated. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/ClusterEntityStatus.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/ClusterEntityStatus.java index ca1b855dd85b..9abd8b873488 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/ClusterEntityStatus.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/ClusterEntityStatus.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ClusterEntityStatus. */ +/** The provisioning state of the cluster. */ public final class ClusterEntityStatus extends ExpandableStringEnum { /** Static value Creating for ClusterEntityStatus. */ public static final ClusterEntityStatus CREATING = fromString("Creating"); @@ -31,6 +31,15 @@ public final class ClusterEntityStatus extends ExpandableStringEnum value; + /** Creates an instance of ClusterListResult class. */ + public ClusterListResult() { + } + /** * Get the nextLink property: The link used to get the next page of recommendations. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/ClusterPatch.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/ClusterPatch.java index b19d71f81c76..8ef68baa30d0 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/ClusterPatch.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/ClusterPatch.java @@ -38,6 +38,10 @@ public final class ClusterPatch { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; + /** Creates an instance of ClusterPatch class. */ + public ClusterPatch() { + } + /** * Get the innerProperties property: Log Analytics cluster properties. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/ClusterSku.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/ClusterSku.java index 21f251d2954a..41e3163f551f 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/ClusterSku.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/ClusterSku.java @@ -22,6 +22,10 @@ public final class ClusterSku { @JsonProperty(value = "name") private ClusterSkuNameEnum name; + /** Creates an instance of ClusterSku class. */ + public ClusterSku() { + } + /** * Get the capacity property: The capacity value. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/ClusterSkuNameEnum.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/ClusterSkuNameEnum.java index cb86d276d3a1..c5b9ce92d4d9 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/ClusterSkuNameEnum.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/ClusterSkuNameEnum.java @@ -8,11 +8,20 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ClusterSkuNameEnum. */ +/** The name of the SKU. */ public final class ClusterSkuNameEnum extends ExpandableStringEnum { /** Static value CapacityReservation for ClusterSkuNameEnum. */ public static final ClusterSkuNameEnum CAPACITY_RESERVATION = fromString("CapacityReservation"); + /** + * Creates a new instance of ClusterSkuNameEnum value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ClusterSkuNameEnum() { + } + /** * Creates or finds a ClusterSkuNameEnum from its string representation. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Clusters.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Clusters.java index d256f54949b5..54efa9e3e415 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Clusters.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Clusters.java @@ -81,25 +81,25 @@ public interface Clusters { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName Name of the Log Analytics Cluster. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. */ - Cluster getByResourceGroup(String resourceGroupName, String clusterName); + Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName, Context context); /** * Gets a Log Analytics cluster instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName Name of the Log Analytics Cluster. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Log Analytics cluster instance along with {@link Response}. + * @return a Log Analytics cluster instance. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String clusterName, Context context); + Cluster getByResourceGroup(String resourceGroupName, String clusterName); /** * Gets a Log Analytics cluster instance. diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Column.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Column.java index e4d3632566fc..06f82b7ad15f 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Column.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Column.java @@ -52,6 +52,10 @@ public final class Column { @JsonProperty(value = "isHidden", access = JsonProperty.Access.WRITE_ONLY) private Boolean isHidden; + /** Creates an instance of Column class. */ + public Column() { + } + /** * Get the name property: Column name. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/ColumnDataTypeHintEnum.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/ColumnDataTypeHintEnum.java index 2c1b9271badc..a0d1665c0aaf 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/ColumnDataTypeHintEnum.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/ColumnDataTypeHintEnum.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ColumnDataTypeHintEnum. */ +/** Column data type logical hint. */ public final class ColumnDataTypeHintEnum extends ExpandableStringEnum { /** Static value uri for ColumnDataTypeHintEnum. */ public static final ColumnDataTypeHintEnum URI = fromString("uri"); @@ -22,6 +22,15 @@ public final class ColumnDataTypeHintEnum extends ExpandableStringEnum { /** Static value string for ColumnTypeEnum. */ public static final ColumnTypeEnum STRING = fromString("string"); @@ -34,6 +34,15 @@ public final class ColumnTypeEnum extends ExpandableStringEnum { /** Static value dynamic for ColumnTypeEnum. */ public static final ColumnTypeEnum DYNAMIC = fromString("dynamic"); + /** + * Creates a new instance of ColumnTypeEnum value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ColumnTypeEnum() { + } + /** * Creates or finds a ColumnTypeEnum from its string representation. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/CoreSummary.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/CoreSummary.java index 001d75a7f060..53fdd0f59ae6 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/CoreSummary.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/CoreSummary.java @@ -22,6 +22,10 @@ public final class CoreSummary { @JsonProperty(value = "numberOfDocuments", required = true) private long numberOfDocuments; + /** Creates an instance of CoreSummary class. */ + public CoreSummary() { + } + /** * Get the status property: The status of a core summary. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/CreatedByType.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/CreatedByType.java index fb6b1b6bcc6b..e94b273a4d62 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/CreatedByType.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/CreatedByType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for CreatedByType. */ +/** The type of identity that created the resource. */ public final class CreatedByType extends ExpandableStringEnum { /** Static value User for CreatedByType. */ public static final CreatedByType USER = fromString("User"); @@ -22,6 +22,15 @@ public final class CreatedByType extends ExpandableStringEnum { /** Static value Key for CreatedByType. */ public static final CreatedByType KEY = fromString("Key"); + /** + * Creates a new instance of CreatedByType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CreatedByType() { + } + /** * Creates or finds a CreatedByType from its string representation. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/DataExportListResult.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/DataExportListResult.java index ab729cb4ee84..3876a16b05b3 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/DataExportListResult.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/DataExportListResult.java @@ -18,6 +18,10 @@ public final class DataExportListResult { @JsonProperty(value = "value") private List value; + /** Creates an instance of DataExportListResult class. */ + public DataExportListResult() { + } + /** * Get the value property: List of data export instances within a workspace.. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/DataExports.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/DataExports.java index 215530f37fcc..4475a5026782 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/DataExports.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/DataExports.java @@ -41,12 +41,14 @@ public interface DataExports { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataExportName The data export rule name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. */ - DataExport get(String resourceGroupName, String workspaceName, String dataExportName); + Response getWithResponse( + String resourceGroupName, String workspaceName, String dataExportName, Context context); /** * Gets a data export instance. @@ -54,14 +56,12 @@ public interface DataExports { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataExportName The data export rule name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 along with {@link Response}. + * @return a data export instance. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String dataExportName, Context context); + DataExport get(String resourceGroupName, String workspaceName, String dataExportName); /** * Deletes the specified data export in a given workspace.. @@ -69,11 +69,14 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataExportName The data export rule name. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. */ - void delete(String resourceGroupName, String workspaceName, String dataExportName); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String dataExportName, Context context); /** * Deletes the specified data export in a given workspace.. @@ -81,14 +84,11 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataExportName The data export rule name. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String dataExportName, Context context); + void delete(String resourceGroupName, String workspaceName, String dataExportName); /** * Gets a data export instance. diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/DataIngestionStatus.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/DataIngestionStatus.java index ce5939e3d99f..61528f0993d7 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/DataIngestionStatus.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/DataIngestionStatus.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for DataIngestionStatus. */ +/** The status of data ingestion for this workspace. */ public final class DataIngestionStatus extends ExpandableStringEnum { /** Static value RespectQuota for DataIngestionStatus. */ public static final DataIngestionStatus RESPECT_QUOTA = fromString("RespectQuota"); @@ -28,6 +28,15 @@ public final class DataIngestionStatus extends ExpandableStringEnum { /** Static value WindowsEvent for DataSourceKind. */ public static final DataSourceKind WINDOWS_EVENT = fromString("WindowsEvent"); @@ -114,6 +114,15 @@ public final class DataSourceKind extends ExpandableStringEnum { /** Static value SqlDataClassification for DataSourceKind. */ public static final DataSourceKind SQL_DATA_CLASSIFICATION = fromString("SqlDataClassification"); + /** + * Creates a new instance of DataSourceKind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DataSourceKind() { + } + /** * Creates or finds a DataSourceKind from its string representation. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/DataSourceListResult.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/DataSourceListResult.java index 73fe89cf30cb..d7d58e99b078 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/DataSourceListResult.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/DataSourceListResult.java @@ -24,6 +24,10 @@ public final class DataSourceListResult { @JsonProperty(value = "nextLink") private String nextLink; + /** Creates an instance of DataSourceListResult class. */ + public DataSourceListResult() { + } + /** * Get the value property: A list of datasources. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/DataSourceType.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/DataSourceType.java index 2a77823956f4..99f680a06cf5 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/DataSourceType.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/DataSourceType.java @@ -7,7 +7,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** Defines values for DataSourceType. */ +/** Linked storage accounts type. */ public enum DataSourceType { /** Enum value CustomLogs. */ CUSTOM_LOGS("CustomLogs"), @@ -39,6 +39,9 @@ public enum DataSourceType { */ @JsonCreator public static DataSourceType fromString(String value) { + if (value == null) { + return null; + } DataSourceType[] items = DataSourceType.values(); for (DataSourceType item : items) { if (item.toString().equalsIgnoreCase(value)) { @@ -48,6 +51,7 @@ public static DataSourceType fromString(String value) { return null; } + /** {@inheritDoc} */ @JsonValue @Override public String toString() { diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/DataSources.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/DataSources.java index 7e200819a67a..24ef9370530d 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/DataSources.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/DataSources.java @@ -16,11 +16,14 @@ public interface DataSources { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataSourceName Name of the datasource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. */ - void delete(String resourceGroupName, String workspaceName, String dataSourceName); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String dataSourceName, Context context); /** * Deletes a data source instance. @@ -28,14 +31,11 @@ public interface DataSources { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataSourceName Name of the datasource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String dataSourceName, Context context); + void delete(String resourceGroupName, String workspaceName, String dataSourceName); /** * Gets a datasource instance. @@ -43,12 +43,14 @@ Response deleteWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataSourceName Name of the datasource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. */ - DataSource get(String resourceGroupName, String workspaceName, String dataSourceName); + Response getWithResponse( + String resourceGroupName, String workspaceName, String dataSourceName, Context context); /** * Gets a datasource instance. @@ -56,14 +58,12 @@ Response deleteWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataSourceName Name of the datasource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 along with {@link Response}. + * @return a datasource instance. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String dataSourceName, Context context); + DataSource get(String resourceGroupName, String workspaceName, String dataSourceName); /** * Gets the first page of data source instances in a workspace with the link to the next page. diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Gateways.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Gateways.java index 5a19f747a403..fdef99710b75 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Gateways.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Gateways.java @@ -15,11 +15,14 @@ public interface Gateways { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param gatewayId The Log Analytics gateway Id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String workspaceName, String gatewayId); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String gatewayId, Context context); /** * Delete a Log Analytics gateway. @@ -27,12 +30,9 @@ public interface Gateways { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param gatewayId The Log Analytics gateway Id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String gatewayId, Context context); + void delete(String resourceGroupName, String workspaceName, String gatewayId); } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Identity.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Identity.java index 8a8e9ea0e05a..361756f5f444 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Identity.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Identity.java @@ -32,14 +32,18 @@ public class Identity { private IdentityType type; /* - * The list of user identities associated with the resource. The user - * identity dictionary key references will be ARM resource ids in the form: + * The list of user identities associated with the resource. The user identity dictionary key references will be + * ARM resource ids in the form: * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. */ @JsonProperty(value = "userAssignedIdentities") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map userAssignedIdentities; + /** Creates an instance of Identity class. */ + public Identity() { + } + /** * Get the principalId property: The principal ID of resource identity. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/IdentityType.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/IdentityType.java index cc76b60b9686..cf94e7c4de37 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/IdentityType.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/IdentityType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for IdentityType. */ +/** The type of identity that creates/modifies resources. */ public final class IdentityType extends ExpandableStringEnum { /** Static value user for IdentityType. */ public static final IdentityType USER = fromString("user"); @@ -31,6 +31,15 @@ public final class IdentityType extends ExpandableStringEnum { /** Static value None for IdentityType. */ public static final IdentityType NONE = fromString("None"); + /** + * Creates a new instance of IdentityType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IdentityType() { + } + /** * Creates or finds a IdentityType from its string representation. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/IntelligencePacks.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/IntelligencePacks.java index 7c1d35499cfe..eb9cf34e3a73 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/IntelligencePacks.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/IntelligencePacks.java @@ -16,11 +16,14 @@ public interface IntelligencePacks { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param intelligencePackName The name of the intelligence pack to be disabled. + * @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}. */ - void disable(String resourceGroupName, String workspaceName, String intelligencePackName); + Response disableWithResponse( + String resourceGroupName, String workspaceName, String intelligencePackName, Context context); /** * Disables an intelligence pack for a given workspace. @@ -28,14 +31,11 @@ public interface IntelligencePacks { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param intelligencePackName The name of the intelligence pack to be disabled. - * @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}. */ - Response disableWithResponse( - String resourceGroupName, String workspaceName, String intelligencePackName, Context context); + void disable(String resourceGroupName, String workspaceName, String intelligencePackName); /** * Enables an intelligence pack for a given workspace. @@ -43,11 +43,14 @@ Response disableWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param intelligencePackName The name of the intelligence pack to be enabled. + * @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}. */ - void enable(String resourceGroupName, String workspaceName, String intelligencePackName); + Response enableWithResponse( + String resourceGroupName, String workspaceName, String intelligencePackName, Context context); /** * Enables an intelligence pack for a given workspace. @@ -55,37 +58,34 @@ Response disableWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param intelligencePackName The name of the intelligence pack to be enabled. - * @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}. */ - Response enableWithResponse( - String resourceGroupName, String workspaceName, String intelligencePackName, Context context); + void enable(String resourceGroupName, String workspaceName, String intelligencePackName); /** * Lists all the intelligence packs possible and whether they are enabled or disabled for a given workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. */ - List list(String resourceGroupName, String workspaceName); + Response> listWithResponse(String resourceGroupName, String workspaceName, Context context); /** * Lists all the intelligence packs possible and whether they are enabled or disabled for a given workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 along with {@link Response}. + * @return array of IntelligencePack. */ - Response> listWithResponse(String resourceGroupName, String workspaceName, Context context); + List list(String resourceGroupName, String workspaceName); } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/KeyVaultProperties.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/KeyVaultProperties.java index 8d7dbd7125c1..335e527cd251 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/KeyVaultProperties.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/KeyVaultProperties.java @@ -11,8 +11,7 @@ @Fluent public final class KeyVaultProperties { /* - * The Key Vault uri which holds they key associated with the Log Analytics - * cluster. + * The Key Vault uri which holds they key associated with the Log Analytics cluster. */ @JsonProperty(value = "keyVaultUri") private String keyVaultUri; @@ -35,6 +34,10 @@ public final class KeyVaultProperties { @JsonProperty(value = "keyRsaSize") private Integer keyRsaSize; + /** Creates an instance of KeyVaultProperties class. */ + public KeyVaultProperties() { + } + /** * Get the keyVaultUri property: The Key Vault uri which holds they key associated with the Log Analytics cluster. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/LinkedServiceEntityStatus.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/LinkedServiceEntityStatus.java index c03e32437714..8edaba301eff 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/LinkedServiceEntityStatus.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/LinkedServiceEntityStatus.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for LinkedServiceEntityStatus. */ +/** The provisioning state of the linked service. */ public final class LinkedServiceEntityStatus extends ExpandableStringEnum { /** Static value Succeeded for LinkedServiceEntityStatus. */ public static final LinkedServiceEntityStatus SUCCEEDED = fromString("Succeeded"); @@ -22,6 +22,15 @@ public final class LinkedServiceEntityStatus extends ExpandableStringEnum value; + /** Creates an instance of LinkedServiceListResult class. */ + public LinkedServiceListResult() { + } + /** * Get the value property: The list of linked service instances. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/LinkedServices.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/LinkedServices.java index d599d6c04e29..f9a0e4157378 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/LinkedServices.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/LinkedServices.java @@ -43,12 +43,14 @@ public interface LinkedServices { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param linkedServiceName Name of the linked service. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a linked service instance. + * @return a linked service instance along with {@link Response}. */ - LinkedService get(String resourceGroupName, String workspaceName, String linkedServiceName); + Response getWithResponse( + String resourceGroupName, String workspaceName, String linkedServiceName, Context context); /** * Gets a linked service instance. @@ -56,14 +58,12 @@ public interface LinkedServices { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param linkedServiceName Name of the linked service. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a linked service instance along with {@link Response}. + * @return a linked service instance. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String linkedServiceName, Context context); + LinkedService get(String resourceGroupName, String workspaceName, String linkedServiceName); /** * Gets the linked services instances in a workspace. diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/LinkedStorageAccounts.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/LinkedStorageAccounts.java index d5101e1c7203..4d2e27b3228e 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/LinkedStorageAccounts.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/LinkedStorageAccounts.java @@ -16,11 +16,14 @@ public interface LinkedStorageAccounts { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataSourceType Linked storage accounts type. + * @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}. */ - void delete(String resourceGroupName, String workspaceName, DataSourceType dataSourceType); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, DataSourceType dataSourceType, Context context); /** * Deletes all linked storage accounts of a specific data source type associated with the specified workspace. @@ -28,14 +31,11 @@ public interface LinkedStorageAccounts { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataSourceType Linked storage accounts type. - * @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}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, DataSourceType dataSourceType, Context context); + void delete(String resourceGroupName, String workspaceName, DataSourceType dataSourceType); /** * Gets all linked storage account of a specific data source type associated with the specified workspace. @@ -43,12 +43,15 @@ Response deleteWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataSourceType Linked storage accounts type. + * @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 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}. */ - LinkedStorageAccountsResource get(String resourceGroupName, String workspaceName, DataSourceType dataSourceType); + Response getWithResponse( + String resourceGroupName, String workspaceName, DataSourceType dataSourceType, Context context); /** * Gets all linked storage account of a specific data source type associated with the specified workspace. @@ -56,15 +59,12 @@ Response deleteWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataSourceType Linked storage accounts type. - * @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 all linked storage account of a specific data source type associated with the specified workspace along - * with {@link Response}. + * @return all linked storage account of a specific data source type associated with the specified workspace. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, DataSourceType dataSourceType, Context context); + LinkedStorageAccountsResource get(String resourceGroupName, String workspaceName, DataSourceType dataSourceType); /** * Gets all linked storage accounts associated with the specified workspace, storage accounts will be sorted by diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/LinkedStorageAccountsListResult.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/LinkedStorageAccountsListResult.java index 84703c8e91e7..771c62540847 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/LinkedStorageAccountsListResult.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/LinkedStorageAccountsListResult.java @@ -18,6 +18,10 @@ public final class LinkedStorageAccountsListResult { @JsonProperty(value = "value") private List value; + /** Creates an instance of LinkedStorageAccountsListResult class. */ + public LinkedStorageAccountsListResult() { + } + /** * Get the value property: A list of linked storage accounts instances. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/LogAnalyticsQueryPackListResult.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/LogAnalyticsQueryPackListResult.java index d009b2750490..6d67969a1615 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/LogAnalyticsQueryPackListResult.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/LogAnalyticsQueryPackListResult.java @@ -20,12 +20,16 @@ public final class LogAnalyticsQueryPackListResult { private List value; /* - * The URI to get the next set of Log Analytics QueryPack definitions if - * too many QueryPacks where returned in the result set. + * The URI to get the next set of Log Analytics QueryPack definitions if too many QueryPacks where returned in the + * result set. */ @JsonProperty(value = "nextLink") private String nextLink; + /** Creates an instance of LogAnalyticsQueryPackListResult class. */ + public LogAnalyticsQueryPackListResult() { + } + /** * Get the value property: List of Log Analytics QueryPack definitions. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/LogAnalyticsQueryPackQueryListResult.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/LogAnalyticsQueryPackQueryListResult.java index 6f98cc389828..6dbae10f9f9f 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/LogAnalyticsQueryPackQueryListResult.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/LogAnalyticsQueryPackQueryListResult.java @@ -20,12 +20,16 @@ public final class LogAnalyticsQueryPackQueryListResult { private List value; /* - * The URI to get the next set of Log Analytics QueryPack definitions if - * too many QueryPack-Queries where returned in the result set. + * The URI to get the next set of Log Analytics QueryPack definitions if too many QueryPack-Queries where returned + * in the result set. */ @JsonProperty(value = "nextLink") private String nextLink; + /** Creates an instance of LogAnalyticsQueryPackQueryListResult class. */ + public LogAnalyticsQueryPackQueryListResult() { + } + /** * Get the value property: List of Log Analytics QueryPack Query definitions. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/LogAnalyticsQueryPackQueryPropertiesRelated.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/LogAnalyticsQueryPackQueryPropertiesRelated.java index 378b3ab26266..c25020e4be46 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/LogAnalyticsQueryPackQueryPropertiesRelated.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/LogAnalyticsQueryPackQueryPropertiesRelated.java @@ -29,6 +29,10 @@ public final class LogAnalyticsQueryPackQueryPropertiesRelated { @JsonProperty(value = "solutions") private List solutions; + /** Creates an instance of LogAnalyticsQueryPackQueryPropertiesRelated class. */ + public LogAnalyticsQueryPackQueryPropertiesRelated() { + } + /** * Get the categories property: The related categories for the function. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/LogAnalyticsQueryPackQuerySearchProperties.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/LogAnalyticsQueryPackQuerySearchProperties.java index 9168e2b056cf..26d2d172fd8e 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/LogAnalyticsQueryPackQuerySearchProperties.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/LogAnalyticsQueryPackQuerySearchProperties.java @@ -26,6 +26,10 @@ public final class LogAnalyticsQueryPackQuerySearchProperties { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map> tags; + /** Creates an instance of LogAnalyticsQueryPackQuerySearchProperties class. */ + public LogAnalyticsQueryPackQuerySearchProperties() { + } + /** * Get the related property: The related metadata items for the function. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/LogAnalyticsQueryPackQuerySearchPropertiesRelated.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/LogAnalyticsQueryPackQuerySearchPropertiesRelated.java index 8c1de59b9733..179c67d20005 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/LogAnalyticsQueryPackQuerySearchPropertiesRelated.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/LogAnalyticsQueryPackQuerySearchPropertiesRelated.java @@ -29,6 +29,10 @@ public final class LogAnalyticsQueryPackQuerySearchPropertiesRelated { @JsonProperty(value = "solutions") private List solutions; + /** Creates an instance of LogAnalyticsQueryPackQuerySearchPropertiesRelated class. */ + public LogAnalyticsQueryPackQuerySearchPropertiesRelated() { + } + /** * Get the categories property: The related categories for the function. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/MetricName.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/MetricName.java index a5e505e9aa2c..04e4d3a0337c 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/MetricName.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/MetricName.java @@ -22,6 +22,10 @@ public final class MetricName { @JsonProperty(value = "localizedValue") private String localizedValue; + /** Creates an instance of MetricName class. */ + public MetricName() { + } + /** * Get the value property: The system name of the metric. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/OperationDisplay.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/OperationDisplay.java index 193549916b6a..197e2b598a89 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/OperationDisplay.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/OperationDisplay.java @@ -34,6 +34,10 @@ public final class OperationDisplay { @JsonProperty(value = "description") private String description; + /** Creates an instance of OperationDisplay class. */ + public OperationDisplay() { + } + /** * Get the provider property: Service provider: Microsoft OperationsManagement. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/OperationListResult.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/OperationListResult.java index 1c1f5030e8be..d5ff16b481cb 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/OperationListResult.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/OperationListResult.java @@ -13,8 +13,7 @@ @Fluent public final class OperationListResult { /* - * List of solution operations supported by the OperationsManagement - * resource provider. + * List of solution operations supported by the OperationsManagement resource provider. */ @JsonProperty(value = "value") private List value; @@ -25,6 +24,10 @@ public final class OperationListResult { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of OperationListResult class. */ + public OperationListResult() { + } + /** * Get the value property: List of solution operations supported by the OperationsManagement resource provider. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/OperationStatus.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/OperationStatus.java index b432cda28ada..ef4efdaa7b11 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/OperationStatus.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/OperationStatus.java @@ -45,7 +45,9 @@ public interface OperationStatus { String status(); /** - * Gets the error property: Error response The error detail of the operation if any. + * Gets the error property: Error response + * + *

The error detail of the operation if any. * * @return the error value. */ diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/OperationStatuses.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/OperationStatuses.java index 6b5af0e5b8ff..a3b9e6659869 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/OperationStatuses.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/OperationStatuses.java @@ -14,23 +14,23 @@ public interface OperationStatuses { * * @param location The region name of operation. * @param asyncOperationId The operation Id. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of a long running azure asynchronous operation. + * @return the status of a long running azure asynchronous operation along with {@link Response}. */ - OperationStatus get(String location, String asyncOperationId); + Response getWithResponse(String location, String asyncOperationId, Context context); /** * Get the status of a long running azure asynchronous operation. * * @param location The region name of operation. * @param asyncOperationId The operation Id. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the status of a long running azure asynchronous operation along with {@link Response}. + * @return the status of a long running azure asynchronous operation. */ - Response getWithResponse(String location, String asyncOperationId, Context context); + OperationStatus get(String location, String asyncOperationId); } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/PrivateLinkScopedResource.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/PrivateLinkScopedResource.java index 5cb3ad1f8300..0dbc0b4ad879 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/PrivateLinkScopedResource.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/PrivateLinkScopedResource.java @@ -22,6 +22,10 @@ public final class PrivateLinkScopedResource { @JsonProperty(value = "scopeId") private String scopeId; + /** Creates an instance of PrivateLinkScopedResource class. */ + public PrivateLinkScopedResource() { + } + /** * Get the resourceId property: The full resource Id of the private link scope resource. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/ProvisioningStateEnum.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/ProvisioningStateEnum.java index acb2a90a3548..212a8a5f86ed 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/ProvisioningStateEnum.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/ProvisioningStateEnum.java @@ -8,7 +8,10 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ProvisioningStateEnum. */ +/** + * 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. + */ public final class ProvisioningStateEnum extends ExpandableStringEnum { /** Static value Updating for ProvisioningStateEnum. */ public static final ProvisioningStateEnum UPDATING = fromString("Updating"); @@ -19,6 +22,18 @@ public final class ProvisioningStateEnum extends ExpandableStringEnum { /** Static value Enabled for PublicNetworkAccessType. */ public static final PublicNetworkAccessType ENABLED = fromString("Enabled"); @@ -16,6 +16,15 @@ public final class PublicNetworkAccessType extends ExpandableStringEnum { /** Static value pending for PurgeState. */ public static final PurgeState PENDING = fromString("pending"); @@ -16,6 +16,15 @@ public final class PurgeState extends ExpandableStringEnum { /** Static value completed for PurgeState. */ public static final PurgeState COMPLETED = fromString("completed"); + /** + * Creates a new instance of PurgeState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PurgeState() { + } + /** * Creates or finds a PurgeState from its string representation. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Queries.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Queries.java index e0fb8e10620f..89d4c6586eef 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Queries.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Queries.java @@ -96,12 +96,14 @@ PagedIterable search( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param queryPackName The name of the Log Analytics QueryPack resource. * @param id The id of a specific query defined in the Log Analytics QueryPack. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific Log Analytics Query defined within a Log Analytics QueryPack. + * @return a specific Log Analytics Query defined within a Log Analytics QueryPack along with {@link Response}. */ - LogAnalyticsQueryPackQuery get(String resourceGroupName, String queryPackName, String id); + Response getWithResponse( + String resourceGroupName, String queryPackName, String id, Context context); /** * Gets a specific Log Analytics Query defined within a Log Analytics QueryPack. @@ -109,14 +111,12 @@ PagedIterable search( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param queryPackName The name of the Log Analytics QueryPack resource. * @param id The id of a specific query defined in the Log Analytics QueryPack. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a specific Log Analytics Query defined within a Log Analytics QueryPack along with {@link Response}. + * @return a specific Log Analytics Query defined within a Log Analytics QueryPack. */ - Response getWithResponse( - String resourceGroupName, String queryPackName, String id, Context context); + LogAnalyticsQueryPackQuery get(String resourceGroupName, String queryPackName, String id); /** * Deletes a specific Query defined within an Log Analytics QueryPack. @@ -124,11 +124,13 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param queryPackName The name of the Log Analytics QueryPack resource. * @param id The id of a specific query defined in the Log Analytics QueryPack. + * @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}. */ - void delete(String resourceGroupName, String queryPackName, String id); + Response deleteWithResponse(String resourceGroupName, String queryPackName, String id, Context context); /** * Deletes a specific Query defined within an Log Analytics QueryPack. @@ -136,13 +138,11 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param queryPackName The name of the Log Analytics QueryPack resource. * @param id The id of a specific query defined in the Log Analytics QueryPack. - * @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}. */ - Response deleteWithResponse(String resourceGroupName, String queryPackName, String id, Context context); + void delete(String resourceGroupName, String queryPackName, String id); /** * Gets a specific Log Analytics Query defined within a Log Analytics QueryPack. diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/QueryPacks.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/QueryPacks.java index e7ea0ed6151f..8600631574d2 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/QueryPacks.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/QueryPacks.java @@ -7,6 +7,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; +import com.azure.resourcemanager.loganalytics.fluent.models.LogAnalyticsQueryPackInner; /** Resource collection API of QueryPacks. */ public interface QueryPacks { @@ -58,15 +59,35 @@ public interface QueryPacks { PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Deletes a Log Analytics QueryPack. + * Creates a Log Analytics QueryPack. Note: You cannot specify a different value for InstrumentationKey nor AppId in + * the Put operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param queryPackName The name of the Log Analytics QueryPack resource. + * @param logAnalyticsQueryPackPayload Properties that need to be specified to create or update a Log Analytics + * QueryPack. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Log Analytics QueryPack definition along with {@link Response}. */ - void deleteByResourceGroup(String resourceGroupName, String queryPackName); + Response createOrUpdateWithoutNameWithResponse( + String resourceGroupName, LogAnalyticsQueryPackInner logAnalyticsQueryPackPayload, Context context); + + /** + * Creates a Log Analytics QueryPack. Note: You cannot specify a different value for InstrumentationKey nor AppId in + * the Put operation. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param logAnalyticsQueryPackPayload Properties that need to be specified to create or update a Log Analytics + * QueryPack. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Log Analytics QueryPack definition. + */ + LogAnalyticsQueryPack createOrUpdateWithoutName( + String resourceGroupName, LogAnalyticsQueryPackInner logAnalyticsQueryPackPayload); /** * Deletes a Log Analytics QueryPack. @@ -79,19 +100,18 @@ public interface QueryPacks { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ - Response deleteWithResponse(String resourceGroupName, String queryPackName, Context context); + Response deleteByResourceGroupWithResponse(String resourceGroupName, String queryPackName, Context context); /** - * Returns a Log Analytics QueryPack. + * Deletes a Log Analytics QueryPack. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param queryPackName The name of the Log Analytics QueryPack resource. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return an Log Analytics QueryPack definition. */ - LogAnalyticsQueryPack getByResourceGroup(String resourceGroupName, String queryPackName); + void deleteByResourceGroup(String resourceGroupName, String queryPackName); /** * Returns a Log Analytics QueryPack. @@ -107,6 +127,18 @@ public interface QueryPacks { Response getByResourceGroupWithResponse( String resourceGroupName, String queryPackName, Context context); + /** + * Returns a Log Analytics QueryPack. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param queryPackName The name of the Log Analytics QueryPack resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return an Log Analytics QueryPack definition. + */ + LogAnalyticsQueryPack getByResourceGroup(String resourceGroupName, String queryPackName); + /** * Returns a Log Analytics QueryPack. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/QueryPacksResource.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/QueryPacksResource.java index f3e9adcd0403..68dc108f124b 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/QueryPacksResource.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/QueryPacksResource.java @@ -11,6 +11,10 @@ /** An azure resource object. */ @Fluent public class QueryPacksResource extends Resource { + /** Creates an instance of QueryPacksResource class. */ + public QueryPacksResource() { + } + /** {@inheritDoc} */ @Override public QueryPacksResource withLocation(String location) { diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/RestoredLogs.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/RestoredLogs.java index c1ee33404adf..95e873fe84a5 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/RestoredLogs.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/RestoredLogs.java @@ -29,6 +29,16 @@ public final class RestoredLogs { @JsonProperty(value = "sourceTable") private String sourceTable; + /* + * Search results table async operation id. + */ + @JsonProperty(value = "azureAsyncOperationId", access = JsonProperty.Access.WRITE_ONLY) + private String azureAsyncOperationId; + + /** Creates an instance of RestoredLogs class. */ + public RestoredLogs() { + } + /** * Get the startRestoreTime property: The timestamp to start the restore from (UTC). * @@ -89,6 +99,15 @@ public RestoredLogs withSourceTable(String sourceTable) { return this; } + /** + * Get the azureAsyncOperationId property: Search results table async operation id. + * + * @return the azureAsyncOperationId value. + */ + public String azureAsyncOperationId() { + return this.azureAsyncOperationId; + } + /** * Validates the instance. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/ResultStatistics.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/ResultStatistics.java index bfd37647d887..edf8125c48c9 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/ResultStatistics.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/ResultStatistics.java @@ -22,6 +22,16 @@ public final class ResultStatistics { @JsonProperty(value = "ingestedRecords", access = JsonProperty.Access.WRITE_ONLY) private Integer ingestedRecords; + /* + * Search job: Amount of scanned data. + */ + @JsonProperty(value = "scannedGb", access = JsonProperty.Access.WRITE_ONLY) + private Float scannedGb; + + /** Creates an instance of ResultStatistics class. */ + public ResultStatistics() { + } + /** * Get the progress property: Search job completion percentage. * @@ -40,6 +50,15 @@ public Integer ingestedRecords() { return this.ingestedRecords; } + /** + * Get the scannedGb property: Search job: Amount of scanned data. + * + * @return the scannedGb value. + */ + public Float scannedGb() { + return this.scannedGb; + } + /** * Validates the instance. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/SavedSearches.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/SavedSearches.java index 7cfd4b6b0a65..da74885c5e05 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/SavedSearches.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/SavedSearches.java @@ -15,11 +15,14 @@ public interface SavedSearches { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param savedSearchId The id of the saved search. + * @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}. */ - void delete(String resourceGroupName, String workspaceName, String savedSearchId); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String savedSearchId, Context context); /** * Deletes the specified saved search in a given workspace. @@ -27,14 +30,11 @@ public interface SavedSearches { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param savedSearchId The id of the saved search. - * @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}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String savedSearchId, Context context); + void delete(String resourceGroupName, String workspaceName, String savedSearchId); /** * Gets the specified saved search for a given workspace. @@ -42,12 +42,14 @@ Response deleteWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param savedSearchId The id of the saved search. + * @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 specified saved search for a given workspace. + * @return the specified saved search for a given workspace along with {@link Response}. */ - SavedSearch get(String resourceGroupName, String workspaceName, String savedSearchId); + Response getWithResponse( + String resourceGroupName, String workspaceName, String savedSearchId, Context context); /** * Gets the specified saved search for a given workspace. @@ -55,40 +57,38 @@ Response deleteWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param savedSearchId The id of the saved search. - * @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 specified saved search for a given workspace along with {@link Response}. + * @return the specified saved search for a given workspace. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String savedSearchId, Context context); + SavedSearch get(String resourceGroupName, String workspaceName, String savedSearchId); /** * Gets the saved searches for a given Log Analytics Workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. */ - SavedSearchesListResult listByWorkspace(String resourceGroupName, String workspaceName); + Response listByWorkspaceWithResponse( + String resourceGroupName, String workspaceName, Context context); /** * Gets the saved searches for a given Log Analytics Workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 along with {@link Response}. + * @return the saved searches for a given Log Analytics Workspace. */ - Response listByWorkspaceWithResponse( - String resourceGroupName, String workspaceName, Context context); + SavedSearchesListResult listByWorkspace(String resourceGroupName, String workspaceName); /** * Gets the specified saved search for a given workspace. diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Schema.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Schema.java index 12dcbed78175..f048a85be829 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Schema.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Schema.java @@ -66,8 +66,8 @@ public final class Schema { private TableTypeEnum tableType; /* - * The subtype describes what APIs can be used to interact with the table, - * and what features are available against it. + * The subtype describes what APIs can be used to interact with the table, and what features are available against + * it. */ @JsonProperty(value = "tableSubType", access = JsonProperty.Access.WRITE_ONLY) private TableSubTypeEnum tableSubType; @@ -78,17 +78,9 @@ public final class Schema { @JsonProperty(value = "solutions", access = JsonProperty.Access.WRITE_ONLY) private List solutions; - /* - * Parameters of the search job that initiated this table. - */ - @JsonProperty(value = "searchResults", access = JsonProperty.Access.WRITE_ONLY) - private SearchResults searchResults; - - /* - * Parameters of the restore operation that initiated this table. - */ - @JsonProperty(value = "restoredLogs", access = JsonProperty.Access.WRITE_ONLY) - private RestoredLogs restoredLogs; + /** Creates an instance of Schema class. */ + public Schema() { + } /** * Get the name property: Table name. @@ -234,24 +226,6 @@ public List solutions() { return this.solutions; } - /** - * Get the searchResults property: Parameters of the search job that initiated this table. - * - * @return the searchResults value. - */ - public SearchResults searchResults() { - return this.searchResults; - } - - /** - * Get the restoredLogs property: Parameters of the restore operation that initiated this table. - * - * @return the restoredLogs value. - */ - public RestoredLogs restoredLogs() { - return this.restoredLogs; - } - /** * Validates the instance. * @@ -264,11 +238,5 @@ public void validate() { if (standardColumns() != null) { standardColumns().forEach(e -> e.validate()); } - if (searchResults() != null) { - searchResults().validate(); - } - if (restoredLogs() != null) { - restoredLogs().validate(); - } } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Schemas.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Schemas.java index 37492e54521e..16c29d8f8116 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Schemas.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Schemas.java @@ -14,23 +14,23 @@ public interface Schemas { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the schema for a given workspace. + * @return the schema for a given workspace along with {@link Response}. */ - SearchGetSchemaResponse get(String resourceGroupName, String workspaceName); + Response getWithResponse(String resourceGroupName, String workspaceName, Context context); /** * Gets the schema for a given workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 along with {@link Response}. + * @return the schema for a given workspace. */ - Response getWithResponse(String resourceGroupName, String workspaceName, Context context); + SearchGetSchemaResponse get(String resourceGroupName, String workspaceName); } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/SearchMetadata.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/SearchMetadata.java index e9d095838409..9435093d6e17 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/SearchMetadata.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/SearchMetadata.java @@ -114,6 +114,10 @@ public final class SearchMetadata { @JsonProperty(value = "schema") private SearchMetadataSchema schema; + /** Creates an instance of SearchMetadata class. */ + public SearchMetadata() { + } + /** * Get the searchId property: The request id of the search. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/SearchMetadataSchema.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/SearchMetadataSchema.java index d39853fc45e0..553a57a9bfdf 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/SearchMetadataSchema.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/SearchMetadataSchema.java @@ -22,6 +22,10 @@ public final class SearchMetadataSchema { @JsonProperty(value = "version") private Integer version; + /** Creates an instance of SearchMetadataSchema class. */ + public SearchMetadataSchema() { + } + /** * Get the name property: The name of the metadata schema. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/SearchResults.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/SearchResults.java index f18a4e89ffdb..20855ce51b28 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/SearchResults.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/SearchResults.java @@ -47,6 +47,16 @@ public final class SearchResults { @JsonProperty(value = "sourceTable", access = JsonProperty.Access.WRITE_ONLY) private String sourceTable; + /* + * Search results table async operation id. + */ + @JsonProperty(value = "azureAsyncOperationId", access = JsonProperty.Access.WRITE_ONLY) + private String azureAsyncOperationId; + + /** Creates an instance of SearchResults class. */ + public SearchResults() { + } + /** * Get the query property: Search job query. * @@ -156,6 +166,15 @@ public String sourceTable() { return this.sourceTable; } + /** + * Get the azureAsyncOperationId property: Search results table async operation id. + * + * @return the azureAsyncOperationId value. + */ + public String azureAsyncOperationId() { + return this.azureAsyncOperationId; + } + /** * Validates the instance. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/SearchSchemaValue.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/SearchSchemaValue.java index fa5f695d4b24..77eb899549d5 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/SearchSchemaValue.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/SearchSchemaValue.java @@ -53,6 +53,10 @@ public final class SearchSchemaValue { @JsonProperty(value = "ownerType") private List ownerType; + /** Creates an instance of SearchSchemaValue class. */ + public SearchSchemaValue() { + } + /** * Get the name property: The name of the schema. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/SearchSort.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/SearchSort.java index 831cd352d537..6aa9f465d914 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/SearchSort.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/SearchSort.java @@ -22,6 +22,10 @@ public final class SearchSort { @JsonProperty(value = "order") private SearchSortEnum order; + /** Creates an instance of SearchSort class. */ + public SearchSort() { + } + /** * Get the name property: The name of the field the search query is sorted on. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/SearchSortEnum.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/SearchSortEnum.java index c0f93080a8bc..22048600ded5 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/SearchSortEnum.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/SearchSortEnum.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for SearchSortEnum. */ +/** The sort order of the search. */ public final class SearchSortEnum extends ExpandableStringEnum { /** Static value asc for SearchSortEnum. */ public static final SearchSortEnum ASC = fromString("asc"); @@ -16,6 +16,15 @@ public final class SearchSortEnum extends ExpandableStringEnum { /** Static value desc for SearchSortEnum. */ public static final SearchSortEnum DESC = fromString("desc"); + /** + * Creates a new instance of SearchSortEnum value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SearchSortEnum() { + } + /** * Creates or finds a SearchSortEnum from its string representation. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/SharedKeysOperations.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/SharedKeysOperations.java index 60f14ecd2028..b42e28930979 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/SharedKeysOperations.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/SharedKeysOperations.java @@ -14,25 +14,25 @@ public interface SharedKeysOperations { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the shared keys for a workspace. + * @return the shared keys for a workspace along with {@link Response}. */ - SharedKeys getSharedKeys(String resourceGroupName, String workspaceName); + Response getSharedKeysWithResponse(String resourceGroupName, String workspaceName, Context context); /** * Gets the shared keys for a workspace. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 along with {@link Response}. + * @return the shared keys for a workspace. */ - Response getSharedKeysWithResponse(String resourceGroupName, String workspaceName, Context context); + SharedKeys getSharedKeys(String resourceGroupName, String workspaceName); /** * Regenerates the shared keys for a Log Analytics Workspace. These keys are used to connect Microsoft Operational @@ -40,12 +40,13 @@ public interface SharedKeysOperations { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the shared keys for a workspace. + * @return the shared keys for a workspace along with {@link Response}. */ - SharedKeys regenerate(String resourceGroupName, String workspaceName); + Response regenerateWithResponse(String resourceGroupName, String workspaceName, Context context); /** * Regenerates the shared keys for a Log Analytics Workspace. These keys are used to connect Microsoft Operational @@ -53,11 +54,10 @@ public interface SharedKeysOperations { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the shared keys for a workspace along with {@link Response}. + * @return the shared keys for a workspace. */ - Response regenerateWithResponse(String resourceGroupName, String workspaceName, Context context); + SharedKeys regenerate(String resourceGroupName, String workspaceName); } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/SkuNameEnum.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/SkuNameEnum.java index ae48f295878f..479e2f1b4951 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/SkuNameEnum.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/SkuNameEnum.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for SkuNameEnum. */ +/** The name of the Service Tier. */ public final class SkuNameEnum extends ExpandableStringEnum { /** Static value Free for SkuNameEnum. */ public static final SkuNameEnum FREE = fromString("Free"); @@ -31,6 +31,15 @@ public final class SkuNameEnum extends ExpandableStringEnum { /** Static value CapacityReservation for SkuNameEnum. */ public static final SkuNameEnum CAPACITY_RESERVATION = fromString("CapacityReservation"); + /** + * Creates a new instance of SkuNameEnum value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SkuNameEnum() { + } + /** * Creates or finds a SkuNameEnum from its string representation. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/SourceEnum.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/SourceEnum.java index 24456a42ae4e..48b9ad7062b3 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/SourceEnum.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/SourceEnum.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for SourceEnum. */ +/** Table's creator. */ public final class SourceEnum extends ExpandableStringEnum { /** Static value microsoft for SourceEnum. */ public static final SourceEnum MICROSOFT = fromString("microsoft"); @@ -16,6 +16,15 @@ public final class SourceEnum extends ExpandableStringEnum { /** Static value customer for SourceEnum. */ public static final SourceEnum CUSTOMER = fromString("customer"); + /** + * Creates a new instance of SourceEnum value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public SourceEnum() { + } + /** * Creates or finds a SourceEnum from its string representation. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/StorageAccount.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/StorageAccount.java index 058a2aed2656..dbbe98ce349f 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/StorageAccount.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/StorageAccount.java @@ -23,6 +23,10 @@ public final class StorageAccount { @JsonProperty(value = "key", required = true) private String key; + /** Creates an instance of StorageAccount class. */ + public StorageAccount() { + } + /** * Get the id property: The Azure Resource Manager ID of the storage account resource. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/StorageInsightConfigs.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/StorageInsightConfigs.java index 50465aa24258..a1df2e374e92 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/StorageInsightConfigs.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/StorageInsightConfigs.java @@ -16,12 +16,14 @@ public interface StorageInsightConfigs { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param storageInsightName Name of the storageInsightsConfigs resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a storage insight instance. + * @return a storage insight instance along with {@link Response}. */ - StorageInsight get(String resourceGroupName, String workspaceName, String storageInsightName); + Response getWithResponse( + String resourceGroupName, String workspaceName, String storageInsightName, Context context); /** * Gets a storage insight instance. @@ -29,14 +31,12 @@ public interface StorageInsightConfigs { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param storageInsightName Name of the storageInsightsConfigs resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a storage insight instance along with {@link Response}. + * @return a storage insight instance. */ - Response getWithResponse( - String resourceGroupName, String workspaceName, String storageInsightName, Context context); + StorageInsight get(String resourceGroupName, String workspaceName, String storageInsightName); /** * Deletes a storageInsightsConfigs resource. @@ -44,11 +44,14 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param storageInsightName Name of the storageInsightsConfigs resource. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String workspaceName, String storageInsightName); + Response deleteWithResponse( + String resourceGroupName, String workspaceName, String storageInsightName, Context context); /** * Deletes a storageInsightsConfigs resource. @@ -56,14 +59,11 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param storageInsightName Name of the storageInsightsConfigs resource. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String workspaceName, String storageInsightName, Context context); + void delete(String resourceGroupName, String workspaceName, String storageInsightName); /** * Lists the storage insight instances within a workspace. diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/StorageInsightListResult.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/StorageInsightListResult.java index 8ec3ee4b82cc..3e45dde44f3f 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/StorageInsightListResult.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/StorageInsightListResult.java @@ -24,6 +24,10 @@ public final class StorageInsightListResult { @JsonProperty(value = "@odata.nextLink") private String odataNextLink; + /** Creates an instance of StorageInsightListResult class. */ + public StorageInsightListResult() { + } + /** * Get the value property: A list of storage insight items. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/StorageInsightState.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/StorageInsightState.java index 13132948f9e5..efc0ff33f54e 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/StorageInsightState.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/StorageInsightState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for StorageInsightState. */ +/** The state of the storage insight connection to the workspace. */ public final class StorageInsightState extends ExpandableStringEnum { /** Static value OK for StorageInsightState. */ public static final StorageInsightState OK = fromString("OK"); @@ -16,6 +16,15 @@ public final class StorageInsightState extends ExpandableStringEnum migrateWithResponse(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. * + * @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. + */ + void migrate(); + + /** + * Cancel a log analytics workspace search results table query run. + * * @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}. */ - Response migrateWithResponse(Context context); + Response cancelSearchWithResponse(Context context); + + /** + * Cancel a log analytics workspace search results table query run. + * + * @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. + */ + void cancelSearch(); } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/TablePlanEnum.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/TablePlanEnum.java index 8fd9da3d4f48..48579178de07 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/TablePlanEnum.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/TablePlanEnum.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for TablePlanEnum. */ +/** Instruct the system how to handle and charge the logs ingested to this table. */ public final class TablePlanEnum extends ExpandableStringEnum { /** Static value Basic for TablePlanEnum. */ public static final TablePlanEnum BASIC = fromString("Basic"); @@ -16,6 +16,15 @@ public final class TablePlanEnum extends ExpandableStringEnum { /** Static value Analytics for TablePlanEnum. */ public static final TablePlanEnum ANALYTICS = fromString("Analytics"); + /** + * Creates a new instance of TablePlanEnum value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TablePlanEnum() { + } + /** * Creates or finds a TablePlanEnum from its string representation. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/TableSubTypeEnum.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/TableSubTypeEnum.java index 79bedc34b8e8..84aecc2b775b 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/TableSubTypeEnum.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/TableSubTypeEnum.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for TableSubTypeEnum. */ +/** + * The subtype describes what APIs can be used to interact with the table, and what features are available against it. + */ public final class TableSubTypeEnum extends ExpandableStringEnum { /** Static value Any for TableSubTypeEnum. */ public static final TableSubTypeEnum ANY = fromString("Any"); @@ -19,6 +21,15 @@ public final class TableSubTypeEnum extends ExpandableStringEnum { /** Static value Microsoft for TableTypeEnum. */ public static final TableTypeEnum MICROSOFT = fromString("Microsoft"); @@ -22,6 +22,15 @@ public final class TableTypeEnum extends ExpandableStringEnum { /** Static value SearchResults for TableTypeEnum. */ public static final TableTypeEnum SEARCH_RESULTS = fromString("SearchResults"); + /** + * Creates a new instance of TableTypeEnum value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public TableTypeEnum() { + } + /** * Creates or finds a TableTypeEnum from its string representation. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Tables.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Tables.java index a52a4353045c..9fa1acffcfb3 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Tables.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Tables.java @@ -43,12 +43,13 @@ public interface Tables { * @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 a Log Analytics workspace table. + * @return a Log Analytics workspace table along with {@link Response}. */ - Table get(String resourceGroupName, String workspaceName, String tableName); + Response

getWithResponse(String resourceGroupName, String workspaceName, String tableName, Context context); /** * Gets a Log Analytics workspace table. @@ -56,13 +57,12 @@ public interface Tables { * @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 a Log Analytics workspace table along with {@link Response}. + * @return a Log Analytics workspace table. */ - Response
getWithResponse(String resourceGroupName, String workspaceName, String tableName, Context context); + Table get(String resourceGroupName, String workspaceName, String tableName); /** * Delete a Log Analytics workspace table. @@ -96,11 +96,14 @@ public interface Tables { * @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}. */ - void migrate(String resourceGroupName, String workspaceName, String tableName); + Response migrateWithResponse( + 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 @@ -109,15 +112,39 @@ public interface Tables { * @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. + */ + void migrate(String resourceGroupName, String workspaceName, String tableName); + + /** + * Cancel a log analytics workspace search results table query run. + * + * @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}. */ - Response migrateWithResponse( + Response cancelSearchWithResponse( String resourceGroupName, String workspaceName, String tableName, Context context); + /** + * Cancel a log analytics workspace search results table query run. + * + * @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. + */ + void cancelSearch(String resourceGroupName, String workspaceName, String tableName); + /** * Gets a Log Analytics workspace table. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/TablesListResult.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/TablesListResult.java index 35faef222aa4..e013eb08d2f6 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/TablesListResult.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/TablesListResult.java @@ -18,6 +18,10 @@ public final class TablesListResult { @JsonProperty(value = "value") private List value; + /** Creates an instance of TablesListResult class. */ + public TablesListResult() { + } + /** * Get the value property: A list of data tables. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Tag.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Tag.java index 28154aa59d8e..cd40b18b2b7d 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Tag.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Tag.java @@ -23,6 +23,10 @@ public final class Tag { @JsonProperty(value = "value", required = true) private String value; + /** Creates an instance of Tag class. */ + public Tag() { + } + /** * Get the name property: The tag name. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/TagsResource.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/TagsResource.java index ebb5400da3a8..54e1ce9b5399 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/TagsResource.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/TagsResource.java @@ -19,6 +19,10 @@ public final class TagsResource { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; + /** Creates an instance of TagsResource class. */ + public TagsResource() { + } + /** * Get the tags property: Resource tags. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Type.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Type.java index 6db44f7c4ce8..256e9b2b963f 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Type.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Type.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for Type. */ +/** The type of the destination resource. */ public final class Type extends ExpandableStringEnum { /** Static value StorageAccount for Type. */ public static final Type STORAGE_ACCOUNT = fromString("StorageAccount"); @@ -16,6 +16,15 @@ public final class Type extends ExpandableStringEnum { /** Static value EventHub for Type. */ public static final Type EVENT_HUB = fromString("EventHub"); + /** + * Creates a new instance of Type value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Type() { + } + /** * Creates or finds a Type from its string representation. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/UserIdentityProperties.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/UserIdentityProperties.java index 1f5f0d2f2cae..3bb4416ab9f4 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/UserIdentityProperties.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/UserIdentityProperties.java @@ -22,6 +22,10 @@ public final class UserIdentityProperties { @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) private String clientId; + /** Creates an instance of UserIdentityProperties class. */ + public UserIdentityProperties() { + } + /** * Get the principalId property: The principal id of user assigned identity. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Workspace.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Workspace.java index ddbffba09a83..e7924891462c 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Workspace.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/Workspace.java @@ -47,6 +47,13 @@ public interface Workspace { */ Map tags(); + /** + * Gets the identity property: The identity of the resource. + * + * @return the identity value. + */ + Identity identity(); + /** * Gets the systemData property: Metadata pertaining to creation and last modification of the resource. * @@ -55,7 +62,7 @@ public interface Workspace { SystemDataAutoGenerated systemData(); /** - * Gets the etag property: The ETag of the workspace. + * Gets the etag property: The etag of the workspace. * * @return the etag value. */ @@ -229,6 +236,7 @@ interface WithResourceGroup { */ interface WithCreate extends DefinitionStages.WithTags, + DefinitionStages.WithIdentity, DefinitionStages.WithEtag, DefinitionStages.WithSku, DefinitionStages.WithRetentionInDays, @@ -263,12 +271,22 @@ interface WithTags { */ WithCreate withTags(Map tags); } + /** The stage of the Workspace definition allowing to specify identity. */ + interface WithIdentity { + /** + * Specifies the identity property: The identity of the resource.. + * + * @param identity The identity of the resource. + * @return the next definition stage. + */ + WithCreate withIdentity(Identity identity); + } /** The stage of the Workspace definition allowing to specify etag. */ interface WithEtag { /** - * Specifies the etag property: The ETag of the workspace.. + * Specifies the etag property: The etag of the workspace.. * - * @param etag The ETag of the workspace. + * @param etag The etag of the workspace. * @return the next definition stage. */ WithCreate withEtag(String etag); @@ -373,6 +391,7 @@ interface WithDefaultDataCollectionRuleResourceId { /** The template for Workspace update. */ interface Update extends UpdateStages.WithTags, + UpdateStages.WithIdentity, UpdateStages.WithSku, UpdateStages.WithRetentionInDays, UpdateStages.WithWorkspaceCapping, @@ -408,6 +427,16 @@ interface WithTags { */ Update withTags(Map tags); } + /** The stage of the Workspace update allowing to specify identity. */ + interface WithIdentity { + /** + * Specifies the identity property: The identity of the resource.. + * + * @param identity The identity of the resource. + * @return the next definition stage. + */ + Update withIdentity(Identity identity); + } /** The stage of the Workspace update allowing to specify sku. */ interface WithSku { /** diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspaceCapping.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspaceCapping.java index ec2746c7f015..5e25baacbda8 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspaceCapping.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspaceCapping.java @@ -28,6 +28,10 @@ public final class WorkspaceCapping { @JsonProperty(value = "dataIngestionStatus", access = JsonProperty.Access.WRITE_ONLY) private DataIngestionStatus dataIngestionStatus; + /** Creates an instance of WorkspaceCapping class. */ + public WorkspaceCapping() { + } + /** * Get the dailyQuotaGb property: The workspace daily quota for ingestion. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspaceEntityStatus.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspaceEntityStatus.java index 0c9328f91253..379e89ae56dc 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspaceEntityStatus.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspaceEntityStatus.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for WorkspaceEntityStatus. */ +/** The provisioning state of the workspace. */ public final class WorkspaceEntityStatus extends ExpandableStringEnum { /** Static value Creating for WorkspaceEntityStatus. */ public static final WorkspaceEntityStatus CREATING = fromString("Creating"); @@ -31,6 +31,15 @@ public final class WorkspaceEntityStatus extends ExpandableStringEnum additionalProperties; + /** Creates an instance of WorkspaceFeatures class. */ + public WorkspaceFeatures() { + } + /** * Get the enableDataExport property: Flag that indicate if data should be exported. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspaceListManagementGroupsResult.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspaceListManagementGroupsResult.java index ce76d4567546..3594fb94aebf 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspaceListManagementGroupsResult.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspaceListManagementGroupsResult.java @@ -18,6 +18,10 @@ public final class WorkspaceListManagementGroupsResult { @JsonProperty(value = "value") private List value; + /** Creates an instance of WorkspaceListManagementGroupsResult class. */ + public WorkspaceListManagementGroupsResult() { + } + /** * Get the value property: Gets or sets a list of management groups attached to the workspace. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspaceListResult.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspaceListResult.java index 744ab803f4db..8e5b222df701 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspaceListResult.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspaceListResult.java @@ -18,6 +18,10 @@ public final class WorkspaceListResult { @JsonProperty(value = "value") private List value; + /** Creates an instance of WorkspaceListResult class. */ + public WorkspaceListResult() { + } + /** * Get the value property: A list of workspaces. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspaceListUsagesResult.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspaceListUsagesResult.java index 81ca20d1deb6..552e21a1af27 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspaceListUsagesResult.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspaceListUsagesResult.java @@ -18,6 +18,10 @@ public final class WorkspaceListUsagesResult { @JsonProperty(value = "value") private List value; + /** Creates an instance of WorkspaceListUsagesResult class. */ + public WorkspaceListUsagesResult() { + } + /** * Get the value property: Gets or sets a list of usage metrics for a workspace. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspacePatch.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspacePatch.java index c46b74370e47..f5e478f4f18e 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspacePatch.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspacePatch.java @@ -20,6 +20,12 @@ public final class WorkspacePatch extends AzureEntityResource { @JsonProperty(value = "properties") private WorkspaceProperties innerProperties; + /* + * The identity of the resource. + */ + @JsonProperty(value = "identity") + private Identity identity; + /* * Resource tags. Optional. */ @@ -27,6 +33,10 @@ public final class WorkspacePatch extends AzureEntityResource { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; + /** Creates an instance of WorkspacePatch class. */ + public WorkspacePatch() { + } + /** * Get the innerProperties property: Workspace properties. * @@ -36,6 +46,26 @@ private WorkspaceProperties innerProperties() { return this.innerProperties; } + /** + * Get the identity property: The identity of the resource. + * + * @return the identity value. + */ + public Identity identity() { + return this.identity; + } + + /** + * Set the identity property: The identity of the resource. + * + * @param identity the identity value to set. + * @return the WorkspacePatch object itself. + */ + public WorkspacePatch withIdentity(Identity identity) { + this.identity = identity; + return this; + } + /** * Get the tags property: Resource tags. Optional. * @@ -302,5 +332,8 @@ public void validate() { if (innerProperties() != null) { innerProperties().validate(); } + if (identity() != null) { + identity().validate(); + } } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspacePurgeBody.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspacePurgeBody.java index 3a9d44144155..64e88277d4c4 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspacePurgeBody.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspacePurgeBody.java @@ -19,12 +19,15 @@ public final class WorkspacePurgeBody { private String table; /* - * The set of columns and filters (queries) to run over them to purge the - * resulting data. + * The set of columns and filters (queries) to run over them to purge the resulting data. */ @JsonProperty(value = "filters", required = true) private List filters; + /** Creates an instance of WorkspacePurgeBody class. */ + public WorkspacePurgeBody() { + } + /** * Get the table property: Table from which to purge data. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspacePurgeBodyFilters.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspacePurgeBodyFilters.java index 5fc93bd40f7e..dbab197eee58 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspacePurgeBodyFilters.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspacePurgeBodyFilters.java @@ -17,27 +17,29 @@ public final class WorkspacePurgeBodyFilters { private String column; /* - * A query operator to evaluate over the provided column and value(s). - * Supported operators are ==, =~, in, in~, >, >=, <, <=, between, and have - * the same behavior as they would in a KQL query. + * A query operator to evaluate over the provided column and value(s). Supported operators are ==, =~, in, in~, >, + * >=, <, <=, between, and have the same behavior as they would in a KQL query. */ @JsonProperty(value = "operator") private String operator; /* - * the value for the operator to function over. This can be a number (e.g., - * > 100), a string (timestamp >= '2017-09-01') or array of values. + * the value for the operator to function over. This can be a number (e.g., > 100), a string (timestamp >= + * '2017-09-01') or array of values. */ @JsonProperty(value = "value") private Object value; /* - * When filtering over custom dimensions, this key will be used as the name - * of the custom dimension. + * When filtering over custom dimensions, this key will be used as the name of the custom dimension. */ @JsonProperty(value = "key") private String key; + /** Creates an instance of WorkspacePurgeBodyFilters class. */ + public WorkspacePurgeBodyFilters() { + } + /** * Get the column property: The column of the table over which the given query should run. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspacePurges.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspacePurges.java index 1acdea1ac2c1..d7d171e0da38 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspacePurges.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspacePurges.java @@ -23,12 +23,14 @@ public interface WorkspacePurges { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param body Describes the body of a request to purge data in a single table of an Log Analytics Workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return response containing operationId for a specific purge action. */ - WorkspacePurgeResponse purge(String resourceGroupName, String workspaceName, WorkspacePurgeBody body); + Response purgeWithResponse( + String resourceGroupName, String workspaceName, WorkspacePurgeBody body, Context context); /** * Purges data in an Log Analytics workspace by a set of user-defined filters. @@ -44,14 +46,12 @@ public interface WorkspacePurges { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param body Describes the body of a request to purge data in a single table of an Log Analytics Workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return response containing operationId for a specific purge action. */ - Response purgeWithResponse( - String resourceGroupName, String workspaceName, WorkspacePurgeBody body, Context context); + WorkspacePurgeResponse purge(String resourceGroupName, String workspaceName, WorkspacePurgeBody body); /** * Gets status of an ongoing purge operation. @@ -59,12 +59,14 @@ Response purgeWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param purgeId In a purge status request, this is the Id of the operation the status of which is returned. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return status of an ongoing purge operation. + * @return status of an ongoing purge operation along with {@link Response}. */ - WorkspacePurgeStatusResponse getPurgeStatus(String resourceGroupName, String workspaceName, String purgeId); + Response getPurgeStatusWithResponse( + String resourceGroupName, String workspaceName, String purgeId, Context context); /** * Gets status of an ongoing purge operation. @@ -72,12 +74,10 @@ Response purgeWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param purgeId In a purge status request, this is the Id of the operation the status of which is returned. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return status of an ongoing purge operation along with {@link Response}. + * @return status of an ongoing purge operation. */ - Response getPurgeStatusWithResponse( - String resourceGroupName, String workspaceName, String purgeId, Context context); + WorkspacePurgeStatusResponse getPurgeStatus(String resourceGroupName, String workspaceName, String purgeId); } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspacePurgesPurgeHeaders.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspacePurgesPurgeHeaders.java index a1be1cb0383a..ea51c0f166fd 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspacePurgesPurgeHeaders.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspacePurgesPurgeHeaders.java @@ -5,6 +5,8 @@ package com.azure.resourcemanager.loganalytics.models; import com.azure.core.annotation.Fluent; +import com.azure.core.http.HttpHeaderName; +import com.azure.core.http.HttpHeaders; import com.fasterxml.jackson.annotation.JsonProperty; /** The WorkspacePurgesPurgeHeaders model. */ @@ -16,6 +18,18 @@ public final class WorkspacePurgesPurgeHeaders { @JsonProperty(value = "x-ms-status-location") private String xMsStatusLocation; + private static final HttpHeaderName X_MS_STATUS_LOCATION = HttpHeaderName.fromString("x-ms-status-location"); + + // HttpHeaders containing the raw property values. + /** + * Creates an instance of WorkspacePurgesPurgeHeaders class. + * + * @param rawHeaders The raw HttpHeaders that will be used to create the property values. + */ + public WorkspacePurgesPurgeHeaders(HttpHeaders rawHeaders) { + this.xMsStatusLocation = rawHeaders.getValue(X_MS_STATUS_LOCATION); + } + /** * Get the xMsStatusLocation property: The x-ms-status-location property. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspaceSku.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspaceSku.java index 925620353d15..9c0df1d81b2a 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspaceSku.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspaceSku.java @@ -18,8 +18,7 @@ public final class WorkspaceSku { private WorkspaceSkuNameEnum name; /* - * The capacity reservation level in GB for this workspace, when - * CapacityReservation sku is selected. + * The capacity reservation level in GB for this workspace, when CapacityReservation sku is selected. */ @JsonProperty(value = "capacityReservationLevel") private CapacityReservationLevel capacityReservationLevel; @@ -30,6 +29,10 @@ public final class WorkspaceSku { @JsonProperty(value = "lastSkuUpdate", access = JsonProperty.Access.WRITE_ONLY) private String lastSkuUpdate; + /** Creates an instance of WorkspaceSku class. */ + public WorkspaceSku() { + } + /** * Get the name property: The name of the SKU. * diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspaceSkuNameEnum.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspaceSkuNameEnum.java index 7570b502c52d..543c709c6856 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspaceSkuNameEnum.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/main/java/com/azure/resourcemanager/loganalytics/models/WorkspaceSkuNameEnum.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for WorkspaceSkuNameEnum. */ +/** The name of the SKU. */ public final class WorkspaceSkuNameEnum extends ExpandableStringEnum { /** Static value Free for WorkspaceSkuNameEnum. */ public static final WorkspaceSkuNameEnum FREE = fromString("Free"); @@ -34,6 +34,15 @@ public final class WorkspaceSkuNameEnum extends ExpandableStringEnum listByResourceGroup(String resourceGroupName, Context context); - /** - * Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same - * subscription, resource group and location. The name is kept for 14 days and cannot be used for another workspace. - * To remove the workspace completely and release the name, use the force flag. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param force Deletes the workspace without the recovery option. A workspace that was deleted with this flag - * cannot be recovered. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void delete(String resourceGroupName, String workspaceName, Boolean force); - /** * Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same * subscription, resource group and location. The name is kept for 14 days and cannot be used for another workspace. @@ -102,25 +87,25 @@ public interface Workspaces { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a workspace instance. + * @return a workspace instance along with {@link Response}. */ - Workspace getByResourceGroup(String resourceGroupName, String workspaceName); + Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, Context context); /** * Gets a workspace instance. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a workspace instance along with {@link Response}. + * @return a workspace instance. */ - Response getByResourceGroupWithResponse(String resourceGroupName, String workspaceName, Context context); + Workspace getByResourceGroup(String resourceGroupName, String workspaceName); /** * Gets a workspace instance. diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/AvailableServiceTiersListByWorkspaceSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/AvailableServiceTiersListByWorkspaceSamples.java index 6767da818dad..5a2ccbf0bbc6 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/AvailableServiceTiersListByWorkspaceSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/AvailableServiceTiersListByWorkspaceSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; - /** Samples for AvailableServiceTiers ListByWorkspace. */ public final class AvailableServiceTiersListByWorkspaceSamples { /* @@ -17,6 +15,8 @@ public final class AvailableServiceTiersListByWorkspaceSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void availableServiceTiers(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.availableServiceTiers().listByWorkspaceWithResponse("rg1", "workspace1", Context.NONE); + manager + .availableServiceTiers() + .listByWorkspaceWithResponse("rg1", "workspace1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/ClustersDeleteSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/ClustersDeleteSamples.java index 152dee3b2209..a8106bf680c8 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/ClustersDeleteSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/ClustersDeleteSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; - /** Samples for Clusters Delete. */ public final class ClustersDeleteSamples { /* @@ -17,6 +15,6 @@ public final class ClustersDeleteSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void clustersDelete(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.clusters().delete("oiautorest6685", "oiautorest6685", Context.NONE); + manager.clusters().delete("oiautorest6685", "oiautorest6685", com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/ClustersGetByResourceGroupSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/ClustersGetByResourceGroupSamples.java index fe72eb15d8b7..93ff918e0602 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/ClustersGetByResourceGroupSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/ClustersGetByResourceGroupSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; - /** Samples for Clusters GetByResourceGroup. */ public final class ClustersGetByResourceGroupSamples { /* @@ -17,6 +15,8 @@ public final class ClustersGetByResourceGroupSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void clustersGet(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.clusters().getByResourceGroupWithResponse("oiautorest6685", "oiautorest6685", Context.NONE); + manager + .clusters() + .getByResourceGroupWithResponse("oiautorest6685", "oiautorest6685", com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/ClustersListByResourceGroupSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/ClustersListByResourceGroupSamples.java index 698e8e0f41be..bac3be76c71d 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/ClustersListByResourceGroupSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/ClustersListByResourceGroupSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; - /** Samples for Clusters ListByResourceGroup. */ public final class ClustersListByResourceGroupSamples { /* @@ -17,6 +15,6 @@ public final class ClustersListByResourceGroupSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void clustersGet(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.clusters().listByResourceGroup("oiautorest6685", Context.NONE); + manager.clusters().listByResourceGroup("oiautorest6685", com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/ClustersListSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/ClustersListSamples.java index aa1d5b723477..987b7ea6a784 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/ClustersListSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/ClustersListSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; - /** Samples for Clusters List. */ public final class ClustersListSamples { /* @@ -17,6 +15,6 @@ public final class ClustersListSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void clustersSubscriptionList(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.clusters().list(Context.NONE); + manager.clusters().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/ClustersUpdateSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/ClustersUpdateSamples.java index 04940b930c26..c7bec6a3170d 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/ClustersUpdateSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/ClustersUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -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; @@ -30,7 +29,7 @@ public static void clustersPatch(com.azure.resourcemanager.loganalytics.LogAnaly Cluster resource = manager .clusters() - .getByResourceGroupWithResponse("oiautorest6685", "oiautorest6685", Context.NONE) + .getByResourceGroupWithResponse("oiautorest6685", "oiautorest6685", com.azure.core.util.Context.NONE) .getValue(); resource .update() @@ -48,9 +47,9 @@ public static void clustersPatch(com.azure.resourcemanager.loganalytics.LogAnaly .withName(ClusterSkuNameEnum.CAPACITY_RESERVATION)) .withKeyVaultProperties( new KeyVaultProperties() - .withKeyVaultUri("https://aztest2170.vault.azure.net") - .withKeyName("aztest2170cert") - .withKeyVersion("654ft6c4e63845cbb50fd6fg51540429") + .withKeyVaultUri("fakeTokenPlaceholder") + .withKeyName("fakeTokenPlaceholder") + .withKeyVersion("fakeTokenPlaceholder") .withKeyRsaSize(1024)) .apply(); } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/DataExportsDeleteSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/DataExportsDeleteSamples.java index 0dd6299f48d2..36d14bd7cdce 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/DataExportsDeleteSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/DataExportsDeleteSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; - /** Samples for DataExports Delete. */ public final class DataExportsDeleteSamples { /* @@ -17,6 +15,8 @@ public final class DataExportsDeleteSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void dataExportDelete(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.dataExports().deleteWithResponse("RgTest1", "DeWnTest1234", "export1", Context.NONE); + manager + .dataExports() + .deleteWithResponse("RgTest1", "DeWnTest1234", "export1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/DataExportsGetSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/DataExportsGetSamples.java index 76d9bfc5e259..d852c5c10728 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/DataExportsGetSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/DataExportsGetSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; - /** Samples for DataExports Get. */ public final class DataExportsGetSamples { /* @@ -17,6 +15,6 @@ public final class DataExportsGetSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void dataExportGet(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.dataExports().getWithResponse("RgTest1", "DeWnTest1234", "export1", Context.NONE); + manager.dataExports().getWithResponse("RgTest1", "DeWnTest1234", "export1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/DataExportsListByWorkspaceSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/DataExportsListByWorkspaceSamples.java index 1c410768e331..e289ece486fd 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/DataExportsListByWorkspaceSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/DataExportsListByWorkspaceSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; - /** Samples for DataExports ListByWorkspace. */ public final class DataExportsListByWorkspaceSamples { /* @@ -17,6 +15,6 @@ public final class DataExportsListByWorkspaceSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void dataExportGet(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.dataExports().listByWorkspace("RgTest1", "DeWnTest1234", Context.NONE); + manager.dataExports().listByWorkspace("RgTest1", "DeWnTest1234", com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/DataSourcesDeleteSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/DataSourcesDeleteSamples.java index 263a6746929f..7cba7e03d4f5 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/DataSourcesDeleteSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/DataSourcesDeleteSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; - /** Samples for DataSources Delete. */ public final class DataSourcesDeleteSamples { /* @@ -17,6 +15,8 @@ public final class DataSourcesDeleteSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void dataSourcesDelete(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.dataSources().deleteWithResponse("OIAutoRest5123", "AzTest9724", "AzTestDS774", Context.NONE); + manager + .dataSources() + .deleteWithResponse("OIAutoRest5123", "AzTest9724", "AzTestDS774", com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/DataSourcesGetSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/DataSourcesGetSamples.java index 18327723f020..2dc8bfbab0dc 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/DataSourcesGetSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/DataSourcesGetSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; - /** Samples for DataSources Get. */ public final class DataSourcesGetSamples { /* @@ -17,6 +15,8 @@ public final class DataSourcesGetSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void dataSourcesGet(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.dataSources().getWithResponse("OIAutoRest5123", "AzTest9724", "AzTestDS774", Context.NONE); + manager + .dataSources() + .getWithResponse("OIAutoRest5123", "AzTest9724", "AzTestDS774", com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/DataSourcesListByWorkspaceSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/DataSourcesListByWorkspaceSamples.java index 227a5a9f3464..dc30c4404a91 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/DataSourcesListByWorkspaceSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/DataSourcesListByWorkspaceSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; - /** Samples for DataSources ListByWorkspace. */ public final class DataSourcesListByWorkspaceSamples { /* @@ -19,6 +17,7 @@ public final class DataSourcesListByWorkspaceSamples { public static void dataSourcesListByWorkspace(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { manager .dataSources() - .listByWorkspace("OIAutoRest5123", "AzTest9724", "kind='WindowsEvent'", null, Context.NONE); + .listByWorkspace( + "OIAutoRest5123", "AzTest9724", "kind='WindowsEvent'", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/DeletedWorkspacesListByResourceGroupSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/DeletedWorkspacesListByResourceGroupSamples.java index 9806c1159307..fcf9e2781eeb 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/DeletedWorkspacesListByResourceGroupSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/DeletedWorkspacesListByResourceGroupSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.loganalytics.generated; -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 + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/WorkspacesListByResourceGroup.json */ /** * Sample code: WorkspacesGet. @@ -17,6 +15,6 @@ public final class DeletedWorkspacesListByResourceGroupSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void workspacesGet(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.deletedWorkspaces().listByResourceGroup("oiautorest6685", Context.NONE); + manager.deletedWorkspaces().listByResourceGroup("oiautorest6685", com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/DeletedWorkspacesListSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/DeletedWorkspacesListSamples.java index a58f040eed04..93d06a233a6f 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/DeletedWorkspacesListSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/DeletedWorkspacesListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.loganalytics.generated; -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 + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/WorkspacesSubscriptionList.json */ /** * Sample code: WorkspacesSubscriptionList. @@ -17,6 +15,6 @@ public final class DeletedWorkspacesListSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void workspacesSubscriptionList(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.deletedWorkspaces().list(Context.NONE); + manager.deletedWorkspaces().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/GatewaysDeleteSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/GatewaysDeleteSamples.java index 95565bba5c4c..d0ddbe5f243b 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/GatewaysDeleteSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/GatewaysDeleteSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; - /** Samples for Gateways Delete. */ public final class GatewaysDeleteSamples { /* @@ -19,6 +17,10 @@ public final class GatewaysDeleteSamples { public static void deleteGateways(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { manager .gateways() - .deleteWithResponse("OIAutoRest5123", "aztest5048", "00000000-0000-0000-0000-00000000000", Context.NONE); + .deleteWithResponse( + "OIAutoRest5123", + "aztest5048", + "00000000-0000-0000-0000-00000000000", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/IntelligencePacksDisableSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/IntelligencePacksDisableSamples.java index b60f112540d5..e1103742cbce 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/IntelligencePacksDisableSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/IntelligencePacksDisableSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; - /** Samples for IntelligencePacks Disable. */ public final class IntelligencePacksDisableSamples { /* @@ -17,6 +15,8 @@ public final class IntelligencePacksDisableSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void intelligencePacksDisable(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.intelligencePacks().disableWithResponse("rg1", "TestLinkWS", "ChangeTracking", Context.NONE); + manager + .intelligencePacks() + .disableWithResponse("rg1", "TestLinkWS", "ChangeTracking", com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/IntelligencePacksEnableSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/IntelligencePacksEnableSamples.java index 5a9a644e63ad..41e7fafd9961 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/IntelligencePacksEnableSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/IntelligencePacksEnableSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; - /** Samples for IntelligencePacks Enable. */ public final class IntelligencePacksEnableSamples { /* @@ -17,6 +15,8 @@ public final class IntelligencePacksEnableSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void intelligencePacksEnable(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.intelligencePacks().enableWithResponse("rg1", "TestLinkWS", "ChangeTracking", Context.NONE); + manager + .intelligencePacks() + .enableWithResponse("rg1", "TestLinkWS", "ChangeTracking", com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/IntelligencePacksListSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/IntelligencePacksListSamples.java index bce3cb4ebc34..92538dd6d24f 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/IntelligencePacksListSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/IntelligencePacksListSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; - /** Samples for IntelligencePacks List. */ public final class IntelligencePacksListSamples { /* @@ -17,6 +15,6 @@ public final class IntelligencePacksListSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void intelligencePacksList(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.intelligencePacks().listWithResponse("rg1", "TestLinkWS", Context.NONE); + manager.intelligencePacks().listWithResponse("rg1", "TestLinkWS", com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/LinkedServicesDeleteSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/LinkedServicesDeleteSamples.java index 47366e5b2f2c..b4cc70c725f5 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/LinkedServicesDeleteSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/LinkedServicesDeleteSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; - /** Samples for LinkedServices Delete. */ public final class LinkedServicesDeleteSamples { /* @@ -17,6 +15,6 @@ public final class LinkedServicesDeleteSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void linkedServicesDelete(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.linkedServices().delete("rg1", "TestLinkWS", "Cluster", Context.NONE); + manager.linkedServices().delete("rg1", "TestLinkWS", "Cluster", com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/LinkedServicesGetSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/LinkedServicesGetSamples.java index 5f27716eab02..e5d707ea1d3f 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/LinkedServicesGetSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/LinkedServicesGetSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; - /** Samples for LinkedServices Get. */ public final class LinkedServicesGetSamples { /* @@ -17,6 +15,6 @@ public final class LinkedServicesGetSamples { * @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); + manager.linkedServices().getWithResponse("mms-eus", "TestLinkWS", "Cluster", com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/LinkedServicesListByWorkspaceSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/LinkedServicesListByWorkspaceSamples.java index d618d2fa27f9..ab73bb31f8b8 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/LinkedServicesListByWorkspaceSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/LinkedServicesListByWorkspaceSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; - /** Samples for LinkedServices ListByWorkspace. */ public final class LinkedServicesListByWorkspaceSamples { /* @@ -18,6 +16,6 @@ public final class LinkedServicesListByWorkspaceSamples { */ public static void linkedServicesListByWorkspace( com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.linkedServices().listByWorkspace("mms-eus", "TestLinkWS", Context.NONE); + manager.linkedServices().listByWorkspace("mms-eus", "TestLinkWS", com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/LinkedStorageAccountsDeleteSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/LinkedStorageAccountsDeleteSamples.java index f61f09fecc9a..5087b4555009 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/LinkedStorageAccountsDeleteSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/LinkedStorageAccountsDeleteSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.loganalytics.models.DataSourceType; /** Samples for LinkedStorageAccounts Delete. */ @@ -20,6 +19,7 @@ public final class LinkedStorageAccountsDeleteSamples { public static void linkedStorageAccountsDelete(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { manager .linkedStorageAccounts() - .deleteWithResponse("mms-eus", "testLinkStorageAccountsWS", DataSourceType.CUSTOM_LOGS, Context.NONE); + .deleteWithResponse( + "mms-eus", "testLinkStorageAccountsWS", DataSourceType.CUSTOM_LOGS, com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/LinkedStorageAccountsGetSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/LinkedStorageAccountsGetSamples.java index 0972a2ac456f..0f73f3f8469b 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/LinkedStorageAccountsGetSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/LinkedStorageAccountsGetSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.loganalytics.models.DataSourceType; /** Samples for LinkedStorageAccounts Get. */ @@ -20,6 +19,7 @@ public final class LinkedStorageAccountsGetSamples { public static void linkedStorageAccountsGet(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { manager .linkedStorageAccounts() - .getWithResponse("mms-eus", "testLinkStorageAccountsWS", DataSourceType.CUSTOM_LOGS, Context.NONE); + .getWithResponse( + "mms-eus", "testLinkStorageAccountsWS", DataSourceType.CUSTOM_LOGS, com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/LinkedStorageAccountsListByWorkspaceSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/LinkedStorageAccountsListByWorkspaceSamples.java index d80b7395362c..e62f8af4afa8 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/LinkedStorageAccountsListByWorkspaceSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/LinkedStorageAccountsListByWorkspaceSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; - /** Samples for LinkedStorageAccounts ListByWorkspace. */ public final class LinkedStorageAccountsListByWorkspaceSamples { /* @@ -18,6 +16,8 @@ public final class LinkedStorageAccountsListByWorkspaceSamples { */ public static void getsListOfLinkedStorageAccountsOnAWorkspace( com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.linkedStorageAccounts().listByWorkspace("mms-eus", "testLinkStorageAccountsWS", Context.NONE); + manager + .linkedStorageAccounts() + .listByWorkspace("mms-eus", "testLinkStorageAccountsWS", com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/ManagementGroupsListSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/ManagementGroupsListSamples.java index 4a062b0455c3..2093e3408246 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/ManagementGroupsListSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/ManagementGroupsListSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; - /** Samples for ManagementGroups List. */ public final class ManagementGroupsListSamples { /* @@ -18,6 +16,6 @@ public final class ManagementGroupsListSamples { */ public static void workspacesListManagementGroups( com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.managementGroups().list("rg1", "TestLinkWS", Context.NONE); + manager.managementGroups().list("rg1", "TestLinkWS", com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/OperationStatusesGetSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/OperationStatusesGetSamples.java index 7cbaf590cc78..fd9d52e8e90a 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/OperationStatusesGetSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/OperationStatusesGetSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; - /** Samples for OperationStatuses Get. */ public final class OperationStatusesGetSamples { /* @@ -17,6 +15,8 @@ public final class OperationStatusesGetSamples { * @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); + manager + .operationStatuses() + .getWithResponse("West US", "713192d7-503f-477a-9cfe-4efc3ee2bd11", com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/OperationsListSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/OperationsListSamples.java index 86c665472a47..e0c28c3dc852 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/OperationsListSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/OperationsListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.loganalytics.generated; -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 + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/OperationsListByTenant.json */ /** * Sample code: Get specific operation status. @@ -17,6 +15,6 @@ public final class OperationsListSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void getSpecificOperationStatus(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.operations().list(Context.NONE); + manager.operations().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/QueriesDeleteSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/QueriesDeleteSamples.java index b1dd7861fcad..37dfdeee6e53 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/QueriesDeleteSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/QueriesDeleteSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; - /** Samples for Queries Delete. */ public final class QueriesDeleteSamples { /* @@ -20,6 +18,9 @@ public static void queryDelete(com.azure.resourcemanager.loganalytics.LogAnalyti manager .queries() .deleteWithResponse( - "my-resource-group", "my-querypack", "a449f8af-8e64-4b3a-9b16-5a7165ff98c4", Context.NONE); + "my-resource-group", + "my-querypack", + "a449f8af-8e64-4b3a-9b16-5a7165ff98c4", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/QueriesGetSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/QueriesGetSamples.java index 04bbc64f65f5..88ec2be4ed68 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/QueriesGetSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/QueriesGetSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; - /** Samples for Queries Get. */ public final class QueriesGetSamples { /* @@ -19,6 +17,10 @@ public final class QueriesGetSamples { public static void queryGet(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { manager .queries() - .getWithResponse("my-resource-group", "my-querypack", "a449f8af-8e64-4b3a-9b16-5a7165ff98c4", Context.NONE); + .getWithResponse( + "my-resource-group", + "my-querypack", + "a449f8af-8e64-4b3a-9b16-5a7165ff98c4", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/QueriesListSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/QueriesListSamples.java index d7d75bd8d04f..1981b2527601 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/QueriesListSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/QueriesListSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; - /** Samples for Queries List. */ public final class QueriesListSamples { /* @@ -17,6 +15,6 @@ public final class QueriesListSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void queryList(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.queries().list("my-resource-group", "my-querypack", null, true, null, Context.NONE); + manager.queries().list("my-resource-group", "my-querypack", null, true, null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/QueriesSearchSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/QueriesSearchSamples.java index 77093bd1c714..b39ad34ff6ed 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/QueriesSearchSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/QueriesSearchSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.loganalytics.models.LogAnalyticsQueryPackQuerySearchProperties; import com.azure.resourcemanager.loganalytics.models.LogAnalyticsQueryPackQuerySearchPropertiesRelated; import java.util.Arrays; @@ -35,7 +34,7 @@ public static void querySearch(com.azure.resourcemanager.loganalytics.LogAnalyti 3L, true, null, - Context.NONE); + com.azure.core.util.Context.NONE); } @SuppressWarnings("unchecked") diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/QueriesUpdateSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/QueriesUpdateSamples.java index e625f227d3cb..1aa313cd0592 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/QueriesUpdateSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/QueriesUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.loganalytics.models.LogAnalyticsQueryPackQuery; import com.azure.resourcemanager.loganalytics.models.LogAnalyticsQueryPackQueryPropertiesRelated; import java.util.Arrays; @@ -26,7 +25,10 @@ public static void queryPatch(com.azure.resourcemanager.loganalytics.LogAnalytic manager .queries() .getWithResponse( - "my-resource-group", "my-querypack", "a449f8af-8e64-4b3a-9b16-5a7165ff98c4", Context.NONE) + "my-resource-group", + "my-querypack", + "a449f8af-8e64-4b3a-9b16-5a7165ff98c4", + com.azure.core.util.Context.NONE) .getValue(); resource .update() diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/QueryPacksCreateOrUpdateWithoutNameSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/QueryPacksCreateOrUpdateWithoutNameSamples.java new file mode 100644 index 000000000000..1949b7b2e360 --- /dev/null +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/QueryPacksCreateOrUpdateWithoutNameSamples.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.loganalytics.generated; + +import com.azure.resourcemanager.loganalytics.fluent.models.LogAnalyticsQueryPackInner; +import java.util.HashMap; +import java.util.Map; + +/** Samples for QueryPacks CreateOrUpdateWithoutName. */ +public final class QueryPacksCreateOrUpdateWithoutNameSamples { + /* + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksCreateNoName.json + */ + /** + * Sample code: QueryPackCreateNoName. + * + * @param manager Entry point to LogAnalyticsManager. + */ + public static void queryPackCreateNoName(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { + manager + .queryPacks() + .createOrUpdateWithoutNameWithResponse( + "my-resource-group", + new LogAnalyticsQueryPackInner().withLocation("South Central US"), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackUpdateNoName.json + */ + /** + * Sample code: QueryPackUpdateNoName. + * + * @param manager Entry point to LogAnalyticsManager. + */ + public static void queryPackUpdateNoName(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { + manager + .queryPacks() + .createOrUpdateWithoutNameWithResponse( + "my-resource-group", + new LogAnalyticsQueryPackInner().withLocation("South Central US").withTags(mapOf("Tag1", "Value1")), + com.azure.core.util.Context.NONE); + } + + @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; + } +} diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/QueryPacksDeleteSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/QueryPacksDeleteSamples.java index b825ea55093a..ed3ebafa5584 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/QueryPacksDeleteSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/QueryPacksDeleteSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; - /** Samples for QueryPacks Delete. */ public final class QueryPacksDeleteSamples { /* @@ -17,6 +15,8 @@ public final class QueryPacksDeleteSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void queryPacksDelete(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.queryPacks().deleteWithResponse("my-resource-group", "my-querypack", Context.NONE); + manager + .queryPacks() + .deleteByResourceGroupWithResponse("my-resource-group", "my-querypack", com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/QueryPacksGetByResourceGroupSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/QueryPacksGetByResourceGroupSamples.java index 1cebcee46683..4d4580eca80c 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/QueryPacksGetByResourceGroupSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/QueryPacksGetByResourceGroupSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; - /** Samples for QueryPacks GetByResourceGroup. */ public final class QueryPacksGetByResourceGroupSamples { /* @@ -17,6 +15,8 @@ public final class QueryPacksGetByResourceGroupSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void queryPackGet(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.queryPacks().getByResourceGroupWithResponse("my-resource-group", "my-querypack", Context.NONE); + manager + .queryPacks() + .getByResourceGroupWithResponse("my-resource-group", "my-querypack", com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/QueryPacksListByResourceGroupSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/QueryPacksListByResourceGroupSamples.java index 62229174b3e8..5ad9eae5bdce 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/QueryPacksListByResourceGroupSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/QueryPacksListByResourceGroupSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; - /** Samples for QueryPacks ListByResourceGroup. */ public final class QueryPacksListByResourceGroupSamples { /* @@ -18,6 +16,6 @@ public final class QueryPacksListByResourceGroupSamples { */ public static void queryPackListByResourceGroup( com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.queryPacks().listByResourceGroup("my-resource-group", Context.NONE); + manager.queryPacks().listByResourceGroup("my-resource-group", com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/QueryPacksListSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/QueryPacksListSamples.java index 142820ba3d8e..8695ac6f2c20 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/QueryPacksListSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/QueryPacksListSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; - /** Samples for QueryPacks List. */ public final class QueryPacksListSamples { /* @@ -17,6 +15,6 @@ public final class QueryPacksListSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void queryPacksList(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.queryPacks().list(Context.NONE); + manager.queryPacks().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/QueryPacksUpdateTagsSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/QueryPacksUpdateTagsSamples.java index a9f2973354dd..b7c5b96c6b69 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/QueryPacksUpdateTagsSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/QueryPacksUpdateTagsSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.loganalytics.models.LogAnalyticsQueryPack; import java.util.HashMap; import java.util.Map; @@ -23,7 +22,7 @@ public static void queryPackUpdateTagsOnly(com.azure.resourcemanager.loganalytic LogAnalyticsQueryPack resource = manager .queryPacks() - .getByResourceGroupWithResponse("my-resource-group", "my-querypack", Context.NONE) + .getByResourceGroupWithResponse("my-resource-group", "my-querypack", com.azure.core.util.Context.NONE) .getValue(); resource.update().withTags(mapOf("Tag1", "Value1", "Tag2", "Value2")).apply(); } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/SavedSearchesDeleteSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/SavedSearchesDeleteSamples.java index 5e92dc4fc78c..5636d96b8f6e 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/SavedSearchesDeleteSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/SavedSearchesDeleteSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; - /** Samples for SavedSearches Delete. */ public final class SavedSearchesDeleteSamples { /* @@ -19,6 +17,7 @@ public final class SavedSearchesDeleteSamples { public static void savedSearchesDelete(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { manager .savedSearches() - .deleteWithResponse("TestRG", "TestWS", "00000000-0000-0000-0000-00000000000", Context.NONE); + .deleteWithResponse( + "TestRG", "TestWS", "00000000-0000-0000-0000-00000000000", com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/SavedSearchesGetSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/SavedSearchesGetSamples.java index 13a11aaf8c9a..216f4ecc9331 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/SavedSearchesGetSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/SavedSearchesGetSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; - /** Samples for SavedSearches Get. */ public final class SavedSearchesGetSamples { /* @@ -19,6 +17,7 @@ public final class SavedSearchesGetSamples { public static void savedSearchesGet(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { manager .savedSearches() - .getWithResponse("TestRG", "TestWS", "00000000-0000-0000-0000-00000000000", Context.NONE); + .getWithResponse( + "TestRG", "TestWS", "00000000-0000-0000-0000-00000000000", com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/SavedSearchesListByWorkspaceSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/SavedSearchesListByWorkspaceSamples.java index 490d1acabb6e..830651105c81 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/SavedSearchesListByWorkspaceSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/SavedSearchesListByWorkspaceSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; - /** Samples for SavedSearches ListByWorkspace. */ public final class SavedSearchesListByWorkspaceSamples { /* @@ -17,6 +15,6 @@ public final class SavedSearchesListByWorkspaceSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void savedSearchesList(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.savedSearches().listByWorkspaceWithResponse("TestRG", "TestWS", Context.NONE); + manager.savedSearches().listByWorkspaceWithResponse("TestRG", "TestWS", com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/SchemaGetSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/SchemaGetSamples.java index 8c084078b77e..1b11f985ce51 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/SchemaGetSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/SchemaGetSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; - /** Samples for Schema Get. */ public final class SchemaGetSamples { /* @@ -17,6 +15,6 @@ public final class SchemaGetSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void workspacesGetSchema(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.schemas().getWithResponse("mms-eus", "atlantisdemo", Context.NONE); + manager.schemas().getWithResponse("mms-eus", "atlantisdemo", com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/SharedKeysOperationGetSharedKeysSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/SharedKeysOperationGetSharedKeysSamples.java index 54d8dbb45b57..0993ed552134 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/SharedKeysOperationGetSharedKeysSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/SharedKeysOperationGetSharedKeysSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; - /** Samples for SharedKeysOperation GetSharedKeys. */ public final class SharedKeysOperationGetSharedKeysSamples { /* @@ -17,6 +15,6 @@ public final class SharedKeysOperationGetSharedKeysSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void sharedKeysList(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.sharedKeysOperations().getSharedKeysWithResponse("rg1", "TestLinkWS", Context.NONE); + manager.sharedKeysOperations().getSharedKeysWithResponse("rg1", "TestLinkWS", com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/SharedKeysOperationRegenerateSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/SharedKeysOperationRegenerateSamples.java index 73405bc5e328..6c717b5c7216 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/SharedKeysOperationRegenerateSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/SharedKeysOperationRegenerateSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; - /** Samples for SharedKeysOperation Regenerate. */ public final class SharedKeysOperationRegenerateSamples { /* @@ -17,6 +15,6 @@ public final class SharedKeysOperationRegenerateSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void regenerateSharedKeys(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.sharedKeysOperations().regenerateWithResponse("rg1", "workspace1", Context.NONE); + manager.sharedKeysOperations().regenerateWithResponse("rg1", "workspace1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/StorageInsightConfigsCreateOrUpdateSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/StorageInsightConfigsCreateOrUpdateSamples.java index 81d88ae4da84..579966a9ef0c 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/StorageInsightConfigsCreateOrUpdateSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/StorageInsightConfigsCreateOrUpdateSamples.java @@ -28,7 +28,7 @@ public static void storageInsightsCreate(com.azure.resourcemanager.loganalytics. new StorageAccount() .withId( "/subscriptions/00000000-0000-0000-0000-000000000005/resourcegroups/OIAutoRest6987/providers/microsoft.storage/storageaccounts/AzTestFakeSA9945") - .withKey("1234")) + .withKey("fakeTokenPlaceholder")) .create(); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/StorageInsightConfigsDeleteSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/StorageInsightConfigsDeleteSamples.java index be25c5eb9070..90a82355d1a8 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/StorageInsightConfigsDeleteSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/StorageInsightConfigsDeleteSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; - /** Samples for StorageInsightConfigs Delete. */ public final class StorageInsightConfigsDeleteSamples { /* @@ -19,6 +17,6 @@ public final class StorageInsightConfigsDeleteSamples { public static void storageInsightsDelete(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { manager .storageInsightConfigs() - .deleteWithResponse("OIAutoRest5123", "aztest5048", "AzTestSI1110", Context.NONE); + .deleteWithResponse("OIAutoRest5123", "aztest5048", "AzTestSI1110", com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/StorageInsightConfigsGetSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/StorageInsightConfigsGetSamples.java index 0591beab3d5d..b3c0eb65a25f 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/StorageInsightConfigsGetSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/StorageInsightConfigsGetSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; - /** Samples for StorageInsightConfigs Get. */ public final class StorageInsightConfigsGetSamples { /* @@ -17,6 +15,8 @@ public final class StorageInsightConfigsGetSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void storageInsightsGet(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.storageInsightConfigs().getWithResponse("OIAutoRest5123", "aztest5048", "AzTestSI1110", Context.NONE); + manager + .storageInsightConfigs() + .getWithResponse("OIAutoRest5123", "aztest5048", "AzTestSI1110", com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/StorageInsightConfigsListByWorkspaceSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/StorageInsightConfigsListByWorkspaceSamples.java index 414bbc9f7132..a565418c1156 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/StorageInsightConfigsListByWorkspaceSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/StorageInsightConfigsListByWorkspaceSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; - /** Samples for StorageInsightConfigs ListByWorkspace. */ public final class StorageInsightConfigsListByWorkspaceSamples { /* @@ -17,6 +15,8 @@ public final class StorageInsightConfigsListByWorkspaceSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void storageInsightsList(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.storageInsightConfigs().listByWorkspace("OIAutoRest5123", "aztest5048", Context.NONE); + manager + .storageInsightConfigs() + .listByWorkspace("OIAutoRest5123", "aztest5048", com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/TablesCancelSearchSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/TablesCancelSearchSamples.java new file mode 100644 index 000000000000..dce55eed84b6 --- /dev/null +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/TablesCancelSearchSamples.java @@ -0,0 +1,23 @@ +// 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.generated; + +/** Samples for Tables CancelSearch. */ +public final class TablesCancelSearchSamples { + /* + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/TablesSearchCancel.json + */ + /** + * Sample code: TablesSearchCancel. + * + * @param manager Entry point to LogAnalyticsManager. + */ + public static void tablesSearchCancel(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { + manager + .tables() + .cancelSearchWithResponse( + "oiautorest6685", "oiautorest6685", "table1_SRCH", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/TablesCreateOrUpdateSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/TablesCreateOrUpdateSamples.java index efc71d8cd6de..672f3da5ad0f 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/TablesCreateOrUpdateSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/TablesCreateOrUpdateSamples.java @@ -12,7 +12,7 @@ /** 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 + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/TablesUpsert.json */ /** * Sample code: TablesUpsert. diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/TablesDeleteSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/TablesDeleteSamples.java index 81d3ce82fdfe..a43cd8c53a5b 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/TablesDeleteSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/TablesDeleteSamples.java @@ -4,19 +4,17 @@ package com.azure.resourcemanager.loganalytics.generated; -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 + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/TablesDelete.json */ /** - * Sample code: TablesGet. + * Sample code: TablesDelete. * * @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); + public static void tablesDelete(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { + manager.tables().delete("oiautorest6685", "oiautorest6685", "table1_CL", com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/TablesGetSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/TablesGetSamples.java index e9c34cce0ebe..d9302e4b9101 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/TablesGetSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/TablesGetSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.loganalytics.generated; -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 + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/TablesGet.json */ /** * Sample code: TablesGet. @@ -17,6 +15,8 @@ public final class TablesGetSamples { * @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); + manager + .tables() + .getWithResponse("oiautorest6685", "oiautorest6685", "table1_SRCH", com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/TablesListByWorkspaceSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/TablesListByWorkspaceSamples.java index 9c1e12be1afe..0f79c9d52e37 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/TablesListByWorkspaceSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/TablesListByWorkspaceSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.loganalytics.generated; -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 + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/TablesList.json */ /** * Sample code: TablesListByWorkspace. @@ -17,6 +15,6 @@ public final class TablesListByWorkspaceSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void tablesListByWorkspace(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.tables().listByWorkspace("oiautorest6685", "oiautorest6685", Context.NONE); + manager.tables().listByWorkspace("oiautorest6685", "oiautorest6685", com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/TablesMigrateSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/TablesMigrateSamples.java index f381b74921d9..f8b1babd7b18 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/TablesMigrateSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/TablesMigrateSamples.java @@ -4,19 +4,19 @@ package com.azure.resourcemanager.loganalytics.generated; -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 + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/TablesMigrate.json */ /** - * Sample code: TablesGet. + * Sample code: TablesMigrate. * * @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); + public static void tablesMigrate(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { + manager + .tables() + .migrateWithResponse("oiautorest6685", "oiautorest6685", "table1_CL", com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/TablesUpdateSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/TablesUpdateSamples.java index 378899896a8f..07279fc8814e 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/TablesUpdateSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/TablesUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -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; @@ -14,7 +13,7 @@ /** 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 + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/TablesUpsert.json */ /** * Sample code: TablesUpsert. @@ -25,7 +24,8 @@ public static void tablesUpsert(com.azure.resourcemanager.loganalytics.LogAnalyt Table resource = manager .tables() - .getWithResponse("oiautorest6685", "oiautorest6685", "AzureNetworkFlow", Context.NONE) + .getWithResponse( + "oiautorest6685", "oiautorest6685", "AzureNetworkFlow", com.azure.core.util.Context.NONE) .getValue(); resource .update() diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/UsagesListSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/UsagesListSamples.java index 19a3783d62b2..5e49bdaba2bf 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/UsagesListSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/UsagesListSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; - /** Samples for Usages List. */ public final class UsagesListSamples { /* @@ -17,6 +15,6 @@ public final class UsagesListSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void usagesList(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.usages().list("rg1", "TestLinkWS", Context.NONE); + manager.usages().list("rg1", "TestLinkWS", com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/WorkspacePurgeGetPurgeStatusSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/WorkspacePurgeGetPurgeStatusSamples.java index 7141f97c990c..92558e0e5ec2 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/WorkspacePurgeGetPurgeStatusSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/WorkspacePurgeGetPurgeStatusSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; - /** Samples for WorkspacePurge GetPurgeStatus. */ public final class WorkspacePurgeGetPurgeStatusSamples { /* @@ -20,6 +18,9 @@ public static void workspacePurgeOperation(com.azure.resourcemanager.loganalytic manager .workspacePurges() .getPurgeStatusWithResponse( - "OIAutoRest5123", "aztest5048", "purge-970318e7-b859-4edb-8903-83b1b54d0b74", Context.NONE); + "OIAutoRest5123", + "aztest5048", + "purge-970318e7-b859-4edb-8903-83b1b54d0b74", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/WorkspacePurgePurgeSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/WorkspacePurgePurgeSamples.java index d6b54dec5fdf..2b34d61c551a 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/WorkspacePurgePurgeSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/WorkspacePurgePurgeSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -import com.azure.core.util.Context; import com.azure.resourcemanager.loganalytics.models.WorkspacePurgeBody; import com.azure.resourcemanager.loganalytics.models.WorkspacePurgeBodyFilters; import java.util.Arrays; @@ -35,7 +34,7 @@ public static void workspacePurgeResourceId(com.azure.resourcemanager.loganalyti .withOperator("==") .withValue( "/subscriptions/12341234-1234-1234-1234-123412341234/resourceGroups/SomeResourceGroup/providers/microsoft.insights/components/AppInsightResource"))), - Context.NONE); + com.azure.core.util.Context.NONE); } /* @@ -61,6 +60,6 @@ public static void workspacePurge(com.azure.resourcemanager.loganalytics.LogAnal .withColumn("TimeGenerated") .withOperator(">") .withValue("2017-09-01T00:00:00"))), - Context.NONE); + com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/WorkspacesCreateOrUpdateSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/WorkspacesCreateOrUpdateSamples.java index b0c7d01462b0..1ffba4276dae 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/WorkspacesCreateOrUpdateSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/WorkspacesCreateOrUpdateSamples.java @@ -12,7 +12,7 @@ /** 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 + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/WorkspacesCreate.json */ /** * Sample code: WorkspacesCreate. diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/WorkspacesDeleteSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/WorkspacesDeleteSamples.java index 0460f6b2b73c..0d6e863c18b4 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/WorkspacesDeleteSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/WorkspacesDeleteSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.loganalytics.generated; -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 + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/WorkspacesDelete.json */ /** * Sample code: WorkspacesDelete. @@ -17,6 +15,6 @@ public final class WorkspacesDeleteSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void workspacesDelete(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.workspaces().delete("oiautorest6685", "oiautorest6685", null, Context.NONE); + manager.workspaces().delete("oiautorest6685", "oiautorest6685", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/WorkspacesGetByResourceGroupSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/WorkspacesGetByResourceGroupSamples.java index d9ab3d4b992d..6fc72b5cffb8 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/WorkspacesGetByResourceGroupSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/WorkspacesGetByResourceGroupSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.loganalytics.generated; -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 + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/WorkspacesGet.json */ /** * Sample code: WorkspaceGet. @@ -17,6 +15,8 @@ public final class WorkspacesGetByResourceGroupSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void workspaceGet(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.workspaces().getByResourceGroupWithResponse("oiautorest6685", "oiautorest6685", Context.NONE); + manager + .workspaces() + .getByResourceGroupWithResponse("oiautorest6685", "oiautorest6685", com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/WorkspacesListByResourceGroupSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/WorkspacesListByResourceGroupSamples.java index e40b317903bc..c57f974cdf2c 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/WorkspacesListByResourceGroupSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/WorkspacesListByResourceGroupSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.loganalytics.generated; -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 + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/WorkspacesListByResourceGroup.json */ /** * Sample code: WorkspacesGet. @@ -17,6 +15,6 @@ public final class WorkspacesListByResourceGroupSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void workspacesGet(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.workspaces().listByResourceGroup("oiautorest6685", Context.NONE); + manager.workspaces().listByResourceGroup("oiautorest6685", com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/WorkspacesListSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/WorkspacesListSamples.java index 04ffc9466600..1f776ed76002 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/WorkspacesListSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/WorkspacesListSamples.java @@ -4,12 +4,10 @@ package com.azure.resourcemanager.loganalytics.generated; -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 + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/WorkspacesSubscriptionList.json */ /** * Sample code: WorkspacesSubscriptionList. @@ -17,6 +15,6 @@ public final class WorkspacesListSamples { * @param manager Entry point to LogAnalyticsManager. */ public static void workspacesSubscriptionList(com.azure.resourcemanager.loganalytics.LogAnalyticsManager manager) { - manager.workspaces().list(Context.NONE); + manager.workspaces().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/WorkspacesUpdateSamples.java b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/WorkspacesUpdateSamples.java index 14feffd5fe4a..076f66ff9aab 100644 --- a/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/WorkspacesUpdateSamples.java +++ b/sdk/loganalytics/azure-resourcemanager-loganalytics/src/samples/java/com/azure/resourcemanager/loganalytics/generated/WorkspacesUpdateSamples.java @@ -4,7 +4,6 @@ package com.azure.resourcemanager.loganalytics.generated; -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; @@ -13,7 +12,7 @@ /** 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 + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2022-10-01/examples/WorkspacesUpdate.json */ /** * Sample code: WorkspacesPatch. @@ -24,13 +23,13 @@ public static void workspacesPatch(com.azure.resourcemanager.loganalytics.LogAna Workspace resource = manager .workspaces() - .getByResourceGroupWithResponse("oiautorest6685", "oiautorest6685", Context.NONE) + .getByResourceGroupWithResponse("oiautorest6685", "oiautorest6685", com.azure.core.util.Context.NONE) .getValue(); resource .update() .withSku(new WorkspaceSku().withName(WorkspaceSkuNameEnum.PER_GB2018)) .withRetentionInDays(30) - .withWorkspaceCapping(new WorkspaceCapping().withDailyQuotaGb(-1.0)) + .withWorkspaceCapping(new WorkspaceCapping().withDailyQuotaGb(-1.0D)) .apply(); } }