diff --git a/sdk/synapse/azure-resourcemanager-synapse/CHANGELOG.md b/sdk/synapse/azure-resourcemanager-synapse/CHANGELOG.md
index 28bf85fcc700..1cb66174177a 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.4 (Unreleased)
+## 1.0.0-beta.1 (2021-10-14)
+
+- 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-v2. 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 339ec20d40a5..864c09378d34 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
Default: regular sql pool creation. + * + *
PointInTimeRestore: Creates a sql pool by restoring a point in time backup of an existing sql pool. + * sourceDatabaseId must be specified as the resource ID of the existing sql pool, and restorePointInTime must be + * specified. + * + *
Recovery: Creates a sql pool by a geo-replicated backup. sourceDatabaseId must be specified as the + * recoverableDatabaseId to restore. + * + *
Restore: Creates a sql pool by restoring a backup of a deleted sql pool. SourceDatabaseId should be the sql + * pool's original resource ID. SourceDatabaseId and sourceDatabaseDeletionDate must be specified. * * @return the createMode value. */ - public String createMode() { + public CreateMode createMode() { return this.innerProperties() == null ? null : this.innerProperties().createMode(); } /** - * Set the createMode property: What is this?. + * Set the createMode property: Specifies the mode of sql pool creation. + * + *
Default: regular sql pool creation. + * + *
PointInTimeRestore: Creates a sql pool by restoring a point in time backup of an existing sql pool. + * sourceDatabaseId must be specified as the resource ID of the existing sql pool, and restorePointInTime must be + * specified. + * + *
Recovery: Creates a sql pool by a geo-replicated backup. sourceDatabaseId must be specified as the + * recoverableDatabaseId to restore. + * + *
Restore: Creates a sql pool by restoring a backup of a deleted sql pool. SourceDatabaseId should be the sql + * pool'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) { + public SqlPoolInner withCreateMode(CreateMode createMode) { if (this.innerProperties() == null) { this.innerProperties = new SqlPoolResourceProperties(); } 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 index c04bc2ed548a..f047c0959ae9 100644 --- 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 @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.synapse.models.CreateMode; import com.azure.resourcemanager.synapse.models.StorageAccountType; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonProperty; @@ -59,10 +60,25 @@ public final class SqlPoolResourceProperties { private OffsetDateTime restorePointInTime; /* - * What is this? + * Specifies the mode of sql pool creation. + * + * Default: regular sql pool creation. + * + * PointInTimeRestore: Creates a sql pool by restoring a point in time + * backup of an existing sql pool. sourceDatabaseId must be specified as + * the resource ID of the existing sql pool, and restorePointInTime must be + * specified. + * + * Recovery: Creates a sql pool by a geo-replicated backup. + * sourceDatabaseId must be specified as the recoverableDatabaseId to + * restore. + * + * Restore: Creates a sql pool by restoring a backup of a deleted sql + * pool. SourceDatabaseId should be the sql pool's original resource ID. + * SourceDatabaseId and sourceDatabaseDeletionDate must be specified. */ @JsonProperty(value = "createMode") - private String createMode; + private CreateMode createMode; /* * Date the SQL pool was created @@ -223,21 +239,45 @@ public SqlPoolResourceProperties withRestorePointInTime(OffsetDateTime restorePo } /** - * Get the createMode property: What is this?. + * Get the createMode property: Specifies the mode of sql pool creation. + * + *
Default: regular sql pool creation. + * + *
PointInTimeRestore: Creates a sql pool by restoring a point in time backup of an existing sql pool. + * sourceDatabaseId must be specified as the resource ID of the existing sql pool, and restorePointInTime must be + * specified. + * + *
Recovery: Creates a sql pool by a geo-replicated backup. sourceDatabaseId must be specified as the + * recoverableDatabaseId to restore. + * + *
Restore: Creates a sql pool by restoring a backup of a deleted sql pool. SourceDatabaseId should be the sql + * pool's original resource ID. SourceDatabaseId and sourceDatabaseDeletionDate must be specified. * * @return the createMode value. */ - public String createMode() { + public CreateMode createMode() { return this.createMode; } /** - * Set the createMode property: What is this?. + * Set the createMode property: Specifies the mode of sql pool creation. + * + *
Default: regular sql pool creation. + * + *
PointInTimeRestore: Creates a sql pool by restoring a point in time backup of an existing sql pool. + * sourceDatabaseId must be specified as the resource ID of the existing sql pool, and restorePointInTime must be + * specified. + * + *
Recovery: Creates a sql pool by a geo-replicated backup. sourceDatabaseId must be specified as the + * recoverableDatabaseId to restore. + * + *
Restore: Creates a sql pool by restoring a backup of a deleted sql pool. SourceDatabaseId should be the sql
+ * pool's original resource ID. SourceDatabaseId and sourceDatabaseDeletionDate must be specified.
*
* @param createMode the createMode value to set.
* @return the SqlPoolResourceProperties object itself.
*/
- public SqlPoolResourceProperties withCreateMode(String createMode) {
+ public SqlPoolResourceProperties withCreateMode(CreateMode createMode) {
this.createMode = createMode;
return this;
}
diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolImpl.java
index 5ee980278f08..91b255319d0b 100644
--- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolImpl.java
+++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolImpl.java
@@ -8,6 +8,7 @@
import com.azure.core.management.Region;
import com.azure.core.util.Context;
import com.azure.resourcemanager.synapse.fluent.models.SqlPoolInner;
+import com.azure.resourcemanager.synapse.models.CreateMode;
import com.azure.resourcemanager.synapse.models.ResourceMoveDefinition;
import com.azure.resourcemanager.synapse.models.Sku;
import com.azure.resourcemanager.synapse.models.SqlPool;
@@ -79,7 +80,7 @@ public OffsetDateTime restorePointInTime() {
return this.innerModel().restorePointInTime();
}
- public String createMode() {
+ public CreateMode createMode() {
return this.innerModel().createMode();
}
@@ -328,7 +329,7 @@ public SqlPoolImpl withRestorePointInTime(OffsetDateTime restorePointInTime) {
}
}
- public SqlPoolImpl withCreateMode(String createMode) {
+ public SqlPoolImpl withCreateMode(CreateMode createMode) {
if (isInCreateMode()) {
this.innerModel().withCreateMode(createMode);
return this;
diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/CreateMode.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/CreateMode.java
new file mode 100644
index 000000000000..f766fbbd159b
--- /dev/null
+++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/CreateMode.java
@@ -0,0 +1,40 @@
+// 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.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Defines values for CreateMode. */
+public final class CreateMode extends ExpandableStringEnum Default: regular sql pool creation.
+ *
+ * PointInTimeRestore: Creates a sql pool by restoring a point in time backup of an existing sql pool.
+ * sourceDatabaseId must be specified as the resource ID of the existing sql pool, and restorePointInTime must be
+ * specified.
+ *
+ * Recovery: Creates a sql pool by a geo-replicated backup. sourceDatabaseId must be specified as the
+ * recoverableDatabaseId to restore.
+ *
+ * Restore: Creates a sql pool by restoring a backup of a deleted sql pool. SourceDatabaseId should be the sql
+ * pool's original resource ID. SourceDatabaseId and sourceDatabaseDeletionDate must be specified.
*
* @return the createMode value.
*/
- String createMode();
+ CreateMode createMode();
/**
* Gets the creationDate property: Date the SQL pool was created.
@@ -320,12 +332,33 @@ 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 sql pool creation.
+ *
+ * Default: regular sql pool creation.
+ *
+ * PointInTimeRestore: Creates a sql pool by restoring a point in time backup of an existing sql pool.
+ * sourceDatabaseId must be specified as the resource ID of the existing sql pool, and restorePointInTime
+ * must be specified.
*
- * @param createMode What is this?.
+ * Recovery: Creates a sql pool by a geo-replicated backup. sourceDatabaseId must be specified as the
+ * recoverableDatabaseId to restore.
+ *
+ * Restore: Creates a sql pool by restoring a backup of a deleted sql pool. SourceDatabaseId should be
+ * the sql pool's original resource ID. SourceDatabaseId and sourceDatabaseDeletionDate must be specified..
+ *
+ * @param createMode Specifies the mode of sql pool creation.
+ * Default: regular sql pool creation.
+ * PointInTimeRestore: Creates a sql pool by restoring a point in time backup of an existing sql
+ * pool. sourceDatabaseId must be specified as the resource ID of the existing sql pool, and
+ * restorePointInTime must be specified.
+ * Recovery: Creates a sql pool by a geo-replicated backup. sourceDatabaseId must be specified as the
+ * recoverableDatabaseId to restore.
+ * Restore: Creates a sql pool by restoring a backup of a deleted sql pool. SourceDatabaseId should
+ * be the sql pool's original resource ID. SourceDatabaseId and sourceDatabaseDeletionDate must be
+ * specified.
* @return the next definition stage.
*/
- WithCreate withCreateMode(String createMode);
+ WithCreate withCreateMode(CreateMode createMode);
}
/** The stage of the SqlPool definition allowing to specify creationDate. */
interface WithCreationDate {
@@ -491,12 +524,33 @@ 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 sql pool creation.
+ *
+ * Default: regular sql pool creation.
+ *
+ * PointInTimeRestore: Creates a sql pool by restoring a point in time backup of an existing sql pool.
+ * sourceDatabaseId must be specified as the resource ID of the existing sql pool, and restorePointInTime
+ * must be specified.
+ *
+ * Recovery: Creates a sql pool by a geo-replicated backup. sourceDatabaseId must be specified as the
+ * recoverableDatabaseId to restore.
+ *
+ * Restore: Creates a sql pool by restoring a backup of a deleted sql pool. SourceDatabaseId should be
+ * the sql pool's original resource ID. SourceDatabaseId and sourceDatabaseDeletionDate must be specified..
*
- * @param createMode What is this?.
+ * @param createMode Specifies the mode of sql pool creation.
+ * Default: regular sql pool creation.
+ * PointInTimeRestore: Creates a sql pool by restoring a point in time backup of an existing sql
+ * pool. sourceDatabaseId must be specified as the resource ID of the existing sql pool, and
+ * restorePointInTime must be specified.
+ * Recovery: Creates a sql pool by a geo-replicated backup. sourceDatabaseId must be specified as the
+ * recoverableDatabaseId to restore.
+ * Restore: Creates a sql pool by restoring a backup of a deleted sql pool. SourceDatabaseId should
+ * be the sql pool's original resource ID. SourceDatabaseId and sourceDatabaseDeletionDate must be
+ * specified.
* @return the next definition stage.
*/
- Update withCreateMode(String createMode);
+ Update withCreateMode(CreateMode createMode);
}
/** The stage of the SqlPool update allowing to specify creationDate. */
interface WithCreationDate {
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 7d7642524a5e..b8d3fa720134 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
@@ -274,21 +274,45 @@ public SqlPoolPatchInfo withRestorePointInTime(OffsetDateTime restorePointInTime
}
/**
- * Get the createMode property: What is this?.
+ * Get the createMode property: Specifies the mode of sql pool creation.
+ *
+ * Default: regular sql pool creation.
+ *
+ * PointInTimeRestore: Creates a sql pool by restoring a point in time backup of an existing sql pool.
+ * sourceDatabaseId must be specified as the resource ID of the existing sql pool, and restorePointInTime must be
+ * specified.
+ *
+ * Recovery: Creates a sql pool by a geo-replicated backup. sourceDatabaseId must be specified as the
+ * recoverableDatabaseId to restore.
+ *
+ * Restore: Creates a sql pool by restoring a backup of a deleted sql pool. SourceDatabaseId should be the sql
+ * pool's original resource ID. SourceDatabaseId and sourceDatabaseDeletionDate must be specified.
*
* @return the createMode value.
*/
- public String createMode() {
+ public CreateMode createMode() {
return this.innerProperties() == null ? null : this.innerProperties().createMode();
}
/**
- * Set the createMode property: What is this?.
+ * Set the createMode property: Specifies the mode of sql pool creation.
+ *
+ * Default: regular sql pool creation.
+ *
+ * PointInTimeRestore: Creates a sql pool by restoring a point in time backup of an existing sql pool.
+ * sourceDatabaseId must be specified as the resource ID of the existing sql pool, and restorePointInTime must be
+ * specified.
+ *
+ * Recovery: Creates a sql pool by a geo-replicated backup. sourceDatabaseId must be specified as the
+ * recoverableDatabaseId to restore.
+ *
+ * Restore: Creates a sql pool by restoring a backup of a deleted sql pool. SourceDatabaseId should be the sql
+ * pool'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) {
+ public SqlPoolPatchInfo withCreateMode(CreateMode createMode) {
if (this.innerProperties() == null) {
this.innerProperties = new SqlPoolResourceProperties();
}
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
index cf00299a1f28..d30eb5e802e7 100644
--- 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
@@ -4,6 +4,7 @@
package com.azure.resourcemanager.synapse.generated;
+import com.azure.resourcemanager.synapse.models.CreateMode;
import com.azure.resourcemanager.synapse.models.Sku;
import com.azure.resourcemanager.synapse.models.StorageAccountType;
import java.util.HashMap;
@@ -31,7 +32,7 @@ public static void createASQLAnalyticsPool(com.azure.resourcemanager.synapse.Syn
.withCollation("")
.withSourceDatabaseId("")
.withRecoverableDatabaseId("")
- .withCreateMode("")
+ .withCreateMode(CreateMode.fromString(""))
.withStorageAccountType(StorageAccountType.LRS)
.create();
}
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
index b4d0debef7a2..8a71c5cde510 100644
--- 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
@@ -5,6 +5,7 @@
package com.azure.resourcemanager.synapse.generated;
import com.azure.core.util.Context;
+import com.azure.resourcemanager.synapse.models.CreateMode;
import com.azure.resourcemanager.synapse.models.Sku;
import com.azure.resourcemanager.synapse.models.SqlPool;
import java.time.OffsetDateTime;
@@ -36,7 +37,7 @@ public static void updateASQLAnalyticsPool(com.azure.resourcemanager.synapse.Syn
.withSourceDatabaseId("")
.withRecoverableDatabaseId("")
.withRestorePointInTime(OffsetDateTime.parse("1970-01-01T00:00:00.000Z"))
- .withCreateMode("")
+ .withCreateMode(CreateMode.fromString(""))
.withCreationDate(OffsetDateTime.parse("1970-01-01T00:00:00.000Z"))
.apply();
}