diff --git a/sdk/kusto/azure-resourcemanager-kusto/CHANGELOG.md b/sdk/kusto/azure-resourcemanager-kusto/CHANGELOG.md index 8acbf43302ff..bd7bb159b2e8 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/CHANGELOG.md +++ b/sdk/kusto/azure-resourcemanager-kusto/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.5 (Unreleased) +## 1.0.0-beta.1 (2022-09-13) + +- Azure Resource Manager Kusto client library for Java. This package contains Microsoft Azure SDK for Kusto Management SDK. The Azure Kusto management API provides a RESTful set of web services that interact with Azure Kusto services to manage your clusters and databases. The API enables you to create, update, and delete clusters and databases. Package tag package-preview-2022-07. 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/kusto/azure-resourcemanager-kusto/README.md b/sdk/kusto/azure-resourcemanager-kusto/README.md index e7b742650327..3c48052d7129 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/README.md +++ b/sdk/kusto/azure-resourcemanager-kusto/README.md @@ -2,7 +2,7 @@ Azure Resource Manager Kusto client library for Java. -This package contains Microsoft Azure SDK for Kusto Management SDK. The Azure Kusto management API provides a RESTful set of web services that interact with Azure Kusto services to manage your clusters and databases. The API enables you to create, update, and delete clusters and databases. 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 Kusto Management SDK. The Azure Kusto management API provides a RESTful set of web services that interact with Azure Kusto services to manage your clusters and databases. The API enables you to create, update, and delete clusters and databases. Package tag package-preview-2022-07. 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-kusto - 1.0.0-beta.4 + 1.0.0-beta.5 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/kusto/azure-resourcemanager-kusto/SAMPLE.md b/sdk/kusto/azure-resourcemanager-kusto/SAMPLE.md index f14e6a7b7ae2..495ac9bb44da 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/SAMPLE.md +++ b/sdk/kusto/azure-resourcemanager-kusto/SAMPLE.md @@ -118,7 +118,7 @@ import com.azure.resourcemanager.kusto.models.AttachedDatabaseConfigurationsChec /** Samples for AttachedDatabaseConfigurations CheckNameAvailability. */ public final class AttachedDatabaseConfigurationsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoAttachedDatabaseConfigurationCheckNameAvailability.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoAttachedDatabaseConfigurationCheckNameAvailability.json */ /** * Sample code: KustoAttachedDatabaseConfigurationCheckNameAvailability. @@ -148,7 +148,7 @@ import java.util.Arrays; /** Samples for AttachedDatabaseConfigurations CreateOrUpdate. */ public final class AttachedDatabaseConfigurationsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoAttachedDatabaseConfigurationsCreateOrUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoAttachedDatabaseConfigurationsCreateOrUpdate.json */ /** * Sample code: AttachedDatabaseConfigurationsCreateOrUpdate. @@ -174,6 +174,7 @@ public final class AttachedDatabaseConfigurationsCreateOrUpdateSamples { .withExternalTablesToExclude(Arrays.asList("ExternalTable2")) .withMaterializedViewsToInclude(Arrays.asList("MaterializedViewTable1")) .withMaterializedViewsToExclude(Arrays.asList("MaterializedViewTable2"))) + .withDatabaseNameOverride("overridekustodatabase") .create(); } } @@ -187,7 +188,7 @@ import com.azure.core.util.Context; /** Samples for AttachedDatabaseConfigurations Delete. */ public final class AttachedDatabaseConfigurationsDeleteSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoAttachedDatabaseConfigurationsDelete.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoAttachedDatabaseConfigurationsDelete.json */ /** * Sample code: AttachedDatabaseConfigurationsDelete. @@ -210,7 +211,7 @@ import com.azure.core.util.Context; /** Samples for AttachedDatabaseConfigurations Get. */ public final class AttachedDatabaseConfigurationsGetSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoAttachedDatabaseConfigurationsGet.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoAttachedDatabaseConfigurationsGet.json */ /** * Sample code: AttachedDatabaseConfigurationsGet. @@ -233,7 +234,7 @@ import com.azure.core.util.Context; /** Samples for AttachedDatabaseConfigurations ListByCluster. */ public final class AttachedDatabaseConfigurationsListByClusterSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoAttachedDatabaseConfigurationsListByCluster.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoAttachedDatabaseConfigurationsListByCluster.json */ /** * Sample code: KustoAttachedDatabaseConfigurationsListByCluster. @@ -256,7 +257,7 @@ import com.azure.resourcemanager.kusto.models.ClusterPrincipalAssignmentCheckNam /** Samples for ClusterPrincipalAssignments CheckNameAvailability. */ public final class ClusterPrincipalAssignmentsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoClusterPrincipalAssignmentsCheckNameAvailability.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoClusterPrincipalAssignmentsCheckNameAvailability.json */ /** * Sample code: KustoClusterPrincipalAssignmentsCheckNameAvailability. @@ -285,7 +286,7 @@ import com.azure.resourcemanager.kusto.models.PrincipalType; /** Samples for ClusterPrincipalAssignments CreateOrUpdate. */ public final class ClusterPrincipalAssignmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoClusterPrincipalAssignmentsCreateOrUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoClusterPrincipalAssignmentsCreateOrUpdate.json */ /** * Sample code: KustoClusterPrincipalAssignmentsCreateOrUpdate. @@ -315,7 +316,7 @@ import com.azure.core.util.Context; /** Samples for ClusterPrincipalAssignments Delete. */ public final class ClusterPrincipalAssignmentsDeleteSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoClusterPrincipalAssignmentsDelete.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoClusterPrincipalAssignmentsDelete.json */ /** * Sample code: KustoClusterPrincipalAssignmentsDelete. @@ -336,7 +337,7 @@ import com.azure.core.util.Context; /** Samples for ClusterPrincipalAssignments Get. */ public final class ClusterPrincipalAssignmentsGetSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoClusterPrincipalAssignmentsGet.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoClusterPrincipalAssignmentsGet.json */ /** * Sample code: KustoClusterPrincipalAssignmentsGet. @@ -359,7 +360,7 @@ import com.azure.core.util.Context; /** Samples for ClusterPrincipalAssignments List. */ public final class ClusterPrincipalAssignmentsListSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoClusterPrincipalAssignmentsList.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoClusterPrincipalAssignmentsList.json */ /** * Sample code: KustoPrincipalAssignmentsList. @@ -384,7 +385,7 @@ import java.util.Arrays; /** Samples for Clusters AddLanguageExtensions. */ public final class ClustersAddLanguageExtensionsSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoClusterAddLanguageExtensions.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoClusterAddLanguageExtensions.json */ /** * Sample code: KustoClusterAddLanguageExtensions. @@ -417,7 +418,7 @@ import com.azure.resourcemanager.kusto.models.ClusterCheckNameRequest; /** Samples for Clusters CheckNameAvailability. */ public final class ClustersCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoClustersCheckNameAvailability.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoClustersCheckNameAvailability.json */ /** * Sample code: KustoClustersCheckNameAvailability. @@ -448,7 +449,7 @@ import java.util.Arrays; /** Samples for Clusters CreateOrUpdate. */ public final class ClustersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoClustersCreateOrUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoClustersCreateOrUpdate.json */ /** * Sample code: KustoClustersCreateOrUpdate. @@ -483,7 +484,7 @@ import com.azure.core.util.Context; /** Samples for Clusters Delete. */ public final class ClustersDeleteSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoClustersDelete.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoClustersDelete.json */ /** * Sample code: KustoClustersDelete. @@ -505,7 +506,7 @@ import com.azure.resourcemanager.kusto.fluent.models.FollowerDatabaseDefinitionI /** Samples for Clusters DetachFollowerDatabases. */ public final class ClustersDetachFollowerDatabasesSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoClusterDetachFollowerDatabases.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoClusterDetachFollowerDatabases.json */ /** * Sample code: KustoClusterDetachFollowerDatabases. @@ -535,7 +536,7 @@ import com.azure.core.util.Context; /** Samples for Clusters DiagnoseVirtualNetwork. */ public final class ClustersDiagnoseVirtualNetworkSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoClustersDiagnoseVirtualNetwork.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoClustersDiagnoseVirtualNetwork.json */ /** * Sample code: KustoClusterDiagnoseVirtualNetwork. @@ -556,7 +557,7 @@ import com.azure.core.util.Context; /** Samples for Clusters GetByResourceGroup. */ public final class ClustersGetByResourceGroupSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoClustersGet.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoClustersGet.json */ /** * Sample code: KustoClustersGet. @@ -577,7 +578,7 @@ import com.azure.core.util.Context; /** Samples for Clusters List. */ public final class ClustersListSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoClustersList.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoClustersList.json */ /** * Sample code: KustoClustersList. @@ -598,7 +599,7 @@ import com.azure.core.util.Context; /** Samples for Clusters ListByResourceGroup. */ public final class ClustersListByResourceGroupSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoClustersListByResourceGroup.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoClustersListByResourceGroup.json */ /** * Sample code: KustoClustersListByResourceGroup. @@ -619,7 +620,7 @@ import com.azure.core.util.Context; /** Samples for Clusters ListFollowerDatabases. */ public final class ClustersListFollowerDatabasesSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoClusterListFollowerDatabases.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoClusterListFollowerDatabases.json */ /** * Sample code: KustoClusterListFollowerDatabases. @@ -640,7 +641,7 @@ import com.azure.core.util.Context; /** Samples for Clusters ListLanguageExtensions. */ public final class ClustersListLanguageExtensionsSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoClusterListLanguageExtensions.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoClusterListLanguageExtensions.json */ /** * Sample code: KustoClusterListLanguageExtensions. @@ -661,7 +662,7 @@ import com.azure.core.util.Context; /** Samples for Clusters ListOutboundNetworkDependenciesEndpoints. */ public final class ClustersListOutboundNetworkDependenciesEndpointsSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoOutboundNetworkDependenciesList.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoOutboundNetworkDependenciesList.json */ /** * Sample code: Get Kusto cluster outbound network dependencies. @@ -683,7 +684,7 @@ import com.azure.core.util.Context; /** Samples for Clusters ListSkus. */ public final class ClustersListSkusSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoClustersListSkus.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoClustersListSkus.json */ /** * Sample code: KustoClustersListSkus. @@ -704,7 +705,7 @@ import com.azure.core.util.Context; /** Samples for Clusters ListSkusByResource. */ public final class ClustersListSkusByResourceSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoClustersListResourceSkus.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoClustersListResourceSkus.json */ /** * Sample code: KustoClustersListResourceSkus. @@ -729,7 +730,7 @@ import java.util.Arrays; /** Samples for Clusters RemoveLanguageExtensions. */ public final class ClustersRemoveLanguageExtensionsSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoClusterRemoveLanguageExtensions.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoClusterRemoveLanguageExtensions.json */ /** * Sample code: KustoClusterRemoveLanguageExtensions. @@ -761,7 +762,7 @@ import com.azure.core.util.Context; /** Samples for Clusters Start. */ public final class ClustersStartSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoClustersStart.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoClustersStart.json */ /** * Sample code: KustoClustersStart. @@ -782,7 +783,7 @@ import com.azure.core.util.Context; /** Samples for Clusters Stop. */ public final class ClustersStopSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoClustersStop.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoClustersStop.json */ /** * Sample code: KustoClustersStop. @@ -804,7 +805,7 @@ import com.azure.resourcemanager.kusto.models.Cluster; /** Samples for Clusters Update. */ public final class ClustersUpdateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoClustersUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoClustersUpdate.json */ /** * Sample code: KustoClustersUpdate. @@ -828,7 +829,7 @@ import com.azure.resourcemanager.kusto.models.DataConnectionCheckNameRequest; /** Samples for DataConnections CheckNameAvailability. */ public final class DataConnectionsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDataConnectionsCheckNameAvailability.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoDataConnectionsCheckNameAvailability.json */ /** * Sample code: KustoDataConnectionsCheckNameAvailability. @@ -861,7 +862,7 @@ import com.azure.resourcemanager.kusto.models.EventHubDataConnection; /** Samples for DataConnections CreateOrUpdate. */ public final class DataConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDataConnectionsEventGridCreateOrUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoDataConnectionsEventGridCreateOrUpdate.json */ /** * Sample code: KustoDataConnectionsEventGridCreateOrUpdate. @@ -898,7 +899,7 @@ public final class DataConnectionsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDataConnectionsCreateOrUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoDataConnectionsCreateOrUpdate.json */ /** * Sample code: KustoDataConnectionsCreateOrUpdate. @@ -941,7 +942,7 @@ import com.azure.resourcemanager.kusto.models.EventHubDataFormat; /** Samples for DataConnections DataConnectionValidation. */ public final class DataConnectionsDataConnectionValidationSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDataConnectionValidationAsync.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoDataConnectionValidationAsync.json */ /** * Sample code: KustoDataConnectionValidation. @@ -972,7 +973,7 @@ public final class DataConnectionsDataConnectionValidationSamples { } /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDataConnectionEventGridValidationAsync.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoDataConnectionEventGridValidationAsync.json */ /** * Sample code: KustoDataConnectionEventGridValidation. @@ -1018,7 +1019,7 @@ import com.azure.core.util.Context; /** Samples for DataConnections Delete. */ public final class DataConnectionsDeleteSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDataConnectionsDelete.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoDataConnectionsDelete.json */ /** * Sample code: KustoDataConnectionsDelete. @@ -1041,7 +1042,7 @@ import com.azure.core.util.Context; /** Samples for DataConnections Get. */ public final class DataConnectionsGetSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDataConnectionsEventGridGet.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoDataConnectionsEventGridGet.json */ /** * Sample code: KustoDataConnectionsEventGridGet. @@ -1055,7 +1056,7 @@ public final class DataConnectionsGetSamples { } /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDataConnectionsGet.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoDataConnectionsGet.json */ /** * Sample code: KustoDataConnectionsGet. @@ -1078,7 +1079,7 @@ import com.azure.core.util.Context; /** Samples for DataConnections ListByDatabase. */ public final class DataConnectionsListByDatabaseSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDataConnectionsListByDatabase.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoDataConnectionsListByDatabase.json */ /** * Sample code: KustoDatabasesListByCluster. @@ -1104,7 +1105,7 @@ import com.azure.resourcemanager.kusto.models.EventHubDataConnection; /** Samples for DataConnections Update. */ public final class DataConnectionsUpdateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDataConnectionsUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoDataConnectionsUpdate.json */ /** * Sample code: KustoDataConnectionsUpdate. @@ -1130,7 +1131,7 @@ public final class DataConnectionsUpdateSamples { } /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDataConnectionsEventGridUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoDataConnectionsEventGridUpdate.json */ /** * Sample code: KustoDataConnectionsEventGridUpdate. @@ -1176,7 +1177,7 @@ import com.azure.resourcemanager.kusto.models.DatabasePrincipalAssignmentCheckNa /** Samples for DatabasePrincipalAssignments CheckNameAvailability. */ public final class DatabasePrincipalAssignmentsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDatabasePrincipalAssignmentsCheckNameAvailability.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoDatabasePrincipalAssignmentsCheckNameAvailability.json */ /** * Sample code: KustoDatabaseCheckNameAvailability. @@ -1205,7 +1206,7 @@ import com.azure.resourcemanager.kusto.models.PrincipalType; /** Samples for DatabasePrincipalAssignments CreateOrUpdate. */ public final class DatabasePrincipalAssignmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDatabasePrincipalAssignmentsCreateOrUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoDatabasePrincipalAssignmentsCreateOrUpdate.json */ /** * Sample code: KustoDatabasePrincipalAssignmentsCreateOrUpdate. @@ -1235,7 +1236,7 @@ import com.azure.core.util.Context; /** Samples for DatabasePrincipalAssignments Delete. */ public final class DatabasePrincipalAssignmentsDeleteSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDatabasePrincipalAssignmentsDelete.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoDatabasePrincipalAssignmentsDelete.json */ /** * Sample code: KustoDatabasePrincipalAssignmentsDelete. @@ -1258,7 +1259,7 @@ import com.azure.core.util.Context; /** Samples for DatabasePrincipalAssignments Get. */ public final class DatabasePrincipalAssignmentsGetSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDatabasePrincipalAssignmentsGet.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoDatabasePrincipalAssignmentsGet.json */ /** * Sample code: KustoDatabasePrincipalAssignmentsGet. @@ -1281,7 +1282,7 @@ import com.azure.core.util.Context; /** Samples for DatabasePrincipalAssignments List. */ public final class DatabasePrincipalAssignmentsListSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDatabasePrincipalAssignmentsList.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoDatabasePrincipalAssignmentsList.json */ /** * Sample code: KustoPrincipalAssignmentsList. @@ -1307,7 +1308,7 @@ import java.util.Arrays; /** Samples for Databases AddPrincipals. */ public final class DatabasesAddPrincipalsSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDatabaseAddPrincipals.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoDatabaseAddPrincipals.json */ /** * Sample code: KustoDatabaseAddPrincipals. @@ -1361,7 +1362,7 @@ import com.azure.resourcemanager.kusto.models.Type; /** Samples for Databases CheckNameAvailability. */ public final class DatabasesCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDatabasesCheckNameAvailability.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoDatabasesCheckNameAvailability.json */ /** * Sample code: KustoDatabasesCheckNameAvailability. @@ -1384,6 +1385,7 @@ public final class DatabasesCheckNameAvailabilitySamples { ```java import com.azure.core.util.Context; +import com.azure.resourcemanager.kusto.models.CallerRole; import com.azure.resourcemanager.kusto.models.ReadOnlyFollowingDatabase; import com.azure.resourcemanager.kusto.models.ReadWriteDatabase; import java.time.Duration; @@ -1391,7 +1393,7 @@ import java.time.Duration; /** Samples for Databases CreateOrUpdate. */ public final class DatabasesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDatabaseReadonlyUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoDatabaseReadonlyUpdate.json */ /** * Sample code: Kusto ReadOnly database update. @@ -1406,11 +1408,12 @@ public final class DatabasesCreateOrUpdateSamples { "kustoCluster", "kustoReadOnlyDatabase", new ReadOnlyFollowingDatabase().withLocation("westus").withHotCachePeriod(Duration.parse("P1D")), + null, Context.NONE); } /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDatabasesCreateOrUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoDatabasesCreateOrUpdate.json */ /** * Sample code: Kusto ReadWrite database create or update. @@ -1425,6 +1428,7 @@ public final class DatabasesCreateOrUpdateSamples { "kustoCluster", "KustoDatabase8", new ReadWriteDatabase().withLocation("westus").withSoftDeletePeriod(Duration.parse("P1D")), + CallerRole.ADMIN, Context.NONE); } } @@ -1438,7 +1442,7 @@ import com.azure.core.util.Context; /** Samples for Databases Delete. */ public final class DatabasesDeleteSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDatabasesDelete.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoDatabasesDelete.json */ /** * Sample code: KustoDatabasesDelete. @@ -1459,7 +1463,7 @@ import com.azure.core.util.Context; /** Samples for Databases Get. */ public final class DatabasesGetSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDatabasesGet.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoDatabasesGet.json */ /** * Sample code: KustoDatabasesGet. @@ -1480,7 +1484,7 @@ import com.azure.core.util.Context; /** Samples for Databases ListByCluster. */ public final class DatabasesListByClusterSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDatabasesListByCluster.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoDatabasesListByCluster.json */ /** * Sample code: KustoDatabasesListByCluster. @@ -1501,7 +1505,7 @@ import com.azure.core.util.Context; /** Samples for Databases ListPrincipals. */ public final class DatabasesListPrincipalsSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDatabaseListPrincipals.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoDatabaseListPrincipals.json */ /** * Sample code: KustoDatabaseListPrincipals. @@ -1527,7 +1531,7 @@ import java.util.Arrays; /** Samples for Databases RemovePrincipals. */ public final class DatabasesRemovePrincipalsSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDatabaseRemovePrincipals.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoDatabaseRemovePrincipals.json */ /** * Sample code: KustoDatabaseRemovePrincipals. @@ -1581,7 +1585,7 @@ import java.time.Duration; /** Samples for Databases Update. */ public final class DatabasesUpdateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoDatabasesUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoDatabasesUpdate.json */ /** * Sample code: KustoDatabasesUpdate. @@ -1596,6 +1600,7 @@ public final class DatabasesUpdateSamples { "kustoCluster", "KustoDatabase8", new ReadWriteDatabase().withHotCachePeriod(Duration.parse("P1D")), + null, Context.NONE); } } @@ -1610,7 +1615,7 @@ import com.azure.resourcemanager.kusto.models.ManagedPrivateEndpointsCheckNameRe /** Samples for ManagedPrivateEndpoints CheckNameAvailability. */ public final class ManagedPrivateEndpointsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoManagedPrivateEndpointsCheckNameAvailability.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoManagedPrivateEndpointsCheckNameAvailability.json */ /** * Sample code: KustoManagedPrivateEndpointsCheckNameAvailability. @@ -1636,7 +1641,7 @@ public final class ManagedPrivateEndpointsCheckNameAvailabilitySamples { /** Samples for ManagedPrivateEndpoints CreateOrUpdate. */ public final class ManagedPrivateEndpointsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoManagedPrivateEndpointsCreateOrUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoManagedPrivateEndpointsCreateOrUpdate.json */ /** * Sample code: KustoManagedPrivateEndpointsCreateOrUpdate. @@ -1666,7 +1671,7 @@ import com.azure.core.util.Context; /** Samples for ManagedPrivateEndpoints Delete. */ public final class ManagedPrivateEndpointsDeleteSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoManagedPrivateEndpointsDelete.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoManagedPrivateEndpointsDelete.json */ /** * Sample code: ManagedPrivateEndpointsDelete. @@ -1689,7 +1694,7 @@ import com.azure.core.util.Context; /** Samples for ManagedPrivateEndpoints Get. */ public final class ManagedPrivateEndpointsGetSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoManagedPrivateEndpointsGet.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoManagedPrivateEndpointsGet.json */ /** * Sample code: KustoManagedPrivateEndpointsGet. @@ -1712,7 +1717,7 @@ import com.azure.core.util.Context; /** Samples for ManagedPrivateEndpoints List. */ public final class ManagedPrivateEndpointsListSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoManagedPrivateEndpointsList.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoManagedPrivateEndpointsList.json */ /** * Sample code: KustoManagedPrivateEndpointsList. @@ -1734,7 +1739,7 @@ import com.azure.resourcemanager.kusto.models.ManagedPrivateEndpoint; /** Samples for ManagedPrivateEndpoints Update. */ public final class ManagedPrivateEndpointsUpdateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoManagedPrivateEndpointsUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoManagedPrivateEndpointsUpdate.json */ /** * Sample code: KustoManagedPrivateEndpointsUpdate. @@ -1766,7 +1771,7 @@ import com.azure.core.util.Context; /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoOperationsList.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoOperationsList.json */ /** * Sample code: KustoOperationsList. @@ -1787,7 +1792,7 @@ import com.azure.core.util.Context; /** Samples for OperationsResults Get. */ public final class OperationsResultsGetSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoOperationResultsGet.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoOperationResultsGet.json */ /** * Sample code: KustoOperationResultsGet. @@ -1808,7 +1813,7 @@ import com.azure.core.util.Context; /** Samples for OperationsResultsLocation Get. */ public final class OperationsResultsLocationGetSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoOperationResultsOperationResultResponseTypeGet.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoOperationResultsOperationResultResponseTypeGet.json */ /** * Sample code: KustoOperationsResultsLocationGet. @@ -1831,7 +1836,7 @@ import com.azure.resourcemanager.kusto.models.PrivateLinkServiceConnectionStateP /** Samples for PrivateEndpointConnections CreateOrUpdate. */ public final class PrivateEndpointConnectionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoPrivateEndpointConnectionsCreateOrUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoPrivateEndpointConnectionsCreateOrUpdate.json */ /** * Sample code: Approve or reject a private endpoint connection with a given name. @@ -1861,7 +1866,7 @@ import com.azure.core.util.Context; /** Samples for PrivateEndpointConnections Delete. */ public final class PrivateEndpointConnectionsDeleteSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoPrivateEndpointConnectionsDelete.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoPrivateEndpointConnectionsDelete.json */ /** * Sample code: Deletes a private endpoint connection with a given name. @@ -1883,7 +1888,7 @@ import com.azure.core.util.Context; /** Samples for PrivateEndpointConnections Get. */ public final class PrivateEndpointConnectionsGetSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoPrivateEndpointConnectionsGet.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoPrivateEndpointConnectionsGet.json */ /** * Sample code: Gets private endpoint connection. @@ -1906,7 +1911,7 @@ import com.azure.core.util.Context; /** Samples for PrivateEndpointConnections List. */ public final class PrivateEndpointConnectionsListSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoPrivateEndpointConnectionsList.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoPrivateEndpointConnectionsList.json */ /** * Sample code: KustoPrivateEndpointConnectionsList. @@ -1927,7 +1932,7 @@ import com.azure.core.util.Context; /** Samples for PrivateLinkResources Get. */ public final class PrivateLinkResourcesGetSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoPrivateLinkResourcesGet.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoPrivateLinkResourcesGet.json */ /** * Sample code: Gets private endpoint connection. @@ -1948,7 +1953,7 @@ import com.azure.core.util.Context; /** Samples for PrivateLinkResources List. */ public final class PrivateLinkResourcesListSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoPrivateLinkResourcesList.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoPrivateLinkResourcesList.json */ /** * Sample code: Gets private endpoint connections. @@ -1970,7 +1975,7 @@ import com.azure.resourcemanager.kusto.models.ScriptCheckNameRequest; /** Samples for Scripts CheckNameAvailability. */ public final class ScriptsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoScriptsCheckNameAvailability.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoScriptsCheckNameAvailability.json */ /** * Sample code: KustoScriptsCheckNameAvailability. @@ -1996,7 +2001,7 @@ public final class ScriptsCheckNameAvailabilitySamples { /** Samples for Scripts CreateOrUpdate. */ public final class ScriptsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoScriptsCreateOrUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoScriptsCreateOrUpdate.json */ /** * Sample code: KustoScriptsCreateOrUpdate. @@ -2026,7 +2031,7 @@ import com.azure.core.util.Context; /** Samples for Scripts Delete. */ public final class ScriptsDeleteSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoScriptsDelete.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoScriptsDelete.json */ /** * Sample code: KustoScriptsDelete. @@ -2047,7 +2052,7 @@ import com.azure.core.util.Context; /** Samples for Scripts Get. */ public final class ScriptsGetSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoScriptsGet.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoScriptsGet.json */ /** * Sample code: KustoScriptsGet. @@ -2068,7 +2073,7 @@ import com.azure.core.util.Context; /** Samples for Scripts ListByDatabase. */ public final class ScriptsListByDatabaseSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoScriptsListByDatabase.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoScriptsListByDatabase.json */ /** * Sample code: KustoScriptsList. @@ -2090,7 +2095,7 @@ import com.azure.resourcemanager.kusto.models.Script; /** Samples for Scripts Update. */ public final class ScriptsUpdateSamples { /* - * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/stable/2022-02-01/examples/KustoScriptsUpdate.json + * x-ms-original-file: specification/azure-kusto/resource-manager/Microsoft.Kusto/preview/2022-07-07/examples/KustoScriptsUpdate.json */ /** * Sample code: KustoScriptsUpdate. diff --git a/sdk/kusto/azure-resourcemanager-kusto/pom.xml b/sdk/kusto/azure-resourcemanager-kusto/pom.xml index fb6f78af840d..1862fed0ff35 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/pom.xml +++ b/sdk/kusto/azure-resourcemanager-kusto/pom.xml @@ -13,7 +13,7 @@ jar Microsoft Azure SDK for Kusto Management - This package contains Microsoft Azure SDK for Kusto Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Azure Kusto management API provides a RESTful set of web services that interact with Azure Kusto services to manage your clusters and databases. The API enables you to create, update, and delete clusters and databases. Package tag package-2022-02. + This package contains Microsoft Azure SDK for Kusto Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. The Azure Kusto management API provides a RESTful set of web services that interact with Azure Kusto services to manage your clusters and databases. The API enables you to create, update, and delete clusters and databases. Package tag package-preview-2022-07. https://github.com/Azure/azure-sdk-for-java diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/KustoManager.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/KustoManager.java index 91a9d28610dd..d43e2ff045d7 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/KustoManager.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/KustoManager.java @@ -10,11 +10,13 @@ import com.azure.core.http.HttpPipelineBuilder; import com.azure.core.http.HttpPipelinePosition; import com.azure.core.http.policy.AddDatePolicy; +import com.azure.core.http.policy.AddHeadersFromContextPolicy; import com.azure.core.http.policy.HttpLogOptions; import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.http.policy.HttpPolicyProviders; import com.azure.core.http.policy.RequestIdPolicy; +import com.azure.core.http.policy.RetryOptions; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.management.http.policy.ArmChallengeAuthenticationPolicy; @@ -115,6 +117,19 @@ public static KustoManager authenticate(TokenCredential credential, AzureProfile return configure().authenticate(credential, profile); } + /** + * Creates an instance of Kusto service API entry point. + * + * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. + * @param profile the Azure profile for client. + * @return the Kusto service API instance. + */ + public static KustoManager authenticate(HttpPipeline httpPipeline, AzureProfile profile) { + Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); + Objects.requireNonNull(profile, "'profile' cannot be null."); + return new KustoManager(httpPipeline, profile, null); + } + /** * Gets a Configurable instance that can be used to create KustoManager with optional configuration. * @@ -126,13 +141,14 @@ public static Configurable configure() { /** The Configurable allowing configurations to be set. */ public static final class Configurable { - private final ClientLogger logger = new ClientLogger(Configurable.class); + private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); private HttpClient httpClient; private HttpLogOptions httpLogOptions; private final List policies = new ArrayList<>(); private final List scopes = new ArrayList<>(); private RetryPolicy retryPolicy; + private RetryOptions retryOptions; private Duration defaultPollInterval; private Configurable() { @@ -193,6 +209,19 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { return this; } + /** + * Sets the retry options for the HTTP pipeline retry policy. + * + *

This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. + * + * @param retryOptions the retry options for the HTTP pipeline retry policy. + * @return the configurable object itself. + */ + public Configurable withRetryOptions(RetryOptions retryOptions) { + this.retryOptions = Objects.requireNonNull(retryOptions, "'retryOptions' cannot be null."); + return this; + } + /** * Sets the default poll interval, used when service does not provide "Retry-After" header. * @@ -200,9 +229,11 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { * @return the configurable object itself. */ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = Objects.requireNonNull(defaultPollInterval, "'retryPolicy' cannot be null."); + this.defaultPollInterval = + Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); if (this.defaultPollInterval.isNegative()) { - throw logger.logExceptionAsError(new IllegalArgumentException("'httpPipeline' cannot be negative")); + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); } return this; } @@ -224,7 +255,7 @@ public KustoManager authenticate(TokenCredential credential, AzureProfile profil .append("-") .append("com.azure.resourcemanager.kusto") .append("/") - .append("1.0.0-beta.4"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -242,10 +273,15 @@ public KustoManager authenticate(TokenCredential credential, AzureProfile profil scopes.add(profile.getEnvironment().getManagementEndpoint() + "/.default"); } if (retryPolicy == null) { - retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); + if (retryOptions != null) { + retryPolicy = new RetryPolicy(retryOptions); + } else { + retryPolicy = new RetryPolicy("Retry-After", ChronoUnit.SECONDS); + } } List policies = new ArrayList<>(); policies.add(new UserAgentPolicy(userAgentBuilder.toString())); + policies.add(new AddHeadersFromContextPolicy()); policies.add(new RequestIdPolicy()); policies .addAll( @@ -276,7 +312,11 @@ public KustoManager authenticate(TokenCredential credential, AzureProfile profil } } - /** @return Resource collection API of Clusters. */ + /** + * Gets the resource collection API of Clusters. It manages Cluster. + * + * @return Resource collection API of Clusters. + */ public Clusters clusters() { if (this.clusters == null) { this.clusters = new ClustersImpl(clientObject.getClusters(), this); @@ -284,7 +324,11 @@ public Clusters clusters() { return clusters; } - /** @return Resource collection API of ClusterPrincipalAssignments. */ + /** + * Gets the resource collection API of ClusterPrincipalAssignments. It manages ClusterPrincipalAssignment. + * + * @return Resource collection API of ClusterPrincipalAssignments. + */ public ClusterPrincipalAssignments clusterPrincipalAssignments() { if (this.clusterPrincipalAssignments == null) { this.clusterPrincipalAssignments = @@ -293,7 +337,11 @@ public ClusterPrincipalAssignments clusterPrincipalAssignments() { return clusterPrincipalAssignments; } - /** @return Resource collection API of Databases. */ + /** + * Gets the resource collection API of Databases. + * + * @return Resource collection API of Databases. + */ public Databases databases() { if (this.databases == null) { this.databases = new DatabasesImpl(clientObject.getDatabases(), this); @@ -301,7 +349,11 @@ public Databases databases() { return databases; } - /** @return Resource collection API of AttachedDatabaseConfigurations. */ + /** + * Gets the resource collection API of AttachedDatabaseConfigurations. It manages AttachedDatabaseConfiguration. + * + * @return Resource collection API of AttachedDatabaseConfigurations. + */ public AttachedDatabaseConfigurations attachedDatabaseConfigurations() { if (this.attachedDatabaseConfigurations == null) { this.attachedDatabaseConfigurations = @@ -310,7 +362,11 @@ public AttachedDatabaseConfigurations attachedDatabaseConfigurations() { return attachedDatabaseConfigurations; } - /** @return Resource collection API of ManagedPrivateEndpoints. */ + /** + * Gets the resource collection API of ManagedPrivateEndpoints. It manages ManagedPrivateEndpoint. + * + * @return Resource collection API of ManagedPrivateEndpoints. + */ public ManagedPrivateEndpoints managedPrivateEndpoints() { if (this.managedPrivateEndpoints == null) { this.managedPrivateEndpoints = @@ -319,7 +375,11 @@ public ManagedPrivateEndpoints managedPrivateEndpoints() { return managedPrivateEndpoints; } - /** @return Resource collection API of DatabasePrincipalAssignments. */ + /** + * Gets the resource collection API of DatabasePrincipalAssignments. It manages DatabasePrincipalAssignment. + * + * @return Resource collection API of DatabasePrincipalAssignments. + */ public DatabasePrincipalAssignments databasePrincipalAssignments() { if (this.databasePrincipalAssignments == null) { this.databasePrincipalAssignments = @@ -328,7 +388,11 @@ public DatabasePrincipalAssignments databasePrincipalAssignments() { return databasePrincipalAssignments; } - /** @return Resource collection API of Scripts. */ + /** + * Gets the resource collection API of Scripts. It manages Script. + * + * @return Resource collection API of Scripts. + */ public Scripts scripts() { if (this.scripts == null) { this.scripts = new ScriptsImpl(clientObject.getScripts(), this); @@ -336,7 +400,11 @@ public Scripts scripts() { return scripts; } - /** @return Resource collection API of PrivateEndpointConnections. */ + /** + * Gets the resource collection API of PrivateEndpointConnections. It manages PrivateEndpointConnection. + * + * @return Resource collection API of PrivateEndpointConnections. + */ public PrivateEndpointConnections privateEndpointConnections() { if (this.privateEndpointConnections == null) { this.privateEndpointConnections = @@ -345,7 +413,11 @@ public PrivateEndpointConnections privateEndpointConnections() { return privateEndpointConnections; } - /** @return Resource collection API of PrivateLinkResources. */ + /** + * Gets the resource collection API of PrivateLinkResources. + * + * @return Resource collection API of PrivateLinkResources. + */ public PrivateLinkResources privateLinkResources() { if (this.privateLinkResources == null) { this.privateLinkResources = new PrivateLinkResourcesImpl(clientObject.getPrivateLinkResources(), this); @@ -353,7 +425,11 @@ public PrivateLinkResources privateLinkResources() { return privateLinkResources; } - /** @return Resource collection API of DataConnections. */ + /** + * Gets the resource collection API of DataConnections. + * + * @return Resource collection API of DataConnections. + */ public DataConnections dataConnections() { if (this.dataConnections == null) { this.dataConnections = new DataConnectionsImpl(clientObject.getDataConnections(), this); @@ -361,7 +437,11 @@ public DataConnections dataConnections() { return dataConnections; } - /** @return Resource collection API of Operations. */ + /** + * Gets the resource collection API of Operations. + * + * @return Resource collection API of Operations. + */ public Operations operations() { if (this.operations == null) { this.operations = new OperationsImpl(clientObject.getOperations(), this); @@ -369,7 +449,11 @@ public Operations operations() { return operations; } - /** @return Resource collection API of OperationsResults. */ + /** + * Gets the resource collection API of OperationsResults. + * + * @return Resource collection API of OperationsResults. + */ public OperationsResults operationsResults() { if (this.operationsResults == null) { this.operationsResults = new OperationsResultsImpl(clientObject.getOperationsResults(), this); @@ -377,7 +461,11 @@ public OperationsResults operationsResults() { return operationsResults; } - /** @return Resource collection API of OperationsResultsLocations. */ + /** + * Gets the resource collection API of OperationsResultsLocations. + * + * @return Resource collection API of OperationsResultsLocations. + */ public OperationsResultsLocations operationsResultsLocations() { if (this.operationsResultsLocations == null) { this.operationsResultsLocations = diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/DatabasesClient.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/DatabasesClient.java index 1c05a8926758..4b0e0b353750 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/DatabasesClient.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/DatabasesClient.java @@ -15,6 +15,7 @@ import com.azure.resourcemanager.kusto.fluent.models.DatabaseInner; import com.azure.resourcemanager.kusto.fluent.models.DatabasePrincipalInner; import com.azure.resourcemanager.kusto.fluent.models.DatabasePrincipalListResultInner; +import com.azure.resourcemanager.kusto.models.CallerRole; import com.azure.resourcemanager.kusto.models.CheckNameRequest; import com.azure.resourcemanager.kusto.models.DatabasePrincipalListRequest; @@ -115,6 +116,8 @@ Response getWithResponse( * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @param callerRole By default, any user who run operation on a database become an Admin on it. This property + * allows the caller to exclude the caller from Admins list. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -122,7 +125,11 @@ Response getWithResponse( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DatabaseInner> beginCreateOrUpdate( - String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters); + String resourceGroupName, + String clusterName, + String databaseName, + DatabaseInner parameters, + CallerRole callerRole); /** * Creates or updates a database. @@ -131,6 +138,8 @@ SyncPoller, DatabaseInner> beginCreateOrUpdate( * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @param callerRole By default, any user who run operation on a database become an Admin on it. This property + * allows the caller to exclude the caller from Admins list. * @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. @@ -139,7 +148,34 @@ SyncPoller, DatabaseInner> beginCreateOrUpdate( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DatabaseInner> beginCreateOrUpdate( - String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters, Context context); + String resourceGroupName, + String clusterName, + String databaseName, + DatabaseInner parameters, + CallerRole callerRole, + Context context); + + /** + * Creates or updates a database. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @param callerRole By default, any user who run operation on a database become an Admin on it. This property + * allows the caller to exclude the caller from Admins list. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto database. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DatabaseInner createOrUpdate( + String resourceGroupName, + String clusterName, + String databaseName, + DatabaseInner parameters, + CallerRole callerRole); /** * Creates or updates a database. @@ -164,6 +200,8 @@ DatabaseInner createOrUpdate( * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @param callerRole By default, any user who run operation on a database become an Admin on it. This property + * allows the caller to exclude the caller from Admins list. * @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. @@ -172,7 +210,12 @@ DatabaseInner createOrUpdate( */ @ServiceMethod(returns = ReturnType.SINGLE) DatabaseInner createOrUpdate( - String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters, Context context); + String resourceGroupName, + String clusterName, + String databaseName, + DatabaseInner parameters, + CallerRole callerRole, + Context context); /** * Updates a database. @@ -181,6 +224,8 @@ DatabaseInner createOrUpdate( * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param parameters The database parameters supplied to the Update operation. + * @param callerRole By default, any user who run operation on a database become an Admin on it. This property + * allows the caller to exclude the caller from Admins list. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -188,7 +233,11 @@ DatabaseInner createOrUpdate( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DatabaseInner> beginUpdate( - String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters); + String resourceGroupName, + String clusterName, + String databaseName, + DatabaseInner parameters, + CallerRole callerRole); /** * Updates a database. @@ -197,6 +246,8 @@ SyncPoller, DatabaseInner> beginUpdate( * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param parameters The database parameters supplied to the Update operation. + * @param callerRole By default, any user who run operation on a database become an Admin on it. This property + * allows the caller to exclude the caller from Admins list. * @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. @@ -205,7 +256,34 @@ SyncPoller, DatabaseInner> beginUpdate( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, DatabaseInner> beginUpdate( - String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters, Context context); + String resourceGroupName, + String clusterName, + String databaseName, + DatabaseInner parameters, + CallerRole callerRole, + Context context); + + /** + * Updates a database. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param parameters The database parameters supplied to the Update operation. + * @param callerRole By default, any user who run operation on a database become an Admin on it. This property + * allows the caller to exclude the caller from Admins list. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto database. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DatabaseInner update( + String resourceGroupName, + String clusterName, + String databaseName, + DatabaseInner parameters, + CallerRole callerRole); /** * Updates a database. @@ -229,6 +307,8 @@ SyncPoller, DatabaseInner> beginUpdate( * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param parameters The database parameters supplied to the Update operation. + * @param callerRole By default, any user who run operation on a database become an Admin on it. This property + * allows the caller to exclude the caller from Admins list. * @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. @@ -237,7 +317,12 @@ SyncPoller, DatabaseInner> beginUpdate( */ @ServiceMethod(returns = ReturnType.SINGLE) DatabaseInner update( - String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters, Context context); + String resourceGroupName, + String clusterName, + String databaseName, + DatabaseInner parameters, + CallerRole callerRole, + Context context); /** * Deletes the database with the given name. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/AttachedDatabaseConfigurationInner.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/AttachedDatabaseConfigurationInner.java index 6dd3fcaaee34..da11c30ee6f5 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/AttachedDatabaseConfigurationInner.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/AttachedDatabaseConfigurationInner.java @@ -6,19 +6,15 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.kusto.models.DefaultPrincipalsModificationKind; import com.azure.resourcemanager.kusto.models.ProvisioningState; import com.azure.resourcemanager.kusto.models.TableLevelSharingProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Class representing an attached database configuration. */ @Fluent public final class AttachedDatabaseConfigurationInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AttachedDatabaseConfigurationInner.class); - /* * Resource location. */ @@ -177,6 +173,56 @@ public AttachedDatabaseConfigurationInner withTableLevelSharingProperties( return this; } + /** + * Get the databaseNameOverride property: Overrides the original database name. Relevant only when attaching to a + * specific database. + * + * @return the databaseNameOverride value. + */ + public String databaseNameOverride() { + return this.innerProperties() == null ? null : this.innerProperties().databaseNameOverride(); + } + + /** + * Set the databaseNameOverride property: Overrides the original database name. Relevant only when attaching to a + * specific database. + * + * @param databaseNameOverride the databaseNameOverride value to set. + * @return the AttachedDatabaseConfigurationInner object itself. + */ + public AttachedDatabaseConfigurationInner withDatabaseNameOverride(String databaseNameOverride) { + if (this.innerProperties() == null) { + this.innerProperties = new AttachedDatabaseConfigurationProperties(); + } + this.innerProperties().withDatabaseNameOverride(databaseNameOverride); + return this; + } + + /** + * Get the databaseNamePrefix property: Adds a prefix to the attached databases name. When following an entire + * cluster, that prefix would be added to all of the databases original names from leader cluster. + * + * @return the databaseNamePrefix value. + */ + public String databaseNamePrefix() { + return this.innerProperties() == null ? null : this.innerProperties().databaseNamePrefix(); + } + + /** + * Set the databaseNamePrefix property: Adds a prefix to the attached databases name. When following an entire + * cluster, that prefix would be added to all of the databases original names from leader cluster. + * + * @param databaseNamePrefix the databaseNamePrefix value to set. + * @return the AttachedDatabaseConfigurationInner object itself. + */ + public AttachedDatabaseConfigurationInner withDatabaseNamePrefix(String databaseNamePrefix) { + if (this.innerProperties() == null) { + this.innerProperties = new AttachedDatabaseConfigurationProperties(); + } + this.innerProperties().withDatabaseNamePrefix(databaseNamePrefix); + return this; + } + /** * Validates the instance. * diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/AttachedDatabaseConfigurationProperties.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/AttachedDatabaseConfigurationProperties.java index 820febeb8970..d2cb2712eeab 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/AttachedDatabaseConfigurationProperties.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/AttachedDatabaseConfigurationProperties.java @@ -9,15 +9,12 @@ import com.azure.resourcemanager.kusto.models.DefaultPrincipalsModificationKind; import com.azure.resourcemanager.kusto.models.ProvisioningState; import com.azure.resourcemanager.kusto.models.TableLevelSharingProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Class representing the an attached database configuration properties of kind specific. */ @Fluent public final class AttachedDatabaseConfigurationProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AttachedDatabaseConfigurationProperties.class); - /* * The provisioned state of the resource. */ @@ -25,22 +22,20 @@ public final class AttachedDatabaseConfigurationProperties { private ProvisioningState provisioningState; /* - * The name of the database which you would like to attach, use * if you - * want to follow all current and future databases. + * The name of the database which you would like to attach, use * if you want to follow all current and future + * databases. */ @JsonProperty(value = "databaseName", required = true) private String databaseName; /* - * The resource id of the cluster where the databases you would like to - * attach reside. + * The resource id of the cluster where the databases you would like to attach reside. */ @JsonProperty(value = "clusterResourceId", required = true) private String clusterResourceId; /* - * The list of databases from the clusterResourceId which are currently - * attached to the cluster. + * The list of databases from the clusterResourceId which are currently attached to the cluster. */ @JsonProperty(value = "attachedDatabaseNames", access = JsonProperty.Access.WRITE_ONLY) private List attachedDatabaseNames; @@ -57,6 +52,19 @@ public final class AttachedDatabaseConfigurationProperties { @JsonProperty(value = "tableLevelSharingProperties") private TableLevelSharingProperties tableLevelSharingProperties; + /* + * Overrides the original database name. Relevant only when attaching to a specific database. + */ + @JsonProperty(value = "databaseNameOverride") + private String databaseNameOverride; + + /* + * Adds a prefix to the attached databases name. When following an entire cluster, that prefix would be added to + * all of the databases original names from leader cluster. + */ + @JsonProperty(value = "databaseNamePrefix") + private String databaseNamePrefix; + /** * Get the provisioningState property: The provisioned state of the resource. * @@ -162,6 +170,50 @@ public AttachedDatabaseConfigurationProperties withTableLevelSharingProperties( return this; } + /** + * Get the databaseNameOverride property: Overrides the original database name. Relevant only when attaching to a + * specific database. + * + * @return the databaseNameOverride value. + */ + public String databaseNameOverride() { + return this.databaseNameOverride; + } + + /** + * Set the databaseNameOverride property: Overrides the original database name. Relevant only when attaching to a + * specific database. + * + * @param databaseNameOverride the databaseNameOverride value to set. + * @return the AttachedDatabaseConfigurationProperties object itself. + */ + public AttachedDatabaseConfigurationProperties withDatabaseNameOverride(String databaseNameOverride) { + this.databaseNameOverride = databaseNameOverride; + return this; + } + + /** + * Get the databaseNamePrefix property: Adds a prefix to the attached databases name. When following an entire + * cluster, that prefix would be added to all of the databases original names from leader cluster. + * + * @return the databaseNamePrefix value. + */ + public String databaseNamePrefix() { + return this.databaseNamePrefix; + } + + /** + * Set the databaseNamePrefix property: Adds a prefix to the attached databases name. When following an entire + * cluster, that prefix would be added to all of the databases original names from leader cluster. + * + * @param databaseNamePrefix the databaseNamePrefix value to set. + * @return the AttachedDatabaseConfigurationProperties object itself. + */ + public AttachedDatabaseConfigurationProperties withDatabaseNamePrefix(String databaseNamePrefix) { + this.databaseNamePrefix = databaseNamePrefix; + return this; + } + /** * Validates the instance. * @@ -169,20 +221,20 @@ public AttachedDatabaseConfigurationProperties withTableLevelSharingProperties( */ public void validate() { if (databaseName() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property databaseName in model AttachedDatabaseConfigurationProperties")); } if (clusterResourceId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property clusterResourceId in model" + " AttachedDatabaseConfigurationProperties")); } if (defaultPrincipalsModificationKind() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property defaultPrincipalsModificationKind in model" @@ -192,4 +244,6 @@ public void validate() { tableLevelSharingProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(AttachedDatabaseConfigurationProperties.class); } diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/AzureResourceSkuInner.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/AzureResourceSkuInner.java index 70f01a247b23..3f1effd5fbea 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/AzureResourceSkuInner.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/AzureResourceSkuInner.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.kusto.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.kusto.models.AzureCapacity; import com.azure.resourcemanager.kusto.models.AzureSku; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Azure resource SKU definition. */ @Fluent public final class AzureResourceSkuInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureResourceSkuInner.class); - /* * Resource Namespace and Type. */ diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/CheckNameResultInner.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/CheckNameResultInner.java index 68673f699903..f5a3ca1ed4eb 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/CheckNameResultInner.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/CheckNameResultInner.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.kusto.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.kusto.models.Reason; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The result returned from a check name availability request. */ @Fluent public final class CheckNameResultInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CheckNameResultInner.class); - /* * Specifies a Boolean value that indicates if the name is available. */ @@ -28,8 +24,8 @@ public final class CheckNameResultInner { private String name; /* - * Message indicating an unavailable name due to a conflict, or a - * description of the naming rules that are violated. + * Message indicating an unavailable name due to a conflict, or a description of the naming rules that are + * violated. */ @JsonProperty(value = "message") private String message; diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ClusterInner.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ClusterInner.java index 0ca9fa765467..a151a202f33f 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ClusterInner.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ClusterInner.java @@ -22,7 +22,6 @@ import com.azure.resourcemanager.kusto.models.State; import com.azure.resourcemanager.kusto.models.TrustedExternalTenant; import com.azure.resourcemanager.kusto.models.VirtualNetworkConfiguration; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; @@ -30,8 +29,6 @@ /** Class representing a Kusto cluster. */ @Fluent public final class ClusterInner extends Resource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterInner.class); - /* * The SKU of the cluster. */ @@ -638,7 +635,7 @@ public List privateEndpointConnections() { */ public void validate() { if (sku() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property sku in model ClusterInner")); } else { @@ -651,4 +648,6 @@ public void validate() { innerProperties().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(ClusterInner.class); } diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ClusterPrincipalAssignmentInner.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ClusterPrincipalAssignmentInner.java index 390c1efe3331..9fd1fe89ccd6 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ClusterPrincipalAssignmentInner.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ClusterPrincipalAssignmentInner.java @@ -6,18 +6,14 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.kusto.models.ClusterPrincipalRole; import com.azure.resourcemanager.kusto.models.PrincipalType; import com.azure.resourcemanager.kusto.models.ProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Class representing a cluster principal assignment. */ @Fluent public final class ClusterPrincipalAssignmentInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterPrincipalAssignmentInner.class); - /* * The cluster principal. */ diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ClusterPrincipalProperties.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ClusterPrincipalProperties.java index 5ecfc75b92c5..efbd6cbb7c6a 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ClusterPrincipalProperties.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ClusterPrincipalProperties.java @@ -9,17 +9,14 @@ import com.azure.resourcemanager.kusto.models.ClusterPrincipalRole; import com.azure.resourcemanager.kusto.models.PrincipalType; import com.azure.resourcemanager.kusto.models.ProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A class representing cluster principal property. */ @Fluent public final class ClusterPrincipalProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterPrincipalProperties.class); - /* - * The principal ID assigned to the cluster principal. It can be a user - * email, application ID, or security group name. + * The principal ID assigned to the cluster principal. It can be a user email, application ID, or security group + * name. */ @JsonProperty(value = "principalId", required = true) private String principalId; @@ -191,21 +188,23 @@ public String aadObjectId() { */ public void validate() { if (principalId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property principalId in model ClusterPrincipalProperties")); } if (role() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property role in model ClusterPrincipalProperties")); } if (principalType() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property principalType in model ClusterPrincipalProperties")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ClusterPrincipalProperties.class); } diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ClusterProperties.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ClusterProperties.java index 2d46169da798..945ba9709194 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ClusterProperties.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ClusterProperties.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.kusto.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.kusto.models.AcceptedAudiences; import com.azure.resourcemanager.kusto.models.ClusterNetworkAccessFlag; import com.azure.resourcemanager.kusto.models.EngineType; @@ -18,15 +17,12 @@ import com.azure.resourcemanager.kusto.models.State; import com.azure.resourcemanager.kusto.models.TrustedExternalTenant; import com.azure.resourcemanager.kusto.models.VirtualNetworkConfiguration; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Class representing the Kusto cluster properties. */ @Fluent public final class ClusterProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterProperties.class); - /* * The state of the resource. */ @@ -112,8 +108,8 @@ public final class ClusterProperties { private Boolean enableDoubleEncryption; /* - * Public network access to the cluster is enabled by default. When - * disabled, only private endpoint connection to the cluster is allowed + * Public network access to the cluster is enabled by default. When disabled, only private endpoint connection to + * the cluster is allowed */ @JsonProperty(value = "publicNetworkAccess") private PublicNetworkAccess publicNetworkAccess; @@ -137,29 +133,27 @@ public final class ClusterProperties { private List acceptedAudiences; /* - * A boolean value that indicates if the cluster could be automatically - * stopped (due to lack of data or no activity for many days). + * A boolean value that indicates if the cluster could be automatically stopped (due to lack of data or no activity + * for many days). */ @JsonProperty(value = "enableAutoStop") private Boolean enableAutoStop; /* - * Whether or not to restrict outbound network access. Value is optional - * but if passed in, must be 'Enabled' or 'Disabled' + * Whether or not to restrict outbound network access. Value is optional but if passed in, must be 'Enabled' or + * 'Disabled' */ @JsonProperty(value = "restrictOutboundNetworkAccess") private ClusterNetworkAccessFlag restrictOutboundNetworkAccess; /* - * List of allowed FQDNs(Fully Qualified Domain Name) for egress from - * Cluster. + * List of allowed FQDNs(Fully Qualified Domain Name) for egress from Cluster. */ @JsonProperty(value = "allowedFqdnList") private List allowedFqdnList; /* - * Indicates what public IP type to create - IPv4 (default), or DualStack - * (both IPv4 and IPv6) + * Indicates what public IP type to create - IPv4 (default), or DualStack (both IPv4 and IPv6) */ @JsonProperty(value = "publicIPType") private PublicIpType publicIpType; diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/DataConnectionInner.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/DataConnectionInner.java index ba6d8314d502..1ed3f3ae5085 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/DataConnectionInner.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/DataConnectionInner.java @@ -6,11 +6,9 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.kusto.models.EventGridDataConnection; import com.azure.resourcemanager.kusto.models.EventHubDataConnection; import com.azure.resourcemanager.kusto.models.IotHubDataConnection; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -30,8 +28,6 @@ }) @Fluent public class DataConnectionInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataConnectionInner.class); - /* * Resource location. */ diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/DataConnectionValidationInner.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/DataConnectionValidationInner.java index 1af06baf9738..5a0188af4e62 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/DataConnectionValidationInner.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/DataConnectionValidationInner.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.kusto.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Class representing an data connection validation. */ @Fluent public final class DataConnectionValidationInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataConnectionValidationInner.class); - /* * The name of the data connection. */ diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/DataConnectionValidationListResultInner.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/DataConnectionValidationListResultInner.java index 1244c23b4dfb..f1f593b06bd3 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/DataConnectionValidationListResultInner.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/DataConnectionValidationListResultInner.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.kusto.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.kusto.models.DataConnectionValidationResult; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The list Kusto data connection validation result. */ @Fluent public final class DataConnectionValidationListResultInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataConnectionValidationListResultInner.class); - /* * The list of Kusto data connection validation errors. */ diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/DatabaseInner.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/DatabaseInner.java index c9ae8759baae..fe1c964d6d84 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/DatabaseInner.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/DatabaseInner.java @@ -6,10 +6,8 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.kusto.models.ReadOnlyFollowingDatabase; import com.azure.resourcemanager.kusto.models.ReadWriteDatabase; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -28,8 +26,6 @@ }) @Fluent public class DatabaseInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DatabaseInner.class); - /* * Resource location. */ diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/DatabasePrincipalAssignmentInner.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/DatabasePrincipalAssignmentInner.java index cbe068ed2cba..8af126884543 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/DatabasePrincipalAssignmentInner.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/DatabasePrincipalAssignmentInner.java @@ -6,18 +6,14 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.kusto.models.DatabasePrincipalRole; import com.azure.resourcemanager.kusto.models.PrincipalType; import com.azure.resourcemanager.kusto.models.ProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Class representing a database principal assignment. */ @Fluent public final class DatabasePrincipalAssignmentInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DatabasePrincipalAssignmentInner.class); - /* * The database principal. */ diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/DatabasePrincipalInner.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/DatabasePrincipalInner.java index c3bf3d9b6cbe..ba9cbc2ed10d 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/DatabasePrincipalInner.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/DatabasePrincipalInner.java @@ -8,14 +8,11 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.kusto.models.DatabasePrincipalRole; import com.azure.resourcemanager.kusto.models.DatabasePrincipalType; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A class representing database principal entity. */ @Fluent public final class DatabasePrincipalInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DatabasePrincipalInner.class); - /* * Database principal role. */ @@ -194,19 +191,21 @@ public String tenantName() { */ public void validate() { if (role() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property role in model DatabasePrincipalInner")); } if (name() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property name in model DatabasePrincipalInner")); } if (type() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException("Missing required property type in model DatabasePrincipalInner")); } } + + private static final ClientLogger LOGGER = new ClientLogger(DatabasePrincipalInner.class); } diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/DatabasePrincipalListResultInner.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/DatabasePrincipalListResultInner.java index 73313f38d677..de5db2b56fbf 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/DatabasePrincipalListResultInner.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/DatabasePrincipalListResultInner.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.kusto.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The list Kusto database principals operation response. */ @Fluent public final class DatabasePrincipalListResultInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DatabasePrincipalListResultInner.class); - /* * The list of Kusto database principals. */ diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/DatabasePrincipalProperties.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/DatabasePrincipalProperties.java index 00b21471a84c..9a819622b313 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/DatabasePrincipalProperties.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/DatabasePrincipalProperties.java @@ -9,17 +9,14 @@ import com.azure.resourcemanager.kusto.models.DatabasePrincipalRole; import com.azure.resourcemanager.kusto.models.PrincipalType; import com.azure.resourcemanager.kusto.models.ProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A class representing database principal property. */ @Fluent public final class DatabasePrincipalProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DatabasePrincipalProperties.class); - /* - * The principal ID assigned to the database principal. It can be a user - * email, application ID, or security group name. + * The principal ID assigned to the database principal. It can be a user email, application ID, or security group + * name. */ @JsonProperty(value = "principalId", required = true) private String principalId; @@ -191,22 +188,24 @@ public String aadObjectId() { */ public void validate() { if (principalId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property principalId in model DatabasePrincipalProperties")); } if (role() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property role in model DatabasePrincipalProperties")); } if (principalType() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property principalType in model DatabasePrincipalProperties")); } } + + private static final ClientLogger LOGGER = new ClientLogger(DatabasePrincipalProperties.class); } diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/DiagnoseVirtualNetworkResultInner.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/DiagnoseVirtualNetworkResultInner.java index 53be09782411..8609a947f528 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/DiagnoseVirtualNetworkResultInner.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/DiagnoseVirtualNetworkResultInner.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.kusto.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The DiagnoseVirtualNetworkResult model. */ @Fluent public final class DiagnoseVirtualNetworkResultInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DiagnoseVirtualNetworkResultInner.class); - /* * The list of network connectivity diagnostic finding */ diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/EventGridConnectionProperties.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/EventGridConnectionProperties.java index 978dde91b846..56a59b90995b 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/EventGridConnectionProperties.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/EventGridConnectionProperties.java @@ -10,14 +10,11 @@ import com.azure.resourcemanager.kusto.models.DatabaseRouting; import com.azure.resourcemanager.kusto.models.EventGridDataFormat; import com.azure.resourcemanager.kusto.models.ProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Class representing the Kusto event grid connection properties. */ @Fluent public final class EventGridConnectionProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EventGridConnectionProperties.class); - /* * The resource ID of the storage account where the data resides. */ @@ -25,8 +22,7 @@ public final class EventGridConnectionProperties { private String storageAccountResourceId; /* - * The resource ID of the event grid that is subscribed to the storage - * account events. + * The resource ID of the event grid that is subscribed to the storage account events. */ @JsonProperty(value = "eventGridResourceId") private String eventGridResourceId; @@ -44,29 +40,25 @@ public final class EventGridConnectionProperties { private String consumerGroup; /* - * The table where the data should be ingested. Optionally the table - * information can be added to each message. + * The table where the data should be ingested. Optionally the table information can be added to each message. */ @JsonProperty(value = "tableName") private String tableName; /* - * The mapping rule to be used to ingest the data. Optionally the mapping - * information can be added to each message. + * The mapping rule to be used to ingest the data. Optionally the mapping information can be added to each message. */ @JsonProperty(value = "mappingRuleName") private String mappingRuleName; /* - * The data format of the message. Optionally the data format can be added - * to each message. + * The data format of the message. Optionally the data format can be added to each message. */ @JsonProperty(value = "dataFormat") private EventGridDataFormat dataFormat; /* - * A Boolean value that, if set to true, indicates that ingestion should - * ignore the first record of every file + * A Boolean value that, if set to true, indicates that ingestion should ignore the first record of every file */ @JsonProperty(value = "ignoreFirstRecord") private Boolean ignoreFirstRecord; @@ -78,8 +70,8 @@ public final class EventGridConnectionProperties { private BlobStorageEventType blobStorageEventType; /* - * The resource ID of a managed identity (system or user assigned) to be - * used to authenticate with event hub and storage account. + * The resource ID of a managed identity (system or user assigned) to be used to authenticate with event hub and + * storage account. */ @JsonProperty(value = "managedIdentityResourceId") private String managedIdentityResourceId; @@ -91,8 +83,8 @@ public final class EventGridConnectionProperties { private String managedIdentityObjectId; /* - * Indication for database routing information from the data connection, by - * default only database routing information is allowed + * Indication for database routing information from the data connection, by default only database routing + * information is allowed */ @JsonProperty(value = "databaseRouting") private DatabaseRouting databaseRouting; @@ -362,22 +354,24 @@ public ProvisioningState provisioningState() { */ public void validate() { if (storageAccountResourceId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property storageAccountResourceId in model EventGridConnectionProperties")); } if (eventHubResourceId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property eventHubResourceId in model EventGridConnectionProperties")); } if (consumerGroup() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property consumerGroup in model EventGridConnectionProperties")); } } + + private static final ClientLogger LOGGER = new ClientLogger(EventGridConnectionProperties.class); } diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/EventHubConnectionProperties.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/EventHubConnectionProperties.java index bb2d49a23b01..a94faaf84710 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/EventHubConnectionProperties.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/EventHubConnectionProperties.java @@ -10,15 +10,13 @@ import com.azure.resourcemanager.kusto.models.DatabaseRouting; import com.azure.resourcemanager.kusto.models.EventHubDataFormat; import com.azure.resourcemanager.kusto.models.ProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; import java.util.List; /** Class representing the Kusto event hub connection properties. */ @Fluent public final class EventHubConnectionProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EventHubConnectionProperties.class); - /* * The resource ID of the event hub to be used to create a data connection. */ @@ -32,22 +30,19 @@ public final class EventHubConnectionProperties { private String consumerGroup; /* - * The table where the data should be ingested. Optionally the table - * information can be added to each message. + * The table where the data should be ingested. Optionally the table information can be added to each message. */ @JsonProperty(value = "tableName") private String tableName; /* - * The mapping rule to be used to ingest the data. Optionally the mapping - * information can be added to each message. + * The mapping rule to be used to ingest the data. Optionally the mapping information can be added to each message. */ @JsonProperty(value = "mappingRuleName") private String mappingRuleName; /* - * The data format of the message. Optionally the data format can be added - * to each message. + * The data format of the message. Optionally the data format can be added to each message. */ @JsonProperty(value = "dataFormat") private EventHubDataFormat dataFormat; @@ -71,8 +66,7 @@ public final class EventHubConnectionProperties { private ProvisioningState provisioningState; /* - * The resource ID of a managed identity (system or user assigned) to be - * used to authenticate with event hub. + * The resource ID of a managed identity (system or user assigned) to be used to authenticate with event hub. */ @JsonProperty(value = "managedIdentityResourceId") private String managedIdentityResourceId; @@ -84,12 +78,19 @@ public final class EventHubConnectionProperties { private String managedIdentityObjectId; /* - * Indication for database routing information from the data connection, by - * default only database routing information is allowed + * Indication for database routing information from the data connection, by default only database routing + * information is allowed */ @JsonProperty(value = "databaseRouting") private DatabaseRouting databaseRouting; + /* + * When defined, the data connection retrieves existing Event hub events created since the Retrieval start date. It + * can only retrieve events retained by the Event hub, based on its retention period. + */ + @JsonProperty(value = "retrievalStartDate") + private OffsetDateTime retrievalStartDate; + /** * Get the eventHubResourceId property: The resource ID of the event hub to be used to create a data connection. * @@ -298,6 +299,30 @@ public EventHubConnectionProperties withDatabaseRouting(DatabaseRouting database return this; } + /** + * Get the retrievalStartDate property: When defined, the data connection retrieves existing Event hub events + * created since the Retrieval start date. It can only retrieve events retained by the Event hub, based on its + * retention period. + * + * @return the retrievalStartDate value. + */ + public OffsetDateTime retrievalStartDate() { + return this.retrievalStartDate; + } + + /** + * Set the retrievalStartDate property: When defined, the data connection retrieves existing Event hub events + * created since the Retrieval start date. It can only retrieve events retained by the Event hub, based on its + * retention period. + * + * @param retrievalStartDate the retrievalStartDate value to set. + * @return the EventHubConnectionProperties object itself. + */ + public EventHubConnectionProperties withRetrievalStartDate(OffsetDateTime retrievalStartDate) { + this.retrievalStartDate = retrievalStartDate; + return this; + } + /** * Validates the instance. * @@ -305,16 +330,18 @@ public EventHubConnectionProperties withDatabaseRouting(DatabaseRouting database */ public void validate() { if (eventHubResourceId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property eventHubResourceId in model EventHubConnectionProperties")); } if (consumerGroup() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property consumerGroup in model EventHubConnectionProperties")); } } + + private static final ClientLogger LOGGER = new ClientLogger(EventHubConnectionProperties.class); } diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/FollowerDatabaseDefinitionInner.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/FollowerDatabaseDefinitionInner.java index c034c8bdf5bc..2da7e89af4a5 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/FollowerDatabaseDefinitionInner.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/FollowerDatabaseDefinitionInner.java @@ -6,35 +6,43 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.resourcemanager.kusto.models.DatabaseShareOrigin; +import com.azure.resourcemanager.kusto.models.TableLevelSharingProperties; import com.fasterxml.jackson.annotation.JsonProperty; /** A class representing follower database request. */ @Fluent public final class FollowerDatabaseDefinitionInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(FollowerDatabaseDefinitionInner.class); - /* - * Resource id of the cluster that follows a database owned by this - * cluster. + * Resource id of the cluster that follows a database owned by this cluster. */ @JsonProperty(value = "clusterResourceId", required = true) private String clusterResourceId; /* - * Resource name of the attached database configuration in the follower - * cluster. + * Resource name of the attached database configuration in the follower cluster. */ @JsonProperty(value = "attachedDatabaseConfigurationName", required = true) private String attachedDatabaseConfigurationName; /* - * The database name owned by this cluster that was followed. * in case - * following all databases. + * The database name owned by this cluster that was followed. * in case following all databases. */ @JsonProperty(value = "databaseName", access = JsonProperty.Access.WRITE_ONLY) private String databaseName; + /* + * Table level sharing specifications + */ + @JsonProperty(value = "tableLevelSharingProperties", access = JsonProperty.Access.WRITE_ONLY) + private TableLevelSharingProperties tableLevelSharingProperties; + + /* + * The origin of the following setup. + */ + @JsonProperty(value = "databaseShareOrigin", access = JsonProperty.Access.WRITE_ONLY) + private DatabaseShareOrigin databaseShareOrigin; + /** * Get the clusterResourceId property: Resource id of the cluster that follows a database owned by this cluster. * @@ -88,6 +96,24 @@ public String databaseName() { return this.databaseName; } + /** + * Get the tableLevelSharingProperties property: Table level sharing specifications. + * + * @return the tableLevelSharingProperties value. + */ + public TableLevelSharingProperties tableLevelSharingProperties() { + return this.tableLevelSharingProperties; + } + + /** + * Get the databaseShareOrigin property: The origin of the following setup. + * + * @return the databaseShareOrigin value. + */ + public DatabaseShareOrigin databaseShareOrigin() { + return this.databaseShareOrigin; + } + /** * Validates the instance. * @@ -95,17 +121,22 @@ public String databaseName() { */ public void validate() { if (clusterResourceId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property clusterResourceId in model FollowerDatabaseDefinitionInner")); } if (attachedDatabaseConfigurationName() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property attachedDatabaseConfigurationName in model" + " FollowerDatabaseDefinitionInner")); } + if (tableLevelSharingProperties() != null) { + tableLevelSharingProperties().validate(); + } } + + private static final ClientLogger LOGGER = new ClientLogger(FollowerDatabaseDefinitionInner.class); } diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/IotHubConnectionProperties.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/IotHubConnectionProperties.java index 0473e6cddf3f..9ab2d254c770 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/IotHubConnectionProperties.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/IotHubConnectionProperties.java @@ -9,15 +9,13 @@ import com.azure.resourcemanager.kusto.models.DatabaseRouting; import com.azure.resourcemanager.kusto.models.IotHubDataFormat; import com.azure.resourcemanager.kusto.models.ProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; import java.util.List; /** Class representing the Kusto Iot hub connection properties. */ @Fluent public final class IotHubConnectionProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(IotHubConnectionProperties.class); - /* * The resource ID of the Iot hub to be used to create a data connection. */ @@ -31,22 +29,19 @@ public final class IotHubConnectionProperties { private String consumerGroup; /* - * The table where the data should be ingested. Optionally the table - * information can be added to each message. + * The table where the data should be ingested. Optionally the table information can be added to each message. */ @JsonProperty(value = "tableName") private String tableName; /* - * The mapping rule to be used to ingest the data. Optionally the mapping - * information can be added to each message. + * The mapping rule to be used to ingest the data. Optionally the mapping information can be added to each message. */ @JsonProperty(value = "mappingRuleName") private String mappingRuleName; /* - * The data format of the message. Optionally the data format can be added - * to each message. + * The data format of the message. Optionally the data format can be added to each message. */ @JsonProperty(value = "dataFormat") private IotHubDataFormat dataFormat; @@ -64,12 +59,19 @@ public final class IotHubConnectionProperties { private String sharedAccessPolicyName; /* - * Indication for database routing information from the data connection, by - * default only database routing information is allowed + * Indication for database routing information from the data connection, by default only database routing + * information is allowed */ @JsonProperty(value = "databaseRouting") private DatabaseRouting databaseRouting; + /* + * When defined, the data connection retrieves existing Event hub events created since the Retrieval start date. It + * can only retrieve events retained by the Event hub, based on its retention period. + */ + @JsonProperty(value = "retrievalStartDate") + private OffsetDateTime retrievalStartDate; + /* * The provisioned state of the resource. */ @@ -244,6 +246,30 @@ public IotHubConnectionProperties withDatabaseRouting(DatabaseRouting databaseRo return this; } + /** + * Get the retrievalStartDate property: When defined, the data connection retrieves existing Event hub events + * created since the Retrieval start date. It can only retrieve events retained by the Event hub, based on its + * retention period. + * + * @return the retrievalStartDate value. + */ + public OffsetDateTime retrievalStartDate() { + return this.retrievalStartDate; + } + + /** + * Set the retrievalStartDate property: When defined, the data connection retrieves existing Event hub events + * created since the Retrieval start date. It can only retrieve events retained by the Event hub, based on its + * retention period. + * + * @param retrievalStartDate the retrievalStartDate value to set. + * @return the IotHubConnectionProperties object itself. + */ + public IotHubConnectionProperties withRetrievalStartDate(OffsetDateTime retrievalStartDate) { + this.retrievalStartDate = retrievalStartDate; + return this; + } + /** * Get the provisioningState property: The provisioned state of the resource. * @@ -260,22 +286,24 @@ public ProvisioningState provisioningState() { */ public void validate() { if (iotHubResourceId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property iotHubResourceId in model IotHubConnectionProperties")); } if (consumerGroup() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property consumerGroup in model IotHubConnectionProperties")); } if (sharedAccessPolicyName() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property sharedAccessPolicyName in model IotHubConnectionProperties")); } } + + private static final ClientLogger LOGGER = new ClientLogger(IotHubConnectionProperties.class); } diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/LanguageExtensionInner.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/LanguageExtensionInner.java index c50b194ff78b..a9804d458e0c 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/LanguageExtensionInner.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/LanguageExtensionInner.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.kusto.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.kusto.models.LanguageExtensionName; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** The language extension object. */ @Fluent public final class LanguageExtensionInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LanguageExtensionInner.class); - /* * The language extension name. */ diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ManagedPrivateEndpointInner.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ManagedPrivateEndpointInner.java index ee015bdaf0cb..78882c5a20fe 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ManagedPrivateEndpointInner.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ManagedPrivateEndpointInner.java @@ -7,16 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.kusto.models.ProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Class representing a managed private endpoint. */ @Fluent public final class ManagedPrivateEndpointInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedPrivateEndpointInner.class); - /* * A managed private endpoint. */ diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ManagedPrivateEndpointProperties.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ManagedPrivateEndpointProperties.java index 53f0f40307f2..d4aab89fbd8e 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ManagedPrivateEndpointProperties.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ManagedPrivateEndpointProperties.java @@ -7,24 +7,19 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.kusto.models.ProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A class representing the properties of a managed private endpoint object. */ @Fluent public final class ManagedPrivateEndpointProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedPrivateEndpointProperties.class); - /* - * The ARM resource ID of the resource for which the managed private - * endpoint is created. + * The ARM resource ID of the resource for which the managed private endpoint is created. */ @JsonProperty(value = "privateLinkResourceId", required = true) private String privateLinkResourceId; /* - * The region of the resource to which the managed private endpoint is - * created. + * The region of the resource to which the managed private endpoint is created. */ @JsonProperty(value = "privateLinkResourceRegion") private String privateLinkResourceRegion; @@ -147,16 +142,18 @@ public ProvisioningState provisioningState() { */ public void validate() { if (privateLinkResourceId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property privateLinkResourceId in model ManagedPrivateEndpointProperties")); } if (groupId() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property groupId in model ManagedPrivateEndpointProperties")); } } + + private static final ClientLogger LOGGER = new ClientLogger(ManagedPrivateEndpointProperties.class); } diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/OperationInner.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/OperationInner.java index 35a0e1104550..555524b9561f 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/OperationInner.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/OperationInner.java @@ -5,19 +5,16 @@ package com.azure.resourcemanager.kusto.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.kusto.models.OperationDisplay; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A REST API operation. */ @Fluent public final class OperationInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationInner.class); - /* - * The operation name. This is of the format - * {provider}/{resource}/{operation}. + * The operation name. + * + * This is of the format {provider}/{resource}/{operation}. */ @JsonProperty(value = "name") private String name; @@ -35,13 +32,15 @@ public final class OperationInner { private String origin; /* - * Any object + * Properties of the operation. */ @JsonProperty(value = "properties") private Object properties; /** - * Get the name property: The operation name. This is of the format {provider}/{resource}/{operation}. + * Get the name property: The operation name. + * + *

This is of the format {provider}/{resource}/{operation}. * * @return the name value. */ @@ -50,7 +49,9 @@ public String name() { } /** - * Set the name property: The operation name. This is of the format {provider}/{resource}/{operation}. + * Set the name property: The operation name. + * + *

This is of the format {provider}/{resource}/{operation}. * * @param name the name value to set. * @return the OperationInner object itself. @@ -101,7 +102,7 @@ public OperationInner withOrigin(String origin) { } /** - * Get the properties property: Any object. + * Get the properties property: Properties of the operation. * * @return the properties value. */ @@ -110,7 +111,7 @@ public Object properties() { } /** - * Set the properties property: Any object. + * Set the properties property: Properties of the operation. * * @param properties the properties value to set. * @return the OperationInner object itself. diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/OperationResultErrorProperties.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/OperationResultErrorProperties.java index 124e0214b0f0..4c12411e8d70 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/OperationResultErrorProperties.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/OperationResultErrorProperties.java @@ -5,15 +5,11 @@ package com.azure.resourcemanager.kusto.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Operation result error properties. */ @Fluent public final class OperationResultErrorProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationResultErrorProperties.class); - /* * The code of the error. */ diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/OperationResultInner.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/OperationResultInner.java index fe0b75c1eb44..547a011faa64 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/OperationResultInner.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/OperationResultInner.java @@ -5,18 +5,14 @@ package com.azure.resourcemanager.kusto.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.kusto.models.ProvisioningState; import com.azure.resourcemanager.kusto.models.Status; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; /** Operation Result Entity. */ @Fluent public final class OperationResultInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationResultInner.class); - /* * ID of the resource. */ diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/OperationResultProperties.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/OperationResultProperties.java index f2684b67be30..f3c74a33b225 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/OperationResultProperties.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/OperationResultProperties.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.kusto.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.kusto.models.ProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Operation result properties. */ @Fluent public final class OperationResultProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationResultProperties.class); - /* * The kind of the operation. */ diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/OutboundNetworkDependenciesEndpointInner.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/OutboundNetworkDependenciesEndpointInner.java index edaad6ddf49d..9e22a79c4c35 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/OutboundNetworkDependenciesEndpointInner.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/OutboundNetworkDependenciesEndpointInner.java @@ -6,18 +6,14 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.kusto.models.EndpointDependency; import com.azure.resourcemanager.kusto.models.ProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Endpoints accessed for a common purpose that the Kusto Service Environment requires outbound network access to. */ @Fluent public final class OutboundNetworkDependenciesEndpointInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OutboundNetworkDependenciesEndpointInner.class); - /* * The outbound environment endpoint properties. */ diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/OutboundNetworkDependenciesEndpointProperties.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/OutboundNetworkDependenciesEndpointProperties.java index 137259a593b0..c452087bb6b8 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/OutboundNetworkDependenciesEndpointProperties.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/OutboundNetworkDependenciesEndpointProperties.java @@ -5,22 +5,17 @@ package com.azure.resourcemanager.kusto.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.kusto.models.EndpointDependency; import com.azure.resourcemanager.kusto.models.ProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Endpoints accessed for a common purpose that the Kusto Service Environment requires outbound network access to. */ @Fluent public final class OutboundNetworkDependenciesEndpointProperties { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(OutboundNetworkDependenciesEndpointProperties.class); - /* - * The type of service accessed by the Kusto Service Environment, e.g., - * Azure Storage, Azure SQL Database, and Azure Active Directory. + * The type of service accessed by the Kusto Service Environment, e.g., Azure Storage, Azure SQL Database, and + * Azure Active Directory. */ @JsonProperty(value = "category") private String category; diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/PrivateEndpointConnectionInner.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/PrivateEndpointConnectionInner.java index 8e0fdaa2c0a4..38e7a154c16a 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/PrivateEndpointConnectionInner.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/PrivateEndpointConnectionInner.java @@ -7,17 +7,13 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.kusto.models.PrivateEndpointProperty; import com.azure.resourcemanager.kusto.models.PrivateLinkServiceConnectionStateProperty; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A private endpoint connection. */ @Fluent public final class PrivateEndpointConnectionInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionInner.class); - /* * Resource properties. */ diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/PrivateEndpointConnectionProperties.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/PrivateEndpointConnectionProperties.java index 61b7a8e9e42d..2e54989b2816 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/PrivateEndpointConnectionProperties.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/PrivateEndpointConnectionProperties.java @@ -8,14 +8,11 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.kusto.models.PrivateEndpointProperty; import com.azure.resourcemanager.kusto.models.PrivateLinkServiceConnectionStateProperty; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties of a private endpoint connection. */ @Fluent public final class PrivateEndpointConnectionProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionProperties.class); - /* * Private endpoint which the connection belongs to. */ @@ -98,7 +95,7 @@ public void validate() { privateEndpoint().validate(); } if (privateLinkServiceConnectionState() == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( "Missing required property privateLinkServiceConnectionState in model" @@ -107,4 +104,6 @@ public void validate() { privateLinkServiceConnectionState().validate(); } } + + private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionProperties.class); } diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/PrivateLinkResourceInner.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/PrivateLinkResourceInner.java index 7f2c9d5f60ff..659c42256a0d 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/PrivateLinkResourceInner.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/PrivateLinkResourceInner.java @@ -7,16 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** A private link resource. */ @Fluent public final class PrivateLinkResourceInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourceInner.class); - /* * Resource properties. */ diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/PrivateLinkResourceProperties.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/PrivateLinkResourceProperties.java index 0022b8caae99..cbd112a374dd 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/PrivateLinkResourceProperties.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/PrivateLinkResourceProperties.java @@ -5,16 +5,12 @@ package com.azure.resourcemanager.kusto.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Properties of a private link resource. */ @Immutable public final class PrivateLinkResourceProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourceProperties.class); - /* * The private link resource group id. */ diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ReadOnlyFollowingDatabaseProperties.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ReadOnlyFollowingDatabaseProperties.java index 20b4444e5a4d..09d62c730ef2 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ReadOnlyFollowingDatabaseProperties.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ReadOnlyFollowingDatabaseProperties.java @@ -5,19 +5,17 @@ package com.azure.resourcemanager.kusto.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.kusto.models.DatabaseShareOrigin; import com.azure.resourcemanager.kusto.models.DatabaseStatistics; import com.azure.resourcemanager.kusto.models.PrincipalsModificationKind; import com.azure.resourcemanager.kusto.models.ProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; +import com.azure.resourcemanager.kusto.models.TableLevelSharingProperties; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.Duration; /** Class representing the Kusto database properties. */ @Fluent public final class ReadOnlyFollowingDatabaseProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ReadOnlyFollowingDatabaseProperties.class); - /* * The provisioned state of the resource. */ @@ -25,8 +23,7 @@ public final class ReadOnlyFollowingDatabaseProperties { private ProvisioningState provisioningState; /* - * The time the data should be kept before it stops being accessible to - * queries in TimeSpan. + * The time the data should be kept before it stops being accessible to queries in TimeSpan. */ @JsonProperty(value = "softDeletePeriod", access = JsonProperty.Access.WRITE_ONLY) private Duration softDeletePeriod; @@ -61,6 +58,24 @@ public final class ReadOnlyFollowingDatabaseProperties { @JsonProperty(value = "principalsModificationKind", access = JsonProperty.Access.WRITE_ONLY) private PrincipalsModificationKind principalsModificationKind; + /* + * Table level sharing specifications + */ + @JsonProperty(value = "tableLevelSharingProperties", access = JsonProperty.Access.WRITE_ONLY) + private TableLevelSharingProperties tableLevelSharingProperties; + + /* + * The original database name, before databaseNameOverride or databaseNamePrefix where applied. + */ + @JsonProperty(value = "originalDatabaseName", access = JsonProperty.Access.WRITE_ONLY) + private String originalDatabaseName; + + /* + * The origin of the following setup. + */ + @JsonProperty(value = "databaseShareOrigin", access = JsonProperty.Access.WRITE_ONLY) + private DatabaseShareOrigin databaseShareOrigin; + /** * Get the provisioningState property: The provisioned state of the resource. * @@ -136,6 +151,34 @@ public PrincipalsModificationKind principalsModificationKind() { return this.principalsModificationKind; } + /** + * Get the tableLevelSharingProperties property: Table level sharing specifications. + * + * @return the tableLevelSharingProperties value. + */ + public TableLevelSharingProperties tableLevelSharingProperties() { + return this.tableLevelSharingProperties; + } + + /** + * Get the originalDatabaseName property: The original database name, before databaseNameOverride or + * databaseNamePrefix where applied. + * + * @return the originalDatabaseName value. + */ + public String originalDatabaseName() { + return this.originalDatabaseName; + } + + /** + * Get the databaseShareOrigin property: The origin of the following setup. + * + * @return the databaseShareOrigin value. + */ + public DatabaseShareOrigin databaseShareOrigin() { + return this.databaseShareOrigin; + } + /** * Validates the instance. * @@ -145,5 +188,8 @@ public void validate() { if (statistics() != null) { statistics().validate(); } + if (tableLevelSharingProperties() != null) { + tableLevelSharingProperties().validate(); + } } } diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ReadWriteDatabaseProperties.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ReadWriteDatabaseProperties.java index 50ea2493e673..112207ff4475 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ReadWriteDatabaseProperties.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ReadWriteDatabaseProperties.java @@ -5,18 +5,14 @@ package com.azure.resourcemanager.kusto.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.kusto.models.DatabaseStatistics; import com.azure.resourcemanager.kusto.models.ProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.Duration; /** Class representing the Kusto database properties. */ @Fluent public final class ReadWriteDatabaseProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ReadWriteDatabaseProperties.class); - /* * The provisioned state of the resource. */ @@ -24,8 +20,7 @@ public final class ReadWriteDatabaseProperties { private ProvisioningState provisioningState; /* - * The time the data should be kept before it stops being accessible to - * queries in TimeSpan. + * The time the data should be kept before it stops being accessible to queries in TimeSpan. */ @JsonProperty(value = "softDeletePeriod") private Duration softDeletePeriod; diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ScriptInner.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ScriptInner.java index 06a3498cfe13..e4d15a2ed459 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ScriptInner.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ScriptInner.java @@ -7,16 +7,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.kusto.models.ProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Class representing a database script. */ @Fluent public final class ScriptInner extends ProxyResource { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ScriptInner.class); - /* * The database script. */ diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ScriptProperties.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ScriptProperties.java index f904a179e530..d46acb7f7324 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ScriptProperties.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/ScriptProperties.java @@ -5,34 +5,28 @@ package com.azure.resourcemanager.kusto.fluent.models; import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.kusto.models.ProvisioningState; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A class representing database script property. */ @Fluent public final class ScriptProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ScriptProperties.class); - /* - * The url to the KQL script blob file. Must not be used together with - * scriptContent property + * The url to the KQL script blob file. Must not be used together with scriptContent property */ @JsonProperty(value = "scriptUrl") private String scriptUrl; /* - * The SaS token that provide read access to the file which contain the - * script. Must be provided when using scriptUrl property. + * The SaS token that provide read access to the file which contain the script. Must be provided when using + * scriptUrl property. */ @JsonProperty(value = "scriptUrlSasToken") private String scriptUrlSasToken; /* - * The script content. This property should be used when the script is - * provide inline and not through file in a SA. Must not be used together - * with scriptUrl and scriptUrlSasToken properties. + * The script content. This property should be used when the script is provide inline and not through file in a SA. + * Must not be used together with scriptUrl and scriptUrlSasToken properties. */ @JsonProperty(value = "scriptContent") private String scriptContent; diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/SkuDescriptionInner.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/SkuDescriptionInner.java index f1104f4a5584..87f3dcc9824f 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/SkuDescriptionInner.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/fluent/models/SkuDescriptionInner.java @@ -5,17 +5,13 @@ package com.azure.resourcemanager.kusto.fluent.models; import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.kusto.models.SkuLocationInfoItem; -import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** The Kusto SKU description of given resource type. */ @Immutable public final class SkuDescriptionInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SkuDescriptionInner.class); - /* * The resource type */ diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/AttachedDatabaseConfigurationImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/AttachedDatabaseConfigurationImpl.java index ef8c970221a0..dd81dba3af12 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/AttachedDatabaseConfigurationImpl.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/AttachedDatabaseConfigurationImpl.java @@ -67,6 +67,14 @@ public TableLevelSharingProperties tableLevelSharingProperties() { return this.innerModel().tableLevelSharingProperties(); } + public String databaseNameOverride() { + return this.innerModel().databaseNameOverride(); + } + + public String databaseNamePrefix() { + return this.innerModel().databaseNamePrefix(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -75,6 +83,10 @@ public String regionName() { return this.location(); } + public String resourceGroupName() { + return resourceGroupName; + } + public AttachedDatabaseConfigurationInner innerModel() { return this.innerObject; } @@ -206,4 +218,14 @@ public AttachedDatabaseConfigurationImpl withTableLevelSharingProperties( this.innerModel().withTableLevelSharingProperties(tableLevelSharingProperties); return this; } + + public AttachedDatabaseConfigurationImpl withDatabaseNameOverride(String databaseNameOverride) { + this.innerModel().withDatabaseNameOverride(databaseNameOverride); + return this; + } + + public AttachedDatabaseConfigurationImpl withDatabaseNamePrefix(String databaseNamePrefix) { + this.innerModel().withDatabaseNamePrefix(databaseNamePrefix); + return this; + } } diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/AttachedDatabaseConfigurationsClientImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/AttachedDatabaseConfigurationsClientImpl.java index 4407285f4bb1..efc3ea68cc77 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/AttachedDatabaseConfigurationsClientImpl.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/AttachedDatabaseConfigurationsClientImpl.java @@ -30,7 +30,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.kusto.fluent.AttachedDatabaseConfigurationsClient; @@ -44,8 +43,6 @@ /** An instance of this class provides access to all the operations defined in AttachedDatabaseConfigurationsClient. */ public final class AttachedDatabaseConfigurationsClientImpl implements AttachedDatabaseConfigurationsClient { - private final ClientLogger logger = new ClientLogger(AttachedDatabaseConfigurationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final AttachedDatabaseConfigurationsService service; @@ -283,14 +280,7 @@ private Mono> checkNameAvailabilityWithResponseAs private Mono checkNameAvailabilityAsync( String resourceGroupName, String clusterName, AttachedDatabaseConfigurationsCheckNameRequest resourceName) { return checkNameAvailabilityWithResponseAsync(resourceGroupName, clusterName, resourceName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -632,14 +622,7 @@ private Mono> getWithResponseAsync( private Mono getAsync( String resourceGroupName, String clusterName, String attachedDatabaseConfigurationName) { return getWithResponseAsync(resourceGroupName, clusterName, attachedDatabaseConfigurationName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/AttachedDatabaseConfigurationsImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/AttachedDatabaseConfigurationsImpl.java index c9b4eafba5e3..4b7302c68883 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/AttachedDatabaseConfigurationsImpl.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/AttachedDatabaseConfigurationsImpl.java @@ -16,10 +16,9 @@ import com.azure.resourcemanager.kusto.models.AttachedDatabaseConfigurations; import com.azure.resourcemanager.kusto.models.AttachedDatabaseConfigurationsCheckNameRequest; import com.azure.resourcemanager.kusto.models.CheckNameResult; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class AttachedDatabaseConfigurationsImpl implements AttachedDatabaseConfigurations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AttachedDatabaseConfigurationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(AttachedDatabaseConfigurationsImpl.class); private final AttachedDatabaseConfigurationsClient innerClient; @@ -115,7 +114,7 @@ public void delete( public AttachedDatabaseConfiguration getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -123,14 +122,14 @@ public AttachedDatabaseConfiguration getById(String id) { } String clusterName = Utils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } String attachedDatabaseConfigurationName = Utils.getValueFromIdByName(id, "attachedDatabaseConfigurations"); if (attachedDatabaseConfigurationName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -147,7 +146,7 @@ public AttachedDatabaseConfiguration getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -155,14 +154,14 @@ public Response getByIdWithResponse(String id, Co } String clusterName = Utils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } String attachedDatabaseConfigurationName = Utils.getValueFromIdByName(id, "attachedDatabaseConfigurations"); if (attachedDatabaseConfigurationName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -177,7 +176,7 @@ public Response getByIdWithResponse(String id, Co public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -185,14 +184,14 @@ public void deleteById(String id) { } String clusterName = Utils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } String attachedDatabaseConfigurationName = Utils.getValueFromIdByName(id, "attachedDatabaseConfigurations"); if (attachedDatabaseConfigurationName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -207,7 +206,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -215,14 +214,14 @@ public void deleteByIdWithResponse(String id, Context context) { } String clusterName = Utils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } String attachedDatabaseConfigurationName = Utils.getValueFromIdByName(id, "attachedDatabaseConfigurations"); if (attachedDatabaseConfigurationName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClusterImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClusterImpl.java index 8fdd4a522d05..ea4e115a12e7 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClusterImpl.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClusterImpl.java @@ -225,6 +225,10 @@ public String regionName() { return this.location(); } + public String resourceGroupName() { + return resourceGroupName; + } + public ClusterInner innerModel() { return this.innerObject; } diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClusterPrincipalAssignmentImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClusterPrincipalAssignmentImpl.java index a02a4f865339..4714979ccba7 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClusterPrincipalAssignmentImpl.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClusterPrincipalAssignmentImpl.java @@ -61,6 +61,10 @@ public String aadObjectId() { return this.innerModel().aadObjectId(); } + public String resourceGroupName() { + return resourceGroupName; + } + public ClusterPrincipalAssignmentInner innerModel() { return this.innerObject; } diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClusterPrincipalAssignmentsClientImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClusterPrincipalAssignmentsClientImpl.java index 393c43c5c358..4ab4d4899c81 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClusterPrincipalAssignmentsClientImpl.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClusterPrincipalAssignmentsClientImpl.java @@ -30,7 +30,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.kusto.fluent.ClusterPrincipalAssignmentsClient; @@ -44,8 +43,6 @@ /** An instance of this class provides access to all the operations defined in ClusterPrincipalAssignmentsClient. */ public final class ClusterPrincipalAssignmentsClientImpl implements ClusterPrincipalAssignmentsClient { - private final ClientLogger logger = new ClientLogger(ClusterPrincipalAssignmentsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ClusterPrincipalAssignmentsService service; @@ -289,14 +286,7 @@ private Mono checkNameAvailabilityAsync( String clusterName, ClusterPrincipalAssignmentCheckNameRequest principalAssignmentName) { return checkNameAvailabilityWithResponseAsync(resourceGroupName, clusterName, principalAssignmentName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -463,14 +453,7 @@ private Mono> getWithResponseAsync( private Mono getAsync( String resourceGroupName, String clusterName, String principalAssignmentName) { return getWithResponseAsync(resourceGroupName, clusterName, principalAssignmentName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClusterPrincipalAssignmentsImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClusterPrincipalAssignmentsImpl.java index dd5ed3c5e76a..1d421f57ae5b 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClusterPrincipalAssignmentsImpl.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClusterPrincipalAssignmentsImpl.java @@ -16,10 +16,9 @@ import com.azure.resourcemanager.kusto.models.ClusterPrincipalAssignment; import com.azure.resourcemanager.kusto.models.ClusterPrincipalAssignmentCheckNameRequest; import com.azure.resourcemanager.kusto.models.ClusterPrincipalAssignments; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ClusterPrincipalAssignmentsImpl implements ClusterPrincipalAssignments { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClusterPrincipalAssignmentsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ClusterPrincipalAssignmentsImpl.class); private final ClusterPrincipalAssignmentsClient innerClient; @@ -114,7 +113,7 @@ public PagedIterable list( public ClusterPrincipalAssignment getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -122,14 +121,14 @@ public ClusterPrincipalAssignment getById(String id) { } String clusterName = Utils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } String principalAssignmentName = Utils.getValueFromIdByName(id, "principalAssignments"); if (principalAssignmentName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -143,7 +142,7 @@ public ClusterPrincipalAssignment getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -151,14 +150,14 @@ public Response getByIdWithResponse(String id, Conte } String clusterName = Utils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } String principalAssignmentName = Utils.getValueFromIdByName(id, "principalAssignments"); if (principalAssignmentName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -172,7 +171,7 @@ public Response getByIdWithResponse(String id, Conte public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -180,14 +179,14 @@ public void deleteById(String id) { } String clusterName = Utils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } String principalAssignmentName = Utils.getValueFromIdByName(id, "principalAssignments"); if (principalAssignmentName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -201,7 +200,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -209,14 +208,14 @@ public void deleteByIdWithResponse(String id, Context context) { } String clusterName = Utils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } String principalAssignmentName = Utils.getValueFromIdByName(id, "principalAssignments"); if (principalAssignmentName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClustersClientImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClustersClientImpl.java index 89047e216e5a..23508d8449db 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClustersClientImpl.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClustersClientImpl.java @@ -31,7 +31,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.kusto.fluent.ClustersClient; @@ -57,8 +56,6 @@ /** An instance of this class provides access to all the operations defined in ClustersClient. */ public final class ClustersClientImpl implements ClustersClient { - private final ClientLogger logger = new ClientLogger(ClustersClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ClustersService service; @@ -465,14 +462,7 @@ private Mono> getByResourceGroupWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String clusterName) { return getByResourceGroupWithResponseAsync(resourceGroupName, clusterName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -3103,14 +3093,7 @@ private Mono> checkNameAvailabilityWithResponseAs private Mono checkNameAvailabilityAsync( String location, ClusterCheckNameRequest clusterName) { return checkNameAvailabilityWithResponseAsync(location, clusterName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -4224,7 +4207,8 @@ public void removeLanguageExtensions( /** * 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. @@ -4265,7 +4249,8 @@ public void removeLanguageExtensions( /** * 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/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClustersImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClustersImpl.java index 61505157f94d..3b60361f11d8 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClustersImpl.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ClustersImpl.java @@ -29,10 +29,9 @@ import com.azure.resourcemanager.kusto.models.LanguageExtensionsList; import com.azure.resourcemanager.kusto.models.OutboundNetworkDependenciesEndpoint; import com.azure.resourcemanager.kusto.models.SkuDescription; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ClustersImpl implements Clusters { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ClustersImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ClustersImpl.class); private final ClustersClient innerClient; @@ -261,7 +260,7 @@ public void removeLanguageExtensions( public Cluster getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -269,7 +268,7 @@ public Cluster getById(String id) { } String clusterName = Utils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); @@ -280,7 +279,7 @@ public Cluster getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -288,7 +287,7 @@ public Response getByIdWithResponse(String id, Context context) { } String clusterName = Utils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); @@ -299,7 +298,7 @@ public Response getByIdWithResponse(String id, Context context) { public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -307,7 +306,7 @@ public void deleteById(String id) { } String clusterName = Utils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); @@ -318,7 +317,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -326,7 +325,7 @@ public void deleteByIdWithResponse(String id, Context context) { } String clusterName = Utils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DataConnectionsClientImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DataConnectionsClientImpl.java index 29c8fc4621e0..5073a388823c 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DataConnectionsClientImpl.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DataConnectionsClientImpl.java @@ -31,7 +31,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.kusto.fluent.DataConnectionsClient; @@ -47,8 +46,6 @@ /** An instance of this class provides access to all the operations defined in DataConnectionsClient. */ public final class DataConnectionsClientImpl implements DataConnectionsClient { - private final ClientLogger logger = new ClientLogger(DataConnectionsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final DataConnectionsService service; @@ -851,14 +848,7 @@ private Mono checkNameAvailabilityAsync( String databaseName, DataConnectionCheckNameRequest dataConnectionName) { return checkNameAvailabilityWithResponseAsync(resourceGroupName, clusterName, databaseName, dataConnectionName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -1041,14 +1031,7 @@ private Mono> getWithResponseAsync( private Mono getAsync( String resourceGroupName, String clusterName, String databaseName, String dataConnectionName) { return getWithResponseAsync(resourceGroupName, clusterName, databaseName, dataConnectionName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DataConnectionsImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DataConnectionsImpl.java index 91905324bfbe..12f49e687511 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DataConnectionsImpl.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DataConnectionsImpl.java @@ -19,10 +19,9 @@ import com.azure.resourcemanager.kusto.models.DataConnectionCheckNameRequest; import com.azure.resourcemanager.kusto.models.DataConnectionValidationListResult; import com.azure.resourcemanager.kusto.models.DataConnections; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class DataConnectionsImpl implements DataConnections { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataConnectionsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(DataConnectionsImpl.class); private final DataConnectionsClient innerClient; diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasePrincipalAssignmentImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasePrincipalAssignmentImpl.java index 48e8a5ec6431..34b47713c7dc 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasePrincipalAssignmentImpl.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasePrincipalAssignmentImpl.java @@ -61,6 +61,10 @@ public String aadObjectId() { return this.innerModel().aadObjectId(); } + public String resourceGroupName() { + return resourceGroupName; + } + public DatabasePrincipalAssignmentInner innerModel() { return this.innerObject; } diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasePrincipalAssignmentsClientImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasePrincipalAssignmentsClientImpl.java index 7a36e4097e99..64450f65fb28 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasePrincipalAssignmentsClientImpl.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasePrincipalAssignmentsClientImpl.java @@ -30,7 +30,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.kusto.fluent.DatabasePrincipalAssignmentsClient; @@ -44,8 +43,6 @@ /** An instance of this class provides access to all the operations defined in DatabasePrincipalAssignmentsClient. */ public final class DatabasePrincipalAssignmentsClientImpl implements DatabasePrincipalAssignmentsClient { - private final ClientLogger logger = new ClientLogger(DatabasePrincipalAssignmentsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final DatabasePrincipalAssignmentsService service; @@ -309,14 +306,7 @@ private Mono checkNameAvailabilityAsync( DatabasePrincipalAssignmentCheckNameRequest principalAssignmentName) { return checkNameAvailabilityWithResponseAsync( resourceGroupName, clusterName, databaseName, principalAssignmentName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -506,14 +496,7 @@ private Mono> getWithResponseAsync( private Mono getAsync( String resourceGroupName, String clusterName, String databaseName, String principalAssignmentName) { return getWithResponseAsync(resourceGroupName, clusterName, databaseName, principalAssignmentName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasePrincipalAssignmentsImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasePrincipalAssignmentsImpl.java index 4933c6081113..146e96c2b5bc 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasePrincipalAssignmentsImpl.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasePrincipalAssignmentsImpl.java @@ -16,10 +16,9 @@ import com.azure.resourcemanager.kusto.models.DatabasePrincipalAssignment; import com.azure.resourcemanager.kusto.models.DatabasePrincipalAssignmentCheckNameRequest; import com.azure.resourcemanager.kusto.models.DatabasePrincipalAssignments; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class DatabasePrincipalAssignmentsImpl implements DatabasePrincipalAssignments { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DatabasePrincipalAssignmentsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(DatabasePrincipalAssignmentsImpl.class); private final DatabasePrincipalAssignmentsClient innerClient; @@ -132,7 +131,7 @@ public PagedIterable list( public DatabasePrincipalAssignment getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -140,21 +139,21 @@ public DatabasePrincipalAssignment getById(String id) { } String clusterName = Utils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } String databaseName = Utils.getValueFromIdByName(id, "databases"); if (databaseName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'databases'.", id))); } String principalAssignmentName = Utils.getValueFromIdByName(id, "principalAssignments"); if (principalAssignmentName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -170,7 +169,7 @@ public DatabasePrincipalAssignment getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -178,21 +177,21 @@ public Response getByIdWithResponse(String id, Cont } String clusterName = Utils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } String databaseName = Utils.getValueFromIdByName(id, "databases"); if (databaseName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'databases'.", id))); } String principalAssignmentName = Utils.getValueFromIdByName(id, "principalAssignments"); if (principalAssignmentName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -206,7 +205,7 @@ public Response getByIdWithResponse(String id, Cont public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -214,21 +213,21 @@ public void deleteById(String id) { } String clusterName = Utils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } String databaseName = Utils.getValueFromIdByName(id, "databases"); if (databaseName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'databases'.", id))); } String principalAssignmentName = Utils.getValueFromIdByName(id, "principalAssignments"); if (principalAssignmentName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -242,7 +241,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -250,21 +249,21 @@ public void deleteByIdWithResponse(String id, Context context) { } String clusterName = Utils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } String databaseName = Utils.getValueFromIdByName(id, "databases"); if (databaseName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'databases'.", id))); } String principalAssignmentName = Utils.getValueFromIdByName(id, "principalAssignments"); if (principalAssignmentName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasesClientImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasesClientImpl.java index 4e750b8f6adc..6081012a0997 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasesClientImpl.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasesClientImpl.java @@ -31,7 +31,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.kusto.fluent.DatabasesClient; @@ -39,6 +38,7 @@ import com.azure.resourcemanager.kusto.fluent.models.DatabaseInner; import com.azure.resourcemanager.kusto.fluent.models.DatabasePrincipalInner; import com.azure.resourcemanager.kusto.fluent.models.DatabasePrincipalListResultInner; +import com.azure.resourcemanager.kusto.models.CallerRole; import com.azure.resourcemanager.kusto.models.CheckNameRequest; import com.azure.resourcemanager.kusto.models.DatabaseListResult; import com.azure.resourcemanager.kusto.models.DatabasePrincipalListRequest; @@ -48,8 +48,6 @@ /** An instance of this class provides access to all the operations defined in DatabasesClient. */ public final class DatabasesClientImpl implements DatabasesClient { - private final ClientLogger logger = new ClientLogger(DatabasesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final DatabasesService service; @@ -134,6 +132,7 @@ Mono>> createOrUpdate( @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @QueryParam("callerRole") CallerRole callerRole, @BodyParam("application/json") DatabaseInner parameters, @HeaderParam("Accept") String accept, Context context); @@ -151,6 +150,7 @@ Mono>> update( @PathParam("databaseName") String databaseName, @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @QueryParam("callerRole") CallerRole callerRole, @BodyParam("application/json") DatabaseInner parameters, @HeaderParam("Accept") String accept, Context context); @@ -347,14 +347,7 @@ private Mono> checkNameAvailabilityWithResponseAs private Mono checkNameAvailabilityAsync( String resourceGroupName, String clusterName, CheckNameRequest resourceName) { return checkNameAvailabilityWithResponseAsync(resourceGroupName, clusterName, resourceName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -676,14 +669,7 @@ private Mono> getWithResponseAsync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String resourceGroupName, String clusterName, String databaseName) { return getWithResponseAsync(resourceGroupName, clusterName, databaseName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -727,6 +713,8 @@ public Response getWithResponse( * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @param callerRole By default, any user who run operation on a database become an Admin on it. This property + * allows the caller to exclude the caller from Admins list. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -734,7 +722,11 @@ public Response getWithResponse( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters) { + String resourceGroupName, + String clusterName, + String databaseName, + DatabaseInner parameters, + CallerRole callerRole) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -774,6 +766,7 @@ private Mono>> createOrUpdateWithResponseAsync( databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), + callerRole, parameters, accept, context)) @@ -787,6 +780,8 @@ private Mono>> createOrUpdateWithResponseAsync( * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @param callerRole By default, any user who run operation on a database become an Admin on it. This property + * allows the caller to exclude the caller from Admins list. * @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. @@ -795,7 +790,12 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters, Context context) { + String resourceGroupName, + String clusterName, + String databaseName, + DatabaseInner parameters, + CallerRole callerRole, + Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -833,6 +833,7 @@ private Mono>> createOrUpdateWithResponseAsync( databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), + callerRole, parameters, accept, context); @@ -845,6 +846,8 @@ private Mono>> createOrUpdateWithResponseAsync( * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @param callerRole By default, any user who run operation on a database become an Admin on it. This property + * allows the caller to exclude the caller from Admins list. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -852,9 +855,13 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DatabaseInner> beginCreateOrUpdateAsync( - String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters) { + String resourceGroupName, + String clusterName, + String databaseName, + DatabaseInner parameters, + CallerRole callerRole) { Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, clusterName, databaseName, parameters); + createOrUpdateWithResponseAsync(resourceGroupName, clusterName, databaseName, parameters, callerRole); return this .client .getLroResult( @@ -872,6 +879,8 @@ private PollerFlux, DatabaseInner> beginCreateOrUpdate * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @param callerRole By default, any user who run operation on a database become an Admin on it. This property + * allows the caller to exclude the caller from Admins list. * @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. @@ -880,10 +889,16 @@ private PollerFlux, DatabaseInner> beginCreateOrUpdate */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DatabaseInner> beginCreateOrUpdateAsync( - String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters, Context context) { + String resourceGroupName, + String clusterName, + String databaseName, + DatabaseInner parameters, + CallerRole callerRole, + Context context) { context = this.client.mergeContext(context); Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, clusterName, databaseName, parameters, context); + createOrUpdateWithResponseAsync( + resourceGroupName, clusterName, databaseName, parameters, callerRole, context); return this .client .getLroResult( @@ -897,6 +912,8 @@ private PollerFlux, DatabaseInner> beginCreateOrUpdate * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @param callerRole By default, any user who run operation on a database become an Admin on it. This property + * allows the caller to exclude the caller from Admins list. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -904,8 +921,13 @@ private PollerFlux, DatabaseInner> beginCreateOrUpdate */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DatabaseInner> beginCreateOrUpdate( - String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, clusterName, databaseName, parameters).getSyncPoller(); + String resourceGroupName, + String clusterName, + String databaseName, + DatabaseInner parameters, + CallerRole callerRole) { + return beginCreateOrUpdateAsync(resourceGroupName, clusterName, databaseName, parameters, callerRole) + .getSyncPoller(); } /** @@ -915,6 +937,8 @@ public SyncPoller, DatabaseInner> beginCreateOrUpdate( * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @param callerRole By default, any user who run operation on a database become an Admin on it. This property + * allows the caller to exclude the caller from Admins list. * @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. @@ -923,11 +947,42 @@ public SyncPoller, DatabaseInner> beginCreateOrUpdate( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DatabaseInner> beginCreateOrUpdate( - String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, clusterName, databaseName, parameters, context) + String resourceGroupName, + String clusterName, + String databaseName, + DatabaseInner parameters, + CallerRole callerRole, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, clusterName, databaseName, parameters, callerRole, context) .getSyncPoller(); } + /** + * Creates or updates a database. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @param callerRole By default, any user who run operation on a database become an Admin on it. This property + * allows the caller to exclude the caller from Admins list. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto database on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String clusterName, + String databaseName, + DatabaseInner parameters, + CallerRole callerRole) { + return beginCreateOrUpdateAsync(resourceGroupName, clusterName, databaseName, parameters, callerRole) + .last() + .flatMap(this.client::getLroFinalResultOrError); + } + /** * Creates or updates a database. * @@ -943,7 +998,8 @@ public SyncPoller, DatabaseInner> beginCreateOrUpdate( @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters) { - return beginCreateOrUpdateAsync(resourceGroupName, clusterName, databaseName, parameters) + final CallerRole callerRole = null; + return beginCreateOrUpdateAsync(resourceGroupName, clusterName, databaseName, parameters, callerRole) .last() .flatMap(this.client::getLroFinalResultOrError); } @@ -955,6 +1011,8 @@ private Mono createOrUpdateAsync( * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @param callerRole By default, any user who run operation on a database become an Admin on it. This property + * allows the caller to exclude the caller from Admins list. * @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. @@ -963,12 +1021,41 @@ private Mono createOrUpdateAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( - String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, clusterName, databaseName, parameters, context) + String resourceGroupName, + String clusterName, + String databaseName, + DatabaseInner parameters, + CallerRole callerRole, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, clusterName, databaseName, parameters, callerRole, context) .last() .flatMap(this.client::getLroFinalResultOrError); } + /** + * Creates or updates a database. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @param callerRole By default, any user who run operation on a database become an Admin on it. This property + * allows the caller to exclude the caller from Admins list. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto database. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DatabaseInner createOrUpdate( + String resourceGroupName, + String clusterName, + String databaseName, + DatabaseInner parameters, + CallerRole callerRole) { + return createOrUpdateAsync(resourceGroupName, clusterName, databaseName, parameters, callerRole).block(); + } + /** * Creates or updates a database. * @@ -984,7 +1071,8 @@ private Mono createOrUpdateAsync( @ServiceMethod(returns = ReturnType.SINGLE) public DatabaseInner createOrUpdate( String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters) { - return createOrUpdateAsync(resourceGroupName, clusterName, databaseName, parameters).block(); + final CallerRole callerRole = null; + return createOrUpdateAsync(resourceGroupName, clusterName, databaseName, parameters, callerRole).block(); } /** @@ -994,6 +1082,8 @@ public DatabaseInner createOrUpdate( * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param parameters The database parameters supplied to the CreateOrUpdate operation. + * @param callerRole By default, any user who run operation on a database become an Admin on it. This property + * allows the caller to exclude the caller from Admins list. * @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. @@ -1002,8 +1092,14 @@ public DatabaseInner createOrUpdate( */ @ServiceMethod(returns = ReturnType.SINGLE) public DatabaseInner createOrUpdate( - String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters, Context context) { - return createOrUpdateAsync(resourceGroupName, clusterName, databaseName, parameters, context).block(); + String resourceGroupName, + String clusterName, + String databaseName, + DatabaseInner parameters, + CallerRole callerRole, + Context context) { + return createOrUpdateAsync(resourceGroupName, clusterName, databaseName, parameters, callerRole, context) + .block(); } /** @@ -1013,6 +1109,8 @@ public DatabaseInner createOrUpdate( * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param parameters The database parameters supplied to the Update operation. + * @param callerRole By default, any user who run operation on a database become an Admin on it. This property + * allows the caller to exclude the caller from Admins list. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1020,7 +1118,11 @@ public DatabaseInner createOrUpdate( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( - String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters) { + String resourceGroupName, + String clusterName, + String databaseName, + DatabaseInner parameters, + CallerRole callerRole) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1060,6 +1162,7 @@ private Mono>> updateWithResponseAsync( databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), + callerRole, parameters, accept, context)) @@ -1073,6 +1176,8 @@ private Mono>> updateWithResponseAsync( * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param parameters The database parameters supplied to the Update operation. + * @param callerRole By default, any user who run operation on a database become an Admin on it. This property + * allows the caller to exclude the caller from Admins list. * @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. @@ -1081,7 +1186,12 @@ private Mono>> updateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( - String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters, Context context) { + String resourceGroupName, + String clusterName, + String databaseName, + DatabaseInner parameters, + CallerRole callerRole, + Context context) { if (this.client.getEndpoint() == null) { return Mono .error( @@ -1119,6 +1229,7 @@ private Mono>> updateWithResponseAsync( databaseName, this.client.getSubscriptionId(), this.client.getApiVersion(), + callerRole, parameters, accept, context); @@ -1131,6 +1242,8 @@ private Mono>> updateWithResponseAsync( * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param parameters The database parameters supplied to the Update operation. + * @param callerRole By default, any user who run operation on a database become an Admin on it. This property + * allows the caller to exclude the caller from Admins list. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1138,9 +1251,13 @@ private Mono>> updateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DatabaseInner> beginUpdateAsync( - String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters) { + String resourceGroupName, + String clusterName, + String databaseName, + DatabaseInner parameters, + CallerRole callerRole) { Mono>> mono = - updateWithResponseAsync(resourceGroupName, clusterName, databaseName, parameters); + updateWithResponseAsync(resourceGroupName, clusterName, databaseName, parameters, callerRole); return this .client .getLroResult( @@ -1158,6 +1275,8 @@ private PollerFlux, DatabaseInner> beginUpdateAsync( * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param parameters The database parameters supplied to the Update operation. + * @param callerRole By default, any user who run operation on a database become an Admin on it. This property + * allows the caller to exclude the caller from Admins list. * @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. @@ -1166,10 +1285,15 @@ private PollerFlux, DatabaseInner> beginUpdateAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, DatabaseInner> beginUpdateAsync( - String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters, Context context) { + String resourceGroupName, + String clusterName, + String databaseName, + DatabaseInner parameters, + CallerRole callerRole, + Context context) { context = this.client.mergeContext(context); Mono>> mono = - updateWithResponseAsync(resourceGroupName, clusterName, databaseName, parameters, context); + updateWithResponseAsync(resourceGroupName, clusterName, databaseName, parameters, callerRole, context); return this .client .getLroResult( @@ -1183,6 +1307,8 @@ private PollerFlux, DatabaseInner> beginUpdateAsync( * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param parameters The database parameters supplied to the Update operation. + * @param callerRole By default, any user who run operation on a database become an Admin on it. This property + * allows the caller to exclude the caller from Admins list. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1190,8 +1316,12 @@ private PollerFlux, DatabaseInner> beginUpdateAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DatabaseInner> beginUpdate( - String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters) { - return beginUpdateAsync(resourceGroupName, clusterName, databaseName, parameters).getSyncPoller(); + String resourceGroupName, + String clusterName, + String databaseName, + DatabaseInner parameters, + CallerRole callerRole) { + return beginUpdateAsync(resourceGroupName, clusterName, databaseName, parameters, callerRole).getSyncPoller(); } /** @@ -1201,6 +1331,8 @@ public SyncPoller, DatabaseInner> beginUpdate( * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param parameters The database parameters supplied to the Update operation. + * @param callerRole By default, any user who run operation on a database become an Admin on it. This property + * allows the caller to exclude the caller from Admins list. * @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. @@ -1209,8 +1341,40 @@ public SyncPoller, DatabaseInner> beginUpdate( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, DatabaseInner> beginUpdate( - String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters, Context context) { - return beginUpdateAsync(resourceGroupName, clusterName, databaseName, parameters, context).getSyncPoller(); + String resourceGroupName, + String clusterName, + String databaseName, + DatabaseInner parameters, + CallerRole callerRole, + Context context) { + return beginUpdateAsync(resourceGroupName, clusterName, databaseName, parameters, callerRole, context) + .getSyncPoller(); + } + + /** + * Updates a database. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param parameters The database parameters supplied to the Update operation. + * @param callerRole By default, any user who run operation on a database become an Admin on it. This property + * allows the caller to exclude the caller from Admins list. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto database on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync( + String resourceGroupName, + String clusterName, + String databaseName, + DatabaseInner parameters, + CallerRole callerRole) { + return beginUpdateAsync(resourceGroupName, clusterName, databaseName, parameters, callerRole) + .last() + .flatMap(this.client::getLroFinalResultOrError); } /** @@ -1228,7 +1392,8 @@ public SyncPoller, DatabaseInner> beginUpdate( @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters) { - return beginUpdateAsync(resourceGroupName, clusterName, databaseName, parameters) + final CallerRole callerRole = null; + return beginUpdateAsync(resourceGroupName, clusterName, databaseName, parameters, callerRole) .last() .flatMap(this.client::getLroFinalResultOrError); } @@ -1240,6 +1405,8 @@ private Mono updateAsync( * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param parameters The database parameters supplied to the Update operation. + * @param callerRole By default, any user who run operation on a database become an Admin on it. This property + * allows the caller to exclude the caller from Admins list. * @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. @@ -1248,12 +1415,41 @@ private Mono updateAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync( - String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters, Context context) { - return beginUpdateAsync(resourceGroupName, clusterName, databaseName, parameters, context) + String resourceGroupName, + String clusterName, + String databaseName, + DatabaseInner parameters, + CallerRole callerRole, + Context context) { + return beginUpdateAsync(resourceGroupName, clusterName, databaseName, parameters, callerRole, context) .last() .flatMap(this.client::getLroFinalResultOrError); } + /** + * Updates a database. + * + * @param resourceGroupName The name of the resource group containing the Kusto cluster. + * @param clusterName The name of the Kusto cluster. + * @param databaseName The name of the database in the Kusto cluster. + * @param parameters The database parameters supplied to the Update operation. + * @param callerRole By default, any user who run operation on a database become an Admin on it. This property + * allows the caller to exclude the caller from Admins list. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return class representing a Kusto database. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DatabaseInner update( + String resourceGroupName, + String clusterName, + String databaseName, + DatabaseInner parameters, + CallerRole callerRole) { + return updateAsync(resourceGroupName, clusterName, databaseName, parameters, callerRole).block(); + } + /** * Updates a database. * @@ -1269,7 +1465,8 @@ private Mono updateAsync( @ServiceMethod(returns = ReturnType.SINGLE) public DatabaseInner update( String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters) { - return updateAsync(resourceGroupName, clusterName, databaseName, parameters).block(); + final CallerRole callerRole = null; + return updateAsync(resourceGroupName, clusterName, databaseName, parameters, callerRole).block(); } /** @@ -1279,6 +1476,8 @@ public DatabaseInner update( * @param clusterName The name of the Kusto cluster. * @param databaseName The name of the database in the Kusto cluster. * @param parameters The database parameters supplied to the Update operation. + * @param callerRole By default, any user who run operation on a database become an Admin on it. This property + * allows the caller to exclude the caller from Admins list. * @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. @@ -1287,8 +1486,13 @@ public DatabaseInner update( */ @ServiceMethod(returns = ReturnType.SINGLE) public DatabaseInner update( - String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters, Context context) { - return updateAsync(resourceGroupName, clusterName, databaseName, parameters, context).block(); + String resourceGroupName, + String clusterName, + String databaseName, + DatabaseInner parameters, + CallerRole callerRole, + Context context) { + return updateAsync(resourceGroupName, clusterName, databaseName, parameters, callerRole, context).block(); } /** @@ -1877,14 +2081,7 @@ private Mono addPrincipalsAsync( String databaseName, DatabasePrincipalListRequest databasePrincipalsToAdd) { return addPrincipalsWithResponseAsync(resourceGroupName, clusterName, databaseName, databasePrincipalsToAdd) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -2086,14 +2283,7 @@ private Mono removePrincipalsAsync( DatabasePrincipalListRequest databasePrincipalsToRemove) { return removePrincipalsWithResponseAsync( resourceGroupName, clusterName, databaseName, databasePrincipalsToRemove) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasesImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasesImpl.java index 5cf62ad97ab6..87213f20808d 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasesImpl.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/DatabasesImpl.java @@ -14,6 +14,7 @@ import com.azure.resourcemanager.kusto.fluent.models.DatabaseInner; import com.azure.resourcemanager.kusto.fluent.models.DatabasePrincipalInner; import com.azure.resourcemanager.kusto.fluent.models.DatabasePrincipalListResultInner; +import com.azure.resourcemanager.kusto.models.CallerRole; import com.azure.resourcemanager.kusto.models.CheckNameRequest; import com.azure.resourcemanager.kusto.models.CheckNameResult; import com.azure.resourcemanager.kusto.models.Database; @@ -21,10 +22,9 @@ import com.azure.resourcemanager.kusto.models.DatabasePrincipalListRequest; import com.azure.resourcemanager.kusto.models.DatabasePrincipalListResult; import com.azure.resourcemanager.kusto.models.Databases; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class DatabasesImpl implements Databases { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DatabasesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(DatabasesImpl.class); private final DatabasesClient innerClient; @@ -98,6 +98,21 @@ public Response getWithResponse( } } + public Database createOrUpdate( + String resourceGroupName, + String clusterName, + String databaseName, + DatabaseInner parameters, + CallerRole callerRole) { + DatabaseInner inner = + this.serviceClient().createOrUpdate(resourceGroupName, clusterName, databaseName, parameters, callerRole); + if (inner != null) { + return new DatabaseImpl(inner, this.manager()); + } else { + return null; + } + } + public Database createOrUpdate( String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters) { DatabaseInner inner = @@ -110,9 +125,31 @@ public Database createOrUpdate( } public Database createOrUpdate( - String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters, Context context) { + String resourceGroupName, + String clusterName, + String databaseName, + DatabaseInner parameters, + CallerRole callerRole, + Context context) { + DatabaseInner inner = + this + .serviceClient() + .createOrUpdate(resourceGroupName, clusterName, databaseName, parameters, callerRole, context); + if (inner != null) { + return new DatabaseImpl(inner, this.manager()); + } else { + return null; + } + } + + public Database update( + String resourceGroupName, + String clusterName, + String databaseName, + DatabaseInner parameters, + CallerRole callerRole) { DatabaseInner inner = - this.serviceClient().createOrUpdate(resourceGroupName, clusterName, databaseName, parameters, context); + this.serviceClient().update(resourceGroupName, clusterName, databaseName, parameters, callerRole); if (inner != null) { return new DatabaseImpl(inner, this.manager()); } else { @@ -131,9 +168,14 @@ public Database update( } public Database update( - String resourceGroupName, String clusterName, String databaseName, DatabaseInner parameters, Context context) { + String resourceGroupName, + String clusterName, + String databaseName, + DatabaseInner parameters, + CallerRole callerRole, + Context context) { DatabaseInner inner = - this.serviceClient().update(resourceGroupName, clusterName, databaseName, parameters, context); + this.serviceClient().update(resourceGroupName, clusterName, databaseName, parameters, callerRole, context); if (inner != null) { return new DatabaseImpl(inner, this.manager()); } else { diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/FollowerDatabaseDefinitionImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/FollowerDatabaseDefinitionImpl.java index 55a00656dfdc..997cb91c86dd 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/FollowerDatabaseDefinitionImpl.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/FollowerDatabaseDefinitionImpl.java @@ -5,7 +5,9 @@ package com.azure.resourcemanager.kusto.implementation; import com.azure.resourcemanager.kusto.fluent.models.FollowerDatabaseDefinitionInner; +import com.azure.resourcemanager.kusto.models.DatabaseShareOrigin; import com.azure.resourcemanager.kusto.models.FollowerDatabaseDefinition; +import com.azure.resourcemanager.kusto.models.TableLevelSharingProperties; public final class FollowerDatabaseDefinitionImpl implements FollowerDatabaseDefinition { private FollowerDatabaseDefinitionInner innerObject; @@ -30,6 +32,14 @@ public String databaseName() { return this.innerModel().databaseName(); } + public TableLevelSharingProperties tableLevelSharingProperties() { + return this.innerModel().tableLevelSharingProperties(); + } + + public DatabaseShareOrigin databaseShareOrigin() { + return this.innerModel().databaseShareOrigin(); + } + public FollowerDatabaseDefinitionInner innerModel() { return this.innerObject; } diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/KustoManagementClientBuilder.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/KustoManagementClientBuilder.java index 4f125f56bacb..55ac5ad00735 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/KustoManagementClientBuilder.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/KustoManagementClientBuilder.java @@ -7,7 +7,6 @@ import com.azure.core.annotation.ServiceClientBuilder; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; -import com.azure.core.http.policy.CookiePolicy; import com.azure.core.http.policy.RetryPolicy; import com.azure.core.http.policy.UserAgentPolicy; import com.azure.core.management.AzureEnvironment; @@ -19,9 +18,8 @@ @ServiceClientBuilder(serviceClients = {KustoManagementClientImpl.class}) public final class KustoManagementClientBuilder { /* - * Gets subscription credentials which uniquely identify Microsoft Azure - * subscription. The subscription ID forms part of the URI for every - * service call. + * Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms + * part of the URI for every service call. */ private String subscriptionId; @@ -70,34 +68,34 @@ public KustoManagementClientBuilder environment(AzureEnvironment environment) { } /* - * The default poll interval for long-running operation + * The HTTP pipeline to send requests through */ - private Duration defaultPollInterval; + private HttpPipeline pipeline; /** - * Sets The default poll interval for long-running operation. + * Sets The HTTP pipeline to send requests through. * - * @param defaultPollInterval the defaultPollInterval value. + * @param pipeline the pipeline value. * @return the KustoManagementClientBuilder. */ - public KustoManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = defaultPollInterval; + public KustoManagementClientBuilder pipeline(HttpPipeline pipeline) { + this.pipeline = pipeline; return this; } /* - * The HTTP pipeline to send requests through + * The default poll interval for long-running operation */ - private HttpPipeline pipeline; + private Duration defaultPollInterval; /** - * Sets The HTTP pipeline to send requests through. + * Sets The default poll interval for long-running operation. * - * @param pipeline the pipeline value. + * @param defaultPollInterval the defaultPollInterval value. * @return the KustoManagementClientBuilder. */ - public KustoManagementClientBuilder pipeline(HttpPipeline pipeline) { - this.pipeline = pipeline; + public KustoManagementClientBuilder defaultPollInterval(Duration defaultPollInterval) { + this.defaultPollInterval = defaultPollInterval; return this; } @@ -123,27 +121,26 @@ public KustoManagementClientBuilder serializerAdapter(SerializerAdapter serializ * @return an instance of KustoManagementClientImpl. */ public KustoManagementClientImpl buildClient() { - if (endpoint == null) { - this.endpoint = "https://management.azure.com"; - } - if (environment == null) { - this.environment = AzureEnvironment.AZURE; - } - if (defaultPollInterval == null) { - this.defaultPollInterval = Duration.ofSeconds(30); - } - if (pipeline == null) { - this.pipeline = - new HttpPipelineBuilder() - .policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()) - .build(); - } - if (serializerAdapter == null) { - this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); - } + 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(); KustoManagementClientImpl client = new KustoManagementClientImpl( - pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint); + localPipeline, + localSerializerAdapter, + localDefaultPollInterval, + localEnvironment, + subscriptionId, + localEndpoint); return client; } } diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/KustoManagementClientImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/KustoManagementClientImpl.java index 7765f6e1434b..93f3aba5b5cd 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/KustoManagementClientImpl.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/KustoManagementClientImpl.java @@ -15,6 +15,7 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.management.polling.PollerFactory; import com.azure.core.util.Context; +import com.azure.core.util.CoreUtils; import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.AsyncPollResponse; import com.azure.core.util.polling.LongRunningOperationStatus; @@ -41,15 +42,12 @@ import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.time.Duration; -import java.util.Map; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; /** Initializes a new instance of the KustoManagementClientImpl type. */ @ServiceClient(builder = KustoManagementClientBuilder.class) public final class KustoManagementClientImpl implements KustoManagementClient { - private final ClientLogger logger = new ClientLogger(KustoManagementClientImpl.class); - /** * Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms * part of the URI for every service call. @@ -305,7 +303,7 @@ public OperationsResultsLocationsClient getOperationsResultsLocations() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2022-02-01"; + this.apiVersion = "2022-07-07"; this.clusters = new ClustersClientImpl(this); this.clusterPrincipalAssignments = new ClusterPrincipalAssignmentsClientImpl(this); this.databases = new DatabasesClientImpl(this); @@ -337,10 +335,7 @@ public Context getContext() { * @return the merged context. */ public Context mergeContext(Context context) { - for (Map.Entry entry : this.getContext().getValues().entrySet()) { - context = context.addData(entry.getKey(), entry.getValue()); - } - return context; + return CoreUtils.mergeContexts(this.getContext(), context); } /** @@ -404,7 +399,7 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, managementError = null; } } catch (IOException | RuntimeException ioe) { - logger.logThrowableAsWarning(ioe); + LOGGER.logThrowableAsWarning(ioe); } } } else { @@ -463,4 +458,6 @@ public Mono getBodyAsString(Charset charset) { return Mono.just(new String(responseBody, charset)); } } + + private static final ClientLogger LOGGER = new ClientLogger(KustoManagementClientImpl.class); } diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ManagedPrivateEndpointImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ManagedPrivateEndpointImpl.java index cc039aaf4b12..78802f2d50c3 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ManagedPrivateEndpointImpl.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ManagedPrivateEndpointImpl.java @@ -52,6 +52,10 @@ public ProvisioningState provisioningState() { return this.innerModel().provisioningState(); } + public String resourceGroupName() { + return resourceGroupName; + } + public ManagedPrivateEndpointInner innerModel() { return this.innerObject; } diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ManagedPrivateEndpointsClientImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ManagedPrivateEndpointsClientImpl.java index 5dfa213be01d..01c288096237 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ManagedPrivateEndpointsClientImpl.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ManagedPrivateEndpointsClientImpl.java @@ -31,7 +31,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.kusto.fluent.ManagedPrivateEndpointsClient; @@ -45,8 +44,6 @@ /** An instance of this class provides access to all the operations defined in ManagedPrivateEndpointsClient. */ public final class ManagedPrivateEndpointsClientImpl implements ManagedPrivateEndpointsClient { - private final ClientLogger logger = new ClientLogger(ManagedPrivateEndpointsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ManagedPrivateEndpointsService service; @@ -298,14 +295,7 @@ private Mono> checkNameAvailabilityWithResponseAs private Mono checkNameAvailabilityAsync( String resourceGroupName, String clusterName, ManagedPrivateEndpointsCheckNameRequest resourceName) { return checkNameAvailabilityWithResponseAsync(resourceGroupName, clusterName, resourceName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -639,14 +629,7 @@ private Mono> getWithResponseAsync( private Mono getAsync( String resourceGroupName, String clusterName, String managedPrivateEndpointName) { return getWithResponseAsync(resourceGroupName, clusterName, managedPrivateEndpointName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ManagedPrivateEndpointsImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ManagedPrivateEndpointsImpl.java index e82dfd237b7d..2d7c4cb751a3 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ManagedPrivateEndpointsImpl.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ManagedPrivateEndpointsImpl.java @@ -16,10 +16,9 @@ import com.azure.resourcemanager.kusto.models.ManagedPrivateEndpoint; import com.azure.resourcemanager.kusto.models.ManagedPrivateEndpoints; import com.azure.resourcemanager.kusto.models.ManagedPrivateEndpointsCheckNameRequest; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ManagedPrivateEndpointsImpl implements ManagedPrivateEndpoints { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedPrivateEndpointsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ManagedPrivateEndpointsImpl.class); private final ManagedPrivateEndpointsClient innerClient; @@ -110,7 +109,7 @@ public void delete( public ManagedPrivateEndpoint getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -118,14 +117,14 @@ public ManagedPrivateEndpoint getById(String id) { } String clusterName = Utils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } String managedPrivateEndpointName = Utils.getValueFromIdByName(id, "managedPrivateEndpoints"); if (managedPrivateEndpointName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -141,7 +140,7 @@ public ManagedPrivateEndpoint getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -149,14 +148,14 @@ public Response getByIdWithResponse(String id, Context c } String clusterName = Utils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } String managedPrivateEndpointName = Utils.getValueFromIdByName(id, "managedPrivateEndpoints"); if (managedPrivateEndpointName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -170,7 +169,7 @@ public Response getByIdWithResponse(String id, Context c public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -178,14 +177,14 @@ public void deleteById(String id) { } String clusterName = Utils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } String managedPrivateEndpointName = Utils.getValueFromIdByName(id, "managedPrivateEndpoints"); if (managedPrivateEndpointName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -199,7 +198,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -207,14 +206,14 @@ public void deleteByIdWithResponse(String id, Context context) { } String clusterName = Utils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } String managedPrivateEndpointName = Utils.getValueFromIdByName(id, "managedPrivateEndpoints"); if (managedPrivateEndpointName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationsClientImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationsClientImpl.java index f8b07cdddf7b..98f9505e3ccd 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationsClientImpl.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationsClientImpl.java @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.kusto.fluent.OperationsClient; import com.azure.resourcemanager.kusto.fluent.models.OperationInner; import com.azure.resourcemanager.kusto.models.OperationListResult; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in OperationsClient. */ public final class OperationsClientImpl implements OperationsClient { - private final ClientLogger logger = new ClientLogger(OperationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final OperationsService service; @@ -201,7 +198,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. @@ -237,7 +235,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/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationsImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationsImpl.java index eeb99e1a3c5b..2f2afbf0ec2a 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationsImpl.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationsImpl.java @@ -11,10 +11,9 @@ import com.azure.resourcemanager.kusto.fluent.models.OperationInner; import com.azure.resourcemanager.kusto.models.Operation; import com.azure.resourcemanager.kusto.models.Operations; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class OperationsImpl implements Operations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(OperationsImpl.class); private final OperationsClient innerClient; diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationsResultsClientImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationsResultsClientImpl.java index 3303d5a3a998..9c40db7c410f 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationsResultsClientImpl.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationsResultsClientImpl.java @@ -21,15 +21,12 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.kusto.fluent.OperationsResultsClient; import com.azure.resourcemanager.kusto.fluent.models.OperationResultInner; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in OperationsResultsClient. */ public final class OperationsResultsClientImpl implements OperationsResultsClient { - private final ClientLogger logger = new ClientLogger(OperationsResultsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final OperationsResultsService service; @@ -173,15 +170,7 @@ private Mono> getWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String location, String operationId) { - return getWithResponseAsync(location, operationId) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + return getWithResponseAsync(location, operationId).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationsResultsImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationsResultsImpl.java index 537c06e36a31..b75902502cfd 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationsResultsImpl.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationsResultsImpl.java @@ -12,10 +12,9 @@ import com.azure.resourcemanager.kusto.fluent.models.OperationResultInner; import com.azure.resourcemanager.kusto.models.OperationResult; import com.azure.resourcemanager.kusto.models.OperationsResults; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class OperationsResultsImpl implements OperationsResults { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsResultsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(OperationsResultsImpl.class); private final OperationsResultsClient innerClient; diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationsResultsLocationsClientImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationsResultsLocationsClientImpl.java index 1217985b1a95..dbe2b061c7e2 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationsResultsLocationsClientImpl.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationsResultsLocationsClientImpl.java @@ -20,14 +20,11 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.kusto.fluent.OperationsResultsLocationsClient; import reactor.core.publisher.Mono; /** An instance of this class provides access to all the operations defined in OperationsResultsLocationsClient. */ public final class OperationsResultsLocationsClientImpl implements OperationsResultsLocationsClient { - private final ClientLogger logger = new ClientLogger(OperationsResultsLocationsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final OperationsResultsLocationsService service; @@ -167,7 +164,7 @@ private Mono> getWithResponseAsync(String location, String operat */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getAsync(String location, String operationId) { - return getWithResponseAsync(location, operationId).flatMap((Response res) -> Mono.empty()); + return getWithResponseAsync(location, operationId).flatMap(ignored -> Mono.empty()); } /** diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationsResultsLocationsImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationsResultsLocationsImpl.java index 09cff38f4734..cdcddeebcc03 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationsResultsLocationsImpl.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/OperationsResultsLocationsImpl.java @@ -9,10 +9,9 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.kusto.fluent.OperationsResultsLocationsClient; import com.azure.resourcemanager.kusto.models.OperationsResultsLocations; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class OperationsResultsLocationsImpl implements OperationsResultsLocations { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationsResultsLocationsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(OperationsResultsLocationsImpl.class); private final OperationsResultsLocationsClient innerClient; diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/PrivateEndpointConnectionImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/PrivateEndpointConnectionImpl.java index 09cd40430637..e2cb41b999f7 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/PrivateEndpointConnectionImpl.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/PrivateEndpointConnectionImpl.java @@ -49,6 +49,10 @@ public String provisioningState() { return this.innerModel().provisioningState(); } + public String resourceGroupName() { + return resourceGroupName; + } + public PrivateEndpointConnectionInner innerModel() { return this.innerObject; } diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/PrivateEndpointConnectionsClientImpl.java index d67b6c71f4c8..6b6852c2b507 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/PrivateEndpointConnectionsClientImpl.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/PrivateEndpointConnectionsClientImpl.java @@ -29,7 +29,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.kusto.fluent.PrivateEndpointConnectionsClient; @@ -41,8 +40,6 @@ /** An instance of this class provides access to all the operations defined in PrivateEndpointConnectionsClient. */ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpointConnectionsClient { - private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final PrivateEndpointConnectionsService service; @@ -427,14 +424,7 @@ private Mono> getWithResponseAsync( private Mono getAsync( String resourceGroupName, String clusterName, String privateEndpointConnectionName) { return getWithResponseAsync(resourceGroupName, clusterName, privateEndpointConnectionName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/PrivateEndpointConnectionsImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/PrivateEndpointConnectionsImpl.java index 55b7085c8276..b24cb3b3c178 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/PrivateEndpointConnectionsImpl.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/PrivateEndpointConnectionsImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.kusto.fluent.models.PrivateEndpointConnectionInner; import com.azure.resourcemanager.kusto.models.PrivateEndpointConnection; import com.azure.resourcemanager.kusto.models.PrivateEndpointConnections; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class PrivateEndpointConnectionsImpl implements PrivateEndpointConnections { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(PrivateEndpointConnectionsImpl.class); private final PrivateEndpointConnectionsClient innerClient; @@ -80,7 +79,7 @@ public void delete( public PrivateEndpointConnection getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -88,14 +87,14 @@ public PrivateEndpointConnection getById(String id) { } String clusterName = Utils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); if (privateEndpointConnectionName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -111,7 +110,7 @@ public PrivateEndpointConnection getById(String id) { public Response getByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -119,14 +118,14 @@ public Response getByIdWithResponse(String id, Contex } String clusterName = Utils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); if (privateEndpointConnectionName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -140,7 +139,7 @@ public Response getByIdWithResponse(String id, Contex public void deleteById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -148,14 +147,14 @@ public void deleteById(String id) { } String clusterName = Utils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); if (privateEndpointConnectionName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -169,7 +168,7 @@ public void deleteById(String id) { public void deleteByIdWithResponse(String id, Context context) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -177,14 +176,14 @@ public void deleteByIdWithResponse(String id, Context context) { } String clusterName = Utils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } String privateEndpointConnectionName = Utils.getValueFromIdByName(id, "privateEndpointConnections"); if (privateEndpointConnectionName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/PrivateLinkResourcesClientImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/PrivateLinkResourcesClientImpl.java index f55c22e4e288..8a9c23de9eff 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/PrivateLinkResourcesClientImpl.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/PrivateLinkResourcesClientImpl.java @@ -25,7 +25,6 @@ import com.azure.core.management.exception.ManagementException; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.kusto.fluent.PrivateLinkResourcesClient; import com.azure.resourcemanager.kusto.fluent.models.PrivateLinkResourceInner; import com.azure.resourcemanager.kusto.models.PrivateLinkResourceListResult; @@ -33,8 +32,6 @@ /** An instance of this class provides access to all the operations defined in PrivateLinkResourcesClient. */ public final class PrivateLinkResourcesClientImpl implements PrivateLinkResourcesClient { - private final ClientLogger logger = new ClientLogger(PrivateLinkResourcesClientImpl.class); - /** The proxy service used to perform REST calls. */ private final PrivateLinkResourcesService service; @@ -382,14 +379,7 @@ private Mono> getWithResponseAsync( private Mono getAsync( String resourceGroupName, String clusterName, String privateLinkResourceName) { return getWithResponseAsync(resourceGroupName, clusterName, privateLinkResourceName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/PrivateLinkResourcesImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/PrivateLinkResourcesImpl.java index fbbc8a8fbf1f..ebef4461894f 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/PrivateLinkResourcesImpl.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/PrivateLinkResourcesImpl.java @@ -13,10 +13,9 @@ import com.azure.resourcemanager.kusto.fluent.models.PrivateLinkResourceInner; import com.azure.resourcemanager.kusto.models.PrivateLinkResource; import com.azure.resourcemanager.kusto.models.PrivateLinkResources; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class PrivateLinkResourcesImpl implements PrivateLinkResources { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkResourcesImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(PrivateLinkResourcesImpl.class); private final PrivateLinkResourcesClient innerClient; diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ScriptImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ScriptImpl.java index 4612f114362d..fb44adec06f7 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ScriptImpl.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ScriptImpl.java @@ -55,6 +55,10 @@ public ProvisioningState provisioningState() { return this.innerModel().provisioningState(); } + public String resourceGroupName() { + return resourceGroupName; + } + public ScriptInner innerModel() { return this.innerObject; } diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ScriptsClientImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ScriptsClientImpl.java index 100a7b08709d..b7cec783e0b2 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ScriptsClientImpl.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ScriptsClientImpl.java @@ -31,7 +31,6 @@ import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.FluxUtil; -import com.azure.core.util.logging.ClientLogger; import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.kusto.fluent.ScriptsClient; @@ -45,8 +44,6 @@ /** An instance of this class provides access to all the operations defined in ScriptsClient. */ public final class ScriptsClientImpl implements ScriptsClient { - private final ClientLogger logger = new ClientLogger(ScriptsClientImpl.class); - /** The proxy service used to perform REST calls. */ private final ScriptsService service; @@ -489,14 +486,7 @@ private Mono> getWithResponseAsync( private Mono getAsync( String resourceGroupName, String clusterName, String databaseName, String scriptName) { return getWithResponseAsync(resourceGroupName, clusterName, databaseName, scriptName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** @@ -1605,14 +1595,7 @@ private Mono> checkNameAvailabilityWithResponseAs private Mono checkNameAvailabilityAsync( String resourceGroupName, String clusterName, String databaseName, ScriptCheckNameRequest scriptName) { return checkNameAvailabilityWithResponseAsync(resourceGroupName, clusterName, databaseName, scriptName) - .flatMap( - (Response res) -> { - if (res.getValue() != null) { - return Mono.just(res.getValue()); - } else { - return Mono.empty(); - } - }); + .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** diff --git a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ScriptsImpl.java b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ScriptsImpl.java index 57f0d4510d17..7232d9d02106 100644 --- a/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ScriptsImpl.java +++ b/sdk/kusto/azure-resourcemanager-kusto/src/main/java/com/azure/resourcemanager/kusto/implementation/ScriptsImpl.java @@ -16,10 +16,9 @@ import com.azure.resourcemanager.kusto.models.Script; import com.azure.resourcemanager.kusto.models.ScriptCheckNameRequest; import com.azure.resourcemanager.kusto.models.Scripts; -import com.fasterxml.jackson.annotation.JsonIgnore; public final class ScriptsImpl implements Scripts { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ScriptsImpl.class); + private static final ClientLogger LOGGER = new ClientLogger(ScriptsImpl.class); private final ScriptsClient innerClient; @@ -111,7 +110,7 @@ public Response checkNameAvailabilityWithResponse( public Script getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String @@ -119,21 +118,21 @@ public Script getById(String id) { } String clusterName = Utils.getValueFromIdByName(id, "clusters"); if (clusterName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id))); } String databaseName = Utils.getValueFromIdByName(id, "databases"); if (databaseName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'databases'.", id))); } String scriptName = Utils.getValueFromIdByName(id, "scripts"); if (scriptName == null) { - throw logger + throw LOGGER .logExceptionAsError( new IllegalArgumentException( String.format("The resource ID '%s' is not valid. Missing path segment 'scripts'.", id))); @@ -144,7 +143,7 @@ public Script getById(String id) { public Response