Skip to content

Commit 768a24d

Browse files
author
SDKAuto
committed
CodeGen from PR 16393 in Azure/azure-rest-api-specs
Merge 1e49df24d4ae2cffb01fb276d19f191648348096 into 60723d13309c8f8060d020a7f3dd9d6e380f0bbd
1 parent 01ad248 commit 768a24d

File tree

14 files changed

+275
-31
lines changed

14 files changed

+275
-31
lines changed

sdk/synapse/azure-resourcemanager-synapse/CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Release History
22

3-
## 1.0.0-beta.4 (Unreleased)
3+
## 1.0.0-beta.1 (2021-10-14)
4+
5+
- 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).
46

57
### Features Added
68

sdk/synapse/azure-resourcemanager-synapse/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
3232
<dependency>
3333
<groupId>com.azure.resourcemanager</groupId>
3434
<artifactId>azure-resourcemanager-synapse</artifactId>
35-
<version>1.0.0-beta.3</version>
35+
<version>1.0.0-beta.4</version>
3636
</dependency>
3737
```
3838
[//]: # ({x-version-update-end})

sdk/synapse/azure-resourcemanager-synapse/SAMPLE.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5501,6 +5501,7 @@ public final class SqlPoolWorkloadGroupListSamples {
55015501
### SqlPools_Create
55025502

55035503
```java
5504+
import com.azure.resourcemanager.synapse.models.CreateMode;
55045505
import com.azure.resourcemanager.synapse.models.Sku;
55055506
import com.azure.resourcemanager.synapse.models.StorageAccountType;
55065507
import java.util.HashMap;
@@ -5528,7 +5529,7 @@ public final class SqlPoolsCreateSamples {
55285529
.withCollation("")
55295530
.withSourceDatabaseId("")
55305531
.withRecoverableDatabaseId("")
5531-
.withCreateMode("")
5532+
.withCreateMode(CreateMode.fromString(""))
55325533
.withStorageAccountType(StorageAccountType.LRS)
55335534
.create();
55345535
}
@@ -5699,6 +5700,7 @@ public final class SqlPoolsResumeSamples {
56995700

57005701
```java
57015702
import com.azure.core.util.Context;
5703+
import com.azure.resourcemanager.synapse.models.CreateMode;
57025704
import com.azure.resourcemanager.synapse.models.Sku;
57035705
import com.azure.resourcemanager.synapse.models.SqlPool;
57045706
import java.time.OffsetDateTime;
@@ -5730,7 +5732,7 @@ public final class SqlPoolsUpdateSamples {
57305732
.withSourceDatabaseId("")
57315733
.withRecoverableDatabaseId("")
57325734
.withRestorePointInTime(OffsetDateTime.parse("1970-01-01T00:00:00.000Z"))
5733-
.withCreateMode("")
5735+
.withCreateMode(CreateMode.fromString(""))
57345736
.withCreationDate(OffsetDateTime.parse("1970-01-01T00:00:00.000Z"))
57355737
.apply();
57365738
}

sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/SynapseManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ public SynapseManager authenticate(TokenCredential credential, AzureProfile prof
458458
.append("-")
459459
.append("com.azure.resourcemanager.synapse")
460460
.append("/")
461-
.append("1.0.0-beta.3");
461+
.append("1.0.0-beta.1");
462462
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
463463
userAgentBuilder
464464
.append(" (")

sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/EventHubConnectionProperties.java

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,13 @@ public final class EventHubConnectionProperties {
6969
@JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY)
7070
private ResourceProvisioningState provisioningState;
7171

72+
/*
73+
* The resource ID of a managed identity (system or user assigned) to be
74+
* used to authenticate with event hub.
75+
*/
76+
@JsonProperty(value = "managedIdentityResourceId")
77+
private String managedIdentityResourceId;
78+
7279
/**
7380
* Get the eventHubResourceId property: The resource ID of the event hub to be used to create a data connection.
7481
*
@@ -224,6 +231,28 @@ public ResourceProvisioningState provisioningState() {
224231
return this.provisioningState;
225232
}
226233

234+
/**
235+
* Get the managedIdentityResourceId property: The resource ID of a managed identity (system or user assigned) to be
236+
* used to authenticate with event hub.
237+
*
238+
* @return the managedIdentityResourceId value.
239+
*/
240+
public String managedIdentityResourceId() {
241+
return this.managedIdentityResourceId;
242+
}
243+
244+
/**
245+
* Set the managedIdentityResourceId property: The resource ID of a managed identity (system or user assigned) to be
246+
* used to authenticate with event hub.
247+
*
248+
* @param managedIdentityResourceId the managedIdentityResourceId value to set.
249+
* @return the EventHubConnectionProperties object itself.
250+
*/
251+
public EventHubConnectionProperties withManagedIdentityResourceId(String managedIdentityResourceId) {
252+
this.managedIdentityResourceId = managedIdentityResourceId;
253+
return this;
254+
}
255+
227256
/**
228257
* Validates the instance.
229258
*

sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolInner.java

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import com.azure.core.annotation.Fluent;
88
import com.azure.core.management.Resource;
99
import com.azure.core.util.logging.ClientLogger;
10+
import com.azure.resourcemanager.synapse.models.CreateMode;
1011
import com.azure.resourcemanager.synapse.models.Sku;
1112
import com.azure.resourcemanager.synapse.models.StorageAccountType;
1213
import com.fasterxml.jackson.annotation.JsonIgnore;
@@ -236,21 +237,45 @@ public SqlPoolInner withRestorePointInTime(OffsetDateTime restorePointInTime) {
236237
}
237238

238239
/**
239-
* Get the createMode property: What is this?.
240+
* Get the createMode property: Specifies the mode of sql pool creation.
241+
*
242+
* <p>Default: regular sql pool creation.
243+
*
244+
* <p>PointInTimeRestore: Creates a sql pool by restoring a point in time backup of an existing sql pool.
245+
* sourceDatabaseId must be specified as the resource ID of the existing sql pool, and restorePointInTime must be
246+
* specified.
247+
*
248+
* <p>Recovery: Creates a sql pool by a geo-replicated backup. sourceDatabaseId must be specified as the
249+
* recoverableDatabaseId to restore.
250+
*
251+
* <p>Restore: Creates a sql pool by restoring a backup of a deleted sql pool. SourceDatabaseId should be the sql
252+
* pool's original resource ID. SourceDatabaseId and sourceDatabaseDeletionDate must be specified.
240253
*
241254
* @return the createMode value.
242255
*/
243-
public String createMode() {
256+
public CreateMode createMode() {
244257
return this.innerProperties() == null ? null : this.innerProperties().createMode();
245258
}
246259

247260
/**
248-
* Set the createMode property: What is this?.
261+
* Set the createMode property: Specifies the mode of sql pool creation.
262+
*
263+
* <p>Default: regular sql pool creation.
264+
*
265+
* <p>PointInTimeRestore: Creates a sql pool by restoring a point in time backup of an existing sql pool.
266+
* sourceDatabaseId must be specified as the resource ID of the existing sql pool, and restorePointInTime must be
267+
* specified.
268+
*
269+
* <p>Recovery: Creates a sql pool by a geo-replicated backup. sourceDatabaseId must be specified as the
270+
* recoverableDatabaseId to restore.
271+
*
272+
* <p>Restore: Creates a sql pool by restoring a backup of a deleted sql pool. SourceDatabaseId should be the sql
273+
* pool's original resource ID. SourceDatabaseId and sourceDatabaseDeletionDate must be specified.
249274
*
250275
* @param createMode the createMode value to set.
251276
* @return the SqlPoolInner object itself.
252277
*/
253-
public SqlPoolInner withCreateMode(String createMode) {
278+
public SqlPoolInner withCreateMode(CreateMode createMode) {
254279
if (this.innerProperties() == null) {
255280
this.innerProperties = new SqlPoolResourceProperties();
256281
}

sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/SqlPoolResourceProperties.java

Lines changed: 46 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
import com.azure.core.annotation.Fluent;
88
import com.azure.core.util.logging.ClientLogger;
9+
import com.azure.resourcemanager.synapse.models.CreateMode;
910
import com.azure.resourcemanager.synapse.models.StorageAccountType;
1011
import com.fasterxml.jackson.annotation.JsonIgnore;
1112
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -59,10 +60,25 @@ public final class SqlPoolResourceProperties {
5960
private OffsetDateTime restorePointInTime;
6061

6162
/*
62-
* What is this?
63+
* Specifies the mode of sql pool creation.
64+
*
65+
* Default: regular sql pool creation.
66+
*
67+
* PointInTimeRestore: Creates a sql pool by restoring a point in time
68+
* backup of an existing sql pool. sourceDatabaseId must be specified as
69+
* the resource ID of the existing sql pool, and restorePointInTime must be
70+
* specified.
71+
*
72+
* Recovery: Creates a sql pool by a geo-replicated backup.
73+
* sourceDatabaseId must be specified as the recoverableDatabaseId to
74+
* restore.
75+
*
76+
* Restore: Creates a sql pool by restoring a backup of a deleted sql
77+
* pool. SourceDatabaseId should be the sql pool's original resource ID.
78+
* SourceDatabaseId and sourceDatabaseDeletionDate must be specified.
6379
*/
6480
@JsonProperty(value = "createMode")
65-
private String createMode;
81+
private CreateMode createMode;
6682

6783
/*
6884
* Date the SQL pool was created
@@ -223,21 +239,45 @@ public SqlPoolResourceProperties withRestorePointInTime(OffsetDateTime restorePo
223239
}
224240

225241
/**
226-
* Get the createMode property: What is this?.
242+
* Get the createMode property: Specifies the mode of sql pool creation.
243+
*
244+
* <p>Default: regular sql pool creation.
245+
*
246+
* <p>PointInTimeRestore: Creates a sql pool by restoring a point in time backup of an existing sql pool.
247+
* sourceDatabaseId must be specified as the resource ID of the existing sql pool, and restorePointInTime must be
248+
* specified.
249+
*
250+
* <p>Recovery: Creates a sql pool by a geo-replicated backup. sourceDatabaseId must be specified as the
251+
* recoverableDatabaseId to restore.
252+
*
253+
* <p>Restore: Creates a sql pool by restoring a backup of a deleted sql pool. SourceDatabaseId should be the sql
254+
* pool's original resource ID. SourceDatabaseId and sourceDatabaseDeletionDate must be specified.
227255
*
228256
* @return the createMode value.
229257
*/
230-
public String createMode() {
258+
public CreateMode createMode() {
231259
return this.createMode;
232260
}
233261

234262
/**
235-
* Set the createMode property: What is this?.
263+
* Set the createMode property: Specifies the mode of sql pool creation.
264+
*
265+
* <p>Default: regular sql pool creation.
266+
*
267+
* <p>PointInTimeRestore: Creates a sql pool by restoring a point in time backup of an existing sql pool.
268+
* sourceDatabaseId must be specified as the resource ID of the existing sql pool, and restorePointInTime must be
269+
* specified.
270+
*
271+
* <p>Recovery: Creates a sql pool by a geo-replicated backup. sourceDatabaseId must be specified as the
272+
* recoverableDatabaseId to restore.
273+
*
274+
* <p>Restore: Creates a sql pool by restoring a backup of a deleted sql pool. SourceDatabaseId should be the sql
275+
* pool's original resource ID. SourceDatabaseId and sourceDatabaseDeletionDate must be specified.
236276
*
237277
* @param createMode the createMode value to set.
238278
* @return the SqlPoolResourceProperties object itself.
239279
*/
240-
public SqlPoolResourceProperties withCreateMode(String createMode) {
280+
public SqlPoolResourceProperties withCreateMode(CreateMode createMode) {
241281
this.createMode = createMode;
242282
return this;
243283
}

sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolImpl.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import com.azure.core.management.Region;
99
import com.azure.core.util.Context;
1010
import com.azure.resourcemanager.synapse.fluent.models.SqlPoolInner;
11+
import com.azure.resourcemanager.synapse.models.CreateMode;
1112
import com.azure.resourcemanager.synapse.models.ResourceMoveDefinition;
1213
import com.azure.resourcemanager.synapse.models.Sku;
1314
import com.azure.resourcemanager.synapse.models.SqlPool;
@@ -79,7 +80,7 @@ public OffsetDateTime restorePointInTime() {
7980
return this.innerModel().restorePointInTime();
8081
}
8182

82-
public String createMode() {
83+
public CreateMode createMode() {
8384
return this.innerModel().createMode();
8485
}
8586

@@ -328,7 +329,7 @@ public SqlPoolImpl withRestorePointInTime(OffsetDateTime restorePointInTime) {
328329
}
329330
}
330331

331-
public SqlPoolImpl withCreateMode(String createMode) {
332+
public SqlPoolImpl withCreateMode(CreateMode createMode) {
332333
if (isInCreateMode()) {
333334
this.innerModel().withCreateMode(createMode);
334335
return this;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
// Code generated by Microsoft (R) AutoRest Code Generator.
4+
5+
package com.azure.resourcemanager.synapse.models;
6+
7+
import com.azure.core.util.ExpandableStringEnum;
8+
import com.fasterxml.jackson.annotation.JsonCreator;
9+
import java.util.Collection;
10+
11+
/** Defines values for CreateMode. */
12+
public final class CreateMode extends ExpandableStringEnum<CreateMode> {
13+
/** Static value Default for CreateMode. */
14+
public static final CreateMode DEFAULT = fromString("Default");
15+
16+
/** Static value PointInTimeRestore for CreateMode. */
17+
public static final CreateMode POINT_IN_TIME_RESTORE = fromString("PointInTimeRestore");
18+
19+
/** Static value Recovery for CreateMode. */
20+
public static final CreateMode RECOVERY = fromString("Recovery");
21+
22+
/** Static value Restore for CreateMode. */
23+
public static final CreateMode RESTORE = fromString("Restore");
24+
25+
/**
26+
* Creates or finds a CreateMode from its string representation.
27+
*
28+
* @param name a name to look for.
29+
* @return the corresponding CreateMode.
30+
*/
31+
@JsonCreator
32+
public static CreateMode fromString(String name) {
33+
return fromString(name, CreateMode.class);
34+
}
35+
36+
/** @return known CreateMode values. */
37+
public static Collection<CreateMode> values() {
38+
return values(CreateMode.class);
39+
}
40+
}

sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/EventHubDataConnection.java

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,31 @@ public ResourceProvisioningState provisioningState() {
219219
return this.innerProperties() == null ? null : this.innerProperties().provisioningState();
220220
}
221221

222+
/**
223+
* Get the managedIdentityResourceId property: The resource ID of a managed identity (system or user assigned) to be
224+
* used to authenticate with event hub.
225+
*
226+
* @return the managedIdentityResourceId value.
227+
*/
228+
public String managedIdentityResourceId() {
229+
return this.innerProperties() == null ? null : this.innerProperties().managedIdentityResourceId();
230+
}
231+
232+
/**
233+
* Set the managedIdentityResourceId property: The resource ID of a managed identity (system or user assigned) to be
234+
* used to authenticate with event hub.
235+
*
236+
* @param managedIdentityResourceId the managedIdentityResourceId value to set.
237+
* @return the EventHubDataConnection object itself.
238+
*/
239+
public EventHubDataConnection withManagedIdentityResourceId(String managedIdentityResourceId) {
240+
if (this.innerProperties() == null) {
241+
this.innerProperties = new EventHubConnectionProperties();
242+
}
243+
this.innerProperties().withManagedIdentityResourceId(managedIdentityResourceId);
244+
return this;
245+
}
246+
222247
/**
223248
* Validates the instance.
224249
*

0 commit comments

Comments
 (0)