diff --git a/sdk/synapse/azure-resourcemanager-synapse/CHANGELOG.md b/sdk/synapse/azure-resourcemanager-synapse/CHANGELOG.md index e3ef0cf97946a..3e3645ced4917 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/CHANGELOG.md +++ b/sdk/synapse/azure-resourcemanager-synapse/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.3 (Unreleased) +## 1.0.0-beta.1 (2021-09-29) + +- Azure Resource Manager Synapse client library for Java. This package contains Microsoft Azure SDK for Synapse Management SDK. Azure Synapse Analytics Management Client. Package tag package-composite-v1. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/synapse/azure-resourcemanager-synapse/README.md b/sdk/synapse/azure-resourcemanager-synapse/README.md index 2882404371339..beed14da5b1d7 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/README.md +++ b/sdk/synapse/azure-resourcemanager-synapse/README.md @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-synapse - 1.0.0-beta.2 + 1.0.0-beta.3 ``` [//]: # ({x-version-update-end}) @@ -74,7 +74,6 @@ See [API design][design] for general introduction on design and key concepts on ## Examples -[Code snippets and samples](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/synapse/azure-resourcemanager-synapse/SAMPLE.md) ## Troubleshooting diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/SynapseManager.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/SynapseManager.java index 6a0c4e7b3918f..89fa7c030d0b9 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/SynapseManager.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/SynapseManager.java @@ -422,7 +422,7 @@ public SynapseManager authenticate(TokenCredential credential, AzureProfile prof .append("-") .append("com.azure.resourcemanager.synapse") .append("/") - .append("1.0.0-beta.2"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/AadAdminProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/AadAdminProperties.java deleted file mode 100644 index 8560d43e331ff..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/AadAdminProperties.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Workspace active directory administrator properties. */ -@Fluent -public final class AadAdminProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AadAdminProperties.class); - - /* - * Tenant ID of the workspace active directory administrator - */ - @JsonProperty(value = "tenantId") - private String tenantId; - - /* - * Login of the workspace active directory administrator - */ - @JsonProperty(value = "login") - private String login; - - /* - * Workspace active directory administrator type - */ - @JsonProperty(value = "administratorType") - private String administratorType; - - /* - * Object ID of the workspace active directory administrator - */ - @JsonProperty(value = "sid") - private String sid; - - /** - * Get the tenantId property: Tenant ID of the workspace active directory administrator. - * - * @return the tenantId value. - */ - public String tenantId() { - return this.tenantId; - } - - /** - * Set the tenantId property: Tenant ID of the workspace active directory administrator. - * - * @param tenantId the tenantId value to set. - * @return the AadAdminProperties object itself. - */ - public AadAdminProperties withTenantId(String tenantId) { - this.tenantId = tenantId; - return this; - } - - /** - * Get the login property: Login of the workspace active directory administrator. - * - * @return the login value. - */ - public String login() { - return this.login; - } - - /** - * Set the login property: Login of the workspace active directory administrator. - * - * @param login the login value to set. - * @return the AadAdminProperties object itself. - */ - public AadAdminProperties withLogin(String login) { - this.login = login; - return this; - } - - /** - * Get the administratorType property: Workspace active directory administrator type. - * - * @return the administratorType value. - */ - public String administratorType() { - return this.administratorType; - } - - /** - * Set the administratorType property: Workspace active directory administrator type. - * - * @param administratorType the administratorType value to set. - * @return the AadAdminProperties object itself. - */ - public AadAdminProperties withAdministratorType(String administratorType) { - this.administratorType = administratorType; - return this; - } - - /** - * Get the sid property: Object ID of the workspace active directory administrator. - * - * @return the sid value. - */ - public String sid() { - return this.sid; - } - - /** - * Set the sid property: Object ID of the workspace active directory administrator. - * - * @param sid the sid value to set. - * @return the AadAdminProperties object itself. - */ - public AadAdminProperties withSid(String sid) { - this.sid = sid; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/AvailableRpOperationInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/AvailableRpOperationInner.java index b5b2ab132ba82..9910f145d2835 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/AvailableRpOperationInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/AvailableRpOperationInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.AvailableRpOperationDisplayInfo; import com.azure.resourcemanager.synapse.models.OperationMetaServiceSpecification; @@ -12,8 +13,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** An operation that is available in this resource provider. */ +@JsonFlatten @Fluent -public final class AvailableRpOperationInner { +public class AvailableRpOperationInner { @JsonIgnore private final ClientLogger logger = new ClientLogger(AvailableRpOperationInner.class); /* @@ -34,18 +36,18 @@ public final class AvailableRpOperationInner { @JsonProperty(value = "name") private String name; - /* - * Operation properties - */ - @JsonProperty(value = "properties") - private OperationMetaPropertyInfo innerProperties; - /* * Operation origin */ @JsonProperty(value = "origin") private String origin; + /* + * Operation service specification + */ + @JsonProperty(value = "properties.serviceSpecification") + private OperationMetaServiceSpecification serviceSpecification; + /** * Get the display property: Display properties of the operation. * @@ -106,15 +108,6 @@ public AvailableRpOperationInner withName(String name) { return this; } - /** - * Get the innerProperties property: Operation properties. - * - * @return the innerProperties value. - */ - private OperationMetaPropertyInfo innerProperties() { - return this.innerProperties; - } - /** * Get the origin property: Operation origin. * @@ -141,7 +134,7 @@ public AvailableRpOperationInner withOrigin(String origin) { * @return the serviceSpecification value. */ public OperationMetaServiceSpecification serviceSpecification() { - return this.innerProperties() == null ? null : this.innerProperties().serviceSpecification(); + return this.serviceSpecification; } /** @@ -151,10 +144,7 @@ public OperationMetaServiceSpecification serviceSpecification() { * @return the AvailableRpOperationInner object itself. */ public AvailableRpOperationInner withServiceSpecification(OperationMetaServiceSpecification serviceSpecification) { - if (this.innerProperties() == null) { - this.innerProperties = new OperationMetaPropertyInfo(); - } - this.innerProperties().withServiceSpecification(serviceSpecification); + this.serviceSpecification = serviceSpecification; return this; } @@ -167,8 +157,8 @@ public void validate() { if (display() != null) { display().validate(); } - if (innerProperties() != null) { - innerProperties().validate(); + if (serviceSpecification() != null) { + serviceSpecification().validate(); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/AzureADOnlyAuthenticationInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/AzureADOnlyAuthenticationInner.java index 71889b98060db..339ec1ee81218 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/AzureADOnlyAuthenticationInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/AzureADOnlyAuthenticationInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.StateValue; @@ -13,24 +14,28 @@ import java.time.OffsetDateTime; /** Azure Active Directory Only Authentication Info. */ +@JsonFlatten @Fluent -public final class AzureADOnlyAuthenticationInner extends ProxyResource { +public class AzureADOnlyAuthenticationInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureADOnlyAuthenticationInner.class); /* - * azureADOnlyAuthentication resource properties + * Azure Active Directory only Authentication enabled. */ - @JsonProperty(value = "properties") - private AzureADOnlyAuthenticationProperties innerProperties; + @JsonProperty(value = "properties.azureADOnlyAuthentication") + private Boolean azureADOnlyAuthentication; - /** - * Get the innerProperties property: azureADOnlyAuthentication resource properties. - * - * @return the innerProperties value. + /* + * property configuration state */ - private AzureADOnlyAuthenticationProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY) + private StateValue state; + + /* + * property configuration date + */ + @JsonProperty(value = "properties.creationDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime creationDate; /** * Get the azureADOnlyAuthentication property: Azure Active Directory only Authentication enabled. @@ -38,7 +43,7 @@ private AzureADOnlyAuthenticationProperties innerProperties() { * @return the azureADOnlyAuthentication value. */ public Boolean azureADOnlyAuthentication() { - return this.innerProperties() == null ? null : this.innerProperties().azureADOnlyAuthentication(); + return this.azureADOnlyAuthentication; } /** @@ -48,10 +53,7 @@ public Boolean azureADOnlyAuthentication() { * @return the AzureADOnlyAuthenticationInner object itself. */ public AzureADOnlyAuthenticationInner withAzureADOnlyAuthentication(Boolean azureADOnlyAuthentication) { - if (this.innerProperties() == null) { - this.innerProperties = new AzureADOnlyAuthenticationProperties(); - } - this.innerProperties().withAzureADOnlyAuthentication(azureADOnlyAuthentication); + this.azureADOnlyAuthentication = azureADOnlyAuthentication; return this; } @@ -61,7 +63,7 @@ public AzureADOnlyAuthenticationInner withAzureADOnlyAuthentication(Boolean azur * @return the state value. */ public StateValue state() { - return this.innerProperties() == null ? null : this.innerProperties().state(); + return this.state; } /** @@ -70,7 +72,7 @@ public StateValue state() { * @return the creationDate value. */ public OffsetDateTime creationDate() { - return this.innerProperties() == null ? null : this.innerProperties().creationDate(); + return this.creationDate; } /** @@ -79,8 +81,5 @@ public OffsetDateTime creationDate() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/AzureADOnlyAuthenticationProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/AzureADOnlyAuthenticationProperties.java deleted file mode 100644 index 59a1e1a0dd1be..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/AzureADOnlyAuthenticationProperties.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.StateValue; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** Properties of a active directory only authentication. */ -@Fluent -public final class AzureADOnlyAuthenticationProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(AzureADOnlyAuthenticationProperties.class); - - /* - * Azure Active Directory only Authentication enabled. - */ - @JsonProperty(value = "azureADOnlyAuthentication", required = true) - private boolean azureADOnlyAuthentication; - - /* - * property configuration state - */ - @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) - private StateValue state; - - /* - * property configuration date - */ - @JsonProperty(value = "creationDate", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime creationDate; - - /** - * Get the azureADOnlyAuthentication property: Azure Active Directory only Authentication enabled. - * - * @return the azureADOnlyAuthentication value. - */ - public boolean azureADOnlyAuthentication() { - return this.azureADOnlyAuthentication; - } - - /** - * Set the azureADOnlyAuthentication property: Azure Active Directory only Authentication enabled. - * - * @param azureADOnlyAuthentication the azureADOnlyAuthentication value to set. - * @return the AzureADOnlyAuthenticationProperties object itself. - */ - public AzureADOnlyAuthenticationProperties withAzureADOnlyAuthentication(boolean azureADOnlyAuthentication) { - this.azureADOnlyAuthentication = azureADOnlyAuthentication; - return this; - } - - /** - * Get the state property: property configuration state. - * - * @return the state value. - */ - public StateValue state() { - return this.state; - } - - /** - * Get the creationDate property: property configuration date. - * - * @return the creationDate value. - */ - public OffsetDateTime creationDate() { - return this.creationDate; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/BigDataPoolResourceInfoInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/BigDataPoolResourceInfoInner.java index 140295794564b..c21a2bc733420 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/BigDataPoolResourceInfoInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/BigDataPoolResourceInfoInner.java @@ -5,11 +5,13 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.Resource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.AutoPauseProperties; import com.azure.resourcemanager.synapse.models.AutoScaleProperties; import com.azure.resourcemanager.synapse.models.DynamicExecutorAllocation; +import com.azure.resourcemanager.synapse.models.LibraryInfo; import com.azure.resourcemanager.synapse.models.LibraryRequirements; import com.azure.resourcemanager.synapse.models.NodeSize; import com.azure.resourcemanager.synapse.models.NodeSizeFamily; @@ -21,38 +23,119 @@ import java.util.Map; /** Big Data pool A Big Data pool. */ +@JsonFlatten @Fluent -public final class BigDataPoolResourceInfoInner extends Resource { +public class BigDataPoolResourceInfoInner extends Resource { @JsonIgnore private final ClientLogger logger = new ClientLogger(BigDataPoolResourceInfoInner.class); /* - * Spark pool properties Big Data pool properties + * The state of the Big Data pool. */ - @JsonProperty(value = "properties") - private BigDataPoolResourceProperties innerProperties; + @JsonProperty(value = "properties.provisioningState") + private String provisioningState; - /** - * Get the innerProperties property: Spark pool properties Big Data pool properties. - * - * @return the innerProperties value. + /* + * Spark pool auto-scaling properties Auto-scaling properties */ - private BigDataPoolResourceProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.autoScale") + private AutoScaleProperties autoScale; - /** {@inheritDoc} */ - @Override - public BigDataPoolResourceInfoInner withLocation(String location) { - super.withLocation(location); - return this; - } + /* + * The time when the Big Data pool was created. + */ + @JsonProperty(value = "properties.creationDate") + private OffsetDateTime creationDate; - /** {@inheritDoc} */ - @Override - public BigDataPoolResourceInfoInner withTags(Map tags) { - super.withTags(tags); - return this; - } + /* + * Spark pool auto-pausing properties Auto-pausing properties + */ + @JsonProperty(value = "properties.autoPause") + private AutoPauseProperties autoPause; + + /* + * Whether compute isolation is required or not. + */ + @JsonProperty(value = "properties.isComputeIsolationEnabled") + private Boolean isComputeIsolationEnabled; + + /* + * Whether session level packages enabled. + */ + @JsonProperty(value = "properties.sessionLevelPackagesEnabled") + private Boolean sessionLevelPackagesEnabled; + + /* + * The cache size + */ + @JsonProperty(value = "properties.cacheSize") + private Integer cacheSize; + + /* + * Dynamic Executor Allocation + */ + @JsonProperty(value = "properties.dynamicExecutorAllocation") + private DynamicExecutorAllocation dynamicExecutorAllocation; + + /* + * The Spark events folder + */ + @JsonProperty(value = "properties.sparkEventsFolder") + private String sparkEventsFolder; + + /* + * The number of nodes in the Big Data pool. + */ + @JsonProperty(value = "properties.nodeCount") + private Integer nodeCount; + + /* + * Spark pool library version requirements Library version requirements + */ + @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 pool Config Properties Spark configuration file to specify + * additional properties + */ + @JsonProperty(value = "properties.sparkConfigProperties") + private SparkConfigProperties sparkConfigProperties; + + /* + * The Apache Spark version. + */ + @JsonProperty(value = "properties.sparkVersion") + private String sparkVersion; + + /* + * The default folder where Spark logs will be written. + */ + @JsonProperty(value = "properties.defaultSparkLogFolder") + private String defaultSparkLogFolder; + + /* + * The level of compute power that each node in the Big Data pool has. + */ + @JsonProperty(value = "properties.nodeSize") + private NodeSize nodeSize; + + /* + * The kind of nodes that the Big Data pool provides. + */ + @JsonProperty(value = "properties.nodeSizeFamily") + private NodeSizeFamily nodeSizeFamily; + + /* + * The time when the Big Data pool was updated successfully. + */ + @JsonProperty(value = "properties.lastSucceededTimestamp", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastSucceededTimestamp; /** * Get the provisioningState property: The state of the Big Data pool. @@ -60,7 +143,7 @@ public BigDataPoolResourceInfoInner withTags(Map tags) { * @return the provisioningState value. */ public String provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + return this.provisioningState; } /** @@ -70,10 +153,7 @@ public String provisioningState() { * @return the BigDataPoolResourceInfoInner object itself. */ public BigDataPoolResourceInfoInner withProvisioningState(String provisioningState) { - if (this.innerProperties() == null) { - this.innerProperties = new BigDataPoolResourceProperties(); - } - this.innerProperties().withProvisioningState(provisioningState); + this.provisioningState = provisioningState; return this; } @@ -83,7 +163,7 @@ public BigDataPoolResourceInfoInner withProvisioningState(String provisioningSta * @return the autoScale value. */ public AutoScaleProperties autoScale() { - return this.innerProperties() == null ? null : this.innerProperties().autoScale(); + return this.autoScale; } /** @@ -93,10 +173,7 @@ public AutoScaleProperties autoScale() { * @return the BigDataPoolResourceInfoInner object itself. */ public BigDataPoolResourceInfoInner withAutoScale(AutoScaleProperties autoScale) { - if (this.innerProperties() == null) { - this.innerProperties = new BigDataPoolResourceProperties(); - } - this.innerProperties().withAutoScale(autoScale); + this.autoScale = autoScale; return this; } @@ -106,7 +183,7 @@ public BigDataPoolResourceInfoInner withAutoScale(AutoScaleProperties autoScale) * @return the creationDate value. */ public OffsetDateTime creationDate() { - return this.innerProperties() == null ? null : this.innerProperties().creationDate(); + return this.creationDate; } /** @@ -116,10 +193,7 @@ public OffsetDateTime creationDate() { * @return the BigDataPoolResourceInfoInner object itself. */ public BigDataPoolResourceInfoInner withCreationDate(OffsetDateTime creationDate) { - if (this.innerProperties() == null) { - this.innerProperties = new BigDataPoolResourceProperties(); - } - this.innerProperties().withCreationDate(creationDate); + this.creationDate = creationDate; return this; } @@ -129,7 +203,7 @@ public BigDataPoolResourceInfoInner withCreationDate(OffsetDateTime creationDate * @return the autoPause value. */ public AutoPauseProperties autoPause() { - return this.innerProperties() == null ? null : this.innerProperties().autoPause(); + return this.autoPause; } /** @@ -139,10 +213,7 @@ public AutoPauseProperties autoPause() { * @return the BigDataPoolResourceInfoInner object itself. */ public BigDataPoolResourceInfoInner withAutoPause(AutoPauseProperties autoPause) { - if (this.innerProperties() == null) { - this.innerProperties = new BigDataPoolResourceProperties(); - } - this.innerProperties().withAutoPause(autoPause); + this.autoPause = autoPause; return this; } @@ -152,7 +223,7 @@ public BigDataPoolResourceInfoInner withAutoPause(AutoPauseProperties autoPause) * @return the isComputeIsolationEnabled value. */ public Boolean isComputeIsolationEnabled() { - return this.innerProperties() == null ? null : this.innerProperties().isComputeIsolationEnabled(); + return this.isComputeIsolationEnabled; } /** @@ -162,10 +233,7 @@ public Boolean isComputeIsolationEnabled() { * @return the BigDataPoolResourceInfoInner object itself. */ public BigDataPoolResourceInfoInner withIsComputeIsolationEnabled(Boolean isComputeIsolationEnabled) { - if (this.innerProperties() == null) { - this.innerProperties = new BigDataPoolResourceProperties(); - } - this.innerProperties().withIsComputeIsolationEnabled(isComputeIsolationEnabled); + this.isComputeIsolationEnabled = isComputeIsolationEnabled; return this; } @@ -175,7 +243,7 @@ public BigDataPoolResourceInfoInner withIsComputeIsolationEnabled(Boolean isComp * @return the sessionLevelPackagesEnabled value. */ public Boolean sessionLevelPackagesEnabled() { - return this.innerProperties() == null ? null : this.innerProperties().sessionLevelPackagesEnabled(); + return this.sessionLevelPackagesEnabled; } /** @@ -185,10 +253,7 @@ public Boolean sessionLevelPackagesEnabled() { * @return the BigDataPoolResourceInfoInner object itself. */ public BigDataPoolResourceInfoInner withSessionLevelPackagesEnabled(Boolean sessionLevelPackagesEnabled) { - if (this.innerProperties() == null) { - this.innerProperties = new BigDataPoolResourceProperties(); - } - this.innerProperties().withSessionLevelPackagesEnabled(sessionLevelPackagesEnabled); + this.sessionLevelPackagesEnabled = sessionLevelPackagesEnabled; return this; } @@ -198,7 +263,7 @@ public BigDataPoolResourceInfoInner withSessionLevelPackagesEnabled(Boolean sess * @return the cacheSize value. */ public Integer cacheSize() { - return this.innerProperties() == null ? null : this.innerProperties().cacheSize(); + return this.cacheSize; } /** @@ -208,10 +273,7 @@ public Integer cacheSize() { * @return the BigDataPoolResourceInfoInner object itself. */ public BigDataPoolResourceInfoInner withCacheSize(Integer cacheSize) { - if (this.innerProperties() == null) { - this.innerProperties = new BigDataPoolResourceProperties(); - } - this.innerProperties().withCacheSize(cacheSize); + this.cacheSize = cacheSize; return this; } @@ -221,7 +283,7 @@ public BigDataPoolResourceInfoInner withCacheSize(Integer cacheSize) { * @return the dynamicExecutorAllocation value. */ public DynamicExecutorAllocation dynamicExecutorAllocation() { - return this.innerProperties() == null ? null : this.innerProperties().dynamicExecutorAllocation(); + return this.dynamicExecutorAllocation; } /** @@ -232,10 +294,7 @@ public DynamicExecutorAllocation dynamicExecutorAllocation() { */ public BigDataPoolResourceInfoInner withDynamicExecutorAllocation( DynamicExecutorAllocation dynamicExecutorAllocation) { - if (this.innerProperties() == null) { - this.innerProperties = new BigDataPoolResourceProperties(); - } - this.innerProperties().withDynamicExecutorAllocation(dynamicExecutorAllocation); + this.dynamicExecutorAllocation = dynamicExecutorAllocation; return this; } @@ -245,7 +304,7 @@ public BigDataPoolResourceInfoInner withDynamicExecutorAllocation( * @return the sparkEventsFolder value. */ public String sparkEventsFolder() { - return this.innerProperties() == null ? null : this.innerProperties().sparkEventsFolder(); + return this.sparkEventsFolder; } /** @@ -255,10 +314,7 @@ public String sparkEventsFolder() { * @return the BigDataPoolResourceInfoInner object itself. */ public BigDataPoolResourceInfoInner withSparkEventsFolder(String sparkEventsFolder) { - if (this.innerProperties() == null) { - this.innerProperties = new BigDataPoolResourceProperties(); - } - this.innerProperties().withSparkEventsFolder(sparkEventsFolder); + this.sparkEventsFolder = sparkEventsFolder; return this; } @@ -268,7 +324,7 @@ public BigDataPoolResourceInfoInner withSparkEventsFolder(String sparkEventsFold * @return the nodeCount value. */ public Integer nodeCount() { - return this.innerProperties() == null ? null : this.innerProperties().nodeCount(); + return this.nodeCount; } /** @@ -278,10 +334,7 @@ public Integer nodeCount() { * @return the BigDataPoolResourceInfoInner object itself. */ public BigDataPoolResourceInfoInner withNodeCount(Integer nodeCount) { - if (this.innerProperties() == null) { - this.innerProperties = new BigDataPoolResourceProperties(); - } - this.innerProperties().withNodeCount(nodeCount); + this.nodeCount = nodeCount; return this; } @@ -291,7 +344,7 @@ public BigDataPoolResourceInfoInner withNodeCount(Integer nodeCount) { * @return the libraryRequirements value. */ public LibraryRequirements libraryRequirements() { - return this.innerProperties() == null ? null : this.innerProperties().libraryRequirements(); + return this.libraryRequirements; } /** @@ -301,10 +354,7 @@ public LibraryRequirements libraryRequirements() { * @return the BigDataPoolResourceInfoInner object itself. */ public BigDataPoolResourceInfoInner withLibraryRequirements(LibraryRequirements libraryRequirements) { - if (this.innerProperties() == null) { - this.innerProperties = new BigDataPoolResourceProperties(); - } - this.innerProperties().withLibraryRequirements(libraryRequirements); + this.libraryRequirements = libraryRequirements; return this; } @@ -314,7 +364,7 @@ public BigDataPoolResourceInfoInner withLibraryRequirements(LibraryRequirements * @return the customLibraries value. */ public List customLibraries() { - return this.innerProperties() == null ? null : this.innerProperties().customLibraries(); + return this.customLibraries; } /** @@ -324,10 +374,7 @@ public List customLibraries() { * @return the BigDataPoolResourceInfoInner object itself. */ public BigDataPoolResourceInfoInner withCustomLibraries(List customLibraries) { - if (this.innerProperties() == null) { - this.innerProperties = new BigDataPoolResourceProperties(); - } - this.innerProperties().withCustomLibraries(customLibraries); + this.customLibraries = customLibraries; return this; } @@ -338,7 +385,7 @@ public BigDataPoolResourceInfoInner withCustomLibraries(List custom * @return the sparkConfigProperties value. */ public SparkConfigProperties sparkConfigProperties() { - return this.innerProperties() == null ? null : this.innerProperties().sparkConfigProperties(); + return this.sparkConfigProperties; } /** @@ -349,10 +396,7 @@ public SparkConfigProperties sparkConfigProperties() { * @return the BigDataPoolResourceInfoInner object itself. */ public BigDataPoolResourceInfoInner withSparkConfigProperties(SparkConfigProperties sparkConfigProperties) { - if (this.innerProperties() == null) { - this.innerProperties = new BigDataPoolResourceProperties(); - } - this.innerProperties().withSparkConfigProperties(sparkConfigProperties); + this.sparkConfigProperties = sparkConfigProperties; return this; } @@ -362,7 +406,7 @@ public BigDataPoolResourceInfoInner withSparkConfigProperties(SparkConfigPropert * @return the sparkVersion value. */ public String sparkVersion() { - return this.innerProperties() == null ? null : this.innerProperties().sparkVersion(); + return this.sparkVersion; } /** @@ -372,10 +416,7 @@ public String sparkVersion() { * @return the BigDataPoolResourceInfoInner object itself. */ public BigDataPoolResourceInfoInner withSparkVersion(String sparkVersion) { - if (this.innerProperties() == null) { - this.innerProperties = new BigDataPoolResourceProperties(); - } - this.innerProperties().withSparkVersion(sparkVersion); + this.sparkVersion = sparkVersion; return this; } @@ -385,7 +426,7 @@ public BigDataPoolResourceInfoInner withSparkVersion(String sparkVersion) { * @return the defaultSparkLogFolder value. */ public String defaultSparkLogFolder() { - return this.innerProperties() == null ? null : this.innerProperties().defaultSparkLogFolder(); + return this.defaultSparkLogFolder; } /** @@ -395,10 +436,7 @@ public String defaultSparkLogFolder() { * @return the BigDataPoolResourceInfoInner object itself. */ public BigDataPoolResourceInfoInner withDefaultSparkLogFolder(String defaultSparkLogFolder) { - if (this.innerProperties() == null) { - this.innerProperties = new BigDataPoolResourceProperties(); - } - this.innerProperties().withDefaultSparkLogFolder(defaultSparkLogFolder); + this.defaultSparkLogFolder = defaultSparkLogFolder; return this; } @@ -408,7 +446,7 @@ public BigDataPoolResourceInfoInner withDefaultSparkLogFolder(String defaultSpar * @return the nodeSize value. */ public NodeSize nodeSize() { - return this.innerProperties() == null ? null : this.innerProperties().nodeSize(); + return this.nodeSize; } /** @@ -418,10 +456,7 @@ public NodeSize nodeSize() { * @return the BigDataPoolResourceInfoInner object itself. */ public BigDataPoolResourceInfoInner withNodeSize(NodeSize nodeSize) { - if (this.innerProperties() == null) { - this.innerProperties = new BigDataPoolResourceProperties(); - } - this.innerProperties().withNodeSize(nodeSize); + this.nodeSize = nodeSize; return this; } @@ -431,7 +466,7 @@ public BigDataPoolResourceInfoInner withNodeSize(NodeSize nodeSize) { * @return the nodeSizeFamily value. */ public NodeSizeFamily nodeSizeFamily() { - return this.innerProperties() == null ? null : this.innerProperties().nodeSizeFamily(); + return this.nodeSizeFamily; } /** @@ -441,10 +476,7 @@ public NodeSizeFamily nodeSizeFamily() { * @return the BigDataPoolResourceInfoInner object itself. */ public BigDataPoolResourceInfoInner withNodeSizeFamily(NodeSizeFamily nodeSizeFamily) { - if (this.innerProperties() == null) { - this.innerProperties = new BigDataPoolResourceProperties(); - } - this.innerProperties().withNodeSizeFamily(nodeSizeFamily); + this.nodeSizeFamily = nodeSizeFamily; return this; } @@ -454,7 +486,21 @@ public BigDataPoolResourceInfoInner withNodeSizeFamily(NodeSizeFamily nodeSizeFa * @return the lastSucceededTimestamp value. */ public OffsetDateTime lastSucceededTimestamp() { - return this.innerProperties() == null ? null : this.innerProperties().lastSucceededTimestamp(); + return this.lastSucceededTimestamp; + } + + /** {@inheritDoc} */ + @Override + public BigDataPoolResourceInfoInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public BigDataPoolResourceInfoInner withTags(Map tags) { + super.withTags(tags); + return this; } /** @@ -463,8 +509,23 @@ public OffsetDateTime lastSucceededTimestamp() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (autoScale() != null) { + autoScale().validate(); + } + if (autoPause() != null) { + autoPause().validate(); + } + if (dynamicExecutorAllocation() != null) { + dynamicExecutorAllocation().validate(); + } + if (libraryRequirements() != null) { + libraryRequirements().validate(); + } + if (customLibraries() != null) { + customLibraries().forEach(e -> e.validate()); + } + if (sparkConfigProperties() != null) { + sparkConfigProperties().validate(); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/BigDataPoolResourceProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/BigDataPoolResourceProperties.java deleted file mode 100644 index 918608da1d773..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/BigDataPoolResourceProperties.java +++ /dev/null @@ -1,512 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.AutoPauseProperties; -import com.azure.resourcemanager.synapse.models.AutoScaleProperties; -import com.azure.resourcemanager.synapse.models.DynamicExecutorAllocation; -import com.azure.resourcemanager.synapse.models.LibraryRequirements; -import com.azure.resourcemanager.synapse.models.NodeSize; -import com.azure.resourcemanager.synapse.models.NodeSizeFamily; -import com.azure.resourcemanager.synapse.models.SparkConfigProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Spark pool properties Properties of a Big Data pool powered by Apache Spark. */ -@Fluent -public final class BigDataPoolResourceProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(BigDataPoolResourceProperties.class); - - /* - * The state of the Big Data pool. - */ - @JsonProperty(value = "provisioningState") - private String provisioningState; - - /* - * Spark pool auto-scaling properties Auto-scaling properties - */ - @JsonProperty(value = "autoScale") - private AutoScaleProperties autoScale; - - /* - * The time when the Big Data pool was created. - */ - @JsonProperty(value = "creationDate") - private OffsetDateTime creationDate; - - /* - * Spark pool auto-pausing properties Auto-pausing properties - */ - @JsonProperty(value = "autoPause") - private AutoPauseProperties autoPause; - - /* - * Whether compute isolation is required or not. - */ - @JsonProperty(value = "isComputeIsolationEnabled") - private Boolean isComputeIsolationEnabled; - - /* - * Whether session level packages enabled. - */ - @JsonProperty(value = "sessionLevelPackagesEnabled") - private Boolean sessionLevelPackagesEnabled; - - /* - * The cache size - */ - @JsonProperty(value = "cacheSize") - private Integer cacheSize; - - /* - * Dynamic Executor Allocation - */ - @JsonProperty(value = "dynamicExecutorAllocation") - private DynamicExecutorAllocation dynamicExecutorAllocation; - - /* - * The Spark events folder - */ - @JsonProperty(value = "sparkEventsFolder") - private String sparkEventsFolder; - - /* - * The number of nodes in the Big Data pool. - */ - @JsonProperty(value = "nodeCount") - private Integer nodeCount; - - /* - * Spark pool library version requirements Library version requirements - */ - @JsonProperty(value = "libraryRequirements") - private LibraryRequirements libraryRequirements; - - /* - * List of custom libraries/packages associated with the spark pool. - */ - @JsonProperty(value = "customLibraries") - private List customLibraries; - - /* - * Spark pool Config Properties Spark configuration file to specify - * additional properties - */ - @JsonProperty(value = "sparkConfigProperties") - private SparkConfigProperties sparkConfigProperties; - - /* - * The Apache Spark version. - */ - @JsonProperty(value = "sparkVersion") - private String sparkVersion; - - /* - * The default folder where Spark logs will be written. - */ - @JsonProperty(value = "defaultSparkLogFolder") - private String defaultSparkLogFolder; - - /* - * The level of compute power that each node in the Big Data pool has. - */ - @JsonProperty(value = "nodeSize") - private NodeSize nodeSize; - - /* - * The kind of nodes that the Big Data pool provides. - */ - @JsonProperty(value = "nodeSizeFamily") - private NodeSizeFamily nodeSizeFamily; - - /* - * The time when the Big Data pool was updated successfully. - */ - @JsonProperty(value = "lastSucceededTimestamp", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastSucceededTimestamp; - - /** - * Get the provisioningState property: The state of the Big Data pool. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState property: The state of the Big Data pool. - * - * @param provisioningState the provisioningState value to set. - * @return the BigDataPoolResourceProperties object itself. - */ - public BigDataPoolResourceProperties withProvisioningState(String provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the autoScale property: Spark pool auto-scaling properties Auto-scaling properties. - * - * @return the autoScale value. - */ - public AutoScaleProperties autoScale() { - return this.autoScale; - } - - /** - * Set the autoScale property: Spark pool auto-scaling properties Auto-scaling properties. - * - * @param autoScale the autoScale value to set. - * @return the BigDataPoolResourceProperties object itself. - */ - public BigDataPoolResourceProperties withAutoScale(AutoScaleProperties autoScale) { - this.autoScale = autoScale; - return this; - } - - /** - * Get the creationDate property: The time when the Big Data pool was created. - * - * @return the creationDate value. - */ - public OffsetDateTime creationDate() { - return this.creationDate; - } - - /** - * Set the creationDate property: The time when the Big Data pool was created. - * - * @param creationDate the creationDate value to set. - * @return the BigDataPoolResourceProperties object itself. - */ - public BigDataPoolResourceProperties withCreationDate(OffsetDateTime creationDate) { - this.creationDate = creationDate; - return this; - } - - /** - * Get the autoPause property: Spark pool auto-pausing properties Auto-pausing properties. - * - * @return the autoPause value. - */ - public AutoPauseProperties autoPause() { - return this.autoPause; - } - - /** - * Set the autoPause property: Spark pool auto-pausing properties Auto-pausing properties. - * - * @param autoPause the autoPause value to set. - * @return the BigDataPoolResourceProperties object itself. - */ - public BigDataPoolResourceProperties withAutoPause(AutoPauseProperties autoPause) { - this.autoPause = autoPause; - return this; - } - - /** - * Get the isComputeIsolationEnabled property: Whether compute isolation is required or not. - * - * @return the isComputeIsolationEnabled value. - */ - public Boolean isComputeIsolationEnabled() { - return this.isComputeIsolationEnabled; - } - - /** - * Set the isComputeIsolationEnabled property: Whether compute isolation is required or not. - * - * @param isComputeIsolationEnabled the isComputeIsolationEnabled value to set. - * @return the BigDataPoolResourceProperties object itself. - */ - public BigDataPoolResourceProperties withIsComputeIsolationEnabled(Boolean isComputeIsolationEnabled) { - this.isComputeIsolationEnabled = isComputeIsolationEnabled; - return this; - } - - /** - * Get the sessionLevelPackagesEnabled property: Whether session level packages enabled. - * - * @return the sessionLevelPackagesEnabled value. - */ - public Boolean sessionLevelPackagesEnabled() { - return this.sessionLevelPackagesEnabled; - } - - /** - * Set the sessionLevelPackagesEnabled property: Whether session level packages enabled. - * - * @param sessionLevelPackagesEnabled the sessionLevelPackagesEnabled value to set. - * @return the BigDataPoolResourceProperties object itself. - */ - public BigDataPoolResourceProperties withSessionLevelPackagesEnabled(Boolean sessionLevelPackagesEnabled) { - this.sessionLevelPackagesEnabled = sessionLevelPackagesEnabled; - return this; - } - - /** - * Get the cacheSize property: The cache size. - * - * @return the cacheSize value. - */ - public Integer cacheSize() { - return this.cacheSize; - } - - /** - * Set the cacheSize property: The cache size. - * - * @param cacheSize the cacheSize value to set. - * @return the BigDataPoolResourceProperties object itself. - */ - public BigDataPoolResourceProperties withCacheSize(Integer cacheSize) { - this.cacheSize = cacheSize; - return this; - } - - /** - * Get the dynamicExecutorAllocation property: Dynamic Executor Allocation. - * - * @return the dynamicExecutorAllocation value. - */ - public DynamicExecutorAllocation dynamicExecutorAllocation() { - return this.dynamicExecutorAllocation; - } - - /** - * Set the dynamicExecutorAllocation property: Dynamic Executor Allocation. - * - * @param dynamicExecutorAllocation the dynamicExecutorAllocation value to set. - * @return the BigDataPoolResourceProperties object itself. - */ - public BigDataPoolResourceProperties withDynamicExecutorAllocation( - DynamicExecutorAllocation dynamicExecutorAllocation) { - this.dynamicExecutorAllocation = dynamicExecutorAllocation; - return this; - } - - /** - * Get the sparkEventsFolder property: The Spark events folder. - * - * @return the sparkEventsFolder value. - */ - public String sparkEventsFolder() { - return this.sparkEventsFolder; - } - - /** - * Set the sparkEventsFolder property: The Spark events folder. - * - * @param sparkEventsFolder the sparkEventsFolder value to set. - * @return the BigDataPoolResourceProperties object itself. - */ - public BigDataPoolResourceProperties withSparkEventsFolder(String sparkEventsFolder) { - this.sparkEventsFolder = sparkEventsFolder; - return this; - } - - /** - * Get the nodeCount property: The number of nodes in the Big Data pool. - * - * @return the nodeCount value. - */ - public Integer nodeCount() { - return this.nodeCount; - } - - /** - * Set the nodeCount property: The number of nodes in the Big Data pool. - * - * @param nodeCount the nodeCount value to set. - * @return the BigDataPoolResourceProperties object itself. - */ - public BigDataPoolResourceProperties withNodeCount(Integer nodeCount) { - this.nodeCount = nodeCount; - return this; - } - - /** - * Get the libraryRequirements property: Spark pool library version requirements Library version requirements. - * - * @return the libraryRequirements value. - */ - public LibraryRequirements libraryRequirements() { - return this.libraryRequirements; - } - - /** - * Set the libraryRequirements property: Spark pool library version requirements Library version requirements. - * - * @param libraryRequirements the libraryRequirements value to set. - * @return the BigDataPoolResourceProperties object itself. - */ - public BigDataPoolResourceProperties withLibraryRequirements(LibraryRequirements libraryRequirements) { - this.libraryRequirements = libraryRequirements; - return this; - } - - /** - * Get the customLibraries property: List of custom libraries/packages associated with the spark pool. - * - * @return the customLibraries value. - */ - public List customLibraries() { - return this.customLibraries; - } - - /** - * Set the customLibraries property: List of custom libraries/packages associated with the spark pool. - * - * @param customLibraries the customLibraries value to set. - * @return the BigDataPoolResourceProperties object itself. - */ - public BigDataPoolResourceProperties withCustomLibraries(List customLibraries) { - this.customLibraries = customLibraries; - return this; - } - - /** - * Get the sparkConfigProperties property: Spark pool Config Properties Spark configuration file to specify - * additional properties. - * - * @return the sparkConfigProperties value. - */ - public SparkConfigProperties sparkConfigProperties() { - return this.sparkConfigProperties; - } - - /** - * Set the sparkConfigProperties property: Spark pool Config Properties Spark configuration file to specify - * additional properties. - * - * @param sparkConfigProperties the sparkConfigProperties value to set. - * @return the BigDataPoolResourceProperties object itself. - */ - public BigDataPoolResourceProperties withSparkConfigProperties(SparkConfigProperties sparkConfigProperties) { - this.sparkConfigProperties = sparkConfigProperties; - return this; - } - - /** - * Get the sparkVersion property: The Apache Spark version. - * - * @return the sparkVersion value. - */ - public String sparkVersion() { - return this.sparkVersion; - } - - /** - * Set the sparkVersion property: The Apache Spark version. - * - * @param sparkVersion the sparkVersion value to set. - * @return the BigDataPoolResourceProperties object itself. - */ - public BigDataPoolResourceProperties withSparkVersion(String sparkVersion) { - this.sparkVersion = sparkVersion; - return this; - } - - /** - * Get the defaultSparkLogFolder property: The default folder where Spark logs will be written. - * - * @return the defaultSparkLogFolder value. - */ - public String defaultSparkLogFolder() { - return this.defaultSparkLogFolder; - } - - /** - * Set the defaultSparkLogFolder property: The default folder where Spark logs will be written. - * - * @param defaultSparkLogFolder the defaultSparkLogFolder value to set. - * @return the BigDataPoolResourceProperties object itself. - */ - public BigDataPoolResourceProperties withDefaultSparkLogFolder(String defaultSparkLogFolder) { - this.defaultSparkLogFolder = defaultSparkLogFolder; - return this; - } - - /** - * Get the nodeSize property: The level of compute power that each node in the Big Data pool has. - * - * @return the nodeSize value. - */ - public NodeSize nodeSize() { - return this.nodeSize; - } - - /** - * Set the nodeSize property: The level of compute power that each node in the Big Data pool has. - * - * @param nodeSize the nodeSize value to set. - * @return the BigDataPoolResourceProperties object itself. - */ - public BigDataPoolResourceProperties withNodeSize(NodeSize nodeSize) { - this.nodeSize = nodeSize; - return this; - } - - /** - * Get the nodeSizeFamily property: The kind of nodes that the Big Data pool provides. - * - * @return the nodeSizeFamily value. - */ - public NodeSizeFamily nodeSizeFamily() { - return this.nodeSizeFamily; - } - - /** - * Set the nodeSizeFamily property: The kind of nodes that the Big Data pool provides. - * - * @param nodeSizeFamily the nodeSizeFamily value to set. - * @return the BigDataPoolResourceProperties object itself. - */ - public BigDataPoolResourceProperties withNodeSizeFamily(NodeSizeFamily nodeSizeFamily) { - this.nodeSizeFamily = nodeSizeFamily; - return this; - } - - /** - * Get the lastSucceededTimestamp property: The time when the Big Data pool was updated successfully. - * - * @return the lastSucceededTimestamp value. - */ - public OffsetDateTime lastSucceededTimestamp() { - return this.lastSucceededTimestamp; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (autoScale() != null) { - autoScale().validate(); - } - if (autoPause() != null) { - autoPause().validate(); - } - if (dynamicExecutorAllocation() != null) { - dynamicExecutorAllocation().validate(); - } - if (libraryRequirements() != null) { - libraryRequirements().validate(); - } - if (customLibraries() != null) { - customLibraries().forEach(e -> e.validate()); - } - if (sparkConfigProperties() != null) { - sparkConfigProperties().validate(); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/CmdkeySetupTypeProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/CmdkeySetupTypeProperties.java deleted file mode 100644 index c10079d1d9415..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/CmdkeySetupTypeProperties.java +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.SecretBase; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Cmdkey command custom setup type properties. */ -@Fluent -public final class CmdkeySetupTypeProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(CmdkeySetupTypeProperties.class); - - /* - * The server name of data source access. - */ - @JsonProperty(value = "targetName", required = true) - private Object targetName; - - /* - * The user name of data source access. - */ - @JsonProperty(value = "userName", required = true) - private Object username; - - /* - * The password of data source access. - */ - @JsonProperty(value = "password", required = true) - private SecretBase password; - - /** - * Get the targetName property: The server name of data source access. - * - * @return the targetName value. - */ - public Object targetName() { - return this.targetName; - } - - /** - * Set the targetName property: The server name of data source access. - * - * @param targetName the targetName value to set. - * @return the CmdkeySetupTypeProperties object itself. - */ - public CmdkeySetupTypeProperties withTargetName(Object targetName) { - this.targetName = targetName; - return this; - } - - /** - * Get the username property: The user name of data source access. - * - * @return the username value. - */ - public Object username() { - return this.username; - } - - /** - * Set the username property: The user name of data source access. - * - * @param username the username value to set. - * @return the CmdkeySetupTypeProperties object itself. - */ - public CmdkeySetupTypeProperties withUsername(Object username) { - this.username = username; - return this; - } - - /** - * Get the password property: The password of data source access. - * - * @return the password value. - */ - public SecretBase password() { - return this.password; - } - - /** - * Set the password property: The password of data source access. - * - * @param password the password value to set. - * @return the CmdkeySetupTypeProperties object itself. - */ - public CmdkeySetupTypeProperties withPassword(SecretBase password) { - this.password = password; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (targetName() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property targetName in model CmdkeySetupTypeProperties")); - } - if (username() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property username in model CmdkeySetupTypeProperties")); - } - if (password() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property password in model CmdkeySetupTypeProperties")); - } else { - password().validate(); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataMaskingPolicyInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataMaskingPolicyInner.java index 470e12f14cfe4..aeacd91bf3303 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataMaskingPolicyInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataMaskingPolicyInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.DataMaskingState; @@ -12,16 +13,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** The DataMaskingPolicy model. */ +@JsonFlatten @Fluent -public final class DataMaskingPolicyInner extends ProxyResource { +public class DataMaskingPolicyInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(DataMaskingPolicyInner.class); - /* - * The properties of the data masking policy. - */ - @JsonProperty(value = "properties") - private DataMaskingPolicyProperties innerProperties; - /* * The location of the data masking policy. */ @@ -40,14 +36,33 @@ public final class DataMaskingPolicyInner extends ProxyResource { @JsonProperty(value = "managedBy", access = JsonProperty.Access.WRITE_ONLY) private String managedBy; - /** - * Get the innerProperties property: The properties of the data masking policy. - * - * @return the innerProperties value. + /* + * The state of the data masking policy. */ - private DataMaskingPolicyProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.dataMaskingState") + 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; /** * Get the location property: The location of the data masking policy. @@ -82,7 +97,7 @@ public String managedBy() { * @return the dataMaskingState value. */ public DataMaskingState dataMaskingState() { - return this.innerProperties() == null ? null : this.innerProperties().dataMaskingState(); + return this.dataMaskingState; } /** @@ -92,10 +107,7 @@ public DataMaskingState dataMaskingState() { * @return the DataMaskingPolicyInner object itself. */ public DataMaskingPolicyInner withDataMaskingState(DataMaskingState dataMaskingState) { - if (this.innerProperties() == null) { - this.innerProperties = new DataMaskingPolicyProperties(); - } - this.innerProperties().withDataMaskingState(dataMaskingState); + this.dataMaskingState = dataMaskingState; return this; } @@ -107,7 +119,7 @@ public DataMaskingPolicyInner withDataMaskingState(DataMaskingState dataMaskingS * @return the exemptPrincipals value. */ public String exemptPrincipals() { - return this.innerProperties() == null ? null : this.innerProperties().exemptPrincipals(); + return this.exemptPrincipals; } /** @@ -119,10 +131,7 @@ public String exemptPrincipals() { * @return the DataMaskingPolicyInner object itself. */ public DataMaskingPolicyInner withExemptPrincipals(String exemptPrincipals) { - if (this.innerProperties() == null) { - this.innerProperties = new DataMaskingPolicyProperties(); - } - this.innerProperties().withExemptPrincipals(exemptPrincipals); + this.exemptPrincipals = exemptPrincipals; return this; } @@ -133,7 +142,7 @@ public DataMaskingPolicyInner withExemptPrincipals(String exemptPrincipals) { * @return the applicationPrincipals value. */ public String applicationPrincipals() { - return this.innerProperties() == null ? null : this.innerProperties().applicationPrincipals(); + return this.applicationPrincipals; } /** @@ -142,7 +151,7 @@ public String applicationPrincipals() { * @return the maskingLevel value. */ public String maskingLevel() { - return this.innerProperties() == null ? null : this.innerProperties().maskingLevel(); + return this.maskingLevel; } /** @@ -151,8 +160,5 @@ public String maskingLevel() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataMaskingPolicyProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataMaskingPolicyProperties.java deleted file mode 100644 index 13e48242bca62..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataMaskingPolicyProperties.java +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.DataMaskingState; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The properties of a database data masking policy. */ -@Fluent -public final class DataMaskingPolicyProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataMaskingPolicyProperties.class); - - /* - * The state of the data masking policy. - */ - @JsonProperty(value = "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 = "exemptPrincipals") - private String exemptPrincipals; - - /* - * The list of the application principals. This is a legacy parameter and - * is no longer used. - */ - @JsonProperty(value = "applicationPrincipals", access = JsonProperty.Access.WRITE_ONLY) - private String applicationPrincipals; - - /* - * The masking level. This is a legacy parameter and is no longer used. - */ - @JsonProperty(value = "maskingLevel", access = JsonProperty.Access.WRITE_ONLY) - private String maskingLevel; - - /** - * Get the dataMaskingState property: The state of the data masking policy. - * - * @return the dataMaskingState value. - */ - public DataMaskingState dataMaskingState() { - return this.dataMaskingState; - } - - /** - * Set the dataMaskingState property: The state of the data masking policy. - * - * @param dataMaskingState the dataMaskingState value to set. - * @return the DataMaskingPolicyProperties object itself. - */ - public DataMaskingPolicyProperties withDataMaskingState(DataMaskingState dataMaskingState) { - this.dataMaskingState = dataMaskingState; - return this; - } - - /** - * Get the exemptPrincipals property: 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 exemptPrincipals property: 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 DataMaskingPolicyProperties object itself. - */ - public DataMaskingPolicyProperties withExemptPrincipals(String exemptPrincipals) { - this.exemptPrincipals = exemptPrincipals; - return this; - } - - /** - * Get the applicationPrincipals property: 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 maskingLevel property: The masking level. This is a legacy parameter and is no longer used. - * - * @return the maskingLevel value. - */ - public String maskingLevel() { - return this.maskingLevel; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (dataMaskingState() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property dataMaskingState in model DataMaskingPolicyProperties")); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataMaskingRuleInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataMaskingRuleInner.java index dc513b3d8a8df..f801f9b098336 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataMaskingRuleInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataMaskingRuleInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.DataMaskingFunction; @@ -13,16 +14,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** Represents a Sql pool data masking rule. */ +@JsonFlatten @Fluent -public final class DataMaskingRuleInner extends ProxyResource { +public class DataMaskingRuleInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(DataMaskingRuleInner.class); - /* - * The properties of the resource. - */ - @JsonProperty(value = "properties") - private DataMaskingRuleProperties innerProperties; - /* * The location of the data masking rule. */ @@ -35,14 +31,89 @@ public final class DataMaskingRuleInner extends ProxyResource { @JsonProperty(value = "kind", access = JsonProperty.Access.WRITE_ONLY) private String kind; - /** - * Get the innerProperties property: The properties of the resource. - * - * @return the innerProperties value. + /* + * The rule Id. */ - private DataMaskingRuleProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.id", access = JsonProperty.Access.WRITE_ONLY) + private String idPropertiesId; + + /* + * 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. + */ + @JsonProperty(value = "properties.ruleState") + private DataMaskingRuleState ruleState; + + /* + * The schema name on which the data masking rule is applied. + */ + @JsonProperty(value = "properties.schemaName") + private String schemaName; + + /* + * The table name on which the data masking rule is applied. + */ + @JsonProperty(value = "properties.tableName") + private String tableName; + + /* + * The column name on which the data masking rule is applied. + */ + @JsonProperty(value = "properties.columnName") + private String columnName; + + /* + * The masking function that is used for the data masking rule. + */ + @JsonProperty(value = "properties.maskingFunction") + 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; /** * Get the location property: The location of the data masking rule. @@ -63,12 +134,12 @@ public String kind() { } /** - * Get the id property: The rule Id. + * Get the idPropertiesId property: The rule Id. * - * @return the id value. + * @return the idPropertiesId value. */ public String idPropertiesId() { - return this.innerProperties() == null ? null : this.innerProperties().id(); + return this.idPropertiesId; } /** @@ -77,7 +148,7 @@ public String idPropertiesId() { * @return the aliasName value. */ public String aliasName() { - return this.innerProperties() == null ? null : this.innerProperties().aliasName(); + return this.aliasName; } /** @@ -87,10 +158,7 @@ public String aliasName() { * @return the DataMaskingRuleInner object itself. */ public DataMaskingRuleInner withAliasName(String aliasName) { - if (this.innerProperties() == null) { - this.innerProperties = new DataMaskingRuleProperties(); - } - this.innerProperties().withAliasName(aliasName); + this.aliasName = aliasName; return this; } @@ -103,7 +171,7 @@ public DataMaskingRuleInner withAliasName(String aliasName) { * @return the ruleState value. */ public DataMaskingRuleState ruleState() { - return this.innerProperties() == null ? null : this.innerProperties().ruleState(); + return this.ruleState; } /** @@ -116,10 +184,7 @@ public DataMaskingRuleState ruleState() { * @return the DataMaskingRuleInner object itself. */ public DataMaskingRuleInner withRuleState(DataMaskingRuleState ruleState) { - if (this.innerProperties() == null) { - this.innerProperties = new DataMaskingRuleProperties(); - } - this.innerProperties().withRuleState(ruleState); + this.ruleState = ruleState; return this; } @@ -129,7 +194,7 @@ public DataMaskingRuleInner withRuleState(DataMaskingRuleState ruleState) { * @return the schemaName value. */ public String schemaName() { - return this.innerProperties() == null ? null : this.innerProperties().schemaName(); + return this.schemaName; } /** @@ -139,10 +204,7 @@ public String schemaName() { * @return the DataMaskingRuleInner object itself. */ public DataMaskingRuleInner withSchemaName(String schemaName) { - if (this.innerProperties() == null) { - this.innerProperties = new DataMaskingRuleProperties(); - } - this.innerProperties().withSchemaName(schemaName); + this.schemaName = schemaName; return this; } @@ -152,7 +214,7 @@ public DataMaskingRuleInner withSchemaName(String schemaName) { * @return the tableName value. */ public String tableName() { - return this.innerProperties() == null ? null : this.innerProperties().tableName(); + return this.tableName; } /** @@ -162,10 +224,7 @@ public String tableName() { * @return the DataMaskingRuleInner object itself. */ public DataMaskingRuleInner withTableName(String tableName) { - if (this.innerProperties() == null) { - this.innerProperties = new DataMaskingRuleProperties(); - } - this.innerProperties().withTableName(tableName); + this.tableName = tableName; return this; } @@ -175,7 +234,7 @@ public DataMaskingRuleInner withTableName(String tableName) { * @return the columnName value. */ public String columnName() { - return this.innerProperties() == null ? null : this.innerProperties().columnName(); + return this.columnName; } /** @@ -185,10 +244,7 @@ public String columnName() { * @return the DataMaskingRuleInner object itself. */ public DataMaskingRuleInner withColumnName(String columnName) { - if (this.innerProperties() == null) { - this.innerProperties = new DataMaskingRuleProperties(); - } - this.innerProperties().withColumnName(columnName); + this.columnName = columnName; return this; } @@ -198,7 +254,7 @@ public DataMaskingRuleInner withColumnName(String columnName) { * @return the maskingFunction value. */ public DataMaskingFunction maskingFunction() { - return this.innerProperties() == null ? null : this.innerProperties().maskingFunction(); + return this.maskingFunction; } /** @@ -208,10 +264,7 @@ public DataMaskingFunction maskingFunction() { * @return the DataMaskingRuleInner object itself. */ public DataMaskingRuleInner withMaskingFunction(DataMaskingFunction maskingFunction) { - if (this.innerProperties() == null) { - this.innerProperties = new DataMaskingRuleProperties(); - } - this.innerProperties().withMaskingFunction(maskingFunction); + this.maskingFunction = maskingFunction; return this; } @@ -222,7 +275,7 @@ public DataMaskingRuleInner withMaskingFunction(DataMaskingFunction maskingFunct * @return the numberFrom value. */ public String numberFrom() { - return this.innerProperties() == null ? null : this.innerProperties().numberFrom(); + return this.numberFrom; } /** @@ -233,10 +286,7 @@ public String numberFrom() { * @return the DataMaskingRuleInner object itself. */ public DataMaskingRuleInner withNumberFrom(String numberFrom) { - if (this.innerProperties() == null) { - this.innerProperties = new DataMaskingRuleProperties(); - } - this.innerProperties().withNumberFrom(numberFrom); + this.numberFrom = numberFrom; return this; } @@ -247,7 +297,7 @@ public DataMaskingRuleInner withNumberFrom(String numberFrom) { * @return the numberTo value. */ public String numberTo() { - return this.innerProperties() == null ? null : this.innerProperties().numberTo(); + return this.numberTo; } /** @@ -258,10 +308,7 @@ public String numberTo() { * @return the DataMaskingRuleInner object itself. */ public DataMaskingRuleInner withNumberTo(String numberTo) { - if (this.innerProperties() == null) { - this.innerProperties = new DataMaskingRuleProperties(); - } - this.innerProperties().withNumberTo(numberTo); + this.numberTo = numberTo; return this; } @@ -272,7 +319,7 @@ public DataMaskingRuleInner withNumberTo(String numberTo) { * @return the prefixSize value. */ public String prefixSize() { - return this.innerProperties() == null ? null : this.innerProperties().prefixSize(); + return this.prefixSize; } /** @@ -283,10 +330,7 @@ public String prefixSize() { * @return the DataMaskingRuleInner object itself. */ public DataMaskingRuleInner withPrefixSize(String prefixSize) { - if (this.innerProperties() == null) { - this.innerProperties = new DataMaskingRuleProperties(); - } - this.innerProperties().withPrefixSize(prefixSize); + this.prefixSize = prefixSize; return this; } @@ -297,7 +341,7 @@ public DataMaskingRuleInner withPrefixSize(String prefixSize) { * @return the suffixSize value. */ public String suffixSize() { - return this.innerProperties() == null ? null : this.innerProperties().suffixSize(); + return this.suffixSize; } /** @@ -308,10 +352,7 @@ public String suffixSize() { * @return the DataMaskingRuleInner object itself. */ public DataMaskingRuleInner withSuffixSize(String suffixSize) { - if (this.innerProperties() == null) { - this.innerProperties = new DataMaskingRuleProperties(); - } - this.innerProperties().withSuffixSize(suffixSize); + this.suffixSize = suffixSize; return this; } @@ -322,7 +363,7 @@ public DataMaskingRuleInner withSuffixSize(String suffixSize) { * @return the replacementString value. */ public String replacementString() { - return this.innerProperties() == null ? null : this.innerProperties().replacementString(); + return this.replacementString; } /** @@ -333,10 +374,7 @@ public String replacementString() { * @return the DataMaskingRuleInner object itself. */ public DataMaskingRuleInner withReplacementString(String replacementString) { - if (this.innerProperties() == null) { - this.innerProperties = new DataMaskingRuleProperties(); - } - this.innerProperties().withReplacementString(replacementString); + this.replacementString = replacementString; return this; } @@ -346,8 +384,5 @@ public DataMaskingRuleInner withReplacementString(String replacementString) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataMaskingRuleProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataMaskingRuleProperties.java deleted file mode 100644 index ce77df378ab24..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataMaskingRuleProperties.java +++ /dev/null @@ -1,379 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.DataMaskingFunction; -import com.azure.resourcemanager.synapse.models.DataMaskingRuleState; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The properties of a Sql pool data masking rule. */ -@Fluent -public final class DataMaskingRuleProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataMaskingRuleProperties.class); - - /* - * The rule Id. - */ - @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) - private String id; - - /* - * The alias name. This is a legacy parameter and is no longer used. - */ - @JsonProperty(value = "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. - */ - @JsonProperty(value = "ruleState") - private DataMaskingRuleState ruleState; - - /* - * The schema name on which the data masking rule is applied. - */ - @JsonProperty(value = "schemaName", required = true) - private String schemaName; - - /* - * The table name on which the data masking rule is applied. - */ - @JsonProperty(value = "tableName", required = true) - private String tableName; - - /* - * The column name on which the data masking rule is applied. - */ - @JsonProperty(value = "columnName", required = true) - private String columnName; - - /* - * The masking function that is used for the data masking rule. - */ - @JsonProperty(value = "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 = "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 = "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 = "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 = "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 = "replacementString") - private String replacementString; - - /** - * Get the id property: The rule Id. - * - * @return the id value. - */ - public String id() { - return this.id; - } - - /** - * Get the aliasName property: 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 aliasName property: The alias name. This is a legacy parameter and is no longer used. - * - * @param aliasName the aliasName value to set. - * @return the DataMaskingRuleProperties object itself. - */ - public DataMaskingRuleProperties withAliasName(String aliasName) { - this.aliasName = aliasName; - return this; - } - - /** - * Get the ruleState property: 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. - * - * @return the ruleState value. - */ - public DataMaskingRuleState ruleState() { - return this.ruleState; - } - - /** - * Set the ruleState property: 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. - * - * @param ruleState the ruleState value to set. - * @return the DataMaskingRuleProperties object itself. - */ - public DataMaskingRuleProperties withRuleState(DataMaskingRuleState ruleState) { - this.ruleState = ruleState; - return this; - } - - /** - * Get the schemaName property: The schema name on which the data masking rule is applied. - * - * @return the schemaName value. - */ - public String schemaName() { - return this.schemaName; - } - - /** - * Set the schemaName property: The schema name on which the data masking rule is applied. - * - * @param schemaName the schemaName value to set. - * @return the DataMaskingRuleProperties object itself. - */ - public DataMaskingRuleProperties withSchemaName(String schemaName) { - this.schemaName = schemaName; - return this; - } - - /** - * Get the tableName property: The table name on which the data masking rule is applied. - * - * @return the tableName value. - */ - public String tableName() { - return this.tableName; - } - - /** - * Set the tableName property: The table name on which the data masking rule is applied. - * - * @param tableName the tableName value to set. - * @return the DataMaskingRuleProperties object itself. - */ - public DataMaskingRuleProperties withTableName(String tableName) { - this.tableName = tableName; - return this; - } - - /** - * Get the columnName property: The column name on which the data masking rule is applied. - * - * @return the columnName value. - */ - public String columnName() { - return this.columnName; - } - - /** - * Set the columnName property: The column name on which the data masking rule is applied. - * - * @param columnName the columnName value to set. - * @return the DataMaskingRuleProperties object itself. - */ - public DataMaskingRuleProperties withColumnName(String columnName) { - this.columnName = columnName; - return this; - } - - /** - * Get the maskingFunction property: The masking function that is used for the data masking rule. - * - * @return the maskingFunction value. - */ - public DataMaskingFunction maskingFunction() { - return this.maskingFunction; - } - - /** - * Set the maskingFunction property: The masking function that is used for the data masking rule. - * - * @param maskingFunction the maskingFunction value to set. - * @return the DataMaskingRuleProperties object itself. - */ - public DataMaskingRuleProperties withMaskingFunction(DataMaskingFunction maskingFunction) { - this.maskingFunction = maskingFunction; - return this; - } - - /** - * Get the numberFrom property: 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: 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 DataMaskingRuleProperties object itself. - */ - public DataMaskingRuleProperties withNumberFrom(String numberFrom) { - this.numberFrom = numberFrom; - return this; - } - - /** - * Get the numberTo property: 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: 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 DataMaskingRuleProperties object itself. - */ - public DataMaskingRuleProperties withNumberTo(String numberTo) { - this.numberTo = numberTo; - return this; - } - - /** - * Get the prefixSize property: 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 the prefixSize property: 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 DataMaskingRuleProperties object itself. - */ - public DataMaskingRuleProperties withPrefixSize(String prefixSize) { - this.prefixSize = prefixSize; - return this; - } - - /** - * Get the suffixSize property: 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 the suffixSize property: 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 DataMaskingRuleProperties object itself. - */ - public DataMaskingRuleProperties withSuffixSize(String suffixSize) { - this.suffixSize = suffixSize; - return this; - } - - /** - * Get the replacementString property: 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 the replacementString property: 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 DataMaskingRuleProperties object itself. - */ - public DataMaskingRuleProperties withReplacementString(String replacementString) { - this.replacementString = replacementString; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (schemaName() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property schemaName in model DataMaskingRuleProperties")); - } - if (tableName() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property tableName in model DataMaskingRuleProperties")); - } - if (columnName() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property columnName in model DataMaskingRuleProperties")); - } - if (maskingFunction() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property maskingFunction in model DataMaskingRuleProperties")); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataWarehouseUserActivitiesInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataWarehouseUserActivitiesInner.java index 8cb5cdf54d5b1..836be594beb56 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataWarehouseUserActivitiesInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataWarehouseUserActivitiesInner.java @@ -4,31 +4,24 @@ package com.azure.resourcemanager.synapse.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** User activities of a data warehouse. */ -@Fluent -public final class DataWarehouseUserActivitiesInner extends ProxyResource { +@JsonFlatten +@Immutable +public class DataWarehouseUserActivitiesInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(DataWarehouseUserActivitiesInner.class); /* - * Resource properties. + * Count of running and suspended queries. */ - @JsonProperty(value = "properties") - private DataWarehouseUserActivitiesProperties innerProperties; - - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private DataWarehouseUserActivitiesProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.activeQueriesCount", access = JsonProperty.Access.WRITE_ONLY) + private Integer activeQueriesCount; /** * Get the activeQueriesCount property: Count of running and suspended queries. @@ -36,7 +29,7 @@ private DataWarehouseUserActivitiesProperties innerProperties() { * @return the activeQueriesCount value. */ public Integer activeQueriesCount() { - return this.innerProperties() == null ? null : this.innerProperties().activeQueriesCount(); + return this.activeQueriesCount; } /** @@ -45,8 +38,5 @@ public Integer activeQueriesCount() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataWarehouseUserActivitiesProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataWarehouseUserActivitiesProperties.java deleted file mode 100644 index f97af82488749..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/DataWarehouseUserActivitiesProperties.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** - * User activities of a data warehouse. This currently includes the count of running or suspended queries. For more - * information, please view the sys.dm_pdw_exec_requests dynamic management view (DMV). - */ -@Immutable -public final class DataWarehouseUserActivitiesProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(DataWarehouseUserActivitiesProperties.class); - - /* - * Count of running and suspended queries. - */ - @JsonProperty(value = "activeQueriesCount", access = JsonProperty.Access.WRITE_ONLY) - private Integer activeQueriesCount; - - /** - * Get the activeQueriesCount property: Count of running and suspended queries. - * - * @return the activeQueriesCount value. - */ - public Integer activeQueriesCount() { - return this.activeQueriesCount; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/EncryptionProtectorInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/EncryptionProtectorInner.java index eed2f9cdf343c..5d19d8ddd463f 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/EncryptionProtectorInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/EncryptionProtectorInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.ServerKeyType; @@ -12,8 +13,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** The server encryption protector. */ +@JsonFlatten @Fluent -public final class EncryptionProtectorInner extends ProxyResource { +public class EncryptionProtectorInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(EncryptionProtectorInner.class); /* @@ -30,10 +32,34 @@ public final class EncryptionProtectorInner extends ProxyResource { private String location; /* - * Resource properties. + * Subregion of the encryption protector. */ - @JsonProperty(value = "properties") - private EncryptionProtectorProperties innerProperties; + @JsonProperty(value = "properties.subregion", access = JsonProperty.Access.WRITE_ONLY) + private String subregion; + + /* + * The name of the server key. + */ + @JsonProperty(value = "properties.serverKeyName") + private String serverKeyName; + + /* + * The encryption protector type like 'ServiceManaged', 'AzureKeyVault'. + */ + @JsonProperty(value = "properties.serverKeyType") + private ServerKeyType serverKeyType; + + /* + * The URI of the server key. + */ + @JsonProperty(value = "properties.uri", access = JsonProperty.Access.WRITE_ONLY) + private String uri; + + /* + * Thumbprint of the server key. + */ + @JsonProperty(value = "properties.thumbprint", access = JsonProperty.Access.WRITE_ONLY) + private String thumbprint; /** * Get the kind property: Kind of encryption protector. This is metadata used for the Azure portal experience. @@ -53,22 +79,13 @@ public String location() { return this.location; } - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private EncryptionProtectorProperties innerProperties() { - return this.innerProperties; - } - /** * Get the subregion property: Subregion of the encryption protector. * * @return the subregion value. */ public String subregion() { - return this.innerProperties() == null ? null : this.innerProperties().subregion(); + return this.subregion; } /** @@ -77,7 +94,7 @@ public String subregion() { * @return the serverKeyName value. */ public String serverKeyName() { - return this.innerProperties() == null ? null : this.innerProperties().serverKeyName(); + return this.serverKeyName; } /** @@ -87,10 +104,7 @@ public String serverKeyName() { * @return the EncryptionProtectorInner object itself. */ public EncryptionProtectorInner withServerKeyName(String serverKeyName) { - if (this.innerProperties() == null) { - this.innerProperties = new EncryptionProtectorProperties(); - } - this.innerProperties().withServerKeyName(serverKeyName); + this.serverKeyName = serverKeyName; return this; } @@ -100,7 +114,7 @@ public EncryptionProtectorInner withServerKeyName(String serverKeyName) { * @return the serverKeyType value. */ public ServerKeyType serverKeyType() { - return this.innerProperties() == null ? null : this.innerProperties().serverKeyType(); + return this.serverKeyType; } /** @@ -110,10 +124,7 @@ public ServerKeyType serverKeyType() { * @return the EncryptionProtectorInner object itself. */ public EncryptionProtectorInner withServerKeyType(ServerKeyType serverKeyType) { - if (this.innerProperties() == null) { - this.innerProperties = new EncryptionProtectorProperties(); - } - this.innerProperties().withServerKeyType(serverKeyType); + this.serverKeyType = serverKeyType; return this; } @@ -123,7 +134,7 @@ public EncryptionProtectorInner withServerKeyType(ServerKeyType serverKeyType) { * @return the uri value. */ public String uri() { - return this.innerProperties() == null ? null : this.innerProperties().uri(); + return this.uri; } /** @@ -132,7 +143,7 @@ public String uri() { * @return the thumbprint value. */ public String thumbprint() { - return this.innerProperties() == null ? null : this.innerProperties().thumbprint(); + return this.thumbprint; } /** @@ -141,8 +152,5 @@ public String thumbprint() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/EncryptionProtectorProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/EncryptionProtectorProperties.java deleted file mode 100644 index 319cdf2c452ae..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/EncryptionProtectorProperties.java +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.ServerKeyType; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Properties for an encryption protector execution. */ -@Fluent -public final class EncryptionProtectorProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EncryptionProtectorProperties.class); - - /* - * Subregion of the encryption protector. - */ - @JsonProperty(value = "subregion", access = JsonProperty.Access.WRITE_ONLY) - private String subregion; - - /* - * The name of the server key. - */ - @JsonProperty(value = "serverKeyName") - private String serverKeyName; - - /* - * The encryption protector type like 'ServiceManaged', 'AzureKeyVault'. - */ - @JsonProperty(value = "serverKeyType", required = true) - private ServerKeyType serverKeyType; - - /* - * The URI of the server key. - */ - @JsonProperty(value = "uri", access = JsonProperty.Access.WRITE_ONLY) - private String uri; - - /* - * Thumbprint of the server key. - */ - @JsonProperty(value = "thumbprint", access = JsonProperty.Access.WRITE_ONLY) - private String thumbprint; - - /** - * Get the subregion property: Subregion of the encryption protector. - * - * @return the subregion value. - */ - public String subregion() { - return this.subregion; - } - - /** - * Get the serverKeyName property: The name of the server key. - * - * @return the serverKeyName value. - */ - public String serverKeyName() { - return this.serverKeyName; - } - - /** - * Set the serverKeyName property: The name of the server key. - * - * @param serverKeyName the serverKeyName value to set. - * @return the EncryptionProtectorProperties object itself. - */ - public EncryptionProtectorProperties withServerKeyName(String serverKeyName) { - this.serverKeyName = serverKeyName; - return this; - } - - /** - * Get the serverKeyType property: The encryption protector type like 'ServiceManaged', 'AzureKeyVault'. - * - * @return the serverKeyType value. - */ - public ServerKeyType serverKeyType() { - return this.serverKeyType; - } - - /** - * Set the serverKeyType property: The encryption protector type like 'ServiceManaged', 'AzureKeyVault'. - * - * @param serverKeyType the serverKeyType value to set. - * @return the EncryptionProtectorProperties object itself. - */ - public EncryptionProtectorProperties withServerKeyType(ServerKeyType serverKeyType) { - this.serverKeyType = serverKeyType; - return this; - } - - /** - * Get the uri property: The URI of the server key. - * - * @return the uri value. - */ - public String uri() { - return this.uri; - } - - /** - * Get the thumbprint property: Thumbprint of the server key. - * - * @return the thumbprint value. - */ - public String thumbprint() { - return this.thumbprint; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (serverKeyType() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property serverKeyType in model EncryptionProtectorProperties")); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/EnvironmentVariableSetupTypeProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/EnvironmentVariableSetupTypeProperties.java deleted file mode 100644 index a5bf321c39e90..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/EnvironmentVariableSetupTypeProperties.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Environment variable custom setup type properties. */ -@Fluent -public final class EnvironmentVariableSetupTypeProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(EnvironmentVariableSetupTypeProperties.class); - - /* - * The name of the environment variable. - */ - @JsonProperty(value = "variableName", required = true) - private String variableName; - - /* - * The value of the environment variable. - */ - @JsonProperty(value = "variableValue", required = true) - private String variableValue; - - /** - * Get the variableName property: The name of the environment variable. - * - * @return the variableName value. - */ - public String variableName() { - return this.variableName; - } - - /** - * Set the variableName property: The name of the environment variable. - * - * @param variableName the variableName value to set. - * @return the EnvironmentVariableSetupTypeProperties object itself. - */ - public EnvironmentVariableSetupTypeProperties withVariableName(String variableName) { - this.variableName = variableName; - return this; - } - - /** - * Get the variableValue property: The value of the environment variable. - * - * @return the variableValue value. - */ - public String variableValue() { - return this.variableValue; - } - - /** - * Set the variableValue property: The value of the environment variable. - * - * @param variableValue the variableValue value to set. - * @return the EnvironmentVariableSetupTypeProperties object itself. - */ - public EnvironmentVariableSetupTypeProperties withVariableValue(String variableValue) { - this.variableValue = variableValue; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (variableName() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property variableName in model EnvironmentVariableSetupTypeProperties")); - } - if (variableValue() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property variableValue in model EnvironmentVariableSetupTypeProperties")); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ExtendedServerBlobAuditingPolicyInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ExtendedServerBlobAuditingPolicyInner.java index 9d1729622a90d..8e9571ae50d8b 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ExtendedServerBlobAuditingPolicyInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ExtendedServerBlobAuditingPolicyInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.BlobAuditingPolicyState; @@ -14,24 +15,176 @@ import java.util.UUID; /** An extended server blob auditing policy. */ +@JsonFlatten @Fluent -public final class ExtendedServerBlobAuditingPolicyInner extends ProxyResource { +public class ExtendedServerBlobAuditingPolicyInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(ExtendedServerBlobAuditingPolicyInner.class); /* - * Resource properties. + * Specifies condition of where clause when creating an audit. */ - @JsonProperty(value = "properties") - private ExtendedServerBlobAuditingPolicyProperties innerProperties; + @JsonProperty(value = "properties.predicateExpression") + private String predicateExpression; - /** - * Get the innerProperties property: Resource properties. + /* + * Specifies the state of the policy. If state is Enabled, storageEndpoint + * or isAzureMonitorTargetEnabled are required. + */ + @JsonProperty(value = "properties.state") + 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 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. * - * @return the innerProperties value. + * 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) */ - private ExtendedServerBlobAuditingPolicyProperties innerProperties() { - return this.innerProperties; - } + @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 the predicateExpression property: Specifies condition of where clause when creating an audit. @@ -39,7 +192,7 @@ private ExtendedServerBlobAuditingPolicyProperties innerProperties() { * @return the predicateExpression value. */ public String predicateExpression() { - return this.innerProperties() == null ? null : this.innerProperties().predicateExpression(); + return this.predicateExpression; } /** @@ -49,10 +202,7 @@ public String predicateExpression() { * @return the ExtendedServerBlobAuditingPolicyInner object itself. */ public ExtendedServerBlobAuditingPolicyInner withPredicateExpression(String predicateExpression) { - if (this.innerProperties() == null) { - this.innerProperties = new ExtendedServerBlobAuditingPolicyProperties(); - } - this.innerProperties().withPredicateExpression(predicateExpression); + this.predicateExpression = predicateExpression; return this; } @@ -63,7 +213,7 @@ public ExtendedServerBlobAuditingPolicyInner withPredicateExpression(String pred * @return the state value. */ public BlobAuditingPolicyState state() { - return this.innerProperties() == null ? null : this.innerProperties().state(); + return this.state; } /** @@ -74,10 +224,7 @@ public BlobAuditingPolicyState state() { * @return the ExtendedServerBlobAuditingPolicyInner object itself. */ public ExtendedServerBlobAuditingPolicyInner withState(BlobAuditingPolicyState state) { - if (this.innerProperties() == null) { - this.innerProperties = new ExtendedServerBlobAuditingPolicyProperties(); - } - this.innerProperties().withState(state); + this.state = state; return this; } @@ -89,7 +236,7 @@ public ExtendedServerBlobAuditingPolicyInner withState(BlobAuditingPolicyState s * @return the storageEndpoint value. */ public String storageEndpoint() { - return this.innerProperties() == null ? null : this.innerProperties().storageEndpoint(); + return this.storageEndpoint; } /** @@ -101,10 +248,7 @@ public String storageEndpoint() { * @return the ExtendedServerBlobAuditingPolicyInner object itself. */ public ExtendedServerBlobAuditingPolicyInner withStorageEndpoint(String storageEndpoint) { - if (this.innerProperties() == null) { - this.innerProperties = new ExtendedServerBlobAuditingPolicyProperties(); - } - this.innerProperties().withStorageEndpoint(storageEndpoint); + this.storageEndpoint = storageEndpoint; return this; } @@ -120,7 +264,7 @@ public ExtendedServerBlobAuditingPolicyInner withStorageEndpoint(String storageE * @return the storageAccountAccessKey value. */ public String storageAccountAccessKey() { - return this.innerProperties() == null ? null : this.innerProperties().storageAccountAccessKey(); + return this.storageAccountAccessKey; } /** @@ -136,10 +280,7 @@ public String storageAccountAccessKey() { * @return the ExtendedServerBlobAuditingPolicyInner object itself. */ public ExtendedServerBlobAuditingPolicyInner withStorageAccountAccessKey(String storageAccountAccessKey) { - if (this.innerProperties() == null) { - this.innerProperties = new ExtendedServerBlobAuditingPolicyProperties(); - } - this.innerProperties().withStorageAccountAccessKey(storageAccountAccessKey); + this.storageAccountAccessKey = storageAccountAccessKey; return this; } @@ -149,7 +290,7 @@ public ExtendedServerBlobAuditingPolicyInner withStorageAccountAccessKey(String * @return the retentionDays value. */ public Integer retentionDays() { - return this.innerProperties() == null ? null : this.innerProperties().retentionDays(); + return this.retentionDays; } /** @@ -159,10 +300,7 @@ public Integer retentionDays() { * @return the ExtendedServerBlobAuditingPolicyInner object itself. */ public ExtendedServerBlobAuditingPolicyInner withRetentionDays(Integer retentionDays) { - if (this.innerProperties() == null) { - this.innerProperties = new ExtendedServerBlobAuditingPolicyProperties(); - } - this.innerProperties().withRetentionDays(retentionDays); + this.retentionDays = retentionDays; return this; } @@ -212,7 +350,7 @@ public ExtendedServerBlobAuditingPolicyInner withRetentionDays(Integer retention * @return the auditActionsAndGroups value. */ public List auditActionsAndGroups() { - return this.innerProperties() == null ? null : this.innerProperties().auditActionsAndGroups(); + return this.auditActionsAndGroups; } /** @@ -262,10 +400,7 @@ public List auditActionsAndGroups() { * @return the ExtendedServerBlobAuditingPolicyInner object itself. */ public ExtendedServerBlobAuditingPolicyInner withAuditActionsAndGroups(List auditActionsAndGroups) { - if (this.innerProperties() == null) { - this.innerProperties = new ExtendedServerBlobAuditingPolicyProperties(); - } - this.innerProperties().withAuditActionsAndGroups(auditActionsAndGroups); + this.auditActionsAndGroups = auditActionsAndGroups; return this; } @@ -275,7 +410,7 @@ public ExtendedServerBlobAuditingPolicyInner withAuditActionsAndGroups(List 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 = "auditActionsAndGroups") - private List auditActionsAndGroups; - - /* - * Specifies the blob storage subscription Id. - */ - @JsonProperty(value = "storageAccountSubscriptionId") - private UUID storageAccountSubscriptionId; - - /* - * Specifies whether storageAccountAccessKey value is the storage's - * secondary key. - */ - @JsonProperty(value = "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 = "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 = "queueDelayMs") - private Integer queueDelayMs; - - /** - * Get the predicateExpression property: Specifies condition of where clause when creating an audit. - * - * @return the predicateExpression value. - */ - public String predicateExpression() { - return this.predicateExpression; - } - - /** - * Set the predicateExpression property: Specifies condition of where clause when creating an audit. - * - * @param predicateExpression the predicateExpression value to set. - * @return the ExtendedServerBlobAuditingPolicyProperties object itself. - */ - public ExtendedServerBlobAuditingPolicyProperties withPredicateExpression(String predicateExpression) { - this.predicateExpression = predicateExpression; - return this; - } - - /** - * Get the state property: Specifies the state of the policy. If state is Enabled, storageEndpoint or - * isAzureMonitorTargetEnabled are required. - * - * @return the state value. - */ - public BlobAuditingPolicyState state() { - return this.state; - } - - /** - * Set the state property: Specifies the state of the policy. If state is Enabled, storageEndpoint or - * isAzureMonitorTargetEnabled are required. - * - * @param state the state value to set. - * @return the ExtendedServerBlobAuditingPolicyProperties object itself. - */ - public ExtendedServerBlobAuditingPolicyProperties withState(BlobAuditingPolicyState state) { - this.state = state; - return this; - } - - /** - * Get the storageEndpoint property: 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 the storageEndpoint property: 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 ExtendedServerBlobAuditingPolicyProperties object itself. - */ - public ExtendedServerBlobAuditingPolicyProperties withStorageEndpoint(String storageEndpoint) { - this.storageEndpoint = storageEndpoint; - return this; - } - - /** - * Get the storageAccountAccessKey property: 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 the storageAccountAccessKey property: 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 ExtendedServerBlobAuditingPolicyProperties object itself. - */ - public ExtendedServerBlobAuditingPolicyProperties withStorageAccountAccessKey(String storageAccountAccessKey) { - this.storageAccountAccessKey = storageAccountAccessKey; - return this; - } - - /** - * Get the retentionDays property: 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 the retentionDays property: Specifies the number of days to keep in the audit logs in the storage account. - * - * @param retentionDays the retentionDays value to set. - * @return the ExtendedServerBlobAuditingPolicyProperties object itself. - */ - public ExtendedServerBlobAuditingPolicyProperties withRetentionDays(Integer retentionDays) { - this.retentionDays = retentionDays; - return this; - } - - /** - * Get the auditActionsAndGroups property: 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 the auditActionsAndGroups property: 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 ExtendedServerBlobAuditingPolicyProperties object itself. - */ - public ExtendedServerBlobAuditingPolicyProperties withAuditActionsAndGroups(List auditActionsAndGroups) { - this.auditActionsAndGroups = auditActionsAndGroups; - return this; - } - - /** - * Get the storageAccountSubscriptionId property: Specifies the blob storage subscription Id. - * - * @return the storageAccountSubscriptionId value. - */ - public UUID storageAccountSubscriptionId() { - return this.storageAccountSubscriptionId; - } - - /** - * Set the storageAccountSubscriptionId property: Specifies the blob storage subscription Id. - * - * @param storageAccountSubscriptionId the storageAccountSubscriptionId value to set. - * @return the ExtendedServerBlobAuditingPolicyProperties object itself. - */ - public ExtendedServerBlobAuditingPolicyProperties withStorageAccountSubscriptionId( - UUID storageAccountSubscriptionId) { - this.storageAccountSubscriptionId = storageAccountSubscriptionId; - return this; - } - - /** - * Get the isStorageSecondaryKeyInUse property: Specifies whether storageAccountAccessKey value is the storage's - * secondary key. - * - * @return the isStorageSecondaryKeyInUse value. - */ - public Boolean isStorageSecondaryKeyInUse() { - return this.isStorageSecondaryKeyInUse; - } - - /** - * Set the isStorageSecondaryKeyInUse property: Specifies whether storageAccountAccessKey value is the storage's - * secondary key. - * - * @param isStorageSecondaryKeyInUse the isStorageSecondaryKeyInUse value to set. - * @return the ExtendedServerBlobAuditingPolicyProperties object itself. - */ - public ExtendedServerBlobAuditingPolicyProperties withIsStorageSecondaryKeyInUse( - Boolean isStorageSecondaryKeyInUse) { - this.isStorageSecondaryKeyInUse = isStorageSecondaryKeyInUse; - return this; - } - - /** - * Get the isAzureMonitorTargetEnabled property: 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 the isAzureMonitorTargetEnabled property: 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 ExtendedServerBlobAuditingPolicyProperties object itself. - */ - public ExtendedServerBlobAuditingPolicyProperties withIsAzureMonitorTargetEnabled( - Boolean isAzureMonitorTargetEnabled) { - this.isAzureMonitorTargetEnabled = isAzureMonitorTargetEnabled; - return this; - } - - /** - * Get the queueDelayMs property: 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 the queueDelayMs property: 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 ExtendedServerBlobAuditingPolicyProperties object itself. - */ - public ExtendedServerBlobAuditingPolicyProperties withQueueDelayMs(Integer queueDelayMs) { - this.queueDelayMs = queueDelayMs; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (state() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property state in model ExtendedServerBlobAuditingPolicyProperties")); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ExtendedSqlPoolBlobAuditingPolicyInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ExtendedSqlPoolBlobAuditingPolicyInner.java index 79391c0665502..385eb11be45a6 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ExtendedSqlPoolBlobAuditingPolicyInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ExtendedSqlPoolBlobAuditingPolicyInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.BlobAuditingPolicyState; @@ -14,24 +15,176 @@ import java.util.UUID; /** An extended Sql pool blob auditing policy. */ +@JsonFlatten @Fluent -public final class ExtendedSqlPoolBlobAuditingPolicyInner extends ProxyResource { +public class ExtendedSqlPoolBlobAuditingPolicyInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(ExtendedSqlPoolBlobAuditingPolicyInner.class); /* - * Resource properties. + * Specifies condition of where clause when creating an audit. */ - @JsonProperty(value = "properties") - private ExtendedSqlPoolBlobAuditingPolicyProperties innerProperties; + @JsonProperty(value = "properties.predicateExpression") + private String predicateExpression; - /** - * Get the innerProperties property: Resource properties. + /* + * Specifies the state of the policy. If state is Enabled, storageEndpoint + * or isAzureMonitorTargetEnabled are required. + */ + @JsonProperty(value = "properties.state") + 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 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. * - * @return the innerProperties value. + * 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) */ - private ExtendedSqlPoolBlobAuditingPolicyProperties innerProperties() { - return this.innerProperties; - } + @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 the predicateExpression property: Specifies condition of where clause when creating an audit. @@ -39,7 +192,7 @@ private ExtendedSqlPoolBlobAuditingPolicyProperties innerProperties() { * @return the predicateExpression value. */ public String predicateExpression() { - return this.innerProperties() == null ? null : this.innerProperties().predicateExpression(); + return this.predicateExpression; } /** @@ -49,10 +202,7 @@ public String predicateExpression() { * @return the ExtendedSqlPoolBlobAuditingPolicyInner object itself. */ public ExtendedSqlPoolBlobAuditingPolicyInner withPredicateExpression(String predicateExpression) { - if (this.innerProperties() == null) { - this.innerProperties = new ExtendedSqlPoolBlobAuditingPolicyProperties(); - } - this.innerProperties().withPredicateExpression(predicateExpression); + this.predicateExpression = predicateExpression; return this; } @@ -63,7 +213,7 @@ public ExtendedSqlPoolBlobAuditingPolicyInner withPredicateExpression(String pre * @return the state value. */ public BlobAuditingPolicyState state() { - return this.innerProperties() == null ? null : this.innerProperties().state(); + return this.state; } /** @@ -74,10 +224,7 @@ public BlobAuditingPolicyState state() { * @return the ExtendedSqlPoolBlobAuditingPolicyInner object itself. */ public ExtendedSqlPoolBlobAuditingPolicyInner withState(BlobAuditingPolicyState state) { - if (this.innerProperties() == null) { - this.innerProperties = new ExtendedSqlPoolBlobAuditingPolicyProperties(); - } - this.innerProperties().withState(state); + this.state = state; return this; } @@ -89,7 +236,7 @@ public ExtendedSqlPoolBlobAuditingPolicyInner withState(BlobAuditingPolicyState * @return the storageEndpoint value. */ public String storageEndpoint() { - return this.innerProperties() == null ? null : this.innerProperties().storageEndpoint(); + return this.storageEndpoint; } /** @@ -101,10 +248,7 @@ public String storageEndpoint() { * @return the ExtendedSqlPoolBlobAuditingPolicyInner object itself. */ public ExtendedSqlPoolBlobAuditingPolicyInner withStorageEndpoint(String storageEndpoint) { - if (this.innerProperties() == null) { - this.innerProperties = new ExtendedSqlPoolBlobAuditingPolicyProperties(); - } - this.innerProperties().withStorageEndpoint(storageEndpoint); + this.storageEndpoint = storageEndpoint; return this; } @@ -120,7 +264,7 @@ public ExtendedSqlPoolBlobAuditingPolicyInner withStorageEndpoint(String storage * @return the storageAccountAccessKey value. */ public String storageAccountAccessKey() { - return this.innerProperties() == null ? null : this.innerProperties().storageAccountAccessKey(); + return this.storageAccountAccessKey; } /** @@ -136,10 +280,7 @@ public String storageAccountAccessKey() { * @return the ExtendedSqlPoolBlobAuditingPolicyInner object itself. */ public ExtendedSqlPoolBlobAuditingPolicyInner withStorageAccountAccessKey(String storageAccountAccessKey) { - if (this.innerProperties() == null) { - this.innerProperties = new ExtendedSqlPoolBlobAuditingPolicyProperties(); - } - this.innerProperties().withStorageAccountAccessKey(storageAccountAccessKey); + this.storageAccountAccessKey = storageAccountAccessKey; return this; } @@ -149,7 +290,7 @@ public ExtendedSqlPoolBlobAuditingPolicyInner withStorageAccountAccessKey(String * @return the retentionDays value. */ public Integer retentionDays() { - return this.innerProperties() == null ? null : this.innerProperties().retentionDays(); + return this.retentionDays; } /** @@ -159,10 +300,7 @@ public Integer retentionDays() { * @return the ExtendedSqlPoolBlobAuditingPolicyInner object itself. */ public ExtendedSqlPoolBlobAuditingPolicyInner withRetentionDays(Integer retentionDays) { - if (this.innerProperties() == null) { - this.innerProperties = new ExtendedSqlPoolBlobAuditingPolicyProperties(); - } - this.innerProperties().withRetentionDays(retentionDays); + this.retentionDays = retentionDays; return this; } @@ -212,7 +350,7 @@ public ExtendedSqlPoolBlobAuditingPolicyInner withRetentionDays(Integer retentio * @return the auditActionsAndGroups value. */ public List auditActionsAndGroups() { - return this.innerProperties() == null ? null : this.innerProperties().auditActionsAndGroups(); + return this.auditActionsAndGroups; } /** @@ -262,10 +400,7 @@ public List auditActionsAndGroups() { * @return the ExtendedSqlPoolBlobAuditingPolicyInner object itself. */ public ExtendedSqlPoolBlobAuditingPolicyInner withAuditActionsAndGroups(List auditActionsAndGroups) { - if (this.innerProperties() == null) { - this.innerProperties = new ExtendedSqlPoolBlobAuditingPolicyProperties(); - } - this.innerProperties().withAuditActionsAndGroups(auditActionsAndGroups); + this.auditActionsAndGroups = auditActionsAndGroups; return this; } @@ -275,7 +410,7 @@ public ExtendedSqlPoolBlobAuditingPolicyInner withAuditActionsAndGroups(List 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 = "auditActionsAndGroups") - private List auditActionsAndGroups; - - /* - * Specifies the blob storage subscription Id. - */ - @JsonProperty(value = "storageAccountSubscriptionId") - private UUID storageAccountSubscriptionId; - - /* - * Specifies whether storageAccountAccessKey value is the storage's - * secondary key. - */ - @JsonProperty(value = "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 = "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 = "queueDelayMs") - private Integer queueDelayMs; - - /** - * Get the predicateExpression property: Specifies condition of where clause when creating an audit. - * - * @return the predicateExpression value. - */ - public String predicateExpression() { - return this.predicateExpression; - } - - /** - * Set the predicateExpression property: Specifies condition of where clause when creating an audit. - * - * @param predicateExpression the predicateExpression value to set. - * @return the ExtendedSqlPoolBlobAuditingPolicyProperties object itself. - */ - public ExtendedSqlPoolBlobAuditingPolicyProperties withPredicateExpression(String predicateExpression) { - this.predicateExpression = predicateExpression; - return this; - } - - /** - * Get the state property: Specifies the state of the policy. If state is Enabled, storageEndpoint or - * isAzureMonitorTargetEnabled are required. - * - * @return the state value. - */ - public BlobAuditingPolicyState state() { - return this.state; - } - - /** - * Set the state property: Specifies the state of the policy. If state is Enabled, storageEndpoint or - * isAzureMonitorTargetEnabled are required. - * - * @param state the state value to set. - * @return the ExtendedSqlPoolBlobAuditingPolicyProperties object itself. - */ - public ExtendedSqlPoolBlobAuditingPolicyProperties withState(BlobAuditingPolicyState state) { - this.state = state; - return this; - } - - /** - * Get the storageEndpoint property: 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 the storageEndpoint property: 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 ExtendedSqlPoolBlobAuditingPolicyProperties object itself. - */ - public ExtendedSqlPoolBlobAuditingPolicyProperties withStorageEndpoint(String storageEndpoint) { - this.storageEndpoint = storageEndpoint; - return this; - } - - /** - * Get the storageAccountAccessKey property: 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 the storageAccountAccessKey property: 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 ExtendedSqlPoolBlobAuditingPolicyProperties object itself. - */ - public ExtendedSqlPoolBlobAuditingPolicyProperties withStorageAccountAccessKey(String storageAccountAccessKey) { - this.storageAccountAccessKey = storageAccountAccessKey; - return this; - } - - /** - * Get the retentionDays property: 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 the retentionDays property: Specifies the number of days to keep in the audit logs in the storage account. - * - * @param retentionDays the retentionDays value to set. - * @return the ExtendedSqlPoolBlobAuditingPolicyProperties object itself. - */ - public ExtendedSqlPoolBlobAuditingPolicyProperties withRetentionDays(Integer retentionDays) { - this.retentionDays = retentionDays; - return this; - } - - /** - * Get the auditActionsAndGroups property: 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 the auditActionsAndGroups property: 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 ExtendedSqlPoolBlobAuditingPolicyProperties object itself. - */ - public ExtendedSqlPoolBlobAuditingPolicyProperties withAuditActionsAndGroups(List auditActionsAndGroups) { - this.auditActionsAndGroups = auditActionsAndGroups; - return this; - } - - /** - * Get the storageAccountSubscriptionId property: Specifies the blob storage subscription Id. - * - * @return the storageAccountSubscriptionId value. - */ - public UUID storageAccountSubscriptionId() { - return this.storageAccountSubscriptionId; - } - - /** - * Set the storageAccountSubscriptionId property: Specifies the blob storage subscription Id. - * - * @param storageAccountSubscriptionId the storageAccountSubscriptionId value to set. - * @return the ExtendedSqlPoolBlobAuditingPolicyProperties object itself. - */ - public ExtendedSqlPoolBlobAuditingPolicyProperties withStorageAccountSubscriptionId( - UUID storageAccountSubscriptionId) { - this.storageAccountSubscriptionId = storageAccountSubscriptionId; - return this; - } - - /** - * Get the isStorageSecondaryKeyInUse property: Specifies whether storageAccountAccessKey value is the storage's - * secondary key. - * - * @return the isStorageSecondaryKeyInUse value. - */ - public Boolean isStorageSecondaryKeyInUse() { - return this.isStorageSecondaryKeyInUse; - } - - /** - * Set the isStorageSecondaryKeyInUse property: Specifies whether storageAccountAccessKey value is the storage's - * secondary key. - * - * @param isStorageSecondaryKeyInUse the isStorageSecondaryKeyInUse value to set. - * @return the ExtendedSqlPoolBlobAuditingPolicyProperties object itself. - */ - public ExtendedSqlPoolBlobAuditingPolicyProperties withIsStorageSecondaryKeyInUse( - Boolean isStorageSecondaryKeyInUse) { - this.isStorageSecondaryKeyInUse = isStorageSecondaryKeyInUse; - return this; - } - - /** - * Get the isAzureMonitorTargetEnabled property: 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 the isAzureMonitorTargetEnabled property: 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 ExtendedSqlPoolBlobAuditingPolicyProperties object itself. - */ - public ExtendedSqlPoolBlobAuditingPolicyProperties withIsAzureMonitorTargetEnabled( - Boolean isAzureMonitorTargetEnabled) { - this.isAzureMonitorTargetEnabled = isAzureMonitorTargetEnabled; - return this; - } - - /** - * Get the queueDelayMs property: 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 the queueDelayMs property: 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 ExtendedSqlPoolBlobAuditingPolicyProperties object itself. - */ - public ExtendedSqlPoolBlobAuditingPolicyProperties withQueueDelayMs(Integer queueDelayMs) { - this.queueDelayMs = queueDelayMs; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (state() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property state in model ExtendedSqlPoolBlobAuditingPolicyProperties")); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/GeoBackupPolicyInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/GeoBackupPolicyInner.java index e51359b8040ea..82c90f398caaa 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/GeoBackupPolicyInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/GeoBackupPolicyInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.GeoBackupPolicyState; @@ -12,16 +13,11 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** A database geo backup policy. */ +@JsonFlatten @Fluent -public final class GeoBackupPolicyInner extends ProxyResource { +public class GeoBackupPolicyInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(GeoBackupPolicyInner.class); - /* - * The properties of the geo backup policy. - */ - @JsonProperty(value = "properties", required = true) - private GeoBackupPolicyProperties innerProperties = new GeoBackupPolicyProperties(); - /* * Kind of geo backup policy. This is metadata used for the Azure portal * experience. @@ -35,14 +31,17 @@ public final class GeoBackupPolicyInner extends ProxyResource { @JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY) private String location; - /** - * Get the innerProperties property: The properties of the geo backup policy. - * - * @return the innerProperties value. + /* + * The state of the geo backup policy. */ - private GeoBackupPolicyProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.state", required = true) + private GeoBackupPolicyState state; + + /* + * The storage type of the geo backup policy. + */ + @JsonProperty(value = "properties.storageType", access = JsonProperty.Access.WRITE_ONLY) + private String storageType; /** * Get the kind property: Kind of geo backup policy. This is metadata used for the Azure portal experience. @@ -68,7 +67,7 @@ public String location() { * @return the state value. */ public GeoBackupPolicyState state() { - return this.innerProperties() == null ? null : this.innerProperties().state(); + return this.state; } /** @@ -78,10 +77,7 @@ public GeoBackupPolicyState state() { * @return the GeoBackupPolicyInner object itself. */ public GeoBackupPolicyInner withState(GeoBackupPolicyState state) { - if (this.innerProperties() == null) { - this.innerProperties = new GeoBackupPolicyProperties(); - } - this.innerProperties().withState(state); + this.state = state; return this; } @@ -91,7 +87,7 @@ public GeoBackupPolicyInner withState(GeoBackupPolicyState state) { * @return the storageType value. */ public String storageType() { - return this.innerProperties() == null ? null : this.innerProperties().storageType(); + return this.storageType; } /** @@ -100,13 +96,10 @@ public String storageType() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() == null) { + if (state() == null) { throw logger .logExceptionAsError( - new IllegalArgumentException( - "Missing required property innerProperties in model GeoBackupPolicyInner")); - } else { - innerProperties().validate(); + new IllegalArgumentException("Missing required property state in model GeoBackupPolicyInner")); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/GeoBackupPolicyProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/GeoBackupPolicyProperties.java deleted file mode 100644 index 5e1a23b645292..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/GeoBackupPolicyProperties.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.GeoBackupPolicyState; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The properties of the geo backup policy. */ -@Fluent -public final class GeoBackupPolicyProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(GeoBackupPolicyProperties.class); - - /* - * The state of the geo backup policy. - */ - @JsonProperty(value = "state", required = true) - private GeoBackupPolicyState state; - - /* - * The storage type of the geo backup policy. - */ - @JsonProperty(value = "storageType", access = JsonProperty.Access.WRITE_ONLY) - private String storageType; - - /** - * Get the state property: The state of the geo backup policy. - * - * @return the state value. - */ - public GeoBackupPolicyState state() { - return this.state; - } - - /** - * Set the state property: The state of the geo backup policy. - * - * @param state the state value to set. - * @return the GeoBackupPolicyProperties object itself. - */ - public GeoBackupPolicyProperties withState(GeoBackupPolicyState state) { - this.state = state; - return this; - } - - /** - * Get the storageType property: The storage type of the geo backup policy. - * - * @return the storageType value. - */ - public String storageType() { - return this.storageType; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (state() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property state in model GeoBackupPolicyProperties")); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/IpFirewallRuleInfoInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/IpFirewallRuleInfoInner.java index 669d87ce87bd6..b979ef0074928 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/IpFirewallRuleInfoInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/IpFirewallRuleInfoInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.ProvisioningState; @@ -12,24 +13,29 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** IP firewall rule. */ +@JsonFlatten @Fluent -public final class IpFirewallRuleInfoInner extends ProxyResource { +public class IpFirewallRuleInfoInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(IpFirewallRuleInfoInner.class); /* - * IP firewall rule properties + * The end IP address of the firewall rule. Must be IPv4 format. Must be + * greater than or equal to startIpAddress */ - @JsonProperty(value = "properties") - private IpFirewallRuleProperties innerProperties; + @JsonProperty(value = "properties.endIpAddress") + private String endIpAddress; - /** - * Get the innerProperties property: IP firewall rule properties. - * - * @return the innerProperties value. + /* + * Resource provisioning state */ - private IpFirewallRuleProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /* + * The start IP address of the firewall rule. Must be IPv4 format + */ + @JsonProperty(value = "properties.startIpAddress") + private String startIpAddress; /** * Get the endIpAddress property: The end IP address of the firewall rule. Must be IPv4 format. Must be greater than @@ -38,7 +44,7 @@ private IpFirewallRuleProperties innerProperties() { * @return the endIpAddress value. */ public String endIpAddress() { - return this.innerProperties() == null ? null : this.innerProperties().endIpAddress(); + return this.endIpAddress; } /** @@ -49,10 +55,7 @@ public String endIpAddress() { * @return the IpFirewallRuleInfoInner object itself. */ public IpFirewallRuleInfoInner withEndIpAddress(String endIpAddress) { - if (this.innerProperties() == null) { - this.innerProperties = new IpFirewallRuleProperties(); - } - this.innerProperties().withEndIpAddress(endIpAddress); + this.endIpAddress = endIpAddress; return this; } @@ -62,7 +65,7 @@ public IpFirewallRuleInfoInner withEndIpAddress(String endIpAddress) { * @return the provisioningState value. */ public ProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + return this.provisioningState; } /** @@ -71,7 +74,7 @@ public ProvisioningState provisioningState() { * @return the startIpAddress value. */ public String startIpAddress() { - return this.innerProperties() == null ? null : this.innerProperties().startIpAddress(); + return this.startIpAddress; } /** @@ -81,10 +84,7 @@ public String startIpAddress() { * @return the IpFirewallRuleInfoInner object itself. */ public IpFirewallRuleInfoInner withStartIpAddress(String startIpAddress) { - if (this.innerProperties() == null) { - this.innerProperties = new IpFirewallRuleProperties(); - } - this.innerProperties().withStartIpAddress(startIpAddress); + this.startIpAddress = startIpAddress; return this; } @@ -94,8 +94,5 @@ public IpFirewallRuleInfoInner withStartIpAddress(String startIpAddress) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/KeyInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/KeyInner.java index c719a460976cf..7cb05a3f23620 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/KeyInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/KeyInner.java @@ -5,30 +5,29 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A workspace key. */ +@JsonFlatten @Fluent -public final class KeyInner extends ProxyResource { +public class KeyInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(KeyInner.class); /* - * Keys resource properties + * Used to activate the workspace after a customer managed key is provided. */ - @JsonProperty(value = "properties") - private KeyProperties innerProperties; + @JsonProperty(value = "properties.isActiveCMK") + private Boolean isActiveCmk; - /** - * Get the innerProperties property: Keys resource properties. - * - * @return the innerProperties value. + /* + * The Key Vault Url of the workspace key. */ - private KeyProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.keyVaultUrl") + private String keyVaultUrl; /** * Get the isActiveCmk property: Used to activate the workspace after a customer managed key is provided. @@ -36,7 +35,7 @@ private KeyProperties innerProperties() { * @return the isActiveCmk value. */ public Boolean isActiveCmk() { - return this.innerProperties() == null ? null : this.innerProperties().isActiveCmk(); + return this.isActiveCmk; } /** @@ -46,10 +45,7 @@ public Boolean isActiveCmk() { * @return the KeyInner object itself. */ public KeyInner withIsActiveCmk(Boolean isActiveCmk) { - if (this.innerProperties() == null) { - this.innerProperties = new KeyProperties(); - } - this.innerProperties().withIsActiveCmk(isActiveCmk); + this.isActiveCmk = isActiveCmk; return this; } @@ -59,7 +55,7 @@ public KeyInner withIsActiveCmk(Boolean isActiveCmk) { * @return the keyVaultUrl value. */ public String keyVaultUrl() { - return this.innerProperties() == null ? null : this.innerProperties().keyVaultUrl(); + return this.keyVaultUrl; } /** @@ -69,10 +65,7 @@ public String keyVaultUrl() { * @return the KeyInner object itself. */ public KeyInner withKeyVaultUrl(String keyVaultUrl) { - if (this.innerProperties() == null) { - this.innerProperties = new KeyProperties(); - } - this.innerProperties().withKeyVaultUrl(keyVaultUrl); + this.keyVaultUrl = keyVaultUrl; return this; } @@ -82,8 +75,5 @@ public KeyInner withKeyVaultUrl(String keyVaultUrl) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/KeyProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/KeyProperties.java deleted file mode 100644 index 61703cd3a18aa..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/KeyProperties.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Key properties. */ -@Fluent -public final class KeyProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(KeyProperties.class); - - /* - * Used to activate the workspace after a customer managed key is provided. - */ - @JsonProperty(value = "isActiveCMK") - private Boolean isActiveCmk; - - /* - * The Key Vault Url of the workspace key. - */ - @JsonProperty(value = "keyVaultUrl") - private String keyVaultUrl; - - /** - * Get the isActiveCmk property: Used to activate the workspace after a customer managed key is provided. - * - * @return the isActiveCmk value. - */ - public Boolean isActiveCmk() { - return this.isActiveCmk; - } - - /** - * Set the isActiveCmk property: Used to activate the workspace after a customer managed key is provided. - * - * @param isActiveCmk the isActiveCmk value to set. - * @return the KeyProperties object itself. - */ - public KeyProperties withIsActiveCmk(Boolean isActiveCmk) { - this.isActiveCmk = isActiveCmk; - return this; - } - - /** - * Get the keyVaultUrl property: The Key Vault Url of the workspace key. - * - * @return the keyVaultUrl value. - */ - public String keyVaultUrl() { - return this.keyVaultUrl; - } - - /** - * Set the keyVaultUrl property: The Key Vault Url of the workspace key. - * - * @param keyVaultUrl the keyVaultUrl value to set. - * @return the KeyProperties object itself. - */ - public KeyProperties withKeyVaultUrl(String keyVaultUrl) { - this.keyVaultUrl = keyVaultUrl; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/LibraryResourceInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/LibraryResourceInner.java index 13194de1c3c1e..60b9aa9e00338 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/LibraryResourceInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/LibraryResourceInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.EntityResource; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -12,47 +13,70 @@ import java.time.OffsetDateTime; /** Library response details. */ +@JsonFlatten @Fluent -public final class LibraryResourceInner extends EntityResource { +public class LibraryResourceInner extends EntityResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(LibraryResourceInner.class); /* - * Information about a library/package created at the workspace level. - * Library/package properties. + * Name of the library. */ - @JsonProperty(value = "properties", required = true) - private LibraryInfo innerProperties = new LibraryInfo(); + @JsonProperty(value = "properties.name") + private String namePropertiesName; - /** - * Get the innerProperties property: Information about a library/package created at the workspace level. - * Library/package properties. - * - * @return the innerProperties value. + /* + * Storage blob path of library. */ - private LibraryInfo innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.path") + private String path; + + /* + * Storage blob container name. + */ + @JsonProperty(value = "properties.containerName") + private String containerName; + + /* + * The last update time of the library. + */ + @JsonProperty(value = "properties.uploadedTimestamp") + private OffsetDateTime uploadedTimestamp; + + /* + * Type of the library. + */ + @JsonProperty(value = "properties.type") + private String typePropertiesType; + + /* + * Provisioning status of the library/package. + */ + @JsonProperty(value = "properties.provisioningStatus", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningStatus; + + /* + * Creator Id of the library/package. + */ + @JsonProperty(value = "properties.creatorId", access = JsonProperty.Access.WRITE_ONLY) + private String creatorId; /** - * Get the name property: Name of the library. + * Get the namePropertiesName property: Name of the library. * - * @return the name value. + * @return the namePropertiesName value. */ public String namePropertiesName() { - return this.innerProperties() == null ? null : this.innerProperties().name(); + return this.namePropertiesName; } /** - * Set the name property: Name of the library. + * Set the namePropertiesName property: Name of the library. * - * @param name the name value to set. + * @param namePropertiesName the namePropertiesName value to set. * @return the LibraryResourceInner object itself. */ - public LibraryResourceInner withNamePropertiesName(String name) { - if (this.innerProperties() == null) { - this.innerProperties = new LibraryInfo(); - } - this.innerProperties().withName(name); + public LibraryResourceInner withNamePropertiesName(String namePropertiesName) { + this.namePropertiesName = namePropertiesName; return this; } @@ -62,7 +86,7 @@ public LibraryResourceInner withNamePropertiesName(String name) { * @return the path value. */ public String path() { - return this.innerProperties() == null ? null : this.innerProperties().path(); + return this.path; } /** @@ -72,10 +96,7 @@ public String path() { * @return the LibraryResourceInner object itself. */ public LibraryResourceInner withPath(String path) { - if (this.innerProperties() == null) { - this.innerProperties = new LibraryInfo(); - } - this.innerProperties().withPath(path); + this.path = path; return this; } @@ -85,7 +106,7 @@ public LibraryResourceInner withPath(String path) { * @return the containerName value. */ public String containerName() { - return this.innerProperties() == null ? null : this.innerProperties().containerName(); + return this.containerName; } /** @@ -95,10 +116,7 @@ public String containerName() { * @return the LibraryResourceInner object itself. */ public LibraryResourceInner withContainerName(String containerName) { - if (this.innerProperties() == null) { - this.innerProperties = new LibraryInfo(); - } - this.innerProperties().withContainerName(containerName); + this.containerName = containerName; return this; } @@ -108,7 +126,7 @@ public LibraryResourceInner withContainerName(String containerName) { * @return the uploadedTimestamp value. */ public OffsetDateTime uploadedTimestamp() { - return this.innerProperties() == null ? null : this.innerProperties().uploadedTimestamp(); + return this.uploadedTimestamp; } /** @@ -118,33 +136,27 @@ public OffsetDateTime uploadedTimestamp() { * @return the LibraryResourceInner object itself. */ public LibraryResourceInner withUploadedTimestamp(OffsetDateTime uploadedTimestamp) { - if (this.innerProperties() == null) { - this.innerProperties = new LibraryInfo(); - } - this.innerProperties().withUploadedTimestamp(uploadedTimestamp); + this.uploadedTimestamp = uploadedTimestamp; return this; } /** - * Get the type property: Type of the library. + * Get the typePropertiesType property: Type of the library. * - * @return the type value. + * @return the typePropertiesType value. */ public String typePropertiesType() { - return this.innerProperties() == null ? null : this.innerProperties().type(); + return this.typePropertiesType; } /** - * Set the type property: Type of the library. + * Set the typePropertiesType property: Type of the library. * - * @param type the type value to set. + * @param typePropertiesType the typePropertiesType value to set. * @return the LibraryResourceInner object itself. */ - public LibraryResourceInner withTypePropertiesType(String type) { - if (this.innerProperties() == null) { - this.innerProperties = new LibraryInfo(); - } - this.innerProperties().withType(type); + public LibraryResourceInner withTypePropertiesType(String typePropertiesType) { + this.typePropertiesType = typePropertiesType; return this; } @@ -154,7 +166,7 @@ public LibraryResourceInner withTypePropertiesType(String type) { * @return the provisioningStatus value. */ public String provisioningStatus() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningStatus(); + return this.provisioningStatus; } /** @@ -163,7 +175,7 @@ public String provisioningStatus() { * @return the creatorId value. */ public String creatorId() { - return this.innerProperties() == null ? null : this.innerProperties().creatorId(); + return this.creatorId; } /** @@ -174,13 +186,5 @@ public String creatorId() { @Override public void validate() { super.validate(); - if (innerProperties() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property innerProperties in model LibraryResourceInner")); - } else { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/LicensedComponentSetupTypeProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/LicensedComponentSetupTypeProperties.java deleted file mode 100644 index 73627ad917cba..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/LicensedComponentSetupTypeProperties.java +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.SecretBase; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Installation of licensed component setup type properties. */ -@Fluent -public final class LicensedComponentSetupTypeProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(LicensedComponentSetupTypeProperties.class); - - /* - * The name of the 3rd party component. - */ - @JsonProperty(value = "componentName", required = true) - private String componentName; - - /* - * The license key to activate the component. - */ - @JsonProperty(value = "licenseKey") - private SecretBase licenseKey; - - /** - * Get the componentName property: The name of the 3rd party component. - * - * @return the componentName value. - */ - public String componentName() { - return this.componentName; - } - - /** - * Set the componentName property: The name of the 3rd party component. - * - * @param componentName the componentName value to set. - * @return the LicensedComponentSetupTypeProperties object itself. - */ - public LicensedComponentSetupTypeProperties withComponentName(String componentName) { - this.componentName = componentName; - return this; - } - - /** - * Get the licenseKey property: The license key to activate the component. - * - * @return the licenseKey value. - */ - public SecretBase licenseKey() { - return this.licenseKey; - } - - /** - * Set the licenseKey property: The license key to activate the component. - * - * @param licenseKey the licenseKey value to set. - * @return the LicensedComponentSetupTypeProperties object itself. - */ - public LicensedComponentSetupTypeProperties withLicenseKey(SecretBase licenseKey) { - this.licenseKey = licenseKey; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (componentName() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property componentName in model LicensedComponentSetupTypeProperties")); - } - if (licenseKey() != null) { - licenseKey().validate(); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MaintenanceWindowOptionsInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MaintenanceWindowOptionsInner.java index cc1d75ed77c9c..2d2fb50ebe3af 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MaintenanceWindowOptionsInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MaintenanceWindowOptionsInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.MaintenanceWindowTimeRange; @@ -13,24 +14,53 @@ import java.util.List; /** Maintenance window options. */ +@JsonFlatten @Fluent -public final class MaintenanceWindowOptionsInner extends ProxyResource { +public class MaintenanceWindowOptionsInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(MaintenanceWindowOptionsInner.class); /* - * Resource properties. + * Whether maintenance windows are enabled for the database. */ - @JsonProperty(value = "properties") - private MaintenanceWindowOptionsProperties innerProperties; + @JsonProperty(value = "properties.isEnabled") + private Boolean isEnabled; - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. + /* + * Available maintenance cycles e.g. {Saturday, 0, 48*60}, {Wednesday, 0, + * 24*60}. */ - private MaintenanceWindowOptionsProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.maintenanceWindowCycles") + private List maintenanceWindowCycles; + + /* + * Minimum duration of maintenance window. + */ + @JsonProperty(value = "properties.minDurationInMinutes") + private Integer minDurationInMinutes; + + /* + * Default duration for maintenance window. + */ + @JsonProperty(value = "properties.defaultDurationInMinutes") + private Integer defaultDurationInMinutes; + + /* + * Minimum number of maintenance windows cycles to be set on the database. + */ + @JsonProperty(value = "properties.minCycles") + private Integer minCycles; + + /* + * Time granularity in minutes for maintenance windows. + */ + @JsonProperty(value = "properties.timeGranularityInMinutes") + private Integer timeGranularityInMinutes; + + /* + * Whether we allow multiple maintenance windows per cycle. + */ + @JsonProperty(value = "properties.allowMultipleMaintenanceWindowsPerCycle") + private Boolean allowMultipleMaintenanceWindowsPerCycle; /** * Get the isEnabled property: Whether maintenance windows are enabled for the database. @@ -38,7 +68,7 @@ private MaintenanceWindowOptionsProperties innerProperties() { * @return the isEnabled value. */ public Boolean isEnabled() { - return this.innerProperties() == null ? null : this.innerProperties().isEnabled(); + return this.isEnabled; } /** @@ -48,10 +78,7 @@ public Boolean isEnabled() { * @return the MaintenanceWindowOptionsInner object itself. */ public MaintenanceWindowOptionsInner withIsEnabled(Boolean isEnabled) { - if (this.innerProperties() == null) { - this.innerProperties = new MaintenanceWindowOptionsProperties(); - } - this.innerProperties().withIsEnabled(isEnabled); + this.isEnabled = isEnabled; return this; } @@ -62,7 +89,7 @@ public MaintenanceWindowOptionsInner withIsEnabled(Boolean isEnabled) { * @return the maintenanceWindowCycles value. */ public List maintenanceWindowCycles() { - return this.innerProperties() == null ? null : this.innerProperties().maintenanceWindowCycles(); + return this.maintenanceWindowCycles; } /** @@ -74,10 +101,7 @@ public List maintenanceWindowCycles() { */ public MaintenanceWindowOptionsInner withMaintenanceWindowCycles( List maintenanceWindowCycles) { - if (this.innerProperties() == null) { - this.innerProperties = new MaintenanceWindowOptionsProperties(); - } - this.innerProperties().withMaintenanceWindowCycles(maintenanceWindowCycles); + this.maintenanceWindowCycles = maintenanceWindowCycles; return this; } @@ -87,7 +111,7 @@ public MaintenanceWindowOptionsInner withMaintenanceWindowCycles( * @return the minDurationInMinutes value. */ public Integer minDurationInMinutes() { - return this.innerProperties() == null ? null : this.innerProperties().minDurationInMinutes(); + return this.minDurationInMinutes; } /** @@ -97,10 +121,7 @@ public Integer minDurationInMinutes() { * @return the MaintenanceWindowOptionsInner object itself. */ public MaintenanceWindowOptionsInner withMinDurationInMinutes(Integer minDurationInMinutes) { - if (this.innerProperties() == null) { - this.innerProperties = new MaintenanceWindowOptionsProperties(); - } - this.innerProperties().withMinDurationInMinutes(minDurationInMinutes); + this.minDurationInMinutes = minDurationInMinutes; return this; } @@ -110,7 +131,7 @@ public MaintenanceWindowOptionsInner withMinDurationInMinutes(Integer minDuratio * @return the defaultDurationInMinutes value. */ public Integer defaultDurationInMinutes() { - return this.innerProperties() == null ? null : this.innerProperties().defaultDurationInMinutes(); + return this.defaultDurationInMinutes; } /** @@ -120,10 +141,7 @@ public Integer defaultDurationInMinutes() { * @return the MaintenanceWindowOptionsInner object itself. */ public MaintenanceWindowOptionsInner withDefaultDurationInMinutes(Integer defaultDurationInMinutes) { - if (this.innerProperties() == null) { - this.innerProperties = new MaintenanceWindowOptionsProperties(); - } - this.innerProperties().withDefaultDurationInMinutes(defaultDurationInMinutes); + this.defaultDurationInMinutes = defaultDurationInMinutes; return this; } @@ -133,7 +151,7 @@ public MaintenanceWindowOptionsInner withDefaultDurationInMinutes(Integer defaul * @return the minCycles value. */ public Integer minCycles() { - return this.innerProperties() == null ? null : this.innerProperties().minCycles(); + return this.minCycles; } /** @@ -143,10 +161,7 @@ public Integer minCycles() { * @return the MaintenanceWindowOptionsInner object itself. */ public MaintenanceWindowOptionsInner withMinCycles(Integer minCycles) { - if (this.innerProperties() == null) { - this.innerProperties = new MaintenanceWindowOptionsProperties(); - } - this.innerProperties().withMinCycles(minCycles); + this.minCycles = minCycles; return this; } @@ -156,7 +171,7 @@ public MaintenanceWindowOptionsInner withMinCycles(Integer minCycles) { * @return the timeGranularityInMinutes value. */ public Integer timeGranularityInMinutes() { - return this.innerProperties() == null ? null : this.innerProperties().timeGranularityInMinutes(); + return this.timeGranularityInMinutes; } /** @@ -166,10 +181,7 @@ public Integer timeGranularityInMinutes() { * @return the MaintenanceWindowOptionsInner object itself. */ public MaintenanceWindowOptionsInner withTimeGranularityInMinutes(Integer timeGranularityInMinutes) { - if (this.innerProperties() == null) { - this.innerProperties = new MaintenanceWindowOptionsProperties(); - } - this.innerProperties().withTimeGranularityInMinutes(timeGranularityInMinutes); + this.timeGranularityInMinutes = timeGranularityInMinutes; return this; } @@ -180,7 +192,7 @@ public MaintenanceWindowOptionsInner withTimeGranularityInMinutes(Integer timeGr * @return the allowMultipleMaintenanceWindowsPerCycle value. */ public Boolean allowMultipleMaintenanceWindowsPerCycle() { - return this.innerProperties() == null ? null : this.innerProperties().allowMultipleMaintenanceWindowsPerCycle(); + return this.allowMultipleMaintenanceWindowsPerCycle; } /** @@ -192,10 +204,7 @@ public Boolean allowMultipleMaintenanceWindowsPerCycle() { */ public MaintenanceWindowOptionsInner withAllowMultipleMaintenanceWindowsPerCycle( Boolean allowMultipleMaintenanceWindowsPerCycle) { - if (this.innerProperties() == null) { - this.innerProperties = new MaintenanceWindowOptionsProperties(); - } - this.innerProperties().withAllowMultipleMaintenanceWindowsPerCycle(allowMultipleMaintenanceWindowsPerCycle); + this.allowMultipleMaintenanceWindowsPerCycle = allowMultipleMaintenanceWindowsPerCycle; return this; } @@ -205,8 +214,8 @@ public MaintenanceWindowOptionsInner withAllowMultipleMaintenanceWindowsPerCycle * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (maintenanceWindowCycles() != null) { + maintenanceWindowCycles().forEach(e -> e.validate()); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MaintenanceWindowOptionsProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MaintenanceWindowOptionsProperties.java deleted file mode 100644 index cf7b8954921ea..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MaintenanceWindowOptionsProperties.java +++ /dev/null @@ -1,218 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.MaintenanceWindowTimeRange; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Maintenance window options properties. */ -@Fluent -public final class MaintenanceWindowOptionsProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MaintenanceWindowOptionsProperties.class); - - /* - * Whether maintenance windows are enabled for the database. - */ - @JsonProperty(value = "isEnabled") - private Boolean isEnabled; - - /* - * Available maintenance cycles e.g. {Saturday, 0, 48*60}, {Wednesday, 0, - * 24*60}. - */ - @JsonProperty(value = "maintenanceWindowCycles") - private List maintenanceWindowCycles; - - /* - * Minimum duration of maintenance window. - */ - @JsonProperty(value = "minDurationInMinutes") - private Integer minDurationInMinutes; - - /* - * Default duration for maintenance window. - */ - @JsonProperty(value = "defaultDurationInMinutes") - private Integer defaultDurationInMinutes; - - /* - * Minimum number of maintenance windows cycles to be set on the database. - */ - @JsonProperty(value = "minCycles") - private Integer minCycles; - - /* - * Time granularity in minutes for maintenance windows. - */ - @JsonProperty(value = "timeGranularityInMinutes") - private Integer timeGranularityInMinutes; - - /* - * Whether we allow multiple maintenance windows per cycle. - */ - @JsonProperty(value = "allowMultipleMaintenanceWindowsPerCycle") - private Boolean allowMultipleMaintenanceWindowsPerCycle; - - /** - * Get the isEnabled property: Whether maintenance windows are enabled for the database. - * - * @return the isEnabled value. - */ - public Boolean isEnabled() { - return this.isEnabled; - } - - /** - * Set the isEnabled property: Whether maintenance windows are enabled for the database. - * - * @param isEnabled the isEnabled value to set. - * @return the MaintenanceWindowOptionsProperties object itself. - */ - public MaintenanceWindowOptionsProperties withIsEnabled(Boolean isEnabled) { - this.isEnabled = isEnabled; - return this; - } - - /** - * Get the maintenanceWindowCycles property: Available maintenance cycles e.g. {Saturday, 0, 48*60}, {Wednesday, 0, - * 24*60}. - * - * @return the maintenanceWindowCycles value. - */ - public List maintenanceWindowCycles() { - return this.maintenanceWindowCycles; - } - - /** - * Set the maintenanceWindowCycles property: Available maintenance cycles e.g. {Saturday, 0, 48*60}, {Wednesday, 0, - * 24*60}. - * - * @param maintenanceWindowCycles the maintenanceWindowCycles value to set. - * @return the MaintenanceWindowOptionsProperties object itself. - */ - public MaintenanceWindowOptionsProperties withMaintenanceWindowCycles( - List maintenanceWindowCycles) { - this.maintenanceWindowCycles = maintenanceWindowCycles; - return this; - } - - /** - * Get the minDurationInMinutes property: Minimum duration of maintenance window. - * - * @return the minDurationInMinutes value. - */ - public Integer minDurationInMinutes() { - return this.minDurationInMinutes; - } - - /** - * Set the minDurationInMinutes property: Minimum duration of maintenance window. - * - * @param minDurationInMinutes the minDurationInMinutes value to set. - * @return the MaintenanceWindowOptionsProperties object itself. - */ - public MaintenanceWindowOptionsProperties withMinDurationInMinutes(Integer minDurationInMinutes) { - this.minDurationInMinutes = minDurationInMinutes; - return this; - } - - /** - * Get the defaultDurationInMinutes property: Default duration for maintenance window. - * - * @return the defaultDurationInMinutes value. - */ - public Integer defaultDurationInMinutes() { - return this.defaultDurationInMinutes; - } - - /** - * Set the defaultDurationInMinutes property: Default duration for maintenance window. - * - * @param defaultDurationInMinutes the defaultDurationInMinutes value to set. - * @return the MaintenanceWindowOptionsProperties object itself. - */ - public MaintenanceWindowOptionsProperties withDefaultDurationInMinutes(Integer defaultDurationInMinutes) { - this.defaultDurationInMinutes = defaultDurationInMinutes; - return this; - } - - /** - * Get the minCycles property: Minimum number of maintenance windows cycles to be set on the database. - * - * @return the minCycles value. - */ - public Integer minCycles() { - return this.minCycles; - } - - /** - * Set the minCycles property: Minimum number of maintenance windows cycles to be set on the database. - * - * @param minCycles the minCycles value to set. - * @return the MaintenanceWindowOptionsProperties object itself. - */ - public MaintenanceWindowOptionsProperties withMinCycles(Integer minCycles) { - this.minCycles = minCycles; - return this; - } - - /** - * Get the timeGranularityInMinutes property: Time granularity in minutes for maintenance windows. - * - * @return the timeGranularityInMinutes value. - */ - public Integer timeGranularityInMinutes() { - return this.timeGranularityInMinutes; - } - - /** - * Set the timeGranularityInMinutes property: Time granularity in minutes for maintenance windows. - * - * @param timeGranularityInMinutes the timeGranularityInMinutes value to set. - * @return the MaintenanceWindowOptionsProperties object itself. - */ - public MaintenanceWindowOptionsProperties withTimeGranularityInMinutes(Integer timeGranularityInMinutes) { - this.timeGranularityInMinutes = timeGranularityInMinutes; - return this; - } - - /** - * Get the allowMultipleMaintenanceWindowsPerCycle property: Whether we allow multiple maintenance windows per - * cycle. - * - * @return the allowMultipleMaintenanceWindowsPerCycle value. - */ - public Boolean allowMultipleMaintenanceWindowsPerCycle() { - return this.allowMultipleMaintenanceWindowsPerCycle; - } - - /** - * Set the allowMultipleMaintenanceWindowsPerCycle property: Whether we allow multiple maintenance windows per - * cycle. - * - * @param allowMultipleMaintenanceWindowsPerCycle the allowMultipleMaintenanceWindowsPerCycle value to set. - * @return the MaintenanceWindowOptionsProperties object itself. - */ - public MaintenanceWindowOptionsProperties withAllowMultipleMaintenanceWindowsPerCycle( - Boolean allowMultipleMaintenanceWindowsPerCycle) { - this.allowMultipleMaintenanceWindowsPerCycle = allowMultipleMaintenanceWindowsPerCycle; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (maintenanceWindowCycles() != null) { - maintenanceWindowCycles().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MaintenanceWindowsInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MaintenanceWindowsInner.java index 70327e4c26a5d..41b69243f26c6 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MaintenanceWindowsInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MaintenanceWindowsInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.MaintenanceWindowTimeRange; @@ -13,24 +14,16 @@ import java.util.List; /** Maintenance windows. */ +@JsonFlatten @Fluent -public final class MaintenanceWindowsInner extends ProxyResource { +public class MaintenanceWindowsInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(MaintenanceWindowsInner.class); /* - * Resource properties. + * The timeRanges property. */ - @JsonProperty(value = "properties") - private MaintenanceWindowsProperties innerProperties; - - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private MaintenanceWindowsProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.timeRanges") + private List timeRanges; /** * Get the timeRanges property: The timeRanges property. @@ -38,7 +31,7 @@ private MaintenanceWindowsProperties innerProperties() { * @return the timeRanges value. */ public List timeRanges() { - return this.innerProperties() == null ? null : this.innerProperties().timeRanges(); + return this.timeRanges; } /** @@ -48,10 +41,7 @@ public List timeRanges() { * @return the MaintenanceWindowsInner object itself. */ public MaintenanceWindowsInner withTimeRanges(List timeRanges) { - if (this.innerProperties() == null) { - this.innerProperties = new MaintenanceWindowsProperties(); - } - this.innerProperties().withTimeRanges(timeRanges); + this.timeRanges = timeRanges; return this; } @@ -61,8 +51,8 @@ public MaintenanceWindowsInner withTimeRanges(List t * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (timeRanges() != null) { + timeRanges().forEach(e -> e.validate()); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MaintenanceWindowsProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MaintenanceWindowsProperties.java deleted file mode 100644 index a8ac929932ae5..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MaintenanceWindowsProperties.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.MaintenanceWindowTimeRange; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Maintenance windows resource properties. */ -@Fluent -public final class MaintenanceWindowsProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MaintenanceWindowsProperties.class); - - /* - * The timeRanges property. - */ - @JsonProperty(value = "timeRanges") - private List timeRanges; - - /** - * Get the timeRanges property: The timeRanges property. - * - * @return the timeRanges value. - */ - public List timeRanges() { - return this.timeRanges; - } - - /** - * Set the timeRanges property: The timeRanges property. - * - * @param timeRanges the timeRanges value to set. - * @return the MaintenanceWindowsProperties object itself. - */ - public MaintenanceWindowsProperties withTimeRanges(List timeRanges) { - this.timeRanges = timeRanges; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (timeRanges() != null) { - timeRanges().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ManagedIdentitySqlControlSettingsModelInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ManagedIdentitySqlControlSettingsModelInner.java index 427df6a84ca04..e51d988242b17 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ManagedIdentitySqlControlSettingsModelInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ManagedIdentitySqlControlSettingsModelInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity; @@ -12,26 +13,17 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** Managed Identity Sql Control Settings Sql Control Settings for workspace managed identity. */ +@JsonFlatten @Fluent -public final class ManagedIdentitySqlControlSettingsModelInner extends ProxyResource { +public class ManagedIdentitySqlControlSettingsModelInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedIdentitySqlControlSettingsModelInner.class); /* - * Managed Identity Sql Control Settings Sql Control Settings for workspace - * managed identity + * Grant sql control to managed identity */ - @JsonProperty(value = "properties") - private ManagedIdentitySqlControlSettingsModelProperties innerProperties; - - /** - * Get the innerProperties property: Managed Identity Sql Control Settings Sql Control Settings for workspace - * managed identity. - * - * @return the innerProperties value. - */ - private ManagedIdentitySqlControlSettingsModelProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.grantSqlControlToManagedIdentity") + private ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity + grantSqlControlToManagedIdentity; /** * Get the grantSqlControlToManagedIdentity property: Grant sql control to managed identity. @@ -40,7 +32,7 @@ private ManagedIdentitySqlControlSettingsModelProperties innerProperties() { */ public ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity grantSqlControlToManagedIdentity() { - return this.innerProperties() == null ? null : this.innerProperties().grantSqlControlToManagedIdentity(); + return this.grantSqlControlToManagedIdentity; } /** @@ -52,10 +44,7 @@ private ManagedIdentitySqlControlSettingsModelProperties innerProperties() { public ManagedIdentitySqlControlSettingsModelInner withGrantSqlControlToManagedIdentity( ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity grantSqlControlToManagedIdentity) { - if (this.innerProperties() == null) { - this.innerProperties = new ManagedIdentitySqlControlSettingsModelProperties(); - } - this.innerProperties().withGrantSqlControlToManagedIdentity(grantSqlControlToManagedIdentity); + this.grantSqlControlToManagedIdentity = grantSqlControlToManagedIdentity; return this; } @@ -65,8 +54,8 @@ public ManagedIdentitySqlControlSettingsModelInner withGrantSqlControlToManagedI * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (grantSqlControlToManagedIdentity() != null) { + grantSqlControlToManagedIdentity().validate(); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ManagedIdentitySqlControlSettingsModelProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ManagedIdentitySqlControlSettingsModelProperties.java deleted file mode 100644 index 4a25eff4652cb..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ManagedIdentitySqlControlSettingsModelProperties.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Managed Identity Sql Control Settings Sql Control Settings for workspace managed identity. */ -@Fluent -public final class ManagedIdentitySqlControlSettingsModelProperties { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ManagedIdentitySqlControlSettingsModelProperties.class); - - /* - * Grant sql control to managed identity - */ - @JsonProperty(value = "grantSqlControlToManagedIdentity") - private ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity - grantSqlControlToManagedIdentity; - - /** - * Get the grantSqlControlToManagedIdentity property: Grant sql control to managed identity. - * - * @return the grantSqlControlToManagedIdentity value. - */ - public ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity - grantSqlControlToManagedIdentity() { - return this.grantSqlControlToManagedIdentity; - } - - /** - * Set the grantSqlControlToManagedIdentity property: Grant sql control to managed identity. - * - * @param grantSqlControlToManagedIdentity the grantSqlControlToManagedIdentity value to set. - * @return the ManagedIdentitySqlControlSettingsModelProperties object itself. - */ - public ManagedIdentitySqlControlSettingsModelProperties withGrantSqlControlToManagedIdentity( - ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity - grantSqlControlToManagedIdentity) { - this.grantSqlControlToManagedIdentity = grantSqlControlToManagedIdentity; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (grantSqlControlToManagedIdentity() != null) { - grantSqlControlToManagedIdentity().validate(); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ManagedIntegrationRuntimeStatusTypeProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ManagedIntegrationRuntimeStatusTypeProperties.java deleted file mode 100644 index 4175841551bac..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ManagedIntegrationRuntimeStatusTypeProperties.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.ManagedIntegrationRuntimeError; -import com.azure.resourcemanager.synapse.models.ManagedIntegrationRuntimeNode; -import com.azure.resourcemanager.synapse.models.ManagedIntegrationRuntimeOperationResult; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Managed integration runtime status type properties. */ -@Immutable -public final class ManagedIntegrationRuntimeStatusTypeProperties { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(ManagedIntegrationRuntimeStatusTypeProperties.class); - - /* - * The time at which the integration runtime was created, in ISO8601 - * format. - */ - @JsonProperty(value = "createTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime createTime; - - /* - * The list of nodes for managed integration runtime. - */ - @JsonProperty(value = "nodes", access = JsonProperty.Access.WRITE_ONLY) - private List nodes; - - /* - * The errors that occurred on this integration runtime. - */ - @JsonProperty(value = "otherErrors", access = JsonProperty.Access.WRITE_ONLY) - private List otherErrors; - - /* - * The last operation result that occurred on this integration runtime. - */ - @JsonProperty(value = "lastOperation", access = JsonProperty.Access.WRITE_ONLY) - private ManagedIntegrationRuntimeOperationResult lastOperation; - - /** - * Get the createTime property: The time at which the integration runtime was created, in ISO8601 format. - * - * @return the createTime value. - */ - public OffsetDateTime createTime() { - return this.createTime; - } - - /** - * Get the nodes property: The list of nodes for managed integration runtime. - * - * @return the nodes value. - */ - public List nodes() { - return this.nodes; - } - - /** - * Get the otherErrors property: The errors that occurred on this integration runtime. - * - * @return the otherErrors value. - */ - public List otherErrors() { - return this.otherErrors; - } - - /** - * Get the lastOperation property: The last operation result that occurred on this integration runtime. - * - * @return the lastOperation value. - */ - public ManagedIntegrationRuntimeOperationResult lastOperation() { - return this.lastOperation; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (nodes() != null) { - nodes().forEach(e -> e.validate()); - } - if (otherErrors() != null) { - otherErrors().forEach(e -> e.validate()); - } - if (lastOperation() != null) { - lastOperation().validate(); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ManagedIntegrationRuntimeTypeProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ManagedIntegrationRuntimeTypeProperties.java deleted file mode 100644 index bf13c3de69df0..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ManagedIntegrationRuntimeTypeProperties.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeComputeProperties; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeSsisProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Managed integration runtime type properties. */ -@Fluent -public final class ManagedIntegrationRuntimeTypeProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedIntegrationRuntimeTypeProperties.class); - - /* - * The compute resource for managed integration runtime. - */ - @JsonProperty(value = "computeProperties") - private IntegrationRuntimeComputeProperties computeProperties; - - /* - * SSIS properties for managed integration runtime. - */ - @JsonProperty(value = "ssisProperties") - private IntegrationRuntimeSsisProperties ssisProperties; - - /** - * Get the computeProperties property: The compute resource for managed integration runtime. - * - * @return the computeProperties value. - */ - public IntegrationRuntimeComputeProperties computeProperties() { - return this.computeProperties; - } - - /** - * Set the computeProperties property: The compute resource for managed integration runtime. - * - * @param computeProperties the computeProperties value to set. - * @return the ManagedIntegrationRuntimeTypeProperties object itself. - */ - public ManagedIntegrationRuntimeTypeProperties withComputeProperties( - IntegrationRuntimeComputeProperties computeProperties) { - this.computeProperties = computeProperties; - return this; - } - - /** - * Get the ssisProperties property: SSIS properties for managed integration runtime. - * - * @return the ssisProperties value. - */ - public IntegrationRuntimeSsisProperties ssisProperties() { - return this.ssisProperties; - } - - /** - * Set the ssisProperties property: SSIS properties for managed integration runtime. - * - * @param ssisProperties the ssisProperties value to set. - * @return the ManagedIntegrationRuntimeTypeProperties object itself. - */ - public ManagedIntegrationRuntimeTypeProperties withSsisProperties(IntegrationRuntimeSsisProperties ssisProperties) { - this.ssisProperties = ssisProperties; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (computeProperties() != null) { - computeProperties().validate(); - } - if (ssisProperties() != null) { - ssisProperties().validate(); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MetadataSyncConfigInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MetadataSyncConfigInner.java index 35c6218e933c9..1cec5323d1c55 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MetadataSyncConfigInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MetadataSyncConfigInner.java @@ -5,30 +5,29 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Metadata sync configuration Configuration for metadata sync. */ +@JsonFlatten @Fluent -public final class MetadataSyncConfigInner extends ProxyResource { +public class MetadataSyncConfigInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(MetadataSyncConfigInner.class); /* - * Metadata Sync Config properties + * Indicates whether the metadata sync is enabled or disabled */ - @JsonProperty(value = "properties") - private MetadataSyncConfigProperties innerProperties; + @JsonProperty(value = "properties.enabled") + private Boolean enabled; - /** - * Get the innerProperties property: Metadata Sync Config properties. - * - * @return the innerProperties value. + /* + * The Sync Interval in minutes. */ - private MetadataSyncConfigProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.syncIntervalInMinutes") + private Integer syncIntervalInMinutes; /** * Get the enabled property: Indicates whether the metadata sync is enabled or disabled. @@ -36,7 +35,7 @@ private MetadataSyncConfigProperties innerProperties() { * @return the enabled value. */ public Boolean enabled() { - return this.innerProperties() == null ? null : this.innerProperties().enabled(); + return this.enabled; } /** @@ -46,10 +45,7 @@ public Boolean enabled() { * @return the MetadataSyncConfigInner object itself. */ public MetadataSyncConfigInner withEnabled(Boolean enabled) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataSyncConfigProperties(); - } - this.innerProperties().withEnabled(enabled); + this.enabled = enabled; return this; } @@ -59,7 +55,7 @@ public MetadataSyncConfigInner withEnabled(Boolean enabled) { * @return the syncIntervalInMinutes value. */ public Integer syncIntervalInMinutes() { - return this.innerProperties() == null ? null : this.innerProperties().syncIntervalInMinutes(); + return this.syncIntervalInMinutes; } /** @@ -69,10 +65,7 @@ public Integer syncIntervalInMinutes() { * @return the MetadataSyncConfigInner object itself. */ public MetadataSyncConfigInner withSyncIntervalInMinutes(Integer syncIntervalInMinutes) { - if (this.innerProperties() == null) { - this.innerProperties = new MetadataSyncConfigProperties(); - } - this.innerProperties().withSyncIntervalInMinutes(syncIntervalInMinutes); + this.syncIntervalInMinutes = syncIntervalInMinutes; return this; } @@ -82,8 +75,5 @@ public MetadataSyncConfigInner withSyncIntervalInMinutes(Integer syncIntervalInM * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MetadataSyncConfigProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MetadataSyncConfigProperties.java deleted file mode 100644 index 7d4b9a88842f6..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/MetadataSyncConfigProperties.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Metadata Sync Config properties. */ -@Fluent -public final class MetadataSyncConfigProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(MetadataSyncConfigProperties.class); - - /* - * Indicates whether the metadata sync is enabled or disabled - */ - @JsonProperty(value = "enabled") - private Boolean enabled; - - /* - * The Sync Interval in minutes. - */ - @JsonProperty(value = "syncIntervalInMinutes") - private Integer syncIntervalInMinutes; - - /** - * Get the enabled property: Indicates whether the metadata sync is enabled or disabled. - * - * @return the enabled value. - */ - public Boolean enabled() { - return this.enabled; - } - - /** - * Set the enabled property: Indicates whether the metadata sync is enabled or disabled. - * - * @param enabled the enabled value to set. - * @return the MetadataSyncConfigProperties object itself. - */ - public MetadataSyncConfigProperties withEnabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * Get the syncIntervalInMinutes property: The Sync Interval in minutes. - * - * @return the syncIntervalInMinutes value. - */ - public Integer syncIntervalInMinutes() { - return this.syncIntervalInMinutes; - } - - /** - * Set the syncIntervalInMinutes property: The Sync Interval in minutes. - * - * @param syncIntervalInMinutes the syncIntervalInMinutes value to set. - * @return the MetadataSyncConfigProperties object itself. - */ - public MetadataSyncConfigProperties withSyncIntervalInMinutes(Integer syncIntervalInMinutes) { - this.syncIntervalInMinutes = syncIntervalInMinutes; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/OperationMetaPropertyInfo.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/OperationMetaPropertyInfo.java deleted file mode 100644 index ecd7500a9ecbc..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/OperationMetaPropertyInfo.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.OperationMetaServiceSpecification; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** What is this?. */ -@Fluent -public final class OperationMetaPropertyInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(OperationMetaPropertyInfo.class); - - /* - * Operation service specification - */ - @JsonProperty(value = "serviceSpecification") - private OperationMetaServiceSpecification serviceSpecification; - - /** - * Get the serviceSpecification property: Operation service specification. - * - * @return the serviceSpecification value. - */ - public OperationMetaServiceSpecification serviceSpecification() { - return this.serviceSpecification; - } - - /** - * Set the serviceSpecification property: Operation service specification. - * - * @param serviceSpecification the serviceSpecification value to set. - * @return the OperationMetaPropertyInfo object itself. - */ - public OperationMetaPropertyInfo withServiceSpecification(OperationMetaServiceSpecification serviceSpecification) { - this.serviceSpecification = serviceSpecification; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (serviceSpecification() != null) { - serviceSpecification().validate(); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/PrivateEndpointConnectionForPrivateLinkHubInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/PrivateEndpointConnectionForPrivateLinkHubInner.java index df242a2ef6184..75555a3a1bc3f 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/PrivateEndpointConnectionForPrivateLinkHubInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/PrivateEndpointConnectionForPrivateLinkHubInner.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.PrivateEndpointConnectionForPrivateLinkHubBasicAutoGenerated; +import com.azure.resourcemanager.synapse.models.PrivateEndpointConnectionProperties; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/PrivateEndpointConnectionInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/PrivateEndpointConnectionInner.java index 8f012cb4745c0..b7cc5a3c5ca18 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/PrivateEndpointConnectionInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/PrivateEndpointConnectionInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.PrivateEndpoint; @@ -13,24 +14,28 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** A private endpoint connection. */ +@JsonFlatten @Fluent -public final class PrivateEndpointConnectionInner extends ProxyResource { +public class PrivateEndpointConnectionInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionInner.class); /* - * Private endpoint connection properties. + * The private endpoint which the connection belongs to. */ - @JsonProperty(value = "properties") - private PrivateEndpointConnectionProperties innerProperties; + @JsonProperty(value = "properties.privateEndpoint") + private PrivateEndpoint privateEndpoint; - /** - * Get the innerProperties property: Private endpoint connection properties. - * - * @return the innerProperties value. + /* + * Connection state of the private endpoint connection. */ - private PrivateEndpointConnectionProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.privateLinkServiceConnectionState") + private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; + + /* + * Provisioning state of the private endpoint connection. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; /** * Get the privateEndpoint property: The private endpoint which the connection belongs to. @@ -38,7 +43,7 @@ private PrivateEndpointConnectionProperties innerProperties() { * @return the privateEndpoint value. */ public PrivateEndpoint privateEndpoint() { - return this.innerProperties() == null ? null : this.innerProperties().privateEndpoint(); + return this.privateEndpoint; } /** @@ -48,10 +53,7 @@ public PrivateEndpoint privateEndpoint() { * @return the PrivateEndpointConnectionInner object itself. */ public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privateEndpoint) { - if (this.innerProperties() == null) { - this.innerProperties = new PrivateEndpointConnectionProperties(); - } - this.innerProperties().withPrivateEndpoint(privateEndpoint); + this.privateEndpoint = privateEndpoint; return this; } @@ -61,7 +63,7 @@ public PrivateEndpointConnectionInner withPrivateEndpoint(PrivateEndpoint privat * @return the privateLinkServiceConnectionState value. */ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { - return this.innerProperties() == null ? null : this.innerProperties().privateLinkServiceConnectionState(); + return this.privateLinkServiceConnectionState; } /** @@ -72,10 +74,7 @@ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { */ public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState( PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { - if (this.innerProperties() == null) { - this.innerProperties = new PrivateEndpointConnectionProperties(); - } - this.innerProperties().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); + this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; return this; } @@ -85,7 +84,7 @@ public PrivateEndpointConnectionInner withPrivateLinkServiceConnectionState( * @return the provisioningState value. */ public String provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + return this.provisioningState; } /** @@ -94,8 +93,11 @@ public String provisioningState() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (privateEndpoint() != null) { + privateEndpoint().validate(); + } + if (privateLinkServiceConnectionState() != null) { + privateLinkServiceConnectionState().validate(); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/PrivateLinkHubInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/PrivateLinkHubInner.java index 9c142b2c65af1..0bd2cf01a58f8 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/PrivateLinkHubInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/PrivateLinkHubInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.Resource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.PrivateEndpointConnectionForPrivateLinkHubBasic; @@ -14,38 +15,22 @@ import java.util.Map; /** A privateLinkHub. */ +@JsonFlatten @Fluent -public final class PrivateLinkHubInner extends Resource { +public class PrivateLinkHubInner extends Resource { @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkHubInner.class); /* - * PrivateLinkHub resource properties + * PrivateLinkHub provisioning state */ - @JsonProperty(value = "properties") - private PrivateLinkHubProperties innerProperties; + @JsonProperty(value = "properties.provisioningState") + private String provisioningState; - /** - * Get the innerProperties property: PrivateLinkHub resource properties. - * - * @return the innerProperties value. + /* + * List of private endpoint connections */ - private PrivateLinkHubProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public PrivateLinkHubInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public PrivateLinkHubInner withTags(Map tags) { - super.withTags(tags); - return this; - } + @JsonProperty(value = "properties.privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) + private List privateEndpointConnections; /** * Get the provisioningState property: PrivateLinkHub provisioning state. @@ -53,7 +38,7 @@ public PrivateLinkHubInner withTags(Map tags) { * @return the provisioningState value. */ public String provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + return this.provisioningState; } /** @@ -63,10 +48,7 @@ public String provisioningState() { * @return the PrivateLinkHubInner object itself. */ public PrivateLinkHubInner withProvisioningState(String provisioningState) { - if (this.innerProperties() == null) { - this.innerProperties = new PrivateLinkHubProperties(); - } - this.innerProperties().withProvisioningState(provisioningState); + this.provisioningState = provisioningState; return this; } @@ -76,7 +58,21 @@ public PrivateLinkHubInner withProvisioningState(String provisioningState) { * @return the privateEndpointConnections value. */ public List privateEndpointConnections() { - return this.innerProperties() == null ? null : this.innerProperties().privateEndpointConnections(); + return this.privateEndpointConnections; + } + + /** {@inheritDoc} */ + @Override + public PrivateLinkHubInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public PrivateLinkHubInner withTags(Map tags) { + super.withTags(tags); + return this; } /** @@ -85,8 +81,8 @@ public List privateEndpointConn * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (privateEndpointConnections() != null) { + privateEndpointConnections().forEach(e -> e.validate()); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/PrivateLinkHubProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/PrivateLinkHubProperties.java deleted file mode 100644 index d1f55640a31ed..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/PrivateLinkHubProperties.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.PrivateEndpointConnectionForPrivateLinkHubBasic; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** PrivateLinkHub properties. */ -@Fluent -public final class PrivateLinkHubProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateLinkHubProperties.class); - - /* - * PrivateLinkHub provisioning state - */ - @JsonProperty(value = "provisioningState") - private String provisioningState; - - /* - * List of private endpoint connections - */ - @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) - private List privateEndpointConnections; - - /** - * Get the provisioningState property: PrivateLinkHub provisioning state. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState property: PrivateLinkHub provisioning state. - * - * @param provisioningState the provisioningState value to set. - * @return the PrivateLinkHubProperties object itself. - */ - public PrivateLinkHubProperties withProvisioningState(String provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the privateEndpointConnections property: List of private endpoint connections. - * - * @return the privateEndpointConnections value. - */ - public List privateEndpointConnections() { - return this.privateEndpointConnections; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (privateEndpointConnections() != null) { - privateEndpointConnections().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RecommendedSensitivityLabelUpdateProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RecommendedSensitivityLabelUpdateProperties.java deleted file mode 100644 index 7bd60cb7df518..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RecommendedSensitivityLabelUpdateProperties.java +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.RecommendedSensitivityLabelUpdateKind; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Properties of an operation executed on a recommended sensitivity label. */ -@Fluent -public final class RecommendedSensitivityLabelUpdateProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RecommendedSensitivityLabelUpdateProperties.class); - - /* - * The op property. - */ - @JsonProperty(value = "op", required = true) - private RecommendedSensitivityLabelUpdateKind op; - - /* - * Schema name of the column to update. - */ - @JsonProperty(value = "schema", required = true) - private String schema; - - /* - * Table name of the column to update. - */ - @JsonProperty(value = "table", required = true) - private String table; - - /* - * Column name to update. - */ - @JsonProperty(value = "column", required = true) - private String column; - - /** - * Get the op property: The op property. - * - * @return the op value. - */ - public RecommendedSensitivityLabelUpdateKind op() { - return this.op; - } - - /** - * Set the op property: The op property. - * - * @param op the op value to set. - * @return the RecommendedSensitivityLabelUpdateProperties object itself. - */ - public RecommendedSensitivityLabelUpdateProperties withOp(RecommendedSensitivityLabelUpdateKind op) { - this.op = op; - return this; - } - - /** - * Get the schema property: Schema name of the column to update. - * - * @return the schema value. - */ - public String schema() { - return this.schema; - } - - /** - * Set the schema property: Schema name of the column to update. - * - * @param schema the schema value to set. - * @return the RecommendedSensitivityLabelUpdateProperties object itself. - */ - public RecommendedSensitivityLabelUpdateProperties withSchema(String schema) { - this.schema = schema; - return this; - } - - /** - * Get the table property: Table name of the column to update. - * - * @return the table value. - */ - public String table() { - return this.table; - } - - /** - * Set the table property: Table name of the column to update. - * - * @param table the table value to set. - * @return the RecommendedSensitivityLabelUpdateProperties object itself. - */ - public RecommendedSensitivityLabelUpdateProperties withTable(String table) { - this.table = table; - return this; - } - - /** - * Get the column property: Column name to update. - * - * @return the column value. - */ - public String column() { - return this.column; - } - - /** - * Set the column property: Column name to update. - * - * @param column the column value to set. - * @return the RecommendedSensitivityLabelUpdateProperties object itself. - */ - public RecommendedSensitivityLabelUpdateProperties withColumn(String column) { - this.column = column; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (op() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property op in model RecommendedSensitivityLabelUpdateProperties")); - } - if (schema() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property schema in model RecommendedSensitivityLabelUpdateProperties")); - } - if (table() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property table in model RecommendedSensitivityLabelUpdateProperties")); - } - if (column() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property column in model RecommendedSensitivityLabelUpdateProperties")); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RecoverableSqlPoolInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RecoverableSqlPoolInner.java index 48a5ead9b743b..ef65ee8229a14 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RecoverableSqlPoolInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RecoverableSqlPoolInner.java @@ -4,7 +4,8 @@ package com.azure.resourcemanager.synapse.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -12,24 +13,34 @@ import java.time.OffsetDateTime; /** A recoverable sql pool. */ -@Fluent -public final class RecoverableSqlPoolInner extends ProxyResource { +@JsonFlatten +@Immutable +public class RecoverableSqlPoolInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(RecoverableSqlPoolInner.class); /* - * The properties of a recoverable sql pool + * The edition of the database */ - @JsonProperty(value = "properties") - private RecoverableSqlPoolProperties innerProperties; + @JsonProperty(value = "properties.edition", access = JsonProperty.Access.WRITE_ONLY) + private String edition; - /** - * Get the innerProperties property: The properties of a recoverable sql pool. - * - * @return the innerProperties value. + /* + * The service level objective name of the database */ - private RecoverableSqlPoolProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.serviceLevelObjective", access = JsonProperty.Access.WRITE_ONLY) + private String serviceLevelObjective; + + /* + * The elastic pool name of the database + */ + @JsonProperty(value = "properties.elasticPoolName", access = JsonProperty.Access.WRITE_ONLY) + private String elasticPoolName; + + /* + * The last available backup date of the database (ISO8601 format) + */ + @JsonProperty(value = "properties.lastAvailableBackupDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastAvailableBackupDate; /** * Get the edition property: The edition of the database. @@ -37,7 +48,7 @@ private RecoverableSqlPoolProperties innerProperties() { * @return the edition value. */ public String edition() { - return this.innerProperties() == null ? null : this.innerProperties().edition(); + return this.edition; } /** @@ -46,7 +57,7 @@ public String edition() { * @return the serviceLevelObjective value. */ public String serviceLevelObjective() { - return this.innerProperties() == null ? null : this.innerProperties().serviceLevelObjective(); + return this.serviceLevelObjective; } /** @@ -55,7 +66,7 @@ public String serviceLevelObjective() { * @return the elasticPoolName value. */ public String elasticPoolName() { - return this.innerProperties() == null ? null : this.innerProperties().elasticPoolName(); + return this.elasticPoolName; } /** @@ -64,7 +75,7 @@ public String elasticPoolName() { * @return the lastAvailableBackupDate value. */ public OffsetDateTime lastAvailableBackupDate() { - return this.innerProperties() == null ? null : this.innerProperties().lastAvailableBackupDate(); + return this.lastAvailableBackupDate; } /** @@ -73,8 +84,5 @@ public OffsetDateTime lastAvailableBackupDate() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RecoverableSqlPoolProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RecoverableSqlPoolProperties.java deleted file mode 100644 index 1e29c74e38462..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RecoverableSqlPoolProperties.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** The properties of a recoverable sql pool. */ -@Immutable -public final class RecoverableSqlPoolProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RecoverableSqlPoolProperties.class); - - /* - * The edition of the database - */ - @JsonProperty(value = "edition", access = JsonProperty.Access.WRITE_ONLY) - private String edition; - - /* - * The service level objective name of the database - */ - @JsonProperty(value = "serviceLevelObjective", access = JsonProperty.Access.WRITE_ONLY) - private String serviceLevelObjective; - - /* - * The elastic pool name of the database - */ - @JsonProperty(value = "elasticPoolName", access = JsonProperty.Access.WRITE_ONLY) - private String elasticPoolName; - - /* - * The last available backup date of the database (ISO8601 format) - */ - @JsonProperty(value = "lastAvailableBackupDate", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime lastAvailableBackupDate; - - /** - * Get the edition property: The edition of the database. - * - * @return the edition value. - */ - public String edition() { - return this.edition; - } - - /** - * Get the serviceLevelObjective property: The service level objective name of the database. - * - * @return the serviceLevelObjective value. - */ - public String serviceLevelObjective() { - return this.serviceLevelObjective; - } - - /** - * Get the elasticPoolName property: The elastic pool name of the database. - * - * @return the elasticPoolName value. - */ - public String elasticPoolName() { - return this.elasticPoolName; - } - - /** - * Get the lastAvailableBackupDate property: The last available backup date of the database (ISO8601 format). - * - * @return the lastAvailableBackupDate value. - */ - public OffsetDateTime lastAvailableBackupDate() { - return this.lastAvailableBackupDate; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ReplicationLinkInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ReplicationLinkInner.java index 883b1d43fac8d..a2cbcfb0af5bf 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ReplicationLinkInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ReplicationLinkInner.java @@ -4,7 +4,8 @@ package com.azure.resourcemanager.synapse.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.ReplicationRole; @@ -14,8 +15,9 @@ import java.time.OffsetDateTime; /** Represents a Sql pool replication link. */ -@Fluent -public final class ReplicationLinkInner extends ProxyResource { +@JsonFlatten +@Immutable +public class ReplicationLinkInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(ReplicationLinkInner.class); /* @@ -25,10 +27,65 @@ public final class ReplicationLinkInner extends ProxyResource { private String location; /* - * The properties representing the resource. + * Legacy value indicating whether termination is allowed. Currently + * always returns true. */ - @JsonProperty(value = "properties") - private ReplicationLinkProperties innerProperties; + @JsonProperty(value = "properties.isTerminationAllowed", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isTerminationAllowed; + + /* + * Replication mode of this replication link. + */ + @JsonProperty(value = "properties.replicationMode", access = JsonProperty.Access.WRITE_ONLY) + private String replicationMode; + + /* + * The name of the workspace hosting the partner Sql pool. + */ + @JsonProperty(value = "properties.partnerServer", access = JsonProperty.Access.WRITE_ONLY) + private String partnerServer; + + /* + * The name of the partner Sql pool. + */ + @JsonProperty(value = "properties.partnerDatabase", access = JsonProperty.Access.WRITE_ONLY) + private String partnerDatabase; + + /* + * The Azure Region of the partner Sql pool. + */ + @JsonProperty(value = "properties.partnerLocation", access = JsonProperty.Access.WRITE_ONLY) + private String partnerLocation; + + /* + * The role of the Sql pool in the replication link. + */ + @JsonProperty(value = "properties.role", access = JsonProperty.Access.WRITE_ONLY) + private ReplicationRole role; + + /* + * The role of the partner Sql pool in the replication link. + */ + @JsonProperty(value = "properties.partnerRole", access = JsonProperty.Access.WRITE_ONLY) + private ReplicationRole partnerRole; + + /* + * The start time for the replication link. + */ + @JsonProperty(value = "properties.startTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime startTime; + + /* + * The percentage of seeding complete for the replication link. + */ + @JsonProperty(value = "properties.percentComplete", access = JsonProperty.Access.WRITE_ONLY) + private Integer percentComplete; + + /* + * The replication state for the replication link. + */ + @JsonProperty(value = "properties.replicationState", access = JsonProperty.Access.WRITE_ONLY) + private ReplicationState replicationState; /** * Get the location property: Location of the workspace that contains this firewall rule. @@ -39,15 +96,6 @@ public String location() { return this.location; } - /** - * Get the innerProperties property: The properties representing the resource. - * - * @return the innerProperties value. - */ - private ReplicationLinkProperties innerProperties() { - return this.innerProperties; - } - /** * Get the isTerminationAllowed property: Legacy value indicating whether termination is allowed. Currently always * returns true. @@ -55,7 +103,7 @@ private ReplicationLinkProperties innerProperties() { * @return the isTerminationAllowed value. */ public Boolean isTerminationAllowed() { - return this.innerProperties() == null ? null : this.innerProperties().isTerminationAllowed(); + return this.isTerminationAllowed; } /** @@ -64,7 +112,7 @@ public Boolean isTerminationAllowed() { * @return the replicationMode value. */ public String replicationMode() { - return this.innerProperties() == null ? null : this.innerProperties().replicationMode(); + return this.replicationMode; } /** @@ -73,7 +121,7 @@ public String replicationMode() { * @return the partnerServer value. */ public String partnerServer() { - return this.innerProperties() == null ? null : this.innerProperties().partnerServer(); + return this.partnerServer; } /** @@ -82,7 +130,7 @@ public String partnerServer() { * @return the partnerDatabase value. */ public String partnerDatabase() { - return this.innerProperties() == null ? null : this.innerProperties().partnerDatabase(); + return this.partnerDatabase; } /** @@ -91,7 +139,7 @@ public String partnerDatabase() { * @return the partnerLocation value. */ public String partnerLocation() { - return this.innerProperties() == null ? null : this.innerProperties().partnerLocation(); + return this.partnerLocation; } /** @@ -100,7 +148,7 @@ public String partnerLocation() { * @return the role value. */ public ReplicationRole role() { - return this.innerProperties() == null ? null : this.innerProperties().role(); + return this.role; } /** @@ -109,7 +157,7 @@ public ReplicationRole role() { * @return the partnerRole value. */ public ReplicationRole partnerRole() { - return this.innerProperties() == null ? null : this.innerProperties().partnerRole(); + return this.partnerRole; } /** @@ -118,7 +166,7 @@ public ReplicationRole partnerRole() { * @return the startTime value. */ public OffsetDateTime startTime() { - return this.innerProperties() == null ? null : this.innerProperties().startTime(); + return this.startTime; } /** @@ -127,7 +175,7 @@ public OffsetDateTime startTime() { * @return the percentComplete value. */ public Integer percentComplete() { - return this.innerProperties() == null ? null : this.innerProperties().percentComplete(); + return this.percentComplete; } /** @@ -136,7 +184,7 @@ public Integer percentComplete() { * @return the replicationState value. */ public ReplicationState replicationState() { - return this.innerProperties() == null ? null : this.innerProperties().replicationState(); + return this.replicationState; } /** @@ -145,8 +193,5 @@ public ReplicationState replicationState() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ReplicationLinkProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ReplicationLinkProperties.java deleted file mode 100644 index fed7d92549765..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ReplicationLinkProperties.java +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.ReplicationRole; -import com.azure.resourcemanager.synapse.models.ReplicationState; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** Represents the properties of a Sql pool replication link. */ -@Immutable -public final class ReplicationLinkProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ReplicationLinkProperties.class); - - /* - * Legacy value indicating whether termination is allowed. Currently - * always returns true. - */ - @JsonProperty(value = "isTerminationAllowed", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isTerminationAllowed; - - /* - * Replication mode of this replication link. - */ - @JsonProperty(value = "replicationMode", access = JsonProperty.Access.WRITE_ONLY) - private String replicationMode; - - /* - * The name of the workspace hosting the partner Sql pool. - */ - @JsonProperty(value = "partnerServer", access = JsonProperty.Access.WRITE_ONLY) - private String partnerServer; - - /* - * The name of the partner Sql pool. - */ - @JsonProperty(value = "partnerDatabase", access = JsonProperty.Access.WRITE_ONLY) - private String partnerDatabase; - - /* - * The Azure Region of the partner Sql pool. - */ - @JsonProperty(value = "partnerLocation", access = JsonProperty.Access.WRITE_ONLY) - private String partnerLocation; - - /* - * The role of the Sql pool in the replication link. - */ - @JsonProperty(value = "role", access = JsonProperty.Access.WRITE_ONLY) - private ReplicationRole role; - - /* - * The role of the partner Sql pool in the replication link. - */ - @JsonProperty(value = "partnerRole", access = JsonProperty.Access.WRITE_ONLY) - private ReplicationRole partnerRole; - - /* - * The start time for the replication link. - */ - @JsonProperty(value = "startTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime startTime; - - /* - * The percentage of seeding complete for the replication link. - */ - @JsonProperty(value = "percentComplete", access = JsonProperty.Access.WRITE_ONLY) - private Integer percentComplete; - - /* - * The replication state for the replication link. - */ - @JsonProperty(value = "replicationState", access = JsonProperty.Access.WRITE_ONLY) - private ReplicationState replicationState; - - /** - * Get the isTerminationAllowed property: Legacy value indicating whether termination is allowed. Currently always - * returns true. - * - * @return the isTerminationAllowed value. - */ - public Boolean isTerminationAllowed() { - return this.isTerminationAllowed; - } - - /** - * Get the replicationMode property: Replication mode of this replication link. - * - * @return the replicationMode value. - */ - public String replicationMode() { - return this.replicationMode; - } - - /** - * Get the partnerServer property: The name of the workspace hosting the partner Sql pool. - * - * @return the partnerServer value. - */ - public String partnerServer() { - return this.partnerServer; - } - - /** - * Get the partnerDatabase property: The name of the partner Sql pool. - * - * @return the partnerDatabase value. - */ - public String partnerDatabase() { - return this.partnerDatabase; - } - - /** - * Get the partnerLocation property: The Azure Region of the partner Sql pool. - * - * @return the partnerLocation value. - */ - public String partnerLocation() { - return this.partnerLocation; - } - - /** - * Get the role property: The role of the Sql pool in the replication link. - * - * @return the role value. - */ - public ReplicationRole role() { - return this.role; - } - - /** - * Get the partnerRole property: The role of the partner Sql pool in the replication link. - * - * @return the partnerRole value. - */ - public ReplicationRole partnerRole() { - return this.partnerRole; - } - - /** - * Get the startTime property: The start time for the replication link. - * - * @return the startTime value. - */ - public OffsetDateTime startTime() { - return this.startTime; - } - - /** - * Get the percentComplete property: The percentage of seeding complete for the replication link. - * - * @return the percentComplete value. - */ - public Integer percentComplete() { - return this.percentComplete; - } - - /** - * Get the replicationState property: The replication state for the replication link. - * - * @return the replicationState value. - */ - public ReplicationState replicationState() { - return this.replicationState; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RestorableDroppedSqlPoolInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RestorableDroppedSqlPoolInner.java index c4b814d0a4baa..87219d0a307d2 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RestorableDroppedSqlPoolInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RestorableDroppedSqlPoolInner.java @@ -4,7 +4,8 @@ package com.azure.resourcemanager.synapse.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -12,8 +13,9 @@ import java.time.OffsetDateTime; /** A restorable dropped Sql pool. */ -@Fluent -public final class RestorableDroppedSqlPoolInner extends ProxyResource { +@JsonFlatten +@Immutable +public class RestorableDroppedSqlPoolInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(RestorableDroppedSqlPoolInner.class); /* @@ -23,10 +25,52 @@ public final class RestorableDroppedSqlPoolInner extends ProxyResource { private String location; /* - * The properties of a restorable dropped Sql pool + * The name of the database */ - @JsonProperty(value = "properties") - private RestorableDroppedSqlPoolProperties innerProperties; + @JsonProperty(value = "properties.databaseName", access = JsonProperty.Access.WRITE_ONLY) + private String databaseName; + + /* + * The edition of the database + */ + @JsonProperty(value = "properties.edition", access = JsonProperty.Access.WRITE_ONLY) + private String edition; + + /* + * The max size in bytes of the database + */ + @JsonProperty(value = "properties.maxSizeBytes", access = JsonProperty.Access.WRITE_ONLY) + private String maxSizeBytes; + + /* + * The service level objective name of the database + */ + @JsonProperty(value = "properties.serviceLevelObjective", access = JsonProperty.Access.WRITE_ONLY) + private String serviceLevelObjective; + + /* + * The elastic pool name of the database + */ + @JsonProperty(value = "properties.elasticPoolName", access = JsonProperty.Access.WRITE_ONLY) + private String elasticPoolName; + + /* + * The creation date of the database (ISO8601 format) + */ + @JsonProperty(value = "properties.creationDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime creationDate; + + /* + * The deletion date of the database (ISO8601 format) + */ + @JsonProperty(value = "properties.deletionDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime deletionDate; + + /* + * The earliest restore date of the database (ISO8601 format) + */ + @JsonProperty(value = "properties.earliestRestoreDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime earliestRestoreDate; /** * Get the location property: The geo-location where the resource lives. @@ -37,22 +81,13 @@ public String location() { return this.location; } - /** - * Get the innerProperties property: The properties of a restorable dropped Sql pool. - * - * @return the innerProperties value. - */ - private RestorableDroppedSqlPoolProperties innerProperties() { - return this.innerProperties; - } - /** * Get the databaseName property: The name of the database. * * @return the databaseName value. */ public String databaseName() { - return this.innerProperties() == null ? null : this.innerProperties().databaseName(); + return this.databaseName; } /** @@ -61,7 +96,7 @@ public String databaseName() { * @return the edition value. */ public String edition() { - return this.innerProperties() == null ? null : this.innerProperties().edition(); + return this.edition; } /** @@ -70,7 +105,7 @@ public String edition() { * @return the maxSizeBytes value. */ public String maxSizeBytes() { - return this.innerProperties() == null ? null : this.innerProperties().maxSizeBytes(); + return this.maxSizeBytes; } /** @@ -79,7 +114,7 @@ public String maxSizeBytes() { * @return the serviceLevelObjective value. */ public String serviceLevelObjective() { - return this.innerProperties() == null ? null : this.innerProperties().serviceLevelObjective(); + return this.serviceLevelObjective; } /** @@ -88,7 +123,7 @@ public String serviceLevelObjective() { * @return the elasticPoolName value. */ public String elasticPoolName() { - return this.innerProperties() == null ? null : this.innerProperties().elasticPoolName(); + return this.elasticPoolName; } /** @@ -97,7 +132,7 @@ public String elasticPoolName() { * @return the creationDate value. */ public OffsetDateTime creationDate() { - return this.innerProperties() == null ? null : this.innerProperties().creationDate(); + return this.creationDate; } /** @@ -106,7 +141,7 @@ public OffsetDateTime creationDate() { * @return the deletionDate value. */ public OffsetDateTime deletionDate() { - return this.innerProperties() == null ? null : this.innerProperties().deletionDate(); + return this.deletionDate; } /** @@ -115,7 +150,7 @@ public OffsetDateTime deletionDate() { * @return the earliestRestoreDate value. */ public OffsetDateTime earliestRestoreDate() { - return this.innerProperties() == null ? null : this.innerProperties().earliestRestoreDate(); + return this.earliestRestoreDate; } /** @@ -124,8 +159,5 @@ public OffsetDateTime earliestRestoreDate() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RestorableDroppedSqlPoolProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RestorableDroppedSqlPoolProperties.java deleted file mode 100644 index e390f65a6b94c..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RestorableDroppedSqlPoolProperties.java +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** The properties of a restorable dropped Sql pool. */ -@Immutable -public final class RestorableDroppedSqlPoolProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RestorableDroppedSqlPoolProperties.class); - - /* - * The name of the database - */ - @JsonProperty(value = "databaseName", access = JsonProperty.Access.WRITE_ONLY) - private String databaseName; - - /* - * The edition of the database - */ - @JsonProperty(value = "edition", access = JsonProperty.Access.WRITE_ONLY) - private String edition; - - /* - * The max size in bytes of the database - */ - @JsonProperty(value = "maxSizeBytes", access = JsonProperty.Access.WRITE_ONLY) - private String maxSizeBytes; - - /* - * The service level objective name of the database - */ - @JsonProperty(value = "serviceLevelObjective", access = JsonProperty.Access.WRITE_ONLY) - private String serviceLevelObjective; - - /* - * The elastic pool name of the database - */ - @JsonProperty(value = "elasticPoolName", access = JsonProperty.Access.WRITE_ONLY) - private String elasticPoolName; - - /* - * The creation date of the database (ISO8601 format) - */ - @JsonProperty(value = "creationDate", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime creationDate; - - /* - * The deletion date of the database (ISO8601 format) - */ - @JsonProperty(value = "deletionDate", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime deletionDate; - - /* - * The earliest restore date of the database (ISO8601 format) - */ - @JsonProperty(value = "earliestRestoreDate", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime earliestRestoreDate; - - /** - * Get the databaseName property: The name of the database. - * - * @return the databaseName value. - */ - public String databaseName() { - return this.databaseName; - } - - /** - * Get the edition property: The edition of the database. - * - * @return the edition value. - */ - public String edition() { - return this.edition; - } - - /** - * Get the maxSizeBytes property: The max size in bytes of the database. - * - * @return the maxSizeBytes value. - */ - public String maxSizeBytes() { - return this.maxSizeBytes; - } - - /** - * Get the serviceLevelObjective property: The service level objective name of the database. - * - * @return the serviceLevelObjective value. - */ - public String serviceLevelObjective() { - return this.serviceLevelObjective; - } - - /** - * Get the elasticPoolName property: The elastic pool name of the database. - * - * @return the elasticPoolName value. - */ - public String elasticPoolName() { - return this.elasticPoolName; - } - - /** - * Get the creationDate property: The creation date of the database (ISO8601 format). - * - * @return the creationDate value. - */ - public OffsetDateTime creationDate() { - return this.creationDate; - } - - /** - * Get the deletionDate property: The deletion date of the database (ISO8601 format). - * - * @return the deletionDate value. - */ - public OffsetDateTime deletionDate() { - return this.deletionDate; - } - - /** - * Get the earliestRestoreDate property: The earliest restore date of the database (ISO8601 format). - * - * @return the earliestRestoreDate value. - */ - public OffsetDateTime earliestRestoreDate() { - return this.earliestRestoreDate; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RestorePointInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RestorePointInner.java index ab28707212c1e..c06bc32985edf 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RestorePointInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RestorePointInner.java @@ -4,7 +4,8 @@ package com.azure.resourcemanager.synapse.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.RestorePointType; @@ -13,8 +14,9 @@ import java.time.OffsetDateTime; /** Database restore points. */ -@Fluent -public final class RestorePointInner extends ProxyResource { +@JsonFlatten +@Immutable +public class RestorePointInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(RestorePointInner.class); /* @@ -24,10 +26,28 @@ public final class RestorePointInner extends ProxyResource { private String location; /* - * Resource properties. + * The type of restore point */ - @JsonProperty(value = "properties") - private RestorePointProperties innerProperties; + @JsonProperty(value = "properties.restorePointType", access = JsonProperty.Access.WRITE_ONLY) + private RestorePointType restorePointType; + + /* + * The earliest time to which this database can be restored + */ + @JsonProperty(value = "properties.earliestRestoreDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime earliestRestoreDate; + + /* + * The time the backup was taken + */ + @JsonProperty(value = "properties.restorePointCreationDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime restorePointCreationDate; + + /* + * The label of restore point for backup request by user + */ + @JsonProperty(value = "properties.restorePointLabel", access = JsonProperty.Access.WRITE_ONLY) + private String restorePointLabel; /** * Get the location property: Resource location. @@ -38,22 +58,13 @@ public String location() { return this.location; } - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private RestorePointProperties innerProperties() { - return this.innerProperties; - } - /** * Get the restorePointType property: The type of restore point. * * @return the restorePointType value. */ public RestorePointType restorePointType() { - return this.innerProperties() == null ? null : this.innerProperties().restorePointType(); + return this.restorePointType; } /** @@ -62,7 +73,7 @@ public RestorePointType restorePointType() { * @return the earliestRestoreDate value. */ public OffsetDateTime earliestRestoreDate() { - return this.innerProperties() == null ? null : this.innerProperties().earliestRestoreDate(); + return this.earliestRestoreDate; } /** @@ -71,7 +82,7 @@ public OffsetDateTime earliestRestoreDate() { * @return the restorePointCreationDate value. */ public OffsetDateTime restorePointCreationDate() { - return this.innerProperties() == null ? null : this.innerProperties().restorePointCreationDate(); + return this.restorePointCreationDate; } /** @@ -80,7 +91,7 @@ public OffsetDateTime restorePointCreationDate() { * @return the restorePointLabel value. */ public String restorePointLabel() { - return this.innerProperties() == null ? null : this.innerProperties().restorePointLabel(); + return this.restorePointLabel; } /** @@ -89,8 +100,5 @@ public String restorePointLabel() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RestorePointProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RestorePointProperties.java deleted file mode 100644 index 46ee9caad8a31..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/RestorePointProperties.java +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.RestorePointType; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** Properties of a database restore point. */ -@Immutable -public final class RestorePointProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(RestorePointProperties.class); - - /* - * The type of restore point - */ - @JsonProperty(value = "restorePointType", access = JsonProperty.Access.WRITE_ONLY) - private RestorePointType restorePointType; - - /* - * The earliest time to which this database can be restored - */ - @JsonProperty(value = "earliestRestoreDate", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime earliestRestoreDate; - - /* - * The time the backup was taken - */ - @JsonProperty(value = "restorePointCreationDate", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime restorePointCreationDate; - - /* - * The label of restore point for backup request by user - */ - @JsonProperty(value = "restorePointLabel", access = JsonProperty.Access.WRITE_ONLY) - private String restorePointLabel; - - /** - * Get the restorePointType property: The type of restore point. - * - * @return the restorePointType value. - */ - public RestorePointType restorePointType() { - return this.restorePointType; - } - - /** - * Get the earliestRestoreDate property: The earliest time to which this database can be restored. - * - * @return the earliestRestoreDate value. - */ - public OffsetDateTime earliestRestoreDate() { - return this.earliestRestoreDate; - } - - /** - * Get the restorePointCreationDate property: The time the backup was taken. - * - * @return the restorePointCreationDate value. - */ - public OffsetDateTime restorePointCreationDate() { - return this.restorePointCreationDate; - } - - /** - * Get the restorePointLabel property: The label of restore point for backup request by user. - * - * @return the restorePointLabel value. - */ - public String restorePointLabel() { - return this.restorePointLabel; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SecurityAlertPolicyProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SecurityAlertPolicyProperties.java deleted file mode 100644 index 070082ec921cb..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SecurityAlertPolicyProperties.java +++ /dev/null @@ -1,244 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.SecurityAlertPolicyState; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Properties of a security alert policy. */ -@Fluent -public final class SecurityAlertPolicyProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SecurityAlertPolicyProperties.class); - - /* - * Specifies the state of the policy, whether it is enabled or disabled or - * a policy has not been applied yet on the specific Sql pool. - */ - @JsonProperty(value = "state", required = true) - private SecurityAlertPolicyState state; - - /* - * Specifies an array of alerts that are disabled. Allowed values are: - * Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, - * Data_Exfiltration, Unsafe_Action - */ - @JsonProperty(value = "disabledAlerts") - private List disabledAlerts; - - /* - * Specifies an array of e-mail addresses to which the alert is sent. - */ - @JsonProperty(value = "emailAddresses") - private List emailAddresses; - - /* - * Specifies that the alert is sent to the account administrators. - */ - @JsonProperty(value = "emailAccountAdmins") - private Boolean emailAccountAdmins; - - /* - * Specifies the blob storage endpoint (e.g. - * https://MyAccount.blob.core.windows.net). This blob storage will hold - * all Threat Detection audit logs. - */ - @JsonProperty(value = "storageEndpoint") - private String storageEndpoint; - - /* - * Specifies the identifier key of the Threat Detection audit storage - * account. - */ - @JsonProperty(value = "storageAccountAccessKey") - private String storageAccountAccessKey; - - /* - * Specifies the number of days to keep in the Threat Detection audit logs. - */ - @JsonProperty(value = "retentionDays") - private Integer retentionDays; - - /* - * Specifies the UTC creation time of the policy. - */ - @JsonProperty(value = "creationTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime creationTime; - - /** - * Get the state property: Specifies the state of the policy, whether it is enabled or disabled or a policy has not - * been applied yet on the specific Sql pool. - * - * @return the state value. - */ - public SecurityAlertPolicyState state() { - return this.state; - } - - /** - * Set the state property: Specifies the state of the policy, whether it is enabled or disabled or a policy has not - * been applied yet on the specific Sql pool. - * - * @param state the state value to set. - * @return the SecurityAlertPolicyProperties object itself. - */ - public SecurityAlertPolicyProperties withState(SecurityAlertPolicyState state) { - this.state = state; - return this; - } - - /** - * Get the disabledAlerts property: Specifies an array of alerts that are disabled. Allowed values are: - * Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action. - * - * @return the disabledAlerts value. - */ - public List disabledAlerts() { - return this.disabledAlerts; - } - - /** - * Set the disabledAlerts property: Specifies an array of alerts that are disabled. Allowed values are: - * Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action. - * - * @param disabledAlerts the disabledAlerts value to set. - * @return the SecurityAlertPolicyProperties object itself. - */ - public SecurityAlertPolicyProperties withDisabledAlerts(List disabledAlerts) { - this.disabledAlerts = disabledAlerts; - return this; - } - - /** - * Get the emailAddresses property: Specifies an array of e-mail addresses to which the alert is sent. - * - * @return the emailAddresses value. - */ - public List emailAddresses() { - return this.emailAddresses; - } - - /** - * Set the emailAddresses property: Specifies an array of e-mail addresses to which the alert is sent. - * - * @param emailAddresses the emailAddresses value to set. - * @return the SecurityAlertPolicyProperties object itself. - */ - public SecurityAlertPolicyProperties withEmailAddresses(List emailAddresses) { - this.emailAddresses = emailAddresses; - return this; - } - - /** - * Get the emailAccountAdmins property: Specifies that the alert is sent to the account administrators. - * - * @return the emailAccountAdmins value. - */ - public Boolean emailAccountAdmins() { - return this.emailAccountAdmins; - } - - /** - * Set the emailAccountAdmins property: Specifies that the alert is sent to the account administrators. - * - * @param emailAccountAdmins the emailAccountAdmins value to set. - * @return the SecurityAlertPolicyProperties object itself. - */ - public SecurityAlertPolicyProperties withEmailAccountAdmins(Boolean emailAccountAdmins) { - this.emailAccountAdmins = emailAccountAdmins; - return this; - } - - /** - * Get the storageEndpoint property: Specifies the blob storage endpoint (e.g. - * https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. - * - * @return the storageEndpoint value. - */ - public String storageEndpoint() { - return this.storageEndpoint; - } - - /** - * Set the storageEndpoint property: Specifies the blob storage endpoint (e.g. - * https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. - * - * @param storageEndpoint the storageEndpoint value to set. - * @return the SecurityAlertPolicyProperties object itself. - */ - public SecurityAlertPolicyProperties withStorageEndpoint(String storageEndpoint) { - this.storageEndpoint = storageEndpoint; - return this; - } - - /** - * Get the storageAccountAccessKey property: Specifies the identifier key of the Threat Detection audit storage - * account. - * - * @return the storageAccountAccessKey value. - */ - public String storageAccountAccessKey() { - return this.storageAccountAccessKey; - } - - /** - * Set the storageAccountAccessKey property: Specifies the identifier key of the Threat Detection audit storage - * account. - * - * @param storageAccountAccessKey the storageAccountAccessKey value to set. - * @return the SecurityAlertPolicyProperties object itself. - */ - public SecurityAlertPolicyProperties withStorageAccountAccessKey(String storageAccountAccessKey) { - this.storageAccountAccessKey = storageAccountAccessKey; - return this; - } - - /** - * Get the retentionDays property: Specifies the number of days to keep in the Threat Detection audit logs. - * - * @return the retentionDays value. - */ - public Integer retentionDays() { - return this.retentionDays; - } - - /** - * Set the retentionDays property: Specifies the number of days to keep in the Threat Detection audit logs. - * - * @param retentionDays the retentionDays value to set. - * @return the SecurityAlertPolicyProperties object itself. - */ - public SecurityAlertPolicyProperties withRetentionDays(Integer retentionDays) { - this.retentionDays = retentionDays; - return this; - } - - /** - * Get the creationTime property: Specifies the UTC creation time of the policy. - * - * @return the creationTime value. - */ - public OffsetDateTime creationTime() { - return this.creationTime; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (state() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property state in model SecurityAlertPolicyProperties")); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SelfHostedIntegrationRuntimeStatusTypeProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SelfHostedIntegrationRuntimeStatusTypeProperties.java deleted file mode 100644 index b9704d500fe32..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SelfHostedIntegrationRuntimeStatusTypeProperties.java +++ /dev/null @@ -1,329 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeAutoUpdate; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeInternalChannelEncryptionMode; -import com.azure.resourcemanager.synapse.models.LinkedIntegrationRuntime; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; - -/** Self-hosted integration runtime status type properties. */ -@Fluent -public final class SelfHostedIntegrationRuntimeStatusTypeProperties { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(SelfHostedIntegrationRuntimeStatusTypeProperties.class); - - /* - * The time at which the integration runtime was created, in ISO8601 - * format. - */ - @JsonProperty(value = "createTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime createTime; - - /* - * The task queue id of the integration runtime. - */ - @JsonProperty(value = "taskQueueId", access = JsonProperty.Access.WRITE_ONLY) - private String taskQueueId; - - /* - * The node communication Channel encryption mode - */ - @JsonProperty(value = "nodeCommunicationChannelEncryptionMode", access = JsonProperty.Access.WRITE_ONLY) - private String nodeCommunicationChannelEncryptionMode; - - /* - * It is used to set the encryption mode for node-node communication - * channel (when more than 2 self-hosted integration runtime nodes exist). - */ - @JsonProperty(value = "internalChannelEncryption", access = JsonProperty.Access.WRITE_ONLY) - private IntegrationRuntimeInternalChannelEncryptionMode internalChannelEncryption; - - /* - * Version of the integration runtime. - */ - @JsonProperty(value = "version", access = JsonProperty.Access.WRITE_ONLY) - private String version; - - /* - * The list of nodes for this integration runtime. - */ - @JsonProperty(value = "nodes") - private List nodes; - - /* - * The date at which the integration runtime will be scheduled to update, - * in ISO8601 format. - */ - @JsonProperty(value = "scheduledUpdateDate", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime scheduledUpdateDate; - - /* - * The time in the date scheduled by service to update the integration - * runtime, e.g., PT03H is 3 hours - */ - @JsonProperty(value = "updateDelayOffset", access = JsonProperty.Access.WRITE_ONLY) - private String updateDelayOffset; - - /* - * The local time zone offset in hours. - */ - @JsonProperty(value = "localTimeZoneOffset", access = JsonProperty.Access.WRITE_ONLY) - private String localTimeZoneOffset; - - /* - * Object with additional information about integration runtime - * capabilities. - */ - @JsonProperty(value = "capabilities", access = JsonProperty.Access.WRITE_ONLY) - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map capabilities; - - /* - * The URLs for the services used in integration runtime backend service. - */ - @JsonProperty(value = "serviceUrls", access = JsonProperty.Access.WRITE_ONLY) - private List serviceUrls; - - /* - * Whether Self-hosted integration runtime auto update has been turned on. - */ - @JsonProperty(value = "autoUpdate", access = JsonProperty.Access.WRITE_ONLY) - private IntegrationRuntimeAutoUpdate autoUpdate; - - /* - * Status of the integration runtime version. - */ - @JsonProperty(value = "versionStatus", access = JsonProperty.Access.WRITE_ONLY) - private String versionStatus; - - /* - * The list of linked integration runtimes that are created to share with - * this integration runtime. - */ - @JsonProperty(value = "links") - private List links; - - /* - * The version that the integration runtime is going to update to. - */ - @JsonProperty(value = "pushedVersion", access = JsonProperty.Access.WRITE_ONLY) - private String pushedVersion; - - /* - * The latest version on download center. - */ - @JsonProperty(value = "latestVersion", access = JsonProperty.Access.WRITE_ONLY) - private String latestVersion; - - /* - * The estimated time when the self-hosted integration runtime will be - * updated. - */ - @JsonProperty(value = "autoUpdateETA", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime autoUpdateEta; - - /** - * Get the createTime property: The time at which the integration runtime was created, in ISO8601 format. - * - * @return the createTime value. - */ - public OffsetDateTime createTime() { - return this.createTime; - } - - /** - * Get the taskQueueId property: The task queue id of the integration runtime. - * - * @return the taskQueueId value. - */ - public String taskQueueId() { - return this.taskQueueId; - } - - /** - * Get the nodeCommunicationChannelEncryptionMode property: The node communication Channel encryption mode. - * - * @return the nodeCommunicationChannelEncryptionMode value. - */ - public String nodeCommunicationChannelEncryptionMode() { - return this.nodeCommunicationChannelEncryptionMode; - } - - /** - * Get the internalChannelEncryption property: It is used to set the encryption mode for node-node communication - * channel (when more than 2 self-hosted integration runtime nodes exist). - * - * @return the internalChannelEncryption value. - */ - public IntegrationRuntimeInternalChannelEncryptionMode internalChannelEncryption() { - return this.internalChannelEncryption; - } - - /** - * Get the version property: Version of the integration runtime. - * - * @return the version value. - */ - public String version() { - return this.version; - } - - /** - * Get the nodes property: The list of nodes for this integration runtime. - * - * @return the nodes value. - */ - public List nodes() { - return this.nodes; - } - - /** - * Set the nodes property: The list of nodes for this integration runtime. - * - * @param nodes the nodes value to set. - * @return the SelfHostedIntegrationRuntimeStatusTypeProperties object itself. - */ - public SelfHostedIntegrationRuntimeStatusTypeProperties withNodes( - List nodes) { - this.nodes = nodes; - return this; - } - - /** - * Get the scheduledUpdateDate property: The date at which the integration runtime will be scheduled to update, in - * ISO8601 format. - * - * @return the scheduledUpdateDate value. - */ - public OffsetDateTime scheduledUpdateDate() { - return this.scheduledUpdateDate; - } - - /** - * Get the updateDelayOffset property: The time in the date scheduled by service to update the integration runtime, - * e.g., PT03H is 3 hours. - * - * @return the updateDelayOffset value. - */ - public String updateDelayOffset() { - return this.updateDelayOffset; - } - - /** - * Get the localTimeZoneOffset property: The local time zone offset in hours. - * - * @return the localTimeZoneOffset value. - */ - public String localTimeZoneOffset() { - return this.localTimeZoneOffset; - } - - /** - * Get the capabilities property: Object with additional information about integration runtime capabilities. - * - * @return the capabilities value. - */ - public Map capabilities() { - return this.capabilities; - } - - /** - * Get the serviceUrls property: The URLs for the services used in integration runtime backend service. - * - * @return the serviceUrls value. - */ - public List serviceUrls() { - return this.serviceUrls; - } - - /** - * Get the autoUpdate property: Whether Self-hosted integration runtime auto update has been turned on. - * - * @return the autoUpdate value. - */ - public IntegrationRuntimeAutoUpdate autoUpdate() { - return this.autoUpdate; - } - - /** - * Get the versionStatus property: Status of the integration runtime version. - * - * @return the versionStatus value. - */ - public String versionStatus() { - return this.versionStatus; - } - - /** - * Get the links property: The list of linked integration runtimes that are created to share with this integration - * runtime. - * - * @return the links value. - */ - public List links() { - return this.links; - } - - /** - * Set the links property: The list of linked integration runtimes that are created to share with this integration - * runtime. - * - * @param links the links value to set. - * @return the SelfHostedIntegrationRuntimeStatusTypeProperties object itself. - */ - public SelfHostedIntegrationRuntimeStatusTypeProperties withLinks(List links) { - this.links = links; - return this; - } - - /** - * Get the pushedVersion property: The version that the integration runtime is going to update to. - * - * @return the pushedVersion value. - */ - public String pushedVersion() { - return this.pushedVersion; - } - - /** - * Get the latestVersion property: The latest version on download center. - * - * @return the latestVersion value. - */ - public String latestVersion() { - return this.latestVersion; - } - - /** - * Get the autoUpdateEta property: The estimated time when the self-hosted integration runtime will be updated. - * - * @return the autoUpdateEta value. - */ - public OffsetDateTime autoUpdateEta() { - return this.autoUpdateEta; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (nodes() != null) { - nodes().forEach(e -> e.validate()); - } - if (links() != null) { - links().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SelfHostedIntegrationRuntimeTypeProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SelfHostedIntegrationRuntimeTypeProperties.java deleted file mode 100644 index 98f9548727d4a..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SelfHostedIntegrationRuntimeTypeProperties.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.LinkedIntegrationRuntimeType; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** The self-hosted integration runtime properties. */ -@Fluent -public final class SelfHostedIntegrationRuntimeTypeProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SelfHostedIntegrationRuntimeTypeProperties.class); - - /* - * Linked integration runtime type from data factory - */ - @JsonProperty(value = "linkedInfo") - private LinkedIntegrationRuntimeType linkedInfo; - - /** - * Get the linkedInfo property: Linked integration runtime type from data factory. - * - * @return the linkedInfo value. - */ - public LinkedIntegrationRuntimeType linkedInfo() { - return this.linkedInfo; - } - - /** - * Set the linkedInfo property: Linked integration runtime type from data factory. - * - * @param linkedInfo the linkedInfo value to set. - * @return the SelfHostedIntegrationRuntimeTypeProperties object itself. - */ - public SelfHostedIntegrationRuntimeTypeProperties withLinkedInfo(LinkedIntegrationRuntimeType linkedInfo) { - this.linkedInfo = linkedInfo; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (linkedInfo() != null) { - linkedInfo().validate(); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SensitivityLabelInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SensitivityLabelInner.java index 0e9245735f7f7..2f4e7dc9aaf24 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SensitivityLabelInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SensitivityLabelInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.SensitivityLabelRank; @@ -12,30 +13,72 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** A sensitivity label. */ +@JsonFlatten @Fluent -public final class SensitivityLabelInner extends ProxyResource { +public class SensitivityLabelInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(SensitivityLabelInner.class); - /* - * Resource properties. - */ - @JsonProperty(value = "properties") - private SensitivityLabelProperties innerProperties; - /* * managed by */ @JsonProperty(value = "managedBy", access = JsonProperty.Access.WRITE_ONLY) private String managedBy; - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. + /* + * The schema name. */ - private SensitivityLabelProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.schemaName", access = JsonProperty.Access.WRITE_ONLY) + private String schemaName; + + /* + * The table name. + */ + @JsonProperty(value = "properties.tableName", access = JsonProperty.Access.WRITE_ONLY) + private String tableName; + + /* + * The column name. + */ + @JsonProperty(value = "properties.columnName", access = JsonProperty.Access.WRITE_ONLY) + private String columnName; + + /* + * The label name. + */ + @JsonProperty(value = "properties.labelName") + private String labelName; + + /* + * The label ID. + */ + @JsonProperty(value = "properties.labelId") + private String labelId; + + /* + * The information type. + */ + @JsonProperty(value = "properties.informationType") + private String informationType; + + /* + * The information type ID. + */ + @JsonProperty(value = "properties.informationTypeId") + private String informationTypeId; + + /* + * Is sensitivity recommendation disabled. Applicable for recommended + * sensitivity label only. Specifies whether the sensitivity recommendation + * on this column is disabled (dismissed) or not. + */ + @JsonProperty(value = "properties.isDisabled", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isDisabled; + + /* + * The rank property. + */ + @JsonProperty(value = "properties.rank") + private SensitivityLabelRank rank; /** * Get the managedBy property: managed by. @@ -52,7 +95,7 @@ public String managedBy() { * @return the schemaName value. */ public String schemaName() { - return this.innerProperties() == null ? null : this.innerProperties().schemaName(); + return this.schemaName; } /** @@ -61,7 +104,7 @@ public String schemaName() { * @return the tableName value. */ public String tableName() { - return this.innerProperties() == null ? null : this.innerProperties().tableName(); + return this.tableName; } /** @@ -70,7 +113,7 @@ public String tableName() { * @return the columnName value. */ public String columnName() { - return this.innerProperties() == null ? null : this.innerProperties().columnName(); + return this.columnName; } /** @@ -79,7 +122,7 @@ public String columnName() { * @return the labelName value. */ public String labelName() { - return this.innerProperties() == null ? null : this.innerProperties().labelName(); + return this.labelName; } /** @@ -89,10 +132,7 @@ public String labelName() { * @return the SensitivityLabelInner object itself. */ public SensitivityLabelInner withLabelName(String labelName) { - if (this.innerProperties() == null) { - this.innerProperties = new SensitivityLabelProperties(); - } - this.innerProperties().withLabelName(labelName); + this.labelName = labelName; return this; } @@ -102,7 +142,7 @@ public SensitivityLabelInner withLabelName(String labelName) { * @return the labelId value. */ public String labelId() { - return this.innerProperties() == null ? null : this.innerProperties().labelId(); + return this.labelId; } /** @@ -112,10 +152,7 @@ public String labelId() { * @return the SensitivityLabelInner object itself. */ public SensitivityLabelInner withLabelId(String labelId) { - if (this.innerProperties() == null) { - this.innerProperties = new SensitivityLabelProperties(); - } - this.innerProperties().withLabelId(labelId); + this.labelId = labelId; return this; } @@ -125,7 +162,7 @@ public SensitivityLabelInner withLabelId(String labelId) { * @return the informationType value. */ public String informationType() { - return this.innerProperties() == null ? null : this.innerProperties().informationType(); + return this.informationType; } /** @@ -135,10 +172,7 @@ public String informationType() { * @return the SensitivityLabelInner object itself. */ public SensitivityLabelInner withInformationType(String informationType) { - if (this.innerProperties() == null) { - this.innerProperties = new SensitivityLabelProperties(); - } - this.innerProperties().withInformationType(informationType); + this.informationType = informationType; return this; } @@ -148,7 +182,7 @@ public SensitivityLabelInner withInformationType(String informationType) { * @return the informationTypeId value. */ public String informationTypeId() { - return this.innerProperties() == null ? null : this.innerProperties().informationTypeId(); + return this.informationTypeId; } /** @@ -158,10 +192,7 @@ public String informationTypeId() { * @return the SensitivityLabelInner object itself. */ public SensitivityLabelInner withInformationTypeId(String informationTypeId) { - if (this.innerProperties() == null) { - this.innerProperties = new SensitivityLabelProperties(); - } - this.innerProperties().withInformationTypeId(informationTypeId); + this.informationTypeId = informationTypeId; return this; } @@ -172,7 +203,7 @@ public SensitivityLabelInner withInformationTypeId(String informationTypeId) { * @return the isDisabled value. */ public Boolean isDisabled() { - return this.innerProperties() == null ? null : this.innerProperties().isDisabled(); + return this.isDisabled; } /** @@ -181,7 +212,7 @@ public Boolean isDisabled() { * @return the rank value. */ public SensitivityLabelRank rank() { - return this.innerProperties() == null ? null : this.innerProperties().rank(); + return this.rank; } /** @@ -191,10 +222,7 @@ public SensitivityLabelRank rank() { * @return the SensitivityLabelInner object itself. */ public SensitivityLabelInner withRank(SensitivityLabelRank rank) { - if (this.innerProperties() == null) { - this.innerProperties = new SensitivityLabelProperties(); - } - this.innerProperties().withRank(rank); + this.rank = rank; return this; } @@ -204,8 +232,5 @@ public SensitivityLabelInner withRank(SensitivityLabelRank rank) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SensitivityLabelProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SensitivityLabelProperties.java deleted file mode 100644 index 99b16ee48487e..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SensitivityLabelProperties.java +++ /dev/null @@ -1,218 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.SensitivityLabelRank; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Properties of a sensitivity label. */ -@Fluent -public final class SensitivityLabelProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SensitivityLabelProperties.class); - - /* - * The schema name. - */ - @JsonProperty(value = "schemaName", access = JsonProperty.Access.WRITE_ONLY) - private String schemaName; - - /* - * The table name. - */ - @JsonProperty(value = "tableName", access = JsonProperty.Access.WRITE_ONLY) - private String tableName; - - /* - * The column name. - */ - @JsonProperty(value = "columnName", access = JsonProperty.Access.WRITE_ONLY) - private String columnName; - - /* - * The label name. - */ - @JsonProperty(value = "labelName") - private String labelName; - - /* - * The label ID. - */ - @JsonProperty(value = "labelId") - private String labelId; - - /* - * The information type. - */ - @JsonProperty(value = "informationType") - private String informationType; - - /* - * The information type ID. - */ - @JsonProperty(value = "informationTypeId") - private String informationTypeId; - - /* - * Is sensitivity recommendation disabled. Applicable for recommended - * sensitivity label only. Specifies whether the sensitivity recommendation - * on this column is disabled (dismissed) or not. - */ - @JsonProperty(value = "isDisabled", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isDisabled; - - /* - * The rank property. - */ - @JsonProperty(value = "rank") - private SensitivityLabelRank rank; - - /** - * Get the schemaName property: The schema name. - * - * @return the schemaName value. - */ - public String schemaName() { - return this.schemaName; - } - - /** - * Get the tableName property: The table name. - * - * @return the tableName value. - */ - public String tableName() { - return this.tableName; - } - - /** - * Get the columnName property: The column name. - * - * @return the columnName value. - */ - public String columnName() { - return this.columnName; - } - - /** - * Get the labelName property: The label name. - * - * @return the labelName value. - */ - public String labelName() { - return this.labelName; - } - - /** - * Set the labelName property: The label name. - * - * @param labelName the labelName value to set. - * @return the SensitivityLabelProperties object itself. - */ - public SensitivityLabelProperties withLabelName(String labelName) { - this.labelName = labelName; - return this; - } - - /** - * Get the labelId property: The label ID. - * - * @return the labelId value. - */ - public String labelId() { - return this.labelId; - } - - /** - * Set the labelId property: The label ID. - * - * @param labelId the labelId value to set. - * @return the SensitivityLabelProperties object itself. - */ - public SensitivityLabelProperties withLabelId(String labelId) { - this.labelId = labelId; - return this; - } - - /** - * Get the informationType property: The information type. - * - * @return the informationType value. - */ - public String informationType() { - return this.informationType; - } - - /** - * Set the informationType property: The information type. - * - * @param informationType the informationType value to set. - * @return the SensitivityLabelProperties object itself. - */ - public SensitivityLabelProperties withInformationType(String informationType) { - this.informationType = informationType; - return this; - } - - /** - * Get the informationTypeId property: The information type ID. - * - * @return the informationTypeId value. - */ - public String informationTypeId() { - return this.informationTypeId; - } - - /** - * Set the informationTypeId property: The information type ID. - * - * @param informationTypeId the informationTypeId value to set. - * @return the SensitivityLabelProperties object itself. - */ - public SensitivityLabelProperties withInformationTypeId(String informationTypeId) { - this.informationTypeId = informationTypeId; - return this; - } - - /** - * Get the isDisabled property: Is sensitivity recommendation disabled. Applicable for recommended sensitivity label - * only. Specifies whether the sensitivity recommendation on this column is disabled (dismissed) or not. - * - * @return the isDisabled value. - */ - public Boolean isDisabled() { - return this.isDisabled; - } - - /** - * Get the rank property: The rank property. - * - * @return the rank value. - */ - public SensitivityLabelRank rank() { - return this.rank; - } - - /** - * Set the rank property: The rank property. - * - * @param rank the rank value to set. - * @return the SensitivityLabelProperties object itself. - */ - public SensitivityLabelProperties withRank(SensitivityLabelRank rank) { - this.rank = rank; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SensitivityLabelUpdateInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SensitivityLabelUpdateInner.java index 9a62cde101a91..37c56cfbff96d 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SensitivityLabelUpdateInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SensitivityLabelUpdateInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.SensitivityLabelUpdateKind; @@ -12,24 +13,40 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** A sensitivity label update operation. */ +@JsonFlatten @Fluent -public final class SensitivityLabelUpdateInner extends ProxyResource { +public class SensitivityLabelUpdateInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(SensitivityLabelUpdateInner.class); /* - * Resource properties. + * The op property. */ - @JsonProperty(value = "properties") - private SensitivityLabelUpdatePropertiesInner innerProperties; + @JsonProperty(value = "properties.op") + private SensitivityLabelUpdateKind op; - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. + /* + * Schema name of the column to update. */ - private SensitivityLabelUpdatePropertiesInner innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.schema") + private String schema; + + /* + * Table name of the column to update. + */ + @JsonProperty(value = "properties.table") + private String table; + + /* + * Column name to update. + */ + @JsonProperty(value = "properties.column") + private String column; + + /* + * The sensitivity label information to apply on a column. + */ + @JsonProperty(value = "properties.sensitivityLabel") + private SensitivityLabelInner sensitivityLabel; /** * Get the op property: The op property. @@ -37,7 +54,7 @@ private SensitivityLabelUpdatePropertiesInner innerProperties() { * @return the op value. */ public SensitivityLabelUpdateKind op() { - return this.innerProperties() == null ? null : this.innerProperties().op(); + return this.op; } /** @@ -47,10 +64,7 @@ public SensitivityLabelUpdateKind op() { * @return the SensitivityLabelUpdateInner object itself. */ public SensitivityLabelUpdateInner withOp(SensitivityLabelUpdateKind op) { - if (this.innerProperties() == null) { - this.innerProperties = new SensitivityLabelUpdatePropertiesInner(); - } - this.innerProperties().withOp(op); + this.op = op; return this; } @@ -60,7 +74,7 @@ public SensitivityLabelUpdateInner withOp(SensitivityLabelUpdateKind op) { * @return the schema value. */ public String schema() { - return this.innerProperties() == null ? null : this.innerProperties().schema(); + return this.schema; } /** @@ -70,10 +84,7 @@ public String schema() { * @return the SensitivityLabelUpdateInner object itself. */ public SensitivityLabelUpdateInner withSchema(String schema) { - if (this.innerProperties() == null) { - this.innerProperties = new SensitivityLabelUpdatePropertiesInner(); - } - this.innerProperties().withSchema(schema); + this.schema = schema; return this; } @@ -83,7 +94,7 @@ public SensitivityLabelUpdateInner withSchema(String schema) { * @return the table value. */ public String table() { - return this.innerProperties() == null ? null : this.innerProperties().table(); + return this.table; } /** @@ -93,10 +104,7 @@ public String table() { * @return the SensitivityLabelUpdateInner object itself. */ public SensitivityLabelUpdateInner withTable(String table) { - if (this.innerProperties() == null) { - this.innerProperties = new SensitivityLabelUpdatePropertiesInner(); - } - this.innerProperties().withTable(table); + this.table = table; return this; } @@ -106,7 +114,7 @@ public SensitivityLabelUpdateInner withTable(String table) { * @return the column value. */ public String column() { - return this.innerProperties() == null ? null : this.innerProperties().column(); + return this.column; } /** @@ -116,10 +124,7 @@ public String column() { * @return the SensitivityLabelUpdateInner object itself. */ public SensitivityLabelUpdateInner withColumn(String column) { - if (this.innerProperties() == null) { - this.innerProperties = new SensitivityLabelUpdatePropertiesInner(); - } - this.innerProperties().withColumn(column); + this.column = column; return this; } @@ -129,7 +134,7 @@ public SensitivityLabelUpdateInner withColumn(String column) { * @return the sensitivityLabel value. */ public SensitivityLabelInner sensitivityLabel() { - return this.innerProperties() == null ? null : this.innerProperties().sensitivityLabel(); + return this.sensitivityLabel; } /** @@ -139,10 +144,7 @@ public SensitivityLabelInner sensitivityLabel() { * @return the SensitivityLabelUpdateInner object itself. */ public SensitivityLabelUpdateInner withSensitivityLabel(SensitivityLabelInner sensitivityLabel) { - if (this.innerProperties() == null) { - this.innerProperties = new SensitivityLabelUpdatePropertiesInner(); - } - this.innerProperties().withSensitivityLabel(sensitivityLabel); + this.sensitivityLabel = sensitivityLabel; return this; } @@ -152,8 +154,8 @@ public SensitivityLabelUpdateInner withSensitivityLabel(SensitivityLabelInner se * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (sensitivityLabel() != null) { + sensitivityLabel().validate(); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SensitivityLabelUpdatePropertiesInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SensitivityLabelUpdatePropertiesInner.java deleted file mode 100644 index f5e8226c45a8b..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SensitivityLabelUpdatePropertiesInner.java +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.SensitivityLabelUpdateKind; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Properties of an operation executed on a sensitivity label. */ -@Fluent -public final class SensitivityLabelUpdatePropertiesInner { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SensitivityLabelUpdatePropertiesInner.class); - - /* - * The op property. - */ - @JsonProperty(value = "op", required = true) - private SensitivityLabelUpdateKind op; - - /* - * Schema name of the column to update. - */ - @JsonProperty(value = "schema", required = true) - private String schema; - - /* - * Table name of the column to update. - */ - @JsonProperty(value = "table", required = true) - private String table; - - /* - * Column name to update. - */ - @JsonProperty(value = "column", required = true) - private String column; - - /* - * The sensitivity label information to apply on a column. - */ - @JsonProperty(value = "sensitivityLabel") - private SensitivityLabelInner sensitivityLabel; - - /** - * Get the op property: The op property. - * - * @return the op value. - */ - public SensitivityLabelUpdateKind op() { - return this.op; - } - - /** - * Set the op property: The op property. - * - * @param op the op value to set. - * @return the SensitivityLabelUpdatePropertiesInner object itself. - */ - public SensitivityLabelUpdatePropertiesInner withOp(SensitivityLabelUpdateKind op) { - this.op = op; - return this; - } - - /** - * Get the schema property: Schema name of the column to update. - * - * @return the schema value. - */ - public String schema() { - return this.schema; - } - - /** - * Set the schema property: Schema name of the column to update. - * - * @param schema the schema value to set. - * @return the SensitivityLabelUpdatePropertiesInner object itself. - */ - public SensitivityLabelUpdatePropertiesInner withSchema(String schema) { - this.schema = schema; - return this; - } - - /** - * Get the table property: Table name of the column to update. - * - * @return the table value. - */ - public String table() { - return this.table; - } - - /** - * Set the table property: Table name of the column to update. - * - * @param table the table value to set. - * @return the SensitivityLabelUpdatePropertiesInner object itself. - */ - public SensitivityLabelUpdatePropertiesInner withTable(String table) { - this.table = table; - return this; - } - - /** - * Get the column property: Column name to update. - * - * @return the column value. - */ - public String column() { - return this.column; - } - - /** - * Set the column property: Column name to update. - * - * @param column the column value to set. - * @return the SensitivityLabelUpdatePropertiesInner object itself. - */ - public SensitivityLabelUpdatePropertiesInner withColumn(String column) { - this.column = column; - return this; - } - - /** - * Get the sensitivityLabel property: The sensitivity label information to apply on a column. - * - * @return the sensitivityLabel value. - */ - public SensitivityLabelInner sensitivityLabel() { - return this.sensitivityLabel; - } - - /** - * Set the sensitivityLabel property: The sensitivity label information to apply on a column. - * - * @param sensitivityLabel the sensitivityLabel value to set. - * @return the SensitivityLabelUpdatePropertiesInner object itself. - */ - public SensitivityLabelUpdatePropertiesInner withSensitivityLabel(SensitivityLabelInner sensitivityLabel) { - this.sensitivityLabel = sensitivityLabel; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (op() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property op in model SensitivityLabelUpdatePropertiesInner")); - } - if (schema() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property schema in model SensitivityLabelUpdatePropertiesInner")); - } - if (table() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property table in model SensitivityLabelUpdatePropertiesInner")); - } - if (column() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property column in model SensitivityLabelUpdatePropertiesInner")); - } - if (sensitivityLabel() != null) { - sensitivityLabel().validate(); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerBlobAuditingPolicyInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerBlobAuditingPolicyInner.java index 1ed1fd4488893..63d413b6b572b 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerBlobAuditingPolicyInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerBlobAuditingPolicyInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.BlobAuditingPolicyState; @@ -14,24 +15,170 @@ import java.util.UUID; /** A server blob auditing policy. */ +@JsonFlatten @Fluent -public final class ServerBlobAuditingPolicyInner extends ProxyResource { +public class ServerBlobAuditingPolicyInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerBlobAuditingPolicyInner.class); /* - * Resource properties. + * Specifies the state of the policy. If state is Enabled, storageEndpoint + * or isAzureMonitorTargetEnabled are required. */ - @JsonProperty(value = "properties") - private ServerBlobAuditingPolicyProperties innerProperties; + @JsonProperty(value = "properties.state") + private BlobAuditingPolicyState state; - /** - * Get the innerProperties property: Resource properties. + /* + * 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 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 * - * @return the innerProperties value. + * 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) */ - private ServerBlobAuditingPolicyProperties innerProperties() { - return this.innerProperties; - } + @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 the state property: Specifies the state of the policy. If state is Enabled, storageEndpoint or @@ -40,7 +187,7 @@ private ServerBlobAuditingPolicyProperties innerProperties() { * @return the state value. */ public BlobAuditingPolicyState state() { - return this.innerProperties() == null ? null : this.innerProperties().state(); + return this.state; } /** @@ -51,10 +198,7 @@ public BlobAuditingPolicyState state() { * @return the ServerBlobAuditingPolicyInner object itself. */ public ServerBlobAuditingPolicyInner withState(BlobAuditingPolicyState state) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerBlobAuditingPolicyProperties(); - } - this.innerProperties().withState(state); + this.state = state; return this; } @@ -66,7 +210,7 @@ public ServerBlobAuditingPolicyInner withState(BlobAuditingPolicyState state) { * @return the storageEndpoint value. */ public String storageEndpoint() { - return this.innerProperties() == null ? null : this.innerProperties().storageEndpoint(); + return this.storageEndpoint; } /** @@ -78,10 +222,7 @@ public String storageEndpoint() { * @return the ServerBlobAuditingPolicyInner object itself. */ public ServerBlobAuditingPolicyInner withStorageEndpoint(String storageEndpoint) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerBlobAuditingPolicyProperties(); - } - this.innerProperties().withStorageEndpoint(storageEndpoint); + this.storageEndpoint = storageEndpoint; return this; } @@ -97,7 +238,7 @@ public ServerBlobAuditingPolicyInner withStorageEndpoint(String storageEndpoint) * @return the storageAccountAccessKey value. */ public String storageAccountAccessKey() { - return this.innerProperties() == null ? null : this.innerProperties().storageAccountAccessKey(); + return this.storageAccountAccessKey; } /** @@ -113,10 +254,7 @@ public String storageAccountAccessKey() { * @return the ServerBlobAuditingPolicyInner object itself. */ public ServerBlobAuditingPolicyInner withStorageAccountAccessKey(String storageAccountAccessKey) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerBlobAuditingPolicyProperties(); - } - this.innerProperties().withStorageAccountAccessKey(storageAccountAccessKey); + this.storageAccountAccessKey = storageAccountAccessKey; return this; } @@ -126,7 +264,7 @@ public ServerBlobAuditingPolicyInner withStorageAccountAccessKey(String storageA * @return the retentionDays value. */ public Integer retentionDays() { - return this.innerProperties() == null ? null : this.innerProperties().retentionDays(); + return this.retentionDays; } /** @@ -136,10 +274,7 @@ public Integer retentionDays() { * @return the ServerBlobAuditingPolicyInner object itself. */ public ServerBlobAuditingPolicyInner withRetentionDays(Integer retentionDays) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerBlobAuditingPolicyProperties(); - } - this.innerProperties().withRetentionDays(retentionDays); + this.retentionDays = retentionDays; return this; } @@ -189,7 +324,7 @@ public ServerBlobAuditingPolicyInner withRetentionDays(Integer retentionDays) { * @return the auditActionsAndGroups value. */ public List auditActionsAndGroups() { - return this.innerProperties() == null ? null : this.innerProperties().auditActionsAndGroups(); + return this.auditActionsAndGroups; } /** @@ -239,10 +374,7 @@ public List auditActionsAndGroups() { * @return the ServerBlobAuditingPolicyInner object itself. */ public ServerBlobAuditingPolicyInner withAuditActionsAndGroups(List auditActionsAndGroups) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerBlobAuditingPolicyProperties(); - } - this.innerProperties().withAuditActionsAndGroups(auditActionsAndGroups); + this.auditActionsAndGroups = auditActionsAndGroups; return this; } @@ -252,7 +384,7 @@ public ServerBlobAuditingPolicyInner withAuditActionsAndGroups(List audi * @return the storageAccountSubscriptionId value. */ public UUID storageAccountSubscriptionId() { - return this.innerProperties() == null ? null : this.innerProperties().storageAccountSubscriptionId(); + return this.storageAccountSubscriptionId; } /** @@ -262,10 +394,7 @@ public UUID storageAccountSubscriptionId() { * @return the ServerBlobAuditingPolicyInner object itself. */ public ServerBlobAuditingPolicyInner withStorageAccountSubscriptionId(UUID storageAccountSubscriptionId) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerBlobAuditingPolicyProperties(); - } - this.innerProperties().withStorageAccountSubscriptionId(storageAccountSubscriptionId); + this.storageAccountSubscriptionId = storageAccountSubscriptionId; return this; } @@ -276,7 +405,7 @@ public ServerBlobAuditingPolicyInner withStorageAccountSubscriptionId(UUID stora * @return the isStorageSecondaryKeyInUse value. */ public Boolean isStorageSecondaryKeyInUse() { - return this.innerProperties() == null ? null : this.innerProperties().isStorageSecondaryKeyInUse(); + return this.isStorageSecondaryKeyInUse; } /** @@ -287,10 +416,7 @@ public Boolean isStorageSecondaryKeyInUse() { * @return the ServerBlobAuditingPolicyInner object itself. */ public ServerBlobAuditingPolicyInner withIsStorageSecondaryKeyInUse(Boolean isStorageSecondaryKeyInUse) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerBlobAuditingPolicyProperties(); - } - this.innerProperties().withIsStorageSecondaryKeyInUse(isStorageSecondaryKeyInUse); + this.isStorageSecondaryKeyInUse = isStorageSecondaryKeyInUse; return this; } @@ -311,7 +437,7 @@ public ServerBlobAuditingPolicyInner withIsStorageSecondaryKeyInUse(Boolean isSt * @return the isAzureMonitorTargetEnabled value. */ public Boolean isAzureMonitorTargetEnabled() { - return this.innerProperties() == null ? null : this.innerProperties().isAzureMonitorTargetEnabled(); + return this.isAzureMonitorTargetEnabled; } /** @@ -332,10 +458,7 @@ public Boolean isAzureMonitorTargetEnabled() { * @return the ServerBlobAuditingPolicyInner object itself. */ public ServerBlobAuditingPolicyInner withIsAzureMonitorTargetEnabled(Boolean isAzureMonitorTargetEnabled) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerBlobAuditingPolicyProperties(); - } - this.innerProperties().withIsAzureMonitorTargetEnabled(isAzureMonitorTargetEnabled); + this.isAzureMonitorTargetEnabled = isAzureMonitorTargetEnabled; return this; } @@ -346,7 +469,7 @@ public ServerBlobAuditingPolicyInner withIsAzureMonitorTargetEnabled(Boolean isA * @return the queueDelayMs value. */ public Integer queueDelayMs() { - return this.innerProperties() == null ? null : this.innerProperties().queueDelayMs(); + return this.queueDelayMs; } /** @@ -357,10 +480,7 @@ public Integer queueDelayMs() { * @return the ServerBlobAuditingPolicyInner object itself. */ public ServerBlobAuditingPolicyInner withQueueDelayMs(Integer queueDelayMs) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerBlobAuditingPolicyProperties(); - } - this.innerProperties().withQueueDelayMs(queueDelayMs); + this.queueDelayMs = queueDelayMs; return this; } @@ -370,8 +490,5 @@ public ServerBlobAuditingPolicyInner withQueueDelayMs(Integer queueDelayMs) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerBlobAuditingPolicyProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerBlobAuditingPolicyProperties.java deleted file mode 100644 index 80eb1e6f10c6b..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerBlobAuditingPolicyProperties.java +++ /dev/null @@ -1,497 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.BlobAuditingPolicyState; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.UUID; - -/** Properties of a server blob auditing policy. */ -@Fluent -public final class ServerBlobAuditingPolicyProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerBlobAuditingPolicyProperties.class); - - /* - * Specifies the state of the policy. If state is Enabled, storageEndpoint - * or isAzureMonitorTargetEnabled are required. - */ - @JsonProperty(value = "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 = "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 = "storageAccountAccessKey") - private String storageAccountAccessKey; - - /* - * Specifies the number of days to keep in the audit logs in the storage - * account. - */ - @JsonProperty(value = "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 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 = "auditActionsAndGroups") - private List auditActionsAndGroups; - - /* - * Specifies the blob storage subscription Id. - */ - @JsonProperty(value = "storageAccountSubscriptionId") - private UUID storageAccountSubscriptionId; - - /* - * Specifies whether storageAccountAccessKey value is the storage's - * secondary key. - */ - @JsonProperty(value = "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 = "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 = "queueDelayMs") - private Integer queueDelayMs; - - /** - * Get the state property: Specifies the state of the policy. If state is Enabled, storageEndpoint or - * isAzureMonitorTargetEnabled are required. - * - * @return the state value. - */ - public BlobAuditingPolicyState state() { - return this.state; - } - - /** - * Set the state property: Specifies the state of the policy. If state is Enabled, storageEndpoint or - * isAzureMonitorTargetEnabled are required. - * - * @param state the state value to set. - * @return the ServerBlobAuditingPolicyProperties object itself. - */ - public ServerBlobAuditingPolicyProperties withState(BlobAuditingPolicyState state) { - this.state = state; - return this; - } - - /** - * Get the storageEndpoint property: 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 the storageEndpoint property: 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 ServerBlobAuditingPolicyProperties object itself. - */ - public ServerBlobAuditingPolicyProperties withStorageEndpoint(String storageEndpoint) { - this.storageEndpoint = storageEndpoint; - return this; - } - - /** - * Get the storageAccountAccessKey property: 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 the storageAccountAccessKey property: 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 ServerBlobAuditingPolicyProperties object itself. - */ - public ServerBlobAuditingPolicyProperties withStorageAccountAccessKey(String storageAccountAccessKey) { - this.storageAccountAccessKey = storageAccountAccessKey; - return this; - } - - /** - * Get the retentionDays property: 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 the retentionDays property: Specifies the number of days to keep in the audit logs in the storage account. - * - * @param retentionDays the retentionDays value to set. - * @return the ServerBlobAuditingPolicyProperties object itself. - */ - public ServerBlobAuditingPolicyProperties withRetentionDays(Integer retentionDays) { - this.retentionDays = retentionDays; - return this; - } - - /** - * Get the auditActionsAndGroups property: 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 the auditActionsAndGroups property: 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 ServerBlobAuditingPolicyProperties object itself. - */ - public ServerBlobAuditingPolicyProperties withAuditActionsAndGroups(List auditActionsAndGroups) { - this.auditActionsAndGroups = auditActionsAndGroups; - return this; - } - - /** - * Get the storageAccountSubscriptionId property: Specifies the blob storage subscription Id. - * - * @return the storageAccountSubscriptionId value. - */ - public UUID storageAccountSubscriptionId() { - return this.storageAccountSubscriptionId; - } - - /** - * Set the storageAccountSubscriptionId property: Specifies the blob storage subscription Id. - * - * @param storageAccountSubscriptionId the storageAccountSubscriptionId value to set. - * @return the ServerBlobAuditingPolicyProperties object itself. - */ - public ServerBlobAuditingPolicyProperties withStorageAccountSubscriptionId(UUID storageAccountSubscriptionId) { - this.storageAccountSubscriptionId = storageAccountSubscriptionId; - return this; - } - - /** - * Get the isStorageSecondaryKeyInUse property: Specifies whether storageAccountAccessKey value is the storage's - * secondary key. - * - * @return the isStorageSecondaryKeyInUse value. - */ - public Boolean isStorageSecondaryKeyInUse() { - return this.isStorageSecondaryKeyInUse; - } - - /** - * Set the isStorageSecondaryKeyInUse property: Specifies whether storageAccountAccessKey value is the storage's - * secondary key. - * - * @param isStorageSecondaryKeyInUse the isStorageSecondaryKeyInUse value to set. - * @return the ServerBlobAuditingPolicyProperties object itself. - */ - public ServerBlobAuditingPolicyProperties withIsStorageSecondaryKeyInUse(Boolean isStorageSecondaryKeyInUse) { - this.isStorageSecondaryKeyInUse = isStorageSecondaryKeyInUse; - return this; - } - - /** - * Get the isAzureMonitorTargetEnabled property: 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 the isAzureMonitorTargetEnabled property: 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 ServerBlobAuditingPolicyProperties object itself. - */ - public ServerBlobAuditingPolicyProperties withIsAzureMonitorTargetEnabled(Boolean isAzureMonitorTargetEnabled) { - this.isAzureMonitorTargetEnabled = isAzureMonitorTargetEnabled; - return this; - } - - /** - * Get the queueDelayMs property: 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 the queueDelayMs property: 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 ServerBlobAuditingPolicyProperties object itself. - */ - public ServerBlobAuditingPolicyProperties withQueueDelayMs(Integer queueDelayMs) { - this.queueDelayMs = queueDelayMs; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (state() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property state in model ServerBlobAuditingPolicyProperties")); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerSecurityAlertPolicyInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerSecurityAlertPolicyInner.java index 96e33852e7edb..55a27f5fa02df 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerSecurityAlertPolicyInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerSecurityAlertPolicyInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.SecurityAlertPolicyState; @@ -14,24 +15,64 @@ import java.util.List; /** Workspace managed Sql server security alert policy. */ +@JsonFlatten @Fluent -public final class ServerSecurityAlertPolicyInner extends ProxyResource { +public class ServerSecurityAlertPolicyInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerSecurityAlertPolicyInner.class); /* - * Resource properties. + * Specifies the state of the policy, whether it is enabled or disabled or + * a policy has not been applied yet on the specific server */ - @JsonProperty(value = "properties") - private ServerSecurityAlertPolicyProperties innerProperties; + @JsonProperty(value = "properties.state") + private SecurityAlertPolicyState state; - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. + /* + * Specifies an array of alerts that are disabled. Allowed values are: + * Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, + * Data_Exfiltration, Unsafe_Action */ - private ServerSecurityAlertPolicyProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.disabledAlerts") + private List disabledAlerts; + + /* + * Specifies an array of e-mail addresses to which the alert is sent. + */ + @JsonProperty(value = "properties.emailAddresses") + private List emailAddresses; + + /* + * Specifies that the alert is sent to the account administrators. + */ + @JsonProperty(value = "properties.emailAccountAdmins") + private Boolean emailAccountAdmins; + + /* + * Specifies the blob storage endpoint (e.g. + * https://MyAccount.blob.core.windows.net). This blob storage will hold + * all Threat Detection audit logs. + */ + @JsonProperty(value = "properties.storageEndpoint") + private String storageEndpoint; + + /* + * Specifies the identifier key of the Threat Detection audit storage + * account. + */ + @JsonProperty(value = "properties.storageAccountAccessKey") + private String storageAccountAccessKey; + + /* + * Specifies the number of days to keep in the Threat Detection audit logs. + */ + @JsonProperty(value = "properties.retentionDays") + private Integer retentionDays; + + /* + * Specifies the UTC creation time of the policy. + */ + @JsonProperty(value = "properties.creationTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime creationTime; /** * Get the state property: Specifies the state of the policy, whether it is enabled or disabled or a policy has not @@ -40,7 +81,7 @@ private ServerSecurityAlertPolicyProperties innerProperties() { * @return the state value. */ public SecurityAlertPolicyState state() { - return this.innerProperties() == null ? null : this.innerProperties().state(); + return this.state; } /** @@ -51,10 +92,7 @@ public SecurityAlertPolicyState state() { * @return the ServerSecurityAlertPolicyInner object itself. */ public ServerSecurityAlertPolicyInner withState(SecurityAlertPolicyState state) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerSecurityAlertPolicyProperties(); - } - this.innerProperties().withState(state); + this.state = state; return this; } @@ -65,7 +103,7 @@ public ServerSecurityAlertPolicyInner withState(SecurityAlertPolicyState state) * @return the disabledAlerts value. */ public List disabledAlerts() { - return this.innerProperties() == null ? null : this.innerProperties().disabledAlerts(); + return this.disabledAlerts; } /** @@ -76,10 +114,7 @@ public List disabledAlerts() { * @return the ServerSecurityAlertPolicyInner object itself. */ public ServerSecurityAlertPolicyInner withDisabledAlerts(List disabledAlerts) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerSecurityAlertPolicyProperties(); - } - this.innerProperties().withDisabledAlerts(disabledAlerts); + this.disabledAlerts = disabledAlerts; return this; } @@ -89,7 +124,7 @@ public ServerSecurityAlertPolicyInner withDisabledAlerts(List disabledAl * @return the emailAddresses value. */ public List emailAddresses() { - return this.innerProperties() == null ? null : this.innerProperties().emailAddresses(); + return this.emailAddresses; } /** @@ -99,10 +134,7 @@ public List emailAddresses() { * @return the ServerSecurityAlertPolicyInner object itself. */ public ServerSecurityAlertPolicyInner withEmailAddresses(List emailAddresses) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerSecurityAlertPolicyProperties(); - } - this.innerProperties().withEmailAddresses(emailAddresses); + this.emailAddresses = emailAddresses; return this; } @@ -112,7 +144,7 @@ public ServerSecurityAlertPolicyInner withEmailAddresses(List emailAddre * @return the emailAccountAdmins value. */ public Boolean emailAccountAdmins() { - return this.innerProperties() == null ? null : this.innerProperties().emailAccountAdmins(); + return this.emailAccountAdmins; } /** @@ -122,10 +154,7 @@ public Boolean emailAccountAdmins() { * @return the ServerSecurityAlertPolicyInner object itself. */ public ServerSecurityAlertPolicyInner withEmailAccountAdmins(Boolean emailAccountAdmins) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerSecurityAlertPolicyProperties(); - } - this.innerProperties().withEmailAccountAdmins(emailAccountAdmins); + this.emailAccountAdmins = emailAccountAdmins; return this; } @@ -136,7 +165,7 @@ public ServerSecurityAlertPolicyInner withEmailAccountAdmins(Boolean emailAccoun * @return the storageEndpoint value. */ public String storageEndpoint() { - return this.innerProperties() == null ? null : this.innerProperties().storageEndpoint(); + return this.storageEndpoint; } /** @@ -147,10 +176,7 @@ public String storageEndpoint() { * @return the ServerSecurityAlertPolicyInner object itself. */ public ServerSecurityAlertPolicyInner withStorageEndpoint(String storageEndpoint) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerSecurityAlertPolicyProperties(); - } - this.innerProperties().withStorageEndpoint(storageEndpoint); + this.storageEndpoint = storageEndpoint; return this; } @@ -161,7 +187,7 @@ public ServerSecurityAlertPolicyInner withStorageEndpoint(String storageEndpoint * @return the storageAccountAccessKey value. */ public String storageAccountAccessKey() { - return this.innerProperties() == null ? null : this.innerProperties().storageAccountAccessKey(); + return this.storageAccountAccessKey; } /** @@ -172,10 +198,7 @@ public String storageAccountAccessKey() { * @return the ServerSecurityAlertPolicyInner object itself. */ public ServerSecurityAlertPolicyInner withStorageAccountAccessKey(String storageAccountAccessKey) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerSecurityAlertPolicyProperties(); - } - this.innerProperties().withStorageAccountAccessKey(storageAccountAccessKey); + this.storageAccountAccessKey = storageAccountAccessKey; return this; } @@ -185,7 +208,7 @@ public ServerSecurityAlertPolicyInner withStorageAccountAccessKey(String storage * @return the retentionDays value. */ public Integer retentionDays() { - return this.innerProperties() == null ? null : this.innerProperties().retentionDays(); + return this.retentionDays; } /** @@ -195,10 +218,7 @@ public Integer retentionDays() { * @return the ServerSecurityAlertPolicyInner object itself. */ public ServerSecurityAlertPolicyInner withRetentionDays(Integer retentionDays) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerSecurityAlertPolicyProperties(); - } - this.innerProperties().withRetentionDays(retentionDays); + this.retentionDays = retentionDays; return this; } @@ -208,7 +228,7 @@ public ServerSecurityAlertPolicyInner withRetentionDays(Integer retentionDays) { * @return the creationTime value. */ public OffsetDateTime creationTime() { - return this.innerProperties() == null ? null : this.innerProperties().creationTime(); + return this.creationTime; } /** @@ -217,8 +237,5 @@ public OffsetDateTime creationTime() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerSecurityAlertPolicyProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerSecurityAlertPolicyProperties.java deleted file mode 100644 index 4c8b142bd087d..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerSecurityAlertPolicyProperties.java +++ /dev/null @@ -1,244 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.SecurityAlertPolicyState; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Properties of a security alert policy. */ -@Fluent -public final class ServerSecurityAlertPolicyProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerSecurityAlertPolicyProperties.class); - - /* - * Specifies the state of the policy, whether it is enabled or disabled or - * a policy has not been applied yet on the specific server - */ - @JsonProperty(value = "state", required = true) - private SecurityAlertPolicyState state; - - /* - * Specifies an array of alerts that are disabled. Allowed values are: - * Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, - * Data_Exfiltration, Unsafe_Action - */ - @JsonProperty(value = "disabledAlerts") - private List disabledAlerts; - - /* - * Specifies an array of e-mail addresses to which the alert is sent. - */ - @JsonProperty(value = "emailAddresses") - private List emailAddresses; - - /* - * Specifies that the alert is sent to the account administrators. - */ - @JsonProperty(value = "emailAccountAdmins") - private Boolean emailAccountAdmins; - - /* - * Specifies the blob storage endpoint (e.g. - * https://MyAccount.blob.core.windows.net). This blob storage will hold - * all Threat Detection audit logs. - */ - @JsonProperty(value = "storageEndpoint") - private String storageEndpoint; - - /* - * Specifies the identifier key of the Threat Detection audit storage - * account. - */ - @JsonProperty(value = "storageAccountAccessKey") - private String storageAccountAccessKey; - - /* - * Specifies the number of days to keep in the Threat Detection audit logs. - */ - @JsonProperty(value = "retentionDays") - private Integer retentionDays; - - /* - * Specifies the UTC creation time of the policy. - */ - @JsonProperty(value = "creationTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime creationTime; - - /** - * Get the state property: Specifies the state of the policy, whether it is enabled or disabled or a policy has not - * been applied yet on the specific server. - * - * @return the state value. - */ - public SecurityAlertPolicyState state() { - return this.state; - } - - /** - * Set the state property: Specifies the state of the policy, whether it is enabled or disabled or a policy has not - * been applied yet on the specific server. - * - * @param state the state value to set. - * @return the ServerSecurityAlertPolicyProperties object itself. - */ - public ServerSecurityAlertPolicyProperties withState(SecurityAlertPolicyState state) { - this.state = state; - return this; - } - - /** - * Get the disabledAlerts property: Specifies an array of alerts that are disabled. Allowed values are: - * Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action. - * - * @return the disabledAlerts value. - */ - public List disabledAlerts() { - return this.disabledAlerts; - } - - /** - * Set the disabledAlerts property: Specifies an array of alerts that are disabled. Allowed values are: - * Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action. - * - * @param disabledAlerts the disabledAlerts value to set. - * @return the ServerSecurityAlertPolicyProperties object itself. - */ - public ServerSecurityAlertPolicyProperties withDisabledAlerts(List disabledAlerts) { - this.disabledAlerts = disabledAlerts; - return this; - } - - /** - * Get the emailAddresses property: Specifies an array of e-mail addresses to which the alert is sent. - * - * @return the emailAddresses value. - */ - public List emailAddresses() { - return this.emailAddresses; - } - - /** - * Set the emailAddresses property: Specifies an array of e-mail addresses to which the alert is sent. - * - * @param emailAddresses the emailAddresses value to set. - * @return the ServerSecurityAlertPolicyProperties object itself. - */ - public ServerSecurityAlertPolicyProperties withEmailAddresses(List emailAddresses) { - this.emailAddresses = emailAddresses; - return this; - } - - /** - * Get the emailAccountAdmins property: Specifies that the alert is sent to the account administrators. - * - * @return the emailAccountAdmins value. - */ - public Boolean emailAccountAdmins() { - return this.emailAccountAdmins; - } - - /** - * Set the emailAccountAdmins property: Specifies that the alert is sent to the account administrators. - * - * @param emailAccountAdmins the emailAccountAdmins value to set. - * @return the ServerSecurityAlertPolicyProperties object itself. - */ - public ServerSecurityAlertPolicyProperties withEmailAccountAdmins(Boolean emailAccountAdmins) { - this.emailAccountAdmins = emailAccountAdmins; - return this; - } - - /** - * Get the storageEndpoint property: Specifies the blob storage endpoint (e.g. - * https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. - * - * @return the storageEndpoint value. - */ - public String storageEndpoint() { - return this.storageEndpoint; - } - - /** - * Set the storageEndpoint property: Specifies the blob storage endpoint (e.g. - * https://MyAccount.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. - * - * @param storageEndpoint the storageEndpoint value to set. - * @return the ServerSecurityAlertPolicyProperties object itself. - */ - public ServerSecurityAlertPolicyProperties withStorageEndpoint(String storageEndpoint) { - this.storageEndpoint = storageEndpoint; - return this; - } - - /** - * Get the storageAccountAccessKey property: Specifies the identifier key of the Threat Detection audit storage - * account. - * - * @return the storageAccountAccessKey value. - */ - public String storageAccountAccessKey() { - return this.storageAccountAccessKey; - } - - /** - * Set the storageAccountAccessKey property: Specifies the identifier key of the Threat Detection audit storage - * account. - * - * @param storageAccountAccessKey the storageAccountAccessKey value to set. - * @return the ServerSecurityAlertPolicyProperties object itself. - */ - public ServerSecurityAlertPolicyProperties withStorageAccountAccessKey(String storageAccountAccessKey) { - this.storageAccountAccessKey = storageAccountAccessKey; - return this; - } - - /** - * Get the retentionDays property: Specifies the number of days to keep in the Threat Detection audit logs. - * - * @return the retentionDays value. - */ - public Integer retentionDays() { - return this.retentionDays; - } - - /** - * Set the retentionDays property: Specifies the number of days to keep in the Threat Detection audit logs. - * - * @param retentionDays the retentionDays value to set. - * @return the ServerSecurityAlertPolicyProperties object itself. - */ - public ServerSecurityAlertPolicyProperties withRetentionDays(Integer retentionDays) { - this.retentionDays = retentionDays; - return this; - } - - /** - * Get the creationTime property: Specifies the UTC creation time of the policy. - * - * @return the creationTime value. - */ - public OffsetDateTime creationTime() { - return this.creationTime; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (state() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property state in model ServerSecurityAlertPolicyProperties")); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerVulnerabilityAssessmentInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerVulnerabilityAssessmentInner.java index ae58a47bd82be..ef87b21a30960 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerVulnerabilityAssessmentInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerVulnerabilityAssessmentInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentRecurringScansProperties; @@ -12,24 +13,40 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** A server vulnerability assessment. */ +@JsonFlatten @Fluent -public final class ServerVulnerabilityAssessmentInner extends ProxyResource { +public class ServerVulnerabilityAssessmentInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerVulnerabilityAssessmentInner.class); /* - * Resource properties. + * A blob storage container path to hold the scan results (e.g. + * https://myStorage.blob.core.windows.net/VaScans/). */ - @JsonProperty(value = "properties") - private ServerVulnerabilityAssessmentProperties innerProperties; + @JsonProperty(value = "properties.storageContainerPath") + private String storageContainerPath; - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. + /* + * A shared access signature (SAS Key) that has read and write access to + * the blob container specified in 'storageContainerPath' parameter. If + * 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is + * required. */ - private ServerVulnerabilityAssessmentProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.storageContainerSasKey") + private String storageContainerSasKey; + + /* + * Specifies the identifier key of the storage account for vulnerability + * assessment scan results. If 'StorageContainerSasKey' isn't specified, + * storageAccountAccessKey is required. + */ + @JsonProperty(value = "properties.storageAccountAccessKey") + private String storageAccountAccessKey; + + /* + * The recurring scans settings + */ + @JsonProperty(value = "properties.recurringScans") + private VulnerabilityAssessmentRecurringScansProperties recurringScans; /** * Get the storageContainerPath property: A blob storage container path to hold the scan results (e.g. @@ -38,7 +55,7 @@ private ServerVulnerabilityAssessmentProperties innerProperties() { * @return the storageContainerPath value. */ public String storageContainerPath() { - return this.innerProperties() == null ? null : this.innerProperties().storageContainerPath(); + return this.storageContainerPath; } /** @@ -49,10 +66,7 @@ public String storageContainerPath() { * @return the ServerVulnerabilityAssessmentInner object itself. */ public ServerVulnerabilityAssessmentInner withStorageContainerPath(String storageContainerPath) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerVulnerabilityAssessmentProperties(); - } - this.innerProperties().withStorageContainerPath(storageContainerPath); + this.storageContainerPath = storageContainerPath; return this; } @@ -64,7 +78,7 @@ public ServerVulnerabilityAssessmentInner withStorageContainerPath(String storag * @return the storageContainerSasKey value. */ public String storageContainerSasKey() { - return this.innerProperties() == null ? null : this.innerProperties().storageContainerSasKey(); + return this.storageContainerSasKey; } /** @@ -76,10 +90,7 @@ public String storageContainerSasKey() { * @return the ServerVulnerabilityAssessmentInner object itself. */ public ServerVulnerabilityAssessmentInner withStorageContainerSasKey(String storageContainerSasKey) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerVulnerabilityAssessmentProperties(); - } - this.innerProperties().withStorageContainerSasKey(storageContainerSasKey); + this.storageContainerSasKey = storageContainerSasKey; return this; } @@ -90,7 +101,7 @@ public ServerVulnerabilityAssessmentInner withStorageContainerSasKey(String stor * @return the storageAccountAccessKey value. */ public String storageAccountAccessKey() { - return this.innerProperties() == null ? null : this.innerProperties().storageAccountAccessKey(); + return this.storageAccountAccessKey; } /** @@ -101,10 +112,7 @@ public String storageAccountAccessKey() { * @return the ServerVulnerabilityAssessmentInner object itself. */ public ServerVulnerabilityAssessmentInner withStorageAccountAccessKey(String storageAccountAccessKey) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerVulnerabilityAssessmentProperties(); - } - this.innerProperties().withStorageAccountAccessKey(storageAccountAccessKey); + this.storageAccountAccessKey = storageAccountAccessKey; return this; } @@ -114,7 +122,7 @@ public ServerVulnerabilityAssessmentInner withStorageAccountAccessKey(String sto * @return the recurringScans value. */ public VulnerabilityAssessmentRecurringScansProperties recurringScans() { - return this.innerProperties() == null ? null : this.innerProperties().recurringScans(); + return this.recurringScans; } /** @@ -125,10 +133,7 @@ public VulnerabilityAssessmentRecurringScansProperties recurringScans() { */ public ServerVulnerabilityAssessmentInner withRecurringScans( VulnerabilityAssessmentRecurringScansProperties recurringScans) { - if (this.innerProperties() == null) { - this.innerProperties = new ServerVulnerabilityAssessmentProperties(); - } - this.innerProperties().withRecurringScans(recurringScans); + this.recurringScans = recurringScans; return this; } @@ -138,8 +143,8 @@ public ServerVulnerabilityAssessmentInner withRecurringScans( * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (recurringScans() != null) { + recurringScans().validate(); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerVulnerabilityAssessmentProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerVulnerabilityAssessmentProperties.java deleted file mode 100644 index 755d52ce37f51..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerVulnerabilityAssessmentProperties.java +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentRecurringScansProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Properties of a server Vulnerability Assessment. */ -@Fluent -public final class ServerVulnerabilityAssessmentProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(ServerVulnerabilityAssessmentProperties.class); - - /* - * A blob storage container path to hold the scan results (e.g. - * https://myStorage.blob.core.windows.net/VaScans/). - */ - @JsonProperty(value = "storageContainerPath", required = true) - private String storageContainerPath; - - /* - * A shared access signature (SAS Key) that has read and write access to - * the blob container specified in 'storageContainerPath' parameter. If - * 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is - * required. - */ - @JsonProperty(value = "storageContainerSasKey") - private String storageContainerSasKey; - - /* - * Specifies the identifier key of the storage account for vulnerability - * assessment scan results. If 'StorageContainerSasKey' isn't specified, - * storageAccountAccessKey is required. - */ - @JsonProperty(value = "storageAccountAccessKey") - private String storageAccountAccessKey; - - /* - * The recurring scans settings - */ - @JsonProperty(value = "recurringScans") - private VulnerabilityAssessmentRecurringScansProperties recurringScans; - - /** - * Get the storageContainerPath property: A blob storage container path to hold the scan results (e.g. - * https://myStorage.blob.core.windows.net/VaScans/). - * - * @return the storageContainerPath value. - */ - public String storageContainerPath() { - return this.storageContainerPath; - } - - /** - * Set the storageContainerPath property: A blob storage container path to hold the scan results (e.g. - * https://myStorage.blob.core.windows.net/VaScans/). - * - * @param storageContainerPath the storageContainerPath value to set. - * @return the ServerVulnerabilityAssessmentProperties object itself. - */ - public ServerVulnerabilityAssessmentProperties withStorageContainerPath(String storageContainerPath) { - this.storageContainerPath = storageContainerPath; - return this; - } - - /** - * Get the storageContainerSasKey property: A shared access signature (SAS Key) that has read and write access to - * the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, - * StorageContainerSasKey is required. - * - * @return the storageContainerSasKey value. - */ - public String storageContainerSasKey() { - return this.storageContainerSasKey; - } - - /** - * Set the storageContainerSasKey property: A shared access signature (SAS Key) that has read and write access to - * the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, - * StorageContainerSasKey is required. - * - * @param storageContainerSasKey the storageContainerSasKey value to set. - * @return the ServerVulnerabilityAssessmentProperties object itself. - */ - public ServerVulnerabilityAssessmentProperties withStorageContainerSasKey(String storageContainerSasKey) { - this.storageContainerSasKey = storageContainerSasKey; - return this; - } - - /** - * Get the storageAccountAccessKey property: Specifies the identifier key of the storage account for vulnerability - * assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. - * - * @return the storageAccountAccessKey value. - */ - public String storageAccountAccessKey() { - return this.storageAccountAccessKey; - } - - /** - * Set the storageAccountAccessKey property: Specifies the identifier key of the storage account for vulnerability - * assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. - * - * @param storageAccountAccessKey the storageAccountAccessKey value to set. - * @return the ServerVulnerabilityAssessmentProperties object itself. - */ - public ServerVulnerabilityAssessmentProperties withStorageAccountAccessKey(String storageAccountAccessKey) { - this.storageAccountAccessKey = storageAccountAccessKey; - return this; - } - - /** - * Get the recurringScans property: The recurring scans settings. - * - * @return the recurringScans value. - */ - public VulnerabilityAssessmentRecurringScansProperties recurringScans() { - return this.recurringScans; - } - - /** - * Set the recurringScans property: The recurring scans settings. - * - * @param recurringScans the recurringScans value to set. - * @return the ServerVulnerabilityAssessmentProperties object itself. - */ - public ServerVulnerabilityAssessmentProperties withRecurringScans( - VulnerabilityAssessmentRecurringScansProperties recurringScans) { - this.recurringScans = recurringScans; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (storageContainerPath() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property storageContainerPath in model" - + " ServerVulnerabilityAssessmentProperties")); - } - if (recurringScans() != null) { - recurringScans().validate(); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SparkConfigurationInfo.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SparkConfigurationInfo.java deleted file mode 100644 index 8de42f4393736..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SparkConfigurationInfo.java +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; -import java.util.Map; - -/** Information about a SparkConfiguration created at the workspace level. SparkConfiguration Artifact information. */ -@Fluent -public final class SparkConfigurationInfo { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SparkConfigurationInfo.class); - - /* - * Description about the SparkConfiguration. - */ - @JsonProperty(value = "description") - private String description; - - /* - * SparkConfiguration configs. - */ - @JsonProperty(value = "configs", required = true) - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map configs; - - /* - * Annotations for SparkConfiguration. - */ - @JsonProperty(value = "annotations") - private List annotations; - - /* - * additional Notes. - */ - @JsonProperty(value = "notes") - private String notes; - - /* - * The identity that created the resource. - */ - @JsonProperty(value = "createdBy") - private String createdBy; - - /* - * The timestamp of resource creation. - */ - @JsonProperty(value = "created") - private OffsetDateTime created; - - /** - * Get the description property: Description about the SparkConfiguration. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Set the description property: Description about the SparkConfiguration. - * - * @param description the description value to set. - * @return the SparkConfigurationInfo object itself. - */ - public SparkConfigurationInfo withDescription(String description) { - this.description = description; - return this; - } - - /** - * Get the configs property: SparkConfiguration configs. - * - * @return the configs value. - */ - public Map configs() { - return this.configs; - } - - /** - * Set the configs property: SparkConfiguration configs. - * - * @param configs the configs value to set. - * @return the SparkConfigurationInfo object itself. - */ - public SparkConfigurationInfo withConfigs(Map configs) { - this.configs = configs; - return this; - } - - /** - * Get the annotations property: Annotations for SparkConfiguration. - * - * @return the annotations value. - */ - public List annotations() { - return this.annotations; - } - - /** - * Set the annotations property: Annotations for SparkConfiguration. - * - * @param annotations the annotations value to set. - * @return the SparkConfigurationInfo object itself. - */ - public SparkConfigurationInfo withAnnotations(List annotations) { - this.annotations = annotations; - return this; - } - - /** - * Get the notes property: additional Notes. - * - * @return the notes value. - */ - public String notes() { - return this.notes; - } - - /** - * Set the notes property: additional Notes. - * - * @param notes the notes value to set. - * @return the SparkConfigurationInfo object itself. - */ - public SparkConfigurationInfo withNotes(String notes) { - this.notes = notes; - return this; - } - - /** - * Get the createdBy property: The identity that created the resource. - * - * @return the createdBy value. - */ - public String createdBy() { - return this.createdBy; - } - - /** - * Set the createdBy property: The identity that created the resource. - * - * @param createdBy the createdBy value to set. - * @return the SparkConfigurationInfo object itself. - */ - public SparkConfigurationInfo withCreatedBy(String createdBy) { - this.createdBy = createdBy; - return this; - } - - /** - * Get the created property: The timestamp of resource creation. - * - * @return the created value. - */ - public OffsetDateTime created() { - return this.created; - } - - /** - * Set the created property: The timestamp of resource creation. - * - * @param created the created value to set. - * @return the SparkConfigurationInfo object itself. - */ - public SparkConfigurationInfo withCreated(OffsetDateTime created) { - this.created = created; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (configs() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException("Missing required property configs in model SparkConfigurationInfo")); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SparkConfigurationResourceInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SparkConfigurationResourceInner.java index c3f293010c79f..1215fdcea66b0 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SparkConfigurationResourceInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SparkConfigurationResourceInner.java @@ -5,35 +5,58 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.EntityResource; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; import java.util.Map; /** SparkConfiguration response details. */ +@JsonFlatten @Fluent -public final class SparkConfigurationResourceInner extends EntityResource { +public class SparkConfigurationResourceInner extends EntityResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(SparkConfigurationResourceInner.class); /* - * Information about a SparkConfiguration created at the workspace level. - * SparkConfiguration properties. + * Description about the SparkConfiguration. */ - @JsonProperty(value = "properties", required = true) - private SparkConfigurationInfo innerProperties = new SparkConfigurationInfo(); + @JsonProperty(value = "properties.description") + private String description; - /** - * Get the innerProperties property: Information about a SparkConfiguration created at the workspace level. - * SparkConfiguration properties. - * - * @return the innerProperties value. + /* + * SparkConfiguration configs. */ - private SparkConfigurationInfo innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.configs", required = true) + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map configs; + + /* + * Annotations for SparkConfiguration. + */ + @JsonProperty(value = "properties.annotations") + private List annotations; + + /* + * additional Notes. + */ + @JsonProperty(value = "properties.notes") + private String notes; + + /* + * The identity that created the resource. + */ + @JsonProperty(value = "properties.createdBy") + private String createdBy; + + /* + * The timestamp of resource creation. + */ + @JsonProperty(value = "properties.created") + private OffsetDateTime created; /** * Get the description property: Description about the SparkConfiguration. @@ -41,7 +64,7 @@ private SparkConfigurationInfo innerProperties() { * @return the description value. */ public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); + return this.description; } /** @@ -51,10 +74,7 @@ public String description() { * @return the SparkConfigurationResourceInner object itself. */ public SparkConfigurationResourceInner withDescription(String description) { - if (this.innerProperties() == null) { - this.innerProperties = new SparkConfigurationInfo(); - } - this.innerProperties().withDescription(description); + this.description = description; return this; } @@ -64,7 +84,7 @@ public SparkConfigurationResourceInner withDescription(String description) { * @return the configs value. */ public Map configs() { - return this.innerProperties() == null ? null : this.innerProperties().configs(); + return this.configs; } /** @@ -74,10 +94,7 @@ public Map configs() { * @return the SparkConfigurationResourceInner object itself. */ public SparkConfigurationResourceInner withConfigs(Map configs) { - if (this.innerProperties() == null) { - this.innerProperties = new SparkConfigurationInfo(); - } - this.innerProperties().withConfigs(configs); + this.configs = configs; return this; } @@ -87,7 +104,7 @@ public SparkConfigurationResourceInner withConfigs(Map configs) * @return the annotations value. */ public List annotations() { - return this.innerProperties() == null ? null : this.innerProperties().annotations(); + return this.annotations; } /** @@ -97,10 +114,7 @@ public List annotations() { * @return the SparkConfigurationResourceInner object itself. */ public SparkConfigurationResourceInner withAnnotations(List annotations) { - if (this.innerProperties() == null) { - this.innerProperties = new SparkConfigurationInfo(); - } - this.innerProperties().withAnnotations(annotations); + this.annotations = annotations; return this; } @@ -110,7 +124,7 @@ public SparkConfigurationResourceInner withAnnotations(List annotations) * @return the notes value. */ public String notes() { - return this.innerProperties() == null ? null : this.innerProperties().notes(); + return this.notes; } /** @@ -120,10 +134,7 @@ public String notes() { * @return the SparkConfigurationResourceInner object itself. */ public SparkConfigurationResourceInner withNotes(String notes) { - if (this.innerProperties() == null) { - this.innerProperties = new SparkConfigurationInfo(); - } - this.innerProperties().withNotes(notes); + this.notes = notes; return this; } @@ -133,7 +144,7 @@ public SparkConfigurationResourceInner withNotes(String notes) { * @return the createdBy value. */ public String createdBy() { - return this.innerProperties() == null ? null : this.innerProperties().createdBy(); + return this.createdBy; } /** @@ -143,10 +154,7 @@ public String createdBy() { * @return the SparkConfigurationResourceInner object itself. */ public SparkConfigurationResourceInner withCreatedBy(String createdBy) { - if (this.innerProperties() == null) { - this.innerProperties = new SparkConfigurationInfo(); - } - this.innerProperties().withCreatedBy(createdBy); + this.createdBy = createdBy; return this; } @@ -156,7 +164,7 @@ public SparkConfigurationResourceInner withCreatedBy(String createdBy) { * @return the created value. */ public OffsetDateTime created() { - return this.innerProperties() == null ? null : this.innerProperties().created(); + return this.created; } /** @@ -166,10 +174,7 @@ public OffsetDateTime created() { * @return the SparkConfigurationResourceInner object itself. */ public SparkConfigurationResourceInner withCreated(OffsetDateTime created) { - if (this.innerProperties() == null) { - this.innerProperties = new SparkConfigurationInfo(); - } - this.innerProperties().withCreated(created); + this.created = created; return this; } @@ -181,13 +186,11 @@ public SparkConfigurationResourceInner withCreated(OffsetDateTime created) { @Override public void validate() { super.validate(); - if (innerProperties() == null) { + if (configs() == null) { throw logger .logExceptionAsError( new IllegalArgumentException( - "Missing required property innerProperties in model SparkConfigurationResourceInner")); - } else { - innerProperties().validate(); + "Missing required property configs in model SparkConfigurationResourceInner")); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolBlobAuditingPolicyInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolBlobAuditingPolicyInner.java index bd349f0d62b9d..a0ed034e6f590 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolBlobAuditingPolicyInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolBlobAuditingPolicyInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.BlobAuditingPolicyState; @@ -14,8 +15,9 @@ import java.util.UUID; /** A Sql pool blob auditing policy. */ +@JsonFlatten @Fluent -public final class SqlPoolBlobAuditingPolicyInner extends ProxyResource { +public class SqlPoolBlobAuditingPolicyInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlPoolBlobAuditingPolicyInner.class); /* @@ -25,10 +27,147 @@ public final class SqlPoolBlobAuditingPolicyInner extends ProxyResource { private String kind; /* - * Resource properties. + * Specifies the state of the policy. If state is Enabled, storageEndpoint + * or isAzureMonitorTargetEnabled are required. */ - @JsonProperty(value = "properties") - private SqlPoolBlobAuditingPolicyProperties innerProperties; + @JsonProperty(value = "properties.state") + private BlobAuditingPolicyState state; + + /* + * Specifies the blob storage endpoint (e.g. + * https://MyAccount.blob.core.windows.net). If state is Enabled, + * storageEndpoint 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, storageAccountAccessKey is + * required. + */ + @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 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; /** * Get the kind property: Resource kind. @@ -39,15 +178,6 @@ public String kind() { return this.kind; } - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private SqlPoolBlobAuditingPolicyProperties innerProperties() { - return this.innerProperties; - } - /** * Get the state property: Specifies the state of the policy. If state is Enabled, storageEndpoint or * isAzureMonitorTargetEnabled are required. @@ -55,7 +185,7 @@ private SqlPoolBlobAuditingPolicyProperties innerProperties() { * @return the state value. */ public BlobAuditingPolicyState state() { - return this.innerProperties() == null ? null : this.innerProperties().state(); + return this.state; } /** @@ -66,10 +196,7 @@ public BlobAuditingPolicyState state() { * @return the SqlPoolBlobAuditingPolicyInner object itself. */ public SqlPoolBlobAuditingPolicyInner withState(BlobAuditingPolicyState state) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolBlobAuditingPolicyProperties(); - } - this.innerProperties().withState(state); + this.state = state; return this; } @@ -80,7 +207,7 @@ public SqlPoolBlobAuditingPolicyInner withState(BlobAuditingPolicyState state) { * @return the storageEndpoint value. */ public String storageEndpoint() { - return this.innerProperties() == null ? null : this.innerProperties().storageEndpoint(); + return this.storageEndpoint; } /** @@ -91,10 +218,7 @@ public String storageEndpoint() { * @return the SqlPoolBlobAuditingPolicyInner object itself. */ public SqlPoolBlobAuditingPolicyInner withStorageEndpoint(String storageEndpoint) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolBlobAuditingPolicyProperties(); - } - this.innerProperties().withStorageEndpoint(storageEndpoint); + this.storageEndpoint = storageEndpoint; return this; } @@ -105,7 +229,7 @@ public SqlPoolBlobAuditingPolicyInner withStorageEndpoint(String storageEndpoint * @return the storageAccountAccessKey value. */ public String storageAccountAccessKey() { - return this.innerProperties() == null ? null : this.innerProperties().storageAccountAccessKey(); + return this.storageAccountAccessKey; } /** @@ -116,10 +240,7 @@ public String storageAccountAccessKey() { * @return the SqlPoolBlobAuditingPolicyInner object itself. */ public SqlPoolBlobAuditingPolicyInner withStorageAccountAccessKey(String storageAccountAccessKey) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolBlobAuditingPolicyProperties(); - } - this.innerProperties().withStorageAccountAccessKey(storageAccountAccessKey); + this.storageAccountAccessKey = storageAccountAccessKey; return this; } @@ -129,7 +250,7 @@ public SqlPoolBlobAuditingPolicyInner withStorageAccountAccessKey(String storage * @return the retentionDays value. */ public Integer retentionDays() { - return this.innerProperties() == null ? null : this.innerProperties().retentionDays(); + return this.retentionDays; } /** @@ -139,10 +260,7 @@ public Integer retentionDays() { * @return the SqlPoolBlobAuditingPolicyInner object itself. */ public SqlPoolBlobAuditingPolicyInner withRetentionDays(Integer retentionDays) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolBlobAuditingPolicyProperties(); - } - this.innerProperties().withRetentionDays(retentionDays); + this.retentionDays = retentionDays; return this; } @@ -192,7 +310,7 @@ public SqlPoolBlobAuditingPolicyInner withRetentionDays(Integer retentionDays) { * @return the auditActionsAndGroups value. */ public List auditActionsAndGroups() { - return this.innerProperties() == null ? null : this.innerProperties().auditActionsAndGroups(); + return this.auditActionsAndGroups; } /** @@ -242,10 +360,7 @@ public List auditActionsAndGroups() { * @return the SqlPoolBlobAuditingPolicyInner object itself. */ public SqlPoolBlobAuditingPolicyInner withAuditActionsAndGroups(List auditActionsAndGroups) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolBlobAuditingPolicyProperties(); - } - this.innerProperties().withAuditActionsAndGroups(auditActionsAndGroups); + this.auditActionsAndGroups = auditActionsAndGroups; return this; } @@ -255,7 +370,7 @@ public SqlPoolBlobAuditingPolicyInner withAuditActionsAndGroups(List aud * @return the storageAccountSubscriptionId value. */ public UUID storageAccountSubscriptionId() { - return this.innerProperties() == null ? null : this.innerProperties().storageAccountSubscriptionId(); + return this.storageAccountSubscriptionId; } /** @@ -265,10 +380,7 @@ public UUID storageAccountSubscriptionId() { * @return the SqlPoolBlobAuditingPolicyInner object itself. */ public SqlPoolBlobAuditingPolicyInner withStorageAccountSubscriptionId(UUID storageAccountSubscriptionId) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolBlobAuditingPolicyProperties(); - } - this.innerProperties().withStorageAccountSubscriptionId(storageAccountSubscriptionId); + this.storageAccountSubscriptionId = storageAccountSubscriptionId; return this; } @@ -279,7 +391,7 @@ public SqlPoolBlobAuditingPolicyInner withStorageAccountSubscriptionId(UUID stor * @return the isStorageSecondaryKeyInUse value. */ public Boolean isStorageSecondaryKeyInUse() { - return this.innerProperties() == null ? null : this.innerProperties().isStorageSecondaryKeyInUse(); + return this.isStorageSecondaryKeyInUse; } /** @@ -290,10 +402,7 @@ public Boolean isStorageSecondaryKeyInUse() { * @return the SqlPoolBlobAuditingPolicyInner object itself. */ public SqlPoolBlobAuditingPolicyInner withIsStorageSecondaryKeyInUse(Boolean isStorageSecondaryKeyInUse) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolBlobAuditingPolicyProperties(); - } - this.innerProperties().withIsStorageSecondaryKeyInUse(isStorageSecondaryKeyInUse); + this.isStorageSecondaryKeyInUse = isStorageSecondaryKeyInUse; return this; } @@ -314,7 +423,7 @@ public SqlPoolBlobAuditingPolicyInner withIsStorageSecondaryKeyInUse(Boolean isS * @return the isAzureMonitorTargetEnabled value. */ public Boolean isAzureMonitorTargetEnabled() { - return this.innerProperties() == null ? null : this.innerProperties().isAzureMonitorTargetEnabled(); + return this.isAzureMonitorTargetEnabled; } /** @@ -335,10 +444,7 @@ public Boolean isAzureMonitorTargetEnabled() { * @return the SqlPoolBlobAuditingPolicyInner object itself. */ public SqlPoolBlobAuditingPolicyInner withIsAzureMonitorTargetEnabled(Boolean isAzureMonitorTargetEnabled) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolBlobAuditingPolicyProperties(); - } - this.innerProperties().withIsAzureMonitorTargetEnabled(isAzureMonitorTargetEnabled); + this.isAzureMonitorTargetEnabled = isAzureMonitorTargetEnabled; return this; } @@ -348,8 +454,5 @@ public SqlPoolBlobAuditingPolicyInner withIsAzureMonitorTargetEnabled(Boolean is * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolBlobAuditingPolicyProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolBlobAuditingPolicyProperties.java deleted file mode 100644 index 5127f240dfab3..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolBlobAuditingPolicyProperties.java +++ /dev/null @@ -1,446 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.BlobAuditingPolicyState; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.UUID; - -/** Properties of a Sql pool blob auditing policy. */ -@Fluent -public final class SqlPoolBlobAuditingPolicyProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlPoolBlobAuditingPolicyProperties.class); - - /* - * Specifies the state of the policy. If state is Enabled, storageEndpoint - * or isAzureMonitorTargetEnabled are required. - */ - @JsonProperty(value = "state", required = true) - private BlobAuditingPolicyState state; - - /* - * Specifies the blob storage endpoint (e.g. - * https://MyAccount.blob.core.windows.net). If state is Enabled, - * storageEndpoint is required. - */ - @JsonProperty(value = "storageEndpoint") - private String storageEndpoint; - - /* - * Specifies the identifier key of the auditing storage account. If state - * is Enabled and storageEndpoint is specified, storageAccountAccessKey is - * required. - */ - @JsonProperty(value = "storageAccountAccessKey") - private String storageAccountAccessKey; - - /* - * Specifies the number of days to keep in the audit logs in the storage - * account. - */ - @JsonProperty(value = "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 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 = "auditActionsAndGroups") - private List auditActionsAndGroups; - - /* - * Specifies the blob storage subscription Id. - */ - @JsonProperty(value = "storageAccountSubscriptionId") - private UUID storageAccountSubscriptionId; - - /* - * Specifies whether storageAccountAccessKey value is the storage's - * secondary key. - */ - @JsonProperty(value = "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 = "isAzureMonitorTargetEnabled") - private Boolean isAzureMonitorTargetEnabled; - - /** - * Get the state property: Specifies the state of the policy. If state is Enabled, storageEndpoint or - * isAzureMonitorTargetEnabled are required. - * - * @return the state value. - */ - public BlobAuditingPolicyState state() { - return this.state; - } - - /** - * Set the state property: Specifies the state of the policy. If state is Enabled, storageEndpoint or - * isAzureMonitorTargetEnabled are required. - * - * @param state the state value to set. - * @return the SqlPoolBlobAuditingPolicyProperties object itself. - */ - public SqlPoolBlobAuditingPolicyProperties withState(BlobAuditingPolicyState state) { - this.state = state; - return this; - } - - /** - * Get the storageEndpoint property: Specifies the blob storage endpoint (e.g. - * https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint is required. - * - * @return the storageEndpoint value. - */ - public String storageEndpoint() { - return this.storageEndpoint; - } - - /** - * Set the storageEndpoint property: Specifies the blob storage endpoint (e.g. - * https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint is required. - * - * @param storageEndpoint the storageEndpoint value to set. - * @return the SqlPoolBlobAuditingPolicyProperties object itself. - */ - public SqlPoolBlobAuditingPolicyProperties withStorageEndpoint(String storageEndpoint) { - this.storageEndpoint = storageEndpoint; - return this; - } - - /** - * Get the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. If state - * is Enabled and storageEndpoint is specified, storageAccountAccessKey is required. - * - * @return the storageAccountAccessKey value. - */ - public String storageAccountAccessKey() { - return this.storageAccountAccessKey; - } - - /** - * Set the storageAccountAccessKey property: Specifies the identifier key of the auditing storage account. If state - * is Enabled and storageEndpoint is specified, storageAccountAccessKey is required. - * - * @param storageAccountAccessKey the storageAccountAccessKey value to set. - * @return the SqlPoolBlobAuditingPolicyProperties object itself. - */ - public SqlPoolBlobAuditingPolicyProperties withStorageAccountAccessKey(String storageAccountAccessKey) { - this.storageAccountAccessKey = storageAccountAccessKey; - return this; - } - - /** - * Get the retentionDays property: 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 the retentionDays property: Specifies the number of days to keep in the audit logs in the storage account. - * - * @param retentionDays the retentionDays value to set. - * @return the SqlPoolBlobAuditingPolicyProperties object itself. - */ - public SqlPoolBlobAuditingPolicyProperties withRetentionDays(Integer retentionDays) { - this.retentionDays = retentionDays; - return this; - } - - /** - * Get the auditActionsAndGroups property: 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 the auditActionsAndGroups property: 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 SqlPoolBlobAuditingPolicyProperties object itself. - */ - public SqlPoolBlobAuditingPolicyProperties withAuditActionsAndGroups(List auditActionsAndGroups) { - this.auditActionsAndGroups = auditActionsAndGroups; - return this; - } - - /** - * Get the storageAccountSubscriptionId property: Specifies the blob storage subscription Id. - * - * @return the storageAccountSubscriptionId value. - */ - public UUID storageAccountSubscriptionId() { - return this.storageAccountSubscriptionId; - } - - /** - * Set the storageAccountSubscriptionId property: Specifies the blob storage subscription Id. - * - * @param storageAccountSubscriptionId the storageAccountSubscriptionId value to set. - * @return the SqlPoolBlobAuditingPolicyProperties object itself. - */ - public SqlPoolBlobAuditingPolicyProperties withStorageAccountSubscriptionId(UUID storageAccountSubscriptionId) { - this.storageAccountSubscriptionId = storageAccountSubscriptionId; - return this; - } - - /** - * Get the isStorageSecondaryKeyInUse property: Specifies whether storageAccountAccessKey value is the storage's - * secondary key. - * - * @return the isStorageSecondaryKeyInUse value. - */ - public Boolean isStorageSecondaryKeyInUse() { - return this.isStorageSecondaryKeyInUse; - } - - /** - * Set the isStorageSecondaryKeyInUse property: Specifies whether storageAccountAccessKey value is the storage's - * secondary key. - * - * @param isStorageSecondaryKeyInUse the isStorageSecondaryKeyInUse value to set. - * @return the SqlPoolBlobAuditingPolicyProperties object itself. - */ - public SqlPoolBlobAuditingPolicyProperties withIsStorageSecondaryKeyInUse(Boolean isStorageSecondaryKeyInUse) { - this.isStorageSecondaryKeyInUse = isStorageSecondaryKeyInUse; - return this; - } - - /** - * Get the isAzureMonitorTargetEnabled property: 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 the isAzureMonitorTargetEnabled property: 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 SqlPoolBlobAuditingPolicyProperties object itself. - */ - public SqlPoolBlobAuditingPolicyProperties withIsAzureMonitorTargetEnabled(Boolean isAzureMonitorTargetEnabled) { - this.isAzureMonitorTargetEnabled = isAzureMonitorTargetEnabled; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (state() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property state in model SqlPoolBlobAuditingPolicyProperties")); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolColumnInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolColumnInner.java index ca2844fadaa4a..d73a10956ecff 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolColumnInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolColumnInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.ColumnDataType; @@ -12,24 +13,22 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** A Sql pool column resource. */ +@JsonFlatten @Fluent -public final class SqlPoolColumnInner extends ProxyResource { +public class SqlPoolColumnInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlPoolColumnInner.class); /* - * Resource properties. + * The column data type. */ - @JsonProperty(value = "properties") - private SqlPoolColumnProperties innerProperties; + @JsonProperty(value = "properties.columnType") + private ColumnDataType columnType; - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. + /* + * Indicates whether column value is computed or not */ - private SqlPoolColumnProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.isComputed", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isComputed; /** * Get the columnType property: The column data type. @@ -37,7 +36,7 @@ private SqlPoolColumnProperties innerProperties() { * @return the columnType value. */ public ColumnDataType columnType() { - return this.innerProperties() == null ? null : this.innerProperties().columnType(); + return this.columnType; } /** @@ -47,10 +46,7 @@ public ColumnDataType columnType() { * @return the SqlPoolColumnInner object itself. */ public SqlPoolColumnInner withColumnType(ColumnDataType columnType) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolColumnProperties(); - } - this.innerProperties().withColumnType(columnType); + this.columnType = columnType; return this; } @@ -60,7 +56,7 @@ public SqlPoolColumnInner withColumnType(ColumnDataType columnType) { * @return the isComputed value. */ public Boolean isComputed() { - return this.innerProperties() == null ? null : this.innerProperties().isComputed(); + return this.isComputed; } /** @@ -69,8 +65,5 @@ public Boolean isComputed() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolColumnProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolColumnProperties.java deleted file mode 100644 index 5076a4301e398..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolColumnProperties.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.ColumnDataType; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Sql pool column properties. */ -@Fluent -public final class SqlPoolColumnProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlPoolColumnProperties.class); - - /* - * The column data type. - */ - @JsonProperty(value = "columnType") - private ColumnDataType columnType; - - /* - * Indicates whether column value is computed or not - */ - @JsonProperty(value = "isComputed", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isComputed; - - /** - * Get the columnType property: The column data type. - * - * @return the columnType value. - */ - public ColumnDataType columnType() { - return this.columnType; - } - - /** - * Set the columnType property: The column data type. - * - * @param columnType the columnType value to set. - * @return the SqlPoolColumnProperties object itself. - */ - public SqlPoolColumnProperties withColumnType(ColumnDataType columnType) { - this.columnType = columnType; - return this; - } - - /** - * Get the isComputed property: Indicates whether column value is computed or not. - * - * @return the isComputed value. - */ - public Boolean isComputed() { - return this.isComputed; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolConnectionPolicyInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolConnectionPolicyInner.java index eed3ab69f365a..f4c02013de79e 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolConnectionPolicyInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolConnectionPolicyInner.java @@ -5,14 +5,16 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A Sql pool connection policy. */ +@JsonFlatten @Fluent -public final class SqlPoolConnectionPolicyInner extends ProxyResource { +public class SqlPoolConnectionPolicyInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlPoolConnectionPolicyInner.class); /* @@ -28,10 +30,46 @@ public final class SqlPoolConnectionPolicyInner extends ProxyResource { private String location; /* - * Resource properties. + * The state of security access. */ - @JsonProperty(value = "properties") - private SqlPoolConnectionPolicyProperties innerProperties; + @JsonProperty(value = "properties.securityEnabledAccess") + private String securityEnabledAccess; + + /* + * The fully qualified host name of the auditing proxy. + */ + @JsonProperty(value = "properties.proxyDnsName") + private String proxyDnsName; + + /* + * The port number of the auditing proxy. + */ + @JsonProperty(value = "properties.proxyPort") + private String proxyPort; + + /* + * The visibility of the auditing proxy. + */ + @JsonProperty(value = "properties.visibility") + private String visibility; + + /* + * Whether server default is enabled or disabled. + */ + @JsonProperty(value = "properties.useServerDefault") + private String useServerDefault; + + /* + * The state of proxy redirection. + */ + @JsonProperty(value = "properties.redirectionState") + private String redirectionState; + + /* + * The connection policy state. + */ + @JsonProperty(value = "properties.state") + private String state; /** * Get the kind property: Resource kind. @@ -51,22 +89,13 @@ public String location() { return this.location; } - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private SqlPoolConnectionPolicyProperties innerProperties() { - return this.innerProperties; - } - /** * Get the securityEnabledAccess property: The state of security access. * * @return the securityEnabledAccess value. */ public String securityEnabledAccess() { - return this.innerProperties() == null ? null : this.innerProperties().securityEnabledAccess(); + return this.securityEnabledAccess; } /** @@ -76,10 +105,7 @@ public String securityEnabledAccess() { * @return the SqlPoolConnectionPolicyInner object itself. */ public SqlPoolConnectionPolicyInner withSecurityEnabledAccess(String securityEnabledAccess) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolConnectionPolicyProperties(); - } - this.innerProperties().withSecurityEnabledAccess(securityEnabledAccess); + this.securityEnabledAccess = securityEnabledAccess; return this; } @@ -89,7 +115,7 @@ public SqlPoolConnectionPolicyInner withSecurityEnabledAccess(String securityEna * @return the proxyDnsName value. */ public String proxyDnsName() { - return this.innerProperties() == null ? null : this.innerProperties().proxyDnsName(); + return this.proxyDnsName; } /** @@ -99,10 +125,7 @@ public String proxyDnsName() { * @return the SqlPoolConnectionPolicyInner object itself. */ public SqlPoolConnectionPolicyInner withProxyDnsName(String proxyDnsName) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolConnectionPolicyProperties(); - } - this.innerProperties().withProxyDnsName(proxyDnsName); + this.proxyDnsName = proxyDnsName; return this; } @@ -112,7 +135,7 @@ public SqlPoolConnectionPolicyInner withProxyDnsName(String proxyDnsName) { * @return the proxyPort value. */ public String proxyPort() { - return this.innerProperties() == null ? null : this.innerProperties().proxyPort(); + return this.proxyPort; } /** @@ -122,10 +145,7 @@ public String proxyPort() { * @return the SqlPoolConnectionPolicyInner object itself. */ public SqlPoolConnectionPolicyInner withProxyPort(String proxyPort) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolConnectionPolicyProperties(); - } - this.innerProperties().withProxyPort(proxyPort); + this.proxyPort = proxyPort; return this; } @@ -135,7 +155,7 @@ public SqlPoolConnectionPolicyInner withProxyPort(String proxyPort) { * @return the visibility value. */ public String visibility() { - return this.innerProperties() == null ? null : this.innerProperties().visibility(); + return this.visibility; } /** @@ -145,10 +165,7 @@ public String visibility() { * @return the SqlPoolConnectionPolicyInner object itself. */ public SqlPoolConnectionPolicyInner withVisibility(String visibility) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolConnectionPolicyProperties(); - } - this.innerProperties().withVisibility(visibility); + this.visibility = visibility; return this; } @@ -158,7 +175,7 @@ public SqlPoolConnectionPolicyInner withVisibility(String visibility) { * @return the useServerDefault value. */ public String useServerDefault() { - return this.innerProperties() == null ? null : this.innerProperties().useServerDefault(); + return this.useServerDefault; } /** @@ -168,10 +185,7 @@ public String useServerDefault() { * @return the SqlPoolConnectionPolicyInner object itself. */ public SqlPoolConnectionPolicyInner withUseServerDefault(String useServerDefault) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolConnectionPolicyProperties(); - } - this.innerProperties().withUseServerDefault(useServerDefault); + this.useServerDefault = useServerDefault; return this; } @@ -181,7 +195,7 @@ public SqlPoolConnectionPolicyInner withUseServerDefault(String useServerDefault * @return the redirectionState value. */ public String redirectionState() { - return this.innerProperties() == null ? null : this.innerProperties().redirectionState(); + return this.redirectionState; } /** @@ -191,10 +205,7 @@ public String redirectionState() { * @return the SqlPoolConnectionPolicyInner object itself. */ public SqlPoolConnectionPolicyInner withRedirectionState(String redirectionState) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolConnectionPolicyProperties(); - } - this.innerProperties().withRedirectionState(redirectionState); + this.redirectionState = redirectionState; return this; } @@ -204,7 +215,7 @@ public SqlPoolConnectionPolicyInner withRedirectionState(String redirectionState * @return the state value. */ public String state() { - return this.innerProperties() == null ? null : this.innerProperties().state(); + return this.state; } /** @@ -214,10 +225,7 @@ public String state() { * @return the SqlPoolConnectionPolicyInner object itself. */ public SqlPoolConnectionPolicyInner withState(String state) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolConnectionPolicyProperties(); - } - this.innerProperties().withState(state); + this.state = state; return this; } @@ -227,8 +235,5 @@ public SqlPoolConnectionPolicyInner withState(String state) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolConnectionPolicyProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolConnectionPolicyProperties.java deleted file mode 100644 index 961ea29033492..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolConnectionPolicyProperties.java +++ /dev/null @@ -1,206 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Properties of a Sql pool connection policy. */ -@Fluent -public final class SqlPoolConnectionPolicyProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlPoolConnectionPolicyProperties.class); - - /* - * The state of security access. - */ - @JsonProperty(value = "securityEnabledAccess") - private String securityEnabledAccess; - - /* - * The fully qualified host name of the auditing proxy. - */ - @JsonProperty(value = "proxyDnsName") - private String proxyDnsName; - - /* - * The port number of the auditing proxy. - */ - @JsonProperty(value = "proxyPort") - private String proxyPort; - - /* - * The visibility of the auditing proxy. - */ - @JsonProperty(value = "visibility") - private String visibility; - - /* - * Whether server default is enabled or disabled. - */ - @JsonProperty(value = "useServerDefault") - private String useServerDefault; - - /* - * The state of proxy redirection. - */ - @JsonProperty(value = "redirectionState") - private String redirectionState; - - /* - * The connection policy state. - */ - @JsonProperty(value = "state") - private String state; - - /** - * Get the securityEnabledAccess property: The state of security access. - * - * @return the securityEnabledAccess value. - */ - public String securityEnabledAccess() { - return this.securityEnabledAccess; - } - - /** - * Set the securityEnabledAccess property: The state of security access. - * - * @param securityEnabledAccess the securityEnabledAccess value to set. - * @return the SqlPoolConnectionPolicyProperties object itself. - */ - public SqlPoolConnectionPolicyProperties withSecurityEnabledAccess(String securityEnabledAccess) { - this.securityEnabledAccess = securityEnabledAccess; - return this; - } - - /** - * Get the proxyDnsName property: The fully qualified host name of the auditing proxy. - * - * @return the proxyDnsName value. - */ - public String proxyDnsName() { - return this.proxyDnsName; - } - - /** - * Set the proxyDnsName property: The fully qualified host name of the auditing proxy. - * - * @param proxyDnsName the proxyDnsName value to set. - * @return the SqlPoolConnectionPolicyProperties object itself. - */ - public SqlPoolConnectionPolicyProperties withProxyDnsName(String proxyDnsName) { - this.proxyDnsName = proxyDnsName; - return this; - } - - /** - * Get the proxyPort property: The port number of the auditing proxy. - * - * @return the proxyPort value. - */ - public String proxyPort() { - return this.proxyPort; - } - - /** - * Set the proxyPort property: The port number of the auditing proxy. - * - * @param proxyPort the proxyPort value to set. - * @return the SqlPoolConnectionPolicyProperties object itself. - */ - public SqlPoolConnectionPolicyProperties withProxyPort(String proxyPort) { - this.proxyPort = proxyPort; - return this; - } - - /** - * Get the visibility property: The visibility of the auditing proxy. - * - * @return the visibility value. - */ - public String visibility() { - return this.visibility; - } - - /** - * Set the visibility property: The visibility of the auditing proxy. - * - * @param visibility the visibility value to set. - * @return the SqlPoolConnectionPolicyProperties object itself. - */ - public SqlPoolConnectionPolicyProperties withVisibility(String visibility) { - this.visibility = visibility; - return this; - } - - /** - * Get the useServerDefault property: Whether server default is enabled or disabled. - * - * @return the useServerDefault value. - */ - public String useServerDefault() { - return this.useServerDefault; - } - - /** - * Set the useServerDefault property: Whether server default is enabled or disabled. - * - * @param useServerDefault the useServerDefault value to set. - * @return the SqlPoolConnectionPolicyProperties object itself. - */ - public SqlPoolConnectionPolicyProperties withUseServerDefault(String useServerDefault) { - this.useServerDefault = useServerDefault; - return this; - } - - /** - * Get the redirectionState property: The state of proxy redirection. - * - * @return the redirectionState value. - */ - public String redirectionState() { - return this.redirectionState; - } - - /** - * Set the redirectionState property: The state of proxy redirection. - * - * @param redirectionState the redirectionState value to set. - * @return the SqlPoolConnectionPolicyProperties object itself. - */ - public SqlPoolConnectionPolicyProperties withRedirectionState(String redirectionState) { - this.redirectionState = redirectionState; - return this; - } - - /** - * Get the state property: The connection policy state. - * - * @return the state value. - */ - public String state() { - return this.state; - } - - /** - * Set the state property: The connection policy state. - * - * @param state the state value to set. - * @return the SqlPoolConnectionPolicyProperties object itself. - */ - public SqlPoolConnectionPolicyProperties withState(String state) { - this.state = state; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolInner.java index 47d9f5ef548a1..41126b3c1a3cd 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.Resource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.Sku; @@ -15,8 +16,9 @@ import java.util.Map; /** SQL pool A SQL Analytics pool. */ +@JsonFlatten @Fluent -public final class SqlPoolInner extends Resource { +public class SqlPoolInner extends Resource { @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlPoolInner.class); /* @@ -26,10 +28,84 @@ public final class SqlPoolInner extends Resource { private Sku sku; /* - * SQL pool properties + * Maximum size in bytes */ - @JsonProperty(value = "properties") - private SqlPoolResourceProperties innerProperties; + @JsonProperty(value = "properties.maxSizeBytes") + private Long maxSizeBytes; + + /* + * Collation mode + */ + @JsonProperty(value = "properties.collation") + private String collation; + + /* + * Source database to create from + */ + @JsonProperty(value = "properties.sourceDatabaseId") + private String sourceDatabaseId; + + /* + * Backup database to restore from + */ + @JsonProperty(value = "properties.recoverableDatabaseId") + private String recoverableDatabaseId; + + /* + * Resource state + */ + @JsonProperty(value = "properties.provisioningState") + private String provisioningState; + + /* + * Resource status + */ + @JsonProperty(value = "properties.status") + private String status; + + /* + * Snapshot time to restore + */ + @JsonProperty(value = "properties.restorePointInTime") + private OffsetDateTime restorePointInTime; + + /* + * Specifies the mode of sqlpool creation. + * + * Default: regular sqlpool creation. + * + * PointInTimeRestore: Creates a sqlpool by restoring a point in time + * backup of an existing sqlpool. sourceDatabaseId must be specified as the + * resource ID of the existing sqlpool, and restorePointInTime must be + * specified. + * + * Recovery: Creates a sqlpool by a geo-replicated backup. sourceDatabaseId + * must be specified as the recoverableDatabaseId to restore. + * + * Restore: Creates a sqlpool by restoring a backup of a deleted sqlpool. + * SourceDatabaseId should be the sqlpool's original resource ID. + * SourceDatabaseId and sourceDatabaseDeletionDate must be specified. + */ + @JsonProperty(value = "properties.createMode") + private String createMode; + + /* + * Date the SQL pool was created + */ + @JsonProperty(value = "properties.creationDate") + private OffsetDateTime creationDate; + + /* + * The storage account type used to store backups for this sql pool. + */ + @JsonProperty(value = "properties.storageAccountType") + private StorageAccountType storageAccountType; + + /* + * Specifies the time that the sql pool was deleted + */ + @JsonProperty(value = "properties.sourceDatabaseDeletionDate") + private OffsetDateTime sourceDatabaseDeletionDate; /** * Get the sku property: Sku SQL pool SKU. @@ -51,36 +127,13 @@ public SqlPoolInner withSku(Sku sku) { return this; } - /** - * Get the innerProperties property: SQL pool properties. - * - * @return the innerProperties value. - */ - private SqlPoolResourceProperties innerProperties() { - return this.innerProperties; - } - - /** {@inheritDoc} */ - @Override - public SqlPoolInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public SqlPoolInner withTags(Map tags) { - super.withTags(tags); - return this; - } - /** * Get the maxSizeBytes property: Maximum size in bytes. * * @return the maxSizeBytes value. */ public Long maxSizeBytes() { - return this.innerProperties() == null ? null : this.innerProperties().maxSizeBytes(); + return this.maxSizeBytes; } /** @@ -90,10 +143,7 @@ public Long maxSizeBytes() { * @return the SqlPoolInner object itself. */ public SqlPoolInner withMaxSizeBytes(Long maxSizeBytes) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withMaxSizeBytes(maxSizeBytes); + this.maxSizeBytes = maxSizeBytes; return this; } @@ -103,7 +153,7 @@ public SqlPoolInner withMaxSizeBytes(Long maxSizeBytes) { * @return the collation value. */ public String collation() { - return this.innerProperties() == null ? null : this.innerProperties().collation(); + return this.collation; } /** @@ -113,10 +163,7 @@ public String collation() { * @return the SqlPoolInner object itself. */ public SqlPoolInner withCollation(String collation) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withCollation(collation); + this.collation = collation; return this; } @@ -126,7 +173,7 @@ public SqlPoolInner withCollation(String collation) { * @return the sourceDatabaseId value. */ public String sourceDatabaseId() { - return this.innerProperties() == null ? null : this.innerProperties().sourceDatabaseId(); + return this.sourceDatabaseId; } /** @@ -136,10 +183,7 @@ public String sourceDatabaseId() { * @return the SqlPoolInner object itself. */ public SqlPoolInner withSourceDatabaseId(String sourceDatabaseId) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withSourceDatabaseId(sourceDatabaseId); + this.sourceDatabaseId = sourceDatabaseId; return this; } @@ -149,7 +193,7 @@ public SqlPoolInner withSourceDatabaseId(String sourceDatabaseId) { * @return the recoverableDatabaseId value. */ public String recoverableDatabaseId() { - return this.innerProperties() == null ? null : this.innerProperties().recoverableDatabaseId(); + return this.recoverableDatabaseId; } /** @@ -159,10 +203,7 @@ public String recoverableDatabaseId() { * @return the SqlPoolInner object itself. */ public SqlPoolInner withRecoverableDatabaseId(String recoverableDatabaseId) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withRecoverableDatabaseId(recoverableDatabaseId); + this.recoverableDatabaseId = recoverableDatabaseId; return this; } @@ -172,7 +213,7 @@ public SqlPoolInner withRecoverableDatabaseId(String recoverableDatabaseId) { * @return the provisioningState value. */ public String provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + return this.provisioningState; } /** @@ -182,10 +223,7 @@ public String provisioningState() { * @return the SqlPoolInner object itself. */ public SqlPoolInner withProvisioningState(String provisioningState) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withProvisioningState(provisioningState); + this.provisioningState = provisioningState; return this; } @@ -195,7 +233,7 @@ public SqlPoolInner withProvisioningState(String provisioningState) { * @return the status value. */ public String status() { - return this.innerProperties() == null ? null : this.innerProperties().status(); + return this.status; } /** @@ -205,10 +243,7 @@ public String status() { * @return the SqlPoolInner object itself. */ public SqlPoolInner withStatus(String status) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withStatus(status); + this.status = status; return this; } @@ -218,7 +253,7 @@ public SqlPoolInner withStatus(String status) { * @return the restorePointInTime value. */ public OffsetDateTime restorePointInTime() { - return this.innerProperties() == null ? null : this.innerProperties().restorePointInTime(); + return this.restorePointInTime; } /** @@ -228,33 +263,51 @@ public OffsetDateTime restorePointInTime() { * @return the SqlPoolInner object itself. */ public SqlPoolInner withRestorePointInTime(OffsetDateTime restorePointInTime) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withRestorePointInTime(restorePointInTime); + this.restorePointInTime = restorePointInTime; return this; } /** - * Get the createMode property: What is this?. + * Get the createMode property: Specifies the mode of sqlpool creation. + * + *

Default: regular sqlpool creation. + * + *

PointInTimeRestore: Creates a sqlpool by restoring a point in time backup of an existing sqlpool. + * sourceDatabaseId must be specified as the resource ID of the existing sqlpool, and restorePointInTime must be + * specified. + * + *

Recovery: Creates a sqlpool by a geo-replicated backup. sourceDatabaseId must be specified as the + * recoverableDatabaseId to restore. + * + *

Restore: Creates a sqlpool by restoring a backup of a deleted sqlpool. SourceDatabaseId should be the + * sqlpool's original resource ID. SourceDatabaseId and sourceDatabaseDeletionDate must be specified. * * @return the createMode value. */ public String createMode() { - return this.innerProperties() == null ? null : this.innerProperties().createMode(); + return this.createMode; } /** - * Set the createMode property: What is this?. + * Set the createMode property: Specifies the mode of sqlpool creation. + * + *

Default: regular sqlpool creation. + * + *

PointInTimeRestore: Creates a sqlpool by restoring a point in time backup of an existing sqlpool. + * sourceDatabaseId must be specified as the resource ID of the existing sqlpool, and restorePointInTime must be + * specified. + * + *

Recovery: Creates a sqlpool by a geo-replicated backup. sourceDatabaseId must be specified as the + * recoverableDatabaseId to restore. + * + *

Restore: Creates a sqlpool by restoring a backup of a deleted sqlpool. SourceDatabaseId should be the + * sqlpool's original resource ID. SourceDatabaseId and sourceDatabaseDeletionDate must be specified. * * @param createMode the createMode value to set. * @return the SqlPoolInner object itself. */ public SqlPoolInner withCreateMode(String createMode) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withCreateMode(createMode); + this.createMode = createMode; return this; } @@ -264,7 +317,7 @@ public SqlPoolInner withCreateMode(String createMode) { * @return the creationDate value. */ public OffsetDateTime creationDate() { - return this.innerProperties() == null ? null : this.innerProperties().creationDate(); + return this.creationDate; } /** @@ -274,10 +327,7 @@ public OffsetDateTime creationDate() { * @return the SqlPoolInner object itself. */ public SqlPoolInner withCreationDate(OffsetDateTime creationDate) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withCreationDate(creationDate); + this.creationDate = creationDate; return this; } @@ -287,7 +337,7 @@ public SqlPoolInner withCreationDate(OffsetDateTime creationDate) { * @return the storageAccountType value. */ public StorageAccountType storageAccountType() { - return this.innerProperties() == null ? null : this.innerProperties().storageAccountType(); + return this.storageAccountType; } /** @@ -297,10 +347,7 @@ public StorageAccountType storageAccountType() { * @return the SqlPoolInner object itself. */ public SqlPoolInner withStorageAccountType(StorageAccountType storageAccountType) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withStorageAccountType(storageAccountType); + this.storageAccountType = storageAccountType; return this; } @@ -310,7 +357,7 @@ public SqlPoolInner withStorageAccountType(StorageAccountType storageAccountType * @return the sourceDatabaseDeletionDate value. */ public OffsetDateTime sourceDatabaseDeletionDate() { - return this.innerProperties() == null ? null : this.innerProperties().sourceDatabaseDeletionDate(); + return this.sourceDatabaseDeletionDate; } /** @@ -320,10 +367,21 @@ public OffsetDateTime sourceDatabaseDeletionDate() { * @return the SqlPoolInner object itself. */ public SqlPoolInner withSourceDatabaseDeletionDate(OffsetDateTime sourceDatabaseDeletionDate) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withSourceDatabaseDeletionDate(sourceDatabaseDeletionDate); + this.sourceDatabaseDeletionDate = sourceDatabaseDeletionDate; + return this; + } + + /** {@inheritDoc} */ + @Override + public SqlPoolInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public SqlPoolInner withTags(Map tags) { + super.withTags(tags); return this; } @@ -336,8 +394,5 @@ public void validate() { if (sku() != null) { sku().validate(); } - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolOperationInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolOperationInner.java index 5272b22a0aafb..e585596b33806 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolOperationInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolOperationInner.java @@ -4,7 +4,8 @@ package com.azure.resourcemanager.synapse.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.ManagementOperationState; @@ -13,24 +14,94 @@ import java.time.OffsetDateTime; /** A Sql pool operation. */ -@Fluent -public final class SqlPoolOperationInner extends ProxyResource { +@JsonFlatten +@Immutable +public class SqlPoolOperationInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlPoolOperationInner.class); /* - * Resource properties. + * The name of the Sql pool the operation is being performed on. */ - @JsonProperty(value = "properties") - private SqlPoolOperationProperties innerProperties; + @JsonProperty(value = "properties.databaseName", access = JsonProperty.Access.WRITE_ONLY) + private String databaseName; - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. + /* + * The name of operation. */ - private SqlPoolOperationProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.operation", access = JsonProperty.Access.WRITE_ONLY) + private String operation; + + /* + * The friendly name of operation. + */ + @JsonProperty(value = "properties.operationFriendlyName", access = JsonProperty.Access.WRITE_ONLY) + private String operationFriendlyName; + + /* + * The percentage of the operation completed. + */ + @JsonProperty(value = "properties.percentComplete", access = JsonProperty.Access.WRITE_ONLY) + private Integer percentComplete; + + /* + * The name of the server. + */ + @JsonProperty(value = "properties.serverName", access = JsonProperty.Access.WRITE_ONLY) + private String serverName; + + /* + * The operation start time. + */ + @JsonProperty(value = "properties.startTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime startTime; + + /* + * The operation state. + */ + @JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY) + private ManagementOperationState state; + + /* + * The operation error code. + */ + @JsonProperty(value = "properties.errorCode", access = JsonProperty.Access.WRITE_ONLY) + private Integer errorCode; + + /* + * The operation error description. + */ + @JsonProperty(value = "properties.errorDescription", access = JsonProperty.Access.WRITE_ONLY) + private String errorDescription; + + /* + * The operation error severity. + */ + @JsonProperty(value = "properties.errorSeverity", access = JsonProperty.Access.WRITE_ONLY) + private Integer errorSeverity; + + /* + * Whether or not the error is a user error. + */ + @JsonProperty(value = "properties.isUserError", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isUserError; + + /* + * The estimated completion time of the operation. + */ + @JsonProperty(value = "properties.estimatedCompletionTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime estimatedCompletionTime; + + /* + * The operation description. + */ + @JsonProperty(value = "properties.description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /* + * Whether the operation can be cancelled. + */ + @JsonProperty(value = "properties.isCancellable", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isCancellable; /** * Get the databaseName property: The name of the Sql pool the operation is being performed on. @@ -38,7 +109,7 @@ private SqlPoolOperationProperties innerProperties() { * @return the databaseName value. */ public String databaseName() { - return this.innerProperties() == null ? null : this.innerProperties().databaseName(); + return this.databaseName; } /** @@ -47,7 +118,7 @@ public String databaseName() { * @return the operation value. */ public String operation() { - return this.innerProperties() == null ? null : this.innerProperties().operation(); + return this.operation; } /** @@ -56,7 +127,7 @@ public String operation() { * @return the operationFriendlyName value. */ public String operationFriendlyName() { - return this.innerProperties() == null ? null : this.innerProperties().operationFriendlyName(); + return this.operationFriendlyName; } /** @@ -65,7 +136,7 @@ public String operationFriendlyName() { * @return the percentComplete value. */ public Integer percentComplete() { - return this.innerProperties() == null ? null : this.innerProperties().percentComplete(); + return this.percentComplete; } /** @@ -74,7 +145,7 @@ public Integer percentComplete() { * @return the serverName value. */ public String serverName() { - return this.innerProperties() == null ? null : this.innerProperties().serverName(); + return this.serverName; } /** @@ -83,7 +154,7 @@ public String serverName() { * @return the startTime value. */ public OffsetDateTime startTime() { - return this.innerProperties() == null ? null : this.innerProperties().startTime(); + return this.startTime; } /** @@ -92,7 +163,7 @@ public OffsetDateTime startTime() { * @return the state value. */ public ManagementOperationState state() { - return this.innerProperties() == null ? null : this.innerProperties().state(); + return this.state; } /** @@ -101,7 +172,7 @@ public ManagementOperationState state() { * @return the errorCode value. */ public Integer errorCode() { - return this.innerProperties() == null ? null : this.innerProperties().errorCode(); + return this.errorCode; } /** @@ -110,7 +181,7 @@ public Integer errorCode() { * @return the errorDescription value. */ public String errorDescription() { - return this.innerProperties() == null ? null : this.innerProperties().errorDescription(); + return this.errorDescription; } /** @@ -119,7 +190,7 @@ public String errorDescription() { * @return the errorSeverity value. */ public Integer errorSeverity() { - return this.innerProperties() == null ? null : this.innerProperties().errorSeverity(); + return this.errorSeverity; } /** @@ -128,7 +199,7 @@ public Integer errorSeverity() { * @return the isUserError value. */ public Boolean isUserError() { - return this.innerProperties() == null ? null : this.innerProperties().isUserError(); + return this.isUserError; } /** @@ -137,7 +208,7 @@ public Boolean isUserError() { * @return the estimatedCompletionTime value. */ public OffsetDateTime estimatedCompletionTime() { - return this.innerProperties() == null ? null : this.innerProperties().estimatedCompletionTime(); + return this.estimatedCompletionTime; } /** @@ -146,7 +217,7 @@ public OffsetDateTime estimatedCompletionTime() { * @return the description value. */ public String description() { - return this.innerProperties() == null ? null : this.innerProperties().description(); + return this.description; } /** @@ -155,7 +226,7 @@ public String description() { * @return the isCancellable value. */ public Boolean isCancellable() { - return this.innerProperties() == null ? null : this.innerProperties().isCancellable(); + return this.isCancellable; } /** @@ -164,8 +235,5 @@ public Boolean isCancellable() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolOperationProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolOperationProperties.java deleted file mode 100644 index c0d874e0b45dd..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolOperationProperties.java +++ /dev/null @@ -1,236 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.ManagementOperationState; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** The properties of a Sql pool operation. */ -@Immutable -public final class SqlPoolOperationProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlPoolOperationProperties.class); - - /* - * The name of the Sql pool the operation is being performed on. - */ - @JsonProperty(value = "databaseName", access = JsonProperty.Access.WRITE_ONLY) - private String databaseName; - - /* - * The name of operation. - */ - @JsonProperty(value = "operation", access = JsonProperty.Access.WRITE_ONLY) - private String operation; - - /* - * The friendly name of operation. - */ - @JsonProperty(value = "operationFriendlyName", access = JsonProperty.Access.WRITE_ONLY) - private String operationFriendlyName; - - /* - * The percentage of the operation completed. - */ - @JsonProperty(value = "percentComplete", access = JsonProperty.Access.WRITE_ONLY) - private Integer percentComplete; - - /* - * The name of the server. - */ - @JsonProperty(value = "serverName", access = JsonProperty.Access.WRITE_ONLY) - private String serverName; - - /* - * The operation start time. - */ - @JsonProperty(value = "startTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime startTime; - - /* - * The operation state. - */ - @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) - private ManagementOperationState state; - - /* - * The operation error code. - */ - @JsonProperty(value = "errorCode", access = JsonProperty.Access.WRITE_ONLY) - private Integer errorCode; - - /* - * The operation error description. - */ - @JsonProperty(value = "errorDescription", access = JsonProperty.Access.WRITE_ONLY) - private String errorDescription; - - /* - * The operation error severity. - */ - @JsonProperty(value = "errorSeverity", access = JsonProperty.Access.WRITE_ONLY) - private Integer errorSeverity; - - /* - * Whether or not the error is a user error. - */ - @JsonProperty(value = "isUserError", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isUserError; - - /* - * The estimated completion time of the operation. - */ - @JsonProperty(value = "estimatedCompletionTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime estimatedCompletionTime; - - /* - * The operation description. - */ - @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) - private String description; - - /* - * Whether the operation can be cancelled. - */ - @JsonProperty(value = "isCancellable", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isCancellable; - - /** - * Get the databaseName property: The name of the Sql pool the operation is being performed on. - * - * @return the databaseName value. - */ - public String databaseName() { - return this.databaseName; - } - - /** - * Get the operation property: The name of operation. - * - * @return the operation value. - */ - public String operation() { - return this.operation; - } - - /** - * Get the operationFriendlyName property: The friendly name of operation. - * - * @return the operationFriendlyName value. - */ - public String operationFriendlyName() { - return this.operationFriendlyName; - } - - /** - * Get the percentComplete property: The percentage of the operation completed. - * - * @return the percentComplete value. - */ - public Integer percentComplete() { - return this.percentComplete; - } - - /** - * Get the serverName property: The name of the server. - * - * @return the serverName value. - */ - public String serverName() { - return this.serverName; - } - - /** - * Get the startTime property: The operation start time. - * - * @return the startTime value. - */ - public OffsetDateTime startTime() { - return this.startTime; - } - - /** - * Get the state property: The operation state. - * - * @return the state value. - */ - public ManagementOperationState state() { - return this.state; - } - - /** - * Get the errorCode property: The operation error code. - * - * @return the errorCode value. - */ - public Integer errorCode() { - return this.errorCode; - } - - /** - * Get the errorDescription property: The operation error description. - * - * @return the errorDescription value. - */ - public String errorDescription() { - return this.errorDescription; - } - - /** - * Get the errorSeverity property: The operation error severity. - * - * @return the errorSeverity value. - */ - public Integer errorSeverity() { - return this.errorSeverity; - } - - /** - * Get the isUserError property: Whether or not the error is a user error. - * - * @return the isUserError value. - */ - public Boolean isUserError() { - return this.isUserError; - } - - /** - * Get the estimatedCompletionTime property: The estimated completion time of the operation. - * - * @return the estimatedCompletionTime value. - */ - public OffsetDateTime estimatedCompletionTime() { - return this.estimatedCompletionTime; - } - - /** - * Get the description property: The operation description. - * - * @return the description value. - */ - public String description() { - return this.description; - } - - /** - * Get the isCancellable property: Whether the operation can be cancelled. - * - * @return the isCancellable value. - */ - public Boolean isCancellable() { - return this.isCancellable; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolResourceProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolResourceProperties.java deleted file mode 100644 index c04bc2ed548ac..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolResourceProperties.java +++ /dev/null @@ -1,312 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.StorageAccountType; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; - -/** SQL pool properties Properties of a SQL Analytics pool. */ -@Fluent -public final class SqlPoolResourceProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlPoolResourceProperties.class); - - /* - * Maximum size in bytes - */ - @JsonProperty(value = "maxSizeBytes") - private Long maxSizeBytes; - - /* - * Collation mode - */ - @JsonProperty(value = "collation") - private String collation; - - /* - * Source database to create from - */ - @JsonProperty(value = "sourceDatabaseId") - private String sourceDatabaseId; - - /* - * Backup database to restore from - */ - @JsonProperty(value = "recoverableDatabaseId") - private String recoverableDatabaseId; - - /* - * Resource state - */ - @JsonProperty(value = "provisioningState") - private String provisioningState; - - /* - * Resource status - */ - @JsonProperty(value = "status") - private String status; - - /* - * Snapshot time to restore - */ - @JsonProperty(value = "restorePointInTime") - private OffsetDateTime restorePointInTime; - - /* - * What is this? - */ - @JsonProperty(value = "createMode") - private String createMode; - - /* - * Date the SQL pool was created - */ - @JsonProperty(value = "creationDate") - private OffsetDateTime creationDate; - - /* - * The storage account type used to store backups for this sql pool. - */ - @JsonProperty(value = "storageAccountType") - private StorageAccountType storageAccountType; - - /* - * Specifies the time that the sql pool was deleted - */ - @JsonProperty(value = "sourceDatabaseDeletionDate") - private OffsetDateTime sourceDatabaseDeletionDate; - - /** - * Get the maxSizeBytes property: Maximum size in bytes. - * - * @return the maxSizeBytes value. - */ - public Long maxSizeBytes() { - return this.maxSizeBytes; - } - - /** - * Set the maxSizeBytes property: Maximum size in bytes. - * - * @param maxSizeBytes the maxSizeBytes value to set. - * @return the SqlPoolResourceProperties object itself. - */ - public SqlPoolResourceProperties withMaxSizeBytes(Long maxSizeBytes) { - this.maxSizeBytes = maxSizeBytes; - return this; - } - - /** - * Get the collation property: Collation mode. - * - * @return the collation value. - */ - public String collation() { - return this.collation; - } - - /** - * Set the collation property: Collation mode. - * - * @param collation the collation value to set. - * @return the SqlPoolResourceProperties object itself. - */ - public SqlPoolResourceProperties withCollation(String collation) { - this.collation = collation; - return this; - } - - /** - * Get the sourceDatabaseId property: Source database to create from. - * - * @return the sourceDatabaseId value. - */ - public String sourceDatabaseId() { - return this.sourceDatabaseId; - } - - /** - * Set the sourceDatabaseId property: Source database to create from. - * - * @param sourceDatabaseId the sourceDatabaseId value to set. - * @return the SqlPoolResourceProperties object itself. - */ - public SqlPoolResourceProperties withSourceDatabaseId(String sourceDatabaseId) { - this.sourceDatabaseId = sourceDatabaseId; - return this; - } - - /** - * Get the recoverableDatabaseId property: Backup database to restore from. - * - * @return the recoverableDatabaseId value. - */ - public String recoverableDatabaseId() { - return this.recoverableDatabaseId; - } - - /** - * Set the recoverableDatabaseId property: Backup database to restore from. - * - * @param recoverableDatabaseId the recoverableDatabaseId value to set. - * @return the SqlPoolResourceProperties object itself. - */ - public SqlPoolResourceProperties withRecoverableDatabaseId(String recoverableDatabaseId) { - this.recoverableDatabaseId = recoverableDatabaseId; - return this; - } - - /** - * Get the provisioningState property: Resource state. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Set the provisioningState property: Resource state. - * - * @param provisioningState the provisioningState value to set. - * @return the SqlPoolResourceProperties object itself. - */ - public SqlPoolResourceProperties withProvisioningState(String provisioningState) { - this.provisioningState = provisioningState; - return this; - } - - /** - * Get the status property: Resource status. - * - * @return the status value. - */ - public String status() { - return this.status; - } - - /** - * Set the status property: Resource status. - * - * @param status the status value to set. - * @return the SqlPoolResourceProperties object itself. - */ - public SqlPoolResourceProperties withStatus(String status) { - this.status = status; - return this; - } - - /** - * Get the restorePointInTime property: Snapshot time to restore. - * - * @return the restorePointInTime value. - */ - public OffsetDateTime restorePointInTime() { - return this.restorePointInTime; - } - - /** - * Set the restorePointInTime property: Snapshot time to restore. - * - * @param restorePointInTime the restorePointInTime value to set. - * @return the SqlPoolResourceProperties object itself. - */ - public SqlPoolResourceProperties withRestorePointInTime(OffsetDateTime restorePointInTime) { - this.restorePointInTime = restorePointInTime; - return this; - } - - /** - * Get the createMode property: What is this?. - * - * @return the createMode value. - */ - public String createMode() { - return this.createMode; - } - - /** - * Set the createMode property: What is this?. - * - * @param createMode the createMode value to set. - * @return the SqlPoolResourceProperties object itself. - */ - public SqlPoolResourceProperties withCreateMode(String createMode) { - this.createMode = createMode; - return this; - } - - /** - * Get the creationDate property: Date the SQL pool was created. - * - * @return the creationDate value. - */ - public OffsetDateTime creationDate() { - return this.creationDate; - } - - /** - * Set the creationDate property: Date the SQL pool was created. - * - * @param creationDate the creationDate value to set. - * @return the SqlPoolResourceProperties object itself. - */ - public SqlPoolResourceProperties withCreationDate(OffsetDateTime creationDate) { - this.creationDate = creationDate; - return this; - } - - /** - * Get the storageAccountType property: The storage account type used to store backups for this sql pool. - * - * @return the storageAccountType value. - */ - public StorageAccountType storageAccountType() { - return this.storageAccountType; - } - - /** - * Set the storageAccountType property: The storage account type used to store backups for this sql pool. - * - * @param storageAccountType the storageAccountType value to set. - * @return the SqlPoolResourceProperties object itself. - */ - public SqlPoolResourceProperties withStorageAccountType(StorageAccountType storageAccountType) { - this.storageAccountType = storageAccountType; - return this; - } - - /** - * Get the sourceDatabaseDeletionDate property: Specifies the time that the sql pool was deleted. - * - * @return the sourceDatabaseDeletionDate value. - */ - public OffsetDateTime sourceDatabaseDeletionDate() { - return this.sourceDatabaseDeletionDate; - } - - /** - * Set the sourceDatabaseDeletionDate property: Specifies the time that the sql pool was deleted. - * - * @param sourceDatabaseDeletionDate the sourceDatabaseDeletionDate value to set. - * @return the SqlPoolResourceProperties object itself. - */ - public SqlPoolResourceProperties withSourceDatabaseDeletionDate(OffsetDateTime sourceDatabaseDeletionDate) { - this.sourceDatabaseDeletionDate = sourceDatabaseDeletionDate; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolSecurityAlertPolicyInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolSecurityAlertPolicyInner.java index 8d65a714d10cf..26d8f63e1b38b 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolSecurityAlertPolicyInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolSecurityAlertPolicyInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.SecurityAlertPolicyState; @@ -14,24 +15,64 @@ import java.util.List; /** A Sql pool security alert policy. */ +@JsonFlatten @Fluent -public final class SqlPoolSecurityAlertPolicyInner extends ProxyResource { +public class SqlPoolSecurityAlertPolicyInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlPoolSecurityAlertPolicyInner.class); /* - * Resource properties. + * Specifies the state of the policy, whether it is enabled or disabled or + * a policy has not been applied yet on the specific Sql pool. */ - @JsonProperty(value = "properties") - private SecurityAlertPolicyProperties innerProperties; + @JsonProperty(value = "properties.state") + private SecurityAlertPolicyState state; - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. + /* + * Specifies an array of alerts that are disabled. Allowed values are: + * Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, + * Data_Exfiltration, Unsafe_Action */ - private SecurityAlertPolicyProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.disabledAlerts") + private List disabledAlerts; + + /* + * Specifies an array of e-mail addresses to which the alert is sent. + */ + @JsonProperty(value = "properties.emailAddresses") + private List emailAddresses; + + /* + * Specifies that the alert is sent to the account administrators. + */ + @JsonProperty(value = "properties.emailAccountAdmins") + private Boolean emailAccountAdmins; + + /* + * Specifies the blob storage endpoint (e.g. + * https://MyAccount.blob.core.windows.net). This blob storage will hold + * all Threat Detection audit logs. + */ + @JsonProperty(value = "properties.storageEndpoint") + private String storageEndpoint; + + /* + * Specifies the identifier key of the Threat Detection audit storage + * account. + */ + @JsonProperty(value = "properties.storageAccountAccessKey") + private String storageAccountAccessKey; + + /* + * Specifies the number of days to keep in the Threat Detection audit logs. + */ + @JsonProperty(value = "properties.retentionDays") + private Integer retentionDays; + + /* + * Specifies the UTC creation time of the policy. + */ + @JsonProperty(value = "properties.creationTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime creationTime; /** * Get the state property: Specifies the state of the policy, whether it is enabled or disabled or a policy has not @@ -40,7 +81,7 @@ private SecurityAlertPolicyProperties innerProperties() { * @return the state value. */ public SecurityAlertPolicyState state() { - return this.innerProperties() == null ? null : this.innerProperties().state(); + return this.state; } /** @@ -51,10 +92,7 @@ public SecurityAlertPolicyState state() { * @return the SqlPoolSecurityAlertPolicyInner object itself. */ public SqlPoolSecurityAlertPolicyInner withState(SecurityAlertPolicyState state) { - if (this.innerProperties() == null) { - this.innerProperties = new SecurityAlertPolicyProperties(); - } - this.innerProperties().withState(state); + this.state = state; return this; } @@ -65,7 +103,7 @@ public SqlPoolSecurityAlertPolicyInner withState(SecurityAlertPolicyState state) * @return the disabledAlerts value. */ public List disabledAlerts() { - return this.innerProperties() == null ? null : this.innerProperties().disabledAlerts(); + return this.disabledAlerts; } /** @@ -76,10 +114,7 @@ public List disabledAlerts() { * @return the SqlPoolSecurityAlertPolicyInner object itself. */ public SqlPoolSecurityAlertPolicyInner withDisabledAlerts(List disabledAlerts) { - if (this.innerProperties() == null) { - this.innerProperties = new SecurityAlertPolicyProperties(); - } - this.innerProperties().withDisabledAlerts(disabledAlerts); + this.disabledAlerts = disabledAlerts; return this; } @@ -89,7 +124,7 @@ public SqlPoolSecurityAlertPolicyInner withDisabledAlerts(List disabledA * @return the emailAddresses value. */ public List emailAddresses() { - return this.innerProperties() == null ? null : this.innerProperties().emailAddresses(); + return this.emailAddresses; } /** @@ -99,10 +134,7 @@ public List emailAddresses() { * @return the SqlPoolSecurityAlertPolicyInner object itself. */ public SqlPoolSecurityAlertPolicyInner withEmailAddresses(List emailAddresses) { - if (this.innerProperties() == null) { - this.innerProperties = new SecurityAlertPolicyProperties(); - } - this.innerProperties().withEmailAddresses(emailAddresses); + this.emailAddresses = emailAddresses; return this; } @@ -112,7 +144,7 @@ public SqlPoolSecurityAlertPolicyInner withEmailAddresses(List emailAddr * @return the emailAccountAdmins value. */ public Boolean emailAccountAdmins() { - return this.innerProperties() == null ? null : this.innerProperties().emailAccountAdmins(); + return this.emailAccountAdmins; } /** @@ -122,10 +154,7 @@ public Boolean emailAccountAdmins() { * @return the SqlPoolSecurityAlertPolicyInner object itself. */ public SqlPoolSecurityAlertPolicyInner withEmailAccountAdmins(Boolean emailAccountAdmins) { - if (this.innerProperties() == null) { - this.innerProperties = new SecurityAlertPolicyProperties(); - } - this.innerProperties().withEmailAccountAdmins(emailAccountAdmins); + this.emailAccountAdmins = emailAccountAdmins; return this; } @@ -136,7 +165,7 @@ public SqlPoolSecurityAlertPolicyInner withEmailAccountAdmins(Boolean emailAccou * @return the storageEndpoint value. */ public String storageEndpoint() { - return this.innerProperties() == null ? null : this.innerProperties().storageEndpoint(); + return this.storageEndpoint; } /** @@ -147,10 +176,7 @@ public String storageEndpoint() { * @return the SqlPoolSecurityAlertPolicyInner object itself. */ public SqlPoolSecurityAlertPolicyInner withStorageEndpoint(String storageEndpoint) { - if (this.innerProperties() == null) { - this.innerProperties = new SecurityAlertPolicyProperties(); - } - this.innerProperties().withStorageEndpoint(storageEndpoint); + this.storageEndpoint = storageEndpoint; return this; } @@ -161,7 +187,7 @@ public SqlPoolSecurityAlertPolicyInner withStorageEndpoint(String storageEndpoin * @return the storageAccountAccessKey value. */ public String storageAccountAccessKey() { - return this.innerProperties() == null ? null : this.innerProperties().storageAccountAccessKey(); + return this.storageAccountAccessKey; } /** @@ -172,10 +198,7 @@ public String storageAccountAccessKey() { * @return the SqlPoolSecurityAlertPolicyInner object itself. */ public SqlPoolSecurityAlertPolicyInner withStorageAccountAccessKey(String storageAccountAccessKey) { - if (this.innerProperties() == null) { - this.innerProperties = new SecurityAlertPolicyProperties(); - } - this.innerProperties().withStorageAccountAccessKey(storageAccountAccessKey); + this.storageAccountAccessKey = storageAccountAccessKey; return this; } @@ -185,7 +208,7 @@ public SqlPoolSecurityAlertPolicyInner withStorageAccountAccessKey(String storag * @return the retentionDays value. */ public Integer retentionDays() { - return this.innerProperties() == null ? null : this.innerProperties().retentionDays(); + return this.retentionDays; } /** @@ -195,10 +218,7 @@ public Integer retentionDays() { * @return the SqlPoolSecurityAlertPolicyInner object itself. */ public SqlPoolSecurityAlertPolicyInner withRetentionDays(Integer retentionDays) { - if (this.innerProperties() == null) { - this.innerProperties = new SecurityAlertPolicyProperties(); - } - this.innerProperties().withRetentionDays(retentionDays); + this.retentionDays = retentionDays; return this; } @@ -208,7 +228,7 @@ public SqlPoolSecurityAlertPolicyInner withRetentionDays(Integer retentionDays) * @return the creationTime value. */ public OffsetDateTime creationTime() { - return this.innerProperties() == null ? null : this.innerProperties().creationTime(); + return this.creationTime; } /** @@ -217,8 +237,5 @@ public OffsetDateTime creationTime() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentInner.java index a8f7182c754b1..f2d62658833a1 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentRecurringScansProperties; @@ -12,24 +13,41 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** A Sql pool vulnerability assessment. */ +@JsonFlatten @Fluent -public final class SqlPoolVulnerabilityAssessmentInner extends ProxyResource { +public class SqlPoolVulnerabilityAssessmentInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlPoolVulnerabilityAssessmentInner.class); /* - * Resource properties. + * A blob storage container path to hold the scan results (e.g. + * https://myStorage.blob.core.windows.net/VaScans/). It is required if + * server level vulnerability assessment policy doesn't set */ - @JsonProperty(value = "properties") - private SqlPoolVulnerabilityAssessmentProperties innerProperties; + @JsonProperty(value = "properties.storageContainerPath") + private String storageContainerPath; - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. + /* + * A shared access signature (SAS Key) that has write access to the blob + * container specified in 'storageContainerPath' parameter. If + * 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is + * required. */ - private SqlPoolVulnerabilityAssessmentProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.storageContainerSasKey") + private String storageContainerSasKey; + + /* + * Specifies the identifier key of the storage account for vulnerability + * assessment scan results. If 'StorageContainerSasKey' isn't specified, + * storageAccountAccessKey is required. + */ + @JsonProperty(value = "properties.storageAccountAccessKey") + private String storageAccountAccessKey; + + /* + * The recurring scans settings + */ + @JsonProperty(value = "properties.recurringScans") + private VulnerabilityAssessmentRecurringScansProperties recurringScans; /** * Get the storageContainerPath property: A blob storage container path to hold the scan results (e.g. @@ -39,7 +57,7 @@ private SqlPoolVulnerabilityAssessmentProperties innerProperties() { * @return the storageContainerPath value. */ public String storageContainerPath() { - return this.innerProperties() == null ? null : this.innerProperties().storageContainerPath(); + return this.storageContainerPath; } /** @@ -51,10 +69,7 @@ public String storageContainerPath() { * @return the SqlPoolVulnerabilityAssessmentInner object itself. */ public SqlPoolVulnerabilityAssessmentInner withStorageContainerPath(String storageContainerPath) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolVulnerabilityAssessmentProperties(); - } - this.innerProperties().withStorageContainerPath(storageContainerPath); + this.storageContainerPath = storageContainerPath; return this; } @@ -66,7 +81,7 @@ public SqlPoolVulnerabilityAssessmentInner withStorageContainerPath(String stora * @return the storageContainerSasKey value. */ public String storageContainerSasKey() { - return this.innerProperties() == null ? null : this.innerProperties().storageContainerSasKey(); + return this.storageContainerSasKey; } /** @@ -78,10 +93,7 @@ public String storageContainerSasKey() { * @return the SqlPoolVulnerabilityAssessmentInner object itself. */ public SqlPoolVulnerabilityAssessmentInner withStorageContainerSasKey(String storageContainerSasKey) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolVulnerabilityAssessmentProperties(); - } - this.innerProperties().withStorageContainerSasKey(storageContainerSasKey); + this.storageContainerSasKey = storageContainerSasKey; return this; } @@ -92,7 +104,7 @@ public SqlPoolVulnerabilityAssessmentInner withStorageContainerSasKey(String sto * @return the storageAccountAccessKey value. */ public String storageAccountAccessKey() { - return this.innerProperties() == null ? null : this.innerProperties().storageAccountAccessKey(); + return this.storageAccountAccessKey; } /** @@ -103,10 +115,7 @@ public String storageAccountAccessKey() { * @return the SqlPoolVulnerabilityAssessmentInner object itself. */ public SqlPoolVulnerabilityAssessmentInner withStorageAccountAccessKey(String storageAccountAccessKey) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolVulnerabilityAssessmentProperties(); - } - this.innerProperties().withStorageAccountAccessKey(storageAccountAccessKey); + this.storageAccountAccessKey = storageAccountAccessKey; return this; } @@ -116,7 +125,7 @@ public SqlPoolVulnerabilityAssessmentInner withStorageAccountAccessKey(String st * @return the recurringScans value. */ public VulnerabilityAssessmentRecurringScansProperties recurringScans() { - return this.innerProperties() == null ? null : this.innerProperties().recurringScans(); + return this.recurringScans; } /** @@ -127,10 +136,7 @@ public VulnerabilityAssessmentRecurringScansProperties recurringScans() { */ public SqlPoolVulnerabilityAssessmentInner withRecurringScans( VulnerabilityAssessmentRecurringScansProperties recurringScans) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolVulnerabilityAssessmentProperties(); - } - this.innerProperties().withRecurringScans(recurringScans); + this.recurringScans = recurringScans; return this; } @@ -140,8 +146,8 @@ public SqlPoolVulnerabilityAssessmentInner withRecurringScans( * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (recurringScans() != null) { + recurringScans().validate(); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentProperties.java deleted file mode 100644 index cdc9645d9a6b8..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentProperties.java +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentRecurringScansProperties; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Properties of a Sql pool Vulnerability Assessment. */ -@Fluent -public final class SqlPoolVulnerabilityAssessmentProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlPoolVulnerabilityAssessmentProperties.class); - - /* - * A blob storage container path to hold the scan results (e.g. - * https://myStorage.blob.core.windows.net/VaScans/). It is required if - * server level vulnerability assessment policy doesn't set - */ - @JsonProperty(value = "storageContainerPath") - private String storageContainerPath; - - /* - * A shared access signature (SAS Key) that has write access to the blob - * container specified in 'storageContainerPath' parameter. If - * 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is - * required. - */ - @JsonProperty(value = "storageContainerSasKey") - private String storageContainerSasKey; - - /* - * Specifies the identifier key of the storage account for vulnerability - * assessment scan results. If 'StorageContainerSasKey' isn't specified, - * storageAccountAccessKey is required. - */ - @JsonProperty(value = "storageAccountAccessKey") - private String storageAccountAccessKey; - - /* - * The recurring scans settings - */ - @JsonProperty(value = "recurringScans") - private VulnerabilityAssessmentRecurringScansProperties recurringScans; - - /** - * Get the storageContainerPath property: A blob storage container path to hold the scan results (e.g. - * https://myStorage.blob.core.windows.net/VaScans/). It is required if server level vulnerability assessment policy - * doesn't set. - * - * @return the storageContainerPath value. - */ - public String storageContainerPath() { - return this.storageContainerPath; - } - - /** - * Set the storageContainerPath property: A blob storage container path to hold the scan results (e.g. - * https://myStorage.blob.core.windows.net/VaScans/). It is required if server level vulnerability assessment policy - * doesn't set. - * - * @param storageContainerPath the storageContainerPath value to set. - * @return the SqlPoolVulnerabilityAssessmentProperties object itself. - */ - public SqlPoolVulnerabilityAssessmentProperties withStorageContainerPath(String storageContainerPath) { - this.storageContainerPath = storageContainerPath; - return this; - } - - /** - * Get the storageContainerSasKey property: A shared access signature (SAS Key) that has write access to the blob - * container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, - * StorageContainerSasKey is required. - * - * @return the storageContainerSasKey value. - */ - public String storageContainerSasKey() { - return this.storageContainerSasKey; - } - - /** - * Set the storageContainerSasKey property: A shared access signature (SAS Key) that has write access to the blob - * container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, - * StorageContainerSasKey is required. - * - * @param storageContainerSasKey the storageContainerSasKey value to set. - * @return the SqlPoolVulnerabilityAssessmentProperties object itself. - */ - public SqlPoolVulnerabilityAssessmentProperties withStorageContainerSasKey(String storageContainerSasKey) { - this.storageContainerSasKey = storageContainerSasKey; - return this; - } - - /** - * Get the storageAccountAccessKey property: Specifies the identifier key of the storage account for vulnerability - * assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. - * - * @return the storageAccountAccessKey value. - */ - public String storageAccountAccessKey() { - return this.storageAccountAccessKey; - } - - /** - * Set the storageAccountAccessKey property: Specifies the identifier key of the storage account for vulnerability - * assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. - * - * @param storageAccountAccessKey the storageAccountAccessKey value to set. - * @return the SqlPoolVulnerabilityAssessmentProperties object itself. - */ - public SqlPoolVulnerabilityAssessmentProperties withStorageAccountAccessKey(String storageAccountAccessKey) { - this.storageAccountAccessKey = storageAccountAccessKey; - return this; - } - - /** - * Get the recurringScans property: The recurring scans settings. - * - * @return the recurringScans value. - */ - public VulnerabilityAssessmentRecurringScansProperties recurringScans() { - return this.recurringScans; - } - - /** - * Set the recurringScans property: The recurring scans settings. - * - * @param recurringScans the recurringScans value to set. - * @return the SqlPoolVulnerabilityAssessmentProperties object itself. - */ - public SqlPoolVulnerabilityAssessmentProperties withRecurringScans( - VulnerabilityAssessmentRecurringScansProperties recurringScans) { - this.recurringScans = recurringScans; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (recurringScans() != null) { - recurringScans().validate(); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentRuleBaselineInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentRuleBaselineInner.java index f718b3e0deeb6..25201498e11a2 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentRuleBaselineInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentRuleBaselineInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.SqlPoolVulnerabilityAssessmentRuleBaselineItem; @@ -13,25 +14,17 @@ import java.util.List; /** A Sql pool vulnerability assessment rule baseline. */ +@JsonFlatten @Fluent -public final class SqlPoolVulnerabilityAssessmentRuleBaselineInner extends ProxyResource { +public class SqlPoolVulnerabilityAssessmentRuleBaselineInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlPoolVulnerabilityAssessmentRuleBaselineInner.class); /* - * Resource properties. + * The rule baseline result */ - @JsonProperty(value = "properties") - private SqlPoolVulnerabilityAssessmentRuleBaselineProperties innerProperties; - - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. - */ - private SqlPoolVulnerabilityAssessmentRuleBaselineProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.baselineResults") + private List baselineResults; /** * Get the baselineResults property: The rule baseline result. @@ -39,7 +32,7 @@ private SqlPoolVulnerabilityAssessmentRuleBaselineProperties innerProperties() { * @return the baselineResults value. */ public List baselineResults() { - return this.innerProperties() == null ? null : this.innerProperties().baselineResults(); + return this.baselineResults; } /** @@ -50,10 +43,7 @@ public List baselineResults() { */ public SqlPoolVulnerabilityAssessmentRuleBaselineInner withBaselineResults( List baselineResults) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolVulnerabilityAssessmentRuleBaselineProperties(); - } - this.innerProperties().withBaselineResults(baselineResults); + this.baselineResults = baselineResults; return this; } @@ -63,8 +53,8 @@ public SqlPoolVulnerabilityAssessmentRuleBaselineInner withBaselineResults( * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (baselineResults() != null) { + baselineResults().forEach(e -> e.validate()); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentRuleBaselineProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentRuleBaselineProperties.java deleted file mode 100644 index 7f95a402c3322..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentRuleBaselineProperties.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.SqlPoolVulnerabilityAssessmentRuleBaselineItem; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Properties of a Sql pool vulnerability assessment rule baseline. */ -@Fluent -public final class SqlPoolVulnerabilityAssessmentRuleBaselineProperties { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(SqlPoolVulnerabilityAssessmentRuleBaselineProperties.class); - - /* - * The rule baseline result - */ - @JsonProperty(value = "baselineResults", required = true) - private List baselineResults; - - /** - * Get the baselineResults property: The rule baseline result. - * - * @return the baselineResults value. - */ - public List baselineResults() { - return this.baselineResults; - } - - /** - * Set the baselineResults property: The rule baseline result. - * - * @param baselineResults the baselineResults value to set. - * @return the SqlPoolVulnerabilityAssessmentRuleBaselineProperties object itself. - */ - public SqlPoolVulnerabilityAssessmentRuleBaselineProperties withBaselineResults( - List baselineResults) { - this.baselineResults = baselineResults; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (baselineResults() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property baselineResults in model" - + " SqlPoolVulnerabilityAssessmentRuleBaselineProperties")); - } else { - baselineResults().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentScanExportProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentScanExportProperties.java deleted file mode 100644 index 9d93bc33bbc6b..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentScanExportProperties.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Properties of the export operation's result. */ -@Immutable -public final class SqlPoolVulnerabilityAssessmentScanExportProperties { - @JsonIgnore - private final ClientLogger logger = new ClientLogger(SqlPoolVulnerabilityAssessmentScanExportProperties.class); - - /* - * Location of the exported report (e.g. - * https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). - */ - @JsonProperty(value = "exportedReportLocation", access = JsonProperty.Access.WRITE_ONLY) - private String exportedReportLocation; - - /** - * Get the exportedReportLocation property: Location of the exported report (e.g. - * https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). - * - * @return the exportedReportLocation value. - */ - public String exportedReportLocation() { - return this.exportedReportLocation; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentScansExportInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentScansExportInner.java index d6cf958ae3052..31b5b84d7fc32 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentScansExportInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolVulnerabilityAssessmentScansExportInner.java @@ -4,32 +4,26 @@ package com.azure.resourcemanager.synapse.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A Sql pool Vulnerability Assessment scan export resource. */ -@Fluent -public final class SqlPoolVulnerabilityAssessmentScansExportInner extends ProxyResource { +@JsonFlatten +@Immutable +public class SqlPoolVulnerabilityAssessmentScansExportInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlPoolVulnerabilityAssessmentScansExportInner.class); /* - * Resource properties. - */ - @JsonProperty(value = "properties") - private SqlPoolVulnerabilityAssessmentScanExportProperties innerProperties; - - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. + * Location of the exported report (e.g. + * https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). */ - private SqlPoolVulnerabilityAssessmentScanExportProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.exportedReportLocation", access = JsonProperty.Access.WRITE_ONLY) + private String exportedReportLocation; /** * Get the exportedReportLocation property: Location of the exported report (e.g. @@ -38,7 +32,7 @@ private SqlPoolVulnerabilityAssessmentScanExportProperties innerProperties() { * @return the exportedReportLocation value. */ public String exportedReportLocation() { - return this.innerProperties() == null ? null : this.innerProperties().exportedReportLocation(); + return this.exportedReportLocation; } /** @@ -47,8 +41,5 @@ public String exportedReportLocation() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/TransparentDataEncryptionInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/TransparentDataEncryptionInner.java index 7c42ac2fb9a76..a69a5b5536166 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/TransparentDataEncryptionInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/TransparentDataEncryptionInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.TransparentDataEncryptionStatus; @@ -12,8 +13,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** Represents a Sql pool transparent data encryption configuration. */ +@JsonFlatten @Fluent -public final class TransparentDataEncryptionInner extends ProxyResource { +public class TransparentDataEncryptionInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(TransparentDataEncryptionInner.class); /* @@ -23,10 +25,10 @@ public final class TransparentDataEncryptionInner extends ProxyResource { private String location; /* - * Represents the properties of the resource. + * The status of the database transparent data encryption. */ - @JsonProperty(value = "properties") - private TransparentDataEncryptionProperties innerProperties; + @JsonProperty(value = "properties.status") + private TransparentDataEncryptionStatus status; /** * Get the location property: Resource location. @@ -37,22 +39,13 @@ public String location() { return this.location; } - /** - * Get the innerProperties property: Represents the properties of the resource. - * - * @return the innerProperties value. - */ - private TransparentDataEncryptionProperties innerProperties() { - return this.innerProperties; - } - /** * Get the status property: The status of the database transparent data encryption. * * @return the status value. */ public TransparentDataEncryptionStatus status() { - return this.innerProperties() == null ? null : this.innerProperties().status(); + return this.status; } /** @@ -62,10 +55,7 @@ public TransparentDataEncryptionStatus status() { * @return the TransparentDataEncryptionInner object itself. */ public TransparentDataEncryptionInner withStatus(TransparentDataEncryptionStatus status) { - if (this.innerProperties() == null) { - this.innerProperties = new TransparentDataEncryptionProperties(); - } - this.innerProperties().withStatus(status); + this.status = status; return this; } @@ -75,8 +65,5 @@ public TransparentDataEncryptionInner withStatus(TransparentDataEncryptionStatus * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/TransparentDataEncryptionProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/TransparentDataEncryptionProperties.java deleted file mode 100644 index ab4b500c3808f..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/TransparentDataEncryptionProperties.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.TransparentDataEncryptionStatus; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Represents the properties of a database transparent data encryption. */ -@Fluent -public final class TransparentDataEncryptionProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(TransparentDataEncryptionProperties.class); - - /* - * The status of the database transparent data encryption. - */ - @JsonProperty(value = "status") - private TransparentDataEncryptionStatus status; - - /** - * Get the status property: The status of the database transparent data encryption. - * - * @return the status value. - */ - public TransparentDataEncryptionStatus status() { - return this.status; - } - - /** - * Set the status property: The status of the database transparent data encryption. - * - * @param status the status value to set. - * @return the TransparentDataEncryptionProperties object itself. - */ - public TransparentDataEncryptionProperties withStatus(TransparentDataEncryptionStatus status) { - this.status = status; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/VulnerabilityAssessmentScanRecordInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/VulnerabilityAssessmentScanRecordInner.java index dc369bb4c5883..0a395ea3d9ec8 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/VulnerabilityAssessmentScanRecordInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/VulnerabilityAssessmentScanRecordInner.java @@ -4,7 +4,8 @@ package com.azure.resourcemanager.synapse.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentScanError; @@ -16,24 +17,58 @@ import java.util.List; /** A vulnerability assessment scan record. */ -@Fluent -public final class VulnerabilityAssessmentScanRecordInner extends ProxyResource { +@JsonFlatten +@Immutable +public class VulnerabilityAssessmentScanRecordInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(VulnerabilityAssessmentScanRecordInner.class); /* - * Resource properties. + * The scan ID. */ - @JsonProperty(value = "properties") - private VulnerabilityAssessmentScanRecordProperties innerProperties; + @JsonProperty(value = "properties.scanId", access = JsonProperty.Access.WRITE_ONLY) + private String scanId; - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. + /* + * The scan trigger type. */ - private VulnerabilityAssessmentScanRecordProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.triggerType", access = JsonProperty.Access.WRITE_ONLY) + private VulnerabilityAssessmentScanTriggerType triggerType; + + /* + * The scan status. + */ + @JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY) + private VulnerabilityAssessmentScanState state; + + /* + * The scan start time (UTC). + */ + @JsonProperty(value = "properties.startTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime startTime; + + /* + * The scan end time (UTC). + */ + @JsonProperty(value = "properties.endTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime endTime; + + /* + * The scan errors. + */ + @JsonProperty(value = "properties.errors", access = JsonProperty.Access.WRITE_ONLY) + private List errors; + + /* + * The scan results storage container path. + */ + @JsonProperty(value = "properties.storageContainerPath", access = JsonProperty.Access.WRITE_ONLY) + private String storageContainerPath; + + /* + * The number of failed security checks. + */ + @JsonProperty(value = "properties.numberOfFailedSecurityChecks", access = JsonProperty.Access.WRITE_ONLY) + private Integer numberOfFailedSecurityChecks; /** * Get the scanId property: The scan ID. @@ -41,7 +76,7 @@ private VulnerabilityAssessmentScanRecordProperties innerProperties() { * @return the scanId value. */ public String scanId() { - return this.innerProperties() == null ? null : this.innerProperties().scanId(); + return this.scanId; } /** @@ -50,7 +85,7 @@ public String scanId() { * @return the triggerType value. */ public VulnerabilityAssessmentScanTriggerType triggerType() { - return this.innerProperties() == null ? null : this.innerProperties().triggerType(); + return this.triggerType; } /** @@ -59,7 +94,7 @@ public VulnerabilityAssessmentScanTriggerType triggerType() { * @return the state value. */ public VulnerabilityAssessmentScanState state() { - return this.innerProperties() == null ? null : this.innerProperties().state(); + return this.state; } /** @@ -68,7 +103,7 @@ public VulnerabilityAssessmentScanState state() { * @return the startTime value. */ public OffsetDateTime startTime() { - return this.innerProperties() == null ? null : this.innerProperties().startTime(); + return this.startTime; } /** @@ -77,7 +112,7 @@ public OffsetDateTime startTime() { * @return the endTime value. */ public OffsetDateTime endTime() { - return this.innerProperties() == null ? null : this.innerProperties().endTime(); + return this.endTime; } /** @@ -86,7 +121,7 @@ public OffsetDateTime endTime() { * @return the errors value. */ public List errors() { - return this.innerProperties() == null ? null : this.innerProperties().errors(); + return this.errors; } /** @@ -95,7 +130,7 @@ public List errors() { * @return the storageContainerPath value. */ public String storageContainerPath() { - return this.innerProperties() == null ? null : this.innerProperties().storageContainerPath(); + return this.storageContainerPath; } /** @@ -104,7 +139,7 @@ public String storageContainerPath() { * @return the numberOfFailedSecurityChecks value. */ public Integer numberOfFailedSecurityChecks() { - return this.innerProperties() == null ? null : this.innerProperties().numberOfFailedSecurityChecks(); + return this.numberOfFailedSecurityChecks; } /** @@ -113,8 +148,8 @@ public Integer numberOfFailedSecurityChecks() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (errors() != null) { + errors().forEach(e -> e.validate()); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/VulnerabilityAssessmentScanRecordProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/VulnerabilityAssessmentScanRecordProperties.java deleted file mode 100644 index 4b50b2e55a500..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/VulnerabilityAssessmentScanRecordProperties.java +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Immutable; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentScanError; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentScanState; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentScanTriggerType; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.time.OffsetDateTime; -import java.util.List; - -/** Properties of a vulnerability assessment scan record. */ -@Immutable -public final class VulnerabilityAssessmentScanRecordProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(VulnerabilityAssessmentScanRecordProperties.class); - - /* - * The scan ID. - */ - @JsonProperty(value = "scanId", access = JsonProperty.Access.WRITE_ONLY) - private String scanId; - - /* - * The scan trigger type. - */ - @JsonProperty(value = "triggerType", access = JsonProperty.Access.WRITE_ONLY) - private VulnerabilityAssessmentScanTriggerType triggerType; - - /* - * The scan status. - */ - @JsonProperty(value = "state", access = JsonProperty.Access.WRITE_ONLY) - private VulnerabilityAssessmentScanState state; - - /* - * The scan start time (UTC). - */ - @JsonProperty(value = "startTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime startTime; - - /* - * The scan end time (UTC). - */ - @JsonProperty(value = "endTime", access = JsonProperty.Access.WRITE_ONLY) - private OffsetDateTime endTime; - - /* - * The scan errors. - */ - @JsonProperty(value = "errors", access = JsonProperty.Access.WRITE_ONLY) - private List errors; - - /* - * The scan results storage container path. - */ - @JsonProperty(value = "storageContainerPath", access = JsonProperty.Access.WRITE_ONLY) - private String storageContainerPath; - - /* - * The number of failed security checks. - */ - @JsonProperty(value = "numberOfFailedSecurityChecks", access = JsonProperty.Access.WRITE_ONLY) - private Integer numberOfFailedSecurityChecks; - - /** - * Get the scanId property: The scan ID. - * - * @return the scanId value. - */ - public String scanId() { - return this.scanId; - } - - /** - * Get the triggerType property: The scan trigger type. - * - * @return the triggerType value. - */ - public VulnerabilityAssessmentScanTriggerType triggerType() { - return this.triggerType; - } - - /** - * Get the state property: The scan status. - * - * @return the state value. - */ - public VulnerabilityAssessmentScanState state() { - return this.state; - } - - /** - * Get the startTime property: The scan start time (UTC). - * - * @return the startTime value. - */ - public OffsetDateTime startTime() { - return this.startTime; - } - - /** - * Get the endTime property: The scan end time (UTC). - * - * @return the endTime value. - */ - public OffsetDateTime endTime() { - return this.endTime; - } - - /** - * Get the errors property: The scan errors. - * - * @return the errors value. - */ - public List errors() { - return this.errors; - } - - /** - * Get the storageContainerPath property: The scan results storage container path. - * - * @return the storageContainerPath value. - */ - public String storageContainerPath() { - return this.storageContainerPath; - } - - /** - * Get the numberOfFailedSecurityChecks property: The number of failed security checks. - * - * @return the numberOfFailedSecurityChecks value. - */ - public Integer numberOfFailedSecurityChecks() { - return this.numberOfFailedSecurityChecks; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (errors() != null) { - errors().forEach(e -> e.validate()); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkloadClassifierInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkloadClassifierInner.java index cee72274c8700..8aca81dcf0b3b 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkloadClassifierInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkloadClassifierInner.java @@ -5,30 +5,53 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Workload classifier operations for a data warehouse. */ +@JsonFlatten @Fluent -public final class WorkloadClassifierInner extends ProxyResource { +public class WorkloadClassifierInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkloadClassifierInner.class); /* - * Resource properties. + * The workload classifier member name. */ - @JsonProperty(value = "properties") - private WorkloadClassifierProperties innerProperties; + @JsonProperty(value = "properties.memberName") + private String memberName; - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. + /* + * The workload classifier label. */ - private WorkloadClassifierProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.label") + private String label; + + /* + * The workload classifier context. + */ + @JsonProperty(value = "properties.context") + private String context; + + /* + * The workload classifier start time for classification. + */ + @JsonProperty(value = "properties.startTime") + private String startTime; + + /* + * The workload classifier end time for classification. + */ + @JsonProperty(value = "properties.endTime") + private String endTime; + + /* + * The workload classifier importance. + */ + @JsonProperty(value = "properties.importance") + private String importance; /** * Get the memberName property: The workload classifier member name. @@ -36,7 +59,7 @@ private WorkloadClassifierProperties innerProperties() { * @return the memberName value. */ public String memberName() { - return this.innerProperties() == null ? null : this.innerProperties().memberName(); + return this.memberName; } /** @@ -46,10 +69,7 @@ public String memberName() { * @return the WorkloadClassifierInner object itself. */ public WorkloadClassifierInner withMemberName(String memberName) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkloadClassifierProperties(); - } - this.innerProperties().withMemberName(memberName); + this.memberName = memberName; return this; } @@ -59,7 +79,7 @@ public WorkloadClassifierInner withMemberName(String memberName) { * @return the label value. */ public String label() { - return this.innerProperties() == null ? null : this.innerProperties().label(); + return this.label; } /** @@ -69,10 +89,7 @@ public String label() { * @return the WorkloadClassifierInner object itself. */ public WorkloadClassifierInner withLabel(String label) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkloadClassifierProperties(); - } - this.innerProperties().withLabel(label); + this.label = label; return this; } @@ -82,7 +99,7 @@ public WorkloadClassifierInner withLabel(String label) { * @return the context value. */ public String context() { - return this.innerProperties() == null ? null : this.innerProperties().context(); + return this.context; } /** @@ -92,10 +109,7 @@ public String context() { * @return the WorkloadClassifierInner object itself. */ public WorkloadClassifierInner withContext(String context) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkloadClassifierProperties(); - } - this.innerProperties().withContext(context); + this.context = context; return this; } @@ -105,7 +119,7 @@ public WorkloadClassifierInner withContext(String context) { * @return the startTime value. */ public String startTime() { - return this.innerProperties() == null ? null : this.innerProperties().startTime(); + return this.startTime; } /** @@ -115,10 +129,7 @@ public String startTime() { * @return the WorkloadClassifierInner object itself. */ public WorkloadClassifierInner withStartTime(String startTime) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkloadClassifierProperties(); - } - this.innerProperties().withStartTime(startTime); + this.startTime = startTime; return this; } @@ -128,7 +139,7 @@ public WorkloadClassifierInner withStartTime(String startTime) { * @return the endTime value. */ public String endTime() { - return this.innerProperties() == null ? null : this.innerProperties().endTime(); + return this.endTime; } /** @@ -138,10 +149,7 @@ public String endTime() { * @return the WorkloadClassifierInner object itself. */ public WorkloadClassifierInner withEndTime(String endTime) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkloadClassifierProperties(); - } - this.innerProperties().withEndTime(endTime); + this.endTime = endTime; return this; } @@ -151,7 +159,7 @@ public WorkloadClassifierInner withEndTime(String endTime) { * @return the importance value. */ public String importance() { - return this.innerProperties() == null ? null : this.innerProperties().importance(); + return this.importance; } /** @@ -161,10 +169,7 @@ public String importance() { * @return the WorkloadClassifierInner object itself. */ public WorkloadClassifierInner withImportance(String importance) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkloadClassifierProperties(); - } - this.innerProperties().withImportance(importance); + this.importance = importance; return this; } @@ -174,8 +179,5 @@ public WorkloadClassifierInner withImportance(String importance) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkloadClassifierProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkloadClassifierProperties.java deleted file mode 100644 index b35d61e90bb88..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkloadClassifierProperties.java +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Workload classifier definition. For more information look at sys.workload_management_workload_classifiers (DMV). */ -@Fluent -public final class WorkloadClassifierProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkloadClassifierProperties.class); - - /* - * The workload classifier member name. - */ - @JsonProperty(value = "memberName", required = true) - private String memberName; - - /* - * The workload classifier label. - */ - @JsonProperty(value = "label") - private String label; - - /* - * The workload classifier context. - */ - @JsonProperty(value = "context") - private String context; - - /* - * The workload classifier start time for classification. - */ - @JsonProperty(value = "startTime") - private String startTime; - - /* - * The workload classifier end time for classification. - */ - @JsonProperty(value = "endTime") - private String endTime; - - /* - * The workload classifier importance. - */ - @JsonProperty(value = "importance") - private String importance; - - /** - * Get the memberName property: The workload classifier member name. - * - * @return the memberName value. - */ - public String memberName() { - return this.memberName; - } - - /** - * Set the memberName property: The workload classifier member name. - * - * @param memberName the memberName value to set. - * @return the WorkloadClassifierProperties object itself. - */ - public WorkloadClassifierProperties withMemberName(String memberName) { - this.memberName = memberName; - return this; - } - - /** - * Get the label property: The workload classifier label. - * - * @return the label value. - */ - public String label() { - return this.label; - } - - /** - * Set the label property: The workload classifier label. - * - * @param label the label value to set. - * @return the WorkloadClassifierProperties object itself. - */ - public WorkloadClassifierProperties withLabel(String label) { - this.label = label; - return this; - } - - /** - * Get the context property: The workload classifier context. - * - * @return the context value. - */ - public String context() { - return this.context; - } - - /** - * Set the context property: The workload classifier context. - * - * @param context the context value to set. - * @return the WorkloadClassifierProperties object itself. - */ - public WorkloadClassifierProperties withContext(String context) { - this.context = context; - return this; - } - - /** - * Get the startTime property: The workload classifier start time for classification. - * - * @return the startTime value. - */ - public String startTime() { - return this.startTime; - } - - /** - * Set the startTime property: The workload classifier start time for classification. - * - * @param startTime the startTime value to set. - * @return the WorkloadClassifierProperties object itself. - */ - public WorkloadClassifierProperties withStartTime(String startTime) { - this.startTime = startTime; - return this; - } - - /** - * Get the endTime property: The workload classifier end time for classification. - * - * @return the endTime value. - */ - public String endTime() { - return this.endTime; - } - - /** - * Set the endTime property: The workload classifier end time for classification. - * - * @param endTime the endTime value to set. - * @return the WorkloadClassifierProperties object itself. - */ - public WorkloadClassifierProperties withEndTime(String endTime) { - this.endTime = endTime; - return this; - } - - /** - * Get the importance property: The workload classifier importance. - * - * @return the importance value. - */ - public String importance() { - return this.importance; - } - - /** - * Set the importance property: The workload classifier importance. - * - * @param importance the importance value to set. - * @return the WorkloadClassifierProperties object itself. - */ - public WorkloadClassifierProperties withImportance(String importance) { - this.importance = importance; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (memberName() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property memberName in model WorkloadClassifierProperties")); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkloadGroupInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkloadGroupInner.java index 172b3da9a698c..899ef45caadbe 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkloadGroupInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkloadGroupInner.java @@ -5,30 +5,53 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Workload group operations for a sql pool. */ +@JsonFlatten @Fluent -public final class WorkloadGroupInner extends ProxyResource { +public class WorkloadGroupInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkloadGroupInner.class); /* - * Resource properties. + * The workload group minimum percentage resource. */ - @JsonProperty(value = "properties") - private WorkloadGroupProperties innerProperties; + @JsonProperty(value = "properties.minResourcePercent") + private Integer minResourcePercent; - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. + /* + * The workload group cap percentage resource. */ - private WorkloadGroupProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.maxResourcePercent") + private Integer maxResourcePercent; + + /* + * The workload group request minimum grant percentage. + */ + @JsonProperty(value = "properties.minResourcePercentPerRequest") + private Double minResourcePercentPerRequest; + + /* + * The workload group request maximum grant percentage. + */ + @JsonProperty(value = "properties.maxResourcePercentPerRequest") + private Double maxResourcePercentPerRequest; + + /* + * The workload group importance level. + */ + @JsonProperty(value = "properties.importance") + private String importance; + + /* + * The workload group query execution timeout. + */ + @JsonProperty(value = "properties.queryExecutionTimeout") + private Integer queryExecutionTimeout; /** * Get the minResourcePercent property: The workload group minimum percentage resource. @@ -36,7 +59,7 @@ private WorkloadGroupProperties innerProperties() { * @return the minResourcePercent value. */ public Integer minResourcePercent() { - return this.innerProperties() == null ? null : this.innerProperties().minResourcePercent(); + return this.minResourcePercent; } /** @@ -46,10 +69,7 @@ public Integer minResourcePercent() { * @return the WorkloadGroupInner object itself. */ public WorkloadGroupInner withMinResourcePercent(Integer minResourcePercent) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkloadGroupProperties(); - } - this.innerProperties().withMinResourcePercent(minResourcePercent); + this.minResourcePercent = minResourcePercent; return this; } @@ -59,7 +79,7 @@ public WorkloadGroupInner withMinResourcePercent(Integer minResourcePercent) { * @return the maxResourcePercent value. */ public Integer maxResourcePercent() { - return this.innerProperties() == null ? null : this.innerProperties().maxResourcePercent(); + return this.maxResourcePercent; } /** @@ -69,10 +89,7 @@ public Integer maxResourcePercent() { * @return the WorkloadGroupInner object itself. */ public WorkloadGroupInner withMaxResourcePercent(Integer maxResourcePercent) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkloadGroupProperties(); - } - this.innerProperties().withMaxResourcePercent(maxResourcePercent); + this.maxResourcePercent = maxResourcePercent; return this; } @@ -82,7 +99,7 @@ public WorkloadGroupInner withMaxResourcePercent(Integer maxResourcePercent) { * @return the minResourcePercentPerRequest value. */ public Double minResourcePercentPerRequest() { - return this.innerProperties() == null ? null : this.innerProperties().minResourcePercentPerRequest(); + return this.minResourcePercentPerRequest; } /** @@ -92,10 +109,7 @@ public Double minResourcePercentPerRequest() { * @return the WorkloadGroupInner object itself. */ public WorkloadGroupInner withMinResourcePercentPerRequest(Double minResourcePercentPerRequest) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkloadGroupProperties(); - } - this.innerProperties().withMinResourcePercentPerRequest(minResourcePercentPerRequest); + this.minResourcePercentPerRequest = minResourcePercentPerRequest; return this; } @@ -105,7 +119,7 @@ public WorkloadGroupInner withMinResourcePercentPerRequest(Double minResourcePer * @return the maxResourcePercentPerRequest value. */ public Double maxResourcePercentPerRequest() { - return this.innerProperties() == null ? null : this.innerProperties().maxResourcePercentPerRequest(); + return this.maxResourcePercentPerRequest; } /** @@ -115,10 +129,7 @@ public Double maxResourcePercentPerRequest() { * @return the WorkloadGroupInner object itself. */ public WorkloadGroupInner withMaxResourcePercentPerRequest(Double maxResourcePercentPerRequest) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkloadGroupProperties(); - } - this.innerProperties().withMaxResourcePercentPerRequest(maxResourcePercentPerRequest); + this.maxResourcePercentPerRequest = maxResourcePercentPerRequest; return this; } @@ -128,7 +139,7 @@ public WorkloadGroupInner withMaxResourcePercentPerRequest(Double maxResourcePer * @return the importance value. */ public String importance() { - return this.innerProperties() == null ? null : this.innerProperties().importance(); + return this.importance; } /** @@ -138,10 +149,7 @@ public String importance() { * @return the WorkloadGroupInner object itself. */ public WorkloadGroupInner withImportance(String importance) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkloadGroupProperties(); - } - this.innerProperties().withImportance(importance); + this.importance = importance; return this; } @@ -151,7 +159,7 @@ public WorkloadGroupInner withImportance(String importance) { * @return the queryExecutionTimeout value. */ public Integer queryExecutionTimeout() { - return this.innerProperties() == null ? null : this.innerProperties().queryExecutionTimeout(); + return this.queryExecutionTimeout; } /** @@ -161,10 +169,7 @@ public Integer queryExecutionTimeout() { * @return the WorkloadGroupInner object itself. */ public WorkloadGroupInner withQueryExecutionTimeout(Integer queryExecutionTimeout) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkloadGroupProperties(); - } - this.innerProperties().withQueryExecutionTimeout(queryExecutionTimeout); + this.queryExecutionTimeout = queryExecutionTimeout; return this; } @@ -174,8 +179,5 @@ public WorkloadGroupInner withQueryExecutionTimeout(Integer queryExecutionTimeou * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkloadGroupProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkloadGroupProperties.java deleted file mode 100644 index b33007c64b077..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkloadGroupProperties.java +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Workload group definition. For more information look at sys.workload_management_workload_groups (DMV). */ -@Fluent -public final class WorkloadGroupProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkloadGroupProperties.class); - - /* - * The workload group minimum percentage resource. - */ - @JsonProperty(value = "minResourcePercent", required = true) - private int minResourcePercent; - - /* - * The workload group cap percentage resource. - */ - @JsonProperty(value = "maxResourcePercent", required = true) - private int maxResourcePercent; - - /* - * The workload group request minimum grant percentage. - */ - @JsonProperty(value = "minResourcePercentPerRequest", required = true) - private double minResourcePercentPerRequest; - - /* - * The workload group request maximum grant percentage. - */ - @JsonProperty(value = "maxResourcePercentPerRequest") - private Double maxResourcePercentPerRequest; - - /* - * The workload group importance level. - */ - @JsonProperty(value = "importance") - private String importance; - - /* - * The workload group query execution timeout. - */ - @JsonProperty(value = "queryExecutionTimeout") - private Integer queryExecutionTimeout; - - /** - * Get the minResourcePercent property: The workload group minimum percentage resource. - * - * @return the minResourcePercent value. - */ - public int minResourcePercent() { - return this.minResourcePercent; - } - - /** - * Set the minResourcePercent property: The workload group minimum percentage resource. - * - * @param minResourcePercent the minResourcePercent value to set. - * @return the WorkloadGroupProperties object itself. - */ - public WorkloadGroupProperties withMinResourcePercent(int minResourcePercent) { - this.minResourcePercent = minResourcePercent; - return this; - } - - /** - * Get the maxResourcePercent property: The workload group cap percentage resource. - * - * @return the maxResourcePercent value. - */ - public int maxResourcePercent() { - return this.maxResourcePercent; - } - - /** - * Set the maxResourcePercent property: The workload group cap percentage resource. - * - * @param maxResourcePercent the maxResourcePercent value to set. - * @return the WorkloadGroupProperties object itself. - */ - public WorkloadGroupProperties withMaxResourcePercent(int maxResourcePercent) { - this.maxResourcePercent = maxResourcePercent; - return this; - } - - /** - * Get the minResourcePercentPerRequest property: The workload group request minimum grant percentage. - * - * @return the minResourcePercentPerRequest value. - */ - public double minResourcePercentPerRequest() { - return this.minResourcePercentPerRequest; - } - - /** - * Set the minResourcePercentPerRequest property: The workload group request minimum grant percentage. - * - * @param minResourcePercentPerRequest the minResourcePercentPerRequest value to set. - * @return the WorkloadGroupProperties object itself. - */ - public WorkloadGroupProperties withMinResourcePercentPerRequest(double minResourcePercentPerRequest) { - this.minResourcePercentPerRequest = minResourcePercentPerRequest; - return this; - } - - /** - * Get the maxResourcePercentPerRequest property: The workload group request maximum grant percentage. - * - * @return the maxResourcePercentPerRequest value. - */ - public Double maxResourcePercentPerRequest() { - return this.maxResourcePercentPerRequest; - } - - /** - * Set the maxResourcePercentPerRequest property: The workload group request maximum grant percentage. - * - * @param maxResourcePercentPerRequest the maxResourcePercentPerRequest value to set. - * @return the WorkloadGroupProperties object itself. - */ - public WorkloadGroupProperties withMaxResourcePercentPerRequest(Double maxResourcePercentPerRequest) { - this.maxResourcePercentPerRequest = maxResourcePercentPerRequest; - return this; - } - - /** - * Get the importance property: The workload group importance level. - * - * @return the importance value. - */ - public String importance() { - return this.importance; - } - - /** - * Set the importance property: The workload group importance level. - * - * @param importance the importance value to set. - * @return the WorkloadGroupProperties object itself. - */ - public WorkloadGroupProperties withImportance(String importance) { - this.importance = importance; - return this; - } - - /** - * Get the queryExecutionTimeout property: The workload group query execution timeout. - * - * @return the queryExecutionTimeout value. - */ - public Integer queryExecutionTimeout() { - return this.queryExecutionTimeout; - } - - /** - * Set the queryExecutionTimeout property: The workload group query execution timeout. - * - * @param queryExecutionTimeout the queryExecutionTimeout value to set. - * @return the WorkloadGroupProperties object itself. - */ - public WorkloadGroupProperties withQueryExecutionTimeout(Integer queryExecutionTimeout) { - this.queryExecutionTimeout = queryExecutionTimeout; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkspaceAadAdminInfoInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkspaceAadAdminInfoInner.java index 286e33c0e6b9e..ed2aeb0afebe3 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkspaceAadAdminInfoInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkspaceAadAdminInfoInner.java @@ -5,30 +5,41 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Workspace active directory administrator. */ +@JsonFlatten @Fluent -public final class WorkspaceAadAdminInfoInner extends ProxyResource { +public class WorkspaceAadAdminInfoInner extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkspaceAadAdminInfoInner.class); /* - * Workspace active directory administrator properties + * Tenant ID of the workspace active directory administrator */ - @JsonProperty(value = "properties") - private AadAdminProperties innerProperties; + @JsonProperty(value = "properties.tenantId") + private String tenantId; - /** - * Get the innerProperties property: Workspace active directory administrator properties. - * - * @return the innerProperties value. + /* + * Login of the workspace active directory administrator */ - private AadAdminProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.login") + private String login; + + /* + * Workspace active directory administrator type + */ + @JsonProperty(value = "properties.administratorType") + private String administratorType; + + /* + * Object ID of the workspace active directory administrator + */ + @JsonProperty(value = "properties.sid") + private String sid; /** * Get the tenantId property: Tenant ID of the workspace active directory administrator. @@ -36,7 +47,7 @@ private AadAdminProperties innerProperties() { * @return the tenantId value. */ public String tenantId() { - return this.innerProperties() == null ? null : this.innerProperties().tenantId(); + return this.tenantId; } /** @@ -46,10 +57,7 @@ public String tenantId() { * @return the WorkspaceAadAdminInfoInner object itself. */ public WorkspaceAadAdminInfoInner withTenantId(String tenantId) { - if (this.innerProperties() == null) { - this.innerProperties = new AadAdminProperties(); - } - this.innerProperties().withTenantId(tenantId); + this.tenantId = tenantId; return this; } @@ -59,7 +67,7 @@ public WorkspaceAadAdminInfoInner withTenantId(String tenantId) { * @return the login value. */ public String login() { - return this.innerProperties() == null ? null : this.innerProperties().login(); + return this.login; } /** @@ -69,10 +77,7 @@ public String login() { * @return the WorkspaceAadAdminInfoInner object itself. */ public WorkspaceAadAdminInfoInner withLogin(String login) { - if (this.innerProperties() == null) { - this.innerProperties = new AadAdminProperties(); - } - this.innerProperties().withLogin(login); + this.login = login; return this; } @@ -82,7 +87,7 @@ public WorkspaceAadAdminInfoInner withLogin(String login) { * @return the administratorType value. */ public String administratorType() { - return this.innerProperties() == null ? null : this.innerProperties().administratorType(); + return this.administratorType; } /** @@ -92,10 +97,7 @@ public String administratorType() { * @return the WorkspaceAadAdminInfoInner object itself. */ public WorkspaceAadAdminInfoInner withAdministratorType(String administratorType) { - if (this.innerProperties() == null) { - this.innerProperties = new AadAdminProperties(); - } - this.innerProperties().withAdministratorType(administratorType); + this.administratorType = administratorType; return this; } @@ -105,7 +107,7 @@ public WorkspaceAadAdminInfoInner withAdministratorType(String administratorType * @return the sid value. */ public String sid() { - return this.innerProperties() == null ? null : this.innerProperties().sid(); + return this.sid; } /** @@ -115,10 +117,7 @@ public String sid() { * @return the WorkspaceAadAdminInfoInner object itself. */ public WorkspaceAadAdminInfoInner withSid(String sid) { - if (this.innerProperties() == null) { - this.innerProperties = new AadAdminProperties(); - } - this.innerProperties().withSid(sid); + this.sid = sid; return this; } @@ -128,8 +127,5 @@ public WorkspaceAadAdminInfoInner withSid(String sid) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkspaceInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkspaceInner.java index 6289827dc95bd..2d1a3d857d8f0 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkspaceInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkspaceInner.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.synapse.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.Resource; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.models.CspWorkspaceAdminProperties; @@ -17,36 +18,151 @@ import com.azure.resourcemanager.synapse.models.WorkspacePublicNetworkAccess; import com.azure.resourcemanager.synapse.models.WorkspaceRepositoryConfiguration; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; import java.util.UUID; /** A workspace. */ +@JsonFlatten @Fluent -public final class WorkspaceInner extends Resource { +public class WorkspaceInner extends Resource { @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkspaceInner.class); - /* - * Workspace resource properties - */ - @JsonProperty(value = "properties") - private WorkspaceProperties innerProperties; - /* * Identity of the workspace */ @JsonProperty(value = "identity") private ManagedIdentity identity; - /** - * Get the innerProperties property: Workspace resource properties. - * - * @return the innerProperties value. + /* + * Workspace default data lake storage account details */ - private WorkspaceProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.defaultDataLakeStorage") + private DataLakeStorageAccountDetails defaultDataLakeStorage; + + /* + * SQL administrator login password + */ + @JsonProperty(value = "properties.sqlAdministratorLoginPassword") + private String sqlAdministratorLoginPassword; + + /* + * Workspace managed resource group. The resource group name uniquely + * identifies the resource group within the user subscriptionId. The + * resource group name must be no longer than 90 characters long, and must + * be alphanumeric characters (Char.IsLetterOrDigit()) and '-', '_', '(', + * ')' and'.'. Note that the name cannot end with '.' + */ + @JsonProperty(value = "properties.managedResourceGroupName") + private String managedResourceGroupName; + + /* + * Resource provisioning state + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * Login for workspace SQL active directory administrator + */ + @JsonProperty(value = "properties.sqlAdministratorLogin") + private String sqlAdministratorLogin; + + /* + * Virtual Network profile + */ + @JsonProperty(value = "properties.virtualNetworkProfile") + private VirtualNetworkProfile virtualNetworkProfile; + + /* + * Connectivity endpoints + */ + @JsonProperty(value = "properties.connectivityEndpoints") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map connectivityEndpoints; + + /* + * Setting this to 'default' will ensure that all compute for this + * workspace is in a virtual network managed on behalf of the user. + */ + @JsonProperty(value = "properties.managedVirtualNetwork") + private String managedVirtualNetwork; + + /* + * Private endpoint connections to the workspace + */ + @JsonProperty(value = "properties.privateEndpointConnections") + private List privateEndpointConnections; + + /* + * The encryption details of the workspace + */ + @JsonProperty(value = "properties.encryption") + private EncryptionDetails encryption; + + /* + * The workspace unique identifier + */ + @JsonProperty(value = "properties.workspaceUID", access = JsonProperty.Access.WRITE_ONLY) + private UUID workspaceUid; + + /* + * Workspace level configs and feature flags + */ + @JsonProperty(value = "properties.extraProperties", access = JsonProperty.Access.WRITE_ONLY) + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map extraProperties; + + /* + * Managed Virtual Network Settings + */ + @JsonProperty(value = "properties.managedVirtualNetworkSettings") + private ManagedVirtualNetworkSettings managedVirtualNetworkSettings; + + /* + * Git integration settings + */ + @JsonProperty(value = "properties.workspaceRepositoryConfiguration") + private WorkspaceRepositoryConfiguration workspaceRepositoryConfiguration; + + /* + * Purview Configuration + */ + @JsonProperty(value = "properties.purviewConfiguration") + private PurviewConfiguration purviewConfiguration; + + /* + * The ADLA resource ID. + */ + @JsonProperty(value = "properties.adlaResourceId", access = JsonProperty.Access.WRITE_ONLY) + private String adlaResourceId; + + /* + * Enable or Disable public network access to workspace + */ + @JsonProperty(value = "properties.publicNetworkAccess") + private WorkspacePublicNetworkAccess publicNetworkAccess; + + /* + * Initial workspace AAD admin properties for a CSP subscription + */ + @JsonProperty(value = "properties.cspWorkspaceAdminProperties") + private CspWorkspaceAdminProperties cspWorkspaceAdminProperties; + + /* + * Workspace settings + */ + @JsonProperty(value = "properties.settings", access = JsonProperty.Access.WRITE_ONLY) + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map settings; + + /* + * Enable or Disable AzureADOnlyAuthentication on All Workspace subresource + */ + @JsonProperty(value = "properties.azureADOnlyAuthentication") + private Boolean azureADOnlyAuthentication; /** * Get the identity property: Identity of the workspace. @@ -68,27 +184,13 @@ public WorkspaceInner withIdentity(ManagedIdentity identity) { return this; } - /** {@inheritDoc} */ - @Override - public WorkspaceInner withLocation(String location) { - super.withLocation(location); - return this; - } - - /** {@inheritDoc} */ - @Override - public WorkspaceInner withTags(Map tags) { - super.withTags(tags); - return this; - } - /** * Get the defaultDataLakeStorage property: Workspace default data lake storage account details. * * @return the defaultDataLakeStorage value. */ public DataLakeStorageAccountDetails defaultDataLakeStorage() { - return this.innerProperties() == null ? null : this.innerProperties().defaultDataLakeStorage(); + return this.defaultDataLakeStorage; } /** @@ -98,10 +200,7 @@ public DataLakeStorageAccountDetails defaultDataLakeStorage() { * @return the WorkspaceInner object itself. */ public WorkspaceInner withDefaultDataLakeStorage(DataLakeStorageAccountDetails defaultDataLakeStorage) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspaceProperties(); - } - this.innerProperties().withDefaultDataLakeStorage(defaultDataLakeStorage); + this.defaultDataLakeStorage = defaultDataLakeStorage; return this; } @@ -111,7 +210,7 @@ public WorkspaceInner withDefaultDataLakeStorage(DataLakeStorageAccountDetails d * @return the sqlAdministratorLoginPassword value. */ public String sqlAdministratorLoginPassword() { - return this.innerProperties() == null ? null : this.innerProperties().sqlAdministratorLoginPassword(); + return this.sqlAdministratorLoginPassword; } /** @@ -121,10 +220,7 @@ public String sqlAdministratorLoginPassword() { * @return the WorkspaceInner object itself. */ public WorkspaceInner withSqlAdministratorLoginPassword(String sqlAdministratorLoginPassword) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspaceProperties(); - } - this.innerProperties().withSqlAdministratorLoginPassword(sqlAdministratorLoginPassword); + this.sqlAdministratorLoginPassword = sqlAdministratorLoginPassword; return this; } @@ -137,7 +233,7 @@ public WorkspaceInner withSqlAdministratorLoginPassword(String sqlAdministratorL * @return the managedResourceGroupName value. */ public String managedResourceGroupName() { - return this.innerProperties() == null ? null : this.innerProperties().managedResourceGroupName(); + return this.managedResourceGroupName; } /** @@ -150,10 +246,7 @@ public String managedResourceGroupName() { * @return the WorkspaceInner object itself. */ public WorkspaceInner withManagedResourceGroupName(String managedResourceGroupName) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspaceProperties(); - } - this.innerProperties().withManagedResourceGroupName(managedResourceGroupName); + this.managedResourceGroupName = managedResourceGroupName; return this; } @@ -163,7 +256,7 @@ public WorkspaceInner withManagedResourceGroupName(String managedResourceGroupNa * @return the provisioningState value. */ public String provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + return this.provisioningState; } /** @@ -172,7 +265,7 @@ public String provisioningState() { * @return the sqlAdministratorLogin value. */ public String sqlAdministratorLogin() { - return this.innerProperties() == null ? null : this.innerProperties().sqlAdministratorLogin(); + return this.sqlAdministratorLogin; } /** @@ -182,10 +275,7 @@ public String sqlAdministratorLogin() { * @return the WorkspaceInner object itself. */ public WorkspaceInner withSqlAdministratorLogin(String sqlAdministratorLogin) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspaceProperties(); - } - this.innerProperties().withSqlAdministratorLogin(sqlAdministratorLogin); + this.sqlAdministratorLogin = sqlAdministratorLogin; return this; } @@ -195,7 +285,7 @@ public WorkspaceInner withSqlAdministratorLogin(String sqlAdministratorLogin) { * @return the virtualNetworkProfile value. */ public VirtualNetworkProfile virtualNetworkProfile() { - return this.innerProperties() == null ? null : this.innerProperties().virtualNetworkProfile(); + return this.virtualNetworkProfile; } /** @@ -205,10 +295,7 @@ public VirtualNetworkProfile virtualNetworkProfile() { * @return the WorkspaceInner object itself. */ public WorkspaceInner withVirtualNetworkProfile(VirtualNetworkProfile virtualNetworkProfile) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspaceProperties(); - } - this.innerProperties().withVirtualNetworkProfile(virtualNetworkProfile); + this.virtualNetworkProfile = virtualNetworkProfile; return this; } @@ -218,7 +305,7 @@ public WorkspaceInner withVirtualNetworkProfile(VirtualNetworkProfile virtualNet * @return the connectivityEndpoints value. */ public Map connectivityEndpoints() { - return this.innerProperties() == null ? null : this.innerProperties().connectivityEndpoints(); + return this.connectivityEndpoints; } /** @@ -228,10 +315,7 @@ public Map connectivityEndpoints() { * @return the WorkspaceInner object itself. */ public WorkspaceInner withConnectivityEndpoints(Map connectivityEndpoints) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspaceProperties(); - } - this.innerProperties().withConnectivityEndpoints(connectivityEndpoints); + this.connectivityEndpoints = connectivityEndpoints; return this; } @@ -242,7 +326,7 @@ public WorkspaceInner withConnectivityEndpoints(Map connectivity * @return the managedVirtualNetwork value. */ public String managedVirtualNetwork() { - return this.innerProperties() == null ? null : this.innerProperties().managedVirtualNetwork(); + return this.managedVirtualNetwork; } /** @@ -253,10 +337,7 @@ public String managedVirtualNetwork() { * @return the WorkspaceInner object itself. */ public WorkspaceInner withManagedVirtualNetwork(String managedVirtualNetwork) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspaceProperties(); - } - this.innerProperties().withManagedVirtualNetwork(managedVirtualNetwork); + this.managedVirtualNetwork = managedVirtualNetwork; return this; } @@ -266,7 +347,7 @@ public WorkspaceInner withManagedVirtualNetwork(String managedVirtualNetwork) { * @return the privateEndpointConnections value. */ public List privateEndpointConnections() { - return this.innerProperties() == null ? null : this.innerProperties().privateEndpointConnections(); + return this.privateEndpointConnections; } /** @@ -277,10 +358,7 @@ public List privateEndpointConnections() { */ public WorkspaceInner withPrivateEndpointConnections( List privateEndpointConnections) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspaceProperties(); - } - this.innerProperties().withPrivateEndpointConnections(privateEndpointConnections); + this.privateEndpointConnections = privateEndpointConnections; return this; } @@ -290,7 +368,7 @@ public WorkspaceInner withPrivateEndpointConnections( * @return the encryption value. */ public EncryptionDetails encryption() { - return this.innerProperties() == null ? null : this.innerProperties().encryption(); + return this.encryption; } /** @@ -300,10 +378,7 @@ public EncryptionDetails encryption() { * @return the WorkspaceInner object itself. */ public WorkspaceInner withEncryption(EncryptionDetails encryption) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspaceProperties(); - } - this.innerProperties().withEncryption(encryption); + this.encryption = encryption; return this; } @@ -313,7 +388,7 @@ public WorkspaceInner withEncryption(EncryptionDetails encryption) { * @return the workspaceUid value. */ public UUID workspaceUid() { - return this.innerProperties() == null ? null : this.innerProperties().workspaceUid(); + return this.workspaceUid; } /** @@ -322,7 +397,7 @@ public UUID workspaceUid() { * @return the extraProperties value. */ public Map extraProperties() { - return this.innerProperties() == null ? null : this.innerProperties().extraProperties(); + return this.extraProperties; } /** @@ -331,7 +406,7 @@ public Map extraProperties() { * @return the managedVirtualNetworkSettings value. */ public ManagedVirtualNetworkSettings managedVirtualNetworkSettings() { - return this.innerProperties() == null ? null : this.innerProperties().managedVirtualNetworkSettings(); + return this.managedVirtualNetworkSettings; } /** @@ -342,10 +417,7 @@ public ManagedVirtualNetworkSettings managedVirtualNetworkSettings() { */ public WorkspaceInner withManagedVirtualNetworkSettings( ManagedVirtualNetworkSettings managedVirtualNetworkSettings) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspaceProperties(); - } - this.innerProperties().withManagedVirtualNetworkSettings(managedVirtualNetworkSettings); + this.managedVirtualNetworkSettings = managedVirtualNetworkSettings; return this; } @@ -355,7 +427,7 @@ public WorkspaceInner withManagedVirtualNetworkSettings( * @return the workspaceRepositoryConfiguration value. */ public WorkspaceRepositoryConfiguration workspaceRepositoryConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().workspaceRepositoryConfiguration(); + return this.workspaceRepositoryConfiguration; } /** @@ -366,10 +438,7 @@ public WorkspaceRepositoryConfiguration workspaceRepositoryConfiguration() { */ public WorkspaceInner withWorkspaceRepositoryConfiguration( WorkspaceRepositoryConfiguration workspaceRepositoryConfiguration) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspaceProperties(); - } - this.innerProperties().withWorkspaceRepositoryConfiguration(workspaceRepositoryConfiguration); + this.workspaceRepositoryConfiguration = workspaceRepositoryConfiguration; return this; } @@ -379,7 +448,7 @@ public WorkspaceInner withWorkspaceRepositoryConfiguration( * @return the purviewConfiguration value. */ public PurviewConfiguration purviewConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().purviewConfiguration(); + return this.purviewConfiguration; } /** @@ -389,10 +458,7 @@ public PurviewConfiguration purviewConfiguration() { * @return the WorkspaceInner object itself. */ public WorkspaceInner withPurviewConfiguration(PurviewConfiguration purviewConfiguration) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspaceProperties(); - } - this.innerProperties().withPurviewConfiguration(purviewConfiguration); + this.purviewConfiguration = purviewConfiguration; return this; } @@ -402,7 +468,7 @@ public WorkspaceInner withPurviewConfiguration(PurviewConfiguration purviewConfi * @return the adlaResourceId value. */ public String adlaResourceId() { - return this.innerProperties() == null ? null : this.innerProperties().adlaResourceId(); + return this.adlaResourceId; } /** @@ -411,7 +477,7 @@ public String adlaResourceId() { * @return the publicNetworkAccess value. */ public WorkspacePublicNetworkAccess publicNetworkAccess() { - return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); + return this.publicNetworkAccess; } /** @@ -421,10 +487,7 @@ public WorkspacePublicNetworkAccess publicNetworkAccess() { * @return the WorkspaceInner object itself. */ public WorkspaceInner withPublicNetworkAccess(WorkspacePublicNetworkAccess publicNetworkAccess) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspaceProperties(); - } - this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); + this.publicNetworkAccess = publicNetworkAccess; return this; } @@ -434,7 +497,7 @@ public WorkspaceInner withPublicNetworkAccess(WorkspacePublicNetworkAccess publi * @return the cspWorkspaceAdminProperties value. */ public CspWorkspaceAdminProperties cspWorkspaceAdminProperties() { - return this.innerProperties() == null ? null : this.innerProperties().cspWorkspaceAdminProperties(); + return this.cspWorkspaceAdminProperties; } /** @@ -444,10 +507,7 @@ public CspWorkspaceAdminProperties cspWorkspaceAdminProperties() { * @return the WorkspaceInner object itself. */ public WorkspaceInner withCspWorkspaceAdminProperties(CspWorkspaceAdminProperties cspWorkspaceAdminProperties) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspaceProperties(); - } - this.innerProperties().withCspWorkspaceAdminProperties(cspWorkspaceAdminProperties); + this.cspWorkspaceAdminProperties = cspWorkspaceAdminProperties; return this; } @@ -457,7 +517,7 @@ public WorkspaceInner withCspWorkspaceAdminProperties(CspWorkspaceAdminPropertie * @return the settings value. */ public Map settings() { - return this.innerProperties() == null ? null : this.innerProperties().settings(); + return this.settings; } /** @@ -467,7 +527,7 @@ public Map settings() { * @return the azureADOnlyAuthentication value. */ public Boolean azureADOnlyAuthentication() { - return this.innerProperties() == null ? null : this.innerProperties().azureADOnlyAuthentication(); + return this.azureADOnlyAuthentication; } /** @@ -478,10 +538,21 @@ public Boolean azureADOnlyAuthentication() { * @return the WorkspaceInner object itself. */ public WorkspaceInner withAzureADOnlyAuthentication(Boolean azureADOnlyAuthentication) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspaceProperties(); - } - this.innerProperties().withAzureADOnlyAuthentication(azureADOnlyAuthentication); + this.azureADOnlyAuthentication = azureADOnlyAuthentication; + return this; + } + + /** {@inheritDoc} */ + @Override + public WorkspaceInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public WorkspaceInner withTags(Map tags) { + super.withTags(tags); return this; } @@ -491,11 +562,32 @@ public WorkspaceInner withAzureADOnlyAuthentication(Boolean azureADOnlyAuthentic * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } if (identity() != null) { identity().validate(); } + if (defaultDataLakeStorage() != null) { + defaultDataLakeStorage().validate(); + } + if (virtualNetworkProfile() != null) { + virtualNetworkProfile().validate(); + } + if (privateEndpointConnections() != null) { + privateEndpointConnections().forEach(e -> e.validate()); + } + if (encryption() != null) { + encryption().validate(); + } + if (managedVirtualNetworkSettings() != null) { + managedVirtualNetworkSettings().validate(); + } + if (workspaceRepositoryConfiguration() != null) { + workspaceRepositoryConfiguration().validate(); + } + if (purviewConfiguration() != null) { + purviewConfiguration().validate(); + } + if (cspWorkspaceAdminProperties() != null) { + cspWorkspaceAdminProperties().validate(); + } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkspacePatchProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkspacePatchProperties.java deleted file mode 100644 index 382b407743eff..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkspacePatchProperties.java +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.EncryptionDetails; -import com.azure.resourcemanager.synapse.models.ManagedVirtualNetworkSettings; -import com.azure.resourcemanager.synapse.models.PurviewConfiguration; -import com.azure.resourcemanager.synapse.models.WorkspacePublicNetworkAccess; -import com.azure.resourcemanager.synapse.models.WorkspaceRepositoryConfiguration; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -/** Workspace patch properties. */ -@Fluent -public final class WorkspacePatchProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkspacePatchProperties.class); - - /* - * SQL administrator login password - */ - @JsonProperty(value = "sqlAdministratorLoginPassword") - private String sqlAdministratorLoginPassword; - - /* - * Managed Virtual Network Settings - */ - @JsonProperty(value = "managedVirtualNetworkSettings") - private ManagedVirtualNetworkSettings managedVirtualNetworkSettings; - - /* - * Git integration settings - */ - @JsonProperty(value = "workspaceRepositoryConfiguration") - private WorkspaceRepositoryConfiguration workspaceRepositoryConfiguration; - - /* - * Purview Configuration - */ - @JsonProperty(value = "purviewConfiguration") - private PurviewConfiguration purviewConfiguration; - - /* - * Resource provisioning state - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; - - /* - * The encryption details of the workspace - */ - @JsonProperty(value = "encryption") - private EncryptionDetails encryption; - - /* - * Enable or Disable public network access to workspace - */ - @JsonProperty(value = "publicNetworkAccess") - private WorkspacePublicNetworkAccess publicNetworkAccess; - - /** - * Get the sqlAdministratorLoginPassword property: SQL administrator login password. - * - * @return the sqlAdministratorLoginPassword value. - */ - public String sqlAdministratorLoginPassword() { - return this.sqlAdministratorLoginPassword; - } - - /** - * Set the sqlAdministratorLoginPassword property: SQL administrator login password. - * - * @param sqlAdministratorLoginPassword the sqlAdministratorLoginPassword value to set. - * @return the WorkspacePatchProperties object itself. - */ - public WorkspacePatchProperties withSqlAdministratorLoginPassword(String sqlAdministratorLoginPassword) { - this.sqlAdministratorLoginPassword = sqlAdministratorLoginPassword; - return this; - } - - /** - * Get the managedVirtualNetworkSettings property: Managed Virtual Network Settings. - * - * @return the managedVirtualNetworkSettings value. - */ - public ManagedVirtualNetworkSettings managedVirtualNetworkSettings() { - return this.managedVirtualNetworkSettings; - } - - /** - * Set the managedVirtualNetworkSettings property: Managed Virtual Network Settings. - * - * @param managedVirtualNetworkSettings the managedVirtualNetworkSettings value to set. - * @return the WorkspacePatchProperties object itself. - */ - public WorkspacePatchProperties withManagedVirtualNetworkSettings( - ManagedVirtualNetworkSettings managedVirtualNetworkSettings) { - this.managedVirtualNetworkSettings = managedVirtualNetworkSettings; - return this; - } - - /** - * Get the workspaceRepositoryConfiguration property: Git integration settings. - * - * @return the workspaceRepositoryConfiguration value. - */ - public WorkspaceRepositoryConfiguration workspaceRepositoryConfiguration() { - return this.workspaceRepositoryConfiguration; - } - - /** - * Set the workspaceRepositoryConfiguration property: Git integration settings. - * - * @param workspaceRepositoryConfiguration the workspaceRepositoryConfiguration value to set. - * @return the WorkspacePatchProperties object itself. - */ - public WorkspacePatchProperties withWorkspaceRepositoryConfiguration( - WorkspaceRepositoryConfiguration workspaceRepositoryConfiguration) { - this.workspaceRepositoryConfiguration = workspaceRepositoryConfiguration; - return this; - } - - /** - * Get the purviewConfiguration property: Purview Configuration. - * - * @return the purviewConfiguration value. - */ - public PurviewConfiguration purviewConfiguration() { - return this.purviewConfiguration; - } - - /** - * Set the purviewConfiguration property: Purview Configuration. - * - * @param purviewConfiguration the purviewConfiguration value to set. - * @return the WorkspacePatchProperties object itself. - */ - public WorkspacePatchProperties withPurviewConfiguration(PurviewConfiguration purviewConfiguration) { - this.purviewConfiguration = purviewConfiguration; - return this; - } - - /** - * Get the provisioningState property: Resource provisioning state. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Get the encryption property: The encryption details of the workspace. - * - * @return the encryption value. - */ - public EncryptionDetails encryption() { - return this.encryption; - } - - /** - * Set the encryption property: The encryption details of the workspace. - * - * @param encryption the encryption value to set. - * @return the WorkspacePatchProperties object itself. - */ - public WorkspacePatchProperties withEncryption(EncryptionDetails encryption) { - this.encryption = encryption; - return this; - } - - /** - * Get the publicNetworkAccess property: Enable or Disable public network access to workspace. - * - * @return the publicNetworkAccess value. - */ - public WorkspacePublicNetworkAccess publicNetworkAccess() { - return this.publicNetworkAccess; - } - - /** - * Set the publicNetworkAccess property: Enable or Disable public network access to workspace. - * - * @param publicNetworkAccess the publicNetworkAccess value to set. - * @return the WorkspacePatchProperties object itself. - */ - public WorkspacePatchProperties withPublicNetworkAccess(WorkspacePublicNetworkAccess publicNetworkAccess) { - this.publicNetworkAccess = publicNetworkAccess; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (managedVirtualNetworkSettings() != null) { - managedVirtualNetworkSettings().validate(); - } - if (workspaceRepositoryConfiguration() != null) { - workspaceRepositoryConfiguration().validate(); - } - if (purviewConfiguration() != null) { - purviewConfiguration().validate(); - } - if (encryption() != null) { - encryption().validate(); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkspaceProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkspaceProperties.java deleted file mode 100644 index fa4db79f686b8..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/WorkspaceProperties.java +++ /dev/null @@ -1,547 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.fluent.models; - -import com.azure.core.annotation.Fluent; -import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.CspWorkspaceAdminProperties; -import com.azure.resourcemanager.synapse.models.DataLakeStorageAccountDetails; -import com.azure.resourcemanager.synapse.models.EncryptionDetails; -import com.azure.resourcemanager.synapse.models.ManagedVirtualNetworkSettings; -import com.azure.resourcemanager.synapse.models.PurviewConfiguration; -import com.azure.resourcemanager.synapse.models.VirtualNetworkProfile; -import com.azure.resourcemanager.synapse.models.WorkspacePublicNetworkAccess; -import com.azure.resourcemanager.synapse.models.WorkspaceRepositoryConfiguration; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; -import java.util.Map; -import java.util.UUID; - -/** Workspace properties. */ -@Fluent -public final class WorkspaceProperties { - @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkspaceProperties.class); - - /* - * Workspace default data lake storage account details - */ - @JsonProperty(value = "defaultDataLakeStorage") - private DataLakeStorageAccountDetails defaultDataLakeStorage; - - /* - * SQL administrator login password - */ - @JsonProperty(value = "sqlAdministratorLoginPassword") - private String sqlAdministratorLoginPassword; - - /* - * Workspace managed resource group. The resource group name uniquely - * identifies the resource group within the user subscriptionId. The - * resource group name must be no longer than 90 characters long, and must - * be alphanumeric characters (Char.IsLetterOrDigit()) and '-', '_', '(', - * ')' and'.'. Note that the name cannot end with '.' - */ - @JsonProperty(value = "managedResourceGroupName") - private String managedResourceGroupName; - - /* - * Resource provisioning state - */ - @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) - private String provisioningState; - - /* - * Login for workspace SQL active directory administrator - */ - @JsonProperty(value = "sqlAdministratorLogin") - private String sqlAdministratorLogin; - - /* - * Virtual Network profile - */ - @JsonProperty(value = "virtualNetworkProfile") - private VirtualNetworkProfile virtualNetworkProfile; - - /* - * Connectivity endpoints - */ - @JsonProperty(value = "connectivityEndpoints") - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map connectivityEndpoints; - - /* - * Setting this to 'default' will ensure that all compute for this - * workspace is in a virtual network managed on behalf of the user. - */ - @JsonProperty(value = "managedVirtualNetwork") - private String managedVirtualNetwork; - - /* - * Private endpoint connections to the workspace - */ - @JsonProperty(value = "privateEndpointConnections") - private List privateEndpointConnections; - - /* - * The encryption details of the workspace - */ - @JsonProperty(value = "encryption") - private EncryptionDetails encryption; - - /* - * The workspace unique identifier - */ - @JsonProperty(value = "workspaceUID", access = JsonProperty.Access.WRITE_ONLY) - private UUID workspaceUid; - - /* - * Workspace level configs and feature flags - */ - @JsonProperty(value = "extraProperties", access = JsonProperty.Access.WRITE_ONLY) - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map extraProperties; - - /* - * Managed Virtual Network Settings - */ - @JsonProperty(value = "managedVirtualNetworkSettings") - private ManagedVirtualNetworkSettings managedVirtualNetworkSettings; - - /* - * Git integration settings - */ - @JsonProperty(value = "workspaceRepositoryConfiguration") - private WorkspaceRepositoryConfiguration workspaceRepositoryConfiguration; - - /* - * Purview Configuration - */ - @JsonProperty(value = "purviewConfiguration") - private PurviewConfiguration purviewConfiguration; - - /* - * The ADLA resource ID. - */ - @JsonProperty(value = "adlaResourceId", access = JsonProperty.Access.WRITE_ONLY) - private String adlaResourceId; - - /* - * Enable or Disable public network access to workspace - */ - @JsonProperty(value = "publicNetworkAccess") - private WorkspacePublicNetworkAccess publicNetworkAccess; - - /* - * Initial workspace AAD admin properties for a CSP subscription - */ - @JsonProperty(value = "cspWorkspaceAdminProperties") - private CspWorkspaceAdminProperties cspWorkspaceAdminProperties; - - /* - * Workspace settings - */ - @JsonProperty(value = "settings", access = JsonProperty.Access.WRITE_ONLY) - @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) - private Map settings; - - /* - * Enable or Disable AzureADOnlyAuthentication on All Workspace subresource - */ - @JsonProperty(value = "azureADOnlyAuthentication") - private Boolean azureADOnlyAuthentication; - - /** - * Get the defaultDataLakeStorage property: Workspace default data lake storage account details. - * - * @return the defaultDataLakeStorage value. - */ - public DataLakeStorageAccountDetails defaultDataLakeStorage() { - return this.defaultDataLakeStorage; - } - - /** - * Set the defaultDataLakeStorage property: Workspace default data lake storage account details. - * - * @param defaultDataLakeStorage the defaultDataLakeStorage value to set. - * @return the WorkspaceProperties object itself. - */ - public WorkspaceProperties withDefaultDataLakeStorage(DataLakeStorageAccountDetails defaultDataLakeStorage) { - this.defaultDataLakeStorage = defaultDataLakeStorage; - return this; - } - - /** - * Get the sqlAdministratorLoginPassword property: SQL administrator login password. - * - * @return the sqlAdministratorLoginPassword value. - */ - public String sqlAdministratorLoginPassword() { - return this.sqlAdministratorLoginPassword; - } - - /** - * Set the sqlAdministratorLoginPassword property: SQL administrator login password. - * - * @param sqlAdministratorLoginPassword the sqlAdministratorLoginPassword value to set. - * @return the WorkspaceProperties object itself. - */ - public WorkspaceProperties withSqlAdministratorLoginPassword(String sqlAdministratorLoginPassword) { - this.sqlAdministratorLoginPassword = sqlAdministratorLoginPassword; - return this; - } - - /** - * Get the managedResourceGroupName property: Workspace managed resource group. The resource group name uniquely - * identifies the resource group within the user subscriptionId. The resource group name must be no longer than 90 - * characters long, and must be alphanumeric characters (Char.IsLetterOrDigit()) and '-', '_', '(', ')' and'.'. Note - * that the name cannot end with '.'. - * - * @return the managedResourceGroupName value. - */ - public String managedResourceGroupName() { - return this.managedResourceGroupName; - } - - /** - * Set the managedResourceGroupName property: Workspace managed resource group. The resource group name uniquely - * identifies the resource group within the user subscriptionId. The resource group name must be no longer than 90 - * characters long, and must be alphanumeric characters (Char.IsLetterOrDigit()) and '-', '_', '(', ')' and'.'. Note - * that the name cannot end with '.'. - * - * @param managedResourceGroupName the managedResourceGroupName value to set. - * @return the WorkspaceProperties object itself. - */ - public WorkspaceProperties withManagedResourceGroupName(String managedResourceGroupName) { - this.managedResourceGroupName = managedResourceGroupName; - return this; - } - - /** - * Get the provisioningState property: Resource provisioning state. - * - * @return the provisioningState value. - */ - public String provisioningState() { - return this.provisioningState; - } - - /** - * Get the sqlAdministratorLogin property: Login for workspace SQL active directory administrator. - * - * @return the sqlAdministratorLogin value. - */ - public String sqlAdministratorLogin() { - return this.sqlAdministratorLogin; - } - - /** - * Set the sqlAdministratorLogin property: Login for workspace SQL active directory administrator. - * - * @param sqlAdministratorLogin the sqlAdministratorLogin value to set. - * @return the WorkspaceProperties object itself. - */ - public WorkspaceProperties withSqlAdministratorLogin(String sqlAdministratorLogin) { - this.sqlAdministratorLogin = sqlAdministratorLogin; - return this; - } - - /** - * Get the virtualNetworkProfile property: Virtual Network profile. - * - * @return the virtualNetworkProfile value. - */ - public VirtualNetworkProfile virtualNetworkProfile() { - return this.virtualNetworkProfile; - } - - /** - * Set the virtualNetworkProfile property: Virtual Network profile. - * - * @param virtualNetworkProfile the virtualNetworkProfile value to set. - * @return the WorkspaceProperties object itself. - */ - public WorkspaceProperties withVirtualNetworkProfile(VirtualNetworkProfile virtualNetworkProfile) { - this.virtualNetworkProfile = virtualNetworkProfile; - return this; - } - - /** - * Get the connectivityEndpoints property: Connectivity endpoints. - * - * @return the connectivityEndpoints value. - */ - public Map connectivityEndpoints() { - return this.connectivityEndpoints; - } - - /** - * Set the connectivityEndpoints property: Connectivity endpoints. - * - * @param connectivityEndpoints the connectivityEndpoints value to set. - * @return the WorkspaceProperties object itself. - */ - public WorkspaceProperties withConnectivityEndpoints(Map connectivityEndpoints) { - this.connectivityEndpoints = connectivityEndpoints; - return this; - } - - /** - * Get the managedVirtualNetwork property: Setting this to 'default' will ensure that all compute for this workspace - * is in a virtual network managed on behalf of the user. - * - * @return the managedVirtualNetwork value. - */ - public String managedVirtualNetwork() { - return this.managedVirtualNetwork; - } - - /** - * Set the managedVirtualNetwork property: Setting this to 'default' will ensure that all compute for this workspace - * is in a virtual network managed on behalf of the user. - * - * @param managedVirtualNetwork the managedVirtualNetwork value to set. - * @return the WorkspaceProperties object itself. - */ - public WorkspaceProperties withManagedVirtualNetwork(String managedVirtualNetwork) { - this.managedVirtualNetwork = managedVirtualNetwork; - return this; - } - - /** - * Get the privateEndpointConnections property: Private endpoint connections to the workspace. - * - * @return the privateEndpointConnections value. - */ - public List privateEndpointConnections() { - return this.privateEndpointConnections; - } - - /** - * Set the privateEndpointConnections property: Private endpoint connections to the workspace. - * - * @param privateEndpointConnections the privateEndpointConnections value to set. - * @return the WorkspaceProperties object itself. - */ - public WorkspaceProperties withPrivateEndpointConnections( - List privateEndpointConnections) { - this.privateEndpointConnections = privateEndpointConnections; - return this; - } - - /** - * Get the encryption property: The encryption details of the workspace. - * - * @return the encryption value. - */ - public EncryptionDetails encryption() { - return this.encryption; - } - - /** - * Set the encryption property: The encryption details of the workspace. - * - * @param encryption the encryption value to set. - * @return the WorkspaceProperties object itself. - */ - public WorkspaceProperties withEncryption(EncryptionDetails encryption) { - this.encryption = encryption; - return this; - } - - /** - * Get the workspaceUid property: The workspace unique identifier. - * - * @return the workspaceUid value. - */ - public UUID workspaceUid() { - return this.workspaceUid; - } - - /** - * Get the extraProperties property: Workspace level configs and feature flags. - * - * @return the extraProperties value. - */ - public Map extraProperties() { - return this.extraProperties; - } - - /** - * Get the managedVirtualNetworkSettings property: Managed Virtual Network Settings. - * - * @return the managedVirtualNetworkSettings value. - */ - public ManagedVirtualNetworkSettings managedVirtualNetworkSettings() { - return this.managedVirtualNetworkSettings; - } - - /** - * Set the managedVirtualNetworkSettings property: Managed Virtual Network Settings. - * - * @param managedVirtualNetworkSettings the managedVirtualNetworkSettings value to set. - * @return the WorkspaceProperties object itself. - */ - public WorkspaceProperties withManagedVirtualNetworkSettings( - ManagedVirtualNetworkSettings managedVirtualNetworkSettings) { - this.managedVirtualNetworkSettings = managedVirtualNetworkSettings; - return this; - } - - /** - * Get the workspaceRepositoryConfiguration property: Git integration settings. - * - * @return the workspaceRepositoryConfiguration value. - */ - public WorkspaceRepositoryConfiguration workspaceRepositoryConfiguration() { - return this.workspaceRepositoryConfiguration; - } - - /** - * Set the workspaceRepositoryConfiguration property: Git integration settings. - * - * @param workspaceRepositoryConfiguration the workspaceRepositoryConfiguration value to set. - * @return the WorkspaceProperties object itself. - */ - public WorkspaceProperties withWorkspaceRepositoryConfiguration( - WorkspaceRepositoryConfiguration workspaceRepositoryConfiguration) { - this.workspaceRepositoryConfiguration = workspaceRepositoryConfiguration; - return this; - } - - /** - * Get the purviewConfiguration property: Purview Configuration. - * - * @return the purviewConfiguration value. - */ - public PurviewConfiguration purviewConfiguration() { - return this.purviewConfiguration; - } - - /** - * Set the purviewConfiguration property: Purview Configuration. - * - * @param purviewConfiguration the purviewConfiguration value to set. - * @return the WorkspaceProperties object itself. - */ - public WorkspaceProperties withPurviewConfiguration(PurviewConfiguration purviewConfiguration) { - this.purviewConfiguration = purviewConfiguration; - return this; - } - - /** - * Get the adlaResourceId property: The ADLA resource ID. - * - * @return the adlaResourceId value. - */ - public String adlaResourceId() { - return this.adlaResourceId; - } - - /** - * Get the publicNetworkAccess property: Enable or Disable public network access to workspace. - * - * @return the publicNetworkAccess value. - */ - public WorkspacePublicNetworkAccess publicNetworkAccess() { - return this.publicNetworkAccess; - } - - /** - * Set the publicNetworkAccess property: Enable or Disable public network access to workspace. - * - * @param publicNetworkAccess the publicNetworkAccess value to set. - * @return the WorkspaceProperties object itself. - */ - public WorkspaceProperties withPublicNetworkAccess(WorkspacePublicNetworkAccess publicNetworkAccess) { - this.publicNetworkAccess = publicNetworkAccess; - return this; - } - - /** - * Get the cspWorkspaceAdminProperties property: Initial workspace AAD admin properties for a CSP subscription. - * - * @return the cspWorkspaceAdminProperties value. - */ - public CspWorkspaceAdminProperties cspWorkspaceAdminProperties() { - return this.cspWorkspaceAdminProperties; - } - - /** - * Set the cspWorkspaceAdminProperties property: Initial workspace AAD admin properties for a CSP subscription. - * - * @param cspWorkspaceAdminProperties the cspWorkspaceAdminProperties value to set. - * @return the WorkspaceProperties object itself. - */ - public WorkspaceProperties withCspWorkspaceAdminProperties( - CspWorkspaceAdminProperties cspWorkspaceAdminProperties) { - this.cspWorkspaceAdminProperties = cspWorkspaceAdminProperties; - return this; - } - - /** - * Get the settings property: Workspace settings. - * - * @return the settings value. - */ - public Map settings() { - return this.settings; - } - - /** - * Get the azureADOnlyAuthentication property: Enable or Disable AzureADOnlyAuthentication on All Workspace - * subresource. - * - * @return the azureADOnlyAuthentication value. - */ - public Boolean azureADOnlyAuthentication() { - return this.azureADOnlyAuthentication; - } - - /** - * Set the azureADOnlyAuthentication property: Enable or Disable AzureADOnlyAuthentication on All Workspace - * subresource. - * - * @param azureADOnlyAuthentication the azureADOnlyAuthentication value to set. - * @return the WorkspaceProperties object itself. - */ - public WorkspaceProperties withAzureADOnlyAuthentication(Boolean azureADOnlyAuthentication) { - this.azureADOnlyAuthentication = azureADOnlyAuthentication; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (defaultDataLakeStorage() != null) { - defaultDataLakeStorage().validate(); - } - if (virtualNetworkProfile() != null) { - virtualNetworkProfile().validate(); - } - if (privateEndpointConnections() != null) { - privateEndpointConnections().forEach(e -> e.validate()); - } - if (encryption() != null) { - encryption().validate(); - } - if (managedVirtualNetworkSettings() != null) { - managedVirtualNetworkSettings().validate(); - } - if (workspaceRepositoryConfiguration() != null) { - workspaceRepositoryConfiguration().validate(); - } - if (purviewConfiguration() != null) { - purviewConfiguration().validate(); - } - if (cspWorkspaceAdminProperties() != null) { - cspWorkspaceAdminProperties().validate(); - } - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/AzureADOnlyAuthenticationImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/AzureADOnlyAuthenticationImpl.java index 808daa8c55481..8200b424d4f80 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/AzureADOnlyAuthenticationImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/AzureADOnlyAuthenticationImpl.java @@ -35,7 +35,7 @@ public String type() { return this.innerModel().type(); } - public boolean azureADOnlyAuthentication() { + public Boolean azureADOnlyAuthentication() { return this.innerModel().azureADOnlyAuthentication(); } @@ -113,7 +113,7 @@ public AzureADOnlyAuthentication refresh(Context context) { return this; } - public AzureADOnlyAuthenticationImpl withAzureADOnlyAuthentication(boolean azureADOnlyAuthentication) { + public AzureADOnlyAuthenticationImpl withAzureADOnlyAuthentication(Boolean azureADOnlyAuthentication) { this.innerModel().withAzureADOnlyAuthentication(azureADOnlyAuthentication); return this; } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/BigDataPoolResourceInfoImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/BigDataPoolResourceInfoImpl.java index 222b9f543dda1..cdd81da429f39 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/BigDataPoolResourceInfoImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/BigDataPoolResourceInfoImpl.java @@ -7,12 +7,12 @@ import com.azure.core.management.Region; import com.azure.core.util.Context; import com.azure.resourcemanager.synapse.fluent.models.BigDataPoolResourceInfoInner; -import com.azure.resourcemanager.synapse.fluent.models.LibraryInfo; import com.azure.resourcemanager.synapse.models.AutoPauseProperties; import com.azure.resourcemanager.synapse.models.AutoScaleProperties; import com.azure.resourcemanager.synapse.models.BigDataPoolPatchInfo; import com.azure.resourcemanager.synapse.models.BigDataPoolResourceInfo; import com.azure.resourcemanager.synapse.models.DynamicExecutorAllocation; +import com.azure.resourcemanager.synapse.models.LibraryInfo; import com.azure.resourcemanager.synapse.models.LibraryRequirements; import com.azure.resourcemanager.synapse.models.NodeSize; import com.azure.resourcemanager.synapse.models.NodeSizeFamily; diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/PrivateEndpointConnectionForPrivateLinkHubImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/PrivateEndpointConnectionForPrivateLinkHubImpl.java index 7ae3ec7bca198..f880b1ac451cd 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/PrivateEndpointConnectionForPrivateLinkHubImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/PrivateEndpointConnectionForPrivateLinkHubImpl.java @@ -5,8 +5,8 @@ package com.azure.resourcemanager.synapse.implementation; import com.azure.resourcemanager.synapse.fluent.models.PrivateEndpointConnectionForPrivateLinkHubInner; -import com.azure.resourcemanager.synapse.fluent.models.PrivateEndpointConnectionProperties; import com.azure.resourcemanager.synapse.models.PrivateEndpointConnectionForPrivateLinkHub; +import com.azure.resourcemanager.synapse.models.PrivateEndpointConnectionProperties; public final class PrivateEndpointConnectionForPrivateLinkHubImpl implements PrivateEndpointConnectionForPrivateLinkHub { diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SensitivityLabelUpdatePropertiesImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SensitivityLabelUpdatePropertiesImpl.java deleted file mode 100644 index 924ea1e0d4862..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SensitivityLabelUpdatePropertiesImpl.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.implementation; - -import com.azure.resourcemanager.synapse.fluent.models.SensitivityLabelInner; -import com.azure.resourcemanager.synapse.fluent.models.SensitivityLabelUpdatePropertiesInner; -import com.azure.resourcemanager.synapse.models.SensitivityLabel; -import com.azure.resourcemanager.synapse.models.SensitivityLabelUpdateKind; -import com.azure.resourcemanager.synapse.models.SensitivityLabelUpdateProperties; - -public final class SensitivityLabelUpdatePropertiesImpl implements SensitivityLabelUpdateProperties { - private SensitivityLabelUpdatePropertiesInner innerObject; - - private final com.azure.resourcemanager.synapse.SynapseManager serviceManager; - - SensitivityLabelUpdatePropertiesImpl( - SensitivityLabelUpdatePropertiesInner innerObject, - com.azure.resourcemanager.synapse.SynapseManager serviceManager) { - this.innerObject = innerObject; - this.serviceManager = serviceManager; - } - - public SensitivityLabelUpdateKind op() { - return this.innerModel().op(); - } - - public String schema() { - return this.innerModel().schema(); - } - - public String table() { - return this.innerModel().table(); - } - - public String column() { - return this.innerModel().column(); - } - - public SensitivityLabel sensitivityLabel() { - SensitivityLabelInner inner = this.innerModel().sensitivityLabel(); - if (inner != null) { - return new SensitivityLabelImpl(inner, this.manager()); - } else { - return null; - } - } - - public SensitivityLabelUpdatePropertiesInner innerModel() { - return this.innerObject; - } - - private com.azure.resourcemanager.synapse.SynapseManager manager() { - return this.serviceManager; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkloadGroupImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkloadGroupImpl.java index 99099f1b0766a..da1f26ef6c84d 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkloadGroupImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkloadGroupImpl.java @@ -25,15 +25,15 @@ public String type() { return this.innerModel().type(); } - public int minResourcePercent() { + public Integer minResourcePercent() { return this.innerModel().minResourcePercent(); } - public int maxResourcePercent() { + public Integer maxResourcePercent() { return this.innerModel().maxResourcePercent(); } - public double minResourcePercentPerRequest() { + public Double minResourcePercentPerRequest() { return this.innerModel().minResourcePercentPerRequest(); } @@ -151,17 +151,17 @@ public WorkloadGroup refresh(Context context) { return this; } - public WorkloadGroupImpl withMinResourcePercent(int minResourcePercent) { + public WorkloadGroupImpl withMinResourcePercent(Integer minResourcePercent) { this.innerModel().withMinResourcePercent(minResourcePercent); return this; } - public WorkloadGroupImpl withMaxResourcePercent(int maxResourcePercent) { + public WorkloadGroupImpl withMaxResourcePercent(Integer maxResourcePercent) { this.innerModel().withMaxResourcePercent(maxResourcePercent); return this; } - public WorkloadGroupImpl withMinResourcePercentPerRequest(double minResourcePercentPerRequest) { + public WorkloadGroupImpl withMinResourcePercentPerRequest(Double minResourcePercentPerRequest) { this.innerModel().withMinResourcePercentPerRequest(minResourcePercentPerRequest); return this; } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/AzureADOnlyAuthentication.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/AzureADOnlyAuthentication.java index b05b3f9a1e12a..839770722796e 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/AzureADOnlyAuthentication.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/AzureADOnlyAuthentication.java @@ -36,7 +36,7 @@ public interface AzureADOnlyAuthentication { * * @return the azureADOnlyAuthentication value. */ - boolean azureADOnlyAuthentication(); + Boolean azureADOnlyAuthentication(); /** * Gets the state property: property configuration state. @@ -107,7 +107,7 @@ interface WithAzureADOnlyAuthentication { * @param azureADOnlyAuthentication Azure Active Directory only Authentication enabled. * @return the next definition stage. */ - WithCreate withAzureADOnlyAuthentication(boolean azureADOnlyAuthentication); + WithCreate withAzureADOnlyAuthentication(Boolean azureADOnlyAuthentication); } } /** diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/BigDataPoolResourceInfo.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/BigDataPoolResourceInfo.java index c4393b430b267..effc1dbd0bb05 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/BigDataPoolResourceInfo.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/BigDataPoolResourceInfo.java @@ -7,7 +7,6 @@ import com.azure.core.management.Region; import com.azure.core.util.Context; import com.azure.resourcemanager.synapse.fluent.models.BigDataPoolResourceInfoInner; -import com.azure.resourcemanager.synapse.fluent.models.LibraryInfo; import java.time.OffsetDateTime; import java.util.List; import java.util.Map; diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/CmdkeySetup.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/CmdkeySetup.java index cacf920eaa6f8..45695d51d929a 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/CmdkeySetup.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/CmdkeySetup.java @@ -5,8 +5,8 @@ package com.azure.resourcemanager.synapse.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.fluent.models.CmdkeySetupTypeProperties; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -15,24 +15,28 @@ /** The custom setup of running cmdkey commands. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonTypeName("CmdkeySetup") +@JsonFlatten @Fluent -public final class CmdkeySetup extends CustomSetupBase { +public class CmdkeySetup extends CustomSetupBase { @JsonIgnore private final ClientLogger logger = new ClientLogger(CmdkeySetup.class); /* - * Cmdkey command custom setup type properties. + * The server name of data source access. */ - @JsonProperty(value = "typeProperties", required = true) - private CmdkeySetupTypeProperties innerTypeProperties = new CmdkeySetupTypeProperties(); + @JsonProperty(value = "typeProperties.targetName", required = true) + private Object targetName; - /** - * Get the innerTypeProperties property: Cmdkey command custom setup type properties. - * - * @return the innerTypeProperties value. + /* + * The user name of data source access. */ - private CmdkeySetupTypeProperties innerTypeProperties() { - return this.innerTypeProperties; - } + @JsonProperty(value = "typeProperties.userName", required = true) + private Object username; + + /* + * The password of data source access. + */ + @JsonProperty(value = "typeProperties.password", required = true) + private SecretBase password; /** * Get the targetName property: The server name of data source access. @@ -40,7 +44,7 @@ private CmdkeySetupTypeProperties innerTypeProperties() { * @return the targetName value. */ public Object targetName() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().targetName(); + return this.targetName; } /** @@ -50,10 +54,7 @@ public Object targetName() { * @return the CmdkeySetup object itself. */ public CmdkeySetup withTargetName(Object targetName) { - if (this.innerTypeProperties() == null) { - this.innerTypeProperties = new CmdkeySetupTypeProperties(); - } - this.innerTypeProperties().withTargetName(targetName); + this.targetName = targetName; return this; } @@ -63,7 +64,7 @@ public CmdkeySetup withTargetName(Object targetName) { * @return the username value. */ public Object username() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().username(); + return this.username; } /** @@ -73,10 +74,7 @@ public Object username() { * @return the CmdkeySetup object itself. */ public CmdkeySetup withUsername(Object username) { - if (this.innerTypeProperties() == null) { - this.innerTypeProperties = new CmdkeySetupTypeProperties(); - } - this.innerTypeProperties().withUsername(username); + this.username = username; return this; } @@ -86,7 +84,7 @@ public CmdkeySetup withUsername(Object username) { * @return the password value. */ public SecretBase password() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().password(); + return this.password; } /** @@ -96,10 +94,7 @@ public SecretBase password() { * @return the CmdkeySetup object itself. */ public CmdkeySetup withPassword(SecretBase password) { - if (this.innerTypeProperties() == null) { - this.innerTypeProperties = new CmdkeySetupTypeProperties(); - } - this.innerTypeProperties().withPassword(password); + this.password = password; return this; } @@ -111,12 +106,22 @@ public CmdkeySetup withPassword(SecretBase password) { @Override public void validate() { super.validate(); - if (innerTypeProperties() == null) { + if (targetName() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property targetName in model CmdkeySetup")); + } + if (username() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException("Missing required property username in model CmdkeySetup")); + } + if (password() == null) { throw logger .logExceptionAsError( - new IllegalArgumentException("Missing required property innerTypeProperties in model CmdkeySetup")); + new IllegalArgumentException("Missing required property password in model CmdkeySetup")); } else { - innerTypeProperties().validate(); + password().validate(); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ComponentSetup.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ComponentSetup.java index e75a9b2745ba6..f385ddae11b9f 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ComponentSetup.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ComponentSetup.java @@ -5,8 +5,8 @@ package com.azure.resourcemanager.synapse.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.fluent.models.LicensedComponentSetupTypeProperties; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -15,24 +15,22 @@ /** The custom setup of installing 3rd party components. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonTypeName("ComponentSetup") +@JsonFlatten @Fluent -public final class ComponentSetup extends CustomSetupBase { +public class ComponentSetup extends CustomSetupBase { @JsonIgnore private final ClientLogger logger = new ClientLogger(ComponentSetup.class); /* - * Install 3rd party component type properties. + * The name of the 3rd party component. */ - @JsonProperty(value = "typeProperties", required = true) - private LicensedComponentSetupTypeProperties innerTypeProperties = new LicensedComponentSetupTypeProperties(); + @JsonProperty(value = "typeProperties.componentName", required = true) + private String componentName; - /** - * Get the innerTypeProperties property: Install 3rd party component type properties. - * - * @return the innerTypeProperties value. + /* + * The license key to activate the component. */ - private LicensedComponentSetupTypeProperties innerTypeProperties() { - return this.innerTypeProperties; - } + @JsonProperty(value = "typeProperties.licenseKey") + private SecretBase licenseKey; /** * Get the componentName property: The name of the 3rd party component. @@ -40,7 +38,7 @@ private LicensedComponentSetupTypeProperties innerTypeProperties() { * @return the componentName value. */ public String componentName() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().componentName(); + return this.componentName; } /** @@ -50,10 +48,7 @@ public String componentName() { * @return the ComponentSetup object itself. */ public ComponentSetup withComponentName(String componentName) { - if (this.innerTypeProperties() == null) { - this.innerTypeProperties = new LicensedComponentSetupTypeProperties(); - } - this.innerTypeProperties().withComponentName(componentName); + this.componentName = componentName; return this; } @@ -63,7 +58,7 @@ public ComponentSetup withComponentName(String componentName) { * @return the licenseKey value. */ public SecretBase licenseKey() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().licenseKey(); + return this.licenseKey; } /** @@ -73,10 +68,7 @@ public SecretBase licenseKey() { * @return the ComponentSetup object itself. */ public ComponentSetup withLicenseKey(SecretBase licenseKey) { - if (this.innerTypeProperties() == null) { - this.innerTypeProperties = new LicensedComponentSetupTypeProperties(); - } - this.innerTypeProperties().withLicenseKey(licenseKey); + this.licenseKey = licenseKey; return this; } @@ -88,13 +80,13 @@ public ComponentSetup withLicenseKey(SecretBase licenseKey) { @Override public void validate() { super.validate(); - if (innerTypeProperties() == null) { + if (componentName() == null) { throw logger .logExceptionAsError( - new IllegalArgumentException( - "Missing required property innerTypeProperties in model ComponentSetup")); - } else { - innerTypeProperties().validate(); + new IllegalArgumentException("Missing required property componentName in model ComponentSetup")); + } + if (licenseKey() != null) { + licenseKey().validate(); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/EnvironmentVariableSetup.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/EnvironmentVariableSetup.java index 5e708032da997..e96ec178ab43a 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/EnvironmentVariableSetup.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/EnvironmentVariableSetup.java @@ -5,8 +5,8 @@ package com.azure.resourcemanager.synapse.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.fluent.models.EnvironmentVariableSetupTypeProperties; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -15,24 +15,22 @@ /** The custom setup of setting environment variable. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonTypeName("EnvironmentVariableSetup") +@JsonFlatten @Fluent -public final class EnvironmentVariableSetup extends CustomSetupBase { +public class EnvironmentVariableSetup extends CustomSetupBase { @JsonIgnore private final ClientLogger logger = new ClientLogger(EnvironmentVariableSetup.class); /* - * Add environment variable type properties. + * The name of the environment variable. */ - @JsonProperty(value = "typeProperties", required = true) - private EnvironmentVariableSetupTypeProperties innerTypeProperties = new EnvironmentVariableSetupTypeProperties(); + @JsonProperty(value = "typeProperties.variableName", required = true) + private String variableName; - /** - * Get the innerTypeProperties property: Add environment variable type properties. - * - * @return the innerTypeProperties value. + /* + * The value of the environment variable. */ - private EnvironmentVariableSetupTypeProperties innerTypeProperties() { - return this.innerTypeProperties; - } + @JsonProperty(value = "typeProperties.variableValue", required = true) + private String variableValue; /** * Get the variableName property: The name of the environment variable. @@ -40,7 +38,7 @@ private EnvironmentVariableSetupTypeProperties innerTypeProperties() { * @return the variableName value. */ public String variableName() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().variableName(); + return this.variableName; } /** @@ -50,10 +48,7 @@ public String variableName() { * @return the EnvironmentVariableSetup object itself. */ public EnvironmentVariableSetup withVariableName(String variableName) { - if (this.innerTypeProperties() == null) { - this.innerTypeProperties = new EnvironmentVariableSetupTypeProperties(); - } - this.innerTypeProperties().withVariableName(variableName); + this.variableName = variableName; return this; } @@ -63,7 +58,7 @@ public EnvironmentVariableSetup withVariableName(String variableName) { * @return the variableValue value. */ public String variableValue() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().variableValue(); + return this.variableValue; } /** @@ -73,10 +68,7 @@ public String variableValue() { * @return the EnvironmentVariableSetup object itself. */ public EnvironmentVariableSetup withVariableValue(String variableValue) { - if (this.innerTypeProperties() == null) { - this.innerTypeProperties = new EnvironmentVariableSetupTypeProperties(); - } - this.innerTypeProperties().withVariableValue(variableValue); + this.variableValue = variableValue; return this; } @@ -88,13 +80,17 @@ public EnvironmentVariableSetup withVariableValue(String variableValue) { @Override public void validate() { super.validate(); - if (innerTypeProperties() == null) { + if (variableName() == null) { + throw logger + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property variableName in model EnvironmentVariableSetup")); + } + if (variableValue() == null) { throw logger .logExceptionAsError( new IllegalArgumentException( - "Missing required property innerTypeProperties in model EnvironmentVariableSetup")); - } else { - innerTypeProperties().validate(); + "Missing required property variableValue in model EnvironmentVariableSetup")); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/IpFirewallRuleProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/IpFirewallRuleProperties.java similarity index 95% rename from sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/IpFirewallRuleProperties.java rename to sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/IpFirewallRuleProperties.java index fa90e90d6a8d2..6645e5ee780a2 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/IpFirewallRuleProperties.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/IpFirewallRuleProperties.java @@ -2,11 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.synapse.fluent.models; +package com.azure.resourcemanager.synapse.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.ProvisioningState; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/LibraryInfo.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/LibraryInfo.java similarity index 98% rename from sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/LibraryInfo.java rename to sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/LibraryInfo.java index 621de8fb24f2e..4ad4c2dd3ab3a 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/LibraryInfo.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/LibraryInfo.java @@ -2,7 +2,7 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.synapse.fluent.models; +package com.azure.resourcemanager.synapse.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ManagedIntegrationRuntime.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ManagedIntegrationRuntime.java index cde0067bff53e..432c167858e48 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ManagedIntegrationRuntime.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ManagedIntegrationRuntime.java @@ -5,8 +5,8 @@ package com.azure.resourcemanager.synapse.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.fluent.models.ManagedIntegrationRuntimeTypeProperties; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -15,8 +15,9 @@ /** Managed integration runtime, including managed elastic and managed dedicated integration runtimes. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonTypeName("Managed") +@JsonFlatten @Fluent -public final class ManagedIntegrationRuntime extends IntegrationRuntime { +public class ManagedIntegrationRuntime extends IntegrationRuntime { @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedIntegrationRuntime.class); /* @@ -27,10 +28,16 @@ public final class ManagedIntegrationRuntime extends IntegrationRuntime { private IntegrationRuntimeState state; /* - * Managed integration runtime properties. + * The compute resource for managed integration runtime. */ - @JsonProperty(value = "typeProperties", required = true) - private ManagedIntegrationRuntimeTypeProperties innerTypeProperties = new ManagedIntegrationRuntimeTypeProperties(); + @JsonProperty(value = "typeProperties.computeProperties") + private IntegrationRuntimeComputeProperties computeProperties; + + /* + * SSIS properties for managed integration runtime. + */ + @JsonProperty(value = "typeProperties.ssisProperties") + private IntegrationRuntimeSsisProperties ssisProperties; /** * Get the state property: Integration runtime state, only valid for managed dedicated integration runtime. @@ -41,29 +48,13 @@ public IntegrationRuntimeState state() { return this.state; } - /** - * Get the innerTypeProperties property: Managed integration runtime properties. - * - * @return the innerTypeProperties value. - */ - private ManagedIntegrationRuntimeTypeProperties innerTypeProperties() { - return this.innerTypeProperties; - } - - /** {@inheritDoc} */ - @Override - public ManagedIntegrationRuntime withDescription(String description) { - super.withDescription(description); - return this; - } - /** * Get the computeProperties property: The compute resource for managed integration runtime. * * @return the computeProperties value. */ public IntegrationRuntimeComputeProperties computeProperties() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().computeProperties(); + return this.computeProperties; } /** @@ -73,10 +64,7 @@ public IntegrationRuntimeComputeProperties computeProperties() { * @return the ManagedIntegrationRuntime object itself. */ public ManagedIntegrationRuntime withComputeProperties(IntegrationRuntimeComputeProperties computeProperties) { - if (this.innerTypeProperties() == null) { - this.innerTypeProperties = new ManagedIntegrationRuntimeTypeProperties(); - } - this.innerTypeProperties().withComputeProperties(computeProperties); + this.computeProperties = computeProperties; return this; } @@ -86,7 +74,7 @@ public ManagedIntegrationRuntime withComputeProperties(IntegrationRuntimeCompute * @return the ssisProperties value. */ public IntegrationRuntimeSsisProperties ssisProperties() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().ssisProperties(); + return this.ssisProperties; } /** @@ -96,10 +84,14 @@ public IntegrationRuntimeSsisProperties ssisProperties() { * @return the ManagedIntegrationRuntime object itself. */ public ManagedIntegrationRuntime withSsisProperties(IntegrationRuntimeSsisProperties ssisProperties) { - if (this.innerTypeProperties() == null) { - this.innerTypeProperties = new ManagedIntegrationRuntimeTypeProperties(); - } - this.innerTypeProperties().withSsisProperties(ssisProperties); + this.ssisProperties = ssisProperties; + return this; + } + + /** {@inheritDoc} */ + @Override + public ManagedIntegrationRuntime withDescription(String description) { + super.withDescription(description); return this; } @@ -111,13 +103,11 @@ public ManagedIntegrationRuntime withSsisProperties(IntegrationRuntimeSsisProper @Override public void validate() { super.validate(); - if (innerTypeProperties() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property innerTypeProperties in model ManagedIntegrationRuntime")); - } else { - innerTypeProperties().validate(); + if (computeProperties() != null) { + computeProperties().validate(); + } + if (ssisProperties() != null) { + ssisProperties().validate(); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ManagedIntegrationRuntimeStatus.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ManagedIntegrationRuntimeStatus.java index 756e1ca7bd6da..ca14f7edc96c6 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ManagedIntegrationRuntimeStatus.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ManagedIntegrationRuntimeStatus.java @@ -4,9 +4,9 @@ package com.azure.resourcemanager.synapse.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.fluent.models.ManagedIntegrationRuntimeStatusTypeProperties; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -17,25 +17,35 @@ /** Managed integration runtime status. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonTypeName("Managed") -@Fluent -public final class ManagedIntegrationRuntimeStatus extends IntegrationRuntimeStatus { +@JsonFlatten +@Immutable +public class ManagedIntegrationRuntimeStatus extends IntegrationRuntimeStatus { @JsonIgnore private final ClientLogger logger = new ClientLogger(ManagedIntegrationRuntimeStatus.class); /* - * Managed integration runtime status type properties. + * The time at which the integration runtime was created, in ISO8601 + * format. */ - @JsonProperty(value = "typeProperties", required = true) - private ManagedIntegrationRuntimeStatusTypeProperties innerTypeProperties = - new ManagedIntegrationRuntimeStatusTypeProperties(); + @JsonProperty(value = "typeProperties.createTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createTime; - /** - * Get the innerTypeProperties property: Managed integration runtime status type properties. - * - * @return the innerTypeProperties value. + /* + * The list of nodes for managed integration runtime. */ - private ManagedIntegrationRuntimeStatusTypeProperties innerTypeProperties() { - return this.innerTypeProperties; - } + @JsonProperty(value = "typeProperties.nodes", access = JsonProperty.Access.WRITE_ONLY) + private List nodes; + + /* + * The errors that occurred on this integration runtime. + */ + @JsonProperty(value = "typeProperties.otherErrors", access = JsonProperty.Access.WRITE_ONLY) + private List otherErrors; + + /* + * The last operation result that occurred on this integration runtime. + */ + @JsonProperty(value = "typeProperties.lastOperation", access = JsonProperty.Access.WRITE_ONLY) + private ManagedIntegrationRuntimeOperationResult lastOperation; /** * Get the createTime property: The time at which the integration runtime was created, in ISO8601 format. @@ -43,7 +53,7 @@ private ManagedIntegrationRuntimeStatusTypeProperties innerTypeProperties() { * @return the createTime value. */ public OffsetDateTime createTime() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().createTime(); + return this.createTime; } /** @@ -52,7 +62,7 @@ public OffsetDateTime createTime() { * @return the nodes value. */ public List nodes() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().nodes(); + return this.nodes; } /** @@ -61,7 +71,7 @@ public List nodes() { * @return the otherErrors value. */ public List otherErrors() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().otherErrors(); + return this.otherErrors; } /** @@ -70,7 +80,7 @@ public List otherErrors() { * @return the lastOperation value. */ public ManagedIntegrationRuntimeOperationResult lastOperation() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().lastOperation(); + return this.lastOperation; } /** @@ -81,13 +91,14 @@ public ManagedIntegrationRuntimeOperationResult lastOperation() { @Override public void validate() { super.validate(); - if (innerTypeProperties() == null) { - throw logger - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property innerTypeProperties in model ManagedIntegrationRuntimeStatus")); - } else { - innerTypeProperties().validate(); + if (nodes() != null) { + nodes().forEach(e -> e.validate()); + } + if (otherErrors() != null) { + otherErrors().forEach(e -> e.validate()); + } + if (lastOperation() != null) { + lastOperation().validate(); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/PrivateEndpointConnectionForPrivateLinkHub.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/PrivateEndpointConnectionForPrivateLinkHub.java index a0a260d070159..ec98b90c5dd3f 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/PrivateEndpointConnectionForPrivateLinkHub.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/PrivateEndpointConnectionForPrivateLinkHub.java @@ -5,7 +5,6 @@ package com.azure.resourcemanager.synapse.models; import com.azure.resourcemanager.synapse.fluent.models.PrivateEndpointConnectionForPrivateLinkHubInner; -import com.azure.resourcemanager.synapse.fluent.models.PrivateEndpointConnectionProperties; /** An immutable client-side representation of PrivateEndpointConnectionForPrivateLinkHub. */ public interface PrivateEndpointConnectionForPrivateLinkHub { diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/PrivateEndpointConnectionForPrivateLinkHubBasic.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/PrivateEndpointConnectionForPrivateLinkHubBasic.java index 6825dc6ad0426..06b2c73194725 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/PrivateEndpointConnectionForPrivateLinkHubBasic.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/PrivateEndpointConnectionForPrivateLinkHubBasic.java @@ -5,14 +5,15 @@ package com.azure.resourcemanager.synapse.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.fluent.models.PrivateEndpointConnectionProperties; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** Private Endpoint Connection For Private Link Hub - Basic. */ +@JsonFlatten @Fluent -public final class PrivateEndpointConnectionForPrivateLinkHubBasic { +public class PrivateEndpointConnectionForPrivateLinkHubBasic { @JsonIgnore private final ClientLogger logger = new ClientLogger(PrivateEndpointConnectionForPrivateLinkHubBasic.class); @@ -23,10 +24,22 @@ public final class PrivateEndpointConnectionForPrivateLinkHubBasic { private String id; /* - * Properties of private endpoint connection for private link hub + * The private endpoint which the connection belongs to. */ - @JsonProperty(value = "properties") - private PrivateEndpointConnectionProperties innerProperties; + @JsonProperty(value = "properties.privateEndpoint") + private PrivateEndpoint privateEndpoint; + + /* + * Connection state of the private endpoint connection. + */ + @JsonProperty(value = "properties.privateLinkServiceConnectionState") + private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; + + /* + * Provisioning state of the private endpoint connection. + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; /** * Get the id property: identifier. @@ -37,22 +50,13 @@ public String id() { return this.id; } - /** - * Get the innerProperties property: Properties of private endpoint connection for private link hub. - * - * @return the innerProperties value. - */ - private PrivateEndpointConnectionProperties innerProperties() { - return this.innerProperties; - } - /** * Get the privateEndpoint property: The private endpoint which the connection belongs to. * * @return the privateEndpoint value. */ public PrivateEndpoint privateEndpoint() { - return this.innerProperties() == null ? null : this.innerProperties().privateEndpoint(); + return this.privateEndpoint; } /** @@ -62,10 +66,7 @@ public PrivateEndpoint privateEndpoint() { * @return the PrivateEndpointConnectionForPrivateLinkHubBasic object itself. */ public PrivateEndpointConnectionForPrivateLinkHubBasic withPrivateEndpoint(PrivateEndpoint privateEndpoint) { - if (this.innerProperties() == null) { - this.innerProperties = new PrivateEndpointConnectionProperties(); - } - this.innerProperties().withPrivateEndpoint(privateEndpoint); + this.privateEndpoint = privateEndpoint; return this; } @@ -75,7 +76,7 @@ public PrivateEndpointConnectionForPrivateLinkHubBasic withPrivateEndpoint(Priva * @return the privateLinkServiceConnectionState value. */ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { - return this.innerProperties() == null ? null : this.innerProperties().privateLinkServiceConnectionState(); + return this.privateLinkServiceConnectionState; } /** @@ -86,10 +87,7 @@ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { */ public PrivateEndpointConnectionForPrivateLinkHubBasic withPrivateLinkServiceConnectionState( PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { - if (this.innerProperties() == null) { - this.innerProperties = new PrivateEndpointConnectionProperties(); - } - this.innerProperties().withPrivateLinkServiceConnectionState(privateLinkServiceConnectionState); + this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; return this; } @@ -99,7 +97,7 @@ public PrivateEndpointConnectionForPrivateLinkHubBasic withPrivateLinkServiceCon * @return the provisioningState value. */ public String provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + return this.provisioningState; } /** @@ -108,8 +106,11 @@ public String provisioningState() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (privateEndpoint() != null) { + privateEndpoint().validate(); + } + if (privateLinkServiceConnectionState() != null) { + privateLinkServiceConnectionState().validate(); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/PrivateEndpointConnectionForPrivateLinkHubBasicAutoGenerated.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/PrivateEndpointConnectionForPrivateLinkHubBasicAutoGenerated.java index acb5adc46e5df..31cf7b8634e58 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/PrivateEndpointConnectionForPrivateLinkHubBasicAutoGenerated.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/PrivateEndpointConnectionForPrivateLinkHubBasicAutoGenerated.java @@ -6,7 +6,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.fluent.models.PrivateEndpointConnectionProperties; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/PrivateEndpointConnectionProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/PrivateEndpointConnectionProperties.java similarity index 94% rename from sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/PrivateEndpointConnectionProperties.java rename to sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/PrivateEndpointConnectionProperties.java index c6e3e1751decc..1f63a05d0ad8e 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/PrivateEndpointConnectionProperties.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/PrivateEndpointConnectionProperties.java @@ -2,12 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.synapse.fluent.models; +package com.azure.resourcemanager.synapse.models; import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.PrivateEndpoint; -import com.azure.resourcemanager.synapse.models.PrivateLinkServiceConnectionState; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/RecommendedSensitivityLabelUpdate.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/RecommendedSensitivityLabelUpdate.java index 8dacd4f9ee395..e9a750dfd4229 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/RecommendedSensitivityLabelUpdate.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/RecommendedSensitivityLabelUpdate.java @@ -5,31 +5,41 @@ package com.azure.resourcemanager.synapse.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.management.ProxyResource; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.fluent.models.RecommendedSensitivityLabelUpdateProperties; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; /** A recommended sensitivity label update operation. */ +@JsonFlatten @Fluent -public final class RecommendedSensitivityLabelUpdate extends ProxyResource { +public class RecommendedSensitivityLabelUpdate extends ProxyResource { @JsonIgnore private final ClientLogger logger = new ClientLogger(RecommendedSensitivityLabelUpdate.class); /* - * Resource properties. + * The op property. */ - @JsonProperty(value = "properties") - private RecommendedSensitivityLabelUpdateProperties innerProperties; + @JsonProperty(value = "properties.op") + private RecommendedSensitivityLabelUpdateKind op; - /** - * Get the innerProperties property: Resource properties. - * - * @return the innerProperties value. + /* + * Schema name of the column to update. */ - private RecommendedSensitivityLabelUpdateProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "properties.schema") + private String schema; + + /* + * Table name of the column to update. + */ + @JsonProperty(value = "properties.table") + private String table; + + /* + * Column name to update. + */ + @JsonProperty(value = "properties.column") + private String column; /** * Get the op property: The op property. @@ -37,7 +47,7 @@ private RecommendedSensitivityLabelUpdateProperties innerProperties() { * @return the op value. */ public RecommendedSensitivityLabelUpdateKind op() { - return this.innerProperties() == null ? null : this.innerProperties().op(); + return this.op; } /** @@ -47,10 +57,7 @@ public RecommendedSensitivityLabelUpdateKind op() { * @return the RecommendedSensitivityLabelUpdate object itself. */ public RecommendedSensitivityLabelUpdate withOp(RecommendedSensitivityLabelUpdateKind op) { - if (this.innerProperties() == null) { - this.innerProperties = new RecommendedSensitivityLabelUpdateProperties(); - } - this.innerProperties().withOp(op); + this.op = op; return this; } @@ -60,7 +67,7 @@ public RecommendedSensitivityLabelUpdate withOp(RecommendedSensitivityLabelUpdat * @return the schema value. */ public String schema() { - return this.innerProperties() == null ? null : this.innerProperties().schema(); + return this.schema; } /** @@ -70,10 +77,7 @@ public String schema() { * @return the RecommendedSensitivityLabelUpdate object itself. */ public RecommendedSensitivityLabelUpdate withSchema(String schema) { - if (this.innerProperties() == null) { - this.innerProperties = new RecommendedSensitivityLabelUpdateProperties(); - } - this.innerProperties().withSchema(schema); + this.schema = schema; return this; } @@ -83,7 +87,7 @@ public RecommendedSensitivityLabelUpdate withSchema(String schema) { * @return the table value. */ public String table() { - return this.innerProperties() == null ? null : this.innerProperties().table(); + return this.table; } /** @@ -93,10 +97,7 @@ public String table() { * @return the RecommendedSensitivityLabelUpdate object itself. */ public RecommendedSensitivityLabelUpdate withTable(String table) { - if (this.innerProperties() == null) { - this.innerProperties = new RecommendedSensitivityLabelUpdateProperties(); - } - this.innerProperties().withTable(table); + this.table = table; return this; } @@ -106,7 +107,7 @@ public RecommendedSensitivityLabelUpdate withTable(String table) { * @return the column value. */ public String column() { - return this.innerProperties() == null ? null : this.innerProperties().column(); + return this.column; } /** @@ -116,10 +117,7 @@ public String column() { * @return the RecommendedSensitivityLabelUpdate object itself. */ public RecommendedSensitivityLabelUpdate withColumn(String column) { - if (this.innerProperties() == null) { - this.innerProperties = new RecommendedSensitivityLabelUpdateProperties(); - } - this.innerProperties().withColumn(column); + this.column = column; return this; } @@ -129,8 +127,5 @@ public RecommendedSensitivityLabelUpdate withColumn(String column) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ReplaceAllIpFirewallRulesRequest.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ReplaceAllIpFirewallRulesRequest.java index 22fbfe4da16cc..4ed7bb95d4549 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ReplaceAllIpFirewallRulesRequest.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ReplaceAllIpFirewallRulesRequest.java @@ -6,7 +6,6 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.fluent.models.IpFirewallRuleProperties; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SelfHostedIntegrationRuntime.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SelfHostedIntegrationRuntime.java index e7bc359d883f4..ed4b25d1fb4fc 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SelfHostedIntegrationRuntime.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SelfHostedIntegrationRuntime.java @@ -5,8 +5,8 @@ package com.azure.resourcemanager.synapse.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.fluent.models.SelfHostedIntegrationRuntimeTypeProperties; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; @@ -15,33 +15,16 @@ /** Self-hosted integration runtime. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonTypeName("SelfHosted") +@JsonFlatten @Fluent -public final class SelfHostedIntegrationRuntime extends IntegrationRuntime { +public class SelfHostedIntegrationRuntime extends IntegrationRuntime { @JsonIgnore private final ClientLogger logger = new ClientLogger(SelfHostedIntegrationRuntime.class); /* - * When this property is not null, means this is a linked integration - * runtime. The property is used to access original integration runtime. + * Linked integration runtime type from data factory */ - @JsonProperty(value = "typeProperties") - private SelfHostedIntegrationRuntimeTypeProperties innerTypeProperties; - - /** - * Get the innerTypeProperties property: When this property is not null, means this is a linked integration runtime. - * The property is used to access original integration runtime. - * - * @return the innerTypeProperties value. - */ - private SelfHostedIntegrationRuntimeTypeProperties innerTypeProperties() { - return this.innerTypeProperties; - } - - /** {@inheritDoc} */ - @Override - public SelfHostedIntegrationRuntime withDescription(String description) { - super.withDescription(description); - return this; - } + @JsonProperty(value = "typeProperties.linkedInfo") + private LinkedIntegrationRuntimeType linkedInfo; /** * Get the linkedInfo property: Linked integration runtime type from data factory. @@ -49,7 +32,7 @@ public SelfHostedIntegrationRuntime withDescription(String description) { * @return the linkedInfo value. */ public LinkedIntegrationRuntimeType linkedInfo() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().linkedInfo(); + return this.linkedInfo; } /** @@ -59,10 +42,14 @@ public LinkedIntegrationRuntimeType linkedInfo() { * @return the SelfHostedIntegrationRuntime object itself. */ public SelfHostedIntegrationRuntime withLinkedInfo(LinkedIntegrationRuntimeType linkedInfo) { - if (this.innerTypeProperties() == null) { - this.innerTypeProperties = new SelfHostedIntegrationRuntimeTypeProperties(); - } - this.innerTypeProperties().withLinkedInfo(linkedInfo); + this.linkedInfo = linkedInfo; + return this; + } + + /** {@inheritDoc} */ + @Override + public SelfHostedIntegrationRuntime withDescription(String description) { + super.withDescription(description); return this; } @@ -74,8 +61,8 @@ public SelfHostedIntegrationRuntime withLinkedInfo(LinkedIntegrationRuntimeType @Override public void validate() { super.validate(); - if (innerTypeProperties() != null) { - innerTypeProperties().validate(); + if (linkedInfo() != null) { + linkedInfo().validate(); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SelfHostedIntegrationRuntimeStatus.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SelfHostedIntegrationRuntimeStatus.java index 1da6651a52c77..c9fbb05598af4 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SelfHostedIntegrationRuntimeStatus.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SelfHostedIntegrationRuntimeStatus.java @@ -5,10 +5,11 @@ package com.azure.resourcemanager.synapse.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.synapse.fluent.models.SelfHostedIntegrationRuntimeNodeInner; -import com.azure.resourcemanager.synapse.fluent.models.SelfHostedIntegrationRuntimeStatusTypeProperties; import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeName; @@ -19,25 +20,122 @@ /** Self-hosted integration runtime status. */ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type") @JsonTypeName("SelfHosted") +@JsonFlatten @Fluent -public final class SelfHostedIntegrationRuntimeStatus extends IntegrationRuntimeStatus { +public class SelfHostedIntegrationRuntimeStatus extends IntegrationRuntimeStatus { @JsonIgnore private final ClientLogger logger = new ClientLogger(SelfHostedIntegrationRuntimeStatus.class); /* - * Self-hosted integration runtime status type properties. + * The time at which the integration runtime was created, in ISO8601 + * format. */ - @JsonProperty(value = "typeProperties", required = true) - private SelfHostedIntegrationRuntimeStatusTypeProperties innerTypeProperties = - new SelfHostedIntegrationRuntimeStatusTypeProperties(); + @JsonProperty(value = "typeProperties.createTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createTime; - /** - * Get the innerTypeProperties property: Self-hosted integration runtime status type properties. - * - * @return the innerTypeProperties value. + /* + * The task queue id of the integration runtime. */ - private SelfHostedIntegrationRuntimeStatusTypeProperties innerTypeProperties() { - return this.innerTypeProperties; - } + @JsonProperty(value = "typeProperties.taskQueueId", access = JsonProperty.Access.WRITE_ONLY) + private String taskQueueId; + + /* + * The node communication Channel encryption mode + */ + @JsonProperty( + value = "typeProperties.nodeCommunicationChannelEncryptionMode", + access = JsonProperty.Access.WRITE_ONLY) + private String nodeCommunicationChannelEncryptionMode; + + /* + * It is used to set the encryption mode for node-node communication + * channel (when more than 2 self-hosted integration runtime nodes exist). + */ + @JsonProperty(value = "typeProperties.internalChannelEncryption", access = JsonProperty.Access.WRITE_ONLY) + private IntegrationRuntimeInternalChannelEncryptionMode internalChannelEncryption; + + /* + * Version of the integration runtime. + */ + @JsonProperty(value = "typeProperties.version", access = JsonProperty.Access.WRITE_ONLY) + private String version; + + /* + * The list of nodes for this integration runtime. + */ + @JsonProperty(value = "typeProperties.nodes") + private List nodes; + + /* + * The date at which the integration runtime will be scheduled to update, + * in ISO8601 format. + */ + @JsonProperty(value = "typeProperties.scheduledUpdateDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime scheduledUpdateDate; + + /* + * The time in the date scheduled by service to update the integration + * runtime, e.g., PT03H is 3 hours + */ + @JsonProperty(value = "typeProperties.updateDelayOffset", access = JsonProperty.Access.WRITE_ONLY) + private String updateDelayOffset; + + /* + * The local time zone offset in hours. + */ + @JsonProperty(value = "typeProperties.localTimeZoneOffset", access = JsonProperty.Access.WRITE_ONLY) + private String localTimeZoneOffset; + + /* + * Object with additional information about integration runtime + * capabilities. + */ + @JsonProperty(value = "typeProperties.capabilities", access = JsonProperty.Access.WRITE_ONLY) + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map capabilities; + + /* + * The URLs for the services used in integration runtime backend service. + */ + @JsonProperty(value = "typeProperties.serviceUrls", access = JsonProperty.Access.WRITE_ONLY) + private List serviceUrls; + + /* + * Whether Self-hosted integration runtime auto update has been turned on. + */ + @JsonProperty(value = "typeProperties.autoUpdate", access = JsonProperty.Access.WRITE_ONLY) + private IntegrationRuntimeAutoUpdate autoUpdate; + + /* + * Status of the integration runtime version. + */ + @JsonProperty(value = "typeProperties.versionStatus", access = JsonProperty.Access.WRITE_ONLY) + private String versionStatus; + + /* + * The list of linked integration runtimes that are created to share with + * this integration runtime. + */ + @JsonProperty(value = "typeProperties.links") + private List links; + + /* + * The version that the integration runtime is going to update to. + */ + @JsonProperty(value = "typeProperties.pushedVersion", access = JsonProperty.Access.WRITE_ONLY) + private String pushedVersion; + + /* + * The latest version on download center. + */ + @JsonProperty(value = "typeProperties.latestVersion", access = JsonProperty.Access.WRITE_ONLY) + private String latestVersion; + + /* + * The estimated time when the self-hosted integration runtime will be + * updated. + */ + @JsonProperty(value = "typeProperties.autoUpdateETA", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime autoUpdateEta; /** * Get the createTime property: The time at which the integration runtime was created, in ISO8601 format. @@ -45,7 +143,7 @@ private SelfHostedIntegrationRuntimeStatusTypeProperties innerTypeProperties() { * @return the createTime value. */ public OffsetDateTime createTime() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().createTime(); + return this.createTime; } /** @@ -54,7 +152,7 @@ public OffsetDateTime createTime() { * @return the taskQueueId value. */ public String taskQueueId() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().taskQueueId(); + return this.taskQueueId; } /** @@ -63,9 +161,7 @@ public String taskQueueId() { * @return the nodeCommunicationChannelEncryptionMode value. */ public String nodeCommunicationChannelEncryptionMode() { - return this.innerTypeProperties() == null - ? null - : this.innerTypeProperties().nodeCommunicationChannelEncryptionMode(); + return this.nodeCommunicationChannelEncryptionMode; } /** @@ -75,7 +171,7 @@ public String nodeCommunicationChannelEncryptionMode() { * @return the internalChannelEncryption value. */ public IntegrationRuntimeInternalChannelEncryptionMode internalChannelEncryption() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().internalChannelEncryption(); + return this.internalChannelEncryption; } /** @@ -84,7 +180,7 @@ public IntegrationRuntimeInternalChannelEncryptionMode internalChannelEncryption * @return the version value. */ public String version() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().version(); + return this.version; } /** @@ -93,7 +189,7 @@ public String version() { * @return the nodes value. */ public List nodes() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().nodes(); + return this.nodes; } /** @@ -103,10 +199,7 @@ public List nodes() { * @return the SelfHostedIntegrationRuntimeStatus object itself. */ public SelfHostedIntegrationRuntimeStatus withNodes(List nodes) { - if (this.innerTypeProperties() == null) { - this.innerTypeProperties = new SelfHostedIntegrationRuntimeStatusTypeProperties(); - } - this.innerTypeProperties().withNodes(nodes); + this.nodes = nodes; return this; } @@ -117,7 +210,7 @@ public SelfHostedIntegrationRuntimeStatus withNodes(List capabilities() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().capabilities(); + return this.capabilities; } /** @@ -154,7 +247,7 @@ public Map capabilities() { * @return the serviceUrls value. */ public List serviceUrls() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().serviceUrls(); + return this.serviceUrls; } /** @@ -163,7 +256,7 @@ public List serviceUrls() { * @return the autoUpdate value. */ public IntegrationRuntimeAutoUpdate autoUpdate() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().autoUpdate(); + return this.autoUpdate; } /** @@ -172,7 +265,7 @@ public IntegrationRuntimeAutoUpdate autoUpdate() { * @return the versionStatus value. */ public String versionStatus() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().versionStatus(); + return this.versionStatus; } /** @@ -182,7 +275,7 @@ public String versionStatus() { * @return the links value. */ public List links() { - return this.innerTypeProperties() == null ? null : this.innerTypeProperties().links(); + return this.links; } /** @@ -193,10 +286,7 @@ public List links() { * @return the SelfHostedIntegrationRuntimeStatus object itself. */ public SelfHostedIntegrationRuntimeStatus withLinks(List links) { - if (this.innerTypeProperties() == null) { - this.innerTypeProperties = new SelfHostedIntegrationRuntimeStatusTypeProperties(); - } - this.innerTypeProperties().withLinks(links); + this.links = links; return this; } @@ -206,7 +296,7 @@ public SelfHostedIntegrationRuntimeStatus withLinks(List e.validate()); + } + if (links() != null) { + links().forEach(e -> e.validate()); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SensitivityLabelUpdateProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SensitivityLabelUpdateProperties.java deleted file mode 100644 index d2235dfcd4593..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SensitivityLabelUpdateProperties.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.models; - -import com.azure.resourcemanager.synapse.fluent.models.SensitivityLabelUpdatePropertiesInner; - -/** An immutable client-side representation of SensitivityLabelUpdateProperties. */ -public interface SensitivityLabelUpdateProperties { - /** - * Gets the op property: The op property. - * - * @return the op value. - */ - SensitivityLabelUpdateKind op(); - - /** - * Gets the schema property: Schema name of the column to update. - * - * @return the schema value. - */ - String schema(); - - /** - * Gets the table property: Table name of the column to update. - * - * @return the table value. - */ - String table(); - - /** - * Gets the column property: Column name to update. - * - * @return the column value. - */ - String column(); - - /** - * Gets the sensitivityLabel property: The sensitivity label information to apply on a column. - * - * @return the sensitivityLabel value. - */ - SensitivityLabel sensitivityLabel(); - - /** - * Gets the inner com.azure.resourcemanager.synapse.fluent.models.SensitivityLabelUpdatePropertiesInner object. - * - * @return the inner object. - */ - SensitivityLabelUpdatePropertiesInner innerModel(); -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SqlPool.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SqlPool.java index 21a9b6932c819..549859ea87d6b 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SqlPool.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SqlPool.java @@ -105,7 +105,19 @@ public interface SqlPool { OffsetDateTime restorePointInTime(); /** - * Gets the createMode property: What is this?. + * Gets the createMode property: Specifies the mode of sqlpool creation. + * + *

Default: regular sqlpool creation. + * + *

PointInTimeRestore: Creates a sqlpool by restoring a point in time backup of an existing sqlpool. + * sourceDatabaseId must be specified as the resource ID of the existing sqlpool, and restorePointInTime must be + * specified. + * + *

Recovery: Creates a sqlpool by a geo-replicated backup. sourceDatabaseId must be specified as the + * recoverableDatabaseId to restore. + * + *

Restore: Creates a sqlpool by restoring a backup of a deleted sqlpool. SourceDatabaseId should be the + * sqlpool's original resource ID. SourceDatabaseId and sourceDatabaseDeletionDate must be specified. * * @return the createMode value. */ @@ -320,9 +332,30 @@ interface WithRestorePointInTime { /** The stage of the SqlPool definition allowing to specify createMode. */ interface WithCreateMode { /** - * Specifies the createMode property: What is this?. + * Specifies the createMode property: Specifies the mode of sqlpool creation. + * + *

Default: regular sqlpool creation. + * + *

PointInTimeRestore: Creates a sqlpool by restoring a point in time backup of an existing sqlpool. + * sourceDatabaseId must be specified as the resource ID of the existing sqlpool, and restorePointInTime + * must be specified. * - * @param createMode What is this?. + *

Recovery: Creates a sqlpool by a geo-replicated backup. sourceDatabaseId must be specified as the + * recoverableDatabaseId to restore. + * + *

Restore: Creates a sqlpool by restoring a backup of a deleted sqlpool. SourceDatabaseId should be the + * sqlpool's original resource ID. SourceDatabaseId and sourceDatabaseDeletionDate must be specified.. + * + * @param createMode Specifies the mode of sqlpool creation. + *

Default: regular sqlpool creation. + *

PointInTimeRestore: Creates a sqlpool by restoring a point in time backup of an existing sqlpool. + * sourceDatabaseId must be specified as the resource ID of the existing sqlpool, and restorePointInTime + * must be specified. + *

Recovery: Creates a sqlpool by a geo-replicated backup. sourceDatabaseId must be specified as the + * recoverableDatabaseId to restore. + *

Restore: Creates a sqlpool by restoring a backup of a deleted sqlpool. SourceDatabaseId should be + * the sqlpool's original resource ID. SourceDatabaseId and sourceDatabaseDeletionDate must be + * specified. * @return the next definition stage. */ WithCreate withCreateMode(String createMode); @@ -491,9 +524,30 @@ interface WithRestorePointInTime { /** The stage of the SqlPool update allowing to specify createMode. */ interface WithCreateMode { /** - * Specifies the createMode property: What is this?. + * Specifies the createMode property: Specifies the mode of sqlpool creation. + * + *

Default: regular sqlpool creation. + * + *

PointInTimeRestore: Creates a sqlpool by restoring a point in time backup of an existing sqlpool. + * sourceDatabaseId must be specified as the resource ID of the existing sqlpool, and restorePointInTime + * must be specified. + * + *

Recovery: Creates a sqlpool by a geo-replicated backup. sourceDatabaseId must be specified as the + * recoverableDatabaseId to restore. + * + *

Restore: Creates a sqlpool by restoring a backup of a deleted sqlpool. SourceDatabaseId should be the + * sqlpool's original resource ID. SourceDatabaseId and sourceDatabaseDeletionDate must be specified.. * - * @param createMode What is this?. + * @param createMode Specifies the mode of sqlpool creation. + *

Default: regular sqlpool creation. + *

PointInTimeRestore: Creates a sqlpool by restoring a point in time backup of an existing sqlpool. + * sourceDatabaseId must be specified as the resource ID of the existing sqlpool, and restorePointInTime + * must be specified. + *

Recovery: Creates a sqlpool by a geo-replicated backup. sourceDatabaseId must be specified as the + * recoverableDatabaseId to restore. + *

Restore: Creates a sqlpool by restoring a backup of a deleted sqlpool. SourceDatabaseId should be + * the sqlpool's original resource ID. SourceDatabaseId and sourceDatabaseDeletionDate must be + * specified. * @return the next definition stage. */ Update withCreateMode(String createMode); diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SqlPoolPatchInfo.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SqlPoolPatchInfo.java index 7d7642524a5e7..0d387d92a4d43 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SqlPoolPatchInfo.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SqlPoolPatchInfo.java @@ -5,8 +5,8 @@ package com.azure.resourcemanager.synapse.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.fluent.models.SqlPoolResourceProperties; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; @@ -14,8 +14,9 @@ import java.util.Map; /** SQL pool patch info A SQL Analytics pool patch info. */ +@JsonFlatten @Fluent -public final class SqlPoolPatchInfo { +public class SqlPoolPatchInfo { @JsonIgnore private final ClientLogger logger = new ClientLogger(SqlPoolPatchInfo.class); /* @@ -38,10 +39,84 @@ public final class SqlPoolPatchInfo { private Sku sku; /* - * SQL pool properties + * Maximum size in bytes */ - @JsonProperty(value = "properties") - private SqlPoolResourceProperties innerProperties; + @JsonProperty(value = "properties.maxSizeBytes") + private Long maxSizeBytes; + + /* + * Collation mode + */ + @JsonProperty(value = "properties.collation") + private String collation; + + /* + * Source database to create from + */ + @JsonProperty(value = "properties.sourceDatabaseId") + private String sourceDatabaseId; + + /* + * Backup database to restore from + */ + @JsonProperty(value = "properties.recoverableDatabaseId") + private String recoverableDatabaseId; + + /* + * Resource state + */ + @JsonProperty(value = "properties.provisioningState") + private String provisioningState; + + /* + * Resource status + */ + @JsonProperty(value = "properties.status") + private String status; + + /* + * Snapshot time to restore + */ + @JsonProperty(value = "properties.restorePointInTime") + private OffsetDateTime restorePointInTime; + + /* + * Specifies the mode of sqlpool creation. + * + * Default: regular sqlpool creation. + * + * PointInTimeRestore: Creates a sqlpool by restoring a point in time + * backup of an existing sqlpool. sourceDatabaseId must be specified as the + * resource ID of the existing sqlpool, and restorePointInTime must be + * specified. + * + * Recovery: Creates a sqlpool by a geo-replicated backup. sourceDatabaseId + * must be specified as the recoverableDatabaseId to restore. + * + * Restore: Creates a sqlpool by restoring a backup of a deleted sqlpool. + * SourceDatabaseId should be the sqlpool's original resource ID. + * SourceDatabaseId and sourceDatabaseDeletionDate must be specified. + */ + @JsonProperty(value = "properties.createMode") + private String createMode; + + /* + * Date the SQL pool was created + */ + @JsonProperty(value = "properties.creationDate") + private OffsetDateTime creationDate; + + /* + * The storage account type used to store backups for this sql pool. + */ + @JsonProperty(value = "properties.storageAccountType") + private StorageAccountType storageAccountType; + + /* + * Specifies the time that the sql pool was deleted + */ + @JsonProperty(value = "properties.sourceDatabaseDeletionDate") + private OffsetDateTime sourceDatabaseDeletionDate; /** * Get the tags property: Resource tags. @@ -103,22 +178,13 @@ public SqlPoolPatchInfo withSku(Sku sku) { return this; } - /** - * Get the innerProperties property: SQL pool properties. - * - * @return the innerProperties value. - */ - private SqlPoolResourceProperties innerProperties() { - return this.innerProperties; - } - /** * Get the maxSizeBytes property: Maximum size in bytes. * * @return the maxSizeBytes value. */ public Long maxSizeBytes() { - return this.innerProperties() == null ? null : this.innerProperties().maxSizeBytes(); + return this.maxSizeBytes; } /** @@ -128,10 +194,7 @@ public Long maxSizeBytes() { * @return the SqlPoolPatchInfo object itself. */ public SqlPoolPatchInfo withMaxSizeBytes(Long maxSizeBytes) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withMaxSizeBytes(maxSizeBytes); + this.maxSizeBytes = maxSizeBytes; return this; } @@ -141,7 +204,7 @@ public SqlPoolPatchInfo withMaxSizeBytes(Long maxSizeBytes) { * @return the collation value. */ public String collation() { - return this.innerProperties() == null ? null : this.innerProperties().collation(); + return this.collation; } /** @@ -151,10 +214,7 @@ public String collation() { * @return the SqlPoolPatchInfo object itself. */ public SqlPoolPatchInfo withCollation(String collation) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withCollation(collation); + this.collation = collation; return this; } @@ -164,7 +224,7 @@ public SqlPoolPatchInfo withCollation(String collation) { * @return the sourceDatabaseId value. */ public String sourceDatabaseId() { - return this.innerProperties() == null ? null : this.innerProperties().sourceDatabaseId(); + return this.sourceDatabaseId; } /** @@ -174,10 +234,7 @@ public String sourceDatabaseId() { * @return the SqlPoolPatchInfo object itself. */ public SqlPoolPatchInfo withSourceDatabaseId(String sourceDatabaseId) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withSourceDatabaseId(sourceDatabaseId); + this.sourceDatabaseId = sourceDatabaseId; return this; } @@ -187,7 +244,7 @@ public SqlPoolPatchInfo withSourceDatabaseId(String sourceDatabaseId) { * @return the recoverableDatabaseId value. */ public String recoverableDatabaseId() { - return this.innerProperties() == null ? null : this.innerProperties().recoverableDatabaseId(); + return this.recoverableDatabaseId; } /** @@ -197,10 +254,7 @@ public String recoverableDatabaseId() { * @return the SqlPoolPatchInfo object itself. */ public SqlPoolPatchInfo withRecoverableDatabaseId(String recoverableDatabaseId) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withRecoverableDatabaseId(recoverableDatabaseId); + this.recoverableDatabaseId = recoverableDatabaseId; return this; } @@ -210,7 +264,7 @@ public SqlPoolPatchInfo withRecoverableDatabaseId(String recoverableDatabaseId) * @return the provisioningState value. */ public String provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + return this.provisioningState; } /** @@ -220,10 +274,7 @@ public String provisioningState() { * @return the SqlPoolPatchInfo object itself. */ public SqlPoolPatchInfo withProvisioningState(String provisioningState) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withProvisioningState(provisioningState); + this.provisioningState = provisioningState; return this; } @@ -233,7 +284,7 @@ public SqlPoolPatchInfo withProvisioningState(String provisioningState) { * @return the status value. */ public String status() { - return this.innerProperties() == null ? null : this.innerProperties().status(); + return this.status; } /** @@ -243,10 +294,7 @@ public String status() { * @return the SqlPoolPatchInfo object itself. */ public SqlPoolPatchInfo withStatus(String status) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withStatus(status); + this.status = status; return this; } @@ -256,7 +304,7 @@ public SqlPoolPatchInfo withStatus(String status) { * @return the restorePointInTime value. */ public OffsetDateTime restorePointInTime() { - return this.innerProperties() == null ? null : this.innerProperties().restorePointInTime(); + return this.restorePointInTime; } /** @@ -266,33 +314,51 @@ public OffsetDateTime restorePointInTime() { * @return the SqlPoolPatchInfo object itself. */ public SqlPoolPatchInfo withRestorePointInTime(OffsetDateTime restorePointInTime) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withRestorePointInTime(restorePointInTime); + this.restorePointInTime = restorePointInTime; return this; } /** - * Get the createMode property: What is this?. + * Get the createMode property: Specifies the mode of sqlpool creation. + * + *

Default: regular sqlpool creation. + * + *

PointInTimeRestore: Creates a sqlpool by restoring a point in time backup of an existing sqlpool. + * sourceDatabaseId must be specified as the resource ID of the existing sqlpool, and restorePointInTime must be + * specified. + * + *

Recovery: Creates a sqlpool by a geo-replicated backup. sourceDatabaseId must be specified as the + * recoverableDatabaseId to restore. + * + *

Restore: Creates a sqlpool by restoring a backup of a deleted sqlpool. SourceDatabaseId should be the + * sqlpool's original resource ID. SourceDatabaseId and sourceDatabaseDeletionDate must be specified. * * @return the createMode value. */ public String createMode() { - return this.innerProperties() == null ? null : this.innerProperties().createMode(); + return this.createMode; } /** - * Set the createMode property: What is this?. + * Set the createMode property: Specifies the mode of sqlpool creation. + * + *

Default: regular sqlpool creation. + * + *

PointInTimeRestore: Creates a sqlpool by restoring a point in time backup of an existing sqlpool. + * sourceDatabaseId must be specified as the resource ID of the existing sqlpool, and restorePointInTime must be + * specified. + * + *

Recovery: Creates a sqlpool by a geo-replicated backup. sourceDatabaseId must be specified as the + * recoverableDatabaseId to restore. + * + *

Restore: Creates a sqlpool by restoring a backup of a deleted sqlpool. SourceDatabaseId should be the + * sqlpool's original resource ID. SourceDatabaseId and sourceDatabaseDeletionDate must be specified. * * @param createMode the createMode value to set. * @return the SqlPoolPatchInfo object itself. */ public SqlPoolPatchInfo withCreateMode(String createMode) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withCreateMode(createMode); + this.createMode = createMode; return this; } @@ -302,7 +368,7 @@ public SqlPoolPatchInfo withCreateMode(String createMode) { * @return the creationDate value. */ public OffsetDateTime creationDate() { - return this.innerProperties() == null ? null : this.innerProperties().creationDate(); + return this.creationDate; } /** @@ -312,10 +378,7 @@ public OffsetDateTime creationDate() { * @return the SqlPoolPatchInfo object itself. */ public SqlPoolPatchInfo withCreationDate(OffsetDateTime creationDate) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withCreationDate(creationDate); + this.creationDate = creationDate; return this; } @@ -325,7 +388,7 @@ public SqlPoolPatchInfo withCreationDate(OffsetDateTime creationDate) { * @return the storageAccountType value. */ public StorageAccountType storageAccountType() { - return this.innerProperties() == null ? null : this.innerProperties().storageAccountType(); + return this.storageAccountType; } /** @@ -335,10 +398,7 @@ public StorageAccountType storageAccountType() { * @return the SqlPoolPatchInfo object itself. */ public SqlPoolPatchInfo withStorageAccountType(StorageAccountType storageAccountType) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withStorageAccountType(storageAccountType); + this.storageAccountType = storageAccountType; return this; } @@ -348,7 +408,7 @@ public SqlPoolPatchInfo withStorageAccountType(StorageAccountType storageAccount * @return the sourceDatabaseDeletionDate value. */ public OffsetDateTime sourceDatabaseDeletionDate() { - return this.innerProperties() == null ? null : this.innerProperties().sourceDatabaseDeletionDate(); + return this.sourceDatabaseDeletionDate; } /** @@ -358,10 +418,7 @@ public OffsetDateTime sourceDatabaseDeletionDate() { * @return the SqlPoolPatchInfo object itself. */ public SqlPoolPatchInfo withSourceDatabaseDeletionDate(OffsetDateTime sourceDatabaseDeletionDate) { - if (this.innerProperties() == null) { - this.innerProperties = new SqlPoolResourceProperties(); - } - this.innerProperties().withSourceDatabaseDeletionDate(sourceDatabaseDeletionDate); + this.sourceDatabaseDeletionDate = sourceDatabaseDeletionDate; return this; } @@ -374,8 +431,5 @@ public void validate() { if (sku() != null) { sku().validate(); } - if (innerProperties() != null) { - innerProperties().validate(); - } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/WorkloadGroup.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/WorkloadGroup.java index 09c0c122d9a34..220bb67fcd17b 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/WorkloadGroup.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/WorkloadGroup.java @@ -35,21 +35,21 @@ public interface WorkloadGroup { * * @return the minResourcePercent value. */ - int minResourcePercent(); + Integer minResourcePercent(); /** * Gets the maxResourcePercent property: The workload group cap percentage resource. * * @return the maxResourcePercent value. */ - int maxResourcePercent(); + Integer maxResourcePercent(); /** * Gets the minResourcePercentPerRequest property: The workload group request minimum grant percentage. * * @return the minResourcePercentPerRequest value. */ - double minResourcePercentPerRequest(); + Double minResourcePercentPerRequest(); /** * Gets the maxResourcePercentPerRequest property: The workload group request maximum grant percentage. @@ -134,7 +134,7 @@ interface WithMinResourcePercent { * @param minResourcePercent The workload group minimum percentage resource. * @return the next definition stage. */ - WithCreate withMinResourcePercent(int minResourcePercent); + WithCreate withMinResourcePercent(Integer minResourcePercent); } /** The stage of the WorkloadGroup definition allowing to specify maxResourcePercent. */ interface WithMaxResourcePercent { @@ -144,7 +144,7 @@ interface WithMaxResourcePercent { * @param maxResourcePercent The workload group cap percentage resource. * @return the next definition stage. */ - WithCreate withMaxResourcePercent(int maxResourcePercent); + WithCreate withMaxResourcePercent(Integer maxResourcePercent); } /** The stage of the WorkloadGroup definition allowing to specify minResourcePercentPerRequest. */ interface WithMinResourcePercentPerRequest { @@ -155,7 +155,7 @@ interface WithMinResourcePercentPerRequest { * @param minResourcePercentPerRequest The workload group request minimum grant percentage. * @return the next definition stage. */ - WithCreate withMinResourcePercentPerRequest(double minResourcePercentPerRequest); + WithCreate withMinResourcePercentPerRequest(Double minResourcePercentPerRequest); } /** The stage of the WorkloadGroup definition allowing to specify maxResourcePercentPerRequest. */ interface WithMaxResourcePercentPerRequest { @@ -229,7 +229,7 @@ interface WithMinResourcePercent { * @param minResourcePercent The workload group minimum percentage resource. * @return the next definition stage. */ - Update withMinResourcePercent(int minResourcePercent); + Update withMinResourcePercent(Integer minResourcePercent); } /** The stage of the WorkloadGroup update allowing to specify maxResourcePercent. */ interface WithMaxResourcePercent { @@ -239,7 +239,7 @@ interface WithMaxResourcePercent { * @param maxResourcePercent The workload group cap percentage resource. * @return the next definition stage. */ - Update withMaxResourcePercent(int maxResourcePercent); + Update withMaxResourcePercent(Integer maxResourcePercent); } /** The stage of the WorkloadGroup update allowing to specify minResourcePercentPerRequest. */ interface WithMinResourcePercentPerRequest { @@ -250,7 +250,7 @@ interface WithMinResourcePercentPerRequest { * @param minResourcePercentPerRequest The workload group request minimum grant percentage. * @return the next definition stage. */ - Update withMinResourcePercentPerRequest(double minResourcePercentPerRequest); + Update withMinResourcePercentPerRequest(Double minResourcePercentPerRequest); } /** The stage of the WorkloadGroup update allowing to specify maxResourcePercentPerRequest. */ interface WithMaxResourcePercentPerRequest { diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/WorkspacePatchInfo.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/WorkspacePatchInfo.java index 544454021d6f0..6defdc5759d08 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/WorkspacePatchInfo.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/WorkspacePatchInfo.java @@ -5,16 +5,17 @@ package com.azure.resourcemanager.synapse.models; import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.JsonFlatten; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.fluent.models.WorkspacePatchProperties; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; /** Workspace patch details. */ +@JsonFlatten @Fluent -public final class WorkspacePatchInfo { +public class WorkspacePatchInfo { @JsonIgnore private final ClientLogger logger = new ClientLogger(WorkspacePatchInfo.class); /* @@ -31,10 +32,46 @@ public final class WorkspacePatchInfo { private ManagedIdentity identity; /* - * Workspace patch properties + * SQL administrator login password */ - @JsonProperty(value = "properties") - private WorkspacePatchProperties innerProperties; + @JsonProperty(value = "properties.sqlAdministratorLoginPassword") + private String sqlAdministratorLoginPassword; + + /* + * Managed Virtual Network Settings + */ + @JsonProperty(value = "properties.managedVirtualNetworkSettings") + private ManagedVirtualNetworkSettings managedVirtualNetworkSettings; + + /* + * Git integration settings + */ + @JsonProperty(value = "properties.workspaceRepositoryConfiguration") + private WorkspaceRepositoryConfiguration workspaceRepositoryConfiguration; + + /* + * Purview Configuration + */ + @JsonProperty(value = "properties.purviewConfiguration") + private PurviewConfiguration purviewConfiguration; + + /* + * Resource provisioning state + */ + @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private String provisioningState; + + /* + * The encryption details of the workspace + */ + @JsonProperty(value = "properties.encryption") + private EncryptionDetails encryption; + + /* + * Enable or Disable public network access to workspace + */ + @JsonProperty(value = "properties.publicNetworkAccess") + private WorkspacePublicNetworkAccess publicNetworkAccess; /** * Get the tags property: Resource tags. @@ -76,22 +113,13 @@ public WorkspacePatchInfo withIdentity(ManagedIdentity identity) { return this; } - /** - * Get the innerProperties property: Workspace patch properties. - * - * @return the innerProperties value. - */ - private WorkspacePatchProperties innerProperties() { - return this.innerProperties; - } - /** * Get the sqlAdministratorLoginPassword property: SQL administrator login password. * * @return the sqlAdministratorLoginPassword value. */ public String sqlAdministratorLoginPassword() { - return this.innerProperties() == null ? null : this.innerProperties().sqlAdministratorLoginPassword(); + return this.sqlAdministratorLoginPassword; } /** @@ -101,10 +129,7 @@ public String sqlAdministratorLoginPassword() { * @return the WorkspacePatchInfo object itself. */ public WorkspacePatchInfo withSqlAdministratorLoginPassword(String sqlAdministratorLoginPassword) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePatchProperties(); - } - this.innerProperties().withSqlAdministratorLoginPassword(sqlAdministratorLoginPassword); + this.sqlAdministratorLoginPassword = sqlAdministratorLoginPassword; return this; } @@ -114,7 +139,7 @@ public WorkspacePatchInfo withSqlAdministratorLoginPassword(String sqlAdministra * @return the managedVirtualNetworkSettings value. */ public ManagedVirtualNetworkSettings managedVirtualNetworkSettings() { - return this.innerProperties() == null ? null : this.innerProperties().managedVirtualNetworkSettings(); + return this.managedVirtualNetworkSettings; } /** @@ -125,10 +150,7 @@ public ManagedVirtualNetworkSettings managedVirtualNetworkSettings() { */ public WorkspacePatchInfo withManagedVirtualNetworkSettings( ManagedVirtualNetworkSettings managedVirtualNetworkSettings) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePatchProperties(); - } - this.innerProperties().withManagedVirtualNetworkSettings(managedVirtualNetworkSettings); + this.managedVirtualNetworkSettings = managedVirtualNetworkSettings; return this; } @@ -138,7 +160,7 @@ public WorkspacePatchInfo withManagedVirtualNetworkSettings( * @return the workspaceRepositoryConfiguration value. */ public WorkspaceRepositoryConfiguration workspaceRepositoryConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().workspaceRepositoryConfiguration(); + return this.workspaceRepositoryConfiguration; } /** @@ -149,10 +171,7 @@ public WorkspaceRepositoryConfiguration workspaceRepositoryConfiguration() { */ public WorkspacePatchInfo withWorkspaceRepositoryConfiguration( WorkspaceRepositoryConfiguration workspaceRepositoryConfiguration) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePatchProperties(); - } - this.innerProperties().withWorkspaceRepositoryConfiguration(workspaceRepositoryConfiguration); + this.workspaceRepositoryConfiguration = workspaceRepositoryConfiguration; return this; } @@ -162,7 +181,7 @@ public WorkspacePatchInfo withWorkspaceRepositoryConfiguration( * @return the purviewConfiguration value. */ public PurviewConfiguration purviewConfiguration() { - return this.innerProperties() == null ? null : this.innerProperties().purviewConfiguration(); + return this.purviewConfiguration; } /** @@ -172,10 +191,7 @@ public PurviewConfiguration purviewConfiguration() { * @return the WorkspacePatchInfo object itself. */ public WorkspacePatchInfo withPurviewConfiguration(PurviewConfiguration purviewConfiguration) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePatchProperties(); - } - this.innerProperties().withPurviewConfiguration(purviewConfiguration); + this.purviewConfiguration = purviewConfiguration; return this; } @@ -185,7 +201,7 @@ public WorkspacePatchInfo withPurviewConfiguration(PurviewConfiguration purviewC * @return the provisioningState value. */ public String provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + return this.provisioningState; } /** @@ -194,7 +210,7 @@ public String provisioningState() { * @return the encryption value. */ public EncryptionDetails encryption() { - return this.innerProperties() == null ? null : this.innerProperties().encryption(); + return this.encryption; } /** @@ -204,10 +220,7 @@ public EncryptionDetails encryption() { * @return the WorkspacePatchInfo object itself. */ public WorkspacePatchInfo withEncryption(EncryptionDetails encryption) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePatchProperties(); - } - this.innerProperties().withEncryption(encryption); + this.encryption = encryption; return this; } @@ -217,7 +230,7 @@ public WorkspacePatchInfo withEncryption(EncryptionDetails encryption) { * @return the publicNetworkAccess value. */ public WorkspacePublicNetworkAccess publicNetworkAccess() { - return this.innerProperties() == null ? null : this.innerProperties().publicNetworkAccess(); + return this.publicNetworkAccess; } /** @@ -227,10 +240,7 @@ public WorkspacePublicNetworkAccess publicNetworkAccess() { * @return the WorkspacePatchInfo object itself. */ public WorkspacePatchInfo withPublicNetworkAccess(WorkspacePublicNetworkAccess publicNetworkAccess) { - if (this.innerProperties() == null) { - this.innerProperties = new WorkspacePatchProperties(); - } - this.innerProperties().withPublicNetworkAccess(publicNetworkAccess); + this.publicNetworkAccess = publicNetworkAccess; return this; } @@ -243,8 +253,17 @@ public void validate() { if (identity() != null) { identity().validate(); } - if (innerProperties() != null) { - innerProperties().validate(); + if (managedVirtualNetworkSettings() != null) { + managedVirtualNetworkSettings().validate(); + } + if (workspaceRepositoryConfiguration() != null) { + workspaceRepositoryConfiguration().validate(); + } + if (purviewConfiguration() != null) { + purviewConfiguration().validate(); + } + if (encryption() != null) { + encryption().validate(); } } } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/AzureADOnlyAuthenticationsCreateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/AzureADOnlyAuthenticationsCreateSamples.java deleted file mode 100644 index 53d1be7f12273..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/AzureADOnlyAuthenticationsCreateSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.resourcemanager.synapse.models.AzureADOnlyAuthenticationName; - -/** Samples for AzureADOnlyAuthentications Create. */ -public final class AzureADOnlyAuthenticationsCreateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateAzureADOnlyAuthentication.json - */ - /** - * Sample code: Create or Update Azure Active Directory Only Authentication property. - * - * @param manager Entry point to SynapseManager. - */ - public static void createOrUpdateAzureActiveDirectoryOnlyAuthenticationProperty( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .azureADOnlyAuthentications() - .define(AzureADOnlyAuthenticationName.DEFAULT) - .withExistingWorkspace("workspace-6852", "workspace-2080") - .withAzureADOnlyAuthentication(true) - .create(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/AzureADOnlyAuthenticationsGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/AzureADOnlyAuthenticationsGetSamples.java deleted file mode 100644 index c857e49417cd7..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/AzureADOnlyAuthenticationsGetSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.AzureADOnlyAuthenticationName; - -/** Samples for AzureADOnlyAuthentications Get. */ -public final class AzureADOnlyAuthenticationsGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetAzureADOnlyAuthentication.json - */ - /** - * Sample code: Get Azure Active Directory Only Authentication property. - * - * @param manager Entry point to SynapseManager. - */ - public static void getAzureActiveDirectoryOnlyAuthenticationProperty( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .azureADOnlyAuthentications() - .getWithResponse("workspace-6852", "workspace-2080", AzureADOnlyAuthenticationName.DEFAULT, Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/AzureADOnlyAuthenticationsListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/AzureADOnlyAuthenticationsListSamples.java deleted file mode 100644 index 4fd7e10b5301a..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/AzureADOnlyAuthenticationsListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for AzureADOnlyAuthentications List. */ -public final class AzureADOnlyAuthenticationsListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListAzureADOnlyAuthentication.json - */ - /** - * Sample code: Get a list of Azure Active Directory Only Authentication property. - * - * @param manager Entry point to SynapseManager. - */ - public static void getAListOfAzureActiveDirectoryOnlyAuthenticationProperty( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.azureADOnlyAuthentications().list("workspace-6852", "workspace-2080", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsCreateOrUpdateSamples.java deleted file mode 100644 index fa52362ed325c..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsCreateOrUpdateSamples.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.resourcemanager.synapse.models.AutoPauseProperties; -import com.azure.resourcemanager.synapse.models.AutoScaleProperties; -import com.azure.resourcemanager.synapse.models.LibraryRequirements; -import com.azure.resourcemanager.synapse.models.NodeSize; -import com.azure.resourcemanager.synapse.models.NodeSizeFamily; -import java.util.HashMap; -import java.util.Map; - -/** Samples for BigDataPools CreateOrUpdate. */ -public final class BigDataPoolsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/CreateOrUpdateBigDataPool.json - */ - /** - * Sample code: Create or update a Big Data pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void createOrUpdateABigDataPool(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .bigDataPools() - .define("ExamplePool") - .withRegion("West US 2") - .withExistingWorkspace("ExampleResourceGroup", "ExampleWorkspace") - .withTags(mapOf("key", "value")) - .withAutoScale(new AutoScaleProperties().withMinNodeCount(3).withEnabled(true).withMaxNodeCount(50)) - .withAutoPause(new AutoPauseProperties().withDelayInMinutes(15).withEnabled(true)) - .withSparkEventsFolder("/events") - .withNodeCount(4) - .withLibraryRequirements(new LibraryRequirements().withContent("").withFilename("requirements.txt")) - .withSparkVersion("2.4") - .withDefaultSparkLogFolder("/logs") - .withNodeSize(NodeSize.MEDIUM) - .withNodeSizeFamily(NodeSizeFamily.MEMORY_OPTIMIZED) - .create(); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsDeleteSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsDeleteSamples.java deleted file mode 100644 index 41a64e0ac88be..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsDeleteSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for BigDataPools Delete. */ -public final class BigDataPoolsDeleteSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/DeleteBigDataPool.json - */ - /** - * Sample code: Delete a Big Data pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void deleteABigDataPool(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.bigDataPools().delete("ExampleResourceGroup", "ExampleWorkspace", "ExamplePool", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsGetSamples.java deleted file mode 100644 index 2a96cacb974dd..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsGetSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for BigDataPools Get. */ -public final class BigDataPoolsGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/GetBigDataPool.json - */ - /** - * Sample code: Get a Big Data pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void getABigDataPool(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.bigDataPools().getWithResponse("ExampleResourceGroup", "ExampleWorkspace", "ExamplePool", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsListByWorkspaceSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsListByWorkspaceSamples.java deleted file mode 100644 index c77f1cce82518..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsListByWorkspaceSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for BigDataPools ListByWorkspace. */ -public final class BigDataPoolsListByWorkspaceSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/ListBigDataPoolsInWorkspace.json - */ - /** - * Sample code: List Big Data pools in a workspace. - * - * @param manager Entry point to SynapseManager. - */ - public static void listBigDataPoolsInAWorkspace(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.bigDataPools().listByWorkspace("ExampleResourceGroup", "ExampleWorkspace", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsUpdateSamples.java deleted file mode 100644 index 4b26d8e909a23..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsUpdateSamples.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.BigDataPoolResourceInfo; -import java.util.HashMap; -import java.util.Map; - -/** Samples for BigDataPools Update. */ -public final class BigDataPoolsUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/UpdateBigDataPool.json - */ - /** - * Sample code: Update a Big Data pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void updateABigDataPool(com.azure.resourcemanager.synapse.SynapseManager manager) { - BigDataPoolResourceInfo resource = - manager - .bigDataPools() - .getWithResponse("ExampleResourceGroup", "ExampleWorkspace", "ExamplePool", Context.NONE) - .getValue(); - resource.update().withTags(mapOf("key", "value")).apply(); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/DataMaskingPoliciesCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/DataMaskingPoliciesCreateOrUpdateSamples.java deleted file mode 100644 index 892ada1f093fa..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/DataMaskingPoliciesCreateOrUpdateSamples.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.resourcemanager.synapse.models.DataMaskingState; - -/** Samples for DataMaskingPolicies CreateOrUpdate. */ -public final class DataMaskingPoliciesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DataMaskingPolicyCreateOrUpdateMin.json - */ - /** - * Sample code: Create or update data masking policy min. - * - * @param manager Entry point to SynapseManager. - */ - public static void createOrUpdateDataMaskingPolicyMin(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .dataMaskingPolicies() - .define() - .withExistingSqlPool("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331") - .withDataMaskingState(DataMaskingState.ENABLED) - .create(); - } - - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DataMaskingPolicyCreateOrUpdateMax.json - */ - /** - * Sample code: Create or update data masking policy max. - * - * @param manager Entry point to SynapseManager. - */ - public static void createOrUpdateDataMaskingPolicyMax(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .dataMaskingPolicies() - .define() - .withExistingSqlPool("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331") - .withDataMaskingState(DataMaskingState.ENABLED) - .withExemptPrincipals("testuser;") - .create(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/DataMaskingPoliciesGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/DataMaskingPoliciesGetSamples.java deleted file mode 100644 index a1cecd3644105..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/DataMaskingPoliciesGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for DataMaskingPolicies Get. */ -public final class DataMaskingPoliciesGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DataMaskingPolicyGet.json - */ - /** - * Sample code: Get data masking policy. - * - * @param manager Entry point to SynapseManager. - */ - public static void getDataMaskingPolicy(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .dataMaskingPolicies() - .getWithResponse("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/DataMaskingRulesCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/DataMaskingRulesCreateOrUpdateSamples.java deleted file mode 100644 index fc531d93c50f0..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/DataMaskingRulesCreateOrUpdateSamples.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.resourcemanager.synapse.models.DataMaskingFunction; -import com.azure.resourcemanager.synapse.models.DataMaskingRuleState; - -/** Samples for DataMaskingRules CreateOrUpdate. */ -public final class DataMaskingRulesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DataMaskingRuleCreateOrUpdateDefaultMin.json - */ - /** - * Sample code: Create/Update data masking rule for default min. - * - * @param manager Entry point to SynapseManager. - */ - public static void createUpdateDataMaskingRuleForDefaultMin( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .dataMaskingRules() - .define("rule1") - .withExistingSqlPool("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331") - .withSchemaName("dbo") - .withTableName("Table_1") - .withColumnName("test1") - .withMaskingFunction(DataMaskingFunction.DEFAULT) - .create(); - } - - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DataMaskingRuleCreateOrUpdateDefaultMax.json - */ - /** - * Sample code: Create/Update data masking rule for default max. - * - * @param manager Entry point to SynapseManager. - */ - public static void createUpdateDataMaskingRuleForDefaultMax( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .dataMaskingRules() - .define("rule1") - .withExistingSqlPool("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331") - .withAliasName("nickname") - .withRuleState(DataMaskingRuleState.ENABLED) - .withSchemaName("dbo") - .withTableName("Table_1") - .withColumnName("test1") - .withMaskingFunction(DataMaskingFunction.DEFAULT) - .create(); - } - - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DataMaskingRuleCreateOrUpdateText.json - */ - /** - * Sample code: Create/Update data masking rule for text. - * - * @param manager Entry point to SynapseManager. - */ - public static void createUpdateDataMaskingRuleForText(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .dataMaskingRules() - .define("rule1") - .withExistingSqlPool("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331") - .withSchemaName("dbo") - .withTableName("Table_1") - .withColumnName("test1") - .withMaskingFunction(DataMaskingFunction.TEXT) - .withPrefixSize("1") - .withSuffixSize("0") - .withReplacementString("asdf") - .create(); - } - - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DataMaskingRuleCreateOrUpdateNumber.json - */ - /** - * Sample code: Create/Update data masking rule for numbers. - * - * @param manager Entry point to SynapseManager. - */ - public static void createUpdateDataMaskingRuleForNumbers(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .dataMaskingRules() - .define("rule1") - .withExistingSqlPool("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331") - .withSchemaName("dbo") - .withTableName("Table_1") - .withColumnName("test1") - .withMaskingFunction(DataMaskingFunction.NUMBER) - .withNumberFrom("0") - .withNumberTo("2") - .create(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/DataMaskingRulesGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/DataMaskingRulesGetSamples.java deleted file mode 100644 index f6d8ebb739e68..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/DataMaskingRulesGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for DataMaskingRules Get. */ -public final class DataMaskingRulesGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DataMaskingRuleGet.json - */ - /** - * Sample code: Get data masking rule. - * - * @param manager Entry point to SynapseManager. - */ - public static void getDataMaskingRule(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .dataMaskingRules() - .getWithResponse("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", "rule1", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/DataMaskingRulesListBySqlPoolSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/DataMaskingRulesListBySqlPoolSamples.java deleted file mode 100644 index c6c163b994612..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/DataMaskingRulesListBySqlPoolSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for DataMaskingRules ListBySqlPool. */ -public final class DataMaskingRulesListBySqlPoolSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DataMaskingRuleList.json - */ - /** - * Sample code: List data masking rules. - * - * @param manager Entry point to SynapseManager. - */ - public static void listDataMaskingRules(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .dataMaskingRules() - .listBySqlPool("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-331", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/ExtendedSqlPoolBlobAuditingPoliciesCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/ExtendedSqlPoolBlobAuditingPoliciesCreateOrUpdateSamples.java deleted file mode 100644 index aa3df1b552eb8..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/ExtendedSqlPoolBlobAuditingPoliciesCreateOrUpdateSamples.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.resourcemanager.synapse.models.BlobAuditingPolicyState; -import java.util.Arrays; -import java.util.UUID; - -/** Samples for ExtendedSqlPoolBlobAuditingPolicies CreateOrUpdate. */ -public final class ExtendedSqlPoolBlobAuditingPoliciesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ExtendedSqlPoolBlobAuditingCreateMax.json - */ - /** - * Sample code: Create or update an extended Sql pool's blob auditing policy with all parameters. - * - * @param manager Entry point to SynapseManager. - */ - public static void createOrUpdateAnExtendedSqlPoolSBlobAuditingPolicyWithAllParameters( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .extendedSqlPoolBlobAuditingPolicies() - .define() - .withExistingSqlPool("blobauditingtest-4799", "blobauditingtest-6440", "testdb") - .withPredicateExpression("statement = 'select 1'") - .withState(BlobAuditingPolicyState.ENABLED) - .withStorageEndpoint("https://mystorage.blob.core.windows.net") - .withStorageAccountAccessKey( - "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==") - .withRetentionDays(6) - .withAuditActionsAndGroups( - Arrays - .asList( - "DATABASE_LOGOUT_GROUP", - "DATABASE_ROLE_MEMBER_CHANGE_GROUP", - "UPDATE on database::TestDatabaseName by public")) - .withStorageAccountSubscriptionId(UUID.fromString("00000000-1234-0000-5678-000000000000")) - .withIsStorageSecondaryKeyInUse(false) - .withIsAzureMonitorTargetEnabled(true) - .create(); - } - - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ExtendedSqlPoolAzureMonitorAuditingCreateMin.json - */ - /** - * Sample code: Create or update an extended SQL pool's azure monitor auditing policy with minimal parameters. - * - * @param manager Entry point to SynapseManager. - */ - public static void createOrUpdateAnExtendedSQLPoolSAzureMonitorAuditingPolicyWithMinimalParameters( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .extendedSqlPoolBlobAuditingPolicies() - .define() - .withExistingSqlPool("blobauditingtest-4799", "blobauditingtest-6440", "testdb") - .withState(BlobAuditingPolicyState.ENABLED) - .withIsAzureMonitorTargetEnabled(true) - .create(); - } - - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ExtendedSqlPoolBlobAuditingCreateMin.json - */ - /** - * Sample code: Create or update an extended Sql pool's blob auditing policy with minimal parameters. - * - * @param manager Entry point to SynapseManager. - */ - public static void createOrUpdateAnExtendedSqlPoolSBlobAuditingPolicyWithMinimalParameters( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .extendedSqlPoolBlobAuditingPolicies() - .define() - .withExistingSqlPool("blobauditingtest-4799", "blobauditingtest-6440", "testdb") - .withState(BlobAuditingPolicyState.ENABLED) - .withStorageEndpoint("https://mystorage.blob.core.windows.net") - .withStorageAccountAccessKey( - "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==") - .create(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/ExtendedSqlPoolBlobAuditingPoliciesGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/ExtendedSqlPoolBlobAuditingPoliciesGetSamples.java deleted file mode 100644 index eb75358de60c4..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/ExtendedSqlPoolBlobAuditingPoliciesGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for ExtendedSqlPoolBlobAuditingPolicies Get. */ -public final class ExtendedSqlPoolBlobAuditingPoliciesGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ExtendedSqlPoolBlobAuditingGet.json - */ - /** - * Sample code: Get an extended database's blob auditing policy. - * - * @param manager Entry point to SynapseManager. - */ - public static void getAnExtendedDatabaseSBlobAuditingPolicy( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .extendedSqlPoolBlobAuditingPolicies() - .getWithResponse("blobauditingtest-6852", "blobauditingtest-2080", "testdb", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/ExtendedSqlPoolBlobAuditingPoliciesListBySqlPoolSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/ExtendedSqlPoolBlobAuditingPoliciesListBySqlPoolSamples.java deleted file mode 100644 index f05310880dc9c..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/ExtendedSqlPoolBlobAuditingPoliciesListBySqlPoolSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for ExtendedSqlPoolBlobAuditingPolicies ListBySqlPool. */ -public final class ExtendedSqlPoolBlobAuditingPoliciesListBySqlPoolSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolExtendedAuditingSettingsList.json - */ - /** - * Sample code: List extended auditing settings of a database. - * - * @param manager Entry point to SynapseManager. - */ - public static void listExtendedAuditingSettingsOfADatabase( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .extendedSqlPoolBlobAuditingPolicies() - .listBySqlPool("blobauditingtest-6852", "blobauditingtest-2080", "testdb", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeAuthKeysOperationListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeAuthKeysOperationListSamples.java deleted file mode 100644 index eed93f9f5f396..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeAuthKeysOperationListSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for IntegrationRuntimeAuthKeysOperation List. */ -public final class IntegrationRuntimeAuthKeysOperationListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_ListAuthKeys.json - */ - /** - * Sample code: List auth keys. - * - * @param manager Entry point to SynapseManager. - */ - public static void listAuthKeys(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .integrationRuntimeAuthKeysOperations() - .listWithResponse("exampleResourceGroup", "exampleWorkspace", "exampleIntegrationRuntime", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeAuthKeysOperationRegenerateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeAuthKeysOperationRegenerateSamples.java deleted file mode 100644 index b97b9b48653e6..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeAuthKeysOperationRegenerateSamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeAuthKeyName; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeRegenerateKeyParameters; - -/** Samples for IntegrationRuntimeAuthKeysOperation Regenerate. */ -public final class IntegrationRuntimeAuthKeysOperationRegenerateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_RegenerateAuthKey.json - */ - /** - * Sample code: Regenerate auth key. - * - * @param manager Entry point to SynapseManager. - */ - public static void regenerateAuthKey(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .integrationRuntimeAuthKeysOperations() - .regenerateWithResponse( - "exampleResourceGroup", - "exampleWorkspace", - "exampleIntegrationRuntime", - new IntegrationRuntimeRegenerateKeyParameters().withKeyName(IntegrationRuntimeAuthKeyName.AUTH_KEY2), - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeConnectionInfosGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeConnectionInfosGetSamples.java deleted file mode 100644 index 28ee828950bc0..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeConnectionInfosGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for IntegrationRuntimeConnectionInfos Get. */ -public final class IntegrationRuntimeConnectionInfosGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_GetConnectionInfo.json - */ - /** - * Sample code: Get connection info. - * - * @param manager Entry point to SynapseManager. - */ - public static void getConnectionInfo(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .integrationRuntimeConnectionInfos() - .getWithResponse("exampleResourceGroup", "exampleWorkspace", "exampleIntegrationRuntime", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeCredentialsSyncSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeCredentialsSyncSamples.java deleted file mode 100644 index 0b06e39665792..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeCredentialsSyncSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for IntegrationRuntimeCredentials Sync. */ -public final class IntegrationRuntimeCredentialsSyncSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_SyncCredentials.json - */ - /** - * Sample code: Sync credentials. - * - * @param manager Entry point to SynapseManager. - */ - public static void syncCredentials(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .integrationRuntimeCredentials() - .syncWithResponse("exampleResourceGroup", "exampleWorkspace", "exampleIntegrationRuntime", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeMonitoringDataListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeMonitoringDataListSamples.java deleted file mode 100644 index cca065b017da6..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeMonitoringDataListSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for IntegrationRuntimeMonitoringData List. */ -public final class IntegrationRuntimeMonitoringDataListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimeMonitoringData_List.json - */ - /** - * Sample code: Get monitoring data. - * - * @param manager Entry point to SynapseManager. - */ - public static void getMonitoringData(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .integrationRuntimeMonitoringDatas() - .listWithResponse("exampleResourceGroup", "exampleWorkspace", "exampleIntegrationRuntime", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodeIpAddressOperationGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodeIpAddressOperationGetSamples.java deleted file mode 100644 index bf3d1702ee835..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodeIpAddressOperationGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for IntegrationRuntimeNodeIpAddressOperation Get. */ -public final class IntegrationRuntimeNodeIpAddressOperationGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimeNodes_GetIpAddress.json - */ - /** - * Sample code: Get integration runtime node IP address. - * - * @param manager Entry point to SynapseManager. - */ - public static void getIntegrationRuntimeNodeIPAddress(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .integrationRuntimeNodeIpAddressOperations() - .getWithResponse( - "exampleResourceGroup", "exampleWorkspace", "exampleIntegrationRuntime", "Node_1", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodesDeleteSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodesDeleteSamples.java deleted file mode 100644 index 2570848206954..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodesDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for IntegrationRuntimeNodes Delete. */ -public final class IntegrationRuntimeNodesDeleteSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimeNodes_Delete.json - */ - /** - * Sample code: Delete integration runtime node. - * - * @param manager Entry point to SynapseManager. - */ - public static void deleteIntegrationRuntimeNode(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .integrationRuntimeNodes() - .deleteWithResponse( - "exampleResourceGroup", "exampleWorkspace", "exampleIntegrationRuntime", "Node_1", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodesGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodesGetSamples.java deleted file mode 100644 index f7a2ce3c15b3c..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodesGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for IntegrationRuntimeNodes Get. */ -public final class IntegrationRuntimeNodesGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimeNodes_Get.json - */ - /** - * Sample code: Get integration runtime node. - * - * @param manager Entry point to SynapseManager. - */ - public static void getIntegrationRuntimeNode(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .integrationRuntimeNodes() - .getWithResponse( - "exampleResourceGroup", "exampleWorkspace", "exampleIntegrationRuntime", "Node_1", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodesUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodesUpdateSamples.java deleted file mode 100644 index e698b4988f1f8..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodesUpdateSamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.UpdateIntegrationRuntimeNodeRequest; - -/** Samples for IntegrationRuntimeNodes Update. */ -public final class IntegrationRuntimeNodesUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimeNodes_Update.json - */ - /** - * Sample code: Update integration runtime node. - * - * @param manager Entry point to SynapseManager. - */ - public static void updateIntegrationRuntimeNode(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .integrationRuntimeNodes() - .updateWithResponse( - "exampleResourceGroup", - "exampleWorkspace", - "exampleIntegrationRuntime", - "Node_1", - new UpdateIntegrationRuntimeNodeRequest().withConcurrentJobsLimit(2), - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeObjectMetadataListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeObjectMetadataListSamples.java deleted file mode 100644 index 2e2231e2e5056..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeObjectMetadataListSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.GetSsisObjectMetadataRequest; - -/** Samples for IntegrationRuntimeObjectMetadata List. */ -public final class IntegrationRuntimeObjectMetadataListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimeObjectMetadata_List.json - */ - /** - * Sample code: Get integration runtime object metadata. - * - * @param manager Entry point to SynapseManager. - */ - public static void getIntegrationRuntimeObjectMetadata(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .integrationRuntimeObjectMetadatas() - .listWithResponse( - "exampleResourceGroup", - "exampleWorkspace", - "testactivityv2", - new GetSsisObjectMetadataRequest().withMetadataPath("ssisFolders"), - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeObjectMetadataRefreshSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeObjectMetadataRefreshSamples.java deleted file mode 100644 index d97e1318f9316..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeObjectMetadataRefreshSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for IntegrationRuntimeObjectMetadata Refresh. */ -public final class IntegrationRuntimeObjectMetadataRefreshSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimeObjectMetadata_Refresh.json - */ - /** - * Sample code: Refresh object metadata. - * - * @param manager Entry point to SynapseManager. - */ - public static void refreshObjectMetadata(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .integrationRuntimeObjectMetadatas() - .refresh("exampleResourceGroup", "exampleWorkspace", "testactivityv2", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeStatusOperationGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeStatusOperationGetSamples.java deleted file mode 100644 index b9f08e69921ac..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeStatusOperationGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for IntegrationRuntimeStatusOperation Get. */ -public final class IntegrationRuntimeStatusOperationGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_GetStatus.json - */ - /** - * Sample code: Get status. - * - * @param manager Entry point to SynapseManager. - */ - public static void getStatus(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .integrationRuntimeStatusOperations() - .getWithResponse("exampleResourceGroup", "exampleWorkspace", "exampleIntegrationRuntime", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesCreateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesCreateSamples.java deleted file mode 100644 index bd6d426736259..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesCreateSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.resourcemanager.synapse.models.SelfHostedIntegrationRuntime; - -/** Samples for IntegrationRuntimes Create. */ -public final class IntegrationRuntimesCreateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_Create.json - */ - /** - * Sample code: Create integration runtime. - * - * @param manager Entry point to SynapseManager. - */ - public static void createIntegrationRuntime(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .integrationRuntimes() - .define("exampleIntegrationRuntime") - .withExistingWorkspace("exampleResourceGroup", "exampleWorkspace") - .withProperties(new SelfHostedIntegrationRuntime().withDescription("A selfhosted integration runtime")) - .create(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesDeleteSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesDeleteSamples.java deleted file mode 100644 index 8e530a4ca8f0f..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for IntegrationRuntimes Delete. */ -public final class IntegrationRuntimesDeleteSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_Delete.json - */ - /** - * Sample code: Delete integration runtime. - * - * @param manager Entry point to SynapseManager. - */ - public static void deleteIntegrationRuntime(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .integrationRuntimes() - .delete("exampleResourceGroup", "exampleWorkspace", "exampleIntegrationRuntime", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesDisableInteractiveQuerySamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesDisableInteractiveQuerySamples.java deleted file mode 100644 index a5d0f8dfb22af..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesDisableInteractiveQuerySamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for IntegrationRuntimes DisableInteractiveQuery. */ -public final class IntegrationRuntimesDisableInteractiveQuerySamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_DisableInteractiveQuery.json - */ - /** - * Sample code: Stop integration runtime. - * - * @param manager Entry point to SynapseManager. - */ - public static void stopIntegrationRuntime(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .integrationRuntimes() - .disableInteractiveQuery( - "exampleResourceGroup", "exampleWorkspace", "exampleManagedIntegrationRuntime", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesEnableInteractiveQuerySamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesEnableInteractiveQuerySamples.java deleted file mode 100644 index c97f87718ad1e..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesEnableInteractiveQuerySamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for IntegrationRuntimes EnableInteractiveQuery. */ -public final class IntegrationRuntimesEnableInteractiveQuerySamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_EnableInteractiveQuery.json - */ - /** - * Sample code: Stop integration runtime. - * - * @param manager Entry point to SynapseManager. - */ - public static void stopIntegrationRuntime(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .integrationRuntimes() - .enableInteractiveQuery( - "exampleResourceGroup", "exampleWorkspace", "exampleManagedIntegrationRuntime", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesGetSamples.java deleted file mode 100644 index 6cc8189ba5418..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for IntegrationRuntimes Get. */ -public final class IntegrationRuntimesGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_Get.json - */ - /** - * Sample code: Get integration runtime. - * - * @param manager Entry point to SynapseManager. - */ - public static void getIntegrationRuntime(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .integrationRuntimes() - .getWithResponse( - "exampleResourceGroup", "exampleWorkspace", "exampleIntegrationRuntime", null, Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesListByWorkspaceSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesListByWorkspaceSamples.java deleted file mode 100644 index 2b67231033da4..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesListByWorkspaceSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for IntegrationRuntimes ListByWorkspace. */ -public final class IntegrationRuntimesListByWorkspaceSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_ListByWorkspace.json - */ - /** - * Sample code: List integration runtimes. - * - * @param manager Entry point to SynapseManager. - */ - public static void listIntegrationRuntimes(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.integrationRuntimes().listByWorkspace("exampleResourceGroup", "exampleWorkspace", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesListOutboundNetworkDependenciesEndpointsSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesListOutboundNetworkDependenciesEndpointsSamples.java deleted file mode 100644 index 2eed354d1aed6..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesListOutboundNetworkDependenciesEndpointsSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for IntegrationRuntimes ListOutboundNetworkDependenciesEndpoints. */ -public final class IntegrationRuntimesListOutboundNetworkDependenciesEndpointsSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_ListOutboundNetworkDependenciesEndpoints.json - */ - /** - * Sample code: Get outbound network dependency endpoints. - * - * @param manager Entry point to SynapseManager. - */ - public static void getOutboundNetworkDependencyEndpoints(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .integrationRuntimes() - .listOutboundNetworkDependenciesEndpointsWithResponse( - "exampleResourceGroup", "exampleWorkspace", "exampleIntegrationRuntime", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesStartSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesStartSamples.java deleted file mode 100644 index 9dca64dbb669b..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesStartSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for IntegrationRuntimes Start. */ -public final class IntegrationRuntimesStartSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_Start.json - */ - /** - * Sample code: Start integration runtime. - * - * @param manager Entry point to SynapseManager. - */ - public static void startIntegrationRuntime(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .integrationRuntimes() - .start("exampleResourceGroup", "exampleWorkspace", "exampleManagedIntegrationRuntime", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesStopSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesStopSamples.java deleted file mode 100644 index 3e258c24c61b7..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesStopSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for IntegrationRuntimes Stop. */ -public final class IntegrationRuntimesStopSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_Stop.json - */ - /** - * Sample code: Stop integration runtime. - * - * @param manager Entry point to SynapseManager. - */ - public static void stopIntegrationRuntime(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .integrationRuntimes() - .stop("exampleResourceGroup", "exampleWorkspace", "exampleManagedIntegrationRuntime", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesUpdateSamples.java deleted file mode 100644 index 4af3d794836b1..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesUpdateSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeAutoUpdate; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeResource; - -/** Samples for IntegrationRuntimes Update. */ -public final class IntegrationRuntimesUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_Update.json - */ - /** - * Sample code: Update integration runtime. - * - * @param manager Entry point to SynapseManager. - */ - public static void updateIntegrationRuntime(com.azure.resourcemanager.synapse.SynapseManager manager) { - IntegrationRuntimeResource resource = - manager - .integrationRuntimes() - .getWithResponse( - "exampleResourceGroup", "exampleWorkspace", "exampleIntegrationRuntime", null, Context.NONE) - .getValue(); - resource.update().withAutoUpdate(IntegrationRuntimeAutoUpdate.OFF).withUpdateDelayOffset("\"PT3H\"").apply(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesUpgradeSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesUpgradeSamples.java deleted file mode 100644 index 640c6f82921ee..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesUpgradeSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for IntegrationRuntimes Upgrade. */ -public final class IntegrationRuntimesUpgradeSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/IntegrationRuntimes_Upgrade.json - */ - /** - * Sample code: Upgrade integration runtime. - * - * @param manager Entry point to SynapseManager. - */ - public static void upgradeIntegrationRuntime(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .integrationRuntimes() - .upgradeWithResponse("exampleResourceGroup", "exampleWorkspace", "exampleIntegrationRuntime", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesCreateOrUpdateSamples.java deleted file mode 100644 index 23b32596e8dc3..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesCreateOrUpdateSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -/** Samples for IpFirewallRules CreateOrUpdate. */ -public final class IpFirewallRulesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateIpFirewallRule.json - */ - /** - * Sample code: Create an IP firewall rule. - * - * @param manager Entry point to SynapseManager. - */ - public static void createAnIPFirewallRule(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .ipFirewallRules() - .define("ExampleIpFirewallRule") - .withExistingWorkspace("ExampleResourceGroup", "ExampleWorkspace") - .withEndIpAddress("10.0.0.254") - .withStartIpAddress("10.0.0.0") - .create(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesDeleteSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesDeleteSamples.java deleted file mode 100644 index 8b34f6af5d7b4..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for IpFirewallRules Delete. */ -public final class IpFirewallRulesDeleteSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteIpFirewallRule.json - */ - /** - * Sample code: Delete an IP firewall rule from a workspace. - * - * @param manager Entry point to SynapseManager. - */ - public static void deleteAnIPFirewallRuleFromAWorkspace(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .ipFirewallRules() - .delete("ExampleResourceGroup", "ExampleWorkspace", "ExampleIpFirewallRule", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesGetSamples.java deleted file mode 100644 index 7b9df3095e680..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for IpFirewallRules Get. */ -public final class IpFirewallRulesGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetIpFirewallRule.json - */ - /** - * Sample code: Create an IP firewall rule. - * - * @param manager Entry point to SynapseManager. - */ - public static void createAnIPFirewallRule(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .ipFirewallRules() - .getWithResponse("ExampleResourceGroup", "ExampleWorkspace", "ExampleIpFirewallRule", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesListByWorkspaceSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesListByWorkspaceSamples.java deleted file mode 100644 index ac9b21831cf85..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesListByWorkspaceSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for IpFirewallRules ListByWorkspace. */ -public final class IpFirewallRulesListByWorkspaceSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListIpFirewallRules.json - */ - /** - * Sample code: List IP firewall rules in a workspace. - * - * @param manager Entry point to SynapseManager. - */ - public static void listIPFirewallRulesInAWorkspace(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.ipFirewallRules().listByWorkspace("ExampleResourceGroup", "ExampleWorkspace", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesReplaceAllSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesReplaceAllSamples.java deleted file mode 100644 index c2085b928854a..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesReplaceAllSamples.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.fluent.models.IpFirewallRuleProperties; -import com.azure.resourcemanager.synapse.models.ReplaceAllIpFirewallRulesRequest; -import java.util.HashMap; -import java.util.Map; - -/** Samples for IpFirewallRules ReplaceAll. */ -public final class IpFirewallRulesReplaceAllSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ReplaceAllIpFirewallRules.json - */ - /** - * Sample code: Replace all IP firewall rules in a workspace. - * - * @param manager Entry point to SynapseManager. - */ - public static void replaceAllIPFirewallRulesInAWorkspace(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .ipFirewallRules() - .replaceAll( - "ExampleResourceGroup", - "ExampleWorkspace", - new ReplaceAllIpFirewallRulesRequest() - .withIpFirewallRules( - mapOf( - "AnotherExampleFirewallRule", - new IpFirewallRuleProperties() - .withEndIpAddress("10.0.1.254") - .withStartIpAddress("10.0.1.0"), - "ExampleFirewallRule", - new IpFirewallRuleProperties() - .withEndIpAddress("10.0.0.254") - .withStartIpAddress("10.0.0.0"))), - Context.NONE); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/KeysCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/KeysCreateOrUpdateSamples.java deleted file mode 100644 index 78c93cc07878c..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/KeysCreateOrUpdateSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -/** Samples for Keys CreateOrUpdate. */ -public final class KeysCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateKey.json - */ - /** - * Sample code: Create or update a workspace key. - * - * @param manager Entry point to SynapseManager. - */ - public static void createOrUpdateAWorkspaceKey(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .keys() - .define("somekey") - .withExistingWorkspace("ExampleResourceGroup", "ExampleWorkspace") - .withIsActiveCmk(true) - .withKeyVaultUrl("https://vault.azure.net/keys/somesecret") - .create(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/KeysDeleteSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/KeysDeleteSamples.java deleted file mode 100644 index 2e991b21a2dd4..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/KeysDeleteSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for Keys Delete. */ -public final class KeysDeleteSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteKey.json - */ - /** - * Sample code: Delete a workspace key. - * - * @param manager Entry point to SynapseManager. - */ - public static void deleteAWorkspaceKey(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.keys().deleteWithResponse("ExampleResourceGroup", "ExampleWorkspace", "somekey", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/KeysGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/KeysGetSamples.java deleted file mode 100644 index 8a521a353628f..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/KeysGetSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for Keys Get. */ -public final class KeysGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetKey.json - */ - /** - * Sample code: Get a workspace key. - * - * @param manager Entry point to SynapseManager. - */ - public static void getAWorkspaceKey(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.keys().getWithResponse("ExampleResourceGroup", "ExampleWorkspace", "somekey", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/KeysListByWorkspaceSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/KeysListByWorkspaceSamples.java deleted file mode 100644 index 97b0cf00b84da..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/KeysListByWorkspaceSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for Keys ListByWorkspace. */ -public final class KeysListByWorkspaceSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListKeysInWorkspace.json - */ - /** - * Sample code: List keys in workspace. - * - * @param manager Entry point to SynapseManager. - */ - public static void listKeysInWorkspace(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.keys().listByWorkspace("ExampleResourceGroup", "ExampleWorkspace", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/LibrariesOperationListByWorkspaceSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/LibrariesOperationListByWorkspaceSamples.java deleted file mode 100644 index 37969080d6038..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/LibrariesOperationListByWorkspaceSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for LibrariesOperation ListByWorkspace. */ -public final class LibrariesOperationListByWorkspaceSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/Libraries_ListByWorkspace.json - */ - /** - * Sample code: List libraries in a workspace. - * - * @param manager Entry point to SynapseManager. - */ - public static void listLibrariesInAWorkspace(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.librariesOperations().listByWorkspace("exampleResourceGroup", "exampleWorkspace", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/LibraryGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/LibraryGetSamples.java deleted file mode 100644 index c193fbf4b5cd1..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/LibraryGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for Library Get. */ -public final class LibraryGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/Library_Get.json - */ - /** - * Sample code: Get Library by name. - * - * @param manager Entry point to SynapseManager. - */ - public static void getLibraryByName(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .libraries() - .getWithResponse("exampleResourceGroup", "exampleLibraryName.jar", "exampleWorkspace", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/OperationsCheckNameAvailabilitySamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/OperationsCheckNameAvailabilitySamples.java deleted file mode 100644 index c58f590358c0a..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/OperationsCheckNameAvailabilitySamples.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.CheckNameAvailabilityRequest; - -/** Samples for Operations CheckNameAvailability. */ -public final class OperationsCheckNameAvailabilitySamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CheckNameAvailabilityWorkspaceAlreadyExists.json - */ - /** - * Sample code: Check for a workspace name that already exists. - * - * @param manager Entry point to SynapseManager. - */ - public static void checkForAWorkspaceNameThatAlreadyExists( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .operations() - .checkNameAvailabilityWithResponse( - new CheckNameAvailabilityRequest().withName("workspace1").withType("Microsoft.Synapse/workspaces"), - Context.NONE); - } - - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CheckNameAvailabilityWorkspaceAvailable.json - */ - /** - * Sample code: Check for a workspace name that is available. - * - * @param manager Entry point to SynapseManager. - */ - public static void checkForAWorkspaceNameThatIsAvailable(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .operations() - .checkNameAvailabilityWithResponse( - new CheckNameAvailabilityRequest() - .withName("workspace1") - .withType("Microsoft.ProjectArcadia/workspaces"), - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/OperationsGetAzureAsyncHeaderResultSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/OperationsGetAzureAsyncHeaderResultSamples.java deleted file mode 100644 index 33cd54a5dc0cd..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/OperationsGetAzureAsyncHeaderResultSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for Operations GetAzureAsyncHeaderResult. */ -public final class OperationsGetAzureAsyncHeaderResultSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetAzureAsyncOperationHeader.json - */ - /** - * Sample code: Get azure async operation header result. - * - * @param manager Entry point to SynapseManager. - */ - public static void getAzureAsyncOperationHeaderResult(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .operations() - .getAzureAsyncHeaderResultWithResponse( - "resourceGroup1", "workspace1", "01234567-89ab-4def-0123-456789abcdef", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/OperationsGetLocationHeaderResultSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/OperationsGetLocationHeaderResultSamples.java deleted file mode 100644 index a616b4d350be9..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/OperationsGetLocationHeaderResultSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for Operations GetLocationHeaderResult. */ -public final class OperationsGetLocationHeaderResultSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetLocationHeader.json - */ - /** - * Sample code: Get location header result. - * - * @param manager Entry point to SynapseManager. - */ - public static void getLocationHeaderResult(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .operations() - .getLocationHeaderResultWithResponse( - "resourceGroup1", "workspace1", "01234567-89ab-4def-0123-456789abcdef", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/OperationsListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/OperationsListSamples.java deleted file mode 100644 index 77d793bc6aa55..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/OperationsListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for Operations List. */ -public final class OperationsListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetAvailableOperations.json - */ - /** - * Sample code: Get available operations. - * - * @param manager Entry point to SynapseManager. - */ - public static void getAvailableOperations(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.operations().listWithResponse(Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsCreateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsCreateSamples.java deleted file mode 100644 index ffb511f1f5ee8..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsCreateSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.resourcemanager.synapse.models.PrivateLinkServiceConnectionState; - -/** Samples for PrivateEndpointConnections Create. */ -public final class PrivateEndpointConnectionsCreateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ApprovePrivateEndpointConnection.json - */ - /** - * Sample code: Approve private endpoint connection. - * - * @param manager Entry point to SynapseManager. - */ - public static void approvePrivateEndpointConnection(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .privateEndpointConnections() - .define("ExamplePrivateEndpointConnection") - .withExistingWorkspace("ExampleResourceGroup", "ExampleWorkspace") - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus("Approved") - .withDescription("Approved by abc@example.com")) - .create(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsDeleteSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsDeleteSamples.java deleted file mode 100644 index 5cd2a567d5961..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for PrivateEndpointConnections Delete. */ -public final class PrivateEndpointConnectionsDeleteSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeletePrivateEndpointConnection.json - */ - /** - * Sample code: Delete private endpoint connection. - * - * @param manager Entry point to SynapseManager. - */ - public static void deletePrivateEndpointConnection(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .privateEndpointConnections() - .delete("ExampleResourceGroup", "ExampleWorkspace", "ExamplePrivateEndpointConnection", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsGetSamples.java deleted file mode 100644 index ff7d696dde582..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for PrivateEndpointConnections Get. */ -public final class PrivateEndpointConnectionsGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetPrivateEndpointConnection.json - */ - /** - * Sample code: Get private endpoint connection. - * - * @param manager Entry point to SynapseManager. - */ - public static void getPrivateEndpointConnection(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .privateEndpointConnections() - .getWithResponse( - "ExampleResourceGroup", "ExampleWorkspace", "ExamplePrivateEndpointConnection", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsListSamples.java deleted file mode 100644 index b568117f40358..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for PrivateEndpointConnections List. */ -public final class PrivateEndpointConnectionsListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListPrivateEndpointConnections.json - */ - /** - * Sample code: List private endpoint connections in workspace. - * - * @param manager Entry point to SynapseManager. - */ - public static void listPrivateEndpointConnectionsInWorkspace( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.privateEndpointConnections().list("ExampleResourceGroup", "ExampleWorkspace", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsPrivateLinkHubGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsPrivateLinkHubGetSamples.java deleted file mode 100644 index 91f36c24356b4..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsPrivateLinkHubGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for PrivateEndpointConnectionsPrivateLinkHub Get. */ -public final class PrivateEndpointConnectionsPrivateLinkHubGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/PrivateEndpointConnectionsPrivateLinkHub_Get.json - */ - /** - * Sample code: Get a privateLinkHub. - * - * @param manager Entry point to SynapseManager. - */ - public static void getAPrivateLinkHub(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .privateEndpointConnectionsPrivateLinkHubs() - .getWithResponse("gh-res-grp", "pe0", "pe0-f3ed30f5-338c-4855-a542-24a403694ad2", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsPrivateLinkHubListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsPrivateLinkHubListSamples.java deleted file mode 100644 index 3182b6e780dae..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsPrivateLinkHubListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for PrivateEndpointConnectionsPrivateLinkHub List. */ -public final class PrivateEndpointConnectionsPrivateLinkHubListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/PrivateEndpointConnectionsPrivateLinkHub_List.json - */ - /** - * Sample code: Get a privateLinkHub. - * - * @param manager Entry point to SynapseManager. - */ - public static void getAPrivateLinkHub(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.privateEndpointConnectionsPrivateLinkHubs().list("gh-res-grp", "pe0", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubPrivateLinkResourcesGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubPrivateLinkResourcesGetSamples.java deleted file mode 100644 index e330e4ccb6e62..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubPrivateLinkResourcesGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for PrivateLinkHubPrivateLinkResources Get. */ -public final class PrivateLinkHubPrivateLinkResourcesGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetPrivateLinkHubPrivateLinkResource.json - */ - /** - * Sample code: Get private link resources for private link hub. - * - * @param manager Entry point to SynapseManager. - */ - public static void getPrivateLinkResourcesForPrivateLinkHub( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .privateLinkHubPrivateLinkResources() - .getWithResponse("ExampleResourceGroup", "ExamplePrivateLinkHub", "sql", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubPrivateLinkResourcesListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubPrivateLinkResourcesListSamples.java deleted file mode 100644 index 6cdc9cee0b8d3..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubPrivateLinkResourcesListSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for PrivateLinkHubPrivateLinkResources List. */ -public final class PrivateLinkHubPrivateLinkResourcesListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListPrivateLinkHubPrivateLinkResources.json - */ - /** - * Sample code: Get private link resources for private link hub. - * - * @param manager Entry point to SynapseManager. - */ - public static void getPrivateLinkResourcesForPrivateLinkHub( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .privateLinkHubPrivateLinkResources() - .list("ExampleResourceGroup", "ExamplePrivateLinkHub", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsCreateOrUpdateSamples.java deleted file mode 100644 index fde30dd251167..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsCreateOrUpdateSamples.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import java.util.HashMap; -import java.util.Map; - -/** Samples for PrivateLinkHubs CreateOrUpdate. */ -public final class PrivateLinkHubsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdatePrivateLinkHub.json - */ - /** - * Sample code: Create or update a privateLinkHub. - * - * @param manager Entry point to SynapseManager. - */ - public static void createOrUpdateAPrivateLinkHub(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .privateLinkHubs() - .define("privateLinkHub1") - .withRegion("East US") - .withExistingResourceGroup("resourceGroup1") - .withTags(mapOf("key", "value")) - .create(); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsDeleteSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsDeleteSamples.java deleted file mode 100644 index 6611508873b10..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsDeleteSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for PrivateLinkHubs Delete. */ -public final class PrivateLinkHubsDeleteSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeletePrivateLinkHub.json - */ - /** - * Sample code: Delete a privateLinkHub. - * - * @param manager Entry point to SynapseManager. - */ - public static void deleteAPrivateLinkHub(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.privateLinkHubs().delete("resourceGroup1", "privateLinkHub1", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsGetByResourceGroupSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsGetByResourceGroupSamples.java deleted file mode 100644 index b13231e743502..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsGetByResourceGroupSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for PrivateLinkHubs GetByResourceGroup. */ -public final class PrivateLinkHubsGetByResourceGroupSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetPrivateLinkHub.json - */ - /** - * Sample code: Get a privateLinkHub. - * - * @param manager Entry point to SynapseManager. - */ - public static void getAPrivateLinkHub(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.privateLinkHubs().getByResourceGroupWithResponse("resourceGroup1", "privateLinkHub1", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsListByResourceGroupSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsListByResourceGroupSamples.java deleted file mode 100644 index c8c3bb66d74b4..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsListByResourceGroupSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for PrivateLinkHubs ListByResourceGroup. */ -public final class PrivateLinkHubsListByResourceGroupSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListPrivateLinkHubsInResourceGroup.json - */ - /** - * Sample code: List privateLinkHubs in resource group. - * - * @param manager Entry point to SynapseManager. - */ - public static void listPrivateLinkHubsInResourceGroup(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.privateLinkHubs().listByResourceGroup("resourceGroup1", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsListSamples.java deleted file mode 100644 index 61c6fa7585a61..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for PrivateLinkHubs List. */ -public final class PrivateLinkHubsListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListPrivateLinkHubsInSubscription.json - */ - /** - * Sample code: List privateLinkHubs in subscription. - * - * @param manager Entry point to SynapseManager. - */ - public static void listPrivateLinkHubsInSubscription(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.privateLinkHubs().list(Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsUpdateSamples.java deleted file mode 100644 index 4c59059d278f8..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsUpdateSamples.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.PrivateLinkHub; -import java.util.HashMap; -import java.util.Map; - -/** Samples for PrivateLinkHubs Update. */ -public final class PrivateLinkHubsUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/UpdatePrivateLinkHub.json - */ - /** - * Sample code: Update a privateLinkHub. - * - * @param manager Entry point to SynapseManager. - */ - public static void updateAPrivateLinkHub(com.azure.resourcemanager.synapse.SynapseManager manager) { - PrivateLinkHub resource = - manager - .privateLinkHubs() - .getByResourceGroupWithResponse("resourceGroup1", "privateLinkHub1", Context.NONE) - .getValue(); - resource.update().withTags(mapOf("key", "value")).apply(); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkResourcesGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkResourcesGetSamples.java deleted file mode 100644 index 902eb040d3574..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkResourcesGetSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for PrivateLinkResources Get. */ -public final class PrivateLinkResourcesGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetPrivateLinkResource.json - */ - /** - * Sample code: Get private link resources for workspace. - * - * @param manager Entry point to SynapseManager. - */ - public static void getPrivateLinkResourcesForWorkspace(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.privateLinkResources().getWithResponse("ExampleResourceGroup", "ExampleWorkspace", "sql", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkResourcesListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkResourcesListSamples.java deleted file mode 100644 index 5b775f7814d5b..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/PrivateLinkResourcesListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for PrivateLinkResources List. */ -public final class PrivateLinkResourcesListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListPrivateLinkResources.json - */ - /** - * Sample code: Get private link resources for workspace. - * - * @param manager Entry point to SynapseManager. - */ - public static void getPrivateLinkResourcesForWorkspace(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.privateLinkResources().list("ExampleResourceGroup", "ExampleWorkspace", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/RestorableDroppedSqlPoolsGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/RestorableDroppedSqlPoolsGetSamples.java deleted file mode 100644 index 50f027c1ad386..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/RestorableDroppedSqlPoolsGetSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for RestorableDroppedSqlPools Get. */ -public final class RestorableDroppedSqlPoolsGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/RestorableDroppedSqlPoolGet.json - */ - /** - * Sample code: Get a restorable dropped Sql pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void getARestorableDroppedSqlPool(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .restorableDroppedSqlPools() - .getWithResponse( - "restorabledroppeddatabasetest-1257", - "restorabledroppeddatabasetest-2389", - "restorabledroppeddatabasetest-7654,131403269876900000", - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/RestorableDroppedSqlPoolsListByWorkspaceSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/RestorableDroppedSqlPoolsListByWorkspaceSamples.java deleted file mode 100644 index fde32bdc2aaed..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/RestorableDroppedSqlPoolsListByWorkspaceSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for RestorableDroppedSqlPools ListByWorkspace. */ -public final class RestorableDroppedSqlPoolsListByWorkspaceSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/RestorableDroppedSqlpoolList.json - */ - /** - * Sample code: Get list of restorable dropped Sql pools. - * - * @param manager Entry point to SynapseManager. - */ - public static void getListOfRestorableDroppedSqlPools(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .restorableDroppedSqlPools() - .listByWorkspace("restorabledroppeddatabasetest-1349", "restorabledroppeddatabasetest-1840", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SparkConfigurationGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SparkConfigurationGetSamples.java deleted file mode 100644 index 474fc4b4e5858..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SparkConfigurationGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SparkConfiguration Get. */ -public final class SparkConfigurationGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/SparkConfiguration_Get.json - */ - /** - * Sample code: Get SparkConfiguration by name. - * - * @param manager Entry point to SynapseManager. - */ - public static void getSparkConfigurationByName(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sparkConfigurations() - .getWithResponse("exampleResourceGroup", "exampleSparkConfigurationName", "exampleWorkspace", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SparkConfigurationsOperationListByWorkspaceSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SparkConfigurationsOperationListByWorkspaceSamples.java deleted file mode 100644 index 2e9279617c8f7..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SparkConfigurationsOperationListByWorkspaceSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SparkConfigurationsOperation ListByWorkspace. */ -public final class SparkConfigurationsOperationListByWorkspaceSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/preview/2021-06-01-preview/examples/SparkConfigurations_ListByWorkspace.json - */ - /** - * Sample code: List sparkConfigurations in a workspace. - * - * @param manager Entry point to SynapseManager. - */ - public static void listSparkConfigurationsInAWorkspace(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sparkConfigurationsOperations() - .listByWorkspace("exampleResourceGroup", "exampleWorkspace", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolBlobAuditingPoliciesCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolBlobAuditingPoliciesCreateOrUpdateSamples.java deleted file mode 100644 index 29ff012fcf373..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolBlobAuditingPoliciesCreateOrUpdateSamples.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.resourcemanager.synapse.models.BlobAuditingPolicyState; -import java.util.Arrays; -import java.util.UUID; - -/** Samples for SqlPoolBlobAuditingPolicies CreateOrUpdate. */ -public final class SqlPoolBlobAuditingPoliciesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolBlobAuditingWithAllParameters.json - */ - /** - * Sample code: Create or update a database's blob auditing policy with all parameters. - * - * @param manager Entry point to SynapseManager. - */ - public static void createOrUpdateADatabaseSBlobAuditingPolicyWithAllParameters( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolBlobAuditingPolicies() - .define() - .withExistingSqlPool("blobauditingtest-4799", "blobauditingtest-6440", "testdb") - .withState(BlobAuditingPolicyState.ENABLED) - .withStorageEndpoint("https://mystorage.blob.core.windows.net") - .withStorageAccountAccessKey( - "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==") - .withRetentionDays(6) - .withAuditActionsAndGroups( - Arrays - .asList( - "DATABASE_LOGOUT_GROUP", - "DATABASE_ROLE_MEMBER_CHANGE_GROUP", - "UPDATE on database::TestDatabaseName by public")) - .withStorageAccountSubscriptionId(UUID.fromString("00000000-1234-0000-5678-000000000000")) - .withIsStorageSecondaryKeyInUse(false) - .withIsAzureMonitorTargetEnabled(true) - .create(); - } - - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolBlobAuditingWithMinParameters.json - */ - /** - * Sample code: Create or update a database's blob auditing policy with minimal parameters. - * - * @param manager Entry point to SynapseManager. - */ - public static void createOrUpdateADatabaseSBlobAuditingPolicyWithMinimalParameters( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolBlobAuditingPolicies() - .define() - .withExistingSqlPool("blobauditingtest-4799", "blobauditingtest-6440", "testdb") - .withState(BlobAuditingPolicyState.ENABLED) - .withStorageEndpoint("https://mystorage.blob.core.windows.net") - .withStorageAccountAccessKey( - "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==") - .create(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolBlobAuditingPoliciesGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolBlobAuditingPoliciesGetSamples.java deleted file mode 100644 index 681a3e6c6798f..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolBlobAuditingPoliciesGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolBlobAuditingPolicies Get. */ -public final class SqlPoolBlobAuditingPoliciesGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolBlobAuditing.json - */ - /** - * Sample code: Get blob auditing policy of a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void getBlobAuditingPolicyOfASQLAnalyticsPool( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolBlobAuditingPolicies() - .getWithResponse("blobauditingtest-6852", "blobauditingtest-2080", "testdb", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolBlobAuditingPoliciesListBySqlPoolSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolBlobAuditingPoliciesListBySqlPoolSamples.java deleted file mode 100644 index 600a49d0ac5b0..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolBlobAuditingPoliciesListBySqlPoolSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolBlobAuditingPolicies ListBySqlPool. */ -public final class SqlPoolBlobAuditingPoliciesListBySqlPoolSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolAuditingSettingsList.json - */ - /** - * Sample code: List audit settings of a database. - * - * @param manager Entry point to SynapseManager. - */ - public static void listAuditSettingsOfADatabase(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolBlobAuditingPolicies() - .listBySqlPool("blobauditingtest-6852", "blobauditingtest-2080", "testdb", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolColumnsGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolColumnsGetSamples.java deleted file mode 100644 index 3f08d0f7e4754..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolColumnsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolColumns Get. */ -public final class SqlPoolColumnsGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolColumnGet.json - */ - /** - * Sample code: Get database column. - * - * @param manager Entry point to SynapseManager. - */ - public static void getDatabaseColumn(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolColumns() - .getWithResponse("myRG", "serverName", "myDatabase", "dbo", "table1", "column1", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolConnectionPoliciesGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolConnectionPoliciesGetSamples.java deleted file mode 100644 index ee735800c2ce0..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolConnectionPoliciesGetSamples.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.ConnectionPolicyName; - -/** Samples for SqlPoolConnectionPolicies Get. */ -public final class SqlPoolConnectionPoliciesGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolConnectionPolicy.json - */ - /** - * Sample code: Get a connection policy of a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void getAConnectionPolicyOfASQLAnalyticsPool( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolConnectionPolicies() - .getWithResponse( - "blobauditingtest-6852", "blobauditingtest-2080", "testdb", ConnectionPolicyName.DEFAULT, Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolDataWarehouseUserActivitiesGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolDataWarehouseUserActivitiesGetSamples.java deleted file mode 100644 index 285148bc569a4..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolDataWarehouseUserActivitiesGetSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.DataWarehouseUserActivityName; - -/** Samples for SqlPoolDataWarehouseUserActivities Get. */ -public final class SqlPoolDataWarehouseUserActivitiesGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolUserActivity.json - */ - /** - * Sample code: Get a SQL Analytics pool user activity. - * - * @param manager Entry point to SynapseManager. - */ - public static void getASQLAnalyticsPoolUserActivity(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolDataWarehouseUserActivities() - .getWithResponse( - "Default-SQL-SouthEastAsia", "testsvr", "testdb", DataWarehouseUserActivityName.CURRENT, Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolGeoBackupPoliciesCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolGeoBackupPoliciesCreateOrUpdateSamples.java deleted file mode 100644 index 7ef296d0740d1..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolGeoBackupPoliciesCreateOrUpdateSamples.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.resourcemanager.synapse.models.GeoBackupPolicyName; -import com.azure.resourcemanager.synapse.models.GeoBackupPolicyState; - -/** Samples for SqlPoolGeoBackupPolicies CreateOrUpdate. */ -public final class SqlPoolGeoBackupPoliciesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateGeoBackupPolicies.json - */ - /** - * Sample code: Create geo backup policy. - * - * @param manager Entry point to SynapseManager. - */ - public static void createGeoBackupPolicy(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolGeoBackupPolicies() - .define(GeoBackupPolicyName.DEFAULT) - .withExistingSqlPool("testrg", "testws", "testdw") - .withState(GeoBackupPolicyState.ENABLED) - .create(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolGeoBackupPoliciesGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolGeoBackupPoliciesGetSamples.java deleted file mode 100644 index 191b63a8b07f9..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolGeoBackupPoliciesGetSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.GeoBackupPolicyName; - -/** Samples for SqlPoolGeoBackupPolicies Get. */ -public final class SqlPoolGeoBackupPoliciesGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolGeoBackupPolicy.json - */ - /** - * Sample code: Get Sql pool geo backup policy. - * - * @param manager Entry point to SynapseManager. - */ - public static void getSqlPoolGeoBackupPolicy(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolGeoBackupPolicies() - .getWithResponse( - "sqlcrudtest-4799", "sqlcrudtest-5961", "testdw", GeoBackupPolicyName.DEFAULT, Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolGeoBackupPoliciesListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolGeoBackupPoliciesListSamples.java deleted file mode 100644 index 0158577e1f98e..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolGeoBackupPoliciesListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolGeoBackupPolicies List. */ -public final class SqlPoolGeoBackupPoliciesListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolGeoBackupPolicies_List.json - */ - /** - * Sample code: Get Sql pool geo backup policy. - * - * @param manager Entry point to SynapseManager. - */ - public static void getSqlPoolGeoBackupPolicy(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.sqlPoolGeoBackupPolicies().list("sqlcrudtest-4799", "sqlcrudtest-5961", "testdw", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolMaintenanceWindowOptionsGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolMaintenanceWindowOptionsGetSamples.java deleted file mode 100644 index ab9c45160cbe0..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolMaintenanceWindowOptionsGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolMaintenanceWindowOptions Get. */ -public final class SqlPoolMaintenanceWindowOptionsGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetMaintenanceWindowOptions.json - */ - /** - * Sample code: Get list of transparent data encryption configurations of a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void getListOfTransparentDataEncryptionConfigurationsOfASQLAnalyticsPool( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolMaintenanceWindowOptions() - .getWithResponse("samplerg", "testworkspace", "testsp", "current", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolMaintenanceWindowsCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolMaintenanceWindowsCreateOrUpdateSamples.java deleted file mode 100644 index 2934921d37005..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolMaintenanceWindowsCreateOrUpdateSamples.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.fluent.models.MaintenanceWindowsInner; -import com.azure.resourcemanager.synapse.models.DayOfWeek; -import com.azure.resourcemanager.synapse.models.MaintenanceWindowTimeRange; -import java.util.Arrays; - -/** Samples for SqlPoolMaintenanceWindows CreateOrUpdate. */ -public final class SqlPoolMaintenanceWindowsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateMaintenanceWindows.json - */ - /** - * Sample code: Sets maintenance window settings for a selected SQL Analytics Pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void setsMaintenanceWindowSettingsForASelectedSQLAnalyticsPool( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolMaintenanceWindows() - .createOrUpdateWithResponse( - "samplerg", - "testworkspace", - "testsp", - "current", - new MaintenanceWindowsInner() - .withTimeRanges( - Arrays - .asList( - new MaintenanceWindowTimeRange() - .withDayOfWeek(DayOfWeek.SATURDAY) - .withStartTime("00:00:00") - .withDuration("PT60M"))), - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolMaintenanceWindowsGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolMaintenanceWindowsGetSamples.java deleted file mode 100644 index cc4c43c68f937..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolMaintenanceWindowsGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolMaintenanceWindows Get. */ -public final class SqlPoolMaintenanceWindowsGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetMaintenanceWindows.json - */ - /** - * Sample code: Gets maintenance window settings for a selected SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void getsMaintenanceWindowSettingsForASelectedSQLAnalyticsPool( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolMaintenanceWindows() - .getWithResponse("samplerg", "testworkspace", "testsp", "current", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolMetadataSyncConfigsCreateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolMetadataSyncConfigsCreateSamples.java deleted file mode 100644 index 4a6e463a9d9b4..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolMetadataSyncConfigsCreateSamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.fluent.models.MetadataSyncConfigInner; - -/** Samples for SqlPoolMetadataSyncConfigs Create. */ -public final class SqlPoolMetadataSyncConfigsCreateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateSqlPoolMetadataSyncConfig.json - */ - /** - * Sample code: Set metadata sync config for a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void setMetadataSyncConfigForASQLAnalyticsPool( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolMetadataSyncConfigs() - .createWithResponse( - "ExampleResourceGroup", - "ExampleWorkspace", - "ExampleSqlPool", - new MetadataSyncConfigInner().withEnabled(true), - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolMetadataSyncConfigsGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolMetadataSyncConfigsGetSamples.java deleted file mode 100644 index b0318f6b52f82..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolMetadataSyncConfigsGetSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolMetadataSyncConfigs Get. */ -public final class SqlPoolMetadataSyncConfigsGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolMetadataSyncConfig.json - */ - /** - * Sample code: Get metadata sync config for a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void getMetadataSyncConfigForASQLAnalyticsPool( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolMetadataSyncConfigs() - .getWithResponse("ExampleResourceGroup", "ExampleWorkspace", "ExampleSqlPool", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolOperationResultsGetLocationHeaderResultSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolOperationResultsGetLocationHeaderResultSamples.java deleted file mode 100644 index 9ba07e4fa934c..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolOperationResultsGetLocationHeaderResultSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolOperationResults GetLocationHeaderResult. */ -public final class SqlPoolOperationResultsGetLocationHeaderResultSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetLocationHeaderResultWithSqlPool.json - */ - /** - * Sample code: Get the result of an operation on a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void getTheResultOfAnOperationOnASQLAnalyticsPool( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolOperationResults() - .getLocationHeaderResultWithResponse( - "ExampleResourceGroup", - "ExampleWorkspace", - "ExampleSqlPool", - "fedcba98-7654-4210-fedc-ba9876543210", - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolOperationsListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolOperationsListSamples.java deleted file mode 100644 index 17a78d272b1ec..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolOperationsListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolOperations List. */ -public final class SqlPoolOperationsListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolOperations.json - */ - /** - * Sample code: List the Sql Analytics pool management operations. - * - * @param manager Entry point to SynapseManager. - */ - public static void listTheSqlAnalyticsPoolManagementOperations( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.sqlPoolOperations().list("sqlcrudtest-7398", "sqlcrudtest-4645", "testdb", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolRecommendedSensitivityLabelsUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolRecommendedSensitivityLabelsUpdateSamples.java deleted file mode 100644 index e7e4c793d3d94..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolRecommendedSensitivityLabelsUpdateSamples.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.RecommendedSensitivityLabelUpdate; -import com.azure.resourcemanager.synapse.models.RecommendedSensitivityLabelUpdateKind; -import com.azure.resourcemanager.synapse.models.RecommendedSensitivityLabelUpdateList; -import java.util.Arrays; - -/** Samples for SqlPoolRecommendedSensitivityLabels Update. */ -public final class SqlPoolRecommendedSensitivityLabelsUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SensitivityLabelsRecommendedUpdate.json - */ - /** - * Sample code: Update recommended sensitivity labels of a given SQL Pool using an operations batch. - * - * @param manager Entry point to SynapseManager. - */ - public static void updateRecommendedSensitivityLabelsOfAGivenSQLPoolUsingAnOperationsBatch( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolRecommendedSensitivityLabels() - .updateWithResponse( - "myRG", - "myWorkspace", - "mySqlPool", - new RecommendedSensitivityLabelUpdateList() - .withOperations( - Arrays - .asList( - new RecommendedSensitivityLabelUpdate() - .withOp(RecommendedSensitivityLabelUpdateKind.ENABLE) - .withSchema("dbo") - .withTable("table1") - .withColumn("column1"), - new RecommendedSensitivityLabelUpdate() - .withOp(RecommendedSensitivityLabelUpdateKind.ENABLE) - .withSchema("dbo") - .withTable("table2") - .withColumn("column2"), - new RecommendedSensitivityLabelUpdate() - .withOp(RecommendedSensitivityLabelUpdateKind.DISABLE) - .withSchema("dbo") - .withTable("table1") - .withColumn("column3"))), - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolReplicationLinksGetByNameSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolReplicationLinksGetByNameSamples.java deleted file mode 100644 index 2f88eb23e2237..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolReplicationLinksGetByNameSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolReplicationLinks GetByName. */ -public final class SqlPoolReplicationLinksGetByNameSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolReplicationLinks_GetByName.json - */ - /** - * Sample code: Lists a Sql Analytic pool's replication links. - * - * @param manager Entry point to SynapseManager. - */ - public static void listsASqlAnalyticPoolSReplicationLinks( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolReplicationLinks() - .getByNameWithResponse( - "sqlcrudtest-4799", "sqlcrudtest-6440", "testdb", "5b301b68-03f6-4b26-b0f4-73ebb8634238", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolReplicationLinksListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolReplicationLinksListSamples.java deleted file mode 100644 index 04103f4793b7e..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolReplicationLinksListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolReplicationLinks List. */ -public final class SqlPoolReplicationLinksListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolReplicationLinks.json - */ - /** - * Sample code: Lists a Sql Analytic pool's replication links. - * - * @param manager Entry point to SynapseManager. - */ - public static void listsASqlAnalyticPoolSReplicationLinks( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.sqlPoolReplicationLinks().list("sqlcrudtest-4799", "sqlcrudtest-6440", "testdb", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolRestorePointsCreateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolRestorePointsCreateSamples.java deleted file mode 100644 index ee630b2c4004f..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolRestorePointsCreateSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.CreateSqlPoolRestorePointDefinition; - -/** Samples for SqlPoolRestorePoints Create. */ -public final class SqlPoolRestorePointsCreateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateSqlPoolRestorePoints.json - */ - /** - * Sample code: Creates Sql pool restore point. - * - * @param manager Entry point to SynapseManager. - */ - public static void createsSqlPoolRestorePoint(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolRestorePoints() - .create( - "Default-SQL-SouthEastAsia", - "testserver", - "testDatabase", - new CreateSqlPoolRestorePointDefinition().withRestorePointLabel("mylabel"), - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolRestorePointsDeleteSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolRestorePointsDeleteSamples.java deleted file mode 100644 index d35525978858f..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolRestorePointsDeleteSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolRestorePoints Delete. */ -public final class SqlPoolRestorePointsDeleteSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolRestorePointsDelete.json - */ - /** - * Sample code: Deletes a restore point. - * - * @param manager Entry point to SynapseManager. - */ - public static void deletesARestorePoint(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolRestorePoints() - .deleteWithResponse("Default-SQL-SouthEastAsia", "testws", "testpool", "131546477590000000", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolRestorePointsGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolRestorePointsGetSamples.java deleted file mode 100644 index bc4644b53e349..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolRestorePointsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolRestorePoints Get. */ -public final class SqlPoolRestorePointsGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolRestorePointsGet.json - */ - /** - * Sample code: Gets a Sql pool restore point. - * - * @param manager Entry point to SynapseManager. - */ - public static void getsASqlPoolRestorePoint(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolRestorePoints() - .getWithResponse("Default-SQL-SouthEastAsia", "testws", "testpool", "131546477590000000", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolRestorePointsListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolRestorePointsListSamples.java deleted file mode 100644 index 5cc68531f7350..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolRestorePointsListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolRestorePoints List. */ -public final class SqlPoolRestorePointsListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolRestorePoints.json - */ - /** - * Sample code: Get a list of restore points of a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void getAListOfRestorePointsOfASQLAnalyticsPool( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.sqlPoolRestorePoints().list("Default-SQL-SouthEastAsia", "testserver", "testDatabase", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSchemasGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSchemasGetSamples.java deleted file mode 100644 index c7273f56c5719..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSchemasGetSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolSchemas Get. */ -public final class SqlPoolSchemasGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolSchemaGet.json - */ - /** - * Sample code: Get database schema. - * - * @param manager Entry point to SynapseManager. - */ - public static void getDatabaseSchema(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.sqlPoolSchemas().getWithResponse("myRG", "serverName", "myDatabase", "dbo", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSchemasListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSchemasListSamples.java deleted file mode 100644 index 558e792273287..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSchemasListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolSchemas List. */ -public final class SqlPoolSchemasListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolSchema.json - */ - /** - * Sample code: List the schema in a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void listTheSchemaInASQLAnalyticsPool(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.sqlPoolSchemas().list("myRG", "serverName", "myDatabase", null, Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSecurityAlertPoliciesCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSecurityAlertPoliciesCreateOrUpdateSamples.java deleted file mode 100644 index 65ba1e898cad2..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSecurityAlertPoliciesCreateOrUpdateSamples.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.SecurityAlertPolicyName; -import com.azure.resourcemanager.synapse.models.SecurityAlertPolicyState; -import com.azure.resourcemanager.synapse.models.SqlPoolSecurityAlertPolicy; -import java.util.Arrays; - -/** Samples for SqlPoolSecurityAlertPolicies CreateOrUpdate. */ -public final class SqlPoolSecurityAlertPoliciesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolSecurityAlertWithAllParameters.json - */ - /** - * Sample code: Update a Sql pool's threat detection policy with all parameters. - * - * @param manager Entry point to SynapseManager. - */ - public static void updateASqlPoolSThreatDetectionPolicyWithAllParameters( - com.azure.resourcemanager.synapse.SynapseManager manager) { - SqlPoolSecurityAlertPolicy resource = - manager - .sqlPoolSecurityAlertPolicies() - .getWithResponse( - "securityalert-4799", "securityalert-6440", "testdb", SecurityAlertPolicyName.DEFAULT, Context.NONE) - .getValue(); - resource - .update() - .withState(SecurityAlertPolicyState.ENABLED) - .withDisabledAlerts(Arrays.asList("Sql_Injection", "Usage_Anomaly")) - .withEmailAddresses(Arrays.asList("test@microsoft.com", "user@microsoft.com")) - .withEmailAccountAdmins(true) - .withStorageEndpoint("https://mystorage.blob.core.windows.net") - .withStorageAccountAccessKey( - "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==") - .withRetentionDays(6) - .apply(); - } - - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolSecurityAlertWithMinParameters.json - */ - /** - * Sample code: Update a Sql pool's threat detection policy with minimal parameters. - * - * @param manager Entry point to SynapseManager. - */ - public static void updateASqlPoolSThreatDetectionPolicyWithMinimalParameters( - com.azure.resourcemanager.synapse.SynapseManager manager) { - SqlPoolSecurityAlertPolicy resource = - manager - .sqlPoolSecurityAlertPolicies() - .getWithResponse( - "securityalert-4799", "securityalert-6440", "testdb", SecurityAlertPolicyName.DEFAULT, Context.NONE) - .getValue(); - resource.update().withState(SecurityAlertPolicyState.ENABLED).apply(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSecurityAlertPoliciesGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSecurityAlertPoliciesGetSamples.java deleted file mode 100644 index 153d68a60cf63..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSecurityAlertPoliciesGetSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.SecurityAlertPolicyName; - -/** Samples for SqlPoolSecurityAlertPolicies Get. */ -public final class SqlPoolSecurityAlertPoliciesGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolSecurityAlert.json - */ - /** - * Sample code: Get a security alert of a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void getASecurityAlertOfASQLAnalyticsPool(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolSecurityAlertPolicies() - .getWithResponse( - "securityalert-6852", "securityalert-2080", "testdb", SecurityAlertPolicyName.DEFAULT, Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSecurityAlertPoliciesListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSecurityAlertPoliciesListSamples.java deleted file mode 100644 index 4292aed408385..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSecurityAlertPoliciesListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolSecurityAlertPolicies List. */ -public final class SqlPoolSecurityAlertPoliciesListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolSecurityAlertPolicies_List.json - */ - /** - * Sample code: Get a security alert of a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void getASecurityAlertOfASQLAnalyticsPool(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.sqlPoolSecurityAlertPolicies().list("securityalert-6852", "securityalert-2080", "testdb", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsDeleteSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsDeleteSamples.java deleted file mode 100644 index 5f78c400d9b72..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolSensitivityLabels Delete. */ -public final class SqlPoolSensitivityLabelsDeleteSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteSqlPoolColumnSensitivityLabel.json - */ - /** - * Sample code: Deletes the sensitivity label of a given column. - * - * @param manager Entry point to SynapseManager. - */ - public static void deletesTheSensitivityLabelOfAGivenColumn( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolSensitivityLabels() - .deleteWithResponse("myRG", "myServer", "myDatabase", "dbo", "myTable", "myColumn", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsDisableRecommendationSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsDisableRecommendationSamples.java deleted file mode 100644 index afc6b8402f9cc..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsDisableRecommendationSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolSensitivityLabels DisableRecommendation. */ -public final class SqlPoolSensitivityLabelsDisableRecommendationSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/RecommendedColumnSensitivityLabelDisable.json - */ - /** - * Sample code: Disables sensitivity recommendations on a given column. - * - * @param manager Entry point to SynapseManager. - */ - public static void disablesSensitivityRecommendationsOnAGivenColumn( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolSensitivityLabels() - .disableRecommendationWithResponse( - "myRG", "myServer", "myDatabase", "dbo", "myTable", "myColumn", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsEnableRecommendationSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsEnableRecommendationSamples.java deleted file mode 100644 index b2701d7f5b880..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsEnableRecommendationSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolSensitivityLabels EnableRecommendation. */ -public final class SqlPoolSensitivityLabelsEnableRecommendationSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/RecommendedColumnSensitivityLabelEnable.json - */ - /** - * Sample code: Enables sensitivity recommendations on a given column. - * - * @param manager Entry point to SynapseManager. - */ - public static void enablesSensitivityRecommendationsOnAGivenColumn( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolSensitivityLabels() - .enableRecommendationWithResponse( - "myRG", "myServer", "myDatabase", "dbo", "myTable", "myColumn", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsGetSamples.java deleted file mode 100644 index 4559e05181d9a..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsGetSamples.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.SensitivityLabelSource; - -/** Samples for SqlPoolSensitivityLabels Get. */ -public final class SqlPoolSensitivityLabelsGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolColumnSensitivityLabelGet.json - */ - /** - * Sample code: Gets the sensitivity label of a given column. - * - * @param manager Entry point to SynapseManager. - */ - public static void getsTheSensitivityLabelOfAGivenColumn(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolSensitivityLabels() - .getWithResponse( - "myRG", - "myServer", - "myDatabase", - "dbo", - "myTable", - "myColumn", - SensitivityLabelSource.CURRENT, - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsListCurrentSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsListCurrentSamples.java deleted file mode 100644 index 2e9f6d1d0f3f3..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsListCurrentSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolSensitivityLabels ListCurrent. */ -public final class SqlPoolSensitivityLabelsListCurrentSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolsSensitivityLabelsWithSourceCurrent.json - */ - /** - * Sample code: Gets the current sensitivity labels of a given SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void getsTheCurrentSensitivityLabelsOfAGivenSQLAnalyticsPool( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.sqlPoolSensitivityLabels().listCurrent("myRG", "myServer", "myDatabase", null, Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsListRecommendedSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsListRecommendedSamples.java deleted file mode 100644 index 16a16f8cd1e33..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsListRecommendedSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolSensitivityLabels ListRecommended. */ -public final class SqlPoolSensitivityLabelsListRecommendedSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolSensitivityLabelsWithSourceRecommended.json - */ - /** - * Sample code: Gets the recommended sensitivity labels of a given SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void getsTheRecommendedSensitivityLabelsOfAGivenSQLAnalyticsPool( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolSensitivityLabels() - .listRecommended("myRG", "myServer", "myDatabase", null, null, null, Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsUpdateSamples.java deleted file mode 100644 index a6b84cefc7e50..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsUpdateSamples.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.fluent.models.SensitivityLabelInner; -import com.azure.resourcemanager.synapse.fluent.models.SensitivityLabelUpdateInner; -import com.azure.resourcemanager.synapse.models.SensitivityLabelRank; -import com.azure.resourcemanager.synapse.models.SensitivityLabelUpdateKind; -import com.azure.resourcemanager.synapse.models.SensitivityLabelUpdateList; -import java.util.Arrays; - -/** Samples for SqlPoolSensitivityLabels Update. */ -public final class SqlPoolSensitivityLabelsUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SensitivityLabelsCurrentUpdate.json - */ - /** - * Sample code: Update sensitivity labels of a given database using an operations batch. - * - * @param manager Entry point to SynapseManager. - */ - public static void updateSensitivityLabelsOfAGivenDatabaseUsingAnOperationsBatch( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolSensitivityLabels() - .updateWithResponse( - "myRG", - "myWorkspace", - "mySqlPool", - new SensitivityLabelUpdateList() - .withOperations( - Arrays - .asList( - new SensitivityLabelUpdateInner() - .withOp(SensitivityLabelUpdateKind.SET) - .withSchema("dbo") - .withTable("table1") - .withColumn("column1") - .withSensitivityLabel( - new SensitivityLabelInner() - .withLabelName("Highly Confidential") - .withLabelId("3A477B16-9423-432B-AA97-6069B481CEC3") - .withInformationType("Financial") - .withInformationTypeId("1D3652D6-422C-4115-82F1-65DAEBC665C8") - .withRank(SensitivityLabelRank.LOW)), - new SensitivityLabelUpdateInner() - .withOp(SensitivityLabelUpdateKind.SET) - .withSchema("dbo") - .withTable("table2") - .withColumn("column2") - .withSensitivityLabel( - new SensitivityLabelInner() - .withLabelName("PII") - .withLabelId("bf91e08c-f4f0-478a-b016-25164b2a65ff") - .withInformationType("PhoneNumber") - .withInformationTypeId("d22fa6e9-5ee4-3bde-4c2b-a409604c4646") - .withRank(SensitivityLabelRank.CRITICAL)), - new SensitivityLabelUpdateInner() - .withOp(SensitivityLabelUpdateKind.REMOVE) - .withSchema("dbo") - .withTable("Table1") - .withColumn("Column3"))), - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolTableColumnsListByTableNameSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolTableColumnsListByTableNameSamples.java deleted file mode 100644 index 3d0f13eecaf12..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolTableColumnsListByTableNameSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolTableColumns ListByTableName. */ -public final class SqlPoolTableColumnsListByTableNameSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolColumns.json - */ - /** - * Sample code: List the columns in a table of a given schema in a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void listTheColumnsInATableOfAGivenSchemaInASQLAnalyticsPool( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolTableColumns() - .listByTableName("myRG", "serverName", "myDatabase", "dbo", "table1", null, Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolTablesGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolTablesGetSamples.java deleted file mode 100644 index 24471d7672408..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolTablesGetSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolTables Get. */ -public final class SqlPoolTablesGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolTableGet.json - */ - /** - * Sample code: Get database table. - * - * @param manager Entry point to SynapseManager. - */ - public static void getDatabaseTable(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.sqlPoolTables().getWithResponse("myRG", "serverName", "myDatabase", "dbo", "table1", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolTablesListBySchemaSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolTablesListBySchemaSamples.java deleted file mode 100644 index 5619b10e2a978..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolTablesListBySchemaSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolTables ListBySchema. */ -public final class SqlPoolTablesListBySchemaSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolTables.json - */ - /** - * Sample code: List the tables of a given schema in a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void listTheTablesOfAGivenSchemaInASQLAnalyticsPool( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.sqlPoolTables().listBySchema("myRG", "serverName", "myDatabase", "dbo", null, Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolTransparentDataEncryptionsCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolTransparentDataEncryptionsCreateOrUpdateSamples.java deleted file mode 100644 index 086e6ddb41090..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolTransparentDataEncryptionsCreateOrUpdateSamples.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.resourcemanager.synapse.models.TransparentDataEncryptionName; -import com.azure.resourcemanager.synapse.models.TransparentDataEncryptionStatus; - -/** Samples for SqlPoolTransparentDataEncryptions CreateOrUpdate. */ -public final class SqlPoolTransparentDataEncryptionsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolTransparentDataEncryption.json - */ - /** - * Sample code: Create or update a Sql pool's transparent data encryption configuration. - * - * @param manager Entry point to SynapseManager. - */ - public static void createOrUpdateASqlPoolSTransparentDataEncryptionConfiguration( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolTransparentDataEncryptions() - .define(TransparentDataEncryptionName.CURRENT) - .withExistingSqlPool("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-9187") - .withStatus(TransparentDataEncryptionStatus.ENABLED) - .create(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolTransparentDataEncryptionsGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolTransparentDataEncryptionsGetSamples.java deleted file mode 100644 index dcc3659ba2d0f..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolTransparentDataEncryptionsGetSamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.TransparentDataEncryptionName; - -/** Samples for SqlPoolTransparentDataEncryptions Get. */ -public final class SqlPoolTransparentDataEncryptionsGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolTransparentDataEncryption.json - */ - /** - * Sample code: Get transparent data encryption configuration of a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void getTransparentDataEncryptionConfigurationOfASQLAnalyticsPool( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolTransparentDataEncryptions() - .getWithResponse( - "sqlcrudtest-6852", - "sqlcrudtest-2080", - "sqlcrudtest-9187", - TransparentDataEncryptionName.CURRENT, - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolTransparentDataEncryptionsListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolTransparentDataEncryptionsListSamples.java deleted file mode 100644 index b4ddb467bb1c1..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolTransparentDataEncryptionsListSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolTransparentDataEncryptions List. */ -public final class SqlPoolTransparentDataEncryptionsListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolTransparentDataEncryptionList.json - */ - /** - * Sample code: Get list of transparent data encryption configurations of a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void getListOfTransparentDataEncryptionConfigurationsOfASQLAnalyticsPool( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolTransparentDataEncryptions() - .list("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-9187", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolUsagesListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolUsagesListSamples.java deleted file mode 100644 index 67652e794cf9a..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolUsagesListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolUsages List. */ -public final class SqlPoolUsagesListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolUsageMetricsList.json - */ - /** - * Sample code: List the usages of a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void listTheUsagesOfASQLAnalyticsPool(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.sqlPoolUsages().list("sqlcrudtest-6730", "sqlcrudtest-9007", "3481", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentRuleBaselinesCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentRuleBaselinesCreateOrUpdateSamples.java deleted file mode 100644 index 7b3ec14452529..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentRuleBaselinesCreateOrUpdateSamples.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.resourcemanager.synapse.models.SqlPoolVulnerabilityAssessmentRuleBaselineItem; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentPolicyBaselineName; -import java.util.Arrays; - -/** Samples for SqlPoolVulnerabilityAssessmentRuleBaselines CreateOrUpdate. */ -public final class SqlPoolVulnerabilityAssessmentRuleBaselinesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolVulnerabilityAssessmentRuleBaseline.json - */ - /** - * Sample code: Creates or updates a database's vulnerability assessment rule baseline. - * - * @param manager Entry point to SynapseManager. - */ - public static void createsOrUpdatesADatabaseSVulnerabilityAssessmentRuleBaseline( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolVulnerabilityAssessmentRuleBaselines() - .define(VulnerabilityAssessmentPolicyBaselineName.DEFAULT) - .withExistingRule( - "vulnerabilityaseessmenttest-4799", - "vulnerabilityaseessmenttest-6440", - "testdb", - VulnerabilityAssessmentName.DEFAULT, - "VA1001") - .withBaselineResults( - Arrays - .asList( - new SqlPoolVulnerabilityAssessmentRuleBaselineItem() - .withResult(Arrays.asList("userA", "SELECT")), - new SqlPoolVulnerabilityAssessmentRuleBaselineItem() - .withResult(Arrays.asList("userB", "SELECT")), - new SqlPoolVulnerabilityAssessmentRuleBaselineItem() - .withResult(Arrays.asList("userC", "SELECT", "tableId_4")))) - .create(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentRuleBaselinesDeleteSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentRuleBaselinesDeleteSamples.java deleted file mode 100644 index c3668bb6bea52..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentRuleBaselinesDeleteSamples.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentPolicyBaselineName; - -/** Samples for SqlPoolVulnerabilityAssessmentRuleBaselines Delete. */ -public final class SqlPoolVulnerabilityAssessmentRuleBaselinesDeleteSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteSqlPoolVulnerabilityAssessmentRuleBaseline.json - */ - /** - * Sample code: Removes a database's vulnerability assessment rule baseline. - * - * @param manager Entry point to SynapseManager. - */ - public static void removesADatabaseSVulnerabilityAssessmentRuleBaseline( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolVulnerabilityAssessmentRuleBaselines() - .deleteWithResponse( - "vulnerabilityaseessmenttest-4799", - "vulnerabilityaseessmenttest-6440", - "testdb", - VulnerabilityAssessmentName.DEFAULT, - "VA1001", - VulnerabilityAssessmentPolicyBaselineName.DEFAULT, - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentRuleBaselinesGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentRuleBaselinesGetSamples.java deleted file mode 100644 index 407e013757f78..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentRuleBaselinesGetSamples.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentPolicyBaselineName; - -/** Samples for SqlPoolVulnerabilityAssessmentRuleBaselines Get. */ -public final class SqlPoolVulnerabilityAssessmentRuleBaselinesGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolVulnerabilityAssessmentRuleBaselineGet.json - */ - /** - * Sample code: Gets a Sql pool's vulnerability assessment rule baseline. - * - * @param manager Entry point to SynapseManager. - */ - public static void getsASqlPoolSVulnerabilityAssessmentRuleBaseline( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolVulnerabilityAssessmentRuleBaselines() - .getWithResponse( - "vulnerabilityaseessmenttest-4711", - "vulnerabilityaseessmenttest-6411", - "testdb", - VulnerabilityAssessmentName.DEFAULT, - "VA1001", - VulnerabilityAssessmentPolicyBaselineName.MASTER, - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScansExportSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScansExportSamples.java deleted file mode 100644 index e2d9da6409eb9..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScansExportSamples.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentName; - -/** Samples for SqlPoolVulnerabilityAssessmentScans Export. */ -public final class SqlPoolVulnerabilityAssessmentScansExportSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ExportSqlPoolVulnerabilityAssessmentScan.json - */ - /** - * Sample code: Export a database's vulnerability assessment scan results. - * - * @param manager Entry point to SynapseManager. - */ - public static void exportADatabaseSVulnerabilityAssessmentScanResults( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolVulnerabilityAssessmentScans() - .exportWithResponse( - "vulnerabilityassessmenttest-4799", - "vulnerabilityassessmenttest-6440", - "testdb", - VulnerabilityAssessmentName.DEFAULT, - "scan001", - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScansGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScansGetSamples.java deleted file mode 100644 index 11636f46bf958..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScansGetSamples.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentName; - -/** Samples for SqlPoolVulnerabilityAssessmentScans Get. */ -public final class SqlPoolVulnerabilityAssessmentScansGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/SqlPoolVulnerabilityAssessmentScanRecordsGet.json - */ - /** - * Sample code: Gets a database vulnerability assessment scan record by scan ID. - * - * @param manager Entry point to SynapseManager. - */ - public static void getsADatabaseVulnerabilityAssessmentScanRecordByScanID( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolVulnerabilityAssessmentScans() - .getWithResponse( - "vulnerabilityassessmenttest-4711", - "vulnerabilityassessmenttest-6411", - "testdb", - VulnerabilityAssessmentName.DEFAULT, - "scan001", - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScansInitiateScanSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScansInitiateScanSamples.java deleted file mode 100644 index 1d12a89e192fd..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScansInitiateScanSamples.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentName; - -/** Samples for SqlPoolVulnerabilityAssessmentScans InitiateScan. */ -public final class SqlPoolVulnerabilityAssessmentScansInitiateScanSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ExecuteSqlPoolVulnerabilityAssessmentScans.json - */ - /** - * Sample code: Executes a Sql pool's vulnerability assessment scan. - * - * @param manager Entry point to SynapseManager. - */ - public static void executesASqlPoolSVulnerabilityAssessmentScan( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolVulnerabilityAssessmentScans() - .initiateScan( - "vulnerabilityassessmenttest-4711", - "vulnerabilityassessmenttest-6411", - "testdb", - VulnerabilityAssessmentName.DEFAULT, - "scan01", - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScansListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScansListSamples.java deleted file mode 100644 index 46170692218da..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScansListSamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentName; - -/** Samples for SqlPoolVulnerabilityAssessmentScans List. */ -public final class SqlPoolVulnerabilityAssessmentScansListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolVulnerabilityAssessmentScanRecords.json - */ - /** - * Sample code: Get a vulnerability scan record of a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void getAVulnerabilityScanRecordOfASQLAnalyticsPool( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolVulnerabilityAssessmentScans() - .list( - "vulnerabilityassessmenttest-4711", - "vulnerabilityassessmenttest-6411", - "testdb", - VulnerabilityAssessmentName.DEFAULT, - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentsCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentsCreateOrUpdateSamples.java deleted file mode 100644 index 7d2140060b96d..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentsCreateOrUpdateSamples.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentRecurringScansProperties; -import java.util.Arrays; - -/** Samples for SqlPoolVulnerabilityAssessments CreateOrUpdate. */ -public final class SqlPoolVulnerabilityAssessmentsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolVulnerabilityAssessmentWithContainerSasKeyAndMinParameters.json - */ - /** - * Sample code: Create a database's vulnerability assessment with minimal parameters, when storageContainerSasKey is - * specified. - * - * @param manager Entry point to SynapseManager. - */ - public static void - createADatabaseSVulnerabilityAssessmentWithMinimalParametersWhenStorageContainerSasKeyIsSpecified( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolVulnerabilityAssessments() - .define(VulnerabilityAssessmentName.DEFAULT) - .withExistingSqlPool("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb") - .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/") - .withStorageContainerSasKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") - .create(); - } - - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolVulnerabilityAssessmentWithAllParameters.json - */ - /** - * Sample code: Create a database's vulnerability assessment with all parameters. - * - * @param manager Entry point to SynapseManager. - */ - public static void createADatabaseSVulnerabilityAssessmentWithAllParameters( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolVulnerabilityAssessments() - .define(VulnerabilityAssessmentName.DEFAULT) - .withExistingSqlPool("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb") - .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/") - .withStorageContainerSasKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") - .withStorageAccountAccessKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") - .withRecurringScans( - new VulnerabilityAssessmentRecurringScansProperties() - .withIsEnabled(true) - .withEmailSubscriptionAdmins(true) - .withEmails(Arrays.asList("email1@mail.com", "email2@mail.com"))) - .create(); - } - - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateVulnerabilityAssessmentWithStorageAccessKeyAndMinParameters.json - */ - /** - * Sample code: Create a database's vulnerability assessment with minimal parameters, when storageAccountAccessKey - * is specified. - * - * @param manager Entry point to SynapseManager. - */ - public static void - createADatabaseSVulnerabilityAssessmentWithMinimalParametersWhenStorageAccountAccessKeyIsSpecified( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolVulnerabilityAssessments() - .define(VulnerabilityAssessmentName.DEFAULT) - .withExistingSqlPool("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb") - .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/") - .withStorageAccountAccessKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") - .create(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentsDeleteSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentsDeleteSamples.java deleted file mode 100644 index f32fe29aaf458..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentsDeleteSamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentName; - -/** Samples for SqlPoolVulnerabilityAssessments Delete. */ -public final class SqlPoolVulnerabilityAssessmentsDeleteSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteSqlPoolVulnerabilityAssessment.json - */ - /** - * Sample code: Remove a database's vulnerability assessment. - * - * @param manager Entry point to SynapseManager. - */ - public static void removeADatabaseSVulnerabilityAssessment( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolVulnerabilityAssessments() - .deleteWithResponse( - "vulnerabilityaseessmenttest-4799", - "vulnerabilityaseessmenttest-6440", - "testdb", - VulnerabilityAssessmentName.DEFAULT, - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentsGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentsGetSamples.java deleted file mode 100644 index 0cf43e30c2b8f..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentsGetSamples.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentName; - -/** Samples for SqlPoolVulnerabilityAssessments Get. */ -public final class SqlPoolVulnerabilityAssessmentsGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolVulnerabilityAssessment.json - */ - /** - * Sample code: Get a Sql pool's vulnerability assessment. - * - * @param manager Entry point to SynapseManager. - */ - public static void getASqlPoolSVulnerabilityAssessment(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolVulnerabilityAssessments() - .getWithResponse( - "vulnerabilityaseessmenttest-4799", - "vulnerabilityaseessmenttest-6440", - "testdb", - VulnerabilityAssessmentName.DEFAULT, - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentsListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentsListSamples.java deleted file mode 100644 index d06d5eb667940..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentsListSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolVulnerabilityAssessments List. */ -public final class SqlPoolVulnerabilityAssessmentsListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolVulnerabilityAssessments.json - */ - /** - * Sample code: Get a vulnerability assessment of a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void getAVulnerabilityAssessmentOfASQLAnalyticsPool( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolVulnerabilityAssessments() - .list("vulnerabilityaseessmenttest-4799", "vulnerabilityaseessmenttest-6440", "testdb", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadClassifierCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadClassifierCreateOrUpdateSamples.java deleted file mode 100644 index 909e8e36d5fe4..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadClassifierCreateOrUpdateSamples.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -/** Samples for SqlPoolWorkloadClassifier CreateOrUpdate. */ -public final class SqlPoolWorkloadClassifierCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolWorkloadClassifierMin.json - */ - /** - * Sample code: Create a workload classifier with the required properties specified. - * - * @param manager Entry point to SynapseManager. - */ - public static void createAWorkloadClassifierWithTheRequiredPropertiesSpecified( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolWorkloadClassifiers() - .define("wlm_workloadclassifier") - .withExistingWorkloadGroup("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-9187", "wlm_workloadgroup") - .withMemberName("dbo") - .create(); - } - - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolWorkloadClassifierMax.json - */ - /** - * Sample code: Create a workload classifier with all properties specified. - * - * @param manager Entry point to SynapseManager. - */ - public static void createAWorkloadClassifierWithAllPropertiesSpecified( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolWorkloadClassifiers() - .define("wlm_workloadclassifier") - .withExistingWorkloadGroup("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-9187", "wlm_workloadgroup") - .withMemberName("dbo") - .withLabel("test_label") - .withContext("test_context") - .withStartTime("12:00") - .withEndTime("14:00") - .withImportance("high") - .create(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadClassifierDeleteSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadClassifierDeleteSamples.java deleted file mode 100644 index 31446758e1337..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadClassifierDeleteSamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolWorkloadClassifier Delete. */ -public final class SqlPoolWorkloadClassifierDeleteSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteSqlPoolWorkloadGroupWorkloadClassifer.json - */ - /** - * Sample code: Delete a workload classifier of a SQL Analytics pool's workload group. - * - * @param manager Entry point to SynapseManager. - */ - public static void deleteAWorkloadClassifierOfASQLAnalyticsPoolSWorkloadGroup( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolWorkloadClassifiers() - .delete( - "sqlcrudtest-6852", - "sqlcrudtest-2080", - "sqlcrudtest-9187", - "wlm_workloadgroup", - "wlm_workloadclassifier", - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadClassifierGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadClassifierGetSamples.java deleted file mode 100644 index 841c6ce83ca28..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadClassifierGetSamples.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolWorkloadClassifier Get. */ -public final class SqlPoolWorkloadClassifierGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolWorkloadGroupWorkloadClassifier.json - */ - /** - * Sample code: Get a workload classifier for SQL Analytics pool's workload group. - * - * @param manager Entry point to SynapseManager. - */ - public static void getAWorkloadClassifierForSQLAnalyticsPoolSWorkloadGroup( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolWorkloadClassifiers() - .getWithResponse( - "sqlcrudtest-6852", - "sqlcrudtest-2080", - "sqlcrudtest-9187", - "wlm_workloadgroup", - "wlm_classifier", - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadClassifierListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadClassifierListSamples.java deleted file mode 100644 index 25751ee3753e0..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadClassifierListSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolWorkloadClassifier List. */ -public final class SqlPoolWorkloadClassifierListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolWorkloadGroupWorkloadClassifierList.json - */ - /** - * Sample code: Get the list of workload classifiers of a SQL Analytics pool's workload group. - * - * @param manager Entry point to SynapseManager. - */ - public static void getTheListOfWorkloadClassifiersOfASQLAnalyticsPoolSWorkloadGroup( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolWorkloadClassifiers() - .list("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-9187", "wlm_workloadgroup", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadGroupCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadGroupCreateOrUpdateSamples.java deleted file mode 100644 index e2ab6e5284da8..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadGroupCreateOrUpdateSamples.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -/** Samples for SqlPoolWorkloadGroup CreateOrUpdate. */ -public final class SqlPoolWorkloadGroupCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolWorkloadGroupMin.json - */ - /** - * Sample code: Create a workload group with the required properties specified. - * - * @param manager Entry point to SynapseManager. - */ - public static void createAWorkloadGroupWithTheRequiredPropertiesSpecified( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolWorkloadGroups() - .define("smallrc") - .withExistingSqlPool("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-9187") - .withMinResourcePercent(0) - .withMaxResourcePercent(100) - .withMinResourcePercentPerRequest(3.0) - .create(); - } - - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateSqlPoolWorkloadGroupMax.json - */ - /** - * Sample code: Create a workload group with all properties specified. - * - * @param manager Entry point to SynapseManager. - */ - public static void createAWorkloadGroupWithAllPropertiesSpecified( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolWorkloadGroups() - .define("smallrc") - .withExistingSqlPool("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-9187") - .withMinResourcePercent(0) - .withMaxResourcePercent(100) - .withMinResourcePercentPerRequest(3.0) - .withMaxResourcePercentPerRequest(3.0) - .withImportance("normal") - .withQueryExecutionTimeout(0) - .create(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadGroupDeleteSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadGroupDeleteSamples.java deleted file mode 100644 index e3d8b2f8def6a..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadGroupDeleteSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolWorkloadGroup Delete. */ -public final class SqlPoolWorkloadGroupDeleteSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteSqlPoolWorkloadGroup.json - */ - /** - * Sample code: Delete a workload group of a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void deleteAWorkloadGroupOfASQLAnalyticsPool( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolWorkloadGroups() - .delete("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-9187", "wlm_workloadgroup", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadGroupGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadGroupGetSamples.java deleted file mode 100644 index 50fde434a756f..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadGroupGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolWorkloadGroup Get. */ -public final class SqlPoolWorkloadGroupGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolWorkloadGroup.json - */ - /** - * Sample code: Get a a workload group of a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void getAAWorkloadGroupOfASQLAnalyticsPool(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPoolWorkloadGroups() - .getWithResponse("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-9187", "smallrc", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadGroupListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadGroupListSamples.java deleted file mode 100644 index 34e73eae0bade..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadGroupListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPoolWorkloadGroup List. */ -public final class SqlPoolWorkloadGroupListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPoolWorkloadGroupList.json - */ - /** - * Sample code: Get the list of workload groups of a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void getTheListOfWorkloadGroupsOfASQLAnalyticsPool( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.sqlPoolWorkloadGroups().list("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-9187", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsCreateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsCreateSamples.java deleted file mode 100644 index cf00299a1f287..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsCreateSamples.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.resourcemanager.synapse.models.Sku; -import com.azure.resourcemanager.synapse.models.StorageAccountType; -import java.util.HashMap; -import java.util.Map; - -/** Samples for SqlPools Create. */ -public final class SqlPoolsCreateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateSqlPool.json - */ - /** - * Sample code: Create a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void createASQLAnalyticsPool(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPools() - .define("ExampleSqlPool") - .withRegion("Southeast Asia") - .withExistingWorkspace("ExampleResourceGroup", "ExampleWorkspace") - .withTags(mapOf()) - .withSku(new Sku().withTier("").withName("")) - .withMaxSizeBytes(0L) - .withCollation("") - .withSourceDatabaseId("") - .withRecoverableDatabaseId("") - .withCreateMode("") - .withStorageAccountType(StorageAccountType.LRS) - .create(); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsDeleteSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsDeleteSamples.java deleted file mode 100644 index c8b1c548a7bf7..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsDeleteSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPools Delete. */ -public final class SqlPoolsDeleteSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteSqlPool.json - */ - /** - * Sample code: Delete a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void deleteASQLAnalyticsPool(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.sqlPools().delete("ExampleResourceGroup", "ExampleWorkspace", "ExampleSqlPool", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsGetSamples.java deleted file mode 100644 index bd8961c34cf8c..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsGetSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPools Get. */ -public final class SqlPoolsGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetSqlPool.json - */ - /** - * Sample code: Get a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void getASQLAnalyticsPool(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.sqlPools().getWithResponse("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-9187", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsListByWorkspaceSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsListByWorkspaceSamples.java deleted file mode 100644 index ca6656d27649e..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsListByWorkspaceSamples.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPools ListByWorkspace. */ -public final class SqlPoolsListByWorkspaceSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolsInWorkspaceWithFilter.json - */ - /** - * Sample code: List SQL Analytics pools in a workspace with filter. - * - * @param manager Entry point to SynapseManager. - */ - public static void listSQLAnalyticsPoolsInAWorkspaceWithFilter( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.sqlPools().listByWorkspace("sqlcrudtest-6845", "sqlcrudtest-7177", Context.NONE); - } - - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListSqlPoolsInWorkspace.json - */ - /** - * Sample code: List SQL Analytics pools in a workspace. - * - * @param manager Entry point to SynapseManager. - */ - public static void listSQLAnalyticsPoolsInAWorkspace(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.sqlPools().listByWorkspace("sqlcrudtest-6845", "sqlcrudtest-7177", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsPauseSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsPauseSamples.java deleted file mode 100644 index b54cafc242444..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsPauseSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPools Pause. */ -public final class SqlPoolsPauseSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/PauseSqlPool.json - */ - /** - * Sample code: Pause a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void pauseASQLAnalyticsPool(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.sqlPools().pause("Default-SQL-SouthEastAsia", "testsvr", "testdwdb", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsRenameSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsRenameSamples.java deleted file mode 100644 index 96b7c454225b5..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsRenameSamples.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.ResourceMoveDefinition; - -/** Samples for SqlPools Rename. */ -public final class SqlPoolsRenameSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/RenameSqlPool.json - */ - /** - * Sample code: Rename a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void renameASQLAnalyticsPool(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .sqlPools() - .renameWithResponse( - "Default-SQL-SouthEastAsia", - "testsvr", - "testdb", - new ResourceMoveDefinition() - .withId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Synapse/workspaces/testsvr/sqlPools/newtestdb"), - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsResumeSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsResumeSamples.java deleted file mode 100644 index 8643f0d9ab9c2..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsResumeSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for SqlPools Resume. */ -public final class SqlPoolsResumeSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ResumeSqlPool.json - */ - /** - * Sample code: Resume a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void resumeASQLAnalyticsPool(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.sqlPools().resume("sqlcrudtest-6852", "sqlcrudtest-2080", "sqlcrudtest-9187", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsUpdateSamples.java deleted file mode 100644 index b4d0debef7a2d..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/SqlPoolsUpdateSamples.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.Sku; -import com.azure.resourcemanager.synapse.models.SqlPool; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; - -/** Samples for SqlPools Update. */ -public final class SqlPoolsUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/UpdateSqlPool.json - */ - /** - * Sample code: Update a SQL Analytics pool. - * - * @param manager Entry point to SynapseManager. - */ - public static void updateASQLAnalyticsPool(com.azure.resourcemanager.synapse.SynapseManager manager) { - SqlPool resource = - manager - .sqlPools() - .getWithResponse("ExampleResourceGroup", "ExampleWorkspace", "ExampleSqlPool", Context.NONE) - .getValue(); - resource - .update() - .withTags(mapOf()) - .withSku(new Sku().withTier("").withName("")) - .withMaxSizeBytes(0L) - .withCollation("") - .withSourceDatabaseId("") - .withRecoverableDatabaseId("") - .withRestorePointInTime(OffsetDateTime.parse("1970-01-01T00:00:00.000Z")) - .withCreateMode("") - .withCreationDate(OffsetDateTime.parse("1970-01-01T00:00:00.000Z")) - .apply(); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceAadAdminsCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceAadAdminsCreateOrUpdateSamples.java deleted file mode 100644 index 87f693cd2de73..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceAadAdminsCreateOrUpdateSamples.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.fluent.models.WorkspaceAadAdminInfoInner; - -/** Samples for WorkspaceAadAdmins CreateOrUpdate. */ -public final class WorkspaceAadAdminsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateWorkspaceAadAdmin.json - */ - /** - * Sample code: Create or update workspace active directory admin. - * - * @param manager Entry point to SynapseManager. - */ - public static void createOrUpdateWorkspaceActiveDirectoryAdmin( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaceAadAdmins() - .createOrUpdate( - "resourceGroup1", - "workspace1", - new WorkspaceAadAdminInfoInner() - .withTenantId("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c") - .withLogin("bob@contoso.com") - .withAdministratorType("ActiveDirectory") - .withSid("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"), - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceAadAdminsDeleteSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceAadAdminsDeleteSamples.java deleted file mode 100644 index a6dd079c09414..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceAadAdminsDeleteSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for WorkspaceAadAdmins Delete. */ -public final class WorkspaceAadAdminsDeleteSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteWorkspaceAadAdmin.json - */ - /** - * Sample code: Delete workspace active directory admin. - * - * @param manager Entry point to SynapseManager. - */ - public static void deleteWorkspaceActiveDirectoryAdmin(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.workspaceAadAdmins().delete("resourceGroup1", "workspace1", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceAadAdminsGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceAadAdminsGetSamples.java deleted file mode 100644 index 71d0de9bf8193..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceAadAdminsGetSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for WorkspaceAadAdmins Get. */ -public final class WorkspaceAadAdminsGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetWorkspaceAadAdmin.json - */ - /** - * Sample code: Get workspace active directory admin. - * - * @param manager Entry point to SynapseManager. - */ - public static void getWorkspaceActiveDirectoryAdmin(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.workspaceAadAdmins().getWithResponse("resourceGroup1", "workspace1", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedIdentitySqlControlSettingsCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedIdentitySqlControlSettingsCreateOrUpdateSamples.java deleted file mode 100644 index 6e0162c5642fa..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedIdentitySqlControlSettingsCreateOrUpdateSamples.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.fluent.models.ManagedIdentitySqlControlSettingsModelInner; -import com.azure.resourcemanager.synapse.models.ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity; -import com.azure.resourcemanager.synapse.models.ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentityDesiredState; - -/** Samples for WorkspaceManagedIdentitySqlControlSettings CreateOrUpdate. */ -public final class WorkspaceManagedIdentitySqlControlSettingsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateManagedIdentitySqlControlSettings.json - */ - /** - * Sample code: Create or update managed identity sql control settings. - * - * @param manager Entry point to SynapseManager. - */ - public static void createOrUpdateManagedIdentitySqlControlSettings( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaceManagedIdentitySqlControlSettings() - .createOrUpdate( - "resourceGroup1", - "workspace1", - new ManagedIdentitySqlControlSettingsModelInner() - .withGrantSqlControlToManagedIdentity( - new ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity() - .withDesiredState( - ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentityDesiredState - .ENABLED)), - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedIdentitySqlControlSettingsGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedIdentitySqlControlSettingsGetSamples.java deleted file mode 100644 index 7667620dabd45..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedIdentitySqlControlSettingsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for WorkspaceManagedIdentitySqlControlSettings Get. */ -public final class WorkspaceManagedIdentitySqlControlSettingsGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetManagedIdentitySqlControlSettings.json - */ - /** - * Sample code: Get managed identity sql control settings. - * - * @param manager Entry point to SynapseManager. - */ - public static void getManagedIdentitySqlControlSettings(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaceManagedIdentitySqlControlSettings() - .getWithResponse("resourceGroup1", "workspace1", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerBlobAuditingPoliciesCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerBlobAuditingPoliciesCreateOrUpdateSamples.java deleted file mode 100644 index 6e24bdef03eee..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerBlobAuditingPoliciesCreateOrUpdateSamples.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.resourcemanager.synapse.models.BlobAuditingPolicyName; -import com.azure.resourcemanager.synapse.models.BlobAuditingPolicyState; -import java.util.Arrays; -import java.util.UUID; - -/** Samples for WorkspaceManagedSqlServerBlobAuditingPolicies CreateOrUpdate. */ -public final class WorkspaceManagedSqlServerBlobAuditingPoliciesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateWorkspaceManagedSqlServerBlobAuditingSettingsWithAllParameters.json - */ - /** - * Sample code: Create or update blob auditing policy of workspace SQL Server with all parameters. - * - * @param manager Entry point to SynapseManager. - */ - public static void createOrUpdateBlobAuditingPolicyOfWorkspaceSQLServerWithAllParameters( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaceManagedSqlServerBlobAuditingPolicies() - .define(BlobAuditingPolicyName.DEFAULT) - .withExistingWorkspace("wsg-7398", "testWorkspace") - .withState(BlobAuditingPolicyState.ENABLED) - .withStorageEndpoint("https://mystorage.blob.core.windows.net") - .withStorageAccountAccessKey( - "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==") - .withRetentionDays(6) - .withAuditActionsAndGroups( - Arrays - .asList( - "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", - "FAILED_DATABASE_AUTHENTICATION_GROUP", - "BATCH_COMPLETED_GROUP")) - .withStorageAccountSubscriptionId(UUID.fromString("00000000-1234-0000-5678-000000000000")) - .withIsStorageSecondaryKeyInUse(false) - .withIsAzureMonitorTargetEnabled(true) - .withQueueDelayMs(4000) - .create(); - } - - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateWorkspaceManagedSqlServerBlobAuditingSettingsWithMinParameters.json - */ - /** - * Sample code: Create or update blob auditing policy of workspace managed Sql Server with minimal parameters. - * - * @param manager Entry point to SynapseManager. - */ - public static void createOrUpdateBlobAuditingPolicyOfWorkspaceManagedSqlServerWithMinimalParameters( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaceManagedSqlServerBlobAuditingPolicies() - .define(BlobAuditingPolicyName.DEFAULT) - .withExistingWorkspace("wsg-7398", "testWorkspace") - .withState(BlobAuditingPolicyState.ENABLED) - .withStorageEndpoint("https://mystorage.blob.core.windows.net") - .withStorageAccountAccessKey( - "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==") - .create(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerBlobAuditingPoliciesGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerBlobAuditingPoliciesGetSamples.java deleted file mode 100644 index 4bd34853b63c1..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerBlobAuditingPoliciesGetSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.BlobAuditingPolicyName; - -/** Samples for WorkspaceManagedSqlServerBlobAuditingPolicies Get. */ -public final class WorkspaceManagedSqlServerBlobAuditingPoliciesGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetWorkspaceManagedSqlServerBlobAuditingSettings.json - */ - /** - * Sample code: Get blob auditing setting of workspace managed sql Server. - * - * @param manager Entry point to SynapseManager. - */ - public static void getBlobAuditingSettingOfWorkspaceManagedSqlServer( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaceManagedSqlServerBlobAuditingPolicies() - .getWithResponse("wsg-7398", "testWorkspace", BlobAuditingPolicyName.DEFAULT, Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerBlobAuditingPoliciesListByWorkspaceSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerBlobAuditingPoliciesListByWorkspaceSamples.java deleted file mode 100644 index c0d874cbc4a9f..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerBlobAuditingPoliciesListByWorkspaceSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for WorkspaceManagedSqlServerBlobAuditingPolicies ListByWorkspace. */ -public final class WorkspaceManagedSqlServerBlobAuditingPoliciesListByWorkspaceSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListWorkspaceManagedSqlServerBlobAuditingSettings.json - */ - /** - * Sample code: Get blob auditing policy of workspace manged sql Server. - * - * @param manager Entry point to SynapseManager. - */ - public static void getBlobAuditingPolicyOfWorkspaceMangedSqlServer( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaceManagedSqlServerBlobAuditingPolicies() - .listByWorkspace("wsg-7398", "testWorkspace", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerEncryptionProtectorCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerEncryptionProtectorCreateOrUpdateSamples.java deleted file mode 100644 index c72b25f0401b6..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerEncryptionProtectorCreateOrUpdateSamples.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.EncryptionProtector; -import com.azure.resourcemanager.synapse.models.EncryptionProtectorName; -import com.azure.resourcemanager.synapse.models.ServerKeyType; - -/** Samples for WorkspaceManagedSqlServerEncryptionProtector CreateOrUpdate. */ -public final class WorkspaceManagedSqlServerEncryptionProtectorCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/WorkspaceManagedSqlServerEncryptionProtectorCreateOrUpdateKeyVault.json - */ - /** - * Sample code: Update the encryption protector to key vault. - * - * @param manager Entry point to SynapseManager. - */ - public static void updateTheEncryptionProtectorToKeyVault( - com.azure.resourcemanager.synapse.SynapseManager manager) { - EncryptionProtector resource = - manager - .workspaceManagedSqlServerEncryptionProtectors() - .getWithResponse("wsg-7398", "testWorkspace", EncryptionProtectorName.CURRENT, Context.NONE) - .getValue(); - resource - .update() - .withServerKeyName("someVault_someKey_01234567890123456789012345678901") - .withServerKeyType(ServerKeyType.AZURE_KEY_VAULT) - .apply(); - } - - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/WorkspaceManagedSqlServerEncryptionProtectorCreateOrUpdateServiceManaged.json - */ - /** - * Sample code: Update the encryption protector to service managed. - * - * @param manager Entry point to SynapseManager. - */ - public static void updateTheEncryptionProtectorToServiceManaged( - com.azure.resourcemanager.synapse.SynapseManager manager) { - EncryptionProtector resource = - manager - .workspaceManagedSqlServerEncryptionProtectors() - .getWithResponse("wsg-7398", "testWorkspace", EncryptionProtectorName.CURRENT, Context.NONE) - .getValue(); - resource.update().withServerKeyName("ServiceManaged").withServerKeyType(ServerKeyType.SERVICE_MANAGED).apply(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerEncryptionProtectorGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerEncryptionProtectorGetSamples.java deleted file mode 100644 index f491d41a8d4f9..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerEncryptionProtectorGetSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.EncryptionProtectorName; - -/** Samples for WorkspaceManagedSqlServerEncryptionProtector Get. */ -public final class WorkspaceManagedSqlServerEncryptionProtectorGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetWorkspaceManagedSqlServerEncryptionProtector.json - */ - /** - * Sample code: Get workspace managed sql Server's encryption protector. - * - * @param manager Entry point to SynapseManager. - */ - public static void getWorkspaceManagedSqlServerSEncryptionProtector( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaceManagedSqlServerEncryptionProtectors() - .getWithResponse("wsg-7398", "testWorkspace", EncryptionProtectorName.CURRENT, Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerEncryptionProtectorListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerEncryptionProtectorListSamples.java deleted file mode 100644 index 6995ab8cc1573..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerEncryptionProtectorListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for WorkspaceManagedSqlServerEncryptionProtector List. */ -public final class WorkspaceManagedSqlServerEncryptionProtectorListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetWorkspaceManagedSqlServerEncryptionProtectorList.json - */ - /** - * Sample code: Get workspace managed sql Server's encryption protectors. - * - * @param manager Entry point to SynapseManager. - */ - public static void getWorkspaceManagedSqlServerSEncryptionProtectors( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.workspaceManagedSqlServerEncryptionProtectors().list("wsg-7398", "testWorkspace", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerEncryptionProtectorRevalidateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerEncryptionProtectorRevalidateSamples.java deleted file mode 100644 index fe13f0dc55b02..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerEncryptionProtectorRevalidateSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.EncryptionProtectorName; - -/** Samples for WorkspaceManagedSqlServerEncryptionProtector Revalidate. */ -public final class WorkspaceManagedSqlServerEncryptionProtectorRevalidateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/WorkspaceManagedSqlServerEncryptionProtectorRevalidate.json - */ - /** - * Sample code: Revalidates the encryption protector. - * - * @param manager Entry point to SynapseManager. - */ - public static void revalidatesTheEncryptionProtector(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaceManagedSqlServerEncryptionProtectors() - .revalidate("wsg-7398", "testWorkspace", EncryptionProtectorName.CURRENT, Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesCreateOrUpdateSamples.java deleted file mode 100644 index 1a797eaec7904..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesCreateOrUpdateSamples.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.resourcemanager.synapse.models.BlobAuditingPolicyName; -import com.azure.resourcemanager.synapse.models.BlobAuditingPolicyState; -import java.util.Arrays; -import java.util.UUID; - -/** Samples for WorkspaceManagedSqlServerExtendedBlobAuditingPolicies CreateOrUpdate. */ -public final class WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateWorkspaceManagedSqlServerExtendedBlobAuditingSettingsWithAllParameters.json - */ - /** - * Sample code: Create or update workspace managed sql server's extended blob auditing policy of with all - * parameters. - * - * @param manager Entry point to SynapseManager. - */ - public static void createOrUpdateWorkspaceManagedSqlServerSExtendedBlobAuditingPolicyOfWithAllParameters( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaceManagedSqlServerExtendedBlobAuditingPolicies() - .define(BlobAuditingPolicyName.DEFAULT) - .withExistingWorkspace("wsg-7398", "testWorkspace") - .withPredicateExpression("object_name = 'SensitiveData'") - .withState(BlobAuditingPolicyState.ENABLED) - .withStorageEndpoint("https://mystorage.blob.core.windows.net") - .withStorageAccountAccessKey( - "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==") - .withRetentionDays(6) - .withAuditActionsAndGroups( - Arrays - .asList( - "SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP", - "FAILED_DATABASE_AUTHENTICATION_GROUP", - "BATCH_COMPLETED_GROUP")) - .withStorageAccountSubscriptionId(UUID.fromString("00000000-1234-0000-5678-000000000000")) - .withIsStorageSecondaryKeyInUse(false) - .withIsAzureMonitorTargetEnabled(true) - .create(); - } - - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateWorkspaceManagedSqlServerExetendedBlobAuditingSettingsWithMinParameters.json - */ - /** - * Sample code: Create or update workspace managed sql server's extended blob auditing policy of with minimal - * parameters. - * - * @param manager Entry point to SynapseManager. - */ - public static void createOrUpdateWorkspaceManagedSqlServerSExtendedBlobAuditingPolicyOfWithMinimalParameters( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaceManagedSqlServerExtendedBlobAuditingPolicies() - .define(BlobAuditingPolicyName.DEFAULT) - .withExistingWorkspace("wsg-7398", "testWorkspace") - .withState(BlobAuditingPolicyState.ENABLED) - .withStorageEndpoint("https://mystorage.blob.core.windows.net") - .withStorageAccountAccessKey( - "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==") - .create(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesGetSamples.java deleted file mode 100644 index 8fe7c851c0752..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesGetSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.BlobAuditingPolicyName; - -/** Samples for WorkspaceManagedSqlServerExtendedBlobAuditingPolicies Get. */ -public final class WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetWorkspaceManagedSqlExtendedServerBlobAuditingSettings.json - */ - /** - * Sample code: Get workspace managed sql servers' extended blob auditing settings. - * - * @param manager Entry point to SynapseManager. - */ - public static void getWorkspaceManagedSqlServersExtendedBlobAuditingSettings( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaceManagedSqlServerExtendedBlobAuditingPolicies() - .getWithResponse("wsg-7398", "testWorkspace", BlobAuditingPolicyName.DEFAULT, Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesListByWorkspaceSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesListByWorkspaceSamples.java deleted file mode 100644 index 640800d1ebaff..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesListByWorkspaceSamples.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for WorkspaceManagedSqlServerExtendedBlobAuditingPolicies ListByWorkspace. */ -public final class WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesListByWorkspaceSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListWorkspaceManagedSqlServerExtendedBlobAuditingSettings.json - */ - /** - * Sample code: Get workspace managed sql server's extended blob auditing settings. - * - * @param manager Entry point to SynapseManager. - */ - public static void getWorkspaceManagedSqlServerSExtendedBlobAuditingSettings( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaceManagedSqlServerExtendedBlobAuditingPolicies() - .listByWorkspace("wsg-7398", "testWorkspace", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerRecoverableSqlPoolsGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerRecoverableSqlPoolsGetSamples.java deleted file mode 100644 index 970c3550e1230..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerRecoverableSqlPoolsGetSamples.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for WorkspaceManagedSqlServerRecoverableSqlPools Get. */ -public final class WorkspaceManagedSqlServerRecoverableSqlPoolsGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetWorkspaceManagedSqlServerRecoverableSqlPool.json - */ - /** - * Sample code: Get recoverable sql pools for the server. - * - * @param manager Entry point to SynapseManager. - */ - public static void getRecoverableSqlPoolsForTheServer(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaceManagedSqlServerRecoverableSqlPools() - .getWithResponse("wsg-7398", "testWorkspace", "recoverableSqlpools-1235", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerRecoverableSqlPoolsListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerRecoverableSqlPoolsListSamples.java deleted file mode 100644 index 8172be9f52494..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerRecoverableSqlPoolsListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for WorkspaceManagedSqlServerRecoverableSqlPools List. */ -public final class WorkspaceManagedSqlServerRecoverableSqlPoolsListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListWorkspaceManagedSqlServerRecoverableSqlPool.json - */ - /** - * Sample code: List recoverable sql pools for the server. - * - * @param manager Entry point to SynapseManager. - */ - public static void listRecoverableSqlPoolsForTheServer(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.workspaceManagedSqlServerRecoverableSqlPools().list("wsg-7398", "testWorkspace", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerSecurityAlertPolicyCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerSecurityAlertPolicyCreateOrUpdateSamples.java deleted file mode 100644 index 98b0556e0134f..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerSecurityAlertPolicyCreateOrUpdateSamples.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.SecurityAlertPolicyNameAutoGenerated; -import com.azure.resourcemanager.synapse.models.SecurityAlertPolicyState; -import com.azure.resourcemanager.synapse.models.ServerSecurityAlertPolicy; -import java.util.Arrays; - -/** Samples for WorkspaceManagedSqlServerSecurityAlertPolicy CreateOrUpdate. */ -public final class WorkspaceManagedSqlServerSecurityAlertPolicyCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/WorkspaceManagedSqlServerSecurityAlertWithAllParameters.json - */ - /** - * Sample code: Update a workspace managed sql server's threat detection policy with all parameters. - * - * @param manager Entry point to SynapseManager. - */ - public static void updateAWorkspaceManagedSqlServerSThreatDetectionPolicyWithAllParameters( - com.azure.resourcemanager.synapse.SynapseManager manager) { - ServerSecurityAlertPolicy resource = - manager - .workspaceManagedSqlServerSecurityAlertPolicies() - .getWithResponse( - "wsg-7398", "testWorkspace", SecurityAlertPolicyNameAutoGenerated.DEFAULT, Context.NONE) - .getValue(); - resource - .update() - .withState(SecurityAlertPolicyState.ENABLED) - .withDisabledAlerts(Arrays.asList("Access_Anomaly", "Usage_Anomaly")) - .withEmailAddresses(Arrays.asList("testSecurityAlert@microsoft.com")) - .withEmailAccountAdmins(true) - .withStorageEndpoint("https://mystorage.blob.core.windows.net") - .withStorageAccountAccessKey( - "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==") - .withRetentionDays(5) - .apply(); - } - - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/WorkspaceManagedSqlServerSecurityAlertCreateWithMinParameters.json - */ - /** - * Sample code: Update a workspace managed sql server's threat detection policy with minimal parameters. - * - * @param manager Entry point to SynapseManager. - */ - public static void updateAWorkspaceManagedSqlServerSThreatDetectionPolicyWithMinimalParameters( - com.azure.resourcemanager.synapse.SynapseManager manager) { - ServerSecurityAlertPolicy resource = - manager - .workspaceManagedSqlServerSecurityAlertPolicies() - .getWithResponse( - "wsg-7398", "testWorkspace", SecurityAlertPolicyNameAutoGenerated.DEFAULT, Context.NONE) - .getValue(); - resource - .update() - .withState(SecurityAlertPolicyState.DISABLED) - .withEmailAccountAdmins(true) - .withStorageEndpoint("https://mystorage.blob.core.windows.net") - .withStorageAccountAccessKey( - "sdlfkjabc+sdlfkjsdlkfsjdfLDKFTERLKFDFKLjsdfksjdflsdkfD2342309432849328476458/3RSD==") - .apply(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerSecurityAlertPolicyGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerSecurityAlertPolicyGetSamples.java deleted file mode 100644 index ad799aab379ae..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerSecurityAlertPolicyGetSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.SecurityAlertPolicyNameAutoGenerated; - -/** Samples for WorkspaceManagedSqlServerSecurityAlertPolicy Get. */ -public final class WorkspaceManagedSqlServerSecurityAlertPolicyGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetWorkspaceManagedSqlServerSecurityAlertPolicy.json - */ - /** - * Sample code: Get workspace managed sql Server's security alert policy. - * - * @param manager Entry point to SynapseManager. - */ - public static void getWorkspaceManagedSqlServerSSecurityAlertPolicy( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaceManagedSqlServerSecurityAlertPolicies() - .getWithResponse("wsg-7398", "testWorkspace", SecurityAlertPolicyNameAutoGenerated.DEFAULT, Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerSecurityAlertPolicyListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerSecurityAlertPolicyListSamples.java deleted file mode 100644 index d0afbbabaf43a..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerSecurityAlertPolicyListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for WorkspaceManagedSqlServerSecurityAlertPolicy List. */ -public final class WorkspaceManagedSqlServerSecurityAlertPolicyListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListWorkspaceManagedSqlServerSecurityAlertPolicies.json - */ - /** - * Sample code: Get workspace managed sql server's security alert policy. - * - * @param manager Entry point to SynapseManager. - */ - public static void getWorkspaceManagedSqlServerSSecurityAlertPolicy( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.workspaceManagedSqlServerSecurityAlertPolicies().list("wsg-7398", "testWorkspace", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerUsagesListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerUsagesListSamples.java deleted file mode 100644 index 3c672fb80abd6..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerUsagesListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for WorkspaceManagedSqlServerUsages List. */ -public final class WorkspaceManagedSqlServerUsagesListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListWorkspaceManagedSqlServerUsages.json - */ - /** - * Sample code: List usages metric for the workspace managed sql server. - * - * @param manager Entry point to SynapseManager. - */ - public static void listUsagesMetricForTheWorkspaceManagedSqlServer( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.workspaceManagedSqlServerUsages().list("wsg-7398", "testWorkspace", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerVulnerabilityAssessmentsCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerVulnerabilityAssessmentsCreateOrUpdateSamples.java deleted file mode 100644 index 188ce097da20b..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerVulnerabilityAssessmentsCreateOrUpdateSamples.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentRecurringScansProperties; -import java.util.Arrays; - -/** Samples for WorkspaceManagedSqlServerVulnerabilityAssessments CreateOrUpdate. */ -public final class WorkspaceManagedSqlServerVulnerabilityAssessmentsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/PutWorkspaceMangedSqlServerVulnerabilityAssessmentCreateContainerSasKeyMin.json - */ - /** - * Sample code: Create or Update a workspace managed sql server's vulnerability assessment with minimal parameters, - * when storageContainerSasKey is specified. - * - * @param manager Entry point to SynapseManager. - */ - public static void - createOrUpdateAWorkspaceManagedSqlServerSVulnerabilityAssessmentWithMinimalParametersWhenStorageContainerSasKeyIsSpecified( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaceManagedSqlServerVulnerabilityAssessments() - .define(VulnerabilityAssessmentName.DEFAULT) - .withExistingWorkspace("wsg-7398", "testWorkspace") - .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/") - .withStorageContainerSasKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") - .create(); - } - - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/PutWorkspaceMangedSqlServerVulnerabilityAssessmentCreateStorageAccessKeyMin.json - */ - /** - * Sample code: Create or Update a workspace managed sql server's vulnerability assessment with minimal parameters, - * when storageAccountAccessKey is specified. - * - * @param manager Entry point to SynapseManager. - */ - public static void - createOrUpdateAWorkspaceManagedSqlServerSVulnerabilityAssessmentWithMinimalParametersWhenStorageAccountAccessKeyIsSpecified( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaceManagedSqlServerVulnerabilityAssessments() - .define(VulnerabilityAssessmentName.DEFAULT) - .withExistingWorkspace("wsg-7398", "testWorkspace") - .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/") - .withStorageAccountAccessKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") - .create(); - } - - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/PutWorkspaceManagedSqlServerVulnerabilityAssessmentWithAllParameters.json - */ - /** - * Sample code: Create or Update a workspace managed sql server's vulnerability assessment with all parameters. - * - * @param manager Entry point to SynapseManager. - */ - public static void createOrUpdateAWorkspaceManagedSqlServerSVulnerabilityAssessmentWithAllParameters( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaceManagedSqlServerVulnerabilityAssessments() - .define(VulnerabilityAssessmentName.DEFAULT) - .withExistingWorkspace("wsg-7398", "testWorkspace") - .withStorageContainerPath("https://myStorage.blob.core.windows.net/vulnerability-assessment/") - .withStorageContainerSasKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") - .withStorageAccountAccessKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") - .withRecurringScans( - new VulnerabilityAssessmentRecurringScansProperties() - .withIsEnabled(true) - .withEmailSubscriptionAdmins(true) - .withEmails(Arrays.asList("email1@mail.com", "email2@mail.com"))) - .create(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerVulnerabilityAssessmentsDeleteSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerVulnerabilityAssessmentsDeleteSamples.java deleted file mode 100644 index 5e0ac48d64571..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerVulnerabilityAssessmentsDeleteSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentName; - -/** Samples for WorkspaceManagedSqlServerVulnerabilityAssessments Delete. */ -public final class WorkspaceManagedSqlServerVulnerabilityAssessmentsDeleteSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteWorkspaceManagedSqlServerVulnerabilityAssessment.json - */ - /** - * Sample code: Remove workspace managed sql Server's vulnerability assessment. - * - * @param manager Entry point to SynapseManager. - */ - public static void removeWorkspaceManagedSqlServerSVulnerabilityAssessment( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaceManagedSqlServerVulnerabilityAssessments() - .deleteWithResponse("wsg-7398", "testWorkspace", VulnerabilityAssessmentName.DEFAULT, Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerVulnerabilityAssessmentsGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerVulnerabilityAssessmentsGetSamples.java deleted file mode 100644 index 71c59a123c684..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerVulnerabilityAssessmentsGetSamples.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentName; - -/** Samples for WorkspaceManagedSqlServerVulnerabilityAssessments Get. */ -public final class WorkspaceManagedSqlServerVulnerabilityAssessmentsGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetWorkspaceManagedSqlServerVulnerabilityAssessment.json - */ - /** - * Sample code: Get workspace managed sql Server's vulnerability assessment. - * - * @param manager Entry point to SynapseManager. - */ - public static void getWorkspaceManagedSqlServerSVulnerabilityAssessment( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaceManagedSqlServerVulnerabilityAssessments() - .getWithResponse("wsg-7398", "testWorkspace", VulnerabilityAssessmentName.DEFAULT, Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerVulnerabilityAssessmentsListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerVulnerabilityAssessmentsListSamples.java deleted file mode 100644 index d53f42c712adf..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerVulnerabilityAssessmentsListSamples.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for WorkspaceManagedSqlServerVulnerabilityAssessments List. */ -public final class WorkspaceManagedSqlServerVulnerabilityAssessmentsListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListWorkspaceManagedSqlServerVulnerabilityAssessmentPolicies.json - */ - /** - * Sample code: Get workspace managed sql Server's vulnerability assessment policies. - * - * @param manager Entry point to SynapseManager. - */ - public static void getWorkspaceManagedSqlServerSVulnerabilityAssessmentPolicies( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.workspaceManagedSqlServerVulnerabilityAssessments().list("wsg-7398", "testWorkspace", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceSqlAadAdminsCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceSqlAadAdminsCreateOrUpdateSamples.java deleted file mode 100644 index 45b572c398c5e..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceSqlAadAdminsCreateOrUpdateSamples.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.fluent.models.WorkspaceAadAdminInfoInner; - -/** Samples for WorkspaceSqlAadAdmins CreateOrUpdate. */ -public final class WorkspaceSqlAadAdminsCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateWorkspaceAadAdmin.json - */ - /** - * Sample code: Create or update workspace active directory admin. - * - * @param manager Entry point to SynapseManager. - */ - public static void createOrUpdateWorkspaceActiveDirectoryAdmin( - com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaceSqlAadAdmins() - .createOrUpdate( - "resourceGroup1", - "workspace1", - new WorkspaceAadAdminInfoInner() - .withTenantId("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c") - .withLogin("bob@contoso.com") - .withAdministratorType("ActiveDirectory") - .withSid("c6b82b90-a647-49cb-8a62-0d2d3cb7ac7c"), - Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceSqlAadAdminsDeleteSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceSqlAadAdminsDeleteSamples.java deleted file mode 100644 index 97c25153d9a40..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceSqlAadAdminsDeleteSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for WorkspaceSqlAadAdmins Delete. */ -public final class WorkspaceSqlAadAdminsDeleteSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteWorkspaceAadAdmin.json - */ - /** - * Sample code: Delete workspace active directory admin. - * - * @param manager Entry point to SynapseManager. - */ - public static void deleteWorkspaceActiveDirectoryAdmin(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.workspaceSqlAadAdmins().delete("resourceGroup1", "workspace1", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceSqlAadAdminsGetSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceSqlAadAdminsGetSamples.java deleted file mode 100644 index 96f950a270d25..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceSqlAadAdminsGetSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for WorkspaceSqlAadAdmins Get. */ -public final class WorkspaceSqlAadAdminsGetSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetWorkspaceAadAdmin.json - */ - /** - * Sample code: Get workspace active directory admin. - * - * @param manager Entry point to SynapseManager. - */ - public static void getWorkspaceActiveDirectoryAdmin(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.workspaceSqlAadAdmins().getWithResponse("resourceGroup1", "workspace1", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspacesCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspacesCreateOrUpdateSamples.java deleted file mode 100644 index 3d27efbe97d92..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspacesCreateOrUpdateSamples.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.resourcemanager.synapse.models.CspWorkspaceAdminProperties; -import com.azure.resourcemanager.synapse.models.CustomerManagedKeyDetails; -import com.azure.resourcemanager.synapse.models.DataLakeStorageAccountDetails; -import com.azure.resourcemanager.synapse.models.EncryptionDetails; -import com.azure.resourcemanager.synapse.models.KekIdentityProperties; -import com.azure.resourcemanager.synapse.models.ManagedIdentity; -import com.azure.resourcemanager.synapse.models.ManagedVirtualNetworkSettings; -import com.azure.resourcemanager.synapse.models.PurviewConfiguration; -import com.azure.resourcemanager.synapse.models.ResourceIdentityType; -import com.azure.resourcemanager.synapse.models.UserAssignedManagedIdentity; -import com.azure.resourcemanager.synapse.models.WorkspaceKeyDetails; -import com.azure.resourcemanager.synapse.models.WorkspacePublicNetworkAccess; -import com.azure.resourcemanager.synapse.models.WorkspaceRepositoryConfiguration; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** Samples for Workspaces CreateOrUpdate. */ -public final class WorkspacesCreateOrUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/CreateOrUpdateWorkspace.json - */ - /** - * Sample code: Create or update a workspace. - * - * @param manager Entry point to SynapseManager. - */ - public static void createOrUpdateAWorkspace(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager - .workspaces() - .define("workspace1") - .withRegion("East US") - .withExistingResourceGroup("resourceGroup1") - .withTags(mapOf("key", "value")) - .withIdentity( - new ManagedIdentity() - .withType(ResourceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourcegroups/resourceGroup1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uami1", - new UserAssignedManagedIdentity()))) - .withDefaultDataLakeStorage( - new DataLakeStorageAccountDetails() - .withAccountUrl("https://accountname.dfs.core.windows.net") - .withFilesystem("default")) - .withSqlAdministratorLoginPassword("password") - .withManagedResourceGroupName("workspaceManagedResourceGroupUnique") - .withSqlAdministratorLogin("login") - .withManagedVirtualNetwork("default") - .withEncryption( - new EncryptionDetails() - .withCmk( - new CustomerManagedKeyDetails() - .withKey( - new WorkspaceKeyDetails() - .withName("default") - .withKeyVaultUrl("https://vault.azure.net/keys/key1")) - .withKekIdentity( - new KekIdentityProperties() - .withUserAssignedIdentity( - "/subscriptions/b64d7b94-73e7-4d36-94b2-7764ea3fd74a/resourcegroups/SynapseCI/providers/Microsoft.ManagedIdentity/userAssignedIdentities/uami1") - .withUseSystemAssignedIdentity(false)))) - .withManagedVirtualNetworkSettings( - new ManagedVirtualNetworkSettings() - .withPreventDataExfiltration(false) - .withLinkedAccessCheckOnTargetResource(false) - .withAllowedAadTenantIdsForLinking(Arrays.asList("740239CE-A25B-485B-86A0-262F29F6EBDB"))) - .withWorkspaceRepositoryConfiguration( - new WorkspaceRepositoryConfiguration() - .withType("FactoryGitHubConfiguration") - .withHostname("") - .withAccountName("mygithubaccount") - .withProjectName("myproject") - .withRepositoryName("myrepository") - .withCollaborationBranch("master") - .withRootFolder("/")) - .withPurviewConfiguration( - new PurviewConfiguration() - .withPurviewResourceId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup1/providers/Microsoft.ProjectPurview/accounts/accountname1")) - .withPublicNetworkAccess(WorkspacePublicNetworkAccess.ENABLED) - .withCspWorkspaceAdminProperties( - new CspWorkspaceAdminProperties() - .withInitialWorkspaceAdminObjectId("6c20646f-8050-49ec-b3b1-80a0e58e454d")) - .create(); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspacesDeleteSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspacesDeleteSamples.java deleted file mode 100644 index 57f815f26f5de..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspacesDeleteSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for Workspaces Delete. */ -public final class WorkspacesDeleteSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/DeleteWorkspace.json - */ - /** - * Sample code: Delete a workspace. - * - * @param manager Entry point to SynapseManager. - */ - public static void deleteAWorkspace(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.workspaces().delete("resourceGroup1", "workspace1", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspacesGetByResourceGroupSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspacesGetByResourceGroupSamples.java deleted file mode 100644 index 1bdffc6449d96..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspacesGetByResourceGroupSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for Workspaces GetByResourceGroup. */ -public final class WorkspacesGetByResourceGroupSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/GetWorkspace.json - */ - /** - * Sample code: Get a workspace. - * - * @param manager Entry point to SynapseManager. - */ - public static void getAWorkspace(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.workspaces().getByResourceGroupWithResponse("resourceGroup1", "workspace1", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspacesListByResourceGroupSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspacesListByResourceGroupSamples.java deleted file mode 100644 index 4621621207fa0..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspacesListByResourceGroupSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for Workspaces ListByResourceGroup. */ -public final class WorkspacesListByResourceGroupSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListWorkspacesInResourceGroup.json - */ - /** - * Sample code: List workspaces in resource group. - * - * @param manager Entry point to SynapseManager. - */ - public static void listWorkspacesInResourceGroup(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.workspaces().listByResourceGroup("resourceGroup1", Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspacesListSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspacesListSamples.java deleted file mode 100644 index 30ee7a6a7f3d9..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspacesListSamples.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; - -/** Samples for Workspaces List. */ -public final class WorkspacesListSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/ListWorkspacesInSubscription.json - */ - /** - * Sample code: List workspaces in subscription. - * - * @param manager Entry point to SynapseManager. - */ - public static void listWorkspacesInSubscription(com.azure.resourcemanager.synapse.SynapseManager manager) { - manager.workspaces().list(Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspacesUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspacesUpdateSamples.java deleted file mode 100644 index a60f8dff75213..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspacesUpdateSamples.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.Context; -import com.azure.resourcemanager.synapse.models.CustomerManagedKeyDetails; -import com.azure.resourcemanager.synapse.models.EncryptionDetails; -import com.azure.resourcemanager.synapse.models.ManagedIdentity; -import com.azure.resourcemanager.synapse.models.ManagedVirtualNetworkSettings; -import com.azure.resourcemanager.synapse.models.PurviewConfiguration; -import com.azure.resourcemanager.synapse.models.ResourceIdentityType; -import com.azure.resourcemanager.synapse.models.Workspace; -import com.azure.resourcemanager.synapse.models.WorkspaceKeyDetails; -import com.azure.resourcemanager.synapse.models.WorkspacePublicNetworkAccess; -import com.azure.resourcemanager.synapse.models.WorkspaceRepositoryConfiguration; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -/** Samples for Workspaces Update. */ -public final class WorkspacesUpdateSamples { - /* - * x-ms-original-file: specification/synapse/resource-manager/Microsoft.Synapse/stable/2021-06-01/examples/UpdateWorkspace.json - */ - /** - * Sample code: Update a workspace. - * - * @param manager Entry point to SynapseManager. - */ - public static void updateAWorkspace(com.azure.resourcemanager.synapse.SynapseManager manager) { - Workspace resource = - manager - .workspaces() - .getByResourceGroupWithResponse("resourceGroup1", "workspace1", Context.NONE) - .getValue(); - resource - .update() - .withTags(mapOf("key", "value")) - .withIdentity(new ManagedIdentity().withType(ResourceIdentityType.SYSTEM_ASSIGNED)) - .withSqlAdministratorLoginPassword("password") - .withManagedVirtualNetworkSettings( - new ManagedVirtualNetworkSettings() - .withPreventDataExfiltration(false) - .withLinkedAccessCheckOnTargetResource(false) - .withAllowedAadTenantIdsForLinking(Arrays.asList("740239CE-A25B-485B-86A0-262F29F6EBDB"))) - .withWorkspaceRepositoryConfiguration( - new WorkspaceRepositoryConfiguration() - .withType("FactoryGitHubConfiguration") - .withHostname("") - .withAccountName("adifferentacount") - .withProjectName("myproject") - .withRepositoryName("myrepository") - .withCollaborationBranch("master") - .withRootFolder("/")) - .withPurviewConfiguration( - new PurviewConfiguration() - .withPurviewResourceId( - "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroup1/providers/Microsoft.ProjectPurview/accounts/accountname1")) - .withEncryption( - new EncryptionDetails() - .withCmk( - new CustomerManagedKeyDetails() - .withKey( - new WorkspaceKeyDetails() - .withName("default") - .withKeyVaultUrl("https://vault.azure.net/keys/key1")))) - .withPublicNetworkAccess(WorkspacePublicNetworkAccess.ENABLED) - .apply(); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -}