From 36c034e1365e48aa0c84557a5bd5d519f17d17a2 Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Wed, 19 Aug 2020 04:32:02 +0000 Subject: [PATCH] Generated from e0d4d4fed74cd347ffe308848147afd0e9b2eabc Prettier Fix --- .../DatabaseAccountGetResults.java | 14 +++++- .../DatabaseAccountUpdateParameters.java | 26 ++++++++++ .../ManagedServiceIdentity.java | 43 ++++++++++++++--- ...ceIdentityUserAssignedIdentitiesValue.java | 47 +++++++++++++++++++ .../ResourceIdentityType.java | 4 +- .../DatabaseAccountGetResultsImpl.java | 18 ++++--- 6 files changed, 135 insertions(+), 17 deletions(-) create mode 100644 sdk/cosmos/mgmt-v2020_06_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_06_01_preview/ManagedServiceIdentityUserAssignedIdentitiesValue.java diff --git a/sdk/cosmos/mgmt-v2020_06_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_06_01_preview/DatabaseAccountGetResults.java b/sdk/cosmos/mgmt-v2020_06_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_06_01_preview/DatabaseAccountGetResults.java index 09928e439e63..ade37d355b88 100644 --- a/sdk/cosmos/mgmt-v2020_06_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_06_01_preview/DatabaseAccountGetResults.java +++ b/sdk/cosmos/mgmt-v2020_06_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_06_01_preview/DatabaseAccountGetResults.java @@ -249,7 +249,7 @@ interface WithCreate extends Creatable, Resource.Defi /** * The template for a DatabaseAccountGetResults update operation, containing all the settings that can be modified. */ - interface Update extends Appliable, Resource.UpdateWithTags, 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 { + interface Update extends Appliable, Resource.UpdateWithTags, 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 { } /** @@ -400,6 +400,18 @@ interface WithEnableMultipleWriteLocations { Update withEnableMultipleWriteLocations(Boolean enableMultipleWriteLocations); } + /** + * The stage of the databaseaccountgetresults update allowing to specify Identity. + */ + interface WithIdentity { + /** + * Specifies identity. + * @param identity the identity parameter value + * @return the next update stage + */ + Update withIdentity(ManagedServiceIdentity identity); + } + /** * The stage of the databaseaccountgetresults update allowing to specify IpRules. */ diff --git a/sdk/cosmos/mgmt-v2020_06_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_06_01_preview/DatabaseAccountUpdateParameters.java b/sdk/cosmos/mgmt-v2020_06_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_06_01_preview/DatabaseAccountUpdateParameters.java index de4acc4870fa..db2c820826bd 100644 --- a/sdk/cosmos/mgmt-v2020_06_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_06_01_preview/DatabaseAccountUpdateParameters.java +++ b/sdk/cosmos/mgmt-v2020_06_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_06_01_preview/DatabaseAccountUpdateParameters.java @@ -145,6 +145,12 @@ public class DatabaseAccountUpdateParameters { @JsonProperty(value = "properties.cors") private List cors; + /** + * The identity property. + */ + @JsonProperty(value = "identity") + private ManagedServiceIdentity identity; + /** * Get the tags value. * @@ -545,4 +551,24 @@ public DatabaseAccountUpdateParameters withCors(List cors) { return this; } + /** + * Get the identity value. + * + * @return the identity value + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity value. + * + * @param identity the identity value to set + * @return the DatabaseAccountUpdateParameters object itself. + */ + public DatabaseAccountUpdateParameters withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + } diff --git a/sdk/cosmos/mgmt-v2020_06_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_06_01_preview/ManagedServiceIdentity.java b/sdk/cosmos/mgmt-v2020_06_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_06_01_preview/ManagedServiceIdentity.java index aa5d54598137..8e06ed0a185e 100644 --- a/sdk/cosmos/mgmt-v2020_06_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_06_01_preview/ManagedServiceIdentity.java +++ b/sdk/cosmos/mgmt-v2020_06_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_06_01_preview/ManagedServiceIdentity.java @@ -8,6 +8,7 @@ package com.microsoft.azure.management.cosmosdb.v2020_06_01_preview; +import java.util.Map; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -29,15 +30,23 @@ public class ManagedServiceIdentity { private String tenantId; /** - * 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'. + * 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'. */ @JsonProperty(value = "type") private ResourceIdentityType type; + /** + * 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}'. + */ + @JsonProperty(value = "userAssignedIdentities") + private Map userAssignedIdentities; + /** * Get the principal id of the system assigned identity. This property will only be provided for a system assigned identity. * @@ -57,7 +66,7 @@ public String tenantId() { } /** - * 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'. + * 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'. * * @return the type value */ @@ -66,7 +75,7 @@ public ResourceIdentityType type() { } /** - * 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'. + * 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'. * * @param type the type value to set * @return the ManagedServiceIdentity object itself. @@ -76,4 +85,24 @@ public ManagedServiceIdentity withType(ResourceIdentityType type) { return this; } + /** + * 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}'. + * + * @return the userAssignedIdentities value + */ + public Map userAssignedIdentities() { + return this.userAssignedIdentities; + } + + /** + * 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}'. + * + * @param userAssignedIdentities the userAssignedIdentities value to set + * @return the ManagedServiceIdentity object itself. + */ + public ManagedServiceIdentity withUserAssignedIdentities(Map userAssignedIdentities) { + this.userAssignedIdentities = userAssignedIdentities; + return this; + } + } diff --git a/sdk/cosmos/mgmt-v2020_06_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_06_01_preview/ManagedServiceIdentityUserAssignedIdentitiesValue.java b/sdk/cosmos/mgmt-v2020_06_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_06_01_preview/ManagedServiceIdentityUserAssignedIdentitiesValue.java new file mode 100644 index 000000000000..fa6c63627e7d --- /dev/null +++ b/sdk/cosmos/mgmt-v2020_06_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_06_01_preview/ManagedServiceIdentityUserAssignedIdentitiesValue.java @@ -0,0 +1,47 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.cosmosdb.v2020_06_01_preview; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ManagedServiceIdentityUserAssignedIdentitiesValue model. + */ +public class ManagedServiceIdentityUserAssignedIdentitiesValue { + /** + * The principal id of user assigned identity. + */ + @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) + private String principalId; + + /** + * The client id of user assigned identity. + */ + @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) + private String clientId; + + /** + * Get the principal id of user assigned identity. + * + * @return the principalId value + */ + public String principalId() { + return this.principalId; + } + + /** + * Get the client id of user assigned identity. + * + * @return the clientId value + */ + public String clientId() { + return this.clientId; + } + +} diff --git a/sdk/cosmos/mgmt-v2020_06_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_06_01_preview/ResourceIdentityType.java b/sdk/cosmos/mgmt-v2020_06_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_06_01_preview/ResourceIdentityType.java index bb046b409983..000f8d68b83f 100644 --- a/sdk/cosmos/mgmt-v2020_06_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_06_01_preview/ResourceIdentityType.java +++ b/sdk/cosmos/mgmt-v2020_06_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_06_01_preview/ResourceIdentityType.java @@ -21,8 +21,8 @@ public enum ResourceIdentityType { /** Enum value UserAssigned. */ USER_ASSIGNED("UserAssigned"), - /** Enum value SystemAssigned, UserAssigned. */ - SYSTEM_ASSIGNED_USER_ASSIGNED("SystemAssigned, UserAssigned"), + /** Enum value SystemAssigned,UserAssigned. */ + SYSTEM_ASSIGNED_USER_ASSIGNED("SystemAssigned,UserAssigned"), /** Enum value None. */ NONE("None"); diff --git a/sdk/cosmos/mgmt-v2020_06_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_06_01_preview/implementation/DatabaseAccountGetResultsImpl.java b/sdk/cosmos/mgmt-v2020_06_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_06_01_preview/implementation/DatabaseAccountGetResultsImpl.java index 1c78c6002f90..0252a4597b69 100644 --- a/sdk/cosmos/mgmt-v2020_06_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_06_01_preview/implementation/DatabaseAccountGetResultsImpl.java +++ b/sdk/cosmos/mgmt-v2020_06_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2020_06_01_preview/implementation/DatabaseAccountGetResultsImpl.java @@ -32,8 +32,8 @@ import com.microsoft.azure.management.cosmosdb.v2020_06_01_preview.RestoreParameters; import com.microsoft.azure.management.cosmosdb.v2020_06_01_preview.SystemData; import com.microsoft.azure.management.cosmosdb.v2020_06_01_preview.VirtualNetworkRule; -import com.microsoft.azure.management.cosmosdb.v2020_06_01_preview.DatabaseAccountCreateUpdateProperties; import com.microsoft.azure.management.cosmosdb.v2020_06_01_preview.ManagedServiceIdentity; +import com.microsoft.azure.management.cosmosdb.v2020_06_01_preview.DatabaseAccountCreateUpdateProperties; import rx.functions.Func1; class DatabaseAccountGetResultsImpl extends GroupableResourceCoreImpl implements DatabaseAccountGetResults, DatabaseAccountGetResults.Definition, DatabaseAccountGetResults.Update { @@ -258,12 +258,6 @@ public DatabaseAccountGetResultsImpl withProperties(DatabaseAccountCreateUpdateP return this; } - @Override - public DatabaseAccountGetResultsImpl withIdentity(ManagedServiceIdentity identity) { - this.createParameter.withIdentity(identity); - return this; - } - @Override public DatabaseAccountGetResultsImpl withKind(DatabaseAccountKind kind) { this.createParameter.withKind(kind); @@ -378,4 +372,14 @@ public DatabaseAccountGetResultsImpl withVirtualNetworkRules(List