From 5a7502ce6c88b37651bec0c23f9a8581a069f5de Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Mon, 6 Apr 2020 05:36:40 +0000 Subject: [PATCH] Generated from 165b7fcfae9a0dd104445193789b90f6974b0943 Renaming PrivateLinkResourceList to PrivateLinkResources --- sdk/recoveryservices/mgmt-v2016_06_01/pom.xml | 4 +- .../CheckNameAvailabilityResult.java | 85 +--- .../v2016_06_01/IdentityData.java | 73 ++++ .../v2016_06_01/PrivateEndpoint.java | 33 ++ .../PrivateEndpointConnection.java | 85 ++++ .../PrivateEndpointConnectionStatus.java | 47 ++ ...vateEndpointConnectionVaultProperties.java | 60 +++ .../v2016_06_01/PrivateLinkResource.java | 53 +++ .../v2016_06_01/PrivateLinkResources.java | 40 ++ .../PrivateLinkServiceConnectionState.java | 63 +++ .../v2016_06_01/ProvisioningState.java | 47 ++ .../v2016_06_01/RecoveryServices.java | 2 +- .../v2016_06_01/RegisteredIdentities.java | 4 +- .../ResourceCertificateAndAadDetails.java | 2 +- .../ResourceCertificateAndAcsDetails.java | 2 +- .../ResourceCertificateDetails.java | 2 +- .../v2016_06_01/ResourceIdentityType.java | 41 ++ .../recoveryservices/v2016_06_01/Vault.java | 19 +- .../VaultPrivateEndpointState.java | 41 ++ .../v2016_06_01/VaultProperties.java | 48 +++ .../CheckNameAvailabilityResultImpl.java | 41 ++ .../CheckNameAvailabilityResultInner.java | 96 +++++ .../PrivateLinkResourceImpl.java | 74 ++++ .../PrivateLinkResourceInner.java | 111 +++++ .../PrivateLinkResourcesImpl.java | 69 +++ .../PrivateLinkResourcesInner.java | 401 ++++++++++++++++++ .../RecoveryServicesClientImpl.java | 14 + .../implementation/RecoveryServicesImpl.java | 10 +- .../implementation/RecoveryServicesInner.java | 30 +- .../RecoveryServicesManager.java | 12 + .../RegisteredIdentitiesImpl.java | 5 - .../v2016_06_01/implementation/VaultImpl.java | 12 + .../implementation/VaultInner.java | 27 ++ 33 files changed, 1547 insertions(+), 106 deletions(-) create mode 100644 sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/IdentityData.java create mode 100644 sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/PrivateEndpoint.java create mode 100644 sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/PrivateEndpointConnection.java create mode 100644 sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/PrivateEndpointConnectionStatus.java create mode 100644 sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/PrivateEndpointConnectionVaultProperties.java create mode 100644 sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/PrivateLinkResource.java create mode 100644 sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/PrivateLinkResources.java create mode 100644 sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/PrivateLinkServiceConnectionState.java create mode 100644 sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/ProvisioningState.java create mode 100644 sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/ResourceIdentityType.java create mode 100644 sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/VaultPrivateEndpointState.java create mode 100644 sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/CheckNameAvailabilityResultImpl.java create mode 100644 sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/CheckNameAvailabilityResultInner.java create mode 100644 sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/PrivateLinkResourceImpl.java create mode 100644 sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/PrivateLinkResourceInner.java create mode 100644 sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/PrivateLinkResourcesImpl.java create mode 100644 sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/PrivateLinkResourcesInner.java diff --git a/sdk/recoveryservices/mgmt-v2016_06_01/pom.xml b/sdk/recoveryservices/mgmt-v2016_06_01/pom.xml index 8a8f96def402d..4470706bbb16a 100644 --- a/sdk/recoveryservices/mgmt-v2016_06_01/pom.xml +++ b/sdk/recoveryservices/mgmt-v2016_06_01/pom.xml @@ -11,7 +11,7 @@ com.microsoft.azure azure-arm-parent - 1.2.0 + 1.1.0 ../../../pom.management.xml azure-mgmt-recoveryservices @@ -71,6 +71,8 @@ azure-arm-client-runtime test-jar test + + 1.6.5 diff --git a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/CheckNameAvailabilityResult.java b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/CheckNameAvailabilityResult.java index ee088035095c1..380c356b30597 100644 --- a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/CheckNameAvailabilityResult.java +++ b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/CheckNameAvailabilityResult.java @@ -8,89 +8,28 @@ package com.microsoft.azure.management.recoveryservices.v2016_06_01; -import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.recoveryservices.v2016_06_01.implementation.RecoveryServicesManager; +import com.microsoft.azure.management.recoveryservices.v2016_06_01.implementation.CheckNameAvailabilityResultInner; /** - * Response for check name availability API. Resource provider will set - * availability as true | false. + * Type representing CheckNameAvailabilityResult. */ -public class CheckNameAvailabilityResult { +public interface CheckNameAvailabilityResult extends HasInner, HasManager { /** - * The nameAvailable property. + * @return the message value. */ - @JsonProperty(value = "nameAvailable") - private Boolean nameAvailable; + String message(); /** - * The reason property. + * @return the nameAvailable value. */ - @JsonProperty(value = "reason") - private String reason; + Boolean nameAvailable(); /** - * The message property. + * @return the reason value. */ - @JsonProperty(value = "message") - private String message; - - /** - * Get the nameAvailable value. - * - * @return the nameAvailable value - */ - public Boolean nameAvailable() { - return this.nameAvailable; - } - - /** - * Set the nameAvailable value. - * - * @param nameAvailable the nameAvailable value to set - * @return the CheckNameAvailabilityResult object itself. - */ - public CheckNameAvailabilityResult withNameAvailable(Boolean nameAvailable) { - this.nameAvailable = nameAvailable; - return this; - } - - /** - * Get the reason value. - * - * @return the reason value - */ - public String reason() { - return this.reason; - } - - /** - * Set the reason value. - * - * @param reason the reason value to set - * @return the CheckNameAvailabilityResult object itself. - */ - public CheckNameAvailabilityResult withReason(String reason) { - this.reason = reason; - return this; - } - - /** - * Get the message value. - * - * @return the message value - */ - public String message() { - return this.message; - } - - /** - * Set the message value. - * - * @param message the message value to set - * @return the CheckNameAvailabilityResult object itself. - */ - public CheckNameAvailabilityResult withMessage(String message) { - this.message = message; - return this; - } + String reason(); } diff --git a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/IdentityData.java b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/IdentityData.java new file mode 100644 index 0000000000000..2c06cf14ed695 --- /dev/null +++ b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/IdentityData.java @@ -0,0 +1,73 @@ +/** + * 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.recoveryservices.v2016_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Identity for the resource. + */ +public class IdentityData { + /** + * The principal ID of resource identity. + */ + @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) + private String principalId; + + /** + * The tenant ID of resource. + */ + @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) + private String tenantId; + + /** + * The identity type. Possible values include: 'SystemAssigned', 'None'. + */ + @JsonProperty(value = "type", required = true) + private ResourceIdentityType type; + + /** + * Get the principal ID of resource identity. + * + * @return the principalId value + */ + public String principalId() { + return this.principalId; + } + + /** + * Get the tenant ID of resource. + * + * @return the tenantId value + */ + public String tenantId() { + return this.tenantId; + } + + /** + * Get the identity type. Possible values include: 'SystemAssigned', 'None'. + * + * @return the type value + */ + public ResourceIdentityType type() { + return this.type; + } + + /** + * Set the identity type. Possible values include: 'SystemAssigned', 'None'. + * + * @param type the type value to set + * @return the IdentityData object itself. + */ + public IdentityData withType(ResourceIdentityType type) { + this.type = type; + return this; + } + +} diff --git a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/PrivateEndpoint.java b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/PrivateEndpoint.java new file mode 100644 index 0000000000000..24c0444fe88d3 --- /dev/null +++ b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/PrivateEndpoint.java @@ -0,0 +1,33 @@ +/** + * 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.recoveryservices.v2016_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The Private Endpoint network resource that is linked to the Private Endpoint + * connection. + */ +public class PrivateEndpoint { + /** + * Gets or sets id. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * Get gets or sets id. + * + * @return the id value + */ + public String id() { + return this.id; + } + +} diff --git a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/PrivateEndpointConnection.java b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/PrivateEndpointConnection.java new file mode 100644 index 0000000000000..90e328556d19f --- /dev/null +++ b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/PrivateEndpointConnection.java @@ -0,0 +1,85 @@ +/** + * 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.recoveryservices.v2016_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Private Endpoint Connection Response Properties. + */ +public class PrivateEndpointConnection { + /** + * Gets or sets provisioning state of the private endpoint connection. + * Possible values include: 'Succeeded', 'Deleting', 'Failed', 'Pending'. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ProvisioningState provisioningState; + + /** + * The privateEndpoint property. + */ + @JsonProperty(value = "privateEndpoint") + private PrivateEndpoint privateEndpoint; + + /** + * The privateLinkServiceConnectionState property. + */ + @JsonProperty(value = "privateLinkServiceConnectionState") + private PrivateLinkServiceConnectionState privateLinkServiceConnectionState; + + /** + * Get gets or sets provisioning state of the private endpoint connection. Possible values include: 'Succeeded', 'Deleting', 'Failed', 'Pending'. + * + * @return the provisioningState value + */ + public ProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the privateEndpoint value. + * + * @return the privateEndpoint value + */ + public PrivateEndpoint privateEndpoint() { + return this.privateEndpoint; + } + + /** + * Set the privateEndpoint value. + * + * @param privateEndpoint the privateEndpoint value to set + * @return the PrivateEndpointConnection object itself. + */ + public PrivateEndpointConnection withPrivateEndpoint(PrivateEndpoint privateEndpoint) { + this.privateEndpoint = privateEndpoint; + return this; + } + + /** + * Get the privateLinkServiceConnectionState value. + * + * @return the privateLinkServiceConnectionState value + */ + public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() { + return this.privateLinkServiceConnectionState; + } + + /** + * Set the privateLinkServiceConnectionState value. + * + * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set + * @return the PrivateEndpointConnection object itself. + */ + public PrivateEndpointConnection withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { + this.privateLinkServiceConnectionState = privateLinkServiceConnectionState; + return this; + } + +} diff --git a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/PrivateEndpointConnectionStatus.java b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/PrivateEndpointConnectionStatus.java new file mode 100644 index 0000000000000..2d28483ccfdb2 --- /dev/null +++ b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/PrivateEndpointConnectionStatus.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.recoveryservices.v2016_06_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for PrivateEndpointConnectionStatus. + */ +public final class PrivateEndpointConnectionStatus extends ExpandableStringEnum { + /** Static value Pending for PrivateEndpointConnectionStatus. */ + public static final PrivateEndpointConnectionStatus PENDING = fromString("Pending"); + + /** Static value Approved for PrivateEndpointConnectionStatus. */ + public static final PrivateEndpointConnectionStatus APPROVED = fromString("Approved"); + + /** Static value Rejected for PrivateEndpointConnectionStatus. */ + public static final PrivateEndpointConnectionStatus REJECTED = fromString("Rejected"); + + /** Static value Disconnected for PrivateEndpointConnectionStatus. */ + public static final PrivateEndpointConnectionStatus DISCONNECTED = fromString("Disconnected"); + + /** + * Creates or finds a PrivateEndpointConnectionStatus from its string representation. + * @param name a name to look for + * @return the corresponding PrivateEndpointConnectionStatus + */ + @JsonCreator + public static PrivateEndpointConnectionStatus fromString(String name) { + return fromString(name, PrivateEndpointConnectionStatus.class); + } + + /** + * @return known PrivateEndpointConnectionStatus values + */ + public static Collection values() { + return values(PrivateEndpointConnectionStatus.class); + } +} diff --git a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/PrivateEndpointConnectionVaultProperties.java b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/PrivateEndpointConnectionVaultProperties.java new file mode 100644 index 0000000000000..79b612bf14a33 --- /dev/null +++ b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/PrivateEndpointConnectionVaultProperties.java @@ -0,0 +1,60 @@ +/** + * 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.recoveryservices.v2016_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Information to be stored in Vault properties as an element of + * privateEndpointConnections List. + */ +public class PrivateEndpointConnectionVaultProperties { + /** + * Format of id + * subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.[Service]/{resource}/{resourceName}/privateEndpointConnections/{connectionName}. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * The properties property. + */ + @JsonProperty(value = "properties") + private PrivateEndpointConnection properties; + + /** + * Get format of id subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.[Service]/{resource}/{resourceName}/privateEndpointConnections/{connectionName}. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Get the properties value. + * + * @return the properties value + */ + public PrivateEndpointConnection properties() { + return this.properties; + } + + /** + * Set the properties value. + * + * @param properties the properties value to set + * @return the PrivateEndpointConnectionVaultProperties object itself. + */ + public PrivateEndpointConnectionVaultProperties withProperties(PrivateEndpointConnection properties) { + this.properties = properties; + return this; + } + +} diff --git a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/PrivateLinkResource.java b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/PrivateLinkResource.java new file mode 100644 index 0000000000000..add49ca49ac2c --- /dev/null +++ b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/PrivateLinkResource.java @@ -0,0 +1,53 @@ +/** + * 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.recoveryservices.v2016_06_01; + +import com.microsoft.azure.arm.model.HasInner; +import com.microsoft.azure.management.recoveryservices.v2016_06_01.implementation.PrivateLinkResourceInner; +import com.microsoft.azure.arm.model.Indexable; +import com.microsoft.azure.arm.model.Refreshable; +import com.microsoft.azure.arm.resources.models.HasManager; +import com.microsoft.azure.management.recoveryservices.v2016_06_01.implementation.RecoveryServicesManager; +import java.util.List; + +/** + * Type representing PrivateLinkResource. + */ +public interface PrivateLinkResource extends HasInner, Indexable, Refreshable, HasManager { + /** + * @return the groupId value. + */ + String groupId(); + + /** + * @return the id value. + */ + String id(); + + /** + * @return the name value. + */ + String name(); + + /** + * @return the requiredMembers value. + */ + List requiredMembers(); + + /** + * @return the requiredZoneNames value. + */ + List requiredZoneNames(); + + /** + * @return the type value. + */ + String type(); + +} diff --git a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/PrivateLinkResources.java b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/PrivateLinkResources.java new file mode 100644 index 0000000000000..4cce82f6a9f0b --- /dev/null +++ b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/PrivateLinkResources.java @@ -0,0 +1,40 @@ +/** + * 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.recoveryservices.v2016_06_01; + +import rx.Observable; +import com.microsoft.azure.management.recoveryservices.v2016_06_01.implementation.PrivateLinkResourcesInner; +import com.microsoft.azure.arm.model.HasInner; + +/** + * Type representing PrivateLinkResources. + */ +public interface PrivateLinkResources extends HasInner { + /** + * Returns a specified private link resource that need to be created for Backup and SiteRecovery. + * + * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the recovery services vault. + * @param privateLinkResourceName the String value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable getAsync(String resourceGroupName, String vaultName, String privateLinkResourceName); + + /** + * Returns the list of private link resources that need to be created for Backup and SiteRecovery. + * + * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the recovery services vault. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable for the request + */ + Observable listAsync(final String resourceGroupName, final String vaultName); + +} diff --git a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/PrivateLinkServiceConnectionState.java b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/PrivateLinkServiceConnectionState.java new file mode 100644 index 0000000000000..ce3c865755ebc --- /dev/null +++ b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/PrivateLinkServiceConnectionState.java @@ -0,0 +1,63 @@ +/** + * 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.recoveryservices.v2016_06_01; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Gets or sets private link service connection state. + */ +public class PrivateLinkServiceConnectionState { + /** + * Gets or sets the status. Possible values include: 'Pending', 'Approved', + * 'Rejected', 'Disconnected'. + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private PrivateEndpointConnectionStatus status; + + /** + * Gets or sets description. + */ + @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /** + * Gets or sets actions required. + */ + @JsonProperty(value = "actionsRequired", access = JsonProperty.Access.WRITE_ONLY) + private String actionsRequired; + + /** + * Get gets or sets the status. Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected'. + * + * @return the status value + */ + public PrivateEndpointConnectionStatus status() { + return this.status; + } + + /** + * Get gets or sets description. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Get gets or sets actions required. + * + * @return the actionsRequired value + */ + public String actionsRequired() { + return this.actionsRequired; + } + +} diff --git a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/ProvisioningState.java b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/ProvisioningState.java new file mode 100644 index 0000000000000..9119bf0b4c2df --- /dev/null +++ b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/ProvisioningState.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.recoveryservices.v2016_06_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ProvisioningState. + */ +public final class ProvisioningState extends ExpandableStringEnum { + /** Static value Succeeded for ProvisioningState. */ + public static final ProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Deleting for ProvisioningState. */ + public static final ProvisioningState DELETING = fromString("Deleting"); + + /** Static value Failed for ProvisioningState. */ + public static final ProvisioningState FAILED = fromString("Failed"); + + /** Static value Pending for ProvisioningState. */ + public static final ProvisioningState PENDING = fromString("Pending"); + + /** + * Creates or finds a ProvisioningState from its string representation. + * @param name a name to look for + * @return the corresponding ProvisioningState + */ + @JsonCreator + public static ProvisioningState fromString(String name) { + return fromString(name, ProvisioningState.class); + } + + /** + * @return known ProvisioningState values + */ + public static Collection values() { + return values(ProvisioningState.class); + } +} diff --git a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/RecoveryServices.java b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/RecoveryServices.java index 181660cd6fbf9..c4ae5a2a29230 100644 --- a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/RecoveryServices.java +++ b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/RecoveryServices.java @@ -27,6 +27,6 @@ public interface RecoveryServices extends HasInner { * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - Observable checkNameAvailabilityAsync(String resourceGroupName, String location, CheckNameAvailabilityParameters input); + Observable checkNameAvailabilityAsync(String resourceGroupName, String location, CheckNameAvailabilityParameters input); } diff --git a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/RegisteredIdentities.java b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/RegisteredIdentities.java index a8a7d35bfc666..226b2ac4fd3ec 100644 --- a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/RegisteredIdentities.java +++ b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/RegisteredIdentities.java @@ -8,9 +8,9 @@ package com.microsoft.azure.management.recoveryservices.v2016_06_01; +import rx.Completable; import com.microsoft.azure.management.recoveryservices.v2016_06_01.implementation.RegisteredIdentitiesInner; import com.microsoft.azure.arm.model.HasInner; -import rx.Observable; /** * Type representing RegisteredIdentities. @@ -25,6 +25,6 @@ public interface RegisteredIdentities extends HasInner deleteAsync(String resourceGroupName, String vaultName, String identityName); + Completable deleteAsync(String resourceGroupName, String vaultName, String identityName); } diff --git a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/ResourceCertificateAndAadDetails.java b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/ResourceCertificateAndAadDetails.java index 8e357f91931be..6413c594bd72d 100644 --- a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/ResourceCertificateAndAadDetails.java +++ b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/ResourceCertificateAndAadDetails.java @@ -15,7 +15,7 @@ /** * Certificate details representing the Vault credentials for AAD. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authType", defaultImpl = ResourceCertificateAndAadDetails.class) @JsonTypeName("AzureActiveDirectory") public class ResourceCertificateAndAadDetails extends ResourceCertificateDetails { /** diff --git a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/ResourceCertificateAndAcsDetails.java b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/ResourceCertificateAndAcsDetails.java index 9013e8e9e7ac2..81e43ace68f9e 100644 --- a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/ResourceCertificateAndAcsDetails.java +++ b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/ResourceCertificateAndAcsDetails.java @@ -15,7 +15,7 @@ /** * Certificate details representing the Vault credentials for ACS. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authType", defaultImpl = ResourceCertificateAndAcsDetails.class) @JsonTypeName("AccessControlService") public class ResourceCertificateAndAcsDetails extends ResourceCertificateDetails { /** diff --git a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/ResourceCertificateDetails.java b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/ResourceCertificateDetails.java index cd1dc90ef85c4..01b3eca1f55fa 100644 --- a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/ResourceCertificateDetails.java +++ b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/ResourceCertificateDetails.java @@ -17,7 +17,7 @@ /** * Certificate details representing the Vault credentials. */ -@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authType") +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "authType", defaultImpl = ResourceCertificateDetails.class) @JsonTypeName("ResourceCertificateDetails") @JsonSubTypes({ @JsonSubTypes.Type(name = "AzureActiveDirectory", value = ResourceCertificateAndAadDetails.class), diff --git a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/ResourceIdentityType.java b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/ResourceIdentityType.java new file mode 100644 index 0000000000000..3b6a734575972 --- /dev/null +++ b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/ResourceIdentityType.java @@ -0,0 +1,41 @@ +/** + * 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.recoveryservices.v2016_06_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for ResourceIdentityType. + */ +public final class ResourceIdentityType extends ExpandableStringEnum { + /** Static value SystemAssigned for ResourceIdentityType. */ + public static final ResourceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); + + /** Static value None for ResourceIdentityType. */ + public static final ResourceIdentityType NONE = fromString("None"); + + /** + * Creates or finds a ResourceIdentityType from its string representation. + * @param name a name to look for + * @return the corresponding ResourceIdentityType + */ + @JsonCreator + public static ResourceIdentityType fromString(String name) { + return fromString(name, ResourceIdentityType.class); + } + + /** + * @return known ResourceIdentityType values + */ + public static Collection values() { + return values(ResourceIdentityType.class); + } +} diff --git a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/Vault.java b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/Vault.java index 053efdcd466be..7f80e4fdf5610 100644 --- a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/Vault.java +++ b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/Vault.java @@ -29,6 +29,11 @@ public interface Vault extends HasInner, Resource, GroupableResource */ String eTag(); + /** + * @return the identity value. + */ + IdentityData identity(); + /** * @return the properties value. */ @@ -73,6 +78,18 @@ interface WithETag { WithCreate withETag(String eTag); } + /** + * The stage of the vault definition allowing to specify Identity. + */ + interface WithIdentity { + /** + * Specifies identity. + * @param identity the identity parameter value + * @return the next definition stage + */ + WithCreate withIdentity(IdentityData identity); + } + /** * The stage of the vault definition allowing to specify Properties. */ @@ -102,7 +119,7 @@ interface WithSku { * the resource to be created (via {@link WithCreate#create()}), but also allows * for any other optional settings to be specified. */ - interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithETag, DefinitionStages.WithProperties, DefinitionStages.WithSku { + interface WithCreate extends Creatable, Resource.DefinitionWithTags, DefinitionStages.WithETag, DefinitionStages.WithIdentity, DefinitionStages.WithProperties, DefinitionStages.WithSku { } } /** diff --git a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/VaultPrivateEndpointState.java b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/VaultPrivateEndpointState.java new file mode 100644 index 0000000000000..ce6981143606b --- /dev/null +++ b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/VaultPrivateEndpointState.java @@ -0,0 +1,41 @@ +/** + * 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.recoveryservices.v2016_06_01; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for VaultPrivateEndpointState. + */ +public final class VaultPrivateEndpointState extends ExpandableStringEnum { + /** Static value None for VaultPrivateEndpointState. */ + public static final VaultPrivateEndpointState NONE = fromString("None"); + + /** Static value Enabled for VaultPrivateEndpointState. */ + public static final VaultPrivateEndpointState ENABLED = fromString("Enabled"); + + /** + * Creates or finds a VaultPrivateEndpointState from its string representation. + * @param name a name to look for + * @return the corresponding VaultPrivateEndpointState + */ + @JsonCreator + public static VaultPrivateEndpointState fromString(String name) { + return fromString(name, VaultPrivateEndpointState.class); + } + + /** + * @return known VaultPrivateEndpointState values + */ + public static Collection values() { + return values(VaultPrivateEndpointState.class); + } +} diff --git a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/VaultProperties.java b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/VaultProperties.java index 484da63777895..9c663865d2ba4 100644 --- a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/VaultProperties.java +++ b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/VaultProperties.java @@ -8,6 +8,7 @@ package com.microsoft.azure.management.recoveryservices.v2016_06_01; +import java.util.List; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -26,6 +27,26 @@ public class VaultProperties { @JsonProperty(value = "upgradeDetails") private UpgradeDetails upgradeDetails; + /** + * List of private endpoint connection. + */ + @JsonProperty(value = "privateEndpointConnections", access = JsonProperty.Access.WRITE_ONLY) + private List privateEndpointConnections; + + /** + * Private endpoint state for backup. Possible values include: 'None', + * 'Enabled'. + */ + @JsonProperty(value = "privateEndpointStateForBackup", access = JsonProperty.Access.WRITE_ONLY) + private VaultPrivateEndpointState privateEndpointStateForBackup; + + /** + * Private endpoint state for site recovery. Possible values include: + * 'None', 'Enabled'. + */ + @JsonProperty(value = "privateEndpointStateForSiteRecovery", access = JsonProperty.Access.WRITE_ONLY) + private VaultPrivateEndpointState privateEndpointStateForSiteRecovery; + /** * Get provisioning State. * @@ -55,4 +76,31 @@ public VaultProperties withUpgradeDetails(UpgradeDetails upgradeDetails) { return this; } + /** + * Get list of private endpoint connection. + * + * @return the privateEndpointConnections value + */ + public List privateEndpointConnections() { + return this.privateEndpointConnections; + } + + /** + * Get private endpoint state for backup. Possible values include: 'None', 'Enabled'. + * + * @return the privateEndpointStateForBackup value + */ + public VaultPrivateEndpointState privateEndpointStateForBackup() { + return this.privateEndpointStateForBackup; + } + + /** + * Get private endpoint state for site recovery. Possible values include: 'None', 'Enabled'. + * + * @return the privateEndpointStateForSiteRecovery value + */ + public VaultPrivateEndpointState privateEndpointStateForSiteRecovery() { + return this.privateEndpointStateForSiteRecovery; + } + } diff --git a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/CheckNameAvailabilityResultImpl.java b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/CheckNameAvailabilityResultImpl.java new file mode 100644 index 0000000000000..1d28815861c27 --- /dev/null +++ b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/CheckNameAvailabilityResultImpl.java @@ -0,0 +1,41 @@ +/** + * 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.recoveryservices.v2016_06_01.implementation; + +import com.microsoft.azure.management.recoveryservices.v2016_06_01.CheckNameAvailabilityResult; +import com.microsoft.azure.arm.model.implementation.WrapperImpl; + +class CheckNameAvailabilityResultImpl extends WrapperImpl implements CheckNameAvailabilityResult { + private final RecoveryServicesManager manager; + CheckNameAvailabilityResultImpl(CheckNameAvailabilityResultInner inner, RecoveryServicesManager manager) { + super(inner); + this.manager = manager; + } + + @Override + public RecoveryServicesManager manager() { + return this.manager; + } + + @Override + public String message() { + return this.inner().message(); + } + + @Override + public Boolean nameAvailable() { + return this.inner().nameAvailable(); + } + + @Override + public String reason() { + return this.inner().reason(); + } + +} diff --git a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/CheckNameAvailabilityResultInner.java b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/CheckNameAvailabilityResultInner.java new file mode 100644 index 0000000000000..53db6b9aece3e --- /dev/null +++ b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/CheckNameAvailabilityResultInner.java @@ -0,0 +1,96 @@ +/** + * 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.recoveryservices.v2016_06_01.implementation; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Response for check name availability API. Resource provider will set + * availability as true | false. + */ +public class CheckNameAvailabilityResultInner { + /** + * The nameAvailable property. + */ + @JsonProperty(value = "nameAvailable") + private Boolean nameAvailable; + + /** + * The reason property. + */ + @JsonProperty(value = "reason") + private String reason; + + /** + * The message property. + */ + @JsonProperty(value = "message") + private String message; + + /** + * Get the nameAvailable value. + * + * @return the nameAvailable value + */ + public Boolean nameAvailable() { + return this.nameAvailable; + } + + /** + * Set the nameAvailable value. + * + * @param nameAvailable the nameAvailable value to set + * @return the CheckNameAvailabilityResultInner object itself. + */ + public CheckNameAvailabilityResultInner withNameAvailable(Boolean nameAvailable) { + this.nameAvailable = nameAvailable; + return this; + } + + /** + * Get the reason value. + * + * @return the reason value + */ + public String reason() { + return this.reason; + } + + /** + * Set the reason value. + * + * @param reason the reason value to set + * @return the CheckNameAvailabilityResultInner object itself. + */ + public CheckNameAvailabilityResultInner withReason(String reason) { + this.reason = reason; + return this; + } + + /** + * Get the message value. + * + * @return the message value + */ + public String message() { + return this.message; + } + + /** + * Set the message value. + * + * @param message the message value to set + * @return the CheckNameAvailabilityResultInner object itself. + */ + public CheckNameAvailabilityResultInner withMessage(String message) { + this.message = message; + return this; + } + +} diff --git a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/PrivateLinkResourceImpl.java b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/PrivateLinkResourceImpl.java new file mode 100644 index 0000000000000..fdc433b20715b --- /dev/null +++ b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/PrivateLinkResourceImpl.java @@ -0,0 +1,74 @@ +/** + * 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.recoveryservices.v2016_06_01.implementation; + +import com.microsoft.azure.management.recoveryservices.v2016_06_01.PrivateLinkResource; +import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl; +import rx.Observable; +import java.util.List; + +class PrivateLinkResourceImpl extends IndexableRefreshableWrapperImpl implements PrivateLinkResource { + private final RecoveryServicesManager manager; + private String resourceGroupName; + private String vaultName; + private String privateLinkResourceName; + + PrivateLinkResourceImpl(PrivateLinkResourceInner inner, RecoveryServicesManager manager) { + super(null, inner); + this.manager = manager; + // set resource ancestor and positional variables + this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups"); + this.vaultName = IdParsingUtils.getValueFromIdByName(inner.id(), "vaults"); + this.privateLinkResourceName = IdParsingUtils.getValueFromIdByName(inner.id(), "privateLinkResources"); + } + + @Override + public RecoveryServicesManager manager() { + return this.manager; + } + + @Override + protected Observable getInnerAsync() { + PrivateLinkResourcesInner client = this.manager().inner().privateLinkResources(); + return client.getAsync(this.resourceGroupName, this.vaultName, this.privateLinkResourceName); + } + + + + @Override + public String groupId() { + return this.inner().groupId(); + } + + @Override + public String id() { + return this.inner().id(); + } + + @Override + public String name() { + return this.inner().name(); + } + + @Override + public List requiredMembers() { + return this.inner().requiredMembers(); + } + + @Override + public List requiredZoneNames() { + return this.inner().requiredZoneNames(); + } + + @Override + public String type() { + return this.inner().type(); + } + +} diff --git a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/PrivateLinkResourceInner.java b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/PrivateLinkResourceInner.java new file mode 100644 index 0000000000000..8b4224b8b56f3 --- /dev/null +++ b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/PrivateLinkResourceInner.java @@ -0,0 +1,111 @@ +/** + * 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.recoveryservices.v2016_06_01.implementation; + +import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.rest.serializer.JsonFlatten; + +/** + * Information of the private link resource. + */ +@JsonFlatten +public class PrivateLinkResourceInner { + /** + * e.g. f9ad6492-33d4-4690-9999-6bfd52a0d081 (Backup) or + * f9ad6492-33d4-4690-9999-6bfd52a0d082 (SiteRecovery). + */ + @JsonProperty(value = "properties.groupId", access = JsonProperty.Access.WRITE_ONLY) + private String groupId; + + /** + * [backup-ecs1, backup-prot1, backup-prot1b, backup-prot1c, backup-id1]. + */ + @JsonProperty(value = "properties.requiredMembers", access = JsonProperty.Access.WRITE_ONLY) + private List requiredMembers; + + /** + * The private link resource Private link DNS zone name. + */ + @JsonProperty(value = "properties.requiredZoneNames", access = JsonProperty.Access.WRITE_ONLY) + private List requiredZoneNames; + + /** + * Fully qualified identifier of the resource. + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /** + * Name of the resource. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /** + * e.g. Microsoft.RecoveryServices/vaults/privateLinkResources. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Get e.g. f9ad6492-33d4-4690-9999-6bfd52a0d081 (Backup) or f9ad6492-33d4-4690-9999-6bfd52a0d082 (SiteRecovery). + * + * @return the groupId value + */ + public String groupId() { + return this.groupId; + } + + /** + * Get [backup-ecs1, backup-prot1, backup-prot1b, backup-prot1c, backup-id1]. + * + * @return the requiredMembers value + */ + public List requiredMembers() { + return this.requiredMembers; + } + + /** + * Get the private link resource Private link DNS zone name. + * + * @return the requiredZoneNames value + */ + public List requiredZoneNames() { + return this.requiredZoneNames; + } + + /** + * Get fully qualified identifier of the resource. + * + * @return the id value + */ + public String id() { + return this.id; + } + + /** + * Get name of the resource. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Get e.g. Microsoft.RecoveryServices/vaults/privateLinkResources. + * + * @return the type value + */ + public String type() { + return this.type; + } + +} diff --git a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/PrivateLinkResourcesImpl.java b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/PrivateLinkResourcesImpl.java new file mode 100644 index 0000000000000..16f3bcbbab3d4 --- /dev/null +++ b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/PrivateLinkResourcesImpl.java @@ -0,0 +1,69 @@ +/** + * 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.recoveryservices.v2016_06_01.implementation; + +import com.microsoft.azure.arm.model.implementation.WrapperImpl; +import com.microsoft.azure.management.recoveryservices.v2016_06_01.PrivateLinkResources; +import rx.Observable; +import rx.functions.Func1; +import com.microsoft.azure.Page; +import com.microsoft.azure.management.recoveryservices.v2016_06_01.PrivateLinkResource; + +class PrivateLinkResourcesImpl extends WrapperImpl implements PrivateLinkResources { + private final RecoveryServicesManager manager; + + PrivateLinkResourcesImpl(RecoveryServicesManager manager) { + super(manager.inner().privateLinkResources()); + this.manager = manager; + } + + public RecoveryServicesManager manager() { + return this.manager; + } + + private PrivateLinkResourceImpl wrapModel(PrivateLinkResourceInner inner) { + return new PrivateLinkResourceImpl(inner, manager()); + } + + @Override + public Observable listAsync(final String resourceGroupName, final String vaultName) { + PrivateLinkResourcesInner client = this.inner(); + return client.listAsync(resourceGroupName, vaultName) + .flatMapIterable(new Func1, Iterable>() { + @Override + public Iterable call(Page page) { + return page.items(); + } + }) + .map(new Func1() { + @Override + public PrivateLinkResource call(PrivateLinkResourceInner inner) { + return wrapModel(inner); + } + }); + } + + @Override + public Observable getAsync(String resourceGroupName, String vaultName, String privateLinkResourceName) { + PrivateLinkResourcesInner client = this.inner(); + return client.getAsync(resourceGroupName, vaultName, privateLinkResourceName) + .flatMap(new Func1>() { + @Override + public Observable call(PrivateLinkResourceInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((PrivateLinkResource)wrapModel(inner)); + } + } + }); + } + +} diff --git a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/PrivateLinkResourcesInner.java b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/PrivateLinkResourcesInner.java new file mode 100644 index 0000000000000..7afdb8d52444e --- /dev/null +++ b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/PrivateLinkResourcesInner.java @@ -0,0 +1,401 @@ +/** + * 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.recoveryservices.v2016_06_01.implementation; + +import retrofit2.Retrofit; +import com.google.common.reflect.TypeToken; +import com.microsoft.azure.AzureServiceFuture; +import com.microsoft.azure.CloudException; +import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.Page; +import com.microsoft.azure.PagedList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; +import java.util.List; +import okhttp3.ResponseBody; +import retrofit2.http.GET; +import retrofit2.http.Header; +import retrofit2.http.Headers; +import retrofit2.http.Path; +import retrofit2.http.Query; +import retrofit2.http.Url; +import retrofit2.Response; +import rx.functions.Func1; +import rx.Observable; + +/** + * An instance of this class provides access to all the operations defined + * in PrivateLinkResources. + */ +public class PrivateLinkResourcesInner { + /** The Retrofit service to perform REST calls. */ + private PrivateLinkResourcesService service; + /** The service client containing this operation class. */ + private RecoveryServicesClientImpl client; + + /** + * Initializes an instance of PrivateLinkResourcesInner. + * + * @param retrofit the Retrofit instance built from a Retrofit Builder. + * @param client the instance of the service client containing this operation class. + */ + public PrivateLinkResourcesInner(Retrofit retrofit, RecoveryServicesClientImpl client) { + this.service = retrofit.create(PrivateLinkResourcesService.class); + this.client = client; + } + + /** + * The interface defining all the services for PrivateLinkResources to be + * used by Retrofit to perform actually REST calls. + */ + interface PrivateLinkResourcesService { + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservices.v2016_06_01.PrivateLinkResources list" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateLinkResources") + Observable> list(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("vaultName") String vaultName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservices.v2016_06_01.PrivateLinkResources get" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/privateLinkResources/{privateLinkResourceName}") + Observable> get(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("vaultName") String vaultName, @Path("privateLinkResourceName") String privateLinkResourceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.recoveryservices.v2016_06_01.PrivateLinkResources listNext" }) + @GET + Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + + } + + /** + * Returns the list of private link resources that need to be created for Backup and SiteRecovery. + * + * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the recovery services vault. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<PrivateLinkResourceInner> object if successful. + */ + public PagedList list(final String resourceGroupName, final String vaultName) { + ServiceResponse> response = listSinglePageAsync(resourceGroupName, vaultName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Returns the list of private link resources that need to be created for Backup and SiteRecovery. + * + * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the recovery services vault. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listAsync(final String resourceGroupName, final String vaultName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listSinglePageAsync(resourceGroupName, vaultName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Returns the list of private link resources that need to be created for Backup and SiteRecovery. + * + * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the recovery services vault. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PrivateLinkResourceInner> object + */ + public Observable> listAsync(final String resourceGroupName, final String vaultName) { + return listWithServiceResponseAsync(resourceGroupName, vaultName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Returns the list of private link resources that need to be created for Backup and SiteRecovery. + * + * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the recovery services vault. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PrivateLinkResourceInner> object + */ + public Observable>> listWithServiceResponseAsync(final String resourceGroupName, final String vaultName) { + return listSinglePageAsync(resourceGroupName, vaultName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Returns the list of private link resources that need to be created for Backup and SiteRecovery. + * + ServiceResponse> * @param resourceGroupName The name of the resource group where the recovery services vault is present. + ServiceResponse> * @param vaultName The name of the recovery services vault. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PrivateLinkResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listSinglePageAsync(final String resourceGroupName, final String vaultName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vaultName == null) { + throw new IllegalArgumentException("Parameter vaultName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.list(this.client.subscriptionId(), resourceGroupName, vaultName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Returns a specified private link resource that need to be created for Backup and SiteRecovery. + * + * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the recovery services vault. + * @param privateLinkResourceName the String value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PrivateLinkResourceInner object if successful. + */ + public PrivateLinkResourceInner get(String resourceGroupName, String vaultName, String privateLinkResourceName) { + return getWithServiceResponseAsync(resourceGroupName, vaultName, privateLinkResourceName).toBlocking().single().body(); + } + + /** + * Returns a specified private link resource that need to be created for Backup and SiteRecovery. + * + * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the recovery services vault. + * @param privateLinkResourceName the String value + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAsync(String resourceGroupName, String vaultName, String privateLinkResourceName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, vaultName, privateLinkResourceName), serviceCallback); + } + + /** + * Returns a specified private link resource that need to be created for Backup and SiteRecovery. + * + * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the recovery services vault. + * @param privateLinkResourceName the String value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateLinkResourceInner object + */ + public Observable getAsync(String resourceGroupName, String vaultName, String privateLinkResourceName) { + return getWithServiceResponseAsync(resourceGroupName, vaultName, privateLinkResourceName).map(new Func1, PrivateLinkResourceInner>() { + @Override + public PrivateLinkResourceInner call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Returns a specified private link resource that need to be created for Backup and SiteRecovery. + * + * @param resourceGroupName The name of the resource group where the recovery services vault is present. + * @param vaultName The name of the recovery services vault. + * @param privateLinkResourceName the String value + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PrivateLinkResourceInner object + */ + public Observable> getWithServiceResponseAsync(String resourceGroupName, String vaultName, String privateLinkResourceName) { + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vaultName == null) { + throw new IllegalArgumentException("Parameter vaultName is required and cannot be null."); + } + if (privateLinkResourceName == null) { + throw new IllegalArgumentException("Parameter privateLinkResourceName is required and cannot be null."); + } + if (this.client.apiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); + } + return service.get(this.client.subscriptionId(), resourceGroupName, vaultName, privateLinkResourceName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Returns the list of private link resources that need to be created for Backup and SiteRecovery. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<PrivateLinkResourceInner> object if successful. + */ + public PagedList listNext(final String nextPageLink) { + ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Returns the list of private link resources that need to be created for Backup and SiteRecovery. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> listNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + listNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return listNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Returns the list of private link resources that need to be created for Backup and SiteRecovery. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PrivateLinkResourceInner> object + */ + public Observable> listNextAsync(final String nextPageLink) { + return listNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Returns the list of private link resources that need to be created for Backup and SiteRecovery. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<PrivateLinkResourceInner> object + */ + public Observable>> listNextWithServiceResponseAsync(final String nextPageLink) { + return listNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(listNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Returns the list of private link resources that need to be created for Backup and SiteRecovery. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<PrivateLinkResourceInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> listNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.listNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = listNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + +} diff --git a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/RecoveryServicesClientImpl.java b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/RecoveryServicesClientImpl.java index 8133e05062b30..10f6295cc5df0 100644 --- a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/RecoveryServicesClientImpl.java +++ b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/RecoveryServicesClientImpl.java @@ -171,6 +171,19 @@ public ReplicationUsagesInner replicationUsages() { return this.replicationUsages; } + /** + * The PrivateLinkResourcesInner object to access its operations. + */ + private PrivateLinkResourcesInner privateLinkResources; + + /** + * Gets the PrivateLinkResourcesInner object to access its operations. + * @return the PrivateLinkResourcesInner object. + */ + public PrivateLinkResourcesInner privateLinkResources() { + return this.privateLinkResources; + } + /** * The RecoveryServicesInner object to access its operations. */ @@ -274,6 +287,7 @@ protected void initialize() { this.vaultCertificates = new VaultCertificatesInner(restClient().retrofit(), this); this.registeredIdentities = new RegisteredIdentitiesInner(restClient().retrofit(), this); this.replicationUsages = new ReplicationUsagesInner(restClient().retrofit(), this); + this.privateLinkResources = new PrivateLinkResourcesInner(restClient().retrofit(), this); this.recoveryServices = new RecoveryServicesInner(restClient().retrofit(), this); this.vaults = new VaultsInner(restClient().retrofit(), this); this.operations = new OperationsInner(restClient().retrofit(), this); diff --git a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/RecoveryServicesImpl.java b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/RecoveryServicesImpl.java index 6941fa459a2a5..f800e3344af55 100644 --- a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/RecoveryServicesImpl.java +++ b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/RecoveryServicesImpl.java @@ -13,7 +13,7 @@ import com.microsoft.azure.management.recoveryservices.v2016_06_01.RecoveryServices; import rx.functions.Func1; import rx.Observable; -import com.microsoft.azure.management.recoveryservices.v2016_06_01.CheckNameAvailabilityResultResource; +import com.microsoft.azure.management.recoveryservices.v2016_06_01.CheckNameAvailabilityResult; import com.microsoft.azure.management.recoveryservices.v2016_06_01.CheckNameAvailabilityParameters; class RecoveryServicesImpl extends WrapperImpl implements RecoveryServices { @@ -29,13 +29,13 @@ public RecoveryServicesManager manager() { } @Override - public Observable checkNameAvailabilityAsync(String resourceGroupName, String location, CheckNameAvailabilityParameters input) { + public Observable checkNameAvailabilityAsync(String resourceGroupName, String location, CheckNameAvailabilityParameters input) { RecoveryServicesInner client = this.inner(); return client.checkNameAvailabilityAsync(resourceGroupName, location, input) - .map(new Func1() { + .map(new Func1() { @Override - public CheckNameAvailabilityResultResource call(CheckNameAvailabilityResultResourceInner inner) { - return new CheckNameAvailabilityResultResourceImpl(inner, manager()); + public CheckNameAvailabilityResult call(CheckNameAvailabilityResultInner inner) { + return new CheckNameAvailabilityResultImpl(inner, manager()); } }); } diff --git a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/RecoveryServicesInner.java b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/RecoveryServicesInner.java index 9fad0648f3a23..e5c38b0c6e05e 100644 --- a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/RecoveryServicesInner.java +++ b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/RecoveryServicesInner.java @@ -71,9 +71,9 @@ interface RecoveryServicesService { * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the CheckNameAvailabilityResultResourceInner object if successful. + * @return the CheckNameAvailabilityResultInner object if successful. */ - public CheckNameAvailabilityResultResourceInner checkNameAvailability(String resourceGroupName, String location, CheckNameAvailabilityParameters input) { + public CheckNameAvailabilityResultInner checkNameAvailability(String resourceGroupName, String location, CheckNameAvailabilityParameters input) { return checkNameAvailabilityWithServiceResponseAsync(resourceGroupName, location, input).toBlocking().single().body(); } @@ -89,7 +89,7 @@ public CheckNameAvailabilityResultResourceInner checkNameAvailability(String res * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture checkNameAvailabilityAsync(String resourceGroupName, String location, CheckNameAvailabilityParameters input, final ServiceCallback serviceCallback) { + public ServiceFuture checkNameAvailabilityAsync(String resourceGroupName, String location, CheckNameAvailabilityParameters input, final ServiceCallback serviceCallback) { return ServiceFuture.fromResponse(checkNameAvailabilityWithServiceResponseAsync(resourceGroupName, location, input), serviceCallback); } @@ -102,12 +102,12 @@ public ServiceFuture checkNameAvailabi * @param location Location of the resource * @param input Contains information about Resource type and Resource name * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the CheckNameAvailabilityResultResourceInner object + * @return the observable to the CheckNameAvailabilityResultInner object */ - public Observable checkNameAvailabilityAsync(String resourceGroupName, String location, CheckNameAvailabilityParameters input) { - return checkNameAvailabilityWithServiceResponseAsync(resourceGroupName, location, input).map(new Func1, CheckNameAvailabilityResultResourceInner>() { + public Observable checkNameAvailabilityAsync(String resourceGroupName, String location, CheckNameAvailabilityParameters input) { + return checkNameAvailabilityWithServiceResponseAsync(resourceGroupName, location, input).map(new Func1, CheckNameAvailabilityResultInner>() { @Override - public CheckNameAvailabilityResultResourceInner call(ServiceResponse response) { + public CheckNameAvailabilityResultInner call(ServiceResponse response) { return response.body(); } }); @@ -122,9 +122,9 @@ public CheckNameAvailabilityResultResourceInner call(ServiceResponse> checkNameAvailabilityWithServiceResponseAsync(String resourceGroupName, String location, CheckNameAvailabilityParameters input) { + public Observable> checkNameAvailabilityWithServiceResponseAsync(String resourceGroupName, String location, CheckNameAvailabilityParameters input) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } @@ -142,11 +142,11 @@ public Observable> che } Validator.validate(input); return service.checkNameAvailability(this.client.subscriptionId(), resourceGroupName, location, this.client.apiVersion(), input, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { + .flatMap(new Func1, Observable>>() { @Override - public Observable> call(Response response) { + public Observable> call(Response response) { try { - ServiceResponse clientResponse = checkNameAvailabilityDelegate(response); + ServiceResponse clientResponse = checkNameAvailabilityDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); @@ -155,9 +155,9 @@ public Observable> cal }); } - private ServiceResponse checkNameAvailabilityDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse checkNameAvailabilityDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } diff --git a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/RecoveryServicesManager.java b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/RecoveryServicesManager.java index bb1a9dd2f538e..a24d2c79d424b 100644 --- a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/RecoveryServicesManager.java +++ b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/RecoveryServicesManager.java @@ -19,6 +19,7 @@ import com.microsoft.azure.management.recoveryservices.v2016_06_01.VaultCertificates; import com.microsoft.azure.management.recoveryservices.v2016_06_01.RegisteredIdentities; import com.microsoft.azure.management.recoveryservices.v2016_06_01.ReplicationUsages; +import com.microsoft.azure.management.recoveryservices.v2016_06_01.PrivateLinkResources; import com.microsoft.azure.management.recoveryservices.v2016_06_01.RecoveryServices; import com.microsoft.azure.management.recoveryservices.v2016_06_01.Vaults; import com.microsoft.azure.management.recoveryservices.v2016_06_01.Operations; @@ -34,6 +35,7 @@ public final class RecoveryServicesManager extends ManagerCore implements RegisteredIdentities { private final RecoveryServicesManager manager; @@ -25,8 +24,4 @@ public RecoveryServicesManager manager() { return this.manager; } - @Override - public Observable deleteAsync(String resourceGroupName, String vaultName, String identityName) { - return this.inner().deleteAsync(resourceGroupName, vaultName, identityName); - } } diff --git a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/VaultImpl.java b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/VaultImpl.java index b2eef00b1d637..c9858620d723e 100644 --- a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/VaultImpl.java +++ b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/VaultImpl.java @@ -12,6 +12,7 @@ import com.microsoft.azure.management.recoveryservices.v2016_06_01.Vault; import rx.Observable; import com.microsoft.azure.management.recoveryservices.v2016_06_01.PatchVault; +import com.microsoft.azure.management.recoveryservices.v2016_06_01.IdentityData; import com.microsoft.azure.management.recoveryservices.v2016_06_01.VaultProperties; import com.microsoft.azure.management.recoveryservices.v2016_06_01.Sku; import rx.functions.Func1; @@ -71,6 +72,11 @@ public String eTag() { return this.inner().eTag(); } + @Override + public IdentityData identity() { + return this.inner().identity(); + } + @Override public VaultProperties properties() { return this.inner().properties(); @@ -81,6 +87,12 @@ public Sku sku() { return this.inner().sku(); } + @Override + public VaultImpl withIdentity(IdentityData identity) { + this.inner().withIdentity(identity); + return this; + } + @Override public VaultImpl withETag(String eTag) { if (isInCreateMode()) { diff --git a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/VaultInner.java b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/VaultInner.java index 6874156103ba2..778ef5986a239 100644 --- a/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/VaultInner.java +++ b/sdk/recoveryservices/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/recoveryservices/v2016_06_01/implementation/VaultInner.java @@ -8,6 +8,7 @@ package com.microsoft.azure.management.recoveryservices.v2016_06_01.implementation; +import com.microsoft.azure.management.recoveryservices.v2016_06_01.IdentityData; import com.microsoft.azure.management.recoveryservices.v2016_06_01.VaultProperties; import com.microsoft.azure.management.recoveryservices.v2016_06_01.Sku; import com.fasterxml.jackson.annotation.JsonProperty; @@ -17,6 +18,12 @@ * Resource information, as returned by the resource provider. */ public class VaultInner extends Resource { + /** + * The identity property. + */ + @JsonProperty(value = "identity") + private IdentityData identity; + /** * The properties property. */ @@ -35,6 +42,26 @@ public class VaultInner extends Resource { @JsonProperty(value = "eTag") private String eTag; + /** + * 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 VaultInner object itself. + */ + public VaultInner withIdentity(IdentityData identity) { + this.identity = identity; + return this; + } + /** * Get the properties value. *