From f135e060cf490c5edcd90603d329f62128dcca8a Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Tue, 21 Jan 2020 06:19:10 +0000 Subject: [PATCH] Generated from e58d11a15ad7a0b624cb0e0e5cc4531733f537f0 Fix missing type in netapp --- sdk/netapp/mgmt-v2019_05_01/pom.xml | 4 +- .../netapp/v2019_05_01/CapacityPool.java | 32 +++---- .../v2019_05_01/CheckNameResourceTypes.java | 16 ++-- .../netapp/v2019_05_01/ExportPolicyRule.java | 7 +- .../netapp/v2019_05_01/MountTargetList.java | 45 +++++++++ .../ResourceNameAvailabilityRequest.java | 12 +-- .../management/netapp/v2019_05_01/Volume.java | 95 +++++++++++++------ .../netapp/v2019_05_01/VolumePatch.java | 6 +- .../AzureNetAppFilesManagementClientImpl.java | 51 ++++++---- .../implementation/CapacityPoolImpl.java | 20 ++-- .../implementation/CapacityPoolInner.java | 10 +- .../v2019_05_01/implementation/PoolsImpl.java | 10 +- .../implementation/SnapshotsImpl.java | 10 +- .../implementation/VolumeImpl.java | 56 ++++++++--- .../implementation/VolumeInner.java | 74 +++++++++++++-- .../implementation/VolumesImpl.java | 10 +- 16 files changed, 326 insertions(+), 132 deletions(-) create mode 100644 sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/MountTargetList.java diff --git a/sdk/netapp/mgmt-v2019_05_01/pom.xml b/sdk/netapp/mgmt-v2019_05_01/pom.xml index c496a31f3187c..a6850f7fcd125 100644 --- a/sdk/netapp/mgmt-v2019_05_01/pom.xml +++ b/sdk/netapp/mgmt-v2019_05_01/pom.xml @@ -11,7 +11,7 @@ com.microsoft.azure azure-arm-parent - 1.2.0 + 1.1.0 ../../../pom.management.xml azure-mgmt-netapp @@ -71,6 +71,8 @@ azure-arm-client-runtime test-jar test + + 1.6.5 diff --git a/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/CapacityPool.java b/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/CapacityPool.java index 6933464e4a491..e59e34d8d2568 100644 --- a/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/CapacityPool.java +++ b/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/CapacityPool.java @@ -56,7 +56,7 @@ public interface CapacityPool extends HasInner, Indexable, Re /** * @return the size value. */ - Long size(); + long size(); /** * @return the tags value. @@ -71,7 +71,7 @@ public interface CapacityPool extends HasInner, Indexable, Re /** * The entirety of the CapacityPool definition. */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithNetAppAccount, DefinitionStages.WithLocation, DefinitionStages.WithCreate { + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithNetAppAccount, DefinitionStages.WithLocation, DefinitionStages.WithServiceLevel, DefinitionStages.WithSize, DefinitionStages.WithCreate { } /** @@ -106,31 +106,31 @@ interface WithLocation { * @param location the location parameter value * @return the next definition stage */ - WithCreate withLocation(String location); + WithServiceLevel withLocation(String location); } /** * The stage of the capacitypool definition allowing to specify ServiceLevel. */ interface WithServiceLevel { - /** - * Specifies serviceLevel. - * @param serviceLevel The service level of the file system. Possible values include: 'Standard', 'Premium', 'Ultra' - * @return the next definition stage - */ - WithCreate withServiceLevel(ServiceLevel serviceLevel); + /** + * Specifies serviceLevel. + * @param serviceLevel The service level of the file system. Possible values include: 'Standard', 'Premium', 'Ultra' + * @return the next definition stage + */ + WithSize withServiceLevel(ServiceLevel serviceLevel); } /** * The stage of the capacitypool definition allowing to specify Size. */ interface WithSize { - /** - * Specifies size. - * @param size Provisioned size of the pool (in bytes). Allowed values are in 4TiB chunks (value must be multiply of 4398046511104) - * @return the next definition stage - */ - WithCreate withSize(Long size); + /** + * Specifies size. + * @param size Provisioned size of the pool (in bytes). Allowed values are in 4TiB chunks (value must be multiply of 4398046511104) + * @return the next definition stage + */ + WithCreate withSize(long size); } /** @@ -150,7 +150,7 @@ interface WithTags { * the resource to be created (via {@link WithCreate#create()}), but also allows * for any other optional settings to be specified. */ - interface WithCreate extends Creatable, DefinitionStages.WithServiceLevel, DefinitionStages.WithSize, DefinitionStages.WithTags { + interface WithCreate extends Creatable, DefinitionStages.WithTags { } } /** diff --git a/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/CheckNameResourceTypes.java b/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/CheckNameResourceTypes.java index 16245ae28805b..50940628f7613 100644 --- a/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/CheckNameResourceTypes.java +++ b/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/CheckNameResourceTypes.java @@ -16,17 +16,17 @@ * Defines values for CheckNameResourceTypes. */ public final class CheckNameResourceTypes extends ExpandableStringEnum { - /** Static value Microsoft.NetApp/netAppAccount for CheckNameResourceTypes. */ - public static final CheckNameResourceTypes MICROSOFT_NET_APPNET_APP_ACCOUNT = fromString("Microsoft.NetApp/netAppAccount"); + /** Static value Microsoft.NetApp/netAppAccounts for CheckNameResourceTypes. */ + public static final CheckNameResourceTypes MICROSOFT_NET_APPNET_APP_ACCOUNTS = fromString("Microsoft.NetApp/netAppAccounts"); - /** Static value Microsoft.NetApp/netAppAccount/capacityPools for CheckNameResourceTypes. */ - public static final CheckNameResourceTypes MICROSOFT_NET_APPNET_APP_ACCOUNTCAPACITY_POOLS = fromString("Microsoft.NetApp/netAppAccount/capacityPools"); + /** Static value Microsoft.NetApp/netAppAccounts/capacityPools for CheckNameResourceTypes. */ + public static final CheckNameResourceTypes MICROSOFT_NET_APPNET_APP_ACCOUNTSCAPACITY_POOLS = fromString("Microsoft.NetApp/netAppAccounts/capacityPools"); - /** Static value Microsoft.NetApp/netAppAccount/capacityPools/volumes for CheckNameResourceTypes. */ - public static final CheckNameResourceTypes MICROSOFT_NET_APPNET_APP_ACCOUNTCAPACITY_POOLSVOLUMES = fromString("Microsoft.NetApp/netAppAccount/capacityPools/volumes"); + /** Static value Microsoft.NetApp/netAppAccounts/capacityPools/volumes for CheckNameResourceTypes. */ + public static final CheckNameResourceTypes MICROSOFT_NET_APPNET_APP_ACCOUNTSCAPACITY_POOLSVOLUMES = fromString("Microsoft.NetApp/netAppAccounts/capacityPools/volumes"); - /** Static value Microsoft.NetApp/netAppAccount/capacityPools/volumes/snapshots for CheckNameResourceTypes. */ - public static final CheckNameResourceTypes MICROSOFT_NET_APPNET_APP_ACCOUNTCAPACITY_POOLSVOLUMESSNAPSHOTS = fromString("Microsoft.NetApp/netAppAccount/capacityPools/volumes/snapshots"); + /** Static value Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots for CheckNameResourceTypes. */ + public static final CheckNameResourceTypes MICROSOFT_NET_APPNET_APP_ACCOUNTSCAPACITY_POOLSVOLUMESSNAPSHOTS = fromString("Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots"); /** * Creates or finds a CheckNameResourceTypes from its string representation. diff --git a/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/ExportPolicyRule.java b/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/ExportPolicyRule.java index bcc6314b5a3a2..f6a5bd24b62db 100644 --- a/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/ExportPolicyRule.java +++ b/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/ExportPolicyRule.java @@ -45,7 +45,8 @@ public class ExportPolicyRule { private Boolean nfsv3; /** - * Allows NFSv4 protocol. + * Deprecated: Will use the NFSv4.1 protocol, please use swagger version + * 2019-07-01 or later. */ @JsonProperty(value = "nfsv4") private Boolean nfsv4; @@ -158,7 +159,7 @@ public ExportPolicyRule withNfsv3(Boolean nfsv3) { } /** - * Get allows NFSv4 protocol. + * Get deprecated: Will use the NFSv4.1 protocol, please use swagger version 2019-07-01 or later. * * @return the nfsv4 value */ @@ -167,7 +168,7 @@ public Boolean nfsv4() { } /** - * Set allows NFSv4 protocol. + * Set deprecated: Will use the NFSv4.1 protocol, please use swagger version 2019-07-01 or later. * * @param nfsv4 the nfsv4 value to set * @return the ExportPolicyRule object itself. diff --git a/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/MountTargetList.java b/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/MountTargetList.java new file mode 100644 index 0000000000000..87566f10b1780 --- /dev/null +++ b/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/MountTargetList.java @@ -0,0 +1,45 @@ +/** + * 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.netapp.v2019_05_01; + +import java.util.List; +import com.microsoft.azure.management.netapp.v2019_05_01.implementation.MountTargetInner; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * List of Mount Targets. + */ +public class MountTargetList { + /** + * A list of Mount targets. + */ + @JsonProperty(value = "value") + private List value; + + /** + * Get a list of Mount targets. + * + * @return the value value + */ + public List value() { + return this.value; + } + + /** + * Set a list of Mount targets. + * + * @param value the value value to set + * @return the MountTargetList object itself. + */ + public MountTargetList withValue(List value) { + this.value = value; + return this; + } + +} diff --git a/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/ResourceNameAvailabilityRequest.java b/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/ResourceNameAvailabilityRequest.java index 1f37429642306..f27719b16f5ba 100644 --- a/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/ResourceNameAvailabilityRequest.java +++ b/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/ResourceNameAvailabilityRequest.java @@ -22,10 +22,10 @@ public class ResourceNameAvailabilityRequest { /** * Resource type used for verification. Possible values include: - * 'Microsoft.NetApp/netAppAccount', - * 'Microsoft.NetApp/netAppAccount/capacityPools', - * 'Microsoft.NetApp/netAppAccount/capacityPools/volumes', - * 'Microsoft.NetApp/netAppAccount/capacityPools/volumes/snapshots'. + * 'Microsoft.NetApp/netAppAccounts', + * 'Microsoft.NetApp/netAppAccounts/capacityPools', + * 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes', + * 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots'. */ @JsonProperty(value = "type", required = true) private CheckNameResourceTypes type; @@ -57,7 +57,7 @@ public ResourceNameAvailabilityRequest withName(String name) { } /** - * Get resource type used for verification. Possible values include: 'Microsoft.NetApp/netAppAccount', 'Microsoft.NetApp/netAppAccount/capacityPools', 'Microsoft.NetApp/netAppAccount/capacityPools/volumes', 'Microsoft.NetApp/netAppAccount/capacityPools/volumes/snapshots'. + * Get resource type used for verification. Possible values include: 'Microsoft.NetApp/netAppAccounts', 'Microsoft.NetApp/netAppAccounts/capacityPools', 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes', 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots'. * * @return the type value */ @@ -66,7 +66,7 @@ public CheckNameResourceTypes type() { } /** - * Set resource type used for verification. Possible values include: 'Microsoft.NetApp/netAppAccount', 'Microsoft.NetApp/netAppAccount/capacityPools', 'Microsoft.NetApp/netAppAccount/capacityPools/volumes', 'Microsoft.NetApp/netAppAccount/capacityPools/volumes/snapshots'. + * Set resource type used for verification. Possible values include: 'Microsoft.NetApp/netAppAccounts', 'Microsoft.NetApp/netAppAccounts/capacityPools', 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes', 'Microsoft.NetApp/netAppAccounts/capacityPools/volumes/snapshots'. * * @param type the type value to set * @return the ResourceNameAvailabilityRequest object itself. diff --git a/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/Volume.java b/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/Volume.java index a8223ca59f35f..5bfc83c96ea05 100644 --- a/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/Volume.java +++ b/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/Volume.java @@ -17,6 +17,7 @@ import com.microsoft.azure.arm.model.Creatable; import com.microsoft.azure.arm.resources.models.HasManager; import com.microsoft.azure.management.netapp.v2019_05_01.implementation.NetAppManager; +import java.util.List; import java.util.Map; /** @@ -53,11 +54,21 @@ public interface Volume extends HasInner, Indexable, Refreshable mountTargets(); + /** * @return the name value. */ String name(); + /** + * @return the protocolTypes value. + */ + List protocolTypes(); + /** * @return the provisioningState value. */ @@ -91,12 +102,12 @@ public interface Volume extends HasInner, Indexable, Refreshable mountTargets); } /** - * The stage of the volume definition allowing to specify SubnetId. + * The stage of the volume definition allowing to specify ProtocolTypes. */ - interface WithSubnetId { + interface WithProtocolTypes { /** - * Specifies subnetId. - * @param subnetId The Azure Resource URI for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes + * Specifies protocolTypes. + * @param protocolTypes Set of protocol types * @return the next definition stage */ - WithCreate withSubnetId(String subnetId); + WithCreate withProtocolTypes(List protocolTypes); } /** - * The stage of the volume definition allowing to specify Tags. + * The stage of the volume definition allowing to specify ServiceLevel. */ - interface WithTags { + interface WithServiceLevel { /** - * Specifies tags. - * @param tags the tags parameter value + * Specifies serviceLevel. + * @param serviceLevel The service level of the file system. Possible values include: 'Standard', 'Premium', 'Ultra' * @return the next definition stage */ - WithCreate withTags(Map tags); + WithCreate withServiceLevel(ServiceLevel serviceLevel); } /** - * The stage of the volume definition allowing to specify UsageThreshold. + * The stage of the volume definition allowing to specify SnapshotId. */ - interface WithUsageThreshold { + interface WithSnapshotId { /** - * Specifies usageThreshold. - * @param usageThreshold Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. Minimum size is 100 GiB. Upper limit is 100TiB + * Specifies snapshotId. + * @param snapshotId UUID v4 used to identify the Snapshot + * @return the next definition stage + */ + WithCreate withSnapshotId(String snapshotId); + } + + /** + * The stage of the volume definition allowing to specify Tags. + */ + interface WithTags { + /** + * Specifies tags. + * @param tags the tags parameter value * @return the next definition stage */ - WithCreate withUsageThreshold(Long usageThreshold); + WithCreate withTags(Map tags); } /** @@ -224,7 +259,7 @@ interface WithUsageThreshold { * the resource to be created (via {@link WithCreate#create()}), but also allows * for any other optional settings to be specified. */ - interface WithCreate extends Creatable, DefinitionStages.WithExportPolicy, DefinitionStages.WithSnapshotId, DefinitionStages.WithSubnetId, DefinitionStages.WithTags, DefinitionStages.WithUsageThreshold { + interface WithCreate extends Creatable, DefinitionStages.WithExportPolicy, DefinitionStages.WithMountTargets, DefinitionStages.WithProtocolTypes, DefinitionStages.WithServiceLevel, DefinitionStages.WithSnapshotId, DefinitionStages.WithTags { } } /** @@ -279,7 +314,7 @@ interface WithTags { interface WithUsageThreshold { /** * Specifies usageThreshold. - * @param usageThreshold Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. Minimum size is 100 GiB. Upper limit is 100TiB + * @param usageThreshold Maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. Minimum size is 100 GiB. Upper limit is 100TiB. Specified in bytes * @return the next update stage */ Update withUsageThreshold(Long usageThreshold); diff --git a/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/VolumePatch.java b/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/VolumePatch.java index b97653e1e7599..b775f5e1ce683 100644 --- a/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/VolumePatch.java +++ b/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/VolumePatch.java @@ -29,7 +29,7 @@ public class VolumePatch extends Resource { * usageThreshold. * Maximum storage quota allowed for a file system in bytes. This is a soft * quota used for alerting only. Minimum size is 100 GiB. Upper limit is - * 100TiB. + * 100TiB. Specified in bytes. */ @JsonProperty(value = "properties.usageThreshold") private Long usageThreshold; @@ -62,7 +62,7 @@ public VolumePatch withServiceLevel(ServiceLevel serviceLevel) { } /** - * Get maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. Minimum size is 100 GiB. Upper limit is 100TiB. + * Get maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. Minimum size is 100 GiB. Upper limit is 100TiB. Specified in bytes. * * @return the usageThreshold value */ @@ -71,7 +71,7 @@ public Long usageThreshold() { } /** - * Set maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. Minimum size is 100 GiB. Upper limit is 100TiB. + * Set maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. Minimum size is 100 GiB. Upper limit is 100TiB. Specified in bytes. * * @param usageThreshold the usageThreshold value to set * @return the VolumePatch object itself. diff --git a/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/implementation/AzureNetAppFilesManagementClientImpl.java b/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/implementation/AzureNetAppFilesManagementClientImpl.java index f6f4d8661fbdc..5cec34d1cccd8 100644 --- a/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/implementation/AzureNetAppFilesManagementClientImpl.java +++ b/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/implementation/AzureNetAppFilesManagementClientImpl.java @@ -19,6 +19,7 @@ import com.microsoft.rest.ServiceResponse; import java.io.IOException; import okhttp3.ResponseBody; +import retrofit2.http.Body; import retrofit2.http.Header; import retrofit2.http.Headers; import retrofit2.http.Path; @@ -293,11 +294,11 @@ private void initializeService() { interface AzureNetAppFilesManagementClientService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.netapp.v2019_05_01.AzureNetAppFilesManagementClient checkNameAvailability" }) @POST("subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkNameAvailability") - Observable> checkNameAvailability(@Path("subscriptionId") String subscriptionId, @Path("location") String location, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> checkNameAvailability(@Path("subscriptionId") String subscriptionId, @Path("location") String location, @Body Object body, @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.netapp.v2019_05_01.AzureNetAppFilesManagementClient checkFilePathAvailability" }) @POST("subscriptions/{subscriptionId}/providers/Microsoft.NetApp/locations/{location}/checkFilePathAvailability") - Observable> checkFilePathAvailability(@Path("subscriptionId") String subscriptionId, @Path("location") String location, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> checkFilePathAvailability(@Path("subscriptionId") String subscriptionId, @Path("location") String location, @Body Object body, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); } @@ -306,13 +307,14 @@ interface AzureNetAppFilesManagementClientService { * Check if a resource name is available. * * @param location The location + * @param body Name availability request. * @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 ResourceNameAvailabilityInner object if successful. */ - public ResourceNameAvailabilityInner checkNameAvailability(String location) { - return checkNameAvailabilityWithServiceResponseAsync(location).toBlocking().single().body(); + public ResourceNameAvailabilityInner checkNameAvailability(String location, Object body) { + return checkNameAvailabilityWithServiceResponseAsync(location, body).toBlocking().single().body(); } /** @@ -320,12 +322,13 @@ public ResourceNameAvailabilityInner checkNameAvailability(String location) { * Check if a resource name is available. * * @param location The location + * @param body Name availability request. * @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 checkNameAvailabilityAsync(String location, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(checkNameAvailabilityWithServiceResponseAsync(location), serviceCallback); + public ServiceFuture checkNameAvailabilityAsync(String location, Object body, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkNameAvailabilityWithServiceResponseAsync(location, body), serviceCallback); } /** @@ -333,11 +336,12 @@ public ServiceFuture checkNameAvailabilityAsync(S * Check if a resource name is available. * * @param location The location + * @param body Name availability request. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ResourceNameAvailabilityInner object */ - public Observable checkNameAvailabilityAsync(String location) { - return checkNameAvailabilityWithServiceResponseAsync(location).map(new Func1, ResourceNameAvailabilityInner>() { + public Observable checkNameAvailabilityAsync(String location, Object body) { + return checkNameAvailabilityWithServiceResponseAsync(location, body).map(new Func1, ResourceNameAvailabilityInner>() { @Override public ResourceNameAvailabilityInner call(ServiceResponse response) { return response.body(); @@ -350,20 +354,24 @@ public ResourceNameAvailabilityInner call(ServiceResponse> checkNameAvailabilityWithServiceResponseAsync(String location) { + public Observable> checkNameAvailabilityWithServiceResponseAsync(String location, Object body) { if (this.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); } if (location == null) { throw new IllegalArgumentException("Parameter location is required and cannot be null."); } + if (body == null) { + throw new IllegalArgumentException("Parameter body is required and cannot be null."); + } if (this.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.apiVersion() is required and cannot be null."); } - return service.checkNameAvailability(this.subscriptionId(), location, this.apiVersion(), this.acceptLanguage(), this.userAgent()) + return service.checkNameAvailability(this.subscriptionId(), location, body, this.apiVersion(), this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -389,13 +397,14 @@ private ServiceResponse checkNameAvailabilityDele * Check if a file path is available. * * @param location The location + * @param body File path availability request. * @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 ResourceNameAvailabilityInner object if successful. */ - public ResourceNameAvailabilityInner checkFilePathAvailability(String location) { - return checkFilePathAvailabilityWithServiceResponseAsync(location).toBlocking().single().body(); + public ResourceNameAvailabilityInner checkFilePathAvailability(String location, Object body) { + return checkFilePathAvailabilityWithServiceResponseAsync(location, body).toBlocking().single().body(); } /** @@ -403,12 +412,13 @@ public ResourceNameAvailabilityInner checkFilePathAvailability(String location) * Check if a file path is available. * * @param location The location + * @param body File path availability request. * @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 checkFilePathAvailabilityAsync(String location, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(checkFilePathAvailabilityWithServiceResponseAsync(location), serviceCallback); + public ServiceFuture checkFilePathAvailabilityAsync(String location, Object body, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(checkFilePathAvailabilityWithServiceResponseAsync(location, body), serviceCallback); } /** @@ -416,11 +426,12 @@ public ServiceFuture checkFilePathAvailabilityAsy * Check if a file path is available. * * @param location The location + * @param body File path availability request. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ResourceNameAvailabilityInner object */ - public Observable checkFilePathAvailabilityAsync(String location) { - return checkFilePathAvailabilityWithServiceResponseAsync(location).map(new Func1, ResourceNameAvailabilityInner>() { + public Observable checkFilePathAvailabilityAsync(String location, Object body) { + return checkFilePathAvailabilityWithServiceResponseAsync(location, body).map(new Func1, ResourceNameAvailabilityInner>() { @Override public ResourceNameAvailabilityInner call(ServiceResponse response) { return response.body(); @@ -433,20 +444,24 @@ public ResourceNameAvailabilityInner call(ServiceResponse> checkFilePathAvailabilityWithServiceResponseAsync(String location) { + public Observable> checkFilePathAvailabilityWithServiceResponseAsync(String location, Object body) { if (this.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.subscriptionId() is required and cannot be null."); } if (location == null) { throw new IllegalArgumentException("Parameter location is required and cannot be null."); } + if (body == null) { + throw new IllegalArgumentException("Parameter body is required and cannot be null."); + } if (this.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.apiVersion() is required and cannot be null."); } - return service.checkFilePathAvailability(this.subscriptionId(), location, this.apiVersion(), this.acceptLanguage(), this.userAgent()) + return service.checkFilePathAvailability(this.subscriptionId(), location, body, this.apiVersion(), this.acceptLanguage(), this.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { diff --git a/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/implementation/CapacityPoolImpl.java b/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/implementation/CapacityPoolImpl.java index 007245a85f1a4..51a2a9b544a1a 100644 --- a/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/implementation/CapacityPoolImpl.java +++ b/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/implementation/CapacityPoolImpl.java @@ -124,7 +124,7 @@ public ServiceLevel serviceLevel() { } @Override - public Long size() { + public long size() { return this.inner().size(); } @@ -152,21 +152,23 @@ public CapacityPoolImpl withLocation(String location) { } @Override - public CapacityPoolImpl withServiceLevel(ServiceLevel serviceLevel) { - if (isInCreateMode()) { - this.inner().withServiceLevel(serviceLevel); - } else { - this.updateParameter.withServiceLevel(serviceLevel); - } + public CapacityPoolImpl withSize(long size) { + this.inner().withSize(size); return this; } @Override public CapacityPoolImpl withSize(Long size) { + this.updateParameter.withSize(size); + return this; + } + + @Override + public CapacityPoolImpl withServiceLevel(ServiceLevel serviceLevel) { if (isInCreateMode()) { - this.inner().withSize(size); + this.inner().withServiceLevel(serviceLevel); } else { - this.updateParameter.withSize(size); + this.updateParameter.withServiceLevel(serviceLevel); } return this; } diff --git a/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/implementation/CapacityPoolInner.java b/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/implementation/CapacityPoolInner.java index 0636c52686d42..9705acf167b88 100644 --- a/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/implementation/CapacityPoolInner.java +++ b/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/implementation/CapacityPoolInner.java @@ -30,15 +30,15 @@ public class CapacityPoolInner extends Resource { * Provisioned size of the pool (in bytes). Allowed values are in 4TiB * chunks (value must be multiply of 4398046511104). */ - @JsonProperty(value = "properties.size") - private Long size; + @JsonProperty(value = "properties.size", required = true) + private long size; /** * serviceLevel. * The service level of the file system. Possible values include: * 'Standard', 'Premium', 'Ultra'. */ - @JsonProperty(value = "properties.serviceLevel") + @JsonProperty(value = "properties.serviceLevel", required = true) private ServiceLevel serviceLevel; /** @@ -61,7 +61,7 @@ public String poolId() { * * @return the size value */ - public Long size() { + public long size() { return this.size; } @@ -71,7 +71,7 @@ public Long size() { * @param size the size value to set * @return the CapacityPoolInner object itself. */ - public CapacityPoolInner withSize(Long size) { + public CapacityPoolInner withSize(long size) { this.size = size; return this; } diff --git a/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/implementation/PoolsImpl.java b/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/implementation/PoolsImpl.java index e0b61474d43ea..12ef63e6b780e 100644 --- a/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/implementation/PoolsImpl.java +++ b/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/implementation/PoolsImpl.java @@ -64,10 +64,14 @@ public CapacityPool call(CapacityPoolInner inner) { public Observable getAsync(String resourceGroupName, String accountName, String poolName) { PoolsInner client = this.inner(); return client.getAsync(resourceGroupName, accountName, poolName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public CapacityPool call(CapacityPoolInner inner) { - return wrapModel(inner); + public Observable call(CapacityPoolInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((CapacityPool)wrapModel(inner)); + } } }); } diff --git a/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/implementation/SnapshotsImpl.java b/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/implementation/SnapshotsImpl.java index e9b2de00d3d87..d4d917d8f1977 100644 --- a/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/implementation/SnapshotsImpl.java +++ b/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/implementation/SnapshotsImpl.java @@ -64,10 +64,14 @@ public Snapshot call(SnapshotInner inner) { public Observable getAsync(String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName) { SnapshotsInner client = this.inner(); return client.getAsync(resourceGroupName, accountName, poolName, volumeName, snapshotName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public Snapshot call(SnapshotInner inner) { - return wrapModel(inner); + public Observable call(SnapshotInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((Snapshot)wrapModel(inner)); + } } }); } diff --git a/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/implementation/VolumeImpl.java b/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/implementation/VolumeImpl.java index 359062eed9af6..a3fd34066c1b2 100644 --- a/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/implementation/VolumeImpl.java +++ b/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/implementation/VolumeImpl.java @@ -14,6 +14,8 @@ import com.microsoft.azure.management.netapp.v2019_05_01.VolumePatch; import com.microsoft.azure.management.netapp.v2019_05_01.ServiceLevel; import com.microsoft.azure.management.netapp.v2019_05_01.VolumePropertiesExportPolicy; +import java.util.List; +import com.microsoft.azure.management.netapp.v2019_05_01.MountTargetList; import java.util.Map; import com.microsoft.azure.management.netapp.v2019_05_01.VolumePatchPropertiesExportPolicy; import rx.functions.Func1; @@ -127,11 +129,21 @@ public String location() { return this.inner().location(); } + @Override + public List mountTargets() { + return this.inner().mountTargets(); + } + @Override public String name() { return this.inner().name(); } + @Override + public List protocolTypes() { + return this.inner().protocolTypes(); + } + @Override public String provisioningState() { return this.inner().provisioningState(); @@ -163,7 +175,7 @@ public String type() { } @Override - public Long usageThreshold() { + public long usageThreshold() { return this.inner().usageThreshold(); } @@ -187,6 +199,18 @@ public VolumeImpl withLocation(String location) { return this; } + @Override + public VolumeImpl withSubnetId(String subnetId) { + this.inner().withSubnetId(subnetId); + return this; + } + + @Override + public VolumeImpl withUsageThreshold(long usageThreshold) { + this.inner().withUsageThreshold(usageThreshold); + return this; + } + @Override public VolumeImpl withExportPolicy(VolumePropertiesExportPolicy exportPolicy) { this.inner().withExportPolicy(exportPolicy); @@ -194,14 +218,20 @@ public VolumeImpl withExportPolicy(VolumePropertiesExportPolicy exportPolicy) { } @Override - public VolumeImpl withSnapshotId(String snapshotId) { - this.inner().withSnapshotId(snapshotId); + public VolumeImpl withMountTargets(List mountTargets) { + this.inner().withMountTargets(mountTargets); return this; } @Override - public VolumeImpl withSubnetId(String subnetId) { - this.inner().withSubnetId(subnetId); + public VolumeImpl withProtocolTypes(List protocolTypes) { + this.inner().withProtocolTypes(protocolTypes); + return this; + } + + @Override + public VolumeImpl withSnapshotId(String snapshotId) { + this.inner().withSnapshotId(snapshotId); return this; } @@ -211,6 +241,12 @@ public VolumeImpl withExportPolicy(VolumePatchPropertiesExportPolicy exportPolic return this; } + @Override + public VolumeImpl withUsageThreshold(Long usageThreshold) { + this.updateParameter.withUsageThreshold(usageThreshold); + return this; + } + @Override public VolumeImpl withServiceLevel(ServiceLevel serviceLevel) { if (isInCreateMode()) { @@ -231,14 +267,4 @@ public VolumeImpl withTags(Map tags) { return this; } - @Override - public VolumeImpl withUsageThreshold(Long usageThreshold) { - if (isInCreateMode()) { - this.inner().withUsageThreshold(usageThreshold); - } else { - this.updateParameter.withUsageThreshold(usageThreshold); - } - return this; - } - } diff --git a/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/implementation/VolumeInner.java b/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/implementation/VolumeInner.java index 41ec3c5bb38fc..54300962a5f0d 100644 --- a/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/implementation/VolumeInner.java +++ b/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/implementation/VolumeInner.java @@ -10,6 +10,8 @@ import com.microsoft.azure.management.netapp.v2019_05_01.ServiceLevel; import com.microsoft.azure.management.netapp.v2019_05_01.VolumePropertiesExportPolicy; +import java.util.List; +import com.microsoft.azure.management.netapp.v2019_05_01.MountTargetList; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.Resource; @@ -38,17 +40,17 @@ public class VolumeInner extends Resource { * The service level of the file system. Possible values include: * 'Standard', 'Premium', 'Ultra'. */ - @JsonProperty(value = "properties.serviceLevel", required = true) + @JsonProperty(value = "properties.serviceLevel") private ServiceLevel serviceLevel; /** * usageThreshold. * Maximum storage quota allowed for a file system in bytes. This is a soft * quota used for alerting only. Minimum size is 100 GiB. Upper limit is - * 100TiB. + * 100TiB. Specified in bytes. */ - @JsonProperty(value = "properties.usageThreshold") - private Long usageThreshold; + @JsonProperty(value = "properties.usageThreshold", required = true) + private long usageThreshold; /** * exportPolicy. @@ -57,6 +59,13 @@ public class VolumeInner extends Resource { @JsonProperty(value = "properties.exportPolicy") private VolumePropertiesExportPolicy exportPolicy; + /** + * protocolTypes. + * Set of protocol types. + */ + @JsonProperty(value = "properties.protocolTypes") + private List protocolTypes; + /** * Azure lifecycle management. */ @@ -81,9 +90,16 @@ public class VolumeInner extends Resource { * The Azure Resource URI for a delegated subnet. Must have the delegation * Microsoft.NetApp/volumes. */ - @JsonProperty(value = "properties.subnetId") + @JsonProperty(value = "properties.subnetId", required = true) private String subnetId; + /** + * mountTargets. + * List of mount targets. + */ + @JsonProperty(value = "properties.mountTargets") + private List mountTargets; + /** * Get unique FileSystem Identifier. * @@ -134,21 +150,21 @@ public VolumeInner withServiceLevel(ServiceLevel serviceLevel) { } /** - * Get maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. Minimum size is 100 GiB. Upper limit is 100TiB. + * Get maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. Minimum size is 100 GiB. Upper limit is 100TiB. Specified in bytes. * * @return the usageThreshold value */ - public Long usageThreshold() { + public long usageThreshold() { return this.usageThreshold; } /** - * Set maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. Minimum size is 100 GiB. Upper limit is 100TiB. + * Set maximum storage quota allowed for a file system in bytes. This is a soft quota used for alerting only. Minimum size is 100 GiB. Upper limit is 100TiB. Specified in bytes. * * @param usageThreshold the usageThreshold value to set * @return the VolumeInner object itself. */ - public VolumeInner withUsageThreshold(Long usageThreshold) { + public VolumeInner withUsageThreshold(long usageThreshold) { this.usageThreshold = usageThreshold; return this; } @@ -173,6 +189,26 @@ public VolumeInner withExportPolicy(VolumePropertiesExportPolicy exportPolicy) { return this; } + /** + * Get set of protocol types. + * + * @return the protocolTypes value + */ + public List protocolTypes() { + return this.protocolTypes; + } + + /** + * Set set of protocol types. + * + * @param protocolTypes the protocolTypes value to set + * @return the VolumeInner object itself. + */ + public VolumeInner withProtocolTypes(List protocolTypes) { + this.protocolTypes = protocolTypes; + return this; + } + /** * Get azure lifecycle management. * @@ -231,4 +267,24 @@ public VolumeInner withSubnetId(String subnetId) { return this; } + /** + * Get list of mount targets. + * + * @return the mountTargets value + */ + public List mountTargets() { + return this.mountTargets; + } + + /** + * Set list of mount targets. + * + * @param mountTargets the mountTargets value to set + * @return the VolumeInner object itself. + */ + public VolumeInner withMountTargets(List mountTargets) { + this.mountTargets = mountTargets; + return this; + } + } diff --git a/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/implementation/VolumesImpl.java b/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/implementation/VolumesImpl.java index ece980891f264..c87525bcaa1aa 100644 --- a/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/implementation/VolumesImpl.java +++ b/sdk/netapp/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/netapp/v2019_05_01/implementation/VolumesImpl.java @@ -64,10 +64,14 @@ public Volume call(VolumeInner inner) { public Observable getAsync(String resourceGroupName, String accountName, String poolName, String volumeName) { VolumesInner client = this.inner(); return client.getAsync(resourceGroupName, accountName, poolName, volumeName) - .map(new Func1() { + .flatMap(new Func1>() { @Override - public Volume call(VolumeInner inner) { - return wrapModel(inner); + public Observable call(VolumeInner inner) { + if (inner == null) { + return Observable.empty(); + } else { + return Observable.just((Volume)wrapModel(inner)); + } } }); }