From 1c7eadb7c4ee2fcb080fac8da3fac6d4921d4a08 Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Mon, 26 Oct 2020 05:41:55 +0000 Subject: [PATCH] Generated from a925b597d7462c919a8ae6240e3d34633b275809 --- sdk/synapse/mgmt-v2019_06_01_preview/pom.xml | 6 +- .../BigDataPoolResourceInfo.java | 96 +++- .../DataMaskingFunction.java | 65 +++ .../DataMaskingPolicies.java | 31 ++ .../DataMaskingPolicy.java | 155 ++++++ .../v2019_06_01_preview/DataMaskingRule.java | 374 +++++++++++++ .../DataMaskingRuleState.java | 53 ++ .../v2019_06_01_preview/DataMaskingRules.java | 31 ++ .../v2019_06_01_preview/DataMaskingState.java | 53 ++ .../ExtendedSqlPoolBlobAuditingPolicies.java | 42 ++ .../ExtendedSqlPoolBlobAuditingPolicy.java | 483 ++++++++++++++++ .../v2019_06_01_preview/LibraryInfo.java | 149 +++++ .../ManagedVirtualNetworkSettings.java | 96 ++++ .../synapse/v2019_06_01_preview/NodeSize.java | 3 + .../SensitivityLabelSource.java | 53 ++ .../SensitivityLabels.java | 3 +- .../SqlPoolBlobAuditingPolicies.java | 11 + .../v2019_06_01_preview/SqlPoolColumns.java | 33 ++ .../v2019_06_01_preview/SqlPoolSchema.java | 4 +- .../v2019_06_01_preview/SqlPoolSchemas.java | 12 + .../SqlPoolSensitivityLabels.java | 17 +- .../v2019_06_01_preview/SqlPoolTable.java | 4 +- .../SqlPoolTableColumns.java | 2 +- .../v2019_06_01_preview/SqlPoolTables.java | 13 + ...olVulnerabilityAssessmentRuleBaseline.java | 3 +- ...lVulnerabilityAssessmentRuleBaselines.java | 14 + .../SqlPoolVulnerabilityAssessmentScans.java | 12 + ...leSchemaSqlPoolWorkspaceSqlPoolColumn.java | 40 ++ ...emaSqlPoolWorkspaceSqlPoolColumnModel.java | 42 ++ .../VulnerabilityAssessmentScanRecord.java | 4 +- .../v2019_06_01_preview/Workspace.java | 33 +- .../WorkspacePatchInfo.java | 26 + ...atchInfoManagedVirtualNetworkSettings.java | 96 ++++ .../BigDataPoolResourceInfoImpl.java | 35 ++ .../BigDataPoolResourceInfoInner.java | 86 ++- .../implementation/BigDataPoolsInner.java | 1 + .../DataMaskingPoliciesImpl.java | 59 ++ .../DataMaskingPoliciesInner.java | 263 +++++++++ .../implementation/DataMaskingPolicyImpl.java | 138 +++++ .../DataMaskingPolicyInner.java | 138 +++++ .../implementation/DataMaskingRuleImpl.java | 235 ++++++++ .../implementation/DataMaskingRuleInner.java | 367 ++++++++++++ .../implementation/DataMaskingRulesImpl.java | 62 +++ .../implementation/DataMaskingRulesInner.java | 277 ++++++++++ ...tendedSqlPoolBlobAuditingPoliciesImpl.java | 78 +++ ...endedSqlPoolBlobAuditingPoliciesInner.java | 520 ++++++++++++++++++ ...ExtendedSqlPoolBlobAuditingPolicyImpl.java | 208 +++++++ ...xtendedSqlPoolBlobAuditingPolicyInner.java | 503 +++++++++++++++++ .../IntegrationRuntimeInner.java | 2 - .../implementation/IpFirewallRulesInner.java | 1 + .../implementation/OperationsInner.java | 1 + .../implementation/PageImpl1.java | 75 +++ .../PrivateEndpointConnectionsInner.java | 1 + .../implementation/PrivateLinkHubsInner.java | 1 + .../implementation/SensitivityLabelsImpl.java | 2 +- .../SqlPoolBlobAuditingPoliciesImpl.java | 19 + .../SqlPoolBlobAuditingPoliciesInner.java | 256 +++++++++ .../implementation/SqlPoolColumnsImpl.java | 50 ++ .../implementation/SqlPoolColumnsInner.java | 174 ++++++ .../SqlPoolMetadataSyncConfigsInner.java | 1 + .../implementation/SqlPoolSchemaImpl.java | 21 +- .../implementation/SqlPoolSchemasImpl.java | 16 + .../implementation/SqlPoolSchemasInner.java | 105 ++++ .../SqlPoolSensitivityLabelsImpl.java | 17 + .../SqlPoolSensitivityLabelsInner.java | 126 +++++ .../SqlPoolTableColumnsImpl.java | 12 +- .../implementation/SqlPoolTableImpl.java | 23 +- .../implementation/SqlPoolTablesImpl.java | 16 + .../implementation/SqlPoolTablesInner.java | 112 ++++ ...lnerabilityAssessmentRuleBaselineImpl.java | 6 +- ...nerabilityAssessmentRuleBaselinesImpl.java | 30 +- ...erabilityAssessmentRuleBaselinesInner.java | 113 ++++ ...lPoolVulnerabilityAssessmentScansImpl.java | 16 + ...PoolVulnerabilityAssessmentScansInner.java | 105 ++++ .../implementation/SqlPoolsInner.java | 1 + .../SynapseManagementClientImpl.java | 56 ++ .../implementation/SynapseManager.java | 48 ++ ...hemaSqlPoolWorkspaceSqlPoolColumnImpl.java | 51 ++ ...qlPoolWorkspaceSqlPoolColumnModelImpl.java | 70 +++ ...VulnerabilityAssessmentScanRecordImpl.java | 21 +- .../WorkspaceAadAdminsInner.java | 1 + .../implementation/WorkspaceImpl.java | 19 + .../implementation/WorkspaceInner.java | 27 + ...anagedIdentitySqlControlSettingsInner.java | 1 + .../implementation/WorkspacesInner.java | 1 + 85 files changed, 6585 insertions(+), 41 deletions(-) create mode 100644 sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/DataMaskingFunction.java create mode 100644 sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/DataMaskingPolicies.java create mode 100644 sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/DataMaskingPolicy.java create mode 100644 sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/DataMaskingRule.java create mode 100644 sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/DataMaskingRuleState.java create mode 100644 sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/DataMaskingRules.java create mode 100644 sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/DataMaskingState.java create mode 100644 sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/ExtendedSqlPoolBlobAuditingPolicies.java create mode 100644 sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/ExtendedSqlPoolBlobAuditingPolicy.java create mode 100644 sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/LibraryInfo.java create mode 100644 sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/ManagedVirtualNetworkSettings.java create mode 100644 sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SensitivityLabelSource.java create mode 100644 sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolColumns.java create mode 100644 sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/TableSchemaSqlPoolWorkspaceSqlPoolColumn.java create mode 100644 sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/TableSchemaSqlPoolWorkspaceSqlPoolColumnModel.java create mode 100644 sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/WorkspacePatchInfoManagedVirtualNetworkSettings.java create mode 100644 sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/DataMaskingPoliciesImpl.java create mode 100644 sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/DataMaskingPoliciesInner.java create mode 100644 sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/DataMaskingPolicyImpl.java create mode 100644 sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/DataMaskingPolicyInner.java create mode 100644 sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/DataMaskingRuleImpl.java create mode 100644 sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/DataMaskingRuleInner.java create mode 100644 sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/DataMaskingRulesImpl.java create mode 100644 sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/DataMaskingRulesInner.java create mode 100644 sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/ExtendedSqlPoolBlobAuditingPoliciesImpl.java create mode 100644 sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/ExtendedSqlPoolBlobAuditingPoliciesInner.java create mode 100644 sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/ExtendedSqlPoolBlobAuditingPolicyImpl.java create mode 100644 sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/ExtendedSqlPoolBlobAuditingPolicyInner.java create mode 100644 sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/PageImpl1.java create mode 100644 sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolColumnsImpl.java create mode 100644 sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolColumnsInner.java create mode 100644 sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/TableSchemaSqlPoolWorkspaceSqlPoolColumnImpl.java create mode 100644 sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/TableSchemaSqlPoolWorkspaceSqlPoolColumnModelImpl.java diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/pom.xml b/sdk/synapse/mgmt-v2019_06_01_preview/pom.xml index efa10135119b9..4ca5aa6816ebe 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/pom.xml +++ b/sdk/synapse/mgmt-v2019_06_01_preview/pom.xml @@ -11,11 +11,11 @@ com.microsoft.azure azure-arm-parent - 1.3.2 - ../../parents/azure-arm-parent/pom.xml + 1.1.0 + ../../../pom.management.xml azure-mgmt-synapse - 1.0.0-beta-3 + 1.0.0-beta jar Microsoft Azure SDK for Synapse Management This package contains Microsoft Synapse Management SDK. diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/BigDataPoolResourceInfo.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/BigDataPoolResourceInfo.java index 7e958a968b169..77685d96bc83a 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/BigDataPoolResourceInfo.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/BigDataPoolResourceInfo.java @@ -19,6 +19,7 @@ import com.microsoft.azure.management.synapse.v2019_06_01_preview.implementation.SynapseManager; import java.util.Map; import org.joda.time.DateTime; +import java.util.List; /** * Type representing BigDataPoolResourceInfo. @@ -39,6 +40,11 @@ public interface BigDataPoolResourceInfo extends HasInner customLibraries(); + /** * @return the defaultSparkLogFolder value. */ @@ -89,6 +95,16 @@ public interface BigDataPoolResourceInfo extends HasInner customLibraries); + } + /** * The stage of the bigdatapoolresourceinfo definition allowing to specify DefaultSparkLogFolder. */ @@ -252,7 +280,7 @@ interface WithNodeCount { interface WithNodeSize { /** * Specifies nodeSize. - * @param nodeSize The level of compute power that each node in the Big Data pool has. Possible values include: 'None', 'Small', 'Medium', 'Large', 'XLarge', 'XXLarge' + * @param nodeSize The level of compute power that each node in the Big Data pool has. Possible values include: 'None', 'Small', 'Medium', 'Large', 'XLarge', 'XXLarge', 'XXXLarge' * @return the next definition stage */ WithCreate withNodeSize(NodeSize nodeSize); @@ -282,6 +310,30 @@ interface WithProvisioningState { WithCreate withProvisioningState(String provisioningState); } + /** + * The stage of the bigdatapoolresourceinfo definition allowing to specify SessionLevelPackagesEnabled. + */ + interface WithSessionLevelPackagesEnabled { + /** + * Specifies sessionLevelPackagesEnabled. + * @param sessionLevelPackagesEnabled Whether session level library/package management is enabled or not + * @return the next definition stage + */ + WithCreate withSessionLevelPackagesEnabled(Boolean sessionLevelPackagesEnabled); + } + + /** + * The stage of the bigdatapoolresourceinfo definition allowing to specify SparkConfigProperties. + */ + interface WithSparkConfigProperties { + /** + * Specifies sparkConfigProperties. + * @param sparkConfigProperties Spark configuration file to specify additional properties + * @return the next definition stage + */ + WithCreate withSparkConfigProperties(LibraryRequirements sparkConfigProperties); + } + /** * The stage of the bigdatapoolresourceinfo definition allowing to specify SparkEventsFolder. */ @@ -323,13 +375,13 @@ interface WithTags { * the resource to be created (via {@link WithCreate#create()}), but also allows * for any other optional settings to be specified. */ - interface WithCreate extends Creatable, DefinitionStages.WithAutoPause, DefinitionStages.WithAutoScale, DefinitionStages.WithCreationDate, DefinitionStages.WithDefaultSparkLogFolder, DefinitionStages.WithIsComputeIsolationEnabled, DefinitionStages.WithLibraryRequirements, DefinitionStages.WithNodeCount, DefinitionStages.WithNodeSize, DefinitionStages.WithNodeSizeFamily, DefinitionStages.WithProvisioningState, DefinitionStages.WithSparkEventsFolder, DefinitionStages.WithSparkVersion, DefinitionStages.WithTags { + interface WithCreate extends Creatable, DefinitionStages.WithAutoPause, DefinitionStages.WithAutoScale, DefinitionStages.WithCreationDate, DefinitionStages.WithCustomLibraries, DefinitionStages.WithDefaultSparkLogFolder, DefinitionStages.WithIsComputeIsolationEnabled, DefinitionStages.WithLibraryRequirements, DefinitionStages.WithNodeCount, DefinitionStages.WithNodeSize, DefinitionStages.WithNodeSizeFamily, DefinitionStages.WithProvisioningState, DefinitionStages.WithSessionLevelPackagesEnabled, DefinitionStages.WithSparkConfigProperties, DefinitionStages.WithSparkEventsFolder, DefinitionStages.WithSparkVersion, DefinitionStages.WithTags { } } /** * The template for a BigDataPoolResourceInfo update operation, containing all the settings that can be modified. */ - interface Update extends Appliable, UpdateStages.WithForce, UpdateStages.WithAutoPause, UpdateStages.WithAutoScale, UpdateStages.WithCreationDate, UpdateStages.WithDefaultSparkLogFolder, UpdateStages.WithIsComputeIsolationEnabled, UpdateStages.WithLibraryRequirements, UpdateStages.WithNodeCount, UpdateStages.WithNodeSize, UpdateStages.WithNodeSizeFamily, UpdateStages.WithProvisioningState, UpdateStages.WithSparkEventsFolder, UpdateStages.WithSparkVersion, UpdateStages.WithTags { + interface Update extends Appliable, UpdateStages.WithForce, UpdateStages.WithAutoPause, UpdateStages.WithAutoScale, UpdateStages.WithCreationDate, UpdateStages.WithCustomLibraries, UpdateStages.WithDefaultSparkLogFolder, UpdateStages.WithIsComputeIsolationEnabled, UpdateStages.WithLibraryRequirements, UpdateStages.WithNodeCount, UpdateStages.WithNodeSize, UpdateStages.WithNodeSizeFamily, UpdateStages.WithProvisioningState, UpdateStages.WithSessionLevelPackagesEnabled, UpdateStages.WithSparkConfigProperties, UpdateStages.WithSparkEventsFolder, UpdateStages.WithSparkVersion, UpdateStages.WithTags { } /** @@ -384,6 +436,18 @@ interface WithCreationDate { Update withCreationDate(DateTime creationDate); } + /** + * The stage of the bigdatapoolresourceinfo update allowing to specify CustomLibraries. + */ + interface WithCustomLibraries { + /** + * Specifies customLibraries. + * @param customLibraries List of custom libraries/packages associated with the spark pool + * @return the next update stage + */ + Update withCustomLibraries(List customLibraries); + } + /** * The stage of the bigdatapoolresourceinfo update allowing to specify DefaultSparkLogFolder. */ @@ -438,7 +502,7 @@ interface WithNodeCount { interface WithNodeSize { /** * Specifies nodeSize. - * @param nodeSize The level of compute power that each node in the Big Data pool has. Possible values include: 'None', 'Small', 'Medium', 'Large', 'XLarge', 'XXLarge' + * @param nodeSize The level of compute power that each node in the Big Data pool has. Possible values include: 'None', 'Small', 'Medium', 'Large', 'XLarge', 'XXLarge', 'XXXLarge' * @return the next update stage */ Update withNodeSize(NodeSize nodeSize); @@ -468,6 +532,30 @@ interface WithProvisioningState { Update withProvisioningState(String provisioningState); } + /** + * The stage of the bigdatapoolresourceinfo update allowing to specify SessionLevelPackagesEnabled. + */ + interface WithSessionLevelPackagesEnabled { + /** + * Specifies sessionLevelPackagesEnabled. + * @param sessionLevelPackagesEnabled Whether session level library/package management is enabled or not + * @return the next update stage + */ + Update withSessionLevelPackagesEnabled(Boolean sessionLevelPackagesEnabled); + } + + /** + * The stage of the bigdatapoolresourceinfo update allowing to specify SparkConfigProperties. + */ + interface WithSparkConfigProperties { + /** + * Specifies sparkConfigProperties. + * @param sparkConfigProperties Spark configuration file to specify additional properties + * @return the next update stage + */ + Update withSparkConfigProperties(LibraryRequirements sparkConfigProperties); + } + /** * The stage of the bigdatapoolresourceinfo update allowing to specify SparkEventsFolder. */ diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/DataMaskingFunction.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/DataMaskingFunction.java new file mode 100644 index 0000000000000..4a6e9b73d450e --- /dev/null +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/DataMaskingFunction.java @@ -0,0 +1,65 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.synapse.v2019_06_01_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for DataMaskingFunction. + */ +public enum DataMaskingFunction { + /** Enum value Default. */ + DEFAULT("Default"), + + /** Enum value CCN. */ + CCN("CCN"), + + /** Enum value Email. */ + EMAIL("Email"), + + /** Enum value Number. */ + NUMBER("Number"), + + /** Enum value SSN. */ + SSN("SSN"), + + /** Enum value Text. */ + TEXT("Text"); + + /** The actual serialized value for a DataMaskingFunction instance. */ + private String value; + + DataMaskingFunction(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a DataMaskingFunction instance. + * + * @param value the serialized value to parse. + * @return the parsed DataMaskingFunction object, or null if unable to parse. + */ + @JsonCreator + public static DataMaskingFunction fromString(String value) { + DataMaskingFunction[] items = DataMaskingFunction.values(); + for (DataMaskingFunction item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/DataMaskingPolicies.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/DataMaskingPolicies.java new file mode 100644 index 0000000000000..cee7cad759a4e --- /dev/null +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/DataMaskingPolicies.java @@ -0,0 +1,31 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.synapse.v2019_06_01_preview; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Observable; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.implementation.DataMaskingPoliciesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing DataMaskingPolicies. + */ +public interface DataMaskingPolicies extends SupportsCreating, HasInner { + /** + * Gets a Sql pool data masking policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String workspaceName, String sqlPoolName); + +} diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/DataMaskingPolicy.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/DataMaskingPolicy.java new file mode 100644 index 0000000000000..20c967f605ad8 --- /dev/null +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/DataMaskingPolicy.java @@ -0,0 +1,155 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.synapse.v2019_06_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.implementation.DataMaskingPolicyInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.implementation.SynapseManager; + +/** + * Type representing DataMaskingPolicy. + */ +public interface DataMaskingPolicy extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the applicationPrincipals value. + */ + String applicationPrincipals(); + + /** + * @return the dataMaskingState value. + */ + DataMaskingState dataMaskingState(); + + /** + * @return the exemptPrincipals value. + */ + String exemptPrincipals(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the maskingLevel value. + */ + String maskingLevel(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the DataMaskingPolicy definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithSqlPool, DefinitionStages.WithDataMaskingState, DefinitionStages.WithCreate { + } + + /** + * Grouping of DataMaskingPolicy definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a DataMaskingPolicy definition. + */ + interface Blank extends WithSqlPool { + } + + /** + * The stage of the datamaskingpolicy definition allowing to specify SqlPool. + */ + interface WithSqlPool { + /** + * Specifies resourceGroupName, workspaceName, sqlPoolName. + * @param resourceGroupName The name of the resource group. The name is case insensitive + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @return the next definition stage + */ + WithDataMaskingState withExistingSqlPool(String resourceGroupName, String workspaceName, String sqlPoolName); + } + + /** + * The stage of the datamaskingpolicy definition allowing to specify DataMaskingState. + */ + interface WithDataMaskingState { + /** + * Specifies dataMaskingState. + * @param dataMaskingState The state of the data masking policy. Possible values include: 'Disabled', 'Enabled' + * @return the next definition stage + */ + WithCreate withDataMaskingState(DataMaskingState dataMaskingState); + } + + /** + * The stage of the datamaskingpolicy definition allowing to specify ExemptPrincipals. + */ + interface WithExemptPrincipals { + /** + * Specifies exemptPrincipals. + * @param exemptPrincipals The list of the exempt principals. Specifies the semicolon-separated list of database users for which the data masking policy does not apply. The specified users receive data results without masking for all of the database queries + * @return the next definition stage + */ + WithCreate withExemptPrincipals(String exemptPrincipals); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithExemptPrincipals { + } + } + /** + * The template for a DataMaskingPolicy update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithExemptPrincipals { + } + + /** + * Grouping of DataMaskingPolicy update stages. + */ + interface UpdateStages { + /** + * The stage of the datamaskingpolicy update allowing to specify ExemptPrincipals. + */ + interface WithExemptPrincipals { + /** + * Specifies exemptPrincipals. + * @param exemptPrincipals The list of the exempt principals. Specifies the semicolon-separated list of database users for which the data masking policy does not apply. The specified users receive data results without masking for all of the database queries + * @return the next update stage + */ + Update withExemptPrincipals(String exemptPrincipals); + } + + } +} diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/DataMaskingRule.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/DataMaskingRule.java new file mode 100644 index 0000000000000..17ab0aa74e1a1 --- /dev/null +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/DataMaskingRule.java @@ -0,0 +1,374 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.synapse.v2019_06_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.implementation.DataMaskingRuleInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.implementation.SynapseManager; + +/** + * Type representing DataMaskingRule. + */ +public interface DataMaskingRule extends HasInner, Indexable, Updatable, HasManager { + /** + * @return the aliasName value. + */ + String aliasName(); + + /** + * @return the columnName value. + */ + String columnName(); + + /** + * @return the dataMaskingRuleId value. + */ + String dataMaskingRuleId(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the kind value. + */ + String kind(); + + /** + * @return the location value. + */ + String location(); + + /** + * @return the maskingFunction value. + */ + DataMaskingFunction maskingFunction(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the numberFrom value. + */ + String numberFrom(); + + /** + * @return the numberTo value. + */ + String numberTo(); + + /** + * @return the prefixSize value. + */ + String prefixSize(); + + /** + * @return the replacementString value. + */ + String replacementString(); + + /** + * @return the ruleState value. + */ + DataMaskingRuleState ruleState(); + + /** + * @return the schemaName value. + */ + String schemaName(); + + /** + * @return the suffixSize value. + */ + String suffixSize(); + + /** + * @return the tableName value. + */ + String tableName(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the DataMaskingRule definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithDataMaskingPolicy, DefinitionStages.WithColumnName, DefinitionStages.WithMaskingFunction, DefinitionStages.WithSchemaName, DefinitionStages.WithTableName, DefinitionStages.WithCreate { + } + + /** + * Grouping of DataMaskingRule definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a DataMaskingRule definition. + */ + interface Blank extends WithDataMaskingPolicy { + } + + /** + * The stage of the datamaskingrule definition allowing to specify DataMaskingPolicy. + */ + interface WithDataMaskingPolicy { + /** + * Specifies resourceGroupName, workspaceName, sqlPoolName. + * @param resourceGroupName The name of the resource group. The name is case insensitive + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @return the next definition stage + */ + WithColumnName withExistingDataMaskingPolicy(String resourceGroupName, String workspaceName, String sqlPoolName); + } + + /** + * The stage of the datamaskingrule definition allowing to specify ColumnName. + */ + interface WithColumnName { + /** + * Specifies columnName. + * @param columnName The column name on which the data masking rule is applied + * @return the next definition stage + */ + WithMaskingFunction withColumnName(String columnName); + } + + /** + * The stage of the datamaskingrule definition allowing to specify MaskingFunction. + */ + interface WithMaskingFunction { + /** + * Specifies maskingFunction. + * @param maskingFunction The masking function that is used for the data masking rule. Possible values include: 'Default', 'CCN', 'Email', 'Number', 'SSN', 'Text' + * @return the next definition stage + */ + WithSchemaName withMaskingFunction(DataMaskingFunction maskingFunction); + } + + /** + * The stage of the datamaskingrule definition allowing to specify SchemaName. + */ + interface WithSchemaName { + /** + * Specifies schemaName. + * @param schemaName The schema name on which the data masking rule is applied + * @return the next definition stage + */ + WithTableName withSchemaName(String schemaName); + } + + /** + * The stage of the datamaskingrule definition allowing to specify TableName. + */ + interface WithTableName { + /** + * Specifies tableName. + * @param tableName The table name on which the data masking rule is applied + * @return the next definition stage + */ + WithCreate withTableName(String tableName); + } + + /** + * The stage of the datamaskingrule definition allowing to specify AliasName. + */ + interface WithAliasName { + /** + * Specifies aliasName. + * @param aliasName The alias name. This is a legacy parameter and is no longer used + * @return the next definition stage + */ + WithCreate withAliasName(String aliasName); + } + + /** + * The stage of the datamaskingrule definition allowing to specify NumberFrom. + */ + interface WithNumberFrom { + /** + * Specifies numberFrom. + * @param numberFrom The numberFrom property of the masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored + * @return the next definition stage + */ + WithCreate withNumberFrom(String numberFrom); + } + + /** + * The stage of the datamaskingrule definition allowing to specify NumberTo. + */ + interface WithNumberTo { + /** + * Specifies numberTo. + * @param numberTo The numberTo property of the data masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored + * @return the next definition stage + */ + WithCreate withNumberTo(String numberTo); + } + + /** + * The stage of the datamaskingrule definition allowing to specify PrefixSize. + */ + interface WithPrefixSize { + /** + * Specifies prefixSize. + * @param prefixSize If maskingFunction is set to Text, the number of characters to show unmasked in the beginning of the string. Otherwise, this parameter will be ignored + * @return the next definition stage + */ + WithCreate withPrefixSize(String prefixSize); + } + + /** + * The stage of the datamaskingrule definition allowing to specify ReplacementString. + */ + interface WithReplacementString { + /** + * Specifies replacementString. + * @param replacementString If maskingFunction is set to Text, the character to use for masking the unexposed part of the string. Otherwise, this parameter will be ignored + * @return the next definition stage + */ + WithCreate withReplacementString(String replacementString); + } + + /** + * The stage of the datamaskingrule definition allowing to specify RuleState. + */ + interface WithRuleState { + /** + * Specifies ruleState. + * @param ruleState The rule state. Used to delete a rule. To delete an existing rule, specify the schemaName, tableName, columnName, maskingFunction, and specify ruleState as disabled. However, if the rule doesn't already exist, the rule will be created with ruleState set to enabled, regardless of the provided value of ruleState. Possible values include: 'Disabled', 'Enabled' + * @return the next definition stage + */ + WithCreate withRuleState(DataMaskingRuleState ruleState); + } + + /** + * The stage of the datamaskingrule definition allowing to specify SuffixSize. + */ + interface WithSuffixSize { + /** + * Specifies suffixSize. + * @param suffixSize If maskingFunction is set to Text, the number of characters to show unmasked at the end of the string. Otherwise, this parameter will be ignored + * @return the next definition stage + */ + WithCreate withSuffixSize(String suffixSize); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithAliasName, DefinitionStages.WithNumberFrom, DefinitionStages.WithNumberTo, DefinitionStages.WithPrefixSize, DefinitionStages.WithReplacementString, DefinitionStages.WithRuleState, DefinitionStages.WithSuffixSize { + } + } + /** + * The template for a DataMaskingRule update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithAliasName, UpdateStages.WithNumberFrom, UpdateStages.WithNumberTo, UpdateStages.WithPrefixSize, UpdateStages.WithReplacementString, UpdateStages.WithRuleState, UpdateStages.WithSuffixSize { + } + + /** + * Grouping of DataMaskingRule update stages. + */ + interface UpdateStages { + /** + * The stage of the datamaskingrule update allowing to specify AliasName. + */ + interface WithAliasName { + /** + * Specifies aliasName. + * @param aliasName The alias name. This is a legacy parameter and is no longer used + * @return the next update stage + */ + Update withAliasName(String aliasName); + } + + /** + * The stage of the datamaskingrule update allowing to specify NumberFrom. + */ + interface WithNumberFrom { + /** + * Specifies numberFrom. + * @param numberFrom The numberFrom property of the masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored + * @return the next update stage + */ + Update withNumberFrom(String numberFrom); + } + + /** + * The stage of the datamaskingrule update allowing to specify NumberTo. + */ + interface WithNumberTo { + /** + * Specifies numberTo. + * @param numberTo The numberTo property of the data masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored + * @return the next update stage + */ + Update withNumberTo(String numberTo); + } + + /** + * The stage of the datamaskingrule update allowing to specify PrefixSize. + */ + interface WithPrefixSize { + /** + * Specifies prefixSize. + * @param prefixSize If maskingFunction is set to Text, the number of characters to show unmasked in the beginning of the string. Otherwise, this parameter will be ignored + * @return the next update stage + */ + Update withPrefixSize(String prefixSize); + } + + /** + * The stage of the datamaskingrule update allowing to specify ReplacementString. + */ + interface WithReplacementString { + /** + * Specifies replacementString. + * @param replacementString If maskingFunction is set to Text, the character to use for masking the unexposed part of the string. Otherwise, this parameter will be ignored + * @return the next update stage + */ + Update withReplacementString(String replacementString); + } + + /** + * The stage of the datamaskingrule update allowing to specify RuleState. + */ + interface WithRuleState { + /** + * Specifies ruleState. + * @param ruleState The rule state. Used to delete a rule. To delete an existing rule, specify the schemaName, tableName, columnName, maskingFunction, and specify ruleState as disabled. However, if the rule doesn't already exist, the rule will be created with ruleState set to enabled, regardless of the provided value of ruleState. Possible values include: 'Disabled', 'Enabled' + * @return the next update stage + */ + Update withRuleState(DataMaskingRuleState ruleState); + } + + /** + * The stage of the datamaskingrule update allowing to specify SuffixSize. + */ + interface WithSuffixSize { + /** + * Specifies suffixSize. + * @param suffixSize If maskingFunction is set to Text, the number of characters to show unmasked at the end of the string. Otherwise, this parameter will be ignored + * @return the next update stage + */ + Update withSuffixSize(String suffixSize); + } + + } +} diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/DataMaskingRuleState.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/DataMaskingRuleState.java new file mode 100644 index 0000000000000..1674271be5901 --- /dev/null +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/DataMaskingRuleState.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.synapse.v2019_06_01_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for DataMaskingRuleState. + */ +public enum DataMaskingRuleState { + /** Enum value Disabled. */ + DISABLED("Disabled"), + + /** Enum value Enabled. */ + ENABLED("Enabled"); + + /** The actual serialized value for a DataMaskingRuleState instance. */ + private String value; + + DataMaskingRuleState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a DataMaskingRuleState instance. + * + * @param value the serialized value to parse. + * @return the parsed DataMaskingRuleState object, or null if unable to parse. + */ + @JsonCreator + public static DataMaskingRuleState fromString(String value) { + DataMaskingRuleState[] items = DataMaskingRuleState.values(); + for (DataMaskingRuleState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/DataMaskingRules.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/DataMaskingRules.java new file mode 100644 index 0000000000000..ccd46e38a907b --- /dev/null +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/DataMaskingRules.java @@ -0,0 +1,31 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.synapse.v2019_06_01_preview; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Observable; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.implementation.DataMaskingRulesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing DataMaskingRules. + */ +public interface DataMaskingRules extends SupportsCreating, HasInner { + /** + * Gets a list of Sql pool data masking rules. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listBySqlPoolAsync(String resourceGroupName, String workspaceName, String sqlPoolName); + +} diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/DataMaskingState.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/DataMaskingState.java new file mode 100644 index 0000000000000..66372800542a8 --- /dev/null +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/DataMaskingState.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.synapse.v2019_06_01_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for DataMaskingState. + */ +public enum DataMaskingState { + /** Enum value Disabled. */ + DISABLED("Disabled"), + + /** Enum value Enabled. */ + ENABLED("Enabled"); + + /** The actual serialized value for a DataMaskingState instance. */ + private String value; + + DataMaskingState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a DataMaskingState instance. + * + * @param value the serialized value to parse. + * @return the parsed DataMaskingState object, or null if unable to parse. + */ + @JsonCreator + public static DataMaskingState fromString(String value) { + DataMaskingState[] items = DataMaskingState.values(); + for (DataMaskingState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/ExtendedSqlPoolBlobAuditingPolicies.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/ExtendedSqlPoolBlobAuditingPolicies.java new file mode 100644 index 0000000000000..c6f441c78a601 --- /dev/null +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/ExtendedSqlPoolBlobAuditingPolicies.java @@ -0,0 +1,42 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.synapse.v2019_06_01_preview; + +import com.microsoft.azure.arm.collection.SupportsCreating; +import rx.Observable; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.implementation.ExtendedSqlPoolBlobAuditingPoliciesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing ExtendedSqlPoolBlobAuditingPolicies. + */ +public interface ExtendedSqlPoolBlobAuditingPolicies extends SupportsCreating, HasInner { + /** + * Gets an extended Sql pool's blob auditing policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String workspaceName, String sqlPoolName); + + /** + * Lists extended auditing settings of a Sql pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listBySqlPoolAsync(final String resourceGroupName, final String workspaceName, final String sqlPoolName); + +} diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/ExtendedSqlPoolBlobAuditingPolicy.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/ExtendedSqlPoolBlobAuditingPolicy.java new file mode 100644 index 0000000000000..8baed87a7cc58 --- /dev/null +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/ExtendedSqlPoolBlobAuditingPolicy.java @@ -0,0 +1,483 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.synapse.v2019_06_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.implementation.ExtendedSqlPoolBlobAuditingPolicyInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.model.Updatable; +import com.microsoft.azure.arm.model.Appliable; +import com.microsoft.azure.arm.model.Creatable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.implementation.SynapseManager; +import java.util.List; +import java.util.UUID; + +/** + * Type representing ExtendedSqlPoolBlobAuditingPolicy. + */ +public interface ExtendedSqlPoolBlobAuditingPolicy extends HasInner, Indexable, Refreshable, Updatable, HasManager { + /** + * @return the auditActionsAndGroups value. + */ + List auditActionsAndGroups(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the isAzureMonitorTargetEnabled value. + */ + Boolean isAzureMonitorTargetEnabled(); + + /** + * @return the isStorageSecondaryKeyInUse value. + */ + Boolean isStorageSecondaryKeyInUse(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the predicateExpression value. + */ + String predicateExpression(); + + /** + * @return the queueDelayMs value. + */ + Integer queueDelayMs(); + + /** + * @return the retentionDays value. + */ + Integer retentionDays(); + + /** + * @return the state value. + */ + BlobAuditingPolicyState state(); + + /** + * @return the storageAccountAccessKey value. + */ + String storageAccountAccessKey(); + + /** + * @return the storageAccountSubscriptionId value. + */ + UUID storageAccountSubscriptionId(); + + /** + * @return the storageEndpoint value. + */ + String storageEndpoint(); + + /** + * @return the type value. + */ + String type(); + + /** + * The entirety of the ExtendedSqlPoolBlobAuditingPolicy definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithSqlPool, DefinitionStages.WithState, DefinitionStages.WithCreate { + } + + /** + * Grouping of ExtendedSqlPoolBlobAuditingPolicy definition stages. + */ + interface DefinitionStages { + /** + * The first stage of a ExtendedSqlPoolBlobAuditingPolicy definition. + */ + interface Blank extends WithSqlPool { + } + + /** + * The stage of the extendedsqlpoolblobauditingpolicy definition allowing to specify SqlPool. + */ + interface WithSqlPool { + /** + * Specifies resourceGroupName, workspaceName, sqlPoolName. + * @param resourceGroupName The name of the resource group. The name is case insensitive + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @return the next definition stage + */ + WithState withExistingSqlPool(String resourceGroupName, String workspaceName, String sqlPoolName); + } + + /** + * The stage of the extendedsqlpoolblobauditingpolicy definition allowing to specify State. + */ + interface WithState { + /** + * Specifies state. + * @param state Specifies the state of the policy. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. Possible values include: 'Enabled', 'Disabled' + * @return the next definition stage + */ + WithCreate withState(BlobAuditingPolicyState state); + } + + /** + * The stage of the extendedsqlpoolblobauditingpolicy definition allowing to specify AuditActionsAndGroups. + */ + interface WithAuditActionsAndGroups { + /** + * Specifies auditActionsAndGroups. + * @param auditActionsAndGroups Specifies the Actions-Groups and Actions to audit. + The recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary groups could lead to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that <object> in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + * @return the next definition stage + */ + WithCreate withAuditActionsAndGroups(List auditActionsAndGroups); + } + + /** + * The stage of the extendedsqlpoolblobauditingpolicy definition allowing to specify IsAzureMonitorTargetEnabled. + */ + interface WithIsAzureMonitorTargetEnabled { + /** + * Specifies isAzureMonitorTargetEnabled. + * @param isAzureMonitorTargetEnabled Specifies whether audit events are sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on the database should be also created. + Note that for server level audit you should use the 'master' database as {databaseName}. + Diagnostic Settings URI format: + PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + * @return the next definition stage + */ + WithCreate withIsAzureMonitorTargetEnabled(Boolean isAzureMonitorTargetEnabled); + } + + /** + * The stage of the extendedsqlpoolblobauditingpolicy definition allowing to specify IsStorageSecondaryKeyInUse. + */ + interface WithIsStorageSecondaryKeyInUse { + /** + * Specifies isStorageSecondaryKeyInUse. + * @param isStorageSecondaryKeyInUse Specifies whether storageAccountAccessKey value is the storage's secondary key + * @return the next definition stage + */ + WithCreate withIsStorageSecondaryKeyInUse(Boolean isStorageSecondaryKeyInUse); + } + + /** + * The stage of the extendedsqlpoolblobauditingpolicy definition allowing to specify PredicateExpression. + */ + interface WithPredicateExpression { + /** + * Specifies predicateExpression. + * @param predicateExpression Specifies condition of where clause when creating an audit + * @return the next definition stage + */ + WithCreate withPredicateExpression(String predicateExpression); + } + + /** + * The stage of the extendedsqlpoolblobauditingpolicy definition allowing to specify QueueDelayMs. + */ + interface WithQueueDelayMs { + /** + * Specifies queueDelayMs. + * @param queueDelayMs Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed. + The default minimum value is 1000 (1 second). The maximum is 2,147,483,647 + * @return the next definition stage + */ + WithCreate withQueueDelayMs(Integer queueDelayMs); + } + + /** + * The stage of the extendedsqlpoolblobauditingpolicy definition allowing to specify RetentionDays. + */ + interface WithRetentionDays { + /** + * Specifies retentionDays. + * @param retentionDays Specifies the number of days to keep in the audit logs in the storage account + * @return the next definition stage + */ + WithCreate withRetentionDays(Integer retentionDays); + } + + /** + * The stage of the extendedsqlpoolblobauditingpolicy definition allowing to specify StorageAccountAccessKey. + */ + interface WithStorageAccountAccessKey { + /** + * Specifies storageAccountAccessKey. + * @param storageAccountAccessKey Specifies the identifier key of the auditing storage account. + If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage. + Prerequisites for using managed identity authentication: + 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). + 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity. + For more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355) + * @return the next definition stage + */ + WithCreate withStorageAccountAccessKey(String storageAccountAccessKey); + } + + /** + * The stage of the extendedsqlpoolblobauditingpolicy definition allowing to specify StorageAccountSubscriptionId. + */ + interface WithStorageAccountSubscriptionId { + /** + * Specifies storageAccountSubscriptionId. + * @param storageAccountSubscriptionId Specifies the blob storage subscription Id + * @return the next definition stage + */ + WithCreate withStorageAccountSubscriptionId(UUID storageAccountSubscriptionId); + } + + /** + * The stage of the extendedsqlpoolblobauditingpolicy definition allowing to specify StorageEndpoint. + */ + interface WithStorageEndpoint { + /** + * Specifies storageEndpoint. + * @param storageEndpoint Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required + * @return the next definition stage + */ + WithCreate withStorageEndpoint(String storageEndpoint); + } + + /** + * The stage of the definition which contains all the minimum required inputs for + * the resource to be created (via {@link WithCreate#create()}), but also allows + * for any other optional settings to be specified. + */ + interface WithCreate extends Creatable, DefinitionStages.WithAuditActionsAndGroups, DefinitionStages.WithIsAzureMonitorTargetEnabled, DefinitionStages.WithIsStorageSecondaryKeyInUse, DefinitionStages.WithPredicateExpression, DefinitionStages.WithQueueDelayMs, DefinitionStages.WithRetentionDays, DefinitionStages.WithStorageAccountAccessKey, DefinitionStages.WithStorageAccountSubscriptionId, DefinitionStages.WithStorageEndpoint { + } + } + /** + * The template for a ExtendedSqlPoolBlobAuditingPolicy update operation, containing all the settings that can be modified. + */ + interface Update extends Appliable, UpdateStages.WithAuditActionsAndGroups, UpdateStages.WithIsAzureMonitorTargetEnabled, UpdateStages.WithIsStorageSecondaryKeyInUse, UpdateStages.WithPredicateExpression, UpdateStages.WithQueueDelayMs, UpdateStages.WithRetentionDays, UpdateStages.WithStorageAccountAccessKey, UpdateStages.WithStorageAccountSubscriptionId, UpdateStages.WithStorageEndpoint { + } + + /** + * Grouping of ExtendedSqlPoolBlobAuditingPolicy update stages. + */ + interface UpdateStages { + /** + * The stage of the extendedsqlpoolblobauditingpolicy update allowing to specify AuditActionsAndGroups. + */ + interface WithAuditActionsAndGroups { + /** + * Specifies auditActionsAndGroups. + * @param auditActionsAndGroups Specifies the Actions-Groups and Actions to audit. + The recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary groups could lead to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that <object> in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + * @return the next update stage + */ + Update withAuditActionsAndGroups(List auditActionsAndGroups); + } + + /** + * The stage of the extendedsqlpoolblobauditingpolicy update allowing to specify IsAzureMonitorTargetEnabled. + */ + interface WithIsAzureMonitorTargetEnabled { + /** + * Specifies isAzureMonitorTargetEnabled. + * @param isAzureMonitorTargetEnabled Specifies whether audit events are sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on the database should be also created. + Note that for server level audit you should use the 'master' database as {databaseName}. + Diagnostic Settings URI format: + PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + * @return the next update stage + */ + Update withIsAzureMonitorTargetEnabled(Boolean isAzureMonitorTargetEnabled); + } + + /** + * The stage of the extendedsqlpoolblobauditingpolicy update allowing to specify IsStorageSecondaryKeyInUse. + */ + interface WithIsStorageSecondaryKeyInUse { + /** + * Specifies isStorageSecondaryKeyInUse. + * @param isStorageSecondaryKeyInUse Specifies whether storageAccountAccessKey value is the storage's secondary key + * @return the next update stage + */ + Update withIsStorageSecondaryKeyInUse(Boolean isStorageSecondaryKeyInUse); + } + + /** + * The stage of the extendedsqlpoolblobauditingpolicy update allowing to specify PredicateExpression. + */ + interface WithPredicateExpression { + /** + * Specifies predicateExpression. + * @param predicateExpression Specifies condition of where clause when creating an audit + * @return the next update stage + */ + Update withPredicateExpression(String predicateExpression); + } + + /** + * The stage of the extendedsqlpoolblobauditingpolicy update allowing to specify QueueDelayMs. + */ + interface WithQueueDelayMs { + /** + * Specifies queueDelayMs. + * @param queueDelayMs Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed. + The default minimum value is 1000 (1 second). The maximum is 2,147,483,647 + * @return the next update stage + */ + Update withQueueDelayMs(Integer queueDelayMs); + } + + /** + * The stage of the extendedsqlpoolblobauditingpolicy update allowing to specify RetentionDays. + */ + interface WithRetentionDays { + /** + * Specifies retentionDays. + * @param retentionDays Specifies the number of days to keep in the audit logs in the storage account + * @return the next update stage + */ + Update withRetentionDays(Integer retentionDays); + } + + /** + * The stage of the extendedsqlpoolblobauditingpolicy update allowing to specify StorageAccountAccessKey. + */ + interface WithStorageAccountAccessKey { + /** + * Specifies storageAccountAccessKey. + * @param storageAccountAccessKey Specifies the identifier key of the auditing storage account. + If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage. + Prerequisites for using managed identity authentication: + 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). + 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity. + For more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355) + * @return the next update stage + */ + Update withStorageAccountAccessKey(String storageAccountAccessKey); + } + + /** + * The stage of the extendedsqlpoolblobauditingpolicy update allowing to specify StorageAccountSubscriptionId. + */ + interface WithStorageAccountSubscriptionId { + /** + * Specifies storageAccountSubscriptionId. + * @param storageAccountSubscriptionId Specifies the blob storage subscription Id + * @return the next update stage + */ + Update withStorageAccountSubscriptionId(UUID storageAccountSubscriptionId); + } + + /** + * The stage of the extendedsqlpoolblobauditingpolicy update allowing to specify StorageEndpoint. + */ + interface WithStorageEndpoint { + /** + * Specifies storageEndpoint. + * @param storageEndpoint Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required + * @return the next update stage + */ + Update withStorageEndpoint(String storageEndpoint); + } + + } +} diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/LibraryInfo.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/LibraryInfo.java new file mode 100644 index 0000000000000..05db466727cad --- /dev/null +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/LibraryInfo.java @@ -0,0 +1,149 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.synapse.v2019_06_01_preview; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Information about a library/package created at the workspace level. + * Library/package information of a Big Data pool powered by Apache Spark. + */ +public class LibraryInfo { + /** + * Name of the library. + */ + @JsonProperty(value = "name") + private String name; + + /** + * Storage blob path of library. + */ + @JsonProperty(value = "path") + private String path; + + /** + * Storage blob container name. + */ + @JsonProperty(value = "containerName") + private String containerName; + + /** + * The last update time of the library. + */ + @JsonProperty(value = "uploadedTimestamp") + private DateTime uploadedTimestamp; + + /** + * Type of the library. + */ + @JsonProperty(value = "type") + private String type; + + /** + * Get name of the library. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the library. + * + * @param name the name value to set + * @return the LibraryInfo object itself. + */ + public LibraryInfo withName(String name) { + this.name = name; + return this; + } + + /** + * Get storage blob path of library. + * + * @return the path value + */ + public String path() { + return this.path; + } + + /** + * Set storage blob path of library. + * + * @param path the path value to set + * @return the LibraryInfo object itself. + */ + public LibraryInfo withPath(String path) { + this.path = path; + return this; + } + + /** + * Get storage blob container name. + * + * @return the containerName value + */ + public String containerName() { + return this.containerName; + } + + /** + * Set storage blob container name. + * + * @param containerName the containerName value to set + * @return the LibraryInfo object itself. + */ + public LibraryInfo withContainerName(String containerName) { + this.containerName = containerName; + return this; + } + + /** + * Get the last update time of the library. + * + * @return the uploadedTimestamp value + */ + public DateTime uploadedTimestamp() { + return this.uploadedTimestamp; + } + + /** + * Set the last update time of the library. + * + * @param uploadedTimestamp the uploadedTimestamp value to set + * @return the LibraryInfo object itself. + */ + public LibraryInfo withUploadedTimestamp(DateTime uploadedTimestamp) { + this.uploadedTimestamp = uploadedTimestamp; + return this; + } + + /** + * Get type of the library. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Set type of the library. + * + * @param type the type value to set + * @return the LibraryInfo object itself. + */ + public LibraryInfo withType(String type) { + this.type = type; + return this; + } + +} diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/ManagedVirtualNetworkSettings.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/ManagedVirtualNetworkSettings.java new file mode 100644 index 0000000000000..7026bf83a2e07 --- /dev/null +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/ManagedVirtualNetworkSettings.java @@ -0,0 +1,96 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.synapse.v2019_06_01_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Managed Virtual Network Settings. + */ +public class ManagedVirtualNetworkSettings { + /** + * Prevent Data Exfiltration. + */ + @JsonProperty(value = "preventDataExfiltration") + private Boolean preventDataExfiltration; + + /** + * Linked Access Check On Target Resource. + */ + @JsonProperty(value = "linkedAccessCheckOnTargetResource") + private Boolean linkedAccessCheckOnTargetResource; + + /** + * Allowed Aad Tenant Ids For Linking. + */ + @JsonProperty(value = "allowedAadTenantIdsForLinking") + private List allowedAadTenantIdsForLinking; + + /** + * Get prevent Data Exfiltration. + * + * @return the preventDataExfiltration value + */ + public Boolean preventDataExfiltration() { + return this.preventDataExfiltration; + } + + /** + * Set prevent Data Exfiltration. + * + * @param preventDataExfiltration the preventDataExfiltration value to set + * @return the ManagedVirtualNetworkSettings object itself. + */ + public ManagedVirtualNetworkSettings withPreventDataExfiltration(Boolean preventDataExfiltration) { + this.preventDataExfiltration = preventDataExfiltration; + return this; + } + + /** + * Get linked Access Check On Target Resource. + * + * @return the linkedAccessCheckOnTargetResource value + */ + public Boolean linkedAccessCheckOnTargetResource() { + return this.linkedAccessCheckOnTargetResource; + } + + /** + * Set linked Access Check On Target Resource. + * + * @param linkedAccessCheckOnTargetResource the linkedAccessCheckOnTargetResource value to set + * @return the ManagedVirtualNetworkSettings object itself. + */ + public ManagedVirtualNetworkSettings withLinkedAccessCheckOnTargetResource(Boolean linkedAccessCheckOnTargetResource) { + this.linkedAccessCheckOnTargetResource = linkedAccessCheckOnTargetResource; + return this; + } + + /** + * Get allowed Aad Tenant Ids For Linking. + * + * @return the allowedAadTenantIdsForLinking value + */ + public List allowedAadTenantIdsForLinking() { + return this.allowedAadTenantIdsForLinking; + } + + /** + * Set allowed Aad Tenant Ids For Linking. + * + * @param allowedAadTenantIdsForLinking the allowedAadTenantIdsForLinking value to set + * @return the ManagedVirtualNetworkSettings object itself. + */ + public ManagedVirtualNetworkSettings withAllowedAadTenantIdsForLinking(List allowedAadTenantIdsForLinking) { + this.allowedAadTenantIdsForLinking = allowedAadTenantIdsForLinking; + return this; + } + +} diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/NodeSize.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/NodeSize.java index cb6f27c30786a..7d6ac544e88eb 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/NodeSize.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/NodeSize.java @@ -34,6 +34,9 @@ public final class NodeSize extends ExpandableStringEnum { /** Static value XXLarge for NodeSize. */ public static final NodeSize XXLARGE = fromString("XXLarge"); + /** Static value XXXLarge for NodeSize. */ + public static final NodeSize XXXLARGE = fromString("XXXLarge"); + /** * Creates or finds a NodeSize from its string representation. * @param name a name to look for diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SensitivityLabelSource.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SensitivityLabelSource.java new file mode 100644 index 0000000000000..95defd3060171 --- /dev/null +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SensitivityLabelSource.java @@ -0,0 +1,53 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.synapse.v2019_06_01_preview; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for SensitivityLabelSource. + */ +public enum SensitivityLabelSource { + /** Enum value current. */ + CURRENT("current"), + + /** Enum value recommended. */ + RECOMMENDED("recommended"); + + /** The actual serialized value for a SensitivityLabelSource instance. */ + private String value; + + SensitivityLabelSource(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a SensitivityLabelSource instance. + * + * @param value the serialized value to parse. + * @return the parsed SensitivityLabelSource object, or null if unable to parse. + */ + @JsonCreator + public static SensitivityLabelSource fromString(String value) { + SensitivityLabelSource[] items = SensitivityLabelSource.values(); + for (SensitivityLabelSource item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SensitivityLabels.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SensitivityLabels.java index 9245e242026a8..e9376e8bdcc09 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SensitivityLabels.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SensitivityLabels.java @@ -11,6 +11,7 @@ import com.microsoft.azure.arm.model.HasInner; import com.microsoft.azure.management.synapse.v2019_06_01_preview.implementation.SensitivityLabelInner; import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; import com.microsoft.azure.arm.model.Updatable; import com.microsoft.azure.arm.model.Appliable; import com.microsoft.azure.arm.model.Creatable; @@ -20,7 +21,7 @@ /** * Type representing SensitivityLabels. */ -public interface SensitivityLabels extends HasInner, Indexable, Updatable, HasManager { +public interface SensitivityLabels extends HasInner, Indexable, Refreshable, Updatable, HasManager { /** * @return the id value. */ diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolBlobAuditingPolicies.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolBlobAuditingPolicies.java index 5cef8463147af..8558c68c4627a 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolBlobAuditingPolicies.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolBlobAuditingPolicies.java @@ -29,4 +29,15 @@ public interface SqlPoolBlobAuditingPolicies extends SupportsCreating getAsync(String resourceGroupName, String workspaceName, String sqlPoolName); + /** + * Lists auditing settings of a Sql pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listBySqlPoolAsync(final String resourceGroupName, final String workspaceName, final String sqlPoolName); + } diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolColumns.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolColumns.java new file mode 100644 index 0000000000000..f39101599fb1d --- /dev/null +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolColumns.java @@ -0,0 +1,33 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.synapse.v2019_06_01_preview; + +import rx.Observable; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.implementation.SqlPoolColumnsInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing SqlPoolColumns. + */ +public interface SqlPoolColumns extends HasInner { + /** + * Get Sql pool column. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String workspaceName, String sqlPoolName, String schemaName, String tableName, String columnName); + +} diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolSchema.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolSchema.java index 6504d98fc769e..8e1d9d94a91d9 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolSchema.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolSchema.java @@ -10,13 +10,15 @@ import com.microsoft.azure.arm.model.HasInner; import com.microsoft.azure.management.synapse.v2019_06_01_preview.implementation.SqlPoolSchemaInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; import com.microsoft.azure.arm.resources.models.HasManager; import com.microsoft.azure.management.synapse.v2019_06_01_preview.implementation.SynapseManager; /** * Type representing SqlPoolSchema. */ -public interface SqlPoolSchema extends HasInner, HasManager { +public interface SqlPoolSchema extends HasInner, Indexable, Refreshable, HasManager { /** * @return the id value. */ diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolSchemas.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolSchemas.java index 305216acd02fb..37d5652b58ddc 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolSchemas.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolSchemas.java @@ -16,6 +16,18 @@ * Type representing SqlPoolSchemas. */ public interface SqlPoolSchemas extends HasInner { + /** + * Get Sql Pool schema. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param schemaName The name of the schema. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String workspaceName, String sqlPoolName, String schemaName); + /** * Gets schemas of a given SQL pool. * Gets schemas of a given SQL pool. diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolSensitivityLabels.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolSensitivityLabels.java index d10e7f9a5ac2e..758869545dbd2 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolSensitivityLabels.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolSensitivityLabels.java @@ -10,9 +10,9 @@ import com.microsoft.azure.arm.collection.SupportsCreating; import rx.Completable; +import rx.Observable; import com.microsoft.azure.management.synapse.v2019_06_01_preview.implementation.SqlPoolSensitivityLabelsInner; import com.microsoft.azure.arm.model.HasInner; -import rx.Observable; import com.microsoft.azure.management.synapse.v2019_06_01_preview.CurrentSensitivityLabels; import com.microsoft.azure.management.synapse.v2019_06_01_preview.RecommendedSensitivityLabels; @@ -48,6 +48,21 @@ public interface SqlPoolSensitivityLabels extends SupportsCreating getAsync(String resourceGroupName, String workspaceName, String sqlPoolName, String schemaName, String tableName, String columnName, SensitivityLabelSource sensitivityLabelSource); + /** * Deletes the sensitivity label of a given column in a Sql pool. * diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolTable.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolTable.java index d0d429e92af5a..9eaaf9284bfd1 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolTable.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolTable.java @@ -10,13 +10,15 @@ import com.microsoft.azure.arm.model.HasInner; import com.microsoft.azure.management.synapse.v2019_06_01_preview.implementation.SqlPoolTableInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; import com.microsoft.azure.arm.resources.models.HasManager; import com.microsoft.azure.management.synapse.v2019_06_01_preview.implementation.SynapseManager; /** * Type representing SqlPoolTable. */ -public interface SqlPoolTable extends HasInner, HasManager { +public interface SqlPoolTable extends HasInner, Indexable, Refreshable, HasManager { /** * @return the id value. */ diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolTableColumns.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolTableColumns.java index 538b1aae524d7..63bf4ea697ff7 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolTableColumns.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolTableColumns.java @@ -28,6 +28,6 @@ public interface SqlPoolTableColumns extends HasInner * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - Observable listByTableNameAsync(final String resourceGroupName, final String workspaceName, final String sqlPoolName, final String schemaName, final String tableName); + Observable listByTableNameAsync(final String resourceGroupName, final String workspaceName, final String sqlPoolName, final String schemaName, final String tableName); } diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolTables.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolTables.java index 932c57ffdb3fc..01bc67c3f5dc5 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolTables.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolTables.java @@ -16,6 +16,19 @@ * Type representing SqlPoolTables. */ public interface SqlPoolTables extends HasInner { + /** + * Get Sql pool table. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String workspaceName, String sqlPoolName, String schemaName, String tableName); + /** * Gets tables of a given schema in a SQL pool. * Gets tables of a given schema in a SQL pool. diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolVulnerabilityAssessmentRuleBaseline.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolVulnerabilityAssessmentRuleBaseline.java index 1af51739a8923..0f6d09f407b78 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolVulnerabilityAssessmentRuleBaseline.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolVulnerabilityAssessmentRuleBaseline.java @@ -11,6 +11,7 @@ import com.microsoft.azure.arm.model.HasInner; import com.microsoft.azure.management.synapse.v2019_06_01_preview.implementation.SqlPoolVulnerabilityAssessmentRuleBaselineInner; import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; import com.microsoft.azure.arm.model.Updatable; import com.microsoft.azure.arm.model.Appliable; import com.microsoft.azure.arm.model.Creatable; @@ -21,7 +22,7 @@ /** * Type representing SqlPoolVulnerabilityAssessmentRuleBaseline. */ -public interface SqlPoolVulnerabilityAssessmentRuleBaseline extends HasInner, Indexable, Updatable, HasManager { +public interface SqlPoolVulnerabilityAssessmentRuleBaseline extends HasInner, Indexable, Refreshable, Updatable, HasManager { /** * @return the baselineResults value. */ diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolVulnerabilityAssessmentRuleBaselines.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolVulnerabilityAssessmentRuleBaselines.java index df4dc73346a49..1ecd8289edf4f 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolVulnerabilityAssessmentRuleBaselines.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolVulnerabilityAssessmentRuleBaselines.java @@ -8,6 +8,7 @@ package com.microsoft.azure.management.synapse.v2019_06_01_preview; +import rx.Observable; import rx.Completable; /** @@ -21,6 +22,19 @@ public interface SqlPoolVulnerabilityAssessmentRuleBaselines { */ SqlPoolVulnerabilityAssessmentRuleBaseline.DefinitionStages.Blank defineBaseline(String name); + /** + * Gets a SqlPool's vulnerability assessment rule baseline. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param ruleId The vulnerability assessment rule ID. + * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a Sql pool level rule and master for server level rule). Possible values include: 'master', 'default' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String workspaceName, String sqlPoolName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName); + /** * Removes the database's vulnerability assessment rule baseline. * diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolVulnerabilityAssessmentScans.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolVulnerabilityAssessmentScans.java index 0e9b8628b379d..33be3673d5f6d 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolVulnerabilityAssessmentScans.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/SqlPoolVulnerabilityAssessmentScans.java @@ -41,6 +41,18 @@ public interface SqlPoolVulnerabilityAssessmentScans extends HasInner exportAsync(String resourceGroupName, String workspaceName, String sqlPoolName, String scanId); + /** + * Gets a vulnerability assessment scan record of a Sql pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param scanId The vulnerability assessment scan Id of the scan to retrieve. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String workspaceName, String sqlPoolName, String scanId); + /** * Lists the vulnerability assessment scans of a SQL pool. * Lists the vulnerability assessment scans of a SQL pool. diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/TableSchemaSqlPoolWorkspaceSqlPoolColumn.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/TableSchemaSqlPoolWorkspaceSqlPoolColumn.java new file mode 100644 index 0000000000000..13723f6bc94a9 --- /dev/null +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/TableSchemaSqlPoolWorkspaceSqlPoolColumn.java @@ -0,0 +1,40 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.synapse.v2019_06_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.implementation.SqlPoolColumnInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.implementation.SynapseManager; + +/** + * Type representing TableSchemaSqlPoolWorkspaceSqlPoolColumn. + */ +public interface TableSchemaSqlPoolWorkspaceSqlPoolColumn extends HasInner, HasManager { + /** + * @return the columnType value. + */ + ColumnDataType columnType(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/TableSchemaSqlPoolWorkspaceSqlPoolColumnModel.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/TableSchemaSqlPoolWorkspaceSqlPoolColumnModel.java new file mode 100644 index 0000000000000..8e8f640a5a5b2 --- /dev/null +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/TableSchemaSqlPoolWorkspaceSqlPoolColumnModel.java @@ -0,0 +1,42 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.synapse.v2019_06_01_preview; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.implementation.SqlPoolColumnInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.implementation.SynapseManager; + +/** + * Type representing TableSchemaSqlPoolWorkspaceSqlPoolColumnModel. + */ +public interface TableSchemaSqlPoolWorkspaceSqlPoolColumnModel extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the columnType value. + */ + ColumnDataType columnType(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/VulnerabilityAssessmentScanRecord.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/VulnerabilityAssessmentScanRecord.java index f9aab1299fc62..49f0852256a08 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/VulnerabilityAssessmentScanRecord.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/VulnerabilityAssessmentScanRecord.java @@ -10,6 +10,8 @@ import com.microsoft.azure.arm.model.HasInner; import com.microsoft.azure.management.synapse.v2019_06_01_preview.implementation.VulnerabilityAssessmentScanRecordInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; import com.microsoft.azure.arm.resources.models.HasManager; import com.microsoft.azure.management.synapse.v2019_06_01_preview.implementation.SynapseManager; import org.joda.time.DateTime; @@ -18,7 +20,7 @@ /** * Type representing VulnerabilityAssessmentScanRecord. */ -public interface VulnerabilityAssessmentScanRecord extends HasInner, HasManager { +public interface VulnerabilityAssessmentScanRecord extends HasInner, Indexable, Refreshable, HasManager { /** * @return the endTime value. */ diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/Workspace.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/Workspace.java index 9b0311acc36d4..a2f628a485b85 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/Workspace.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/Workspace.java @@ -57,6 +57,11 @@ public interface Workspace extends HasInner, Resource, Groupable */ String managedVirtualNetwork(); + /** + * @return the managedVirtualNetworkSettings value. + */ + ManagedVirtualNetworkSettings managedVirtualNetworkSettings(); + /** * @return the privateEndpointConnections value. */ @@ -164,6 +169,18 @@ interface WithManagedVirtualNetwork { WithCreate withManagedVirtualNetwork(String managedVirtualNetwork); } + /** + * The stage of the workspace definition allowing to specify ManagedVirtualNetworkSettings. + */ + interface WithManagedVirtualNetworkSettings { + /** + * Specifies managedVirtualNetworkSettings. + * @param managedVirtualNetworkSettings Managed Virtual Network Settings + * @return the next definition stage + */ + WithCreate withManagedVirtualNetworkSettings(ManagedVirtualNetworkSettings managedVirtualNetworkSettings); + } + /** * The stage of the workspace definition allowing to specify PrivateEndpointConnections. */ @@ -217,13 +234,13 @@ interface WithVirtualNetworkProfile { * the resource to be created (via {@link WithCreate#create()}), but also allows * for any other optional settings to be specified. */ - interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithConnectivityEndpoints, DefinitionStages.WithDefaultDataLakeStorage, DefinitionStages.WithIdentity, DefinitionStages.WithManagedResourceGroupName, DefinitionStages.WithManagedVirtualNetwork, DefinitionStages.WithPrivateEndpointConnections, DefinitionStages.WithSqlAdministratorLogin, DefinitionStages.WithSqlAdministratorLoginPassword, DefinitionStages.WithVirtualNetworkProfile { + interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithConnectivityEndpoints, DefinitionStages.WithDefaultDataLakeStorage, DefinitionStages.WithIdentity, DefinitionStages.WithManagedResourceGroupName, DefinitionStages.WithManagedVirtualNetwork, DefinitionStages.WithManagedVirtualNetworkSettings, DefinitionStages.WithPrivateEndpointConnections, DefinitionStages.WithSqlAdministratorLogin, DefinitionStages.WithSqlAdministratorLoginPassword, DefinitionStages.WithVirtualNetworkProfile { } } /** * The template for a Workspace update operation, containing all the settings that can be modified. */ - interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithIdentity, UpdateStages.WithSqlAdministratorLoginPassword { + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithIdentity, UpdateStages.WithManagedVirtualNetworkSettings, UpdateStages.WithSqlAdministratorLoginPassword { } /** @@ -242,6 +259,18 @@ interface WithIdentity { Update withIdentity(ManagedIdentity identity); } + /** + * The stage of the workspace update allowing to specify ManagedVirtualNetworkSettings. + */ + interface WithManagedVirtualNetworkSettings { + /** + * Specifies managedVirtualNetworkSettings. + * @param managedVirtualNetworkSettings Managed Virtual Network Settings + * @return the next update stage + */ + Update withManagedVirtualNetworkSettings(WorkspacePatchInfoManagedVirtualNetworkSettings managedVirtualNetworkSettings); + } + /** * The stage of the workspace update allowing to specify SqlAdministratorLoginPassword. */ diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/WorkspacePatchInfo.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/WorkspacePatchInfo.java index 4d89adbee0290..d6e3da7bc8087 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/WorkspacePatchInfo.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/WorkspacePatchInfo.java @@ -29,6 +29,12 @@ public class WorkspacePatchInfo { @JsonProperty(value = "identity") private ManagedIdentity identity; + /** + * Managed Virtual Network Settings. + */ + @JsonProperty(value = "managedVirtualNetworkSettings") + private WorkspacePatchInfoManagedVirtualNetworkSettings managedVirtualNetworkSettings; + /** * SQL administrator login password. */ @@ -81,6 +87,26 @@ public WorkspacePatchInfo withIdentity(ManagedIdentity identity) { return this; } + /** + * Get managed Virtual Network Settings. + * + * @return the managedVirtualNetworkSettings value + */ + public WorkspacePatchInfoManagedVirtualNetworkSettings managedVirtualNetworkSettings() { + return this.managedVirtualNetworkSettings; + } + + /** + * Set managed Virtual Network Settings. + * + * @param managedVirtualNetworkSettings the managedVirtualNetworkSettings value to set + * @return the WorkspacePatchInfo object itself. + */ + public WorkspacePatchInfo withManagedVirtualNetworkSettings(WorkspacePatchInfoManagedVirtualNetworkSettings managedVirtualNetworkSettings) { + this.managedVirtualNetworkSettings = managedVirtualNetworkSettings; + return this; + } + /** * Get sQL administrator login password. * diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/WorkspacePatchInfoManagedVirtualNetworkSettings.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/WorkspacePatchInfoManagedVirtualNetworkSettings.java new file mode 100644 index 0000000000000..673d06ba3a538 --- /dev/null +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/WorkspacePatchInfoManagedVirtualNetworkSettings.java @@ -0,0 +1,96 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.synapse.v2019_06_01_preview; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Managed Virtual Network Settings. + */ +public class WorkspacePatchInfoManagedVirtualNetworkSettings { + /** + * Prevent Data Exfiltration. + */ + @JsonProperty(value = "preventDataExfiltration") + private Boolean preventDataExfiltration; + + /** + * Linked Access Check On Target Resource. + */ + @JsonProperty(value = "linkedAccessCheckOnTargetResource") + private Boolean linkedAccessCheckOnTargetResource; + + /** + * Allowed Aad Tenant Ids For Linking. + */ + @JsonProperty(value = "allowedAadTenantIdsForLinking") + private List allowedAadTenantIdsForLinking; + + /** + * Get prevent Data Exfiltration. + * + * @return the preventDataExfiltration value + */ + public Boolean preventDataExfiltration() { + return this.preventDataExfiltration; + } + + /** + * Set prevent Data Exfiltration. + * + * @param preventDataExfiltration the preventDataExfiltration value to set + * @return the WorkspacePatchInfoManagedVirtualNetworkSettings object itself. + */ + public WorkspacePatchInfoManagedVirtualNetworkSettings withPreventDataExfiltration(Boolean preventDataExfiltration) { + this.preventDataExfiltration = preventDataExfiltration; + return this; + } + + /** + * Get linked Access Check On Target Resource. + * + * @return the linkedAccessCheckOnTargetResource value + */ + public Boolean linkedAccessCheckOnTargetResource() { + return this.linkedAccessCheckOnTargetResource; + } + + /** + * Set linked Access Check On Target Resource. + * + * @param linkedAccessCheckOnTargetResource the linkedAccessCheckOnTargetResource value to set + * @return the WorkspacePatchInfoManagedVirtualNetworkSettings object itself. + */ + public WorkspacePatchInfoManagedVirtualNetworkSettings withLinkedAccessCheckOnTargetResource(Boolean linkedAccessCheckOnTargetResource) { + this.linkedAccessCheckOnTargetResource = linkedAccessCheckOnTargetResource; + return this; + } + + /** + * Get allowed Aad Tenant Ids For Linking. + * + * @return the allowedAadTenantIdsForLinking value + */ + public List allowedAadTenantIdsForLinking() { + return this.allowedAadTenantIdsForLinking; + } + + /** + * Set allowed Aad Tenant Ids For Linking. + * + * @param allowedAadTenantIdsForLinking the allowedAadTenantIdsForLinking value to set + * @return the WorkspacePatchInfoManagedVirtualNetworkSettings object itself. + */ + public WorkspacePatchInfoManagedVirtualNetworkSettings withAllowedAadTenantIdsForLinking(List allowedAadTenantIdsForLinking) { + this.allowedAadTenantIdsForLinking = allowedAadTenantIdsForLinking; + return this; + } + +} diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/BigDataPoolResourceInfoImpl.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/BigDataPoolResourceInfoImpl.java index 25d7df094440b..bb1157e5b36d4 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/BigDataPoolResourceInfoImpl.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/BigDataPoolResourceInfoImpl.java @@ -16,6 +16,8 @@ import org.joda.time.DateTime; import com.microsoft.azure.management.synapse.v2019_06_01_preview.AutoPauseProperties; import com.microsoft.azure.management.synapse.v2019_06_01_preview.LibraryRequirements; +import java.util.List; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.LibraryInfo; import com.microsoft.azure.management.synapse.v2019_06_01_preview.NodeSize; import com.microsoft.azure.management.synapse.v2019_06_01_preview.NodeSizeFamily; @@ -93,6 +95,11 @@ public DateTime creationDate() { return this.inner().creationDate(); } + @Override + public List customLibraries() { + return this.inner().customLibraries(); + } + @Override public String defaultSparkLogFolder() { return this.inner().defaultSparkLogFolder(); @@ -143,6 +150,16 @@ public String provisioningState() { return this.inner().provisioningState(); } + @Override + public Boolean sessionLevelPackagesEnabled() { + return this.inner().sessionLevelPackagesEnabled(); + } + + @Override + public LibraryRequirements sparkConfigProperties() { + return this.inner().sparkConfigProperties(); + } + @Override public String sparkEventsFolder() { return this.inner().sparkEventsFolder(); @@ -204,6 +221,12 @@ public BigDataPoolResourceInfoImpl withCreationDate(DateTime creationDate) { return this; } + @Override + public BigDataPoolResourceInfoImpl withCustomLibraries(List customLibraries) { + this.inner().withCustomLibraries(customLibraries); + return this; + } + @Override public BigDataPoolResourceInfoImpl withDefaultSparkLogFolder(String defaultSparkLogFolder) { this.inner().withDefaultSparkLogFolder(defaultSparkLogFolder); @@ -246,6 +269,18 @@ public BigDataPoolResourceInfoImpl withProvisioningState(String provisioningStat return this; } + @Override + public BigDataPoolResourceInfoImpl withSessionLevelPackagesEnabled(Boolean sessionLevelPackagesEnabled) { + this.inner().withSessionLevelPackagesEnabled(sessionLevelPackagesEnabled); + return this; + } + + @Override + public BigDataPoolResourceInfoImpl withSparkConfigProperties(LibraryRequirements sparkConfigProperties) { + this.inner().withSparkConfigProperties(sparkConfigProperties); + return this; + } + @Override public BigDataPoolResourceInfoImpl withSparkEventsFolder(String sparkEventsFolder) { this.inner().withSparkEventsFolder(sparkEventsFolder); diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/BigDataPoolResourceInfoInner.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/BigDataPoolResourceInfoInner.java index cb2304be4b50b..16dd827f4f403 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/BigDataPoolResourceInfoInner.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/BigDataPoolResourceInfoInner.java @@ -12,6 +12,8 @@ import org.joda.time.DateTime; import com.microsoft.azure.management.synapse.v2019_06_01_preview.AutoPauseProperties; import com.microsoft.azure.management.synapse.v2019_06_01_preview.LibraryRequirements; +import java.util.List; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.LibraryInfo; import com.microsoft.azure.management.synapse.v2019_06_01_preview.NodeSize; import com.microsoft.azure.management.synapse.v2019_06_01_preview.NodeSizeFamily; import com.fasterxml.jackson.annotation.JsonProperty; @@ -54,6 +56,12 @@ public class BigDataPoolResourceInfoInner extends Resource { @JsonProperty(value = "properties.isComputeIsolationEnabled") private Boolean isComputeIsolationEnabled; + /** + * Whether session level library/package management is enabled or not. + */ + @JsonProperty(value = "properties.sessionLevelPackagesEnabled") + private Boolean sessionLevelPackagesEnabled; + /** * The Spark events folder. */ @@ -72,6 +80,18 @@ public class BigDataPoolResourceInfoInner extends Resource { @JsonProperty(value = "properties.libraryRequirements") private LibraryRequirements libraryRequirements; + /** + * List of custom libraries/packages associated with the spark pool. + */ + @JsonProperty(value = "properties.customLibraries") + private List customLibraries; + + /** + * Spark configuration file to specify additional properties. + */ + @JsonProperty(value = "properties.sparkConfigProperties") + private LibraryRequirements sparkConfigProperties; + /** * The Apache Spark version. */ @@ -87,7 +107,7 @@ public class BigDataPoolResourceInfoInner extends Resource { /** * The level of compute power that each node in the Big Data pool has. * Possible values include: 'None', 'Small', 'Medium', 'Large', 'XLarge', - * 'XXLarge'. + * 'XXLarge', 'XXXLarge'. */ @JsonProperty(value = "properties.nodeSize") private NodeSize nodeSize; @@ -199,6 +219,26 @@ public BigDataPoolResourceInfoInner withIsComputeIsolationEnabled(Boolean isComp return this; } + /** + * Get whether session level library/package management is enabled or not. + * + * @return the sessionLevelPackagesEnabled value + */ + public Boolean sessionLevelPackagesEnabled() { + return this.sessionLevelPackagesEnabled; + } + + /** + * Set whether session level library/package management is enabled or not. + * + * @param sessionLevelPackagesEnabled the sessionLevelPackagesEnabled value to set + * @return the BigDataPoolResourceInfoInner object itself. + */ + public BigDataPoolResourceInfoInner withSessionLevelPackagesEnabled(Boolean sessionLevelPackagesEnabled) { + this.sessionLevelPackagesEnabled = sessionLevelPackagesEnabled; + return this; + } + /** * Get the Spark events folder. * @@ -259,6 +299,46 @@ public BigDataPoolResourceInfoInner withLibraryRequirements(LibraryRequirements return this; } + /** + * Get list of custom libraries/packages associated with the spark pool. + * + * @return the customLibraries value + */ + public List customLibraries() { + return this.customLibraries; + } + + /** + * Set list of custom libraries/packages associated with the spark pool. + * + * @param customLibraries the customLibraries value to set + * @return the BigDataPoolResourceInfoInner object itself. + */ + public BigDataPoolResourceInfoInner withCustomLibraries(List customLibraries) { + this.customLibraries = customLibraries; + return this; + } + + /** + * Get spark configuration file to specify additional properties. + * + * @return the sparkConfigProperties value + */ + public LibraryRequirements sparkConfigProperties() { + return this.sparkConfigProperties; + } + + /** + * Set spark configuration file to specify additional properties. + * + * @param sparkConfigProperties the sparkConfigProperties value to set + * @return the BigDataPoolResourceInfoInner object itself. + */ + public BigDataPoolResourceInfoInner withSparkConfigProperties(LibraryRequirements sparkConfigProperties) { + this.sparkConfigProperties = sparkConfigProperties; + return this; + } + /** * Get the Apache Spark version. * @@ -300,7 +380,7 @@ public BigDataPoolResourceInfoInner withDefaultSparkLogFolder(String defaultSpar } /** - * Get the level of compute power that each node in the Big Data pool has. Possible values include: 'None', 'Small', 'Medium', 'Large', 'XLarge', 'XXLarge'. + * Get the level of compute power that each node in the Big Data pool has. Possible values include: 'None', 'Small', 'Medium', 'Large', 'XLarge', 'XXLarge', 'XXXLarge'. * * @return the nodeSize value */ @@ -309,7 +389,7 @@ public NodeSize nodeSize() { } /** - * Set the level of compute power that each node in the Big Data pool has. Possible values include: 'None', 'Small', 'Medium', 'Large', 'XLarge', 'XXLarge'. + * Set the level of compute power that each node in the Big Data pool has. Possible values include: 'None', 'Small', 'Medium', 'Large', 'XLarge', 'XXLarge', 'XXXLarge'. * * @param nodeSize the nodeSize value to set * @return the BigDataPoolResourceInfoInner object itself. diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/BigDataPoolsInner.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/BigDataPoolsInner.java index d3aa835fdc10a..ec265475d13dd 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/BigDataPoolsInner.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/BigDataPoolsInner.java @@ -14,6 +14,7 @@ import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.management.synapse.v2019_06_01_preview.BigDataPoolPatchInfo; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.ErrorContractInnerException; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/DataMaskingPoliciesImpl.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/DataMaskingPoliciesImpl.java new file mode 100644 index 0000000000000..75102c3fb46b8 --- /dev/null +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/DataMaskingPoliciesImpl.java @@ -0,0 +1,59 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.synapse.v2019_06_01_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.DataMaskingPolicies; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.DataMaskingPolicy; + +class DataMaskingPoliciesImpl extends WrapperImpl implements DataMaskingPolicies { + private final SynapseManager manager; + + DataMaskingPoliciesImpl(SynapseManager manager) { + super(manager.inner().dataMaskingPolicies()); + this.manager = manager; + } + + public SynapseManager manager() { + return this.manager; + } + + @Override + public DataMaskingPolicyImpl define(String name) { + return wrapModel(name); + } + + private DataMaskingPolicyImpl wrapModel(DataMaskingPolicyInner inner) { + return new DataMaskingPolicyImpl(inner, manager()); + } + + private DataMaskingPolicyImpl wrapModel(String name) { + return new DataMaskingPolicyImpl(name, this.manager()); + } + + @Override + public Observable getAsync(String resourceGroupName, String workspaceName, String sqlPoolName) { + DataMaskingPoliciesInner client = this.inner(); + return client.getAsync(resourceGroupName, workspaceName, sqlPoolName) + .flatMap(new Func1>() { + @Override + public Observable call(DataMaskingPolicyInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((DataMaskingPolicy)wrapModel(inner)); + } + } + }); + } + +} diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/DataMaskingPoliciesInner.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/DataMaskingPoliciesInner.java new file mode 100644 index 0000000000000..4f7dfd016c3a9 --- /dev/null +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/DataMaskingPoliciesInner.java @@ -0,0 +1,263 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.synapse.v2019_06_01_preview.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in DataMaskingPolicies. + */ +public class DataMaskingPoliciesInner { + /** The Retrofit service to perform REST calls. */ + private DataMaskingPoliciesService service; + /** The service client containing this operation class. */ + private SynapseManagementClientImpl client; + + /** + * Initializes an instance of DataMaskingPoliciesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public DataMaskingPoliciesInner(Retrofit retrofit, SynapseManagementClientImpl client) { + this.service = retrofit.create(DataMaskingPoliciesService.class); + this.client = client; + } + + /** + * The interface defining all the services for DataMaskingPolicies to be + * used by Retrofit to perform actually REST calls. + */ + interface DataMaskingPoliciesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.synapse.v2019_06_01_preview.DataMaskingPolicies createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/dataMaskingPolicies/{dataMaskingPolicyName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("sqlPoolName") String sqlPoolName, @Path("dataMaskingPolicyName") String dataMaskingPolicyName, @Query("api-version") String apiVersion, @Body DataMaskingPolicyInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.synapse.v2019_06_01_preview.DataMaskingPolicies get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/dataMaskingPolicies/{dataMaskingPolicyName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("sqlPoolName") String sqlPoolName, @Path("dataMaskingPolicyName") String dataMaskingPolicyName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Creates or updates a Sql pool data masking policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param parameters Parameters for creating or updating a data masking policy. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DataMaskingPolicyInner object if successful. + */ + public DataMaskingPolicyInner createOrUpdate(String resourceGroupName, String workspaceName, String sqlPoolName, DataMaskingPolicyInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, sqlPoolName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates a Sql pool data masking policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param parameters Parameters for creating or updating a data masking policy. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String workspaceName, String sqlPoolName, DataMaskingPolicyInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, sqlPoolName, parameters), serviceCallback); + } + + /** + * Creates or updates a Sql pool data masking policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param parameters Parameters for creating or updating a data masking policy. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataMaskingPolicyInner object + */ + public Observable createOrUpdateAsync(String resourceGroupName, String workspaceName, String sqlPoolName, DataMaskingPolicyInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, sqlPoolName, parameters).map(new Func1, DataMaskingPolicyInner>() { + @Override + public DataMaskingPolicyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a Sql pool data masking policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param parameters Parameters for creating or updating a data masking policy. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataMaskingPolicyInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String workspaceName, String sqlPoolName, DataMaskingPolicyInner parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (sqlPoolName == null) { + throw new IllegalArgumentException("Parameter sqlPoolName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String dataMaskingPolicyName = "Default"; + return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, workspaceName, sqlPoolName, dataMaskingPolicyName, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a Sql pool data masking policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DataMaskingPolicyInner object if successful. + */ + public DataMaskingPolicyInner get(String resourceGroupName, String workspaceName, String sqlPoolName) { + return getWithServiceResponseAsync(resourceGroupName, workspaceName, sqlPoolName).toBlocking().single().body(); + } + + /** + * Gets a Sql pool data masking policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String workspaceName, String sqlPoolName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, workspaceName, sqlPoolName), serviceCallback); + } + + /** + * Gets a Sql pool data masking policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataMaskingPolicyInner object + */ + public Observable getAsync(String resourceGroupName, String workspaceName, String sqlPoolName) { + return getWithServiceResponseAsync(resourceGroupName, workspaceName, sqlPoolName).map(new Func1, DataMaskingPolicyInner>() { + @Override + public DataMaskingPolicyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a Sql pool data masking policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataMaskingPolicyInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String workspaceName, String sqlPoolName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (sqlPoolName == null) { + throw new IllegalArgumentException("Parameter sqlPoolName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String dataMaskingPolicyName = "Default"; + return service.get(this.client.subscriptionId(), resourceGroupName, workspaceName, sqlPoolName, dataMaskingPolicyName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/DataMaskingPolicyImpl.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/DataMaskingPolicyImpl.java new file mode 100644 index 0000000000000..624a00aed06fb --- /dev/null +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/DataMaskingPolicyImpl.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.synapse.v2019_06_01_preview.implementation; + +import com.microsoft.azure.management.synapse.v2019_06_01_preview.DataMaskingPolicy; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.DataMaskingState; + +class DataMaskingPolicyImpl extends CreatableUpdatableImpl implements DataMaskingPolicy, DataMaskingPolicy.Definition, DataMaskingPolicy.Update { + private final SynapseManager manager; + private String resourceGroupName; + private String workspaceName; + private String sqlPoolName; + + DataMaskingPolicyImpl(String name, SynapseManager manager) { + super(name, new DataMaskingPolicyInner()); + this.manager = manager; + // Set resource name + this.sqlPoolName = name; + // + } + + DataMaskingPolicyImpl(DataMaskingPolicyInner inner, SynapseManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.sqlPoolName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.workspaceName = IdParsingUtils.getValueFromIdByName(inner.id(), "workspaces"); + this.sqlPoolName = IdParsingUtils.getValueFromIdByName(inner.id(), "sqlPools"); + // + } + + @Override + public SynapseManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + DataMaskingPoliciesInner client = this.manager().inner().dataMaskingPolicies(); + return client.createOrUpdateAsync(this.resourceGroupName, this.workspaceName, this.sqlPoolName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + DataMaskingPoliciesInner client = this.manager().inner().dataMaskingPolicies(); + return client.createOrUpdateAsync(this.resourceGroupName, this.workspaceName, this.sqlPoolName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + DataMaskingPoliciesInner client = this.manager().inner().dataMaskingPolicies(); + return client.getAsync(this.resourceGroupName, this.workspaceName, this.sqlPoolName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String applicationPrincipals() { + return this.inner().applicationPrincipals(); + } + + @Override + public DataMaskingState dataMaskingState() { + return this.inner().dataMaskingState(); + } + + @Override + public String exemptPrincipals() { + return this.inner().exemptPrincipals(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public String maskingLevel() { + return this.inner().maskingLevel(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public DataMaskingPolicyImpl withExistingSqlPool(String resourceGroupName, String workspaceName, String sqlPoolName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + this.sqlPoolName = sqlPoolName; + return this; + } + + @Override + public DataMaskingPolicyImpl withDataMaskingState(DataMaskingState dataMaskingState) { + this.inner().withDataMaskingState(dataMaskingState); + return this; + } + + @Override + public DataMaskingPolicyImpl withExemptPrincipals(String exemptPrincipals) { + this.inner().withExemptPrincipals(exemptPrincipals); + return this; + } + +} diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/DataMaskingPolicyInner.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/DataMaskingPolicyInner.java new file mode 100644 index 0000000000000..21c1a3420e62a --- /dev/null +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/DataMaskingPolicyInner.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.synapse.v2019_06_01_preview.implementation; + +import com.microsoft.azure.management.synapse.v2019_06_01_preview.DataMaskingState; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * Represents a database data masking policy. + */ +@JsonFlatten +public class DataMaskingPolicyInner extends ProxyResource { + /** + * The state of the data masking policy. Possible values include: + * 'Disabled', 'Enabled'. + */ + @JsonProperty(value = "properties.dataMaskingState", required = true) + private DataMaskingState dataMaskingState; + + /** + * The list of the exempt principals. Specifies the semicolon-separated + * list of database users for which the data masking policy does not apply. + * The specified users receive data results without masking for all of the + * database queries. + */ + @JsonProperty(value = "properties.exemptPrincipals") + private String exemptPrincipals; + + /** + * The list of the application principals. This is a legacy parameter and + * is no longer used. + */ + @JsonProperty(value = "properties.applicationPrincipals", access = JsonProperty.Access.WRITE_ONLY) + private String applicationPrincipals; + + /** + * The masking level. This is a legacy parameter and is no longer used. + */ + @JsonProperty(value = "properties.maskingLevel", access = JsonProperty.Access.WRITE_ONLY) + private String maskingLevel; + + /** + * The location of the data masking policy. + */ + @JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY) + private String location; + + /** + * The kind of data masking policy. Metadata, used for Azure portal. + */ + @JsonProperty(value = "kind", access = JsonProperty.Access.WRITE_ONLY) + private String kind; + + /** + * Get the state of the data masking policy. Possible values include: 'Disabled', 'Enabled'. + * + * @return the dataMaskingState value + */ + public DataMaskingState dataMaskingState() { + return this.dataMaskingState; + } + + /** + * Set the state of the data masking policy. Possible values include: 'Disabled', 'Enabled'. + * + * @param dataMaskingState the dataMaskingState value to set + * @return the DataMaskingPolicyInner object itself. + */ + public DataMaskingPolicyInner withDataMaskingState(DataMaskingState dataMaskingState) { + this.dataMaskingState = dataMaskingState; + return this; + } + + /** + * Get the list of the exempt principals. Specifies the semicolon-separated list of database users for which the data masking policy does not apply. The specified users receive data results without masking for all of the database queries. + * + * @return the exemptPrincipals value + */ + public String exemptPrincipals() { + return this.exemptPrincipals; + } + + /** + * Set the list of the exempt principals. Specifies the semicolon-separated list of database users for which the data masking policy does not apply. The specified users receive data results without masking for all of the database queries. + * + * @param exemptPrincipals the exemptPrincipals value to set + * @return the DataMaskingPolicyInner object itself. + */ + public DataMaskingPolicyInner withExemptPrincipals(String exemptPrincipals) { + this.exemptPrincipals = exemptPrincipals; + return this; + } + + /** + * Get the list of the application principals. This is a legacy parameter and is no longer used. + * + * @return the applicationPrincipals value + */ + public String applicationPrincipals() { + return this.applicationPrincipals; + } + + /** + * Get the masking level. This is a legacy parameter and is no longer used. + * + * @return the maskingLevel value + */ + public String maskingLevel() { + return this.maskingLevel; + } + + /** + * Get the location of the data masking policy. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Get the kind of data masking policy. Metadata, used for Azure portal. + * + * @return the kind value + */ + public String kind() { + return this.kind; + } + +} diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/DataMaskingRuleImpl.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/DataMaskingRuleImpl.java new file mode 100644 index 0000000000000..cb18e69218b06 --- /dev/null +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/DataMaskingRuleImpl.java @@ -0,0 +1,235 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.synapse.v2019_06_01_preview.implementation; + +import com.microsoft.azure.management.synapse.v2019_06_01_preview.DataMaskingRule; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.DataMaskingRuleState; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.DataMaskingFunction; + +class DataMaskingRuleImpl extends CreatableUpdatableImpl implements DataMaskingRule, DataMaskingRule.Definition, DataMaskingRule.Update { + private final SynapseManager manager; + private String resourceGroupName; + private String workspaceName; + private String sqlPoolName; + private String dataMaskingRuleName; + + DataMaskingRuleImpl(String name, SynapseManager manager) { + super(name, new DataMaskingRuleInner()); + this.manager = manager; + // Set resource name + this.dataMaskingRuleName = name; + // + } + + DataMaskingRuleImpl(DataMaskingRuleInner inner, SynapseManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.dataMaskingRuleName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.workspaceName = IdParsingUtils.getValueFromIdByName(inner.id(), "workspaces"); + this.sqlPoolName = IdParsingUtils.getValueFromIdByName(inner.id(), "sqlPools"); + this.dataMaskingRuleName = IdParsingUtils.getValueFromIdByName(inner.id(), "rules"); + // + } + + @Override + public SynapseManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + DataMaskingRulesInner client = this.manager().inner().dataMaskingRules(); + return client.createOrUpdateAsync(this.resourceGroupName, this.workspaceName, this.sqlPoolName, this.dataMaskingRuleName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + DataMaskingRulesInner client = this.manager().inner().dataMaskingRules(); + return client.createOrUpdateAsync(this.resourceGroupName, this.workspaceName, this.sqlPoolName, this.dataMaskingRuleName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + DataMaskingRulesInner client = this.manager().inner().dataMaskingRules(); + return null; // NOP getInnerAsync implementation as get is not supported + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public String aliasName() { + return this.inner().aliasName(); + } + + @Override + public String columnName() { + return this.inner().columnName(); + } + + @Override + public String dataMaskingRuleId() { + return this.inner().dataMaskingRuleId(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String kind() { + return this.inner().kind(); + } + + @Override + public String location() { + return this.inner().location(); + } + + @Override + public DataMaskingFunction maskingFunction() { + return this.inner().maskingFunction(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String numberFrom() { + return this.inner().numberFrom(); + } + + @Override + public String numberTo() { + return this.inner().numberTo(); + } + + @Override + public String prefixSize() { + return this.inner().prefixSize(); + } + + @Override + public String replacementString() { + return this.inner().replacementString(); + } + + @Override + public DataMaskingRuleState ruleState() { + return this.inner().ruleState(); + } + + @Override + public String schemaName() { + return this.inner().schemaName(); + } + + @Override + public String suffixSize() { + return this.inner().suffixSize(); + } + + @Override + public String tableName() { + return this.inner().tableName(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public DataMaskingRuleImpl withExistingDataMaskingPolicy(String resourceGroupName, String workspaceName, String sqlPoolName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + this.sqlPoolName = sqlPoolName; + return this; + } + + @Override + public DataMaskingRuleImpl withColumnName(String columnName) { + this.inner().withColumnName(columnName); + return this; + } + + @Override + public DataMaskingRuleImpl withMaskingFunction(DataMaskingFunction maskingFunction) { + this.inner().withMaskingFunction(maskingFunction); + return this; + } + + @Override + public DataMaskingRuleImpl withSchemaName(String schemaName) { + this.inner().withSchemaName(schemaName); + return this; + } + + @Override + public DataMaskingRuleImpl withTableName(String tableName) { + this.inner().withTableName(tableName); + return this; + } + + @Override + public DataMaskingRuleImpl withAliasName(String aliasName) { + this.inner().withAliasName(aliasName); + return this; + } + + @Override + public DataMaskingRuleImpl withNumberFrom(String numberFrom) { + this.inner().withNumberFrom(numberFrom); + return this; + } + + @Override + public DataMaskingRuleImpl withNumberTo(String numberTo) { + this.inner().withNumberTo(numberTo); + return this; + } + + @Override + public DataMaskingRuleImpl withPrefixSize(String prefixSize) { + this.inner().withPrefixSize(prefixSize); + return this; + } + + @Override + public DataMaskingRuleImpl withReplacementString(String replacementString) { + this.inner().withReplacementString(replacementString); + return this; + } + + @Override + public DataMaskingRuleImpl withRuleState(DataMaskingRuleState ruleState) { + this.inner().withRuleState(ruleState); + return this; + } + + @Override + public DataMaskingRuleImpl withSuffixSize(String suffixSize) { + this.inner().withSuffixSize(suffixSize); + return this; + } + +} diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/DataMaskingRuleInner.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/DataMaskingRuleInner.java new file mode 100644 index 0000000000000..514478245595e --- /dev/null +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/DataMaskingRuleInner.java @@ -0,0 +1,367 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.synapse.v2019_06_01_preview.implementation; + +import com.microsoft.azure.management.synapse.v2019_06_01_preview.DataMaskingRuleState; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.DataMaskingFunction; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * Represents a Sql pool data masking rule. + */ +@JsonFlatten +public class DataMaskingRuleInner extends ProxyResource { + /** + * The rule Id. + */ + @JsonProperty(value = "properties.id", access = JsonProperty.Access.WRITE_ONLY) + private String dataMaskingRuleId; + + /** + * The alias name. This is a legacy parameter and is no longer used. + */ + @JsonProperty(value = "properties.aliasName") + private String aliasName; + + /** + * The rule state. Used to delete a rule. To delete an existing rule, + * specify the schemaName, tableName, columnName, maskingFunction, and + * specify ruleState as disabled. However, if the rule doesn't already + * exist, the rule will be created with ruleState set to enabled, + * regardless of the provided value of ruleState. Possible values include: + * 'Disabled', 'Enabled'. + */ + @JsonProperty(value = "properties.ruleState") + private DataMaskingRuleState ruleState; + + /** + * The schema name on which the data masking rule is applied. + */ + @JsonProperty(value = "properties.schemaName", required = true) + private String schemaName; + + /** + * The table name on which the data masking rule is applied. + */ + @JsonProperty(value = "properties.tableName", required = true) + private String tableName; + + /** + * The column name on which the data masking rule is applied. + */ + @JsonProperty(value = "properties.columnName", required = true) + private String columnName; + + /** + * The masking function that is used for the data masking rule. Possible + * values include: 'Default', 'CCN', 'Email', 'Number', 'SSN', 'Text'. + */ + @JsonProperty(value = "properties.maskingFunction", required = true) + private DataMaskingFunction maskingFunction; + + /** + * The numberFrom property of the masking rule. Required if maskingFunction + * is set to Number, otherwise this parameter will be ignored. + */ + @JsonProperty(value = "properties.numberFrom") + private String numberFrom; + + /** + * The numberTo property of the data masking rule. Required if + * maskingFunction is set to Number, otherwise this parameter will be + * ignored. + */ + @JsonProperty(value = "properties.numberTo") + private String numberTo; + + /** + * If maskingFunction is set to Text, the number of characters to show + * unmasked in the beginning of the string. Otherwise, this parameter will + * be ignored. + */ + @JsonProperty(value = "properties.prefixSize") + private String prefixSize; + + /** + * If maskingFunction is set to Text, the number of characters to show + * unmasked at the end of the string. Otherwise, this parameter will be + * ignored. + */ + @JsonProperty(value = "properties.suffixSize") + private String suffixSize; + + /** + * If maskingFunction is set to Text, the character to use for masking the + * unexposed part of the string. Otherwise, this parameter will be ignored. + */ + @JsonProperty(value = "properties.replacementString") + private String replacementString; + + /** + * The location of the data masking rule. + */ + @JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY) + private String location; + + /** + * The kind of Data Masking Rule. Metadata, used for Azure portal. + */ + @JsonProperty(value = "kind", access = JsonProperty.Access.WRITE_ONLY) + private String kind; + + /** + * Get the rule Id. + * + * @return the dataMaskingRuleId value + */ + public String dataMaskingRuleId() { + return this.dataMaskingRuleId; + } + + /** + * Get the alias name. This is a legacy parameter and is no longer used. + * + * @return the aliasName value + */ + public String aliasName() { + return this.aliasName; + } + + /** + * Set the alias name. This is a legacy parameter and is no longer used. + * + * @param aliasName the aliasName value to set + * @return the DataMaskingRuleInner object itself. + */ + public DataMaskingRuleInner withAliasName(String aliasName) { + this.aliasName = aliasName; + return this; + } + + /** + * Get the rule state. Used to delete a rule. To delete an existing rule, specify the schemaName, tableName, columnName, maskingFunction, and specify ruleState as disabled. However, if the rule doesn't already exist, the rule will be created with ruleState set to enabled, regardless of the provided value of ruleState. Possible values include: 'Disabled', 'Enabled'. + * + * @return the ruleState value + */ + public DataMaskingRuleState ruleState() { + return this.ruleState; + } + + /** + * Set the rule state. Used to delete a rule. To delete an existing rule, specify the schemaName, tableName, columnName, maskingFunction, and specify ruleState as disabled. However, if the rule doesn't already exist, the rule will be created with ruleState set to enabled, regardless of the provided value of ruleState. Possible values include: 'Disabled', 'Enabled'. + * + * @param ruleState the ruleState value to set + * @return the DataMaskingRuleInner object itself. + */ + public DataMaskingRuleInner withRuleState(DataMaskingRuleState ruleState) { + this.ruleState = ruleState; + return this; + } + + /** + * Get the schema name on which the data masking rule is applied. + * + * @return the schemaName value + */ + public String schemaName() { + return this.schemaName; + } + + /** + * Set the schema name on which the data masking rule is applied. + * + * @param schemaName the schemaName value to set + * @return the DataMaskingRuleInner object itself. + */ + public DataMaskingRuleInner withSchemaName(String schemaName) { + this.schemaName = schemaName; + return this; + } + + /** + * Get the table name on which the data masking rule is applied. + * + * @return the tableName value + */ + public String tableName() { + return this.tableName; + } + + /** + * Set the table name on which the data masking rule is applied. + * + * @param tableName the tableName value to set + * @return the DataMaskingRuleInner object itself. + */ + public DataMaskingRuleInner withTableName(String tableName) { + this.tableName = tableName; + return this; + } + + /** + * Get the column name on which the data masking rule is applied. + * + * @return the columnName value + */ + public String columnName() { + return this.columnName; + } + + /** + * Set the column name on which the data masking rule is applied. + * + * @param columnName the columnName value to set + * @return the DataMaskingRuleInner object itself. + */ + public DataMaskingRuleInner withColumnName(String columnName) { + this.columnName = columnName; + return this; + } + + /** + * Get the masking function that is used for the data masking rule. Possible values include: 'Default', 'CCN', 'Email', 'Number', 'SSN', 'Text'. + * + * @return the maskingFunction value + */ + public DataMaskingFunction maskingFunction() { + return this.maskingFunction; + } + + /** + * Set the masking function that is used for the data masking rule. Possible values include: 'Default', 'CCN', 'Email', 'Number', 'SSN', 'Text'. + * + * @param maskingFunction the maskingFunction value to set + * @return the DataMaskingRuleInner object itself. + */ + public DataMaskingRuleInner withMaskingFunction(DataMaskingFunction maskingFunction) { + this.maskingFunction = maskingFunction; + return this; + } + + /** + * Get the numberFrom property of the masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored. + * + * @return the numberFrom value + */ + public String numberFrom() { + return this.numberFrom; + } + + /** + * Set the numberFrom property of the masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored. + * + * @param numberFrom the numberFrom value to set + * @return the DataMaskingRuleInner object itself. + */ + public DataMaskingRuleInner withNumberFrom(String numberFrom) { + this.numberFrom = numberFrom; + return this; + } + + /** + * Get the numberTo property of the data masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored. + * + * @return the numberTo value + */ + public String numberTo() { + return this.numberTo; + } + + /** + * Set the numberTo property of the data masking rule. Required if maskingFunction is set to Number, otherwise this parameter will be ignored. + * + * @param numberTo the numberTo value to set + * @return the DataMaskingRuleInner object itself. + */ + public DataMaskingRuleInner withNumberTo(String numberTo) { + this.numberTo = numberTo; + return this; + } + + /** + * Get if maskingFunction is set to Text, the number of characters to show unmasked in the beginning of the string. Otherwise, this parameter will be ignored. + * + * @return the prefixSize value + */ + public String prefixSize() { + return this.prefixSize; + } + + /** + * Set if maskingFunction is set to Text, the number of characters to show unmasked in the beginning of the string. Otherwise, this parameter will be ignored. + * + * @param prefixSize the prefixSize value to set + * @return the DataMaskingRuleInner object itself. + */ + public DataMaskingRuleInner withPrefixSize(String prefixSize) { + this.prefixSize = prefixSize; + return this; + } + + /** + * Get if maskingFunction is set to Text, the number of characters to show unmasked at the end of the string. Otherwise, this parameter will be ignored. + * + * @return the suffixSize value + */ + public String suffixSize() { + return this.suffixSize; + } + + /** + * Set if maskingFunction is set to Text, the number of characters to show unmasked at the end of the string. Otherwise, this parameter will be ignored. + * + * @param suffixSize the suffixSize value to set + * @return the DataMaskingRuleInner object itself. + */ + public DataMaskingRuleInner withSuffixSize(String suffixSize) { + this.suffixSize = suffixSize; + return this; + } + + /** + * Get if maskingFunction is set to Text, the character to use for masking the unexposed part of the string. Otherwise, this parameter will be ignored. + * + * @return the replacementString value + */ + public String replacementString() { + return this.replacementString; + } + + /** + * Set if maskingFunction is set to Text, the character to use for masking the unexposed part of the string. Otherwise, this parameter will be ignored. + * + * @param replacementString the replacementString value to set + * @return the DataMaskingRuleInner object itself. + */ + public DataMaskingRuleInner withReplacementString(String replacementString) { + this.replacementString = replacementString; + return this; + } + + /** + * Get the location of the data masking rule. + * + * @return the location value + */ + public String location() { + return this.location; + } + + /** + * Get the kind of Data Masking Rule. Metadata, used for Azure portal. + * + * @return the kind value + */ + public String kind() { + return this.kind; + } + +} diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/DataMaskingRulesImpl.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/DataMaskingRulesImpl.java new file mode 100644 index 0000000000000..128f510b81e62 --- /dev/null +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/DataMaskingRulesImpl.java @@ -0,0 +1,62 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.synapse.v2019_06_01_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.DataMaskingRules; +import rx.Observable; +import rx.functions.Func1; +import java.util.List; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.DataMaskingRule; + +class DataMaskingRulesImpl extends WrapperImpl implements DataMaskingRules { + private final SynapseManager manager; + + DataMaskingRulesImpl(SynapseManager manager) { + super(manager.inner().dataMaskingRules()); + this.manager = manager; + } + + public SynapseManager manager() { + return this.manager; + } + + @Override + public DataMaskingRuleImpl define(String name) { + return wrapModel(name); + } + + private DataMaskingRuleImpl wrapModel(DataMaskingRuleInner inner) { + return new DataMaskingRuleImpl(inner, manager()); + } + + private DataMaskingRuleImpl wrapModel(String name) { + return new DataMaskingRuleImpl(name, this.manager()); + } + + @Override + public Observable listBySqlPoolAsync(String resourceGroupName, String workspaceName, String sqlPoolName) { + DataMaskingRulesInner client = this.inner(); + return client.listBySqlPoolAsync(resourceGroupName, workspaceName, sqlPoolName) + .flatMap(new Func1, Observable>() { + @Override + public Observable call(List innerList) { + return Observable.from(innerList); + } + }) + .map(new Func1() { + @Override + public DataMaskingRule call(DataMaskingRuleInner inner) { + return wrapModel(inner); + } + }); + } + +} diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/DataMaskingRulesInner.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/DataMaskingRulesInner.java new file mode 100644 index 0000000000000..384361ba05ecf --- /dev/null +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/DataMaskingRulesInner.java @@ -0,0 +1,277 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.synapse.v2019_06_01_preview.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in DataMaskingRules. + */ +public class DataMaskingRulesInner { + /** The Retrofit service to perform REST calls. */ + private DataMaskingRulesService service; + /** The service client containing this operation class. */ + private SynapseManagementClientImpl client; + + /** + * Initializes an instance of DataMaskingRulesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public DataMaskingRulesInner(Retrofit retrofit, SynapseManagementClientImpl client) { + this.service = retrofit.create(DataMaskingRulesService.class); + this.client = client; + } + + /** + * The interface defining all the services for DataMaskingRules to be + * used by Retrofit to perform actually REST calls. + */ + interface DataMaskingRulesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.synapse.v2019_06_01_preview.DataMaskingRules createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules/{dataMaskingRuleName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("sqlPoolName") String sqlPoolName, @Path("dataMaskingPolicyName") String dataMaskingPolicyName, @Path("dataMaskingRuleName") String dataMaskingRuleName, @Query("api-version") String apiVersion, @Body DataMaskingRuleInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.synapse.v2019_06_01_preview.DataMaskingRules listBySqlPool" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules") + Observable> listBySqlPool(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("sqlPoolName") String sqlPoolName, @Path("dataMaskingPolicyName") String dataMaskingPolicyName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Creates or updates a Sql pool data masking rule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param dataMaskingRuleName The name of the data masking rule. + * @param parameters The required parameters for creating or updating a data masking rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the DataMaskingRuleInner object if successful. + */ + public DataMaskingRuleInner createOrUpdate(String resourceGroupName, String workspaceName, String sqlPoolName, String dataMaskingRuleName, DataMaskingRuleInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, sqlPoolName, dataMaskingRuleName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates a Sql pool data masking rule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param dataMaskingRuleName The name of the data masking rule. + * @param parameters The required parameters for creating or updating a data masking rule. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String workspaceName, String sqlPoolName, String dataMaskingRuleName, DataMaskingRuleInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, sqlPoolName, dataMaskingRuleName, parameters), serviceCallback); + } + + /** + * Creates or updates a Sql pool data masking rule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param dataMaskingRuleName The name of the data masking rule. + * @param parameters The required parameters for creating or updating a data masking rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataMaskingRuleInner object + */ + public Observable createOrUpdateAsync(String resourceGroupName, String workspaceName, String sqlPoolName, String dataMaskingRuleName, DataMaskingRuleInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, sqlPoolName, dataMaskingRuleName, parameters).map(new Func1, DataMaskingRuleInner>() { + @Override + public DataMaskingRuleInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates a Sql pool data masking rule. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param dataMaskingRuleName The name of the data masking rule. + * @param parameters The required parameters for creating or updating a data masking rule. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DataMaskingRuleInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String workspaceName, String sqlPoolName, String dataMaskingRuleName, DataMaskingRuleInner parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (sqlPoolName == null) { + throw new IllegalArgumentException("Parameter sqlPoolName is required and cannot be null."); + } + if (dataMaskingRuleName == null) { + throw new IllegalArgumentException("Parameter dataMaskingRuleName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String dataMaskingPolicyName = "Default"; + return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, workspaceName, sqlPoolName, dataMaskingPolicyName, dataMaskingRuleName, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets a list of Sql pool data masking rules. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<DataMaskingRuleInner> object if successful. + */ + public List listBySqlPool(String resourceGroupName, String workspaceName, String sqlPoolName) { + return listBySqlPoolWithServiceResponseAsync(resourceGroupName, workspaceName, sqlPoolName).toBlocking().single().body(); + } + + /** + * Gets a list of Sql pool data masking rules. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listBySqlPoolAsync(String resourceGroupName, String workspaceName, String sqlPoolName, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(listBySqlPoolWithServiceResponseAsync(resourceGroupName, workspaceName, sqlPoolName), serviceCallback); + } + + /** + * Gets a list of Sql pool data masking rules. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<DataMaskingRuleInner> object + */ + public Observable> listBySqlPoolAsync(String resourceGroupName, String workspaceName, String sqlPoolName) { + return listBySqlPoolWithServiceResponseAsync(resourceGroupName, workspaceName, sqlPoolName).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets a list of Sql pool data masking rules. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<DataMaskingRuleInner> object + */ + public Observable>> listBySqlPoolWithServiceResponseAsync(String resourceGroupName, String workspaceName, String sqlPoolName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (sqlPoolName == null) { + throw new IllegalArgumentException("Parameter sqlPoolName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String dataMaskingPolicyName = "Default"; + return service.listBySqlPool(this.client.subscriptionId(), resourceGroupName, workspaceName, sqlPoolName, dataMaskingPolicyName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listBySqlPoolDelegate(response); + List items = null; + if (result.body() != null) { + items = result.body().items(); + } + ServiceResponse> clientResponse = new ServiceResponse>(items, result.response()); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listBySqlPoolDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/ExtendedSqlPoolBlobAuditingPoliciesImpl.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/ExtendedSqlPoolBlobAuditingPoliciesImpl.java new file mode 100644 index 0000000000000..d6a6f11199d38 --- /dev/null +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/ExtendedSqlPoolBlobAuditingPoliciesImpl.java @@ -0,0 +1,78 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.synapse.v2019_06_01_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.ExtendedSqlPoolBlobAuditingPolicies; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.ExtendedSqlPoolBlobAuditingPolicy; + +class ExtendedSqlPoolBlobAuditingPoliciesImpl extends WrapperImpl implements ExtendedSqlPoolBlobAuditingPolicies { + private final SynapseManager manager; + + ExtendedSqlPoolBlobAuditingPoliciesImpl(SynapseManager manager) { + super(manager.inner().extendedSqlPoolBlobAuditingPolicies()); + this.manager = manager; + } + + public SynapseManager manager() { + return this.manager; + } + + @Override + public ExtendedSqlPoolBlobAuditingPolicyImpl define(String name) { + return wrapModel(name); + } + + private ExtendedSqlPoolBlobAuditingPolicyImpl wrapModel(ExtendedSqlPoolBlobAuditingPolicyInner inner) { + return new ExtendedSqlPoolBlobAuditingPolicyImpl(inner, manager()); + } + + private ExtendedSqlPoolBlobAuditingPolicyImpl wrapModel(String name) { + return new ExtendedSqlPoolBlobAuditingPolicyImpl(name, this.manager()); + } + + @Override + public Observable listBySqlPoolAsync(final String resourceGroupName, final String workspaceName, final String sqlPoolName) { + ExtendedSqlPoolBlobAuditingPoliciesInner client = this.inner(); + return client.listBySqlPoolAsync(resourceGroupName, workspaceName, sqlPoolName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public ExtendedSqlPoolBlobAuditingPolicy call(ExtendedSqlPoolBlobAuditingPolicyInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String workspaceName, String sqlPoolName) { + ExtendedSqlPoolBlobAuditingPoliciesInner client = this.inner(); + return client.getAsync(resourceGroupName, workspaceName, sqlPoolName) + .flatMap(new Func1>() { + @Override + public Observable call(ExtendedSqlPoolBlobAuditingPolicyInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((ExtendedSqlPoolBlobAuditingPolicy)wrapModel(inner)); + } + } + }); + } + +} diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/ExtendedSqlPoolBlobAuditingPoliciesInner.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/ExtendedSqlPoolBlobAuditingPoliciesInner.java new file mode 100644 index 0000000000000..a1331b28c6d05 --- /dev/null +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/ExtendedSqlPoolBlobAuditingPoliciesInner.java @@ -0,0 +1,520 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.synapse.v2019_06_01_preview.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.Body; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.PUT; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in ExtendedSqlPoolBlobAuditingPolicies. + */ +public class ExtendedSqlPoolBlobAuditingPoliciesInner { + /** The Retrofit service to perform REST calls. */ + private ExtendedSqlPoolBlobAuditingPoliciesService service; + /** The service client containing this operation class. */ + private SynapseManagementClientImpl client; + + /** + * Initializes an instance of ExtendedSqlPoolBlobAuditingPoliciesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public ExtendedSqlPoolBlobAuditingPoliciesInner(Retrofit retrofit, SynapseManagementClientImpl client) { + this.service = retrofit.create(ExtendedSqlPoolBlobAuditingPoliciesService.class); + this.client = client; + } + + /** + * The interface defining all the services for ExtendedSqlPoolBlobAuditingPolicies to be + * used by Retrofit to perform actually REST calls. + */ + interface ExtendedSqlPoolBlobAuditingPoliciesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.synapse.v2019_06_01_preview.ExtendedSqlPoolBlobAuditingPolicies get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/extendedAuditingSettings/{blobAuditingPolicyName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("sqlPoolName") String sqlPoolName, @Path("blobAuditingPolicyName") String blobAuditingPolicyName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.synapse.v2019_06_01_preview.ExtendedSqlPoolBlobAuditingPolicies createOrUpdate" }) + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/extendedAuditingSettings/{blobAuditingPolicyName}") + Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("sqlPoolName") String sqlPoolName, @Path("blobAuditingPolicyName") String blobAuditingPolicyName, @Query("api-version") String apiVersion, @Body ExtendedSqlPoolBlobAuditingPolicyInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.synapse.v2019_06_01_preview.ExtendedSqlPoolBlobAuditingPolicies listBySqlPool" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/extendedAuditingSettings") + Observable> listBySqlPool(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("sqlPoolName") String sqlPoolName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.synapse.v2019_06_01_preview.ExtendedSqlPoolBlobAuditingPolicies listBySqlPoolNext" }) + @GET + Observable> listBySqlPoolNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Gets an extended Sql pool's blob auditing policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ExtendedSqlPoolBlobAuditingPolicyInner object if successful. + */ + public ExtendedSqlPoolBlobAuditingPolicyInner get(String resourceGroupName, String workspaceName, String sqlPoolName) { + return getWithServiceResponseAsync(resourceGroupName, workspaceName, sqlPoolName).toBlocking().single().body(); + } + + /** + * Gets an extended Sql pool's blob auditing policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String workspaceName, String sqlPoolName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, workspaceName, sqlPoolName), serviceCallback); + } + + /** + * Gets an extended Sql pool's blob auditing policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExtendedSqlPoolBlobAuditingPolicyInner object + */ + public Observable getAsync(String resourceGroupName, String workspaceName, String sqlPoolName) { + return getWithServiceResponseAsync(resourceGroupName, workspaceName, sqlPoolName).map(new Func1, ExtendedSqlPoolBlobAuditingPolicyInner>() { + @Override + public ExtendedSqlPoolBlobAuditingPolicyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets an extended Sql pool's blob auditing policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExtendedSqlPoolBlobAuditingPolicyInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String workspaceName, String sqlPoolName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (sqlPoolName == null) { + throw new IllegalArgumentException("Parameter sqlPoolName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String blobAuditingPolicyName = "default"; + return service.get(this.client.subscriptionId(), resourceGroupName, workspaceName, sqlPoolName, blobAuditingPolicyName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Creates or updates an extended Sql pool's blob auditing policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param parameters The extended Sql pool blob auditing policy. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the ExtendedSqlPoolBlobAuditingPolicyInner object if successful. + */ + public ExtendedSqlPoolBlobAuditingPolicyInner createOrUpdate(String resourceGroupName, String workspaceName, String sqlPoolName, ExtendedSqlPoolBlobAuditingPolicyInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, sqlPoolName, parameters).toBlocking().single().body(); + } + + /** + * Creates or updates an extended Sql pool's blob auditing policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param parameters The extended Sql pool blob auditing policy. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createOrUpdateAsync(String resourceGroupName, String workspaceName, String sqlPoolName, ExtendedSqlPoolBlobAuditingPolicyInner parameters, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, sqlPoolName, parameters), serviceCallback); + } + + /** + * Creates or updates an extended Sql pool's blob auditing policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param parameters The extended Sql pool blob auditing policy. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExtendedSqlPoolBlobAuditingPolicyInner object + */ + public Observable createOrUpdateAsync(String resourceGroupName, String workspaceName, String sqlPoolName, ExtendedSqlPoolBlobAuditingPolicyInner parameters) { + return createOrUpdateWithServiceResponseAsync(resourceGroupName, workspaceName, sqlPoolName, parameters).map(new Func1, ExtendedSqlPoolBlobAuditingPolicyInner>() { + @Override + public ExtendedSqlPoolBlobAuditingPolicyInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Creates or updates an extended Sql pool's blob auditing policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param parameters The extended Sql pool blob auditing policy. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ExtendedSqlPoolBlobAuditingPolicyInner object + */ + public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String workspaceName, String sqlPoolName, ExtendedSqlPoolBlobAuditingPolicyInner parameters) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (sqlPoolName == null) { + throw new IllegalArgumentException("Parameter sqlPoolName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + if (parameters == null) { + throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); + } + Validator.validate(parameters); + final String blobAuditingPolicyName = "default"; + return service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, workspaceName, sqlPoolName, blobAuditingPolicyName, this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createOrUpdateDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(201, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists extended auditing settings of a Sql pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ExtendedSqlPoolBlobAuditingPolicyInner> object if successful. + */ + public PagedList listBySqlPool(final String resourceGroupName, final String workspaceName, final String sqlPoolName) { + ServiceResponse> response = listBySqlPoolSinglePageAsync(resourceGroupName, workspaceName, sqlPoolName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listBySqlPoolNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists extended auditing settings of a Sql pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listBySqlPoolAsync(final String resourceGroupName, final String workspaceName, final String sqlPoolName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listBySqlPoolSinglePageAsync(resourceGroupName, workspaceName, sqlPoolName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listBySqlPoolNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists extended auditing settings of a Sql pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExtendedSqlPoolBlobAuditingPolicyInner> object + */ + public Observable> listBySqlPoolAsync(final String resourceGroupName, final String workspaceName, final String sqlPoolName) { + return listBySqlPoolWithServiceResponseAsync(resourceGroupName, workspaceName, sqlPoolName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists extended auditing settings of a Sql pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExtendedSqlPoolBlobAuditingPolicyInner> object + */ + public Observable>> listBySqlPoolWithServiceResponseAsync(final String resourceGroupName, final String workspaceName, final String sqlPoolName) { + return listBySqlPoolSinglePageAsync(resourceGroupName, workspaceName, sqlPoolName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listBySqlPoolNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists extended auditing settings of a Sql pool. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. The name is case insensitive. + ServiceResponse> * @param workspaceName The name of the workspace + ServiceResponse> * @param sqlPoolName SQL pool name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ExtendedSqlPoolBlobAuditingPolicyInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listBySqlPoolSinglePageAsync(final String resourceGroupName, final String workspaceName, final String sqlPoolName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (sqlPoolName == null) { + throw new IllegalArgumentException("Parameter sqlPoolName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listBySqlPool(this.client.subscriptionId(), resourceGroupName, workspaceName, sqlPoolName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listBySqlPoolDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listBySqlPoolDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists extended auditing settings of a Sql pool. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<ExtendedSqlPoolBlobAuditingPolicyInner> object if successful. + */ + public PagedList listBySqlPoolNext(final String nextPageLink) { + ServiceResponse> response = listBySqlPoolNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listBySqlPoolNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists extended auditing settings of a Sql pool. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listBySqlPoolNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listBySqlPoolNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listBySqlPoolNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists extended auditing settings of a Sql pool. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExtendedSqlPoolBlobAuditingPolicyInner> object + */ + public Observable> listBySqlPoolNextAsync(final String nextPageLink) { + return listBySqlPoolNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists extended auditing settings of a Sql pool. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<ExtendedSqlPoolBlobAuditingPolicyInner> object + */ + public Observable>> listBySqlPoolNextWithServiceResponseAsync(final String nextPageLink) { + return listBySqlPoolNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listBySqlPoolNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists extended auditing settings of a Sql pool. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<ExtendedSqlPoolBlobAuditingPolicyInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listBySqlPoolNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listBySqlPoolNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listBySqlPoolNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listBySqlPoolNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/ExtendedSqlPoolBlobAuditingPolicyImpl.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/ExtendedSqlPoolBlobAuditingPolicyImpl.java new file mode 100644 index 0000000000000..e25e4303a72f6 --- /dev/null +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/ExtendedSqlPoolBlobAuditingPolicyImpl.java @@ -0,0 +1,208 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.synapse.v2019_06_01_preview.implementation; + +import com.microsoft.azure.management.synapse.v2019_06_01_preview.ExtendedSqlPoolBlobAuditingPolicy; +import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; +import rx.Observable; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.BlobAuditingPolicyState; +import java.util.List; +import java.util.UUID; + +class ExtendedSqlPoolBlobAuditingPolicyImpl extends CreatableUpdatableImpl implements ExtendedSqlPoolBlobAuditingPolicy, ExtendedSqlPoolBlobAuditingPolicy.Definition, ExtendedSqlPoolBlobAuditingPolicy.Update { + private final SynapseManager manager; + private String resourceGroupName; + private String workspaceName; + private String sqlPoolName; + + ExtendedSqlPoolBlobAuditingPolicyImpl(String name, SynapseManager manager) { + super(name, new ExtendedSqlPoolBlobAuditingPolicyInner()); + this.manager = manager; + // Set resource name + this.sqlPoolName = name; + // + } + + ExtendedSqlPoolBlobAuditingPolicyImpl(ExtendedSqlPoolBlobAuditingPolicyInner inner, SynapseManager manager) { + super(inner.name(), inner); + this.manager = manager; + // Set resource name + this.sqlPoolName = inner.name(); + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.workspaceName = IdParsingUtils.getValueFromIdByName(inner.id(), "workspaces"); + this.sqlPoolName = IdParsingUtils.getValueFromIdByName(inner.id(), "sqlPools"); + // + } + + @Override + public SynapseManager manager() { + return this.manager; + } + + @Override + public Observable createResourceAsync() { + ExtendedSqlPoolBlobAuditingPoliciesInner client = this.manager().inner().extendedSqlPoolBlobAuditingPolicies(); + return client.createOrUpdateAsync(this.resourceGroupName, this.workspaceName, this.sqlPoolName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + public Observable updateResourceAsync() { + ExtendedSqlPoolBlobAuditingPoliciesInner client = this.manager().inner().extendedSqlPoolBlobAuditingPolicies(); + return client.createOrUpdateAsync(this.resourceGroupName, this.workspaceName, this.sqlPoolName, this.inner()) + .map(innerToFluentMap(this)); + } + + @Override + protected Observable getInnerAsync() { + ExtendedSqlPoolBlobAuditingPoliciesInner client = this.manager().inner().extendedSqlPoolBlobAuditingPolicies(); + return client.getAsync(this.resourceGroupName, this.workspaceName, this.sqlPoolName); + } + + @Override + public boolean isInCreateMode() { + return this.inner().id() == null; + } + + + @Override + public List auditActionsAndGroups() { + return this.inner().auditActionsAndGroups(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public Boolean isAzureMonitorTargetEnabled() { + return this.inner().isAzureMonitorTargetEnabled(); + } + + @Override + public Boolean isStorageSecondaryKeyInUse() { + return this.inner().isStorageSecondaryKeyInUse(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String predicateExpression() { + return this.inner().predicateExpression(); + } + + @Override + public Integer queueDelayMs() { + return this.inner().queueDelayMs(); + } + + @Override + public Integer retentionDays() { + return this.inner().retentionDays(); + } + + @Override + public BlobAuditingPolicyState state() { + return this.inner().state(); + } + + @Override + public String storageAccountAccessKey() { + return this.inner().storageAccountAccessKey(); + } + + @Override + public UUID storageAccountSubscriptionId() { + return this.inner().storageAccountSubscriptionId(); + } + + @Override + public String storageEndpoint() { + return this.inner().storageEndpoint(); + } + + @Override + public String type() { + return this.inner().type(); + } + + @Override + public ExtendedSqlPoolBlobAuditingPolicyImpl withExistingSqlPool(String resourceGroupName, String workspaceName, String sqlPoolName) { + this.resourceGroupName = resourceGroupName; + this.workspaceName = workspaceName; + this.sqlPoolName = sqlPoolName; + return this; + } + + @Override + public ExtendedSqlPoolBlobAuditingPolicyImpl withState(BlobAuditingPolicyState state) { + this.inner().withState(state); + return this; + } + + @Override + public ExtendedSqlPoolBlobAuditingPolicyImpl withAuditActionsAndGroups(List auditActionsAndGroups) { + this.inner().withAuditActionsAndGroups(auditActionsAndGroups); + return this; + } + + @Override + public ExtendedSqlPoolBlobAuditingPolicyImpl withIsAzureMonitorTargetEnabled(Boolean isAzureMonitorTargetEnabled) { + this.inner().withIsAzureMonitorTargetEnabled(isAzureMonitorTargetEnabled); + return this; + } + + @Override + public ExtendedSqlPoolBlobAuditingPolicyImpl withIsStorageSecondaryKeyInUse(Boolean isStorageSecondaryKeyInUse) { + this.inner().withIsStorageSecondaryKeyInUse(isStorageSecondaryKeyInUse); + return this; + } + + @Override + public ExtendedSqlPoolBlobAuditingPolicyImpl withPredicateExpression(String predicateExpression) { + this.inner().withPredicateExpression(predicateExpression); + return this; + } + + @Override + public ExtendedSqlPoolBlobAuditingPolicyImpl withQueueDelayMs(Integer queueDelayMs) { + this.inner().withQueueDelayMs(queueDelayMs); + return this; + } + + @Override + public ExtendedSqlPoolBlobAuditingPolicyImpl withRetentionDays(Integer retentionDays) { + this.inner().withRetentionDays(retentionDays); + return this; + } + + @Override + public ExtendedSqlPoolBlobAuditingPolicyImpl withStorageAccountAccessKey(String storageAccountAccessKey) { + this.inner().withStorageAccountAccessKey(storageAccountAccessKey); + return this; + } + + @Override + public ExtendedSqlPoolBlobAuditingPolicyImpl withStorageAccountSubscriptionId(UUID storageAccountSubscriptionId) { + this.inner().withStorageAccountSubscriptionId(storageAccountSubscriptionId); + return this; + } + + @Override + public ExtendedSqlPoolBlobAuditingPolicyImpl withStorageEndpoint(String storageEndpoint) { + this.inner().withStorageEndpoint(storageEndpoint); + return this; + } + +} diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/ExtendedSqlPoolBlobAuditingPolicyInner.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/ExtendedSqlPoolBlobAuditingPolicyInner.java new file mode 100644 index 0000000000000..ce1de50e87b6d --- /dev/null +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/ExtendedSqlPoolBlobAuditingPolicyInner.java @@ -0,0 +1,503 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.synapse.v2019_06_01_preview.implementation; + +import com.microsoft.azure.management.synapse.v2019_06_01_preview.BlobAuditingPolicyState; +import java.util.List; +import java.util.UUID; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; +import com.microsoft.azure.ProxyResource; + +/** + * An extended Sql pool blob auditing policy. + */ +@JsonFlatten +public class ExtendedSqlPoolBlobAuditingPolicyInner extends ProxyResource { + /** + * Specifies condition of where clause when creating an audit. + */ + @JsonProperty(value = "properties.predicateExpression") + private String predicateExpression; + + /** + * Specifies the state of the policy. If state is Enabled, storageEndpoint + * or isAzureMonitorTargetEnabled are required. Possible values include: + * 'Enabled', 'Disabled'. + */ + @JsonProperty(value = "properties.state", required = true) + private BlobAuditingPolicyState state; + + /** + * Specifies the blob storage endpoint (e.g. + * https://MyAccount.blob.core.windows.net). If state is Enabled, + * storageEndpoint or isAzureMonitorTargetEnabled is required. + */ + @JsonProperty(value = "properties.storageEndpoint") + private String storageEndpoint; + + /** + * Specifies the identifier key of the auditing storage account. + * If state is Enabled and storageEndpoint is specified, not specifying the + * storageAccountAccessKey will use SQL server system-assigned managed + * identity to access the storage. + * Prerequisites for using managed identity authentication: + * 1. Assign SQL Server a system-assigned managed identity in Azure Active + * Directory (AAD). + * 2. Grant SQL Server identity access to the storage account by adding + * 'Storage Blob Data Contributor' RBAC role to the server identity. + * For more information, see [Auditing to storage using Managed Identity + * authentication](https://go.microsoft.com/fwlink/?linkid=2114355). + */ + @JsonProperty(value = "properties.storageAccountAccessKey") + private String storageAccountAccessKey; + + /** + * Specifies the number of days to keep in the audit logs in the storage + * account. + */ + @JsonProperty(value = "properties.retentionDays") + private Integer retentionDays; + + /** + * Specifies the Actions-Groups and Actions to audit. + * + * The recommended set of action groups to use is the following combination + * - this will audit all the queries and stored procedures executed against + * the database, as well as successful and failed logins: + * + * BATCH_COMPLETED_GROUP, + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + * FAILED_DATABASE_AUTHENTICATION_GROUP. + * + * This above combination is also the set that is configured by default + * when enabling auditing from the Azure portal. + * + * The supported action groups to audit are (note: choose only specific + * groups that cover your auditing needs. Using unnecessary groups could + * lead to very large quantities of audit records): + * + * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + * BACKUP_RESTORE_GROUP + * DATABASE_LOGOUT_GROUP + * DATABASE_OBJECT_CHANGE_GROUP + * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + * DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + * DATABASE_OPERATION_GROUP + * DATABASE_PERMISSION_CHANGE_GROUP + * DATABASE_PRINCIPAL_CHANGE_GROUP + * DATABASE_PRINCIPAL_IMPERSONATION_GROUP + * DATABASE_ROLE_MEMBER_CHANGE_GROUP + * FAILED_DATABASE_AUTHENTICATION_GROUP + * SCHEMA_OBJECT_ACCESS_GROUP + * SCHEMA_OBJECT_CHANGE_GROUP + * SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + * SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + * USER_CHANGE_PASSWORD_GROUP + * BATCH_STARTED_GROUP + * BATCH_COMPLETED_GROUP + * + * These are groups that cover all sql statements and stored procedures + * executed against the database, and should not be used in combination + * with other groups as this will result in duplicate audit logs. + * + * For more information, see [Database-Level Audit Action + * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + * + * For Database auditing policy, specific Actions can also be specified + * (note that Actions cannot be specified for Server auditing policy). The + * supported actions to audit are: + * SELECT + * UPDATE + * INSERT + * DELETE + * EXECUTE + * RECEIVE + * REFERENCES + * + * The general form for defining an action to be audited is: + * {action} ON {object} BY {principal} + * + * Note that <object> in the above format can refer to an object like + * a table, view, or stored procedure, or an entire database or schema. For + * the latter cases, the forms DATABASE::{db_name} and + * SCHEMA::{schema_name} are used, respectively. + * + * For example: + * SELECT on dbo.myTable by public + * SELECT on DATABASE::myDatabase by public + * SELECT on SCHEMA::mySchema by public + * + * For more information, see [Database-Level Audit + * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions). + */ + @JsonProperty(value = "properties.auditActionsAndGroups") + private List auditActionsAndGroups; + + /** + * Specifies the blob storage subscription Id. + */ + @JsonProperty(value = "properties.storageAccountSubscriptionId") + private UUID storageAccountSubscriptionId; + + /** + * Specifies whether storageAccountAccessKey value is the storage's + * secondary key. + */ + @JsonProperty(value = "properties.isStorageSecondaryKeyInUse") + private Boolean isStorageSecondaryKeyInUse; + + /** + * Specifies whether audit events are sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'state' as + * 'Enabled' and 'isAzureMonitorTargetEnabled' as true. + * + * When using REST API to configure auditing, Diagnostic Settings with + * 'SQLSecurityAuditEvents' diagnostic logs category on the database should + * be also created. + * Note that for server level audit you should use the 'master' database as + * {databaseName}. + * + * Diagnostic Settings URI format: + * PUT + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + * + * For more information, see [Diagnostic Settings REST + * API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings + * PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). + */ + @JsonProperty(value = "properties.isAzureMonitorTargetEnabled") + private Boolean isAzureMonitorTargetEnabled; + + /** + * Specifies the amount of time in milliseconds that can elapse before + * audit actions are forced to be processed. + * The default minimum value is 1000 (1 second). The maximum is + * 2,147,483,647. + */ + @JsonProperty(value = "properties.queueDelayMs") + private Integer queueDelayMs; + + /** + * Get specifies condition of where clause when creating an audit. + * + * @return the predicateExpression value + */ + public String predicateExpression() { + return this.predicateExpression; + } + + /** + * Set specifies condition of where clause when creating an audit. + * + * @param predicateExpression the predicateExpression value to set + * @return the ExtendedSqlPoolBlobAuditingPolicyInner object itself. + */ + public ExtendedSqlPoolBlobAuditingPolicyInner withPredicateExpression(String predicateExpression) { + this.predicateExpression = predicateExpression; + return this; + } + + /** + * Get specifies the state of the policy. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. Possible values include: 'Enabled', 'Disabled'. + * + * @return the state value + */ + public BlobAuditingPolicyState state() { + return this.state; + } + + /** + * Set specifies the state of the policy. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. Possible values include: 'Enabled', 'Disabled'. + * + * @param state the state value to set + * @return the ExtendedSqlPoolBlobAuditingPolicyInner object itself. + */ + public ExtendedSqlPoolBlobAuditingPolicyInner withState(BlobAuditingPolicyState state) { + this.state = state; + return this; + } + + /** + * Get specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required. + * + * @return the storageEndpoint value + */ + public String storageEndpoint() { + return this.storageEndpoint; + } + + /** + * Set specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required. + * + * @param storageEndpoint the storageEndpoint value to set + * @return the ExtendedSqlPoolBlobAuditingPolicyInner object itself. + */ + public ExtendedSqlPoolBlobAuditingPolicyInner withStorageEndpoint(String storageEndpoint) { + this.storageEndpoint = storageEndpoint; + return this; + } + + /** + * Get specifies the identifier key of the auditing storage account. + If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage. + Prerequisites for using managed identity authentication: + 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). + 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity. + For more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355). + * + * @return the storageAccountAccessKey value + */ + public String storageAccountAccessKey() { + return this.storageAccountAccessKey; + } + + /** + * Set specifies the identifier key of the auditing storage account. + If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage. + Prerequisites for using managed identity authentication: + 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD). + 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity. + For more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355). + * + * @param storageAccountAccessKey the storageAccountAccessKey value to set + * @return the ExtendedSqlPoolBlobAuditingPolicyInner object itself. + */ + public ExtendedSqlPoolBlobAuditingPolicyInner withStorageAccountAccessKey(String storageAccountAccessKey) { + this.storageAccountAccessKey = storageAccountAccessKey; + return this; + } + + /** + * Get specifies the number of days to keep in the audit logs in the storage account. + * + * @return the retentionDays value + */ + public Integer retentionDays() { + return this.retentionDays; + } + + /** + * Set specifies the number of days to keep in the audit logs in the storage account. + * + * @param retentionDays the retentionDays value to set + * @return the ExtendedSqlPoolBlobAuditingPolicyInner object itself. + */ + public ExtendedSqlPoolBlobAuditingPolicyInner withRetentionDays(Integer retentionDays) { + this.retentionDays = retentionDays; + return this; + } + + /** + * Get specifies the Actions-Groups and Actions to audit. + The recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary groups could lead to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that <object> in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions). + * + * @return the auditActionsAndGroups value + */ + public List auditActionsAndGroups() { + return this.auditActionsAndGroups; + } + + /** + * Set specifies the Actions-Groups and Actions to audit. + The recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins: + BATCH_COMPLETED_GROUP, + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + FAILED_DATABASE_AUTHENTICATION_GROUP. + This above combination is also the set that is configured by default when enabling auditing from the Azure portal. + The supported action groups to audit are (note: choose only specific groups that cover your auditing needs. Using unnecessary groups could lead to very large quantities of audit records): + APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + BACKUP_RESTORE_GROUP + DATABASE_LOGOUT_GROUP + DATABASE_OBJECT_CHANGE_GROUP + DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + DATABASE_OPERATION_GROUP + DATABASE_PERMISSION_CHANGE_GROUP + DATABASE_PRINCIPAL_CHANGE_GROUP + DATABASE_PRINCIPAL_IMPERSONATION_GROUP + DATABASE_ROLE_MEMBER_CHANGE_GROUP + FAILED_DATABASE_AUTHENTICATION_GROUP + SCHEMA_OBJECT_ACCESS_GROUP + SCHEMA_OBJECT_CHANGE_GROUP + SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + USER_CHANGE_PASSWORD_GROUP + BATCH_STARTED_GROUP + BATCH_COMPLETED_GROUP + These are groups that cover all sql statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs. + For more information, see [Database-Level Audit Action Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + For Database auditing policy, specific Actions can also be specified (note that Actions cannot be specified for Server auditing policy). The supported actions to audit are: + SELECT + UPDATE + INSERT + DELETE + EXECUTE + RECEIVE + REFERENCES + The general form for defining an action to be audited is: + {action} ON {object} BY {principal} + Note that <object> in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively. + For example: + SELECT on dbo.myTable by public + SELECT on DATABASE::myDatabase by public + SELECT on SCHEMA::mySchema by public + For more information, see [Database-Level Audit Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions). + * + * @param auditActionsAndGroups the auditActionsAndGroups value to set + * @return the ExtendedSqlPoolBlobAuditingPolicyInner object itself. + */ + public ExtendedSqlPoolBlobAuditingPolicyInner withAuditActionsAndGroups(List auditActionsAndGroups) { + this.auditActionsAndGroups = auditActionsAndGroups; + return this; + } + + /** + * Get specifies the blob storage subscription Id. + * + * @return the storageAccountSubscriptionId value + */ + public UUID storageAccountSubscriptionId() { + return this.storageAccountSubscriptionId; + } + + /** + * Set specifies the blob storage subscription Id. + * + * @param storageAccountSubscriptionId the storageAccountSubscriptionId value to set + * @return the ExtendedSqlPoolBlobAuditingPolicyInner object itself. + */ + public ExtendedSqlPoolBlobAuditingPolicyInner withStorageAccountSubscriptionId(UUID storageAccountSubscriptionId) { + this.storageAccountSubscriptionId = storageAccountSubscriptionId; + return this; + } + + /** + * Get specifies whether storageAccountAccessKey value is the storage's secondary key. + * + * @return the isStorageSecondaryKeyInUse value + */ + public Boolean isStorageSecondaryKeyInUse() { + return this.isStorageSecondaryKeyInUse; + } + + /** + * Set specifies whether storageAccountAccessKey value is the storage's secondary key. + * + * @param isStorageSecondaryKeyInUse the isStorageSecondaryKeyInUse value to set + * @return the ExtendedSqlPoolBlobAuditingPolicyInner object itself. + */ + public ExtendedSqlPoolBlobAuditingPolicyInner withIsStorageSecondaryKeyInUse(Boolean isStorageSecondaryKeyInUse) { + this.isStorageSecondaryKeyInUse = isStorageSecondaryKeyInUse; + return this; + } + + /** + * Get specifies whether audit events are sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on the database should be also created. + Note that for server level audit you should use the 'master' database as {databaseName}. + Diagnostic Settings URI format: + PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). + * + * @return the isAzureMonitorTargetEnabled value + */ + public Boolean isAzureMonitorTargetEnabled() { + return this.isAzureMonitorTargetEnabled; + } + + /** + * Set specifies whether audit events are sent to Azure Monitor. + In order to send the events to Azure Monitor, specify 'state' as 'Enabled' and 'isAzureMonitorTargetEnabled' as true. + When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on the database should be also created. + Note that for server level audit you should use the 'master' database as {databaseName}. + Diagnostic Settings URI format: + PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + For more information, see [Diagnostic Settings REST API](https://go.microsoft.com/fwlink/?linkid=2033207) + or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043). + * + * @param isAzureMonitorTargetEnabled the isAzureMonitorTargetEnabled value to set + * @return the ExtendedSqlPoolBlobAuditingPolicyInner object itself. + */ + public ExtendedSqlPoolBlobAuditingPolicyInner withIsAzureMonitorTargetEnabled(Boolean isAzureMonitorTargetEnabled) { + this.isAzureMonitorTargetEnabled = isAzureMonitorTargetEnabled; + return this; + } + + /** + * Get specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed. + The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. + * + * @return the queueDelayMs value + */ + public Integer queueDelayMs() { + return this.queueDelayMs; + } + + /** + * Set specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed. + The default minimum value is 1000 (1 second). The maximum is 2,147,483,647. + * + * @param queueDelayMs the queueDelayMs value to set + * @return the ExtendedSqlPoolBlobAuditingPolicyInner object itself. + */ + public ExtendedSqlPoolBlobAuditingPolicyInner withQueueDelayMs(Integer queueDelayMs) { + this.queueDelayMs = queueDelayMs; + return this; + } + +} diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/IntegrationRuntimeInner.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/IntegrationRuntimeInner.java index b52baaba387a8..f05ebd3908001 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/IntegrationRuntimeInner.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/IntegrationRuntimeInner.java @@ -13,8 +13,6 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.microsoft.azure.management.synapse.v2019_06_01_preview.ManagedIntegrationRuntime; -import com.microsoft.azure.management.synapse.v2019_06_01_preview.SelfHostedIntegrationRuntime; /** * Azure Synapse nested object which serves as a compute resource for diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/IpFirewallRulesInner.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/IpFirewallRulesInner.java index 0ce7fd879fe47..afbc02e57cb5c 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/IpFirewallRulesInner.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/IpFirewallRulesInner.java @@ -13,6 +13,7 @@ import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.ErrorContractInnerException; import com.microsoft.azure.management.synapse.v2019_06_01_preview.IpFirewallRuleProperties; import com.microsoft.azure.management.synapse.v2019_06_01_preview.ReplaceAllIpFirewallRulesRequest; import com.microsoft.azure.Page; diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/OperationsInner.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/OperationsInner.java index b07de2719a2b0..5c9f5cd920180 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/OperationsInner.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/OperationsInner.java @@ -12,6 +12,7 @@ import com.google.common.reflect.TypeToken; import com.microsoft.azure.CloudException; import com.microsoft.azure.management.synapse.v2019_06_01_preview.CheckNameAvailabilityRequest; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.ErrorContractInnerException; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import com.microsoft.rest.ServiceResponse; diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/PageImpl1.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/PageImpl1.java new file mode 100644 index 0000000000000..d7f7cf7a98a71 --- /dev/null +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/PageImpl1.java @@ -0,0 +1,75 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.synapse.v2019_06_01_preview.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.Page; +import java.util.List; + +/** + * An instance of this class defines a page of Azure resources and a link to + * get the next page of resources, if any. + * + * @param type of Azure resource + */ +public class PageImpl1 implements Page { + /** + * The link to the next page. + */ + @JsonProperty("") + private String nextPageLink; + + /** + * The list of items. + */ + @JsonProperty("value") + private List items; + + /** + * Gets the link to the next page. + * + * @return the link to the next page. + */ + @Override + public String nextPageLink() { + return this.nextPageLink; + } + + /** + * Gets the list of items. + * + * @return the list of items in {@link List}. + */ + @Override + public List items() { + return items; + } + + /** + * Sets the link to the next page. + * + * @param nextPageLink the link to the next page. + * @return this Page object itself. + */ + public PageImpl1 setNextPageLink(String nextPageLink) { + this.nextPageLink = nextPageLink; + return this; + } + + /** + * Sets the list of items. + * + * @param items the list of items in {@link List}. + * @return this Page object itself. + */ + public PageImpl1 setItems(List items) { + this.items = items; + return this; + } +} diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/PrivateEndpointConnectionsInner.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/PrivateEndpointConnectionsInner.java index 41ddaafe290e1..054eb31b8a3ac 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/PrivateEndpointConnectionsInner.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/PrivateEndpointConnectionsInner.java @@ -12,6 +12,7 @@ import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.ErrorContractInnerException; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/PrivateLinkHubsInner.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/PrivateLinkHubsInner.java index bdb63b093ac2b..7d536d2fcbb6a 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/PrivateLinkHubsInner.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/PrivateLinkHubsInner.java @@ -16,6 +16,7 @@ import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.ErrorContractInnerException; import com.microsoft.azure.management.synapse.v2019_06_01_preview.PrivateLinkHubPatchInfo; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SensitivityLabelsImpl.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SensitivityLabelsImpl.java index 4ab57ac945d66..bb045c35fb24b 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SensitivityLabelsImpl.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SensitivityLabelsImpl.java @@ -66,7 +66,7 @@ public Observable updateResourceAsync() { @Override protected Observable getInnerAsync() { SqlPoolSensitivityLabelsInner client = this.manager().inner().sqlPoolSensitivityLabels(); - return null; // NOP getInnerAsync implementation as get is not supported + return client.getAsync(this.resourceGroupName, this.workspaceName, this.sqlPoolName, this.schemaName, this.tableName, this.columnName); } @Override diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolBlobAuditingPoliciesImpl.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolBlobAuditingPoliciesImpl.java index d6c4a375034d4..6a02ad5a8fa2b 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolBlobAuditingPoliciesImpl.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolBlobAuditingPoliciesImpl.java @@ -13,6 +13,7 @@ import com.microsoft.azure.management.synapse.v2019_06_01_preview.SqlPoolBlobAuditingPolicies; import rx.Observable; import rx.functions.Func1; +import com.microsoft.azure.Page; import com.microsoft.azure.management.synapse.v2019_06_01_preview.SqlPoolBlobAuditingPolicy; class SqlPoolBlobAuditingPoliciesImpl extends WrapperImpl implements SqlPoolBlobAuditingPolicies { @@ -40,6 +41,24 @@ private SqlPoolBlobAuditingPolicyImpl wrapModel(String name) { return new SqlPoolBlobAuditingPolicyImpl(name, this.manager()); } + @Override + public Observable listBySqlPoolAsync(final String resourceGroupName, final String workspaceName, final String sqlPoolName) { + SqlPoolBlobAuditingPoliciesInner client = this.inner(); + return client.listBySqlPoolAsync(resourceGroupName, workspaceName, sqlPoolName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public SqlPoolBlobAuditingPolicy call(SqlPoolBlobAuditingPolicyInner inner) { + return wrapModel(inner); + } + }); + } + @Override public Observable getAsync(String resourceGroupName, String workspaceName, String sqlPoolName) { SqlPoolBlobAuditingPoliciesInner client = this.inner(); diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolBlobAuditingPoliciesInner.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolBlobAuditingPoliciesInner.java index 3f2fa58a2dcfa..22ad0157cfe4d 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolBlobAuditingPoliciesInner.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolBlobAuditingPoliciesInner.java @@ -10,12 +10,17 @@ import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import com.microsoft.rest.ServiceResponse; import com.microsoft.rest.Validator; import java.io.IOException; +import java.util.List; import okhttp3.ResponseBody; import retrofit2.http.Body; import retrofit2.http.GET; @@ -24,6 +29,7 @@ import retrofit2.http.Path; import retrofit2.http.PUT; import retrofit2.http.Query; +import retrofit2.http.Url; import retrofit2.Response; import rx.functions.Func1; import rx.Observable; @@ -62,6 +68,14 @@ interface SqlPoolBlobAuditingPoliciesService { @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/auditingSettings/{blobAuditingPolicyName}") Observable> createOrUpdate(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("sqlPoolName") String sqlPoolName, @Path("blobAuditingPolicyName") String blobAuditingPolicyName, @Query("api-version") String apiVersion, @Body SqlPoolBlobAuditingPolicyInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.synapse.v2019_06_01_preview.SqlPoolBlobAuditingPolicies listBySqlPool" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/auditingSettings") + Observable> listBySqlPool(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("sqlPoolName") String sqlPoolName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.synapse.v2019_06_01_preview.SqlPoolBlobAuditingPolicies listBySqlPoolNext" }) + @GET + Observable> listBySqlPoolNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + } /** @@ -269,4 +283,246 @@ private ServiceResponse createOrUpdateDelegate(R .build(response); } + /** + * Lists auditing settings of a Sql pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SqlPoolBlobAuditingPolicyInner> object if successful. + */ + public PagedList listBySqlPool(final String resourceGroupName, final String workspaceName, final String sqlPoolName) { + ServiceResponse> response = listBySqlPoolSinglePageAsync(resourceGroupName, workspaceName, sqlPoolName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listBySqlPoolNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists auditing settings of a Sql pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listBySqlPoolAsync(final String resourceGroupName, final String workspaceName, final String sqlPoolName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listBySqlPoolSinglePageAsync(resourceGroupName, workspaceName, sqlPoolName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listBySqlPoolNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists auditing settings of a Sql pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SqlPoolBlobAuditingPolicyInner> object + */ + public Observable> listBySqlPoolAsync(final String resourceGroupName, final String workspaceName, final String sqlPoolName) { + return listBySqlPoolWithServiceResponseAsync(resourceGroupName, workspaceName, sqlPoolName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists auditing settings of a Sql pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SqlPoolBlobAuditingPolicyInner> object + */ + public Observable>> listBySqlPoolWithServiceResponseAsync(final String resourceGroupName, final String workspaceName, final String sqlPoolName) { + return listBySqlPoolSinglePageAsync(resourceGroupName, workspaceName, sqlPoolName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listBySqlPoolNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists auditing settings of a Sql pool. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. The name is case insensitive. + ServiceResponse> * @param workspaceName The name of the workspace + ServiceResponse> * @param sqlPoolName SQL pool name + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SqlPoolBlobAuditingPolicyInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listBySqlPoolSinglePageAsync(final String resourceGroupName, final String workspaceName, final String sqlPoolName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (sqlPoolName == null) { + throw new IllegalArgumentException("Parameter sqlPoolName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.listBySqlPool(this.client.subscriptionId(), resourceGroupName, workspaceName, sqlPoolName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listBySqlPoolDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listBySqlPoolDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Lists auditing settings of a Sql pool. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<SqlPoolBlobAuditingPolicyInner> object if successful. + */ + public PagedList listBySqlPoolNext(final String nextPageLink) { + ServiceResponse> response = listBySqlPoolNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listBySqlPoolNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Lists auditing settings of a Sql pool. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listBySqlPoolNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listBySqlPoolNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listBySqlPoolNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Lists auditing settings of a Sql pool. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SqlPoolBlobAuditingPolicyInner> object + */ + public Observable> listBySqlPoolNextAsync(final String nextPageLink) { + return listBySqlPoolNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Lists auditing settings of a Sql pool. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<SqlPoolBlobAuditingPolicyInner> object + */ + public Observable>> listBySqlPoolNextWithServiceResponseAsync(final String nextPageLink) { + return listBySqlPoolNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listBySqlPoolNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Lists auditing settings of a Sql pool. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<SqlPoolBlobAuditingPolicyInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listBySqlPoolNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listBySqlPoolNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listBySqlPoolNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listBySqlPoolNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + } diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolColumnsImpl.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolColumnsImpl.java new file mode 100644 index 0000000000000..afb3e499c32bf --- /dev/null +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolColumnsImpl.java @@ -0,0 +1,50 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * + */ + +package com.microsoft.azure.management.synapse.v2019_06_01_preview.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.SqlPoolColumns; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.TableSchemaSqlPoolWorkspaceSqlPoolColumnModel; + +class SqlPoolColumnsImpl extends WrapperImpl implements SqlPoolColumns { + private final SynapseManager manager; + + SqlPoolColumnsImpl(SynapseManager manager) { + super(manager.inner().sqlPoolColumns()); + this.manager = manager; + } + + public SynapseManager manager() { + return this.manager; + } + + private TableSchemaSqlPoolWorkspaceSqlPoolColumnModelImpl wrapModel(SqlPoolColumnInner inner) { + return new TableSchemaSqlPoolWorkspaceSqlPoolColumnModelImpl(inner, manager()); + } + + @Override + public Observable getAsync(String resourceGroupName, String workspaceName, String sqlPoolName, String schemaName, String tableName, String columnName) { + SqlPoolColumnsInner client = this.inner(); + return client.getAsync(resourceGroupName, workspaceName, sqlPoolName, schemaName, tableName, columnName) + .flatMap(new Func1>() { + @Override + public Observable call(SqlPoolColumnInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((TableSchemaSqlPoolWorkspaceSqlPoolColumnModel)wrapModel(inner)); + } + } + }); + } + +} diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolColumnsInner.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolColumnsInner.java new file mode 100644 index 0000000000000..ff1835394a2e9 --- /dev/null +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolColumnsInner.java @@ -0,0 +1,174 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.synapse.v2019_06_01_preview.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.CloudException; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in SqlPoolColumns. + */ +public class SqlPoolColumnsInner { + /** The Retrofit service to perform REST calls. */ + private SqlPoolColumnsService service; + /** The service client containing this operation class. */ + private SynapseManagementClientImpl client; + + /** + * Initializes an instance of SqlPoolColumnsInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public SqlPoolColumnsInner(Retrofit retrofit, SynapseManagementClientImpl client) { + this.service = retrofit.create(SqlPoolColumnsService.class); + this.client = client; + } + + /** + * The interface defining all the services for SqlPoolColumns to be + * used by Retrofit to perform actually REST calls. + */ + interface SqlPoolColumnsService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.synapse.v2019_06_01_preview.SqlPoolColumns get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("sqlPoolName") String sqlPoolName, @Path("schemaName") String schemaName, @Path("tableName") String tableName, @Path("columnName") String columnName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Get Sql pool column. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SqlPoolColumnInner object if successful. + */ + public SqlPoolColumnInner get(String resourceGroupName, String workspaceName, String sqlPoolName, String schemaName, String tableName, String columnName) { + return getWithServiceResponseAsync(resourceGroupName, workspaceName, sqlPoolName, schemaName, tableName, columnName).toBlocking().single().body(); + } + + /** + * Get Sql pool column. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String workspaceName, String sqlPoolName, String schemaName, String tableName, String columnName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, workspaceName, sqlPoolName, schemaName, tableName, columnName), serviceCallback); + } + + /** + * Get Sql pool column. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SqlPoolColumnInner object + */ + public Observable getAsync(String resourceGroupName, String workspaceName, String sqlPoolName, String schemaName, String tableName, String columnName) { + return getWithServiceResponseAsync(resourceGroupName, workspaceName, sqlPoolName, schemaName, tableName, columnName).map(new Func1, SqlPoolColumnInner>() { + @Override + public SqlPoolColumnInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get Sql pool column. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SqlPoolColumnInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String workspaceName, String sqlPoolName, String schemaName, String tableName, String columnName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (sqlPoolName == null) { + throw new IllegalArgumentException("Parameter sqlPoolName is required and cannot be null."); + } + if (schemaName == null) { + throw new IllegalArgumentException("Parameter schemaName is required and cannot be null."); + } + if (tableName == null) { + throw new IllegalArgumentException("Parameter tableName is required and cannot be null."); + } + if (columnName == null) { + throw new IllegalArgumentException("Parameter columnName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(this.client.subscriptionId(), resourceGroupName, workspaceName, sqlPoolName, schemaName, tableName, columnName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolMetadataSyncConfigsInner.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolMetadataSyncConfigsInner.java index c133dbd5faef9..d612f83cc127b 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolMetadataSyncConfigsInner.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolMetadataSyncConfigsInner.java @@ -10,6 +10,7 @@ import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.ErrorContractInnerException; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import com.microsoft.rest.ServiceResponse; diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolSchemaImpl.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolSchemaImpl.java index 4e59b9ed5b3d7..f4c4426aaf1e8 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolSchemaImpl.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolSchemaImpl.java @@ -9,15 +9,24 @@ package com.microsoft.azure.management.synapse.v2019_06_01_preview.implementation; import com.microsoft.azure.management.synapse.v2019_06_01_preview.SqlPoolSchema; -import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; import rx.Observable; -class SqlPoolSchemaImpl extends WrapperImpl implements SqlPoolSchema { +class SqlPoolSchemaImpl extends IndexableRefreshableWrapperImpl implements SqlPoolSchema { private final SynapseManager manager; + private String resourceGroupName; + private String workspaceName; + private String sqlPoolName; + private String schemaName; SqlPoolSchemaImpl(SqlPoolSchemaInner inner, SynapseManager manager) { - super(inner); + super(null, inner); this.manager = manager; + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.workspaceName = IdParsingUtils.getValueFromIdByName(inner.id(), "workspaces"); + this.sqlPoolName = IdParsingUtils.getValueFromIdByName(inner.id(), "sqlPools"); + this.schemaName = IdParsingUtils.getValueFromIdByName(inner.id(), "schemas"); } @Override @@ -25,6 +34,12 @@ public SynapseManager manager() { return this.manager; } + @Override + protected Observable getInnerAsync() { + SqlPoolSchemasInner client = this.manager().inner().sqlPoolSchemas(); + return client.getAsync(this.resourceGroupName, this.workspaceName, this.sqlPoolName, this.schemaName); + } + @Override diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolSchemasImpl.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolSchemasImpl.java index 33d80ef1b5ab7..03e33446c903c 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolSchemasImpl.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolSchemasImpl.java @@ -50,4 +50,20 @@ public SqlPoolSchema call(SqlPoolSchemaInner inner) { }); } + @Override + public Observable getAsync(String resourceGroupName, String workspaceName, String sqlPoolName, String schemaName) { + SqlPoolSchemasInner client = this.inner(); + return client.getAsync(resourceGroupName, workspaceName, sqlPoolName, schemaName) + .flatMap(new Func1>() { + @Override + public Observable call(SqlPoolSchemaInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((SqlPoolSchema)wrapModel(inner)); + } + } + }); + } + } diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolSchemasInner.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolSchemasInner.java index 25f37279504cd..45d2f9da011fe 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolSchemasInner.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolSchemasInner.java @@ -15,6 +15,7 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import com.microsoft.rest.ServiceResponse; import java.io.IOException; @@ -60,6 +61,10 @@ interface SqlPoolSchemasService { @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/schemas") Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("sqlPoolName") String sqlPoolName, @Query("api-version") String apiVersion, @Query("$filter") String filter, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.synapse.v2019_06_01_preview.SqlPoolSchemas get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("sqlPoolName") String sqlPoolName, @Path("schemaName") String schemaName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.synapse.v2019_06_01_preview.SqlPoolSchemas listNext" }) @GET Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -337,6 +342,106 @@ private ServiceResponse> listDelegate(Response getAsync(String resourceGroupName, String workspaceName, String sqlPoolName, String schemaName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, workspaceName, sqlPoolName, schemaName), serviceCallback); + } + + /** + * Get Sql Pool schema. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param schemaName The name of the schema. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SqlPoolSchemaInner object + */ + public Observable getAsync(String resourceGroupName, String workspaceName, String sqlPoolName, String schemaName) { + return getWithServiceResponseAsync(resourceGroupName, workspaceName, sqlPoolName, schemaName).map(new Func1, SqlPoolSchemaInner>() { + @Override + public SqlPoolSchemaInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get Sql Pool schema. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param schemaName The name of the schema. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SqlPoolSchemaInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String workspaceName, String sqlPoolName, String schemaName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (sqlPoolName == null) { + throw new IllegalArgumentException("Parameter sqlPoolName is required and cannot be null."); + } + if (schemaName == null) { + throw new IllegalArgumentException("Parameter schemaName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(this.client.subscriptionId(), resourceGroupName, workspaceName, sqlPoolName, schemaName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * Gets schemas of a given SQL pool. * Gets schemas of a given SQL pool. diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolSensitivityLabelsImpl.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolSensitivityLabelsImpl.java index 3e4a47bfb500f..20826c6556cb6 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolSensitivityLabelsImpl.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolSensitivityLabelsImpl.java @@ -14,6 +14,7 @@ import rx.Completable; import rx.Observable; import rx.functions.Func1; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.SensitivityLabels; import com.microsoft.azure.Page; import com.microsoft.azure.management.synapse.v2019_06_01_preview.CurrentSensitivityLabels; import com.microsoft.azure.management.synapse.v2019_06_01_preview.RecommendedSensitivityLabels; @@ -55,6 +56,22 @@ public Completable disableRecommendationAsync(String resourceGroupName, String w return client.disableRecommendationAsync(resourceGroupName, workspaceName, sqlPoolName, schemaName, tableName, columnName).toCompletable(); } + @Override + public Observable getAsync(String resourceGroupName, String workspaceName, String sqlPoolName, String schemaName, String tableName, String columnName, SensitivityLabelSource sensitivityLabelSource) { + SqlPoolSensitivityLabelsInner client = this.inner(); + return client.getAsync(resourceGroupName, workspaceName, sqlPoolName, schemaName, tableName, columnName, sensitivityLabelSource) + .flatMap(new Func1>() { + @Override + public Observable call(SensitivityLabelInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((SensitivityLabels)wrapModel(inner)); + } + } + }); + } + @Override public Completable deleteAsync(String resourceGroupName, String workspaceName, String sqlPoolName, String schemaName, String tableName, String columnName) { SqlPoolSensitivityLabelsInner client = this.inner(); diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolSensitivityLabelsInner.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolSensitivityLabelsInner.java index 097266a91d43a..dc61d8a841b15 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolSensitivityLabelsInner.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolSensitivityLabelsInner.java @@ -13,6 +13,7 @@ import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.SensitivityLabelSource; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCallback; @@ -78,6 +79,10 @@ interface SqlPoolSensitivityLabelsService { @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}", method = "DELETE", hasBody = true) Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("sqlPoolName") String sqlPoolName, @Path("schemaName") String schemaName, @Path("tableName") String tableName, @Path("columnName") String columnName, @Path("sensitivityLabelSource") String sensitivityLabelSource, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.synapse.v2019_06_01_preview.SqlPoolSensitivityLabels get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("sqlPoolName") String sqlPoolName, @Path("schemaName") String schemaName, @Path("tableName") String tableName, @Path("columnName") String columnName, @Path("sensitivityLabelSource") SensitivityLabelSource sensitivityLabelSource, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.synapse.v2019_06_01_preview.SqlPoolSensitivityLabels enableRecommendation" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/enable") Observable> enableRecommendation(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("sqlPoolName") String sqlPoolName, @Path("schemaName") String schemaName, @Path("tableName") String tableName, @Path("columnName") String columnName, @Path("sensitivityLabelSource") String sensitivityLabelSource, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -888,6 +893,127 @@ private ServiceResponse deleteDelegate(Response response) th .build(response); } + /** + * Gets the sensitivity label of a given column. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param sensitivityLabelSource The source of the sensitivity label. Possible values include: 'current', 'recommended' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SensitivityLabelInner object if successful. + */ + public SensitivityLabelInner get(String resourceGroupName, String workspaceName, String sqlPoolName, String schemaName, String tableName, String columnName, SensitivityLabelSource sensitivityLabelSource) { + return getWithServiceResponseAsync(resourceGroupName, workspaceName, sqlPoolName, schemaName, tableName, columnName, sensitivityLabelSource).toBlocking().single().body(); + } + + /** + * Gets the sensitivity label of a given column. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param sensitivityLabelSource The source of the sensitivity label. Possible values include: 'current', 'recommended' + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String workspaceName, String sqlPoolName, String schemaName, String tableName, String columnName, SensitivityLabelSource sensitivityLabelSource, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, workspaceName, sqlPoolName, schemaName, tableName, columnName, sensitivityLabelSource), serviceCallback); + } + + /** + * Gets the sensitivity label of a given column. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param sensitivityLabelSource The source of the sensitivity label. Possible values include: 'current', 'recommended' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SensitivityLabelInner object + */ + public Observable getAsync(String resourceGroupName, String workspaceName, String sqlPoolName, String schemaName, String tableName, String columnName, SensitivityLabelSource sensitivityLabelSource) { + return getWithServiceResponseAsync(resourceGroupName, workspaceName, sqlPoolName, schemaName, tableName, columnName, sensitivityLabelSource).map(new Func1, SensitivityLabelInner>() { + @Override + public SensitivityLabelInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets the sensitivity label of a given column. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param columnName The name of the column. + * @param sensitivityLabelSource The source of the sensitivity label. Possible values include: 'current', 'recommended' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SensitivityLabelInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String workspaceName, String sqlPoolName, String schemaName, String tableName, String columnName, SensitivityLabelSource sensitivityLabelSource) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (sqlPoolName == null) { + throw new IllegalArgumentException("Parameter sqlPoolName is required and cannot be null."); + } + if (schemaName == null) { + throw new IllegalArgumentException("Parameter schemaName is required and cannot be null."); + } + if (tableName == null) { + throw new IllegalArgumentException("Parameter tableName is required and cannot be null."); + } + if (columnName == null) { + throw new IllegalArgumentException("Parameter columnName is required and cannot be null."); + } + if (sensitivityLabelSource == null) { + throw new IllegalArgumentException("Parameter sensitivityLabelSource is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(this.client.subscriptionId(), resourceGroupName, workspaceName, sqlPoolName, schemaName, tableName, columnName, sensitivityLabelSource, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * Enables sensitivity recommendations on a given column (recommendations are enabled by default on all columns). * diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolTableColumnsImpl.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolTableColumnsImpl.java index 18b302894c418..8580dde8f6ee2 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolTableColumnsImpl.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolTableColumnsImpl.java @@ -14,7 +14,7 @@ import rx.Observable; import rx.functions.Func1; import com.microsoft.azure.Page; -import com.microsoft.azure.management.synapse.v2019_06_01_preview.SqlPoolColumn; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.TableSchemaSqlPoolWorkspaceSqlPoolColumn; class SqlPoolTableColumnsImpl extends WrapperImpl implements SqlPoolTableColumns { private final SynapseManager manager; @@ -28,12 +28,12 @@ public SynapseManager manager() { return this.manager; } - private SqlPoolColumnImpl wrapModel(SqlPoolColumnInner inner) { - return new SqlPoolColumnImpl(inner, manager()); + private TableSchemaSqlPoolWorkspaceSqlPoolColumnImpl wrapModel(SqlPoolColumnInner inner) { + return new TableSchemaSqlPoolWorkspaceSqlPoolColumnImpl(inner, manager()); } @Override - public Observable listByTableNameAsync(final String resourceGroupName, final String workspaceName, final String sqlPoolName, final String schemaName, final String tableName) { + public Observable listByTableNameAsync(final String resourceGroupName, final String workspaceName, final String sqlPoolName, final String schemaName, final String tableName) { SqlPoolTableColumnsInner client = this.inner(); return client.listByTableNameAsync(resourceGroupName, workspaceName, sqlPoolName, schemaName, tableName) .flatMapIterable(new Func1, Iterable>() { @@ -42,9 +42,9 @@ public Iterable call(Page page) { return page.items(); } }) - .map(new Func1() { + .map(new Func1() { @Override - public SqlPoolColumn call(SqlPoolColumnInner inner) { + public TableSchemaSqlPoolWorkspaceSqlPoolColumn call(SqlPoolColumnInner inner) { return wrapModel(inner); } }); diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolTableImpl.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolTableImpl.java index b950aa368c90e..f7215eb1e7052 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolTableImpl.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolTableImpl.java @@ -9,15 +9,26 @@ package com.microsoft.azure.management.synapse.v2019_06_01_preview.implementation; import com.microsoft.azure.management.synapse.v2019_06_01_preview.SqlPoolTable; -import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; import rx.Observable; -class SqlPoolTableImpl extends WrapperImpl implements SqlPoolTable { +class SqlPoolTableImpl extends IndexableRefreshableWrapperImpl implements SqlPoolTable { private final SynapseManager manager; + private String resourceGroupName; + private String workspaceName; + private String sqlPoolName; + private String schemaName; + private String tableName; SqlPoolTableImpl(SqlPoolTableInner inner, SynapseManager manager) { - super(inner); + super(null, inner); this.manager = manager; + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.workspaceName = IdParsingUtils.getValueFromIdByName(inner.id(), "workspaces"); + this.sqlPoolName = IdParsingUtils.getValueFromIdByName(inner.id(), "sqlPools"); + this.schemaName = IdParsingUtils.getValueFromIdByName(inner.id(), "schemas"); + this.tableName = IdParsingUtils.getValueFromIdByName(inner.id(), "tables"); } @Override @@ -25,6 +36,12 @@ public SynapseManager manager() { return this.manager; } + @Override + protected Observable getInnerAsync() { + SqlPoolTablesInner client = this.manager().inner().sqlPoolTables(); + return client.getAsync(this.resourceGroupName, this.workspaceName, this.sqlPoolName, this.schemaName, this.tableName); + } + @Override diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolTablesImpl.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolTablesImpl.java index 6441cf3bd4809..02be02d616a42 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolTablesImpl.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolTablesImpl.java @@ -50,4 +50,20 @@ public SqlPoolTable call(SqlPoolTableInner inner) { }); } + @Override + public Observable getAsync(String resourceGroupName, String workspaceName, String sqlPoolName, String schemaName, String tableName) { + SqlPoolTablesInner client = this.inner(); + return client.getAsync(resourceGroupName, workspaceName, sqlPoolName, schemaName, tableName) + .flatMap(new Func1>() { + @Override + public Observable call(SqlPoolTableInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((SqlPoolTable)wrapModel(inner)); + } + } + }); + } + } diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolTablesInner.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolTablesInner.java index 0fcc0b94411aa..9999ff5d73f70 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolTablesInner.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolTablesInner.java @@ -15,6 +15,7 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import com.microsoft.rest.ServiceResponse; import java.io.IOException; @@ -60,6 +61,10 @@ interface SqlPoolTablesService { @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}/tables") Observable> listBySchema(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("sqlPoolName") String sqlPoolName, @Path("schemaName") String schemaName, @Query("api-version") String apiVersion, @Query("$filter") String filter, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.synapse.v2019_06_01_preview.SqlPoolTables get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}/tables/{tableName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("sqlPoolName") String sqlPoolName, @Path("schemaName") String schemaName, @Path("tableName") String tableName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.synapse.v2019_06_01_preview.SqlPoolTables listBySchemaNext" }) @GET Observable> listBySchemaNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -353,6 +358,113 @@ private ServiceResponse> listBySchemaDelegate(Respon .build(response); } + /** + * Get Sql pool table. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SqlPoolTableInner object if successful. + */ + public SqlPoolTableInner get(String resourceGroupName, String workspaceName, String sqlPoolName, String schemaName, String tableName) { + return getWithServiceResponseAsync(resourceGroupName, workspaceName, sqlPoolName, schemaName, tableName).toBlocking().single().body(); + } + + /** + * Get Sql pool table. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String workspaceName, String sqlPoolName, String schemaName, String tableName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, workspaceName, sqlPoolName, schemaName, tableName), serviceCallback); + } + + /** + * Get Sql pool table. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SqlPoolTableInner object + */ + public Observable getAsync(String resourceGroupName, String workspaceName, String sqlPoolName, String schemaName, String tableName) { + return getWithServiceResponseAsync(resourceGroupName, workspaceName, sqlPoolName, schemaName, tableName).map(new Func1, SqlPoolTableInner>() { + @Override + public SqlPoolTableInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Get Sql pool table. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param schemaName The name of the schema. + * @param tableName The name of the table. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SqlPoolTableInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String workspaceName, String sqlPoolName, String schemaName, String tableName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (sqlPoolName == null) { + throw new IllegalArgumentException("Parameter sqlPoolName is required and cannot be null."); + } + if (schemaName == null) { + throw new IllegalArgumentException("Parameter schemaName is required and cannot be null."); + } + if (tableName == null) { + throw new IllegalArgumentException("Parameter tableName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(this.client.subscriptionId(), resourceGroupName, workspaceName, sqlPoolName, schemaName, tableName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * Gets tables of a given schema in a SQL pool. * Gets tables of a given schema in a SQL pool. diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolVulnerabilityAssessmentRuleBaselineImpl.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolVulnerabilityAssessmentRuleBaselineImpl.java index b80fb16e005ad..da04e425e2f3a 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolVulnerabilityAssessmentRuleBaselineImpl.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolVulnerabilityAssessmentRuleBaselineImpl.java @@ -29,7 +29,7 @@ class SqlPoolVulnerabilityAssessmentRuleBaselineImpl extends CreatableUpdatableI super(name, new SqlPoolVulnerabilityAssessmentRuleBaselineInner()); this.manager = manager; // Set resource name - this.baselineName = VulnerabilityAssessmentPolicyBaselineName.fromString(name); + this.baselineName = name; // } @@ -37,7 +37,7 @@ class SqlPoolVulnerabilityAssessmentRuleBaselineImpl extends CreatableUpdatableI super(inner.name(), inner); this.manager = manager; // Set resource name - this.baselineName = VulnerabilityAssessmentPolicyBaselineName.fromString(inner.name()); + this.baselineName = inner.name(); // set resource ancestor and positional variables this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); this.workspaceName = IdParsingUtils.getValueFromIdByName(inner.id(), "workspaces"); @@ -69,7 +69,7 @@ public Observable updateResourceAsyn @Override protected Observable getInnerAsync() { SqlPoolVulnerabilityAssessmentRuleBaselinesInner client = this.manager().inner().sqlPoolVulnerabilityAssessmentRuleBaselines(); - return null; // NOP getInnerAsync implementation as get is not supported + return client.getAsync(this.resourceGroupName, this.workspaceName, this.sqlPoolName, this.ruleId, this.baselineName); } @Override diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolVulnerabilityAssessmentRuleBaselinesImpl.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolVulnerabilityAssessmentRuleBaselinesImpl.java index 78559ada924b9..851a736be9900 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolVulnerabilityAssessmentRuleBaselinesImpl.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolVulnerabilityAssessmentRuleBaselinesImpl.java @@ -11,7 +11,9 @@ import com.microsoft.azure.arm.model.implementation.WrapperImpl; import com.microsoft.azure.management.synapse.v2019_06_01_preview.SqlPoolVulnerabilityAssessmentRuleBaselines; -import com.microsoft.azure.management.synapse.v2019_06_01_preview.VulnerabilityAssessmentPolicyBaselineName; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.SqlPoolVulnerabilityAssessmentRuleBaseline; import rx.Completable; class SqlPoolVulnerabilityAssessmentRuleBaselinesImpl extends WrapperImpl implements SqlPoolVulnerabilityAssessmentRuleBaselines { @@ -39,6 +41,32 @@ private SqlPoolVulnerabilityAssessmentRuleBaselineImpl wrapSqlPoolVulnerabilityA return new SqlPoolVulnerabilityAssessmentRuleBaselineImpl(inner, manager()); } + private Observable getSqlPoolVulnerabilityAssessmentRuleBaselineInnerUsingSqlPoolVulnerabilityAssessmentRuleBaselinesInnerAsync(String id) { + String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups"); + String workspaceName = IdParsingUtils.getValueFromIdByName(id, "workspaces"); + String sqlPoolName = IdParsingUtils.getValueFromIdByName(id, "sqlPools"); + String ruleId = IdParsingUtils.getValueFromIdByName(id, "rules"); + String baselineName = VulnerabilityAssessmentPolicyBaselineName.valueOf(IdParsingUtils.getValueFromIdByName(id, "baselines")); + SqlPoolVulnerabilityAssessmentRuleBaselinesInner client = this.inner(); + return client.getAsync(resourceGroupName, workspaceName, sqlPoolName, ruleId, baselineName); + } + + @Override + public Observable getAsync(String resourceGroupName, String workspaceName, String sqlPoolName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName) { + SqlPoolVulnerabilityAssessmentRuleBaselinesInner client = this.inner(); + return client.getAsync(resourceGroupName, workspaceName, sqlPoolName, ruleId, baselineName) + .flatMap(new Func1>() { + @Override + public Observable call(SqlPoolVulnerabilityAssessmentRuleBaselineInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((SqlPoolVulnerabilityAssessmentRuleBaseline)wrapSqlPoolVulnerabilityAssessmentRuleBaselineModel(inner)); + } + } + }); + } + @Override public Completable deleteAsync(String resourceGroupName, String workspaceName, String sqlPoolName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName) { SqlPoolVulnerabilityAssessmentRuleBaselinesInner client = this.inner(); diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolVulnerabilityAssessmentRuleBaselinesInner.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolVulnerabilityAssessmentRuleBaselinesInner.java index 4c0748ff342cb..8186640fdc257 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolVulnerabilityAssessmentRuleBaselinesInner.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolVulnerabilityAssessmentRuleBaselinesInner.java @@ -21,6 +21,7 @@ import java.util.List; import okhttp3.ResponseBody; import retrofit2.http.Body; +import retrofit2.http.GET; import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.HTTP; @@ -65,6 +66,10 @@ interface SqlPoolVulnerabilityAssessmentRuleBaselinesService { @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}", method = "DELETE", hasBody = true) Observable> delete(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("sqlPoolName") String sqlPoolName, @Path("vulnerabilityAssessmentName") String vulnerabilityAssessmentName, @Path("ruleId") String ruleId, @Path("baselineName") VulnerabilityAssessmentPolicyBaselineName baselineName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.synapse.v2019_06_01_preview.SqlPoolVulnerabilityAssessmentRuleBaselines get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("sqlPoolName") String sqlPoolName, @Path("vulnerabilityAssessmentName") String vulnerabilityAssessmentName, @Path("ruleId") String ruleId, @Path("baselineName") VulnerabilityAssessmentPolicyBaselineName baselineName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + } /** @@ -292,4 +297,112 @@ private ServiceResponse deleteDelegate(Response response) th .build(response); } + /** + * Gets a SqlPool's vulnerability assessment rule baseline. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param ruleId The vulnerability assessment rule ID. + * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a Sql pool level rule and master for server level rule). Possible values include: 'master', 'default' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the SqlPoolVulnerabilityAssessmentRuleBaselineInner object if successful. + */ + public SqlPoolVulnerabilityAssessmentRuleBaselineInner get(String resourceGroupName, String workspaceName, String sqlPoolName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName) { + return getWithServiceResponseAsync(resourceGroupName, workspaceName, sqlPoolName, ruleId, baselineName).toBlocking().single().body(); + } + + /** + * Gets a SqlPool's vulnerability assessment rule baseline. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param ruleId The vulnerability assessment rule ID. + * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a Sql pool level rule and master for server level rule). Possible values include: 'master', 'default' + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String workspaceName, String sqlPoolName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, workspaceName, sqlPoolName, ruleId, baselineName), serviceCallback); + } + + /** + * Gets a SqlPool's vulnerability assessment rule baseline. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param ruleId The vulnerability assessment rule ID. + * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a Sql pool level rule and master for server level rule). Possible values include: 'master', 'default' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SqlPoolVulnerabilityAssessmentRuleBaselineInner object + */ + public Observable getAsync(String resourceGroupName, String workspaceName, String sqlPoolName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName) { + return getWithServiceResponseAsync(resourceGroupName, workspaceName, sqlPoolName, ruleId, baselineName).map(new Func1, SqlPoolVulnerabilityAssessmentRuleBaselineInner>() { + @Override + public SqlPoolVulnerabilityAssessmentRuleBaselineInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a SqlPool's vulnerability assessment rule baseline. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param ruleId The vulnerability assessment rule ID. + * @param baselineName The name of the vulnerability assessment rule baseline (default implies a baseline on a Sql pool level rule and master for server level rule). Possible values include: 'master', 'default' + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the SqlPoolVulnerabilityAssessmentRuleBaselineInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String workspaceName, String sqlPoolName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (sqlPoolName == null) { + throw new IllegalArgumentException("Parameter sqlPoolName is required and cannot be null."); + } + if (ruleId == null) { + throw new IllegalArgumentException("Parameter ruleId is required and cannot be null."); + } + if (baselineName == null) { + throw new IllegalArgumentException("Parameter baselineName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String vulnerabilityAssessmentName = "default"; + return service.get(this.client.subscriptionId(), resourceGroupName, workspaceName, sqlPoolName, vulnerabilityAssessmentName, ruleId, baselineName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + } diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolVulnerabilityAssessmentScansImpl.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolVulnerabilityAssessmentScansImpl.java index d4fa9d1184dd0..85b4dcee5f040 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolVulnerabilityAssessmentScansImpl.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolVulnerabilityAssessmentScansImpl.java @@ -70,4 +70,20 @@ public VulnerabilityAssessmentScanRecord call(VulnerabilityAssessmentScanRecordI }); } + @Override + public Observable getAsync(String resourceGroupName, String workspaceName, String sqlPoolName, String scanId) { + SqlPoolVulnerabilityAssessmentScansInner client = this.inner(); + return client.getAsync(resourceGroupName, workspaceName, sqlPoolName, scanId) + .flatMap(new Func1>() { + @Override + public Observable call(VulnerabilityAssessmentScanRecordInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((VulnerabilityAssessmentScanRecord)wrapModel(inner)); + } + } + }); + } + } diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolVulnerabilityAssessmentScansInner.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolVulnerabilityAssessmentScansInner.java index 9a8fc4fcb7eb8..f91bc37adf18e 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolVulnerabilityAssessmentScansInner.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolVulnerabilityAssessmentScansInner.java @@ -74,6 +74,10 @@ interface SqlPoolVulnerabilityAssessmentScansService { @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/export") Observable> export(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("sqlPoolName") String sqlPoolName, @Path("vulnerabilityAssessmentName") String vulnerabilityAssessmentName, @Path("scanId") String scanId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.synapse.v2019_06_01_preview.SqlPoolVulnerabilityAssessmentScans get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Path("sqlPoolName") String sqlPoolName, @Path("vulnerabilityAssessmentName") String vulnerabilityAssessmentName, @Path("scanId") String scanId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.synapse.v2019_06_01_preview.SqlPoolVulnerabilityAssessmentScans listNext" }) @GET Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -503,6 +507,107 @@ private ServiceResponse exportDe .build(response); } + /** + * Gets a vulnerability assessment scan record of a Sql pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param scanId The vulnerability assessment scan Id of the scan to retrieve. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the VulnerabilityAssessmentScanRecordInner object if successful. + */ + public VulnerabilityAssessmentScanRecordInner get(String resourceGroupName, String workspaceName, String sqlPoolName, String scanId) { + return getWithServiceResponseAsync(resourceGroupName, workspaceName, sqlPoolName, scanId).toBlocking().single().body(); + } + + /** + * Gets a vulnerability assessment scan record of a Sql pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param scanId The vulnerability assessment scan Id of the scan to retrieve. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String workspaceName, String sqlPoolName, String scanId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, workspaceName, sqlPoolName, scanId), serviceCallback); + } + + /** + * Gets a vulnerability assessment scan record of a Sql pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param scanId The vulnerability assessment scan Id of the scan to retrieve. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VulnerabilityAssessmentScanRecordInner object + */ + public Observable getAsync(String resourceGroupName, String workspaceName, String sqlPoolName, String scanId) { + return getWithServiceResponseAsync(resourceGroupName, workspaceName, sqlPoolName, scanId).map(new Func1, VulnerabilityAssessmentScanRecordInner>() { + @Override + public VulnerabilityAssessmentScanRecordInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Gets a vulnerability assessment scan record of a Sql pool. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace + * @param sqlPoolName SQL pool name + * @param scanId The vulnerability assessment scan Id of the scan to retrieve. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the VulnerabilityAssessmentScanRecordInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String workspaceName, String sqlPoolName, String scanId) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (workspaceName == null) { + throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); + } + if (sqlPoolName == null) { + throw new IllegalArgumentException("Parameter sqlPoolName is required and cannot be null."); + } + if (scanId == null) { + throw new IllegalArgumentException("Parameter scanId is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + final String vulnerabilityAssessmentName = "default"; + return service.get(this.client.subscriptionId(), resourceGroupName, workspaceName, sqlPoolName, vulnerabilityAssessmentName, scanId, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * Lists the vulnerability assessment scans of a SQL pool. * Lists the vulnerability assessment scans of a SQL pool. diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolsInner.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolsInner.java index b714ac6e4d0c1..f3d91354ea47e 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolsInner.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SqlPoolsInner.java @@ -13,6 +13,7 @@ import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.ErrorContractInnerException; import com.microsoft.azure.management.synapse.v2019_06_01_preview.ResourceMoveDefinition; import com.microsoft.azure.management.synapse.v2019_06_01_preview.SqlPoolPatchInfo; import com.microsoft.azure.Page; diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SynapseManagementClientImpl.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SynapseManagementClientImpl.java index 9c53715e95e64..d9dd98d7f76f3 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SynapseManagementClientImpl.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SynapseManagementClientImpl.java @@ -433,6 +433,58 @@ public SqlPoolVulnerabilityAssessmentRuleBaselinesInner sqlPoolVulnerabilityAsse return this.sqlPoolVulnerabilityAssessmentRuleBaselines; } + /** + * The ExtendedSqlPoolBlobAuditingPoliciesInner object to access its operations. + */ + private ExtendedSqlPoolBlobAuditingPoliciesInner extendedSqlPoolBlobAuditingPolicies; + + /** + * Gets the ExtendedSqlPoolBlobAuditingPoliciesInner object to access its operations. + * @return the ExtendedSqlPoolBlobAuditingPoliciesInner object. + */ + public ExtendedSqlPoolBlobAuditingPoliciesInner extendedSqlPoolBlobAuditingPolicies() { + return this.extendedSqlPoolBlobAuditingPolicies; + } + + /** + * The DataMaskingPoliciesInner object to access its operations. + */ + private DataMaskingPoliciesInner dataMaskingPolicies; + + /** + * Gets the DataMaskingPoliciesInner object to access its operations. + * @return the DataMaskingPoliciesInner object. + */ + public DataMaskingPoliciesInner dataMaskingPolicies() { + return this.dataMaskingPolicies; + } + + /** + * The DataMaskingRulesInner object to access its operations. + */ + private DataMaskingRulesInner dataMaskingRules; + + /** + * Gets the DataMaskingRulesInner object to access its operations. + * @return the DataMaskingRulesInner object. + */ + public DataMaskingRulesInner dataMaskingRules() { + return this.dataMaskingRules; + } + + /** + * The SqlPoolColumnsInner object to access its operations. + */ + private SqlPoolColumnsInner sqlPoolColumns; + + /** + * Gets the SqlPoolColumnsInner object to access its operations. + * @return the SqlPoolColumnsInner object. + */ + public SqlPoolColumnsInner sqlPoolColumns() { + return this.sqlPoolColumns; + } + /** * The WorkspacesInner object to access its operations. */ @@ -686,6 +738,10 @@ protected void initialize() { this.sqlPoolVulnerabilityAssessmentScans = new SqlPoolVulnerabilityAssessmentScansInner(restClient().retrofit(), this); this.sqlPoolSecurityAlertPolicies = new SqlPoolSecurityAlertPoliciesInner(restClient().retrofit(), this); this.sqlPoolVulnerabilityAssessmentRuleBaselines = new SqlPoolVulnerabilityAssessmentRuleBaselinesInner(restClient().retrofit(), this); + this.extendedSqlPoolBlobAuditingPolicies = new ExtendedSqlPoolBlobAuditingPoliciesInner(restClient().retrofit(), this); + this.dataMaskingPolicies = new DataMaskingPoliciesInner(restClient().retrofit(), this); + this.dataMaskingRules = new DataMaskingRulesInner(restClient().retrofit(), this); + this.sqlPoolColumns = new SqlPoolColumnsInner(restClient().retrofit(), this); this.workspaces = new WorkspacesInner(restClient().retrofit(), this); this.workspaceAadAdmins = new WorkspaceAadAdminsInner(restClient().retrofit(), this); this.workspaceManagedIdentitySqlControlSettings = new WorkspaceManagedIdentitySqlControlSettingsInner(restClient().retrofit(), this); diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SynapseManager.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SynapseManager.java index 3f912eb4e2d6d..231bc822f1225 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SynapseManager.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/SynapseManager.java @@ -39,6 +39,10 @@ import com.microsoft.azure.management.synapse.v2019_06_01_preview.SqlPoolVulnerabilityAssessmentScans; import com.microsoft.azure.management.synapse.v2019_06_01_preview.SqlPoolSecurityAlertPolicies; import com.microsoft.azure.management.synapse.v2019_06_01_preview.SqlPoolVulnerabilityAssessmentRuleBaselines; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.ExtendedSqlPoolBlobAuditingPolicies; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.DataMaskingPolicies; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.DataMaskingRules; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.SqlPoolColumns; import com.microsoft.azure.management.synapse.v2019_06_01_preview.Workspaces; import com.microsoft.azure.management.synapse.v2019_06_01_preview.WorkspaceAadAdmins; import com.microsoft.azure.management.synapse.v2019_06_01_preview.WorkspaceManagedIdentitySqlControlSettings; @@ -84,6 +88,10 @@ public final class SynapseManager extends ManagerCore implements TableSchemaSqlPoolWorkspaceSqlPoolColumn { + private final SynapseManager manager; + + TableSchemaSqlPoolWorkspaceSqlPoolColumnImpl(SqlPoolColumnInner inner, SynapseManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public SynapseManager manager() { + return this.manager; + } + + + + @Override + public ColumnDataType columnType() { + return this.inner().columnType(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/TableSchemaSqlPoolWorkspaceSqlPoolColumnModelImpl.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/TableSchemaSqlPoolWorkspaceSqlPoolColumnModelImpl.java new file mode 100644 index 0000000000000..b25b21eb8fc10 --- /dev/null +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/TableSchemaSqlPoolWorkspaceSqlPoolColumnModelImpl.java @@ -0,0 +1,70 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.synapse.v2019_06_01_preview.implementation; + +import com.microsoft.azure.management.synapse.v2019_06_01_preview.TableSchemaSqlPoolWorkspaceSqlPoolColumnModel; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.ColumnDataType; + +class TableSchemaSqlPoolWorkspaceSqlPoolColumnModelImpl extends IndexableRefreshableWrapperImpl implements TableSchemaSqlPoolWorkspaceSqlPoolColumnModel { + private final SynapseManager manager; + private String resourceGroupName; + private String workspaceName; + private String sqlPoolName; + private String schemaName; + private String tableName; + private String columnName; + + TableSchemaSqlPoolWorkspaceSqlPoolColumnModelImpl(SqlPoolColumnInner inner, SynapseManager manager) { + super(null, inner); + this.manager = manager; + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.workspaceName = IdParsingUtils.getValueFromIdByName(inner.id(), "workspaces"); + this.sqlPoolName = IdParsingUtils.getValueFromIdByName(inner.id(), "sqlPools"); + this.schemaName = IdParsingUtils.getValueFromIdByName(inner.id(), "schemas"); + this.tableName = IdParsingUtils.getValueFromIdByName(inner.id(), "tables"); + this.columnName = IdParsingUtils.getValueFromIdByName(inner.id(), "columns"); + } + + @Override + public SynapseManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + SqlPoolColumnsInner client = this.manager().inner().sqlPoolColumns(); + return client.getAsync(this.resourceGroupName, this.workspaceName, this.sqlPoolName, this.schemaName, this.tableName, this.columnName); + } + + + + @Override + public ColumnDataType columnType() { + return this.inner().columnType(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/VulnerabilityAssessmentScanRecordImpl.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/VulnerabilityAssessmentScanRecordImpl.java index 17ff566f7f09d..175ed54153e5d 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/VulnerabilityAssessmentScanRecordImpl.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/VulnerabilityAssessmentScanRecordImpl.java @@ -9,7 +9,7 @@ package com.microsoft.azure.management.synapse.v2019_06_01_preview.implementation; import com.microsoft.azure.management.synapse.v2019_06_01_preview.VulnerabilityAssessmentScanRecord; -import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; import rx.Observable; import org.joda.time.DateTime; import java.util.List; @@ -17,12 +17,21 @@ import com.microsoft.azure.management.synapse.v2019_06_01_preview.VulnerabilityAssessmentScanState; import com.microsoft.azure.management.synapse.v2019_06_01_preview.VulnerabilityAssessmentScanTriggerType; -class VulnerabilityAssessmentScanRecordImpl extends WrapperImpl implements VulnerabilityAssessmentScanRecord { +class VulnerabilityAssessmentScanRecordImpl extends IndexableRefreshableWrapperImpl implements VulnerabilityAssessmentScanRecord { private final SynapseManager manager; + private String resourceGroupName; + private String workspaceName; + private String sqlPoolName; + private String scanId; VulnerabilityAssessmentScanRecordImpl(VulnerabilityAssessmentScanRecordInner inner, SynapseManager manager) { - super(inner); + super(null, inner); this.manager = manager; + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.workspaceName = IdParsingUtils.getValueFromIdByName(inner.id(), "workspaces"); + this.sqlPoolName = IdParsingUtils.getValueFromIdByName(inner.id(), "sqlPools"); + this.scanId = IdParsingUtils.getValueFromIdByName(inner.id(), "scans"); } @Override @@ -30,6 +39,12 @@ public SynapseManager manager() { return this.manager; } + @Override + protected Observable getInnerAsync() { + SqlPoolVulnerabilityAssessmentScansInner client = this.manager().inner().sqlPoolVulnerabilityAssessmentScans(); + return client.getAsync(this.resourceGroupName, this.workspaceName, this.sqlPoolName, this.scanId); + } + @Override diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/WorkspaceAadAdminsInner.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/WorkspaceAadAdminsInner.java index f32368b741e2f..8f4fb10c11544 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/WorkspaceAadAdminsInner.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/WorkspaceAadAdminsInner.java @@ -12,6 +12,7 @@ import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; import com.microsoft.azure.CloudException; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.ErrorContractInnerException; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import com.microsoft.rest.ServiceResponse; diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/WorkspaceImpl.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/WorkspaceImpl.java index 2ffba0d0f403c..e39371778b798 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/WorkspaceImpl.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/WorkspaceImpl.java @@ -16,9 +16,11 @@ import com.microsoft.azure.management.synapse.v2019_06_01_preview.VirtualNetworkProfile; import java.util.Map; import java.util.List; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.ManagedVirtualNetworkSettings; import com.microsoft.azure.management.synapse.v2019_06_01_preview.ManagedIdentity; import java.util.ArrayList; import com.microsoft.azure.management.synapse.v2019_06_01_preview.PrivateEndpointConnection; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.WorkspacePatchInfoManagedVirtualNetworkSettings; import rx.functions.Func1; class WorkspaceImpl extends GroupableResourceCoreImpl implements Workspace, Workspace.Definition, Workspace.Update { @@ -101,6 +103,11 @@ public String managedVirtualNetwork() { return this.inner().managedVirtualNetwork(); } + @Override + public ManagedVirtualNetworkSettings managedVirtualNetworkSettings() { + return this.inner().managedVirtualNetworkSettings(); + } + @Override public List privateEndpointConnections() { List lst = new ArrayList(); @@ -156,6 +163,12 @@ public WorkspaceImpl withManagedVirtualNetwork(String managedVirtualNetwork) { return this; } + @Override + public WorkspaceImpl withManagedVirtualNetworkSettings(ManagedVirtualNetworkSettings managedVirtualNetworkSettings) { + this.inner().withManagedVirtualNetworkSettings(managedVirtualNetworkSettings); + return this; + } + @Override public WorkspaceImpl withPrivateEndpointConnections(List privateEndpointConnections) { this.inner().withPrivateEndpointConnections(privateEndpointConnections); @@ -174,6 +187,12 @@ public WorkspaceImpl withVirtualNetworkProfile(VirtualNetworkProfile virtualNetw return this; } + @Override + public WorkspaceImpl withManagedVirtualNetworkSettings(WorkspacePatchInfoManagedVirtualNetworkSettings managedVirtualNetworkSettings) { + this.updateParameter.withManagedVirtualNetworkSettings(managedVirtualNetworkSettings); + return this; + } + @Override public WorkspaceImpl withIdentity(ManagedIdentity identity) { if (isInCreateMode()) { diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/WorkspaceInner.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/WorkspaceInner.java index c21cc1cbcba82..9c7b65ed9bf51 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/WorkspaceInner.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/WorkspaceInner.java @@ -12,6 +12,7 @@ import com.microsoft.azure.management.synapse.v2019_06_01_preview.VirtualNetworkProfile; import java.util.Map; import java.util.List; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.ManagedVirtualNetworkSettings; import com.microsoft.azure.management.synapse.v2019_06_01_preview.ManagedIdentity; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; @@ -87,6 +88,12 @@ public class WorkspaceInner extends Resource { @JsonProperty(value = "properties.extraProperties", access = JsonProperty.Access.WRITE_ONLY) private Map extraProperties; + /** + * Managed Virtual Network Settings. + */ + @JsonProperty(value = "properties.managedVirtualNetworkSettings") + private ManagedVirtualNetworkSettings managedVirtualNetworkSettings; + /** * Identity of the workspace. */ @@ -271,6 +278,26 @@ public Map extraProperties() { return this.extraProperties; } + /** + * Get managed Virtual Network Settings. + * + * @return the managedVirtualNetworkSettings value + */ + public ManagedVirtualNetworkSettings managedVirtualNetworkSettings() { + return this.managedVirtualNetworkSettings; + } + + /** + * Set managed Virtual Network Settings. + * + * @param managedVirtualNetworkSettings the managedVirtualNetworkSettings value to set + * @return the WorkspaceInner object itself. + */ + public WorkspaceInner withManagedVirtualNetworkSettings(ManagedVirtualNetworkSettings managedVirtualNetworkSettings) { + this.managedVirtualNetworkSettings = managedVirtualNetworkSettings; + return this; + } + /** * Get identity of the workspace. * diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/WorkspaceManagedIdentitySqlControlSettingsInner.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/WorkspaceManagedIdentitySqlControlSettingsInner.java index a112ce0262cb4..f8d68c92dba59 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/WorkspaceManagedIdentitySqlControlSettingsInner.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/WorkspaceManagedIdentitySqlControlSettingsInner.java @@ -10,6 +10,7 @@ import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.ErrorContractInnerException; import com.microsoft.azure.management.synapse.v2019_06_01_preview.ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; diff --git a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/WorkspacesInner.java b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/WorkspacesInner.java index dde9d4ae03b82..d47552ada98e3 100644 --- a/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/WorkspacesInner.java +++ b/sdk/synapse/mgmt-v2019_06_01_preview/src/main/java/com/microsoft/azure/management/synapse/v2019_06_01_preview/implementation/WorkspacesInner.java @@ -16,6 +16,7 @@ import com.microsoft.azure.AzureServiceFuture; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.synapse.v2019_06_01_preview.ErrorContractInnerException; import com.microsoft.azure.management.synapse.v2019_06_01_preview.WorkspacePatchInfo; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList;