Skip to content

Commit 36c034e

Browse files
author
SDK Automation
committed
Generated from e0d4d4fed74cd347ffe308848147afd0e9b2eabc
Prettier Fix
1 parent b5d25b5 commit 36c034e

File tree

6 files changed

+135
-17
lines changed

6 files changed

+135
-17
lines changed

sdk/cosmos/mgmt-v2020_06_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_06_01_preview/DatabaseAccountGetResults.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ interface WithCreate extends Creatable<DatabaseAccountGetResults>, Resource.Defi
249249
/**
250250
* The template for a DatabaseAccountGetResults update operation, containing all the settings that can be modified.
251251
*/
252-
interface Update extends Appliable<DatabaseAccountGetResults>, Resource.UpdateWithTags<Update>, UpdateStages.WithApiProperties, UpdateStages.WithBackupPolicy, UpdateStages.WithCapabilities, UpdateStages.WithConnectorOffer, UpdateStages.WithConsistencyPolicy, UpdateStages.WithCors, UpdateStages.WithDisableKeyBasedMetadataWriteAccess, UpdateStages.WithEnableAnalyticalStorage, UpdateStages.WithEnableAutomaticFailover, UpdateStages.WithEnableCassandraConnector, UpdateStages.WithEnableFreeTier, UpdateStages.WithEnableMultipleWriteLocations, UpdateStages.WithIpRules, UpdateStages.WithIsVirtualNetworkFilterEnabled, UpdateStages.WithKeyVaultKeyUri, UpdateStages.WithLocations, UpdateStages.WithPublicNetworkAccess, UpdateStages.WithVirtualNetworkRules {
252+
interface Update extends Appliable<DatabaseAccountGetResults>, Resource.UpdateWithTags<Update>, UpdateStages.WithApiProperties, UpdateStages.WithBackupPolicy, UpdateStages.WithCapabilities, UpdateStages.WithConnectorOffer, UpdateStages.WithConsistencyPolicy, UpdateStages.WithCors, UpdateStages.WithDisableKeyBasedMetadataWriteAccess, UpdateStages.WithEnableAnalyticalStorage, UpdateStages.WithEnableAutomaticFailover, UpdateStages.WithEnableCassandraConnector, UpdateStages.WithEnableFreeTier, UpdateStages.WithEnableMultipleWriteLocations, UpdateStages.WithIdentity, UpdateStages.WithIpRules, UpdateStages.WithIsVirtualNetworkFilterEnabled, UpdateStages.WithKeyVaultKeyUri, UpdateStages.WithLocations, UpdateStages.WithPublicNetworkAccess, UpdateStages.WithVirtualNetworkRules {
253253
}
254254

255255
/**
@@ -400,6 +400,18 @@ interface WithEnableMultipleWriteLocations {
400400
Update withEnableMultipleWriteLocations(Boolean enableMultipleWriteLocations);
401401
}
402402

403+
/**
404+
* The stage of the databaseaccountgetresults update allowing to specify Identity.
405+
*/
406+
interface WithIdentity {
407+
/**
408+
* Specifies identity.
409+
* @param identity the identity parameter value
410+
* @return the next update stage
411+
*/
412+
Update withIdentity(ManagedServiceIdentity identity);
413+
}
414+
403415
/**
404416
* The stage of the databaseaccountgetresults update allowing to specify IpRules.
405417
*/

sdk/cosmos/mgmt-v2020_06_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_06_01_preview/DatabaseAccountUpdateParameters.java

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,12 @@ public class DatabaseAccountUpdateParameters {
145145
@JsonProperty(value = "properties.cors")
146146
private List<CorsPolicy> cors;
147147

148+
/**
149+
* The identity property.
150+
*/
151+
@JsonProperty(value = "identity")
152+
private ManagedServiceIdentity identity;
153+
148154
/**
149155
* Get the tags value.
150156
*
@@ -545,4 +551,24 @@ public DatabaseAccountUpdateParameters withCors(List<CorsPolicy> cors) {
545551
return this;
546552
}
547553

554+
/**
555+
* Get the identity value.
556+
*
557+
* @return the identity value
558+
*/
559+
public ManagedServiceIdentity identity() {
560+
return this.identity;
561+
}
562+
563+
/**
564+
* Set the identity value.
565+
*
566+
* @param identity the identity value to set
567+
* @return the DatabaseAccountUpdateParameters object itself.
568+
*/
569+
public DatabaseAccountUpdateParameters withIdentity(ManagedServiceIdentity identity) {
570+
this.identity = identity;
571+
return this;
572+
}
573+
548574
}

sdk/cosmos/mgmt-v2020_06_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_06_01_preview/ManagedServiceIdentity.java

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
package com.microsoft.azure.management.cosmosdb.v2020_06_01_preview;
1010

11+
import java.util.Map;
1112
import com.fasterxml.jackson.annotation.JsonProperty;
1213

1314
/**
@@ -29,15 +30,23 @@ public class ManagedServiceIdentity {
2930
private String tenantId;
3031

3132
/**
32-
* The type of identity used for the resource. The type 'SystemAssigned,
33-
* UserAssigned' includes both an implicitly created identity and a set of
34-
* user assigned identities. The type 'None' will remove any identities
35-
* from the service. Possible values include: 'SystemAssigned',
36-
* 'UserAssigned', 'SystemAssigned, UserAssigned', 'None'.
33+
* The type of identity used for the resource. The type
34+
* 'SystemAssigned,UserAssigned' includes both an implicitly created
35+
* identity and a set of user assigned identities. The type 'None' will
36+
* remove any identities from the service. Possible values include:
37+
* 'SystemAssigned', 'UserAssigned', 'SystemAssigned,UserAssigned', 'None'.
3738
*/
3839
@JsonProperty(value = "type")
3940
private ResourceIdentityType type;
4041

42+
/**
43+
* The list of user identities associated with resource. The user identity
44+
* dictionary key references will be ARM resource ids in the form:
45+
* '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
46+
*/
47+
@JsonProperty(value = "userAssignedIdentities")
48+
private Map<String, ManagedServiceIdentityUserAssignedIdentitiesValue> userAssignedIdentities;
49+
4150
/**
4251
* Get the principal id of the system assigned identity. This property will only be provided for a system assigned identity.
4352
*
@@ -57,7 +66,7 @@ public String tenantId() {
5766
}
5867

5968
/**
60-
* Get the type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the service. Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None'.
69+
* Get the type of identity used for the resource. The type 'SystemAssigned,UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the service. Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned,UserAssigned', 'None'.
6170
*
6271
* @return the type value
6372
*/
@@ -66,7 +75,7 @@ public ResourceIdentityType type() {
6675
}
6776

6877
/**
69-
* Set the type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the service. Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None'.
78+
* Set the type of identity used for the resource. The type 'SystemAssigned,UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type 'None' will remove any identities from the service. Possible values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned,UserAssigned', 'None'.
7079
*
7180
* @param type the type value to set
7281
* @return the ManagedServiceIdentity object itself.
@@ -76,4 +85,24 @@ public ManagedServiceIdentity withType(ResourceIdentityType type) {
7685
return this;
7786
}
7887

88+
/**
89+
* Get the list of user identities associated with resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
90+
*
91+
* @return the userAssignedIdentities value
92+
*/
93+
public Map<String, ManagedServiceIdentityUserAssignedIdentitiesValue> userAssignedIdentities() {
94+
return this.userAssignedIdentities;
95+
}
96+
97+
/**
98+
* Set the list of user identities associated with resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
99+
*
100+
* @param userAssignedIdentities the userAssignedIdentities value to set
101+
* @return the ManagedServiceIdentity object itself.
102+
*/
103+
public ManagedServiceIdentity withUserAssignedIdentities(Map<String, ManagedServiceIdentityUserAssignedIdentitiesValue> userAssignedIdentities) {
104+
this.userAssignedIdentities = userAssignedIdentities;
105+
return this;
106+
}
107+
79108
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/**
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for
4+
* license information.
5+
*
6+
* Code generated by Microsoft (R) AutoRest Code Generator.
7+
*/
8+
9+
package com.microsoft.azure.management.cosmosdb.v2020_06_01_preview;
10+
11+
import com.fasterxml.jackson.annotation.JsonProperty;
12+
13+
/**
14+
* The ManagedServiceIdentityUserAssignedIdentitiesValue model.
15+
*/
16+
public class ManagedServiceIdentityUserAssignedIdentitiesValue {
17+
/**
18+
* The principal id of user assigned identity.
19+
*/
20+
@JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY)
21+
private String principalId;
22+
23+
/**
24+
* The client id of user assigned identity.
25+
*/
26+
@JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY)
27+
private String clientId;
28+
29+
/**
30+
* Get the principal id of user assigned identity.
31+
*
32+
* @return the principalId value
33+
*/
34+
public String principalId() {
35+
return this.principalId;
36+
}
37+
38+
/**
39+
* Get the client id of user assigned identity.
40+
*
41+
* @return the clientId value
42+
*/
43+
public String clientId() {
44+
return this.clientId;
45+
}
46+
47+
}

sdk/cosmos/mgmt-v2020_06_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_06_01_preview/ResourceIdentityType.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ public enum ResourceIdentityType {
2121
/** Enum value UserAssigned. */
2222
USER_ASSIGNED("UserAssigned"),
2323

24-
/** Enum value SystemAssigned, UserAssigned. */
25-
SYSTEM_ASSIGNED_USER_ASSIGNED("SystemAssigned, UserAssigned"),
24+
/** Enum value SystemAssigned,UserAssigned. */
25+
SYSTEM_ASSIGNED_USER_ASSIGNED("SystemAssigned,UserAssigned"),
2626

2727
/** Enum value None. */
2828
NONE("None");

sdk/cosmos/mgmt-v2020_06_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_06_01_preview/implementation/DatabaseAccountGetResultsImpl.java

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
import com.microsoft.azure.management.cosmosdb.v2020_06_01_preview.RestoreParameters;
3333
import com.microsoft.azure.management.cosmosdb.v2020_06_01_preview.SystemData;
3434
import com.microsoft.azure.management.cosmosdb.v2020_06_01_preview.VirtualNetworkRule;
35-
import com.microsoft.azure.management.cosmosdb.v2020_06_01_preview.DatabaseAccountCreateUpdateProperties;
3635
import com.microsoft.azure.management.cosmosdb.v2020_06_01_preview.ManagedServiceIdentity;
36+
import com.microsoft.azure.management.cosmosdb.v2020_06_01_preview.DatabaseAccountCreateUpdateProperties;
3737
import rx.functions.Func1;
3838

3939
class DatabaseAccountGetResultsImpl extends GroupableResourceCoreImpl<DatabaseAccountGetResults, DatabaseAccountGetResultsInner, DatabaseAccountGetResultsImpl, CosmosDBManager> implements DatabaseAccountGetResults, DatabaseAccountGetResults.Definition, DatabaseAccountGetResults.Update {
@@ -258,12 +258,6 @@ public DatabaseAccountGetResultsImpl withProperties(DatabaseAccountCreateUpdateP
258258
return this;
259259
}
260260

261-
@Override
262-
public DatabaseAccountGetResultsImpl withIdentity(ManagedServiceIdentity identity) {
263-
this.createParameter.withIdentity(identity);
264-
return this;
265-
}
266-
267261
@Override
268262
public DatabaseAccountGetResultsImpl withKind(DatabaseAccountKind kind) {
269263
this.createParameter.withKind(kind);
@@ -378,4 +372,14 @@ public DatabaseAccountGetResultsImpl withVirtualNetworkRules(List<VirtualNetwork
378372
return this;
379373
}
380374

375+
@Override
376+
public DatabaseAccountGetResultsImpl withIdentity(ManagedServiceIdentity identity) {
377+
if (isInCreateMode()) {
378+
this.createParameter.withIdentity(identity);
379+
} else {
380+
this.updateParameter.withIdentity(identity);
381+
}
382+
return this;
383+
}
384+
381385
}

0 commit comments

Comments
 (0)