Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR mgmt-v2016_06_01] Adding Identity to Patch Recovery Services Vault Request #5951

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions sdk/recoveryservices/mgmt-v2016_06_01/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
<parent>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-arm-parent</artifactId>
<version>1.3.0</version>
<relativePath>../../parents/azure-arm-parent</relativePath>
<version>1.1.0</version>
<relativePath>../../../pom.management.xml</relativePath>
</parent>
<artifactId>azure-mgmt-recoveryservices</artifactId>
<version>1.0.0-beta-1</version>
<version>1.0.0-beta</version>
<packaging>jar</packaging>
<name>Microsoft Azure SDK for RecoveryServices Management</name>
<description>This package contains Microsoft RecoveryServices Management SDK.</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
* Patch Resource information, as returned by the resource provider.
*/
public class PatchVault extends PatchTrackedResource {
/**
* The identity property.
*/
@JsonProperty(value = "identity")
private IdentityData identity;

/**
* The properties property.
*/
Expand All @@ -26,6 +32,26 @@ public class PatchVault extends PatchTrackedResource {
@JsonProperty(value = "sku")
private Sku sku;

/**
* Get the identity value.
*
* @return the identity value
*/
public IdentityData identity() {
return this.identity;
}

/**
* Set the identity value.
*
* @param identity the identity value to set
* @return the PatchVault object itself.
*/
public PatchVault withIdentity(IdentityData identity) {
this.identity = identity;
return this;
}

/**
* Get the properties value.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ interface WithCreate extends Creatable<Vault>, Resource.DefinitionWithTags<WithC
/**
* The template for a Vault update operation, containing all the settings that can be modified.
*/
interface Update extends Appliable<Vault>, Resource.UpdateWithTags<Update>, UpdateStages.WithETag, UpdateStages.WithProperties, UpdateStages.WithSku {
interface Update extends Appliable<Vault>, Resource.UpdateWithTags<Update>, UpdateStages.WithETag, UpdateStages.WithIdentity, UpdateStages.WithProperties, UpdateStages.WithSku {
}

/**
Expand All @@ -144,6 +144,18 @@ interface WithETag {
Update withETag(String eTag);
}

/**
* The stage of the vault update allowing to specify Identity.
*/
interface WithIdentity {
/**
* Specifies identity.
* @param identity the identity parameter value
* @return the next update stage
*/
Update withIdentity(IdentityData identity);
}

/**
* The stage of the vault update allowing to specify Properties.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

import com.microsoft.azure.arm.model.implementation.WrapperImpl;
import com.microsoft.azure.management.recoveryservices.v2016_06_01.RegisteredIdentities;
import rx.Completable;

class RegisteredIdentitiesImpl extends WrapperImpl<RegisteredIdentitiesInner> implements RegisteredIdentities {
private final RecoveryServicesManager manager;
Expand All @@ -25,10 +24,4 @@ public RecoveryServicesManager manager() {
return this.manager;
}

@Override
public Completable deleteAsync(String resourceGroupName, String vaultName, String identityName) {
return this.manager.inner().registeredIdentities()
.deleteAsync(resourceGroupName, vaultName, identityName)
.toCompletable();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,21 @@ public Sku sku() {
}

@Override
public VaultImpl withIdentity(IdentityData identity) {
this.inner().withIdentity(identity);
public VaultImpl withETag(String eTag) {
if (isInCreateMode()) {
this.inner().withETag(eTag);
} else {
this.updateParameter.withETag(eTag);
}
return this;
}

@Override
public VaultImpl withETag(String eTag) {
public VaultImpl withIdentity(IdentityData identity) {
if (isInCreateMode()) {
this.inner().withETag(eTag);
this.inner().withIdentity(identity);
} else {
this.updateParameter.withETag(eTag);
this.updateParameter.withIdentity(identity);
}
return this;
}
Expand Down