From 768a24d785cbc4c54a009aa040768ad51ef3291d Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 14 Oct 2021 05:25:32 +0000 Subject: [PATCH] CodeGen from PR 16393 in Azure/azure-rest-api-specs Merge 1e49df24d4ae2cffb01fb276d19f191648348096 into 60723d13309c8f8060d020a7f3dd9d6e380f0bbd --- .../CHANGELOG.md | 4 +- .../azure-resourcemanager-synapse/README.md | 2 +- .../azure-resourcemanager-synapse/SAMPLE.md | 6 +- .../synapse/SynapseManager.java | 2 +- .../models/EventHubConnectionProperties.java | 29 ++++++++ .../synapse/fluent/models/SqlPoolInner.java | 33 +++++++-- .../models/SqlPoolResourceProperties.java | 52 ++++++++++++-- .../synapse/implementation/SqlPoolImpl.java | 5 +- .../synapse/models/CreateMode.java | 40 +++++++++++ .../models/EventHubDataConnection.java | 25 +++++++ .../synapse/models/SqlPool.java | 70 ++++++++++++++++--- .../synapse/models/SqlPoolPatchInfo.java | 32 +++++++-- .../generated/SqlPoolsCreateSamples.java | 3 +- .../generated/SqlPoolsUpdateSamples.java | 3 +- 14 files changed, 275 insertions(+), 31 deletions(-) create mode 100644 sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/CreateMode.java diff --git a/sdk/synapse/azure-resourcemanager-synapse/CHANGELOG.md b/sdk/synapse/azure-resourcemanager-synapse/CHANGELOG.md index 28bf85fcc7006..1cb66174177a5 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 339ec20d40a5d..864c09378d34f 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.3 + 1.0.0-beta.4 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/synapse/azure-resourcemanager-synapse/SAMPLE.md b/sdk/synapse/azure-resourcemanager-synapse/SAMPLE.md index d97fce07b02ff..73419f32f0154 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/SAMPLE.md +++ b/sdk/synapse/azure-resourcemanager-synapse/SAMPLE.md @@ -5501,6 +5501,7 @@ public final class SqlPoolWorkloadGroupListSamples { ### SqlPools_Create ```java +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; @@ -5528,7 +5529,7 @@ public final class SqlPoolsCreateSamples { .withCollation("") .withSourceDatabaseId("") .withRecoverableDatabaseId("") - .withCreateMode("") + .withCreateMode(CreateMode.fromString("")) .withStorageAccountType(StorageAccountType.LRS) .create(); } @@ -5699,6 +5700,7 @@ public final class SqlPoolsResumeSamples { ```java 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; @@ -5730,7 +5732,7 @@ public final class SqlPoolsUpdateSamples { .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(); } 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 2362f42abdfaa..139339b375bad 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 @@ -458,7 +458,7 @@ public SynapseManager authenticate(TokenCredential credential, AzureProfile prof .append("-") .append("com.azure.resourcemanager.synapse") .append("/") - .append("1.0.0-beta.3"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/EventHubConnectionProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/EventHubConnectionProperties.java index 2528ded255975..15dc22c67a2d6 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/EventHubConnectionProperties.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/EventHubConnectionProperties.java @@ -69,6 +69,13 @@ public final class EventHubConnectionProperties { @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private ResourceProvisioningState provisioningState; + /* + * The resource ID of a managed identity (system or user assigned) to be + * used to authenticate with event hub. + */ + @JsonProperty(value = "managedIdentityResourceId") + private String managedIdentityResourceId; + /** * Get the eventHubResourceId property: The resource ID of the event hub to be used to create a data connection. * @@ -224,6 +231,28 @@ public ResourceProvisioningState provisioningState() { return this.provisioningState; } + /** + * Get the managedIdentityResourceId property: The resource ID of a managed identity (system or user assigned) to be + * used to authenticate with event hub. + * + * @return the managedIdentityResourceId value. + */ + public String managedIdentityResourceId() { + return this.managedIdentityResourceId; + } + + /** + * Set the managedIdentityResourceId property: The resource ID of a managed identity (system or user assigned) to be + * used to authenticate with event hub. + * + * @param managedIdentityResourceId the managedIdentityResourceId value to set. + * @return the EventHubConnectionProperties object itself. + */ + public EventHubConnectionProperties withManagedIdentityResourceId(String managedIdentityResourceId) { + this.managedIdentityResourceId = managedIdentityResourceId; + return this; + } + /** * Validates the instance. * 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..3dd5ecd2f5d38 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 @@ -7,6 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.synapse.models.CreateMode; import com.azure.resourcemanager.synapse.models.Sku; import com.azure.resourcemanager.synapse.models.StorageAccountType; import com.fasterxml.jackson.annotation.JsonIgnore; @@ -236,21 +237,45 @@ public SqlPoolInner 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 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 c04bc2ed548ac..f047c0959ae90 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 5ee980278f083..91b255319d0b5 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 0000000000000..f766fbbd159b7 --- /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 { + /** Static value Default for CreateMode. */ + public static final CreateMode DEFAULT = fromString("Default"); + + /** Static value PointInTimeRestore for CreateMode. */ + public static final CreateMode POINT_IN_TIME_RESTORE = fromString("PointInTimeRestore"); + + /** Static value Recovery for CreateMode. */ + public static final CreateMode RECOVERY = fromString("Recovery"); + + /** Static value Restore for CreateMode. */ + public static final CreateMode RESTORE = fromString("Restore"); + + /** + * Creates or finds a CreateMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding CreateMode. + */ + @JsonCreator + public static CreateMode fromString(String name) { + return fromString(name, CreateMode.class); + } + + /** @return known CreateMode values. */ + public static Collection values() { + return values(CreateMode.class); + } +} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/EventHubDataConnection.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/EventHubDataConnection.java index 571c8baf75928..5df7b56912b1c 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/EventHubDataConnection.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/EventHubDataConnection.java @@ -219,6 +219,31 @@ public ResourceProvisioningState provisioningState() { return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); } + /** + * Get the managedIdentityResourceId property: The resource ID of a managed identity (system or user assigned) to be + * used to authenticate with event hub. + * + * @return the managedIdentityResourceId value. + */ + public String managedIdentityResourceId() { + return this.innerProperties() == null ? null : this.innerProperties().managedIdentityResourceId(); + } + + /** + * Set the managedIdentityResourceId property: The resource ID of a managed identity (system or user assigned) to be + * used to authenticate with event hub. + * + * @param managedIdentityResourceId the managedIdentityResourceId value to set. + * @return the EventHubDataConnection object itself. + */ + public EventHubDataConnection withManagedIdentityResourceId(String managedIdentityResourceId) { + if (this.innerProperties() == null) { + this.innerProperties = new EventHubConnectionProperties(); + } + this.innerProperties().withManagedIdentityResourceId(managedIdentityResourceId); + return this; + } + /** * Validates the instance. * 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..f2b2f902c63bd 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,11 +105,23 @@ public interface SqlPool { OffsetDateTime restorePointInTime(); /** - * Gets the createMode property: What is this?. + * Gets 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. */ - 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 7d7642524a5e7..b8d3fa7201348 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 cf00299a1f287..d30eb5e802e78 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 b4d0debef7a2d..8a71c5cde5102 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(); }