diff --git a/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/ActiveApplications.java b/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/ActiveApplications.java deleted file mode 100644 index 0b0d21cd0539..000000000000 --- a/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/ActiveApplications.java +++ /dev/null @@ -1,30 +0,0 @@ -/** - * 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.desktopvirtualization.v2019_12_10_preview; - -import rx.Observable; -import com.microsoft.azure.management.desktopvirtualization.v2019_12_10_preview.implementation.ActiveApplicationsInner; -import com.microsoft.azure.arm.model.HasInner; - -/** - * Type representing ActiveApplications. - */ -public interface ActiveApplications extends HasInner { - /** - * List applications for the given session host. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group - * @param sessionHostName The name of the session host within the specified host pool - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - Observable listBySessionHostAsync(final String resourceGroupName, final String hostPoolName, final String sessionHostName); - -} diff --git a/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/ApplicationGroupApplication.java b/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/Application.java similarity index 74% rename from sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/ApplicationGroupApplication.java rename to sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/Application.java index fa0d8936bb57..8b0ff322edd3 100644 --- a/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/ApplicationGroupApplication.java +++ b/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/Application.java @@ -20,9 +20,9 @@ import java.util.Map; /** - * Type representing ApplicationGroupApplication. + * Type representing Application. */ -public interface ApplicationGroupApplication extends HasInner, Indexable, Refreshable, Updatable, HasManager { +public interface Application extends HasInner, Indexable, Refreshable, Updatable, HasManager { /** * @return the commandLineArguments value. */ @@ -89,23 +89,23 @@ public interface ApplicationGroupApplication extends HasInner, String type(); /** - * The entirety of the ApplicationGroupApplication definition. + * The entirety of the Application definition. */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithApplicationGroup, DefinitionStages.WithCommandLineSetting, DefinitionStages.WithCreate { } /** - * Grouping of ApplicationGroupApplication definition stages. + * Grouping of Application definition stages. */ interface DefinitionStages { /** - * The first stage of a ApplicationGroupApplication definition. + * The first stage of a Application definition. */ interface Blank extends WithApplicationGroup { } /** - * The stage of the applicationgroupapplication definition allowing to specify ApplicationGroup. + * The stage of the application definition allowing to specify ApplicationGroup. */ interface WithApplicationGroup { /** @@ -118,7 +118,7 @@ interface WithApplicationGroup { } /** - * The stage of the applicationgroupapplication definition allowing to specify CommandLineSetting. + * The stage of the application definition allowing to specify CommandLineSetting. */ interface WithCommandLineSetting { /** @@ -130,7 +130,7 @@ interface WithCommandLineSetting { } /** - * The stage of the applicationgroupapplication definition allowing to specify CommandLineArguments. + * The stage of the application definition allowing to specify CommandLineArguments. */ interface WithCommandLineArguments { /** @@ -142,7 +142,7 @@ interface WithCommandLineArguments { } /** - * The stage of the applicationgroupapplication definition allowing to specify Description. + * The stage of the application definition allowing to specify Description. */ interface WithDescription { /** @@ -154,7 +154,7 @@ interface WithDescription { } /** - * The stage of the applicationgroupapplication definition allowing to specify FilePath. + * The stage of the application definition allowing to specify FilePath. */ interface WithFilePath { /** @@ -166,7 +166,7 @@ interface WithFilePath { } /** - * The stage of the applicationgroupapplication definition allowing to specify FriendlyName. + * The stage of the application definition allowing to specify FriendlyName. */ interface WithFriendlyName { /** @@ -178,7 +178,7 @@ interface WithFriendlyName { } /** - * The stage of the applicationgroupapplication definition allowing to specify IconIndex. + * The stage of the application definition allowing to specify IconIndex. */ interface WithIconIndex { /** @@ -190,7 +190,7 @@ interface WithIconIndex { } /** - * The stage of the applicationgroupapplication definition allowing to specify IconPath. + * The stage of the application definition allowing to specify IconPath. */ interface WithIconPath { /** @@ -202,7 +202,7 @@ interface WithIconPath { } /** - * The stage of the applicationgroupapplication definition allowing to specify ShowInPortal. + * The stage of the application definition allowing to specify ShowInPortal. */ interface WithShowInPortal { /** @@ -218,21 +218,21 @@ interface WithShowInPortal { * 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.WithCommandLineArguments, DefinitionStages.WithDescription, DefinitionStages.WithFilePath, DefinitionStages.WithFriendlyName, DefinitionStages.WithIconIndex, DefinitionStages.WithIconPath, DefinitionStages.WithShowInPortal { + interface WithCreate extends Creatable, DefinitionStages.WithCommandLineArguments, DefinitionStages.WithDescription, DefinitionStages.WithFilePath, DefinitionStages.WithFriendlyName, DefinitionStages.WithIconIndex, DefinitionStages.WithIconPath, DefinitionStages.WithShowInPortal { } } /** - * The template for a ApplicationGroupApplication update operation, containing all the settings that can be modified. + * The template for a Application update operation, containing all the settings that can be modified. */ - interface Update extends Appliable, UpdateStages.WithCommandLineArguments, UpdateStages.WithCommandLineSetting, UpdateStages.WithDescription, UpdateStages.WithFilePath, UpdateStages.WithFriendlyName, UpdateStages.WithIconIndex, UpdateStages.WithIconPath, UpdateStages.WithShowInPortal, UpdateStages.WithTags { + interface Update extends Appliable, UpdateStages.WithCommandLineArguments, UpdateStages.WithCommandLineSetting, UpdateStages.WithDescription, UpdateStages.WithFilePath, UpdateStages.WithFriendlyName, UpdateStages.WithIconIndex, UpdateStages.WithIconPath, UpdateStages.WithShowInPortal, UpdateStages.WithTags { } /** - * Grouping of ApplicationGroupApplication update stages. + * Grouping of Application update stages. */ interface UpdateStages { /** - * The stage of the applicationgroupapplication update allowing to specify CommandLineArguments. + * The stage of the application update allowing to specify CommandLineArguments. */ interface WithCommandLineArguments { /** @@ -244,7 +244,7 @@ interface WithCommandLineArguments { } /** - * The stage of the applicationgroupapplication update allowing to specify CommandLineSetting. + * The stage of the application update allowing to specify CommandLineSetting. */ interface WithCommandLineSetting { /** @@ -256,7 +256,7 @@ interface WithCommandLineSetting { } /** - * The stage of the applicationgroupapplication update allowing to specify Description. + * The stage of the application update allowing to specify Description. */ interface WithDescription { /** @@ -268,7 +268,7 @@ interface WithDescription { } /** - * The stage of the applicationgroupapplication update allowing to specify FilePath. + * The stage of the application update allowing to specify FilePath. */ interface WithFilePath { /** @@ -280,7 +280,7 @@ interface WithFilePath { } /** - * The stage of the applicationgroupapplication update allowing to specify FriendlyName. + * The stage of the application update allowing to specify FriendlyName. */ interface WithFriendlyName { /** @@ -292,7 +292,7 @@ interface WithFriendlyName { } /** - * The stage of the applicationgroupapplication update allowing to specify IconIndex. + * The stage of the application update allowing to specify IconIndex. */ interface WithIconIndex { /** @@ -304,7 +304,7 @@ interface WithIconIndex { } /** - * The stage of the applicationgroupapplication update allowing to specify IconPath. + * The stage of the application update allowing to specify IconPath. */ interface WithIconPath { /** @@ -316,7 +316,7 @@ interface WithIconPath { } /** - * The stage of the applicationgroupapplication update allowing to specify ShowInPortal. + * The stage of the application update allowing to specify ShowInPortal. */ interface WithShowInPortal { /** @@ -328,7 +328,7 @@ interface WithShowInPortal { } /** - * The stage of the applicationgroupapplication update allowing to specify Tags. + * The stage of the application update allowing to specify Tags. */ interface WithTags { /** diff --git a/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/ApplicationGroupAssignments.java b/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/ApplicationGroupAssignments.java deleted file mode 100644 index b2b74b4679eb..000000000000 --- a/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/ApplicationGroupAssignments.java +++ /dev/null @@ -1,29 +0,0 @@ -/** - * 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.desktopvirtualization.v2019_12_10_preview; - -import rx.Observable; -import com.microsoft.azure.management.desktopvirtualization.v2019_12_10_preview.implementation.ApplicationGroupAssignmentsInner; -import com.microsoft.azure.arm.model.HasInner; - -/** - * Type representing ApplicationGroupAssignments. - */ -public interface ApplicationGroupAssignments extends HasInner { - /** - * List application group that user can use. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - Observable workspaceLevelListAsync(final String resourceGroupName, final String workspaceName); - -} diff --git a/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/Applications.java b/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/Applications.java index 0a574eaac480..3895260b0505 100644 --- a/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/Applications.java +++ b/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/Applications.java @@ -17,7 +17,7 @@ /** * Type representing Applications. */ -public interface Applications extends SupportsCreating, HasInner { +public interface Applications extends SupportsCreating, HasInner { /** * Get an application. * @@ -27,7 +27,7 @@ public interface Applications extends SupportsCreating getAsync(String resourceGroupName, String applicationGroupName, String applicationName); + Observable getAsync(String resourceGroupName, String applicationGroupName, String applicationName); /** * List applications. @@ -37,7 +37,7 @@ public interface Applications extends SupportsCreating listAsync(final String resourceGroupName, final String applicationGroupName); + Observable listAsync(final String resourceGroupName, final String applicationGroupName); /** * Remove an application. diff --git a/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/HostPool.java b/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/HostPool.java index 8e1a21d4cde8..ca3046a2b6e1 100644 --- a/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/HostPool.java +++ b/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/HostPool.java @@ -65,6 +65,11 @@ public interface HostPool extends HasInner, Resource, GroupableRe */ PersonalDesktopAssignmentType personalDesktopAssignmentType(); + /** + * @return the preferredAppGroupType value. + */ + PreferredAppGroupType preferredAppGroupType(); + /** * @return the registrationInfo value. */ @@ -93,7 +98,7 @@ public interface HostPool extends HasInner, Resource, GroupableRe /** * The entirety of the HostPool definition. */ - interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithHostPoolType, DefinitionStages.WithLoadBalancerType, DefinitionStages.WithPersonalDesktopAssignmentType, DefinitionStages.WithCreate { + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, DefinitionStages.WithHostPoolType, DefinitionStages.WithLoadBalancerType, DefinitionStages.WithPersonalDesktopAssignmentType, DefinitionStages.WithPreferredAppGroupType, DefinitionStages.WithCreate { } /** @@ -145,7 +150,19 @@ interface WithPersonalDesktopAssignmentType { * @param personalDesktopAssignmentType PersonalDesktopAssignment type for HostPool. Possible values include: 'Automatic', 'Direct' * @return the next definition stage */ - WithCreate withPersonalDesktopAssignmentType(PersonalDesktopAssignmentType personalDesktopAssignmentType); + WithPreferredAppGroupType withPersonalDesktopAssignmentType(PersonalDesktopAssignmentType personalDesktopAssignmentType); + } + + /** + * The stage of the hostpool definition allowing to specify PreferredAppGroupType. + */ + interface WithPreferredAppGroupType { + /** + * Specifies preferredAppGroupType. + * @param preferredAppGroupType The type of preferred application group type, default to Desktop Application Group. Possible values include: 'None', 'Desktop', 'RailApplications' + * @return the next definition stage +*/ + WithCreate withPreferredAppGroupType(PreferredAppGroupType preferredAppGroupType); } /** @@ -267,7 +284,7 @@ interface WithCreate extends Creatable, Resource.DefinitionWithTags, Resource.UpdateWithTags, UpdateStages.WithCustomRdpProperty, UpdateStages.WithDescription, UpdateStages.WithFriendlyName, UpdateStages.WithLoadBalancerType, UpdateStages.WithMaxSessionLimit, UpdateStages.WithPersonalDesktopAssignmentType, UpdateStages.WithRegistrationInfo, UpdateStages.WithRing, UpdateStages.WithSsoContext, UpdateStages.WithValidationEnvironment { + interface Update extends Appliable, Resource.UpdateWithTags, UpdateStages.WithCustomRdpProperty, UpdateStages.WithDescription, UpdateStages.WithFriendlyName, UpdateStages.WithLoadBalancerType, UpdateStages.WithMaxSessionLimit, UpdateStages.WithPersonalDesktopAssignmentType, UpdateStages.WithPreferredAppGroupType, UpdateStages.WithRegistrationInfo, UpdateStages.WithRing, UpdateStages.WithSsoContext, UpdateStages.WithValidationEnvironment { } /** @@ -346,6 +363,18 @@ interface WithPersonalDesktopAssignmentType { Update withPersonalDesktopAssignmentType(PersonalDesktopAssignmentType personalDesktopAssignmentType); } + /** + * The stage of the hostpool update allowing to specify PreferredAppGroupType. + */ + interface WithPreferredAppGroupType { + /** + * Specifies preferredAppGroupType. + * @param preferredAppGroupType The type of preferred application group type, default to Desktop Application Group. Possible values include: 'None', 'Desktop', 'RailApplications' + * @return the next update stage + */ + Update withPreferredAppGroupType(PreferredAppGroupType preferredAppGroupType); + } + /** * The stage of the hostpool update allowing to specify RegistrationInfo. */ diff --git a/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/HostPoolApplication.java b/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/HostPoolApplication.java deleted file mode 100644 index 4d2d83a4dd70..000000000000 --- a/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/HostPoolApplication.java +++ /dev/null @@ -1,85 +0,0 @@ -/** - * 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.desktopvirtualization.v2019_12_10_preview; - -import com.microsoft.azure.arm.model.HasInner; -import com.microsoft.azure.management.desktopvirtualization.v2019_12_10_preview.implementation.ApplicationInner; -import com.microsoft.azure.arm.resources.models.HasManager; -import com.microsoft.azure.management.desktopvirtualization.v2019_12_10_preview.implementation.DesktopVirtualizationManager; - -/** - * Type representing HostPoolApplication. - */ -public interface HostPoolApplication extends HasInner, HasManager { - /** - * @return the commandLineArguments value. - */ - String commandLineArguments(); - - /** - * @return the commandLineSetting value. - */ - CommandLineSetting commandLineSetting(); - - /** - * @return the description value. - */ - String description(); - - /** - * @return the filePath value. - */ - String filePath(); - - /** - * @return the friendlyName value. - */ - String friendlyName(); - - /** - * @return the iconContent value. - */ - byte[] iconContent(); - - /** - * @return the iconHash value. - */ - String iconHash(); - - /** - * @return the iconIndex value. - */ - Integer iconIndex(); - - /** - * @return the iconPath value. - */ - String iconPath(); - - /** - * @return the id value. - */ - String id(); - - /** - * @return the name value. - */ - String name(); - - /** - * @return the showInPortal value. - */ - Boolean showInPortal(); - - /** - * @return the type value. - */ - String type(); - -} diff --git a/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/HostPoolPatch.java b/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/HostPoolPatch.java index 899dc9d58696..d63d8623b53c 100644 --- a/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/HostPoolPatch.java +++ b/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/HostPoolPatch.java @@ -86,6 +86,14 @@ public class HostPoolPatch extends ProxyResource { @JsonProperty(value = "properties.ssoContext") private String ssoContext; + /** + * The type of preferred application group type, default to Desktop + * Application Group. Possible values include: 'None', 'Desktop', + * 'RailApplications'. + */ + @JsonProperty(value = "properties.preferredAppGroupType") + private PreferredAppGroupType preferredAppGroupType; + /** * Get tags to be updated. * @@ -306,4 +314,24 @@ public HostPoolPatch withSsoContext(String ssoContext) { return this; } + /** + * Get the type of preferred application group type, default to Desktop Application Group. Possible values include: 'None', 'Desktop', 'RailApplications'. + * + * @return the preferredAppGroupType value + */ + public PreferredAppGroupType preferredAppGroupType() { + return this.preferredAppGroupType; + } + + /** + * Set the type of preferred application group type, default to Desktop Application Group. Possible values include: 'None', 'Desktop', 'RailApplications'. + * + * @param preferredAppGroupType the preferredAppGroupType value to set + * @return the HostPoolPatch object itself. + */ + public HostPoolPatch withPreferredAppGroupType(PreferredAppGroupType preferredAppGroupType) { + this.preferredAppGroupType = preferredAppGroupType; + return this; + } + } diff --git a/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/PreferredAppGroupType.java b/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/PreferredAppGroupType.java new file mode 100644 index 000000000000..e14ca1836712 --- /dev/null +++ b/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/PreferredAppGroupType.java @@ -0,0 +1,44 @@ +/** + * 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.desktopvirtualization.v2019_12_10_preview; + +import java.util.Collection; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +/** + * Defines values for PreferredAppGroupType. + */ +public final class PreferredAppGroupType extends ExpandableStringEnum { + /** Static value None for PreferredAppGroupType. */ + public static final PreferredAppGroupType NONE = fromString("None"); + + /** Static value Desktop for PreferredAppGroupType. */ + public static final PreferredAppGroupType DESKTOP = fromString("Desktop"); + + /** Static value RailApplications for PreferredAppGroupType. */ + public static final PreferredAppGroupType RAIL_APPLICATIONS = fromString("RailApplications"); + + /** + * Creates or finds a PreferredAppGroupType from its string representation. + * @param name a name to look for + * @return the corresponding PreferredAppGroupType + */ + @JsonCreator + public static PreferredAppGroupType fromString(String name) { + return fromString(name, PreferredAppGroupType.class); + } + + /** + * @return known PreferredAppGroupType values + */ + public static Collection values() { + return values(PreferredAppGroupType.class); + } +} diff --git a/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/SessionHost.java b/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/SessionHost.java index a3b79dea2efb..2e2891d1484a 100644 --- a/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/SessionHost.java +++ b/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/SessionHost.java @@ -97,6 +97,11 @@ public interface SessionHost extends HasInner, Indexable, Refr */ UpdateState updateState(); + /** + * @return the virtualMachineId value. + */ + String virtualMachineId(); + /** * The template for a SessionHost update operation, containing all the settings that can be modified. */ diff --git a/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/WorkspaceApplicationGroup.java b/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/WorkspaceApplicationGroup.java deleted file mode 100644 index 1a3a8d2c17e4..000000000000 --- a/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/WorkspaceApplicationGroup.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * 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.desktopvirtualization.v2019_12_10_preview; - -import com.microsoft.azure.arm.model.HasInner; -import com.microsoft.azure.management.desktopvirtualization.v2019_12_10_preview.implementation.ApplicationGroupInner; -import com.microsoft.azure.arm.resources.models.HasManager; -import com.microsoft.azure.management.desktopvirtualization.v2019_12_10_preview.implementation.DesktopVirtualizationManager; -import java.util.Map; - -/** - * Type representing WorkspaceApplicationGroup. - */ -public interface WorkspaceApplicationGroup extends HasInner, HasManager { - /** - * @return the applicationGroupType value. - */ - ApplicationGroupType applicationGroupType(); - - /** - * @return the description value. - */ - String description(); - - /** - * @return the friendlyName value. - */ - String friendlyName(); - - /** - * @return the hostPoolArmPath value. - */ - String hostPoolArmPath(); - - /** - * @return the id value. - */ - String id(); - - /** - * @return the location value. - */ - String location(); - - /** - * @return the name value. - */ - String name(); - - /** - * @return the tags value. - */ - Map tags(); - - /** - * @return the type value. - */ - String type(); - - /** - * @return the workspaceArmPath value. - */ - String workspaceArmPath(); - -} diff --git a/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/ActiveApplicationsImpl.java b/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/ActiveApplicationsImpl.java deleted file mode 100644 index ab00f2182929..000000000000 --- a/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/ActiveApplicationsImpl.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * 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.desktopvirtualization.v2019_12_10_preview.implementation; - -import com.microsoft.azure.arm.model.implementation.WrapperImpl; -import com.microsoft.azure.management.desktopvirtualization.v2019_12_10_preview.ActiveApplications; -import rx.Observable; -import rx.functions.Func1; -import com.microsoft.azure.Page; -import com.microsoft.azure.management.desktopvirtualization.v2019_12_10_preview.HostPoolApplication; - -class ActiveApplicationsImpl extends WrapperImpl implements ActiveApplications { - private final DesktopVirtualizationManager manager; - - ActiveApplicationsImpl(DesktopVirtualizationManager manager) { - super(manager.inner().activeApplications()); - this.manager = manager; - } - - public DesktopVirtualizationManager manager() { - return this.manager; - } - - private HostPoolApplicationImpl wrapModel(ApplicationInner inner) { - return new HostPoolApplicationImpl(inner, manager()); - } - - @Override - public Observable listBySessionHostAsync(final String resourceGroupName, final String hostPoolName, final String sessionHostName) { - ActiveApplicationsInner client = this.inner(); - return client.listBySessionHostAsync(resourceGroupName, hostPoolName, sessionHostName) - .flatMapIterable(new Func1, Iterable>() { - @Override - public Iterable call(Page page) { - return page.items(); - } - }) - .map(new Func1() { - @Override - public HostPoolApplication call(ApplicationInner inner) { - return wrapModel(inner); - } - }); - } - -} diff --git a/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/ActiveApplicationsInner.java b/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/ActiveApplicationsInner.java deleted file mode 100644 index 4d147be81e65..000000000000 --- a/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/ActiveApplicationsInner.java +++ /dev/null @@ -1,441 +0,0 @@ -/** - * 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.desktopvirtualization.v2019_12_10_preview.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.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 ActiveApplications. - */ -public class ActiveApplicationsInner { - /** The Retrofit service to perform REST calls. */ - private ActiveApplicationsService service; - /** The service client containing this operation class. */ - private DesktopVirtualizationAPIClientImpl client; - - /** - * Initializes an instance of ActiveApplicationsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ActiveApplicationsInner(Retrofit retrofit, DesktopVirtualizationAPIClientImpl client) { - this.service = retrofit.create(ActiveApplicationsService.class); - this.client = client; - } - - /** - * The interface defining all the services for ActiveApplications to be - * used by Retrofit to perform actually REST calls. - */ - interface ActiveApplicationsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.desktopvirtualization.v2019_12_10_preview.ActiveApplications listBySessionHost" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/activeApplications") - Observable> listBySessionHost(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("hostPoolName") String hostPoolName, @Path("sessionHostName") String sessionHostName, @Query("api-version") String apiVersion, @Query("$filter") String filter, @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.desktopvirtualization.v2019_12_10_preview.ActiveApplications listBySessionHostNext" }) - @GET - Observable> listBySessionHostNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * List applications for the given session host. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group - * @param sessionHostName The name of the session host within the specified host pool - * @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<ApplicationInner> object if successful. - */ - public PagedList listBySessionHost(final String resourceGroupName, final String hostPoolName, final String sessionHostName) { - ServiceResponse> response = listBySessionHostSinglePageAsync(resourceGroupName, hostPoolName, sessionHostName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listBySessionHostNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List applications for the given session host. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group - * @param sessionHostName The name of the session host within the specified host pool - * @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> listBySessionHostAsync(final String resourceGroupName, final String hostPoolName, final String sessionHostName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listBySessionHostSinglePageAsync(resourceGroupName, hostPoolName, sessionHostName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listBySessionHostNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List applications for the given session host. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group - * @param sessionHostName The name of the session host within the specified host pool - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApplicationInner> object - */ - public Observable> listBySessionHostAsync(final String resourceGroupName, final String hostPoolName, final String sessionHostName) { - return listBySessionHostWithServiceResponseAsync(resourceGroupName, hostPoolName, sessionHostName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List applications for the given session host. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group - * @param sessionHostName The name of the session host within the specified host pool - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApplicationInner> object - */ - public Observable>> listBySessionHostWithServiceResponseAsync(final String resourceGroupName, final String hostPoolName, final String sessionHostName) { - return listBySessionHostSinglePageAsync(resourceGroupName, hostPoolName, sessionHostName) - .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(listBySessionHostNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List applications for the given session host. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group - * @param sessionHostName The name of the session host within the specified host pool - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ApplicationInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listBySessionHostSinglePageAsync(final String resourceGroupName, final String hostPoolName, final String sessionHostName) { - 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 (hostPoolName == null) { - throw new IllegalArgumentException("Parameter hostPoolName is required and cannot be null."); - } - if (sessionHostName == null) { - throw new IllegalArgumentException("Parameter sessionHostName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - return service.listBySessionHost(this.client.subscriptionId(), resourceGroupName, hostPoolName, sessionHostName, this.client.apiVersion(), filter, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listBySessionHostDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * List applications for the given session host. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group - * @param sessionHostName The name of the session host within the specified host pool - * @param filter OData filter expression. Valid properties for filtering are userprincipalname and sessionstate. - * @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<ApplicationInner> object if successful. - */ - public PagedList listBySessionHost(final String resourceGroupName, final String hostPoolName, final String sessionHostName, final String filter) { - ServiceResponse> response = listBySessionHostSinglePageAsync(resourceGroupName, hostPoolName, sessionHostName, filter).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listBySessionHostNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List applications for the given session host. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group - * @param sessionHostName The name of the session host within the specified host pool - * @param filter OData filter expression. Valid properties for filtering are userprincipalname and sessionstate. - * @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> listBySessionHostAsync(final String resourceGroupName, final String hostPoolName, final String sessionHostName, final String filter, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listBySessionHostSinglePageAsync(resourceGroupName, hostPoolName, sessionHostName, filter), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listBySessionHostNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List applications for the given session host. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group - * @param sessionHostName The name of the session host within the specified host pool - * @param filter OData filter expression. Valid properties for filtering are userprincipalname and sessionstate. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApplicationInner> object - */ - public Observable> listBySessionHostAsync(final String resourceGroupName, final String hostPoolName, final String sessionHostName, final String filter) { - return listBySessionHostWithServiceResponseAsync(resourceGroupName, hostPoolName, sessionHostName, filter) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List applications for the given session host. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param hostPoolName The name of the host pool within the specified resource group - * @param sessionHostName The name of the session host within the specified host pool - * @param filter OData filter expression. Valid properties for filtering are userprincipalname and sessionstate. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApplicationInner> object - */ - public Observable>> listBySessionHostWithServiceResponseAsync(final String resourceGroupName, final String hostPoolName, final String sessionHostName, final String filter) { - return listBySessionHostSinglePageAsync(resourceGroupName, hostPoolName, sessionHostName, filter) - .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(listBySessionHostNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List applications for the given session host. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. The name is case insensitive. - ServiceResponse> * @param hostPoolName The name of the host pool within the specified resource group - ServiceResponse> * @param sessionHostName The name of the session host within the specified host pool - ServiceResponse> * @param filter OData filter expression. Valid properties for filtering are userprincipalname and sessionstate. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ApplicationInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listBySessionHostSinglePageAsync(final String resourceGroupName, final String hostPoolName, final String sessionHostName, final String filter) { - 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 (hostPoolName == null) { - throw new IllegalArgumentException("Parameter hostPoolName is required and cannot be null."); - } - if (sessionHostName == null) { - throw new IllegalArgumentException("Parameter sessionHostName 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.listBySessionHost(this.client.subscriptionId(), resourceGroupName, hostPoolName, sessionHostName, this.client.apiVersion(), filter, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listBySessionHostDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listBySessionHostDelegate(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); - } - - /** - * List applications for the given session host. - * - * @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<ApplicationInner> object if successful. - */ - public PagedList listBySessionHostNext(final String nextPageLink) { - ServiceResponse> response = listBySessionHostNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return listBySessionHostNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List applications for the given session host. - * - * @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> listBySessionHostNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - listBySessionHostNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return listBySessionHostNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List applications for the given session host. - * - * @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<ApplicationInner> object - */ - public Observable> listBySessionHostNextAsync(final String nextPageLink) { - return listBySessionHostNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List applications for the given session host. - * - * @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<ApplicationInner> object - */ - public Observable>> listBySessionHostNextWithServiceResponseAsync(final String nextPageLink) { - return listBySessionHostNextSinglePageAsync(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(listBySessionHostNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List applications for the given session host. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ApplicationInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> listBySessionHostNextSinglePageAsync(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.listBySessionHostNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = listBySessionHostNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> listBySessionHostNextDelegate(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/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/ApplicationGroupAssignmentsImpl.java b/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/ApplicationGroupAssignmentsImpl.java deleted file mode 100644 index 6703309da4f8..000000000000 --- a/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/ApplicationGroupAssignmentsImpl.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * 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.desktopvirtualization.v2019_12_10_preview.implementation; - -import com.microsoft.azure.arm.model.implementation.WrapperImpl; -import com.microsoft.azure.management.desktopvirtualization.v2019_12_10_preview.ApplicationGroupAssignments; -import rx.Observable; -import rx.functions.Func1; -import com.microsoft.azure.Page; -import com.microsoft.azure.management.desktopvirtualization.v2019_12_10_preview.WorkspaceApplicationGroup; - -class ApplicationGroupAssignmentsImpl extends WrapperImpl implements ApplicationGroupAssignments { - private final DesktopVirtualizationManager manager; - - ApplicationGroupAssignmentsImpl(DesktopVirtualizationManager manager) { - super(manager.inner().applicationGroupAssignments()); - this.manager = manager; - } - - public DesktopVirtualizationManager manager() { - return this.manager; - } - - private WorkspaceApplicationGroupImpl wrapModel(ApplicationGroupInner inner) { - return new WorkspaceApplicationGroupImpl(inner, manager()); - } - - @Override - public Observable workspaceLevelListAsync(final String resourceGroupName, final String workspaceName) { - ApplicationGroupAssignmentsInner client = this.inner(); - return client.workspaceLevelListAsync(resourceGroupName, workspaceName) - .flatMapIterable(new Func1, Iterable>() { - @Override - public Iterable call(Page page) { - return page.items(); - } - }) - .map(new Func1() { - @Override - public WorkspaceApplicationGroup call(ApplicationGroupInner inner) { - return wrapModel(inner); - } - }); - } - -} diff --git a/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/ApplicationGroupAssignmentsInner.java b/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/ApplicationGroupAssignmentsInner.java deleted file mode 100644 index 256ecb19ea80..000000000000 --- a/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/ApplicationGroupAssignmentsInner.java +++ /dev/null @@ -1,425 +0,0 @@ -/** - * 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.desktopvirtualization.v2019_12_10_preview.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.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 ApplicationGroupAssignments. - */ -public class ApplicationGroupAssignmentsInner { - /** The Retrofit service to perform REST calls. */ - private ApplicationGroupAssignmentsService service; - /** The service client containing this operation class. */ - private DesktopVirtualizationAPIClientImpl client; - - /** - * Initializes an instance of ApplicationGroupAssignmentsInner. - * - * @param retrofit the Retrofit instance built from a Retrofit Builder. - * @param client the instance of the service client containing this operation class. - */ - public ApplicationGroupAssignmentsInner(Retrofit retrofit, DesktopVirtualizationAPIClientImpl client) { - this.service = retrofit.create(ApplicationGroupAssignmentsService.class); - this.client = client; - } - - /** - * The interface defining all the services for ApplicationGroupAssignments to be - * used by Retrofit to perform actually REST calls. - */ - interface ApplicationGroupAssignmentsService { - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.desktopvirtualization.v2019_12_10_preview.ApplicationGroupAssignments workspaceLevelList" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/userApplicationGroupAssignments") - Observable> workspaceLevelList(@Path("subscriptionId") String subscriptionId, @Path("resourceGroupName") String resourceGroupName, @Path("workspaceName") String workspaceName, @Query("api-version") String apiVersion, @Query("$filter") String filter, @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.desktopvirtualization.v2019_12_10_preview.ApplicationGroupAssignments workspaceLevelListNext" }) - @GET - Observable> workspaceLevelListNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - } - - /** - * List application group that user can use. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace - * @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<ApplicationGroupInner> object if successful. - */ - public PagedList workspaceLevelList(final String resourceGroupName, final String workspaceName) { - ServiceResponse> response = workspaceLevelListSinglePageAsync(resourceGroupName, workspaceName).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return workspaceLevelListNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List application group that user can use. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace - * @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> workspaceLevelListAsync(final String resourceGroupName, final String workspaceName, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - workspaceLevelListSinglePageAsync(resourceGroupName, workspaceName), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return workspaceLevelListNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List application group that user can use. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApplicationGroupInner> object - */ - public Observable> workspaceLevelListAsync(final String resourceGroupName, final String workspaceName) { - return workspaceLevelListWithServiceResponseAsync(resourceGroupName, workspaceName) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List application group that user can use. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApplicationGroupInner> object - */ - public Observable>> workspaceLevelListWithServiceResponseAsync(final String resourceGroupName, final String workspaceName) { - return workspaceLevelListSinglePageAsync(resourceGroupName, workspaceName) - .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(workspaceLevelListNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List application group that user can use. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ApplicationGroupInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> workspaceLevelListSinglePageAsync(final String resourceGroupName, final String workspaceName) { - 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 (workspaceName == null) { - throw new IllegalArgumentException("Parameter workspaceName is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - final String filter = null; - return service.workspaceLevelList(this.client.subscriptionId(), resourceGroupName, workspaceName, this.client.apiVersion(), filter, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = workspaceLevelListDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - /** - * List application group that user can use. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace - * @param filter OData filter expression. Valid properties for filtering are applicationGroupType. - * @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<ApplicationGroupInner> object if successful. - */ - public PagedList workspaceLevelList(final String resourceGroupName, final String workspaceName, final String filter) { - ServiceResponse> response = workspaceLevelListSinglePageAsync(resourceGroupName, workspaceName, filter).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return workspaceLevelListNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List application group that user can use. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace - * @param filter OData filter expression. Valid properties for filtering are applicationGroupType. - * @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> workspaceLevelListAsync(final String resourceGroupName, final String workspaceName, final String filter, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - workspaceLevelListSinglePageAsync(resourceGroupName, workspaceName, filter), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return workspaceLevelListNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List application group that user can use. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace - * @param filter OData filter expression. Valid properties for filtering are applicationGroupType. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApplicationGroupInner> object - */ - public Observable> workspaceLevelListAsync(final String resourceGroupName, final String workspaceName, final String filter) { - return workspaceLevelListWithServiceResponseAsync(resourceGroupName, workspaceName, filter) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List application group that user can use. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace - * @param filter OData filter expression. Valid properties for filtering are applicationGroupType. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the PagedList<ApplicationGroupInner> object - */ - public Observable>> workspaceLevelListWithServiceResponseAsync(final String resourceGroupName, final String workspaceName, final String filter) { - return workspaceLevelListSinglePageAsync(resourceGroupName, workspaceName, filter) - .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(workspaceLevelListNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List application group that user can use. - * - ServiceResponse> * @param resourceGroupName The name of the resource group. The name is case insensitive. - ServiceResponse> * @param workspaceName The name of the workspace - ServiceResponse> * @param filter OData filter expression. Valid properties for filtering are applicationGroupType. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ApplicationGroupInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> workspaceLevelListSinglePageAsync(final String resourceGroupName, final String workspaceName, final String filter) { - 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 (workspaceName == null) { - throw new IllegalArgumentException("Parameter workspaceName 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.workspaceLevelList(this.client.subscriptionId(), resourceGroupName, workspaceName, this.client.apiVersion(), filter, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = workspaceLevelListDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> workspaceLevelListDelegate(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); - } - - /** - * List application group that user can use. - * - * @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<ApplicationGroupInner> object if successful. - */ - public PagedList workspaceLevelListNext(final String nextPageLink) { - ServiceResponse> response = workspaceLevelListNextSinglePageAsync(nextPageLink).toBlocking().single(); - return new PagedList(response.body()) { - @Override - public Page nextPage(String nextPageLink) { - return workspaceLevelListNextSinglePageAsync(nextPageLink).toBlocking().single().body(); - } - }; - } - - /** - * List application group that user can use. - * - * @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> workspaceLevelListNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { - return AzureServiceFuture.fromPageResponse( - workspaceLevelListNextSinglePageAsync(nextPageLink), - new Func1>>>() { - @Override - public Observable>> call(String nextPageLink) { - return workspaceLevelListNextSinglePageAsync(nextPageLink); - } - }, - serviceCallback); - } - - /** - * List application group that user can use. - * - * @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<ApplicationGroupInner> object - */ - public Observable> workspaceLevelListNextAsync(final String nextPageLink) { - return workspaceLevelListNextWithServiceResponseAsync(nextPageLink) - .map(new Func1>, Page>() { - @Override - public Page call(ServiceResponse> response) { - return response.body(); - } - }); - } - - /** - * List application group that user can use. - * - * @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<ApplicationGroupInner> object - */ - public Observable>> workspaceLevelListNextWithServiceResponseAsync(final String nextPageLink) { - return workspaceLevelListNextSinglePageAsync(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(workspaceLevelListNextWithServiceResponseAsync(nextPageLink)); - } - }); - } - - /** - * List application group that user can use. - * - ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the PagedList<ApplicationGroupInner> object wrapped in {@link ServiceResponse} if successful. - */ - public Observable>> workspaceLevelListNextSinglePageAsync(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.workspaceLevelListNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>>() { - @Override - public Observable>> call(Response response) { - try { - ServiceResponse> result = workspaceLevelListNextDelegate(response); - return Observable.just(new ServiceResponse>(result.body(), result.response())); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse> workspaceLevelListNextDelegate(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/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/ApplicationGroupApplicationImpl.java b/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/ApplicationImpl.java similarity index 81% rename from sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/ApplicationGroupApplicationImpl.java rename to sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/ApplicationImpl.java index 7aa2b12e46be..de3d7b4992b7 100644 --- a/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/ApplicationGroupApplicationImpl.java +++ b/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/ApplicationImpl.java @@ -8,7 +8,7 @@ package com.microsoft.azure.management.desktopvirtualization.v2019_12_10_preview.implementation; -import com.microsoft.azure.management.desktopvirtualization.v2019_12_10_preview.ApplicationGroupApplication; +import com.microsoft.azure.management.desktopvirtualization.v2019_12_10_preview.Application; import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl; import rx.Observable; import com.microsoft.azure.management.desktopvirtualization.v2019_12_10_preview.ApplicationPatch; @@ -16,14 +16,14 @@ import com.microsoft.azure.management.desktopvirtualization.v2019_12_10_preview.CommandLineSetting; import rx.functions.Func1; -class ApplicationGroupApplicationImpl extends CreatableUpdatableImpl implements ApplicationGroupApplication, ApplicationGroupApplication.Definition, ApplicationGroupApplication.Update { +class ApplicationImpl extends CreatableUpdatableImpl implements Application, Application.Definition, Application.Update { private final DesktopVirtualizationManager manager; private String resourceGroupName; private String applicationGroupName; private String applicationName; private ApplicationPatch updateParameter; - ApplicationGroupApplicationImpl(String name, DesktopVirtualizationManager manager) { + ApplicationImpl(String name, DesktopVirtualizationManager manager) { super(name, new ApplicationInner()); this.manager = manager; // Set resource name @@ -32,7 +32,7 @@ class ApplicationGroupApplicationImpl extends CreatableUpdatableImpl createResourceAsync() { + public Observable createResourceAsync() { ApplicationsInner client = this.manager().inner().applications(); return client.createOrUpdateAsync(this.resourceGroupName, this.applicationGroupName, this.applicationName, this.inner()) .map(new Func1() { @@ -65,7 +65,7 @@ public ApplicationInner call(ApplicationInner resource) { } @Override - public Observable updateResourceAsync() { + public Observable updateResourceAsync() { ApplicationsInner client = this.manager().inner().applications(); return client.updateAsync(this.resourceGroupName, this.applicationGroupName, this.applicationName, this.updateParameter) .map(new Func1() { @@ -159,20 +159,20 @@ public String type() { } @Override - public ApplicationGroupApplicationImpl withExistingApplicationGroup(String resourceGroupName, String applicationGroupName) { + public ApplicationImpl withExistingApplicationGroup(String resourceGroupName, String applicationGroupName) { this.resourceGroupName = resourceGroupName; this.applicationGroupName = applicationGroupName; return this; } @Override - public ApplicationGroupApplicationImpl withTags(Map tags) { + public ApplicationImpl withTags(Map tags) { this.updateParameter.withTags(tags); return this; } @Override - public ApplicationGroupApplicationImpl withCommandLineSetting(CommandLineSetting commandLineSetting) { + public ApplicationImpl withCommandLineSetting(CommandLineSetting commandLineSetting) { if (isInCreateMode()) { this.inner().withCommandLineSetting(commandLineSetting); } else { @@ -182,7 +182,7 @@ public ApplicationGroupApplicationImpl withCommandLineSetting(CommandLineSetting } @Override - public ApplicationGroupApplicationImpl withCommandLineArguments(String commandLineArguments) { + public ApplicationImpl withCommandLineArguments(String commandLineArguments) { if (isInCreateMode()) { this.inner().withCommandLineArguments(commandLineArguments); } else { @@ -192,7 +192,7 @@ public ApplicationGroupApplicationImpl withCommandLineArguments(String commandLi } @Override - public ApplicationGroupApplicationImpl withDescription(String description) { + public ApplicationImpl withDescription(String description) { if (isInCreateMode()) { this.inner().withDescription(description); } else { @@ -202,7 +202,7 @@ public ApplicationGroupApplicationImpl withDescription(String description) { } @Override - public ApplicationGroupApplicationImpl withFilePath(String filePath) { + public ApplicationImpl withFilePath(String filePath) { if (isInCreateMode()) { this.inner().withFilePath(filePath); } else { @@ -212,7 +212,7 @@ public ApplicationGroupApplicationImpl withFilePath(String filePath) { } @Override - public ApplicationGroupApplicationImpl withFriendlyName(String friendlyName) { + public ApplicationImpl withFriendlyName(String friendlyName) { if (isInCreateMode()) { this.inner().withFriendlyName(friendlyName); } else { @@ -222,7 +222,7 @@ public ApplicationGroupApplicationImpl withFriendlyName(String friendlyName) { } @Override - public ApplicationGroupApplicationImpl withIconIndex(Integer iconIndex) { + public ApplicationImpl withIconIndex(Integer iconIndex) { if (isInCreateMode()) { this.inner().withIconIndex(iconIndex); } else { @@ -232,7 +232,7 @@ public ApplicationGroupApplicationImpl withIconIndex(Integer iconIndex) { } @Override - public ApplicationGroupApplicationImpl withIconPath(String iconPath) { + public ApplicationImpl withIconPath(String iconPath) { if (isInCreateMode()) { this.inner().withIconPath(iconPath); } else { @@ -242,7 +242,7 @@ public ApplicationGroupApplicationImpl withIconPath(String iconPath) { } @Override - public ApplicationGroupApplicationImpl withShowInPortal(Boolean showInPortal) { + public ApplicationImpl withShowInPortal(Boolean showInPortal) { if (isInCreateMode()) { this.inner().withShowInPortal(showInPortal); } else { diff --git a/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/ApplicationsImpl.java b/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/ApplicationsImpl.java index 6c7eccd2e923..5ea4150214f2 100644 --- a/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/ApplicationsImpl.java +++ b/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/ApplicationsImpl.java @@ -15,7 +15,7 @@ import rx.Observable; import rx.functions.Func1; import com.microsoft.azure.Page; -import com.microsoft.azure.management.desktopvirtualization.v2019_12_10_preview.ApplicationGroupApplication; +import com.microsoft.azure.management.desktopvirtualization.v2019_12_10_preview.Application; class ApplicationsImpl extends WrapperImpl implements Applications { private final DesktopVirtualizationManager manager; @@ -30,20 +30,20 @@ public DesktopVirtualizationManager manager() { } @Override - public ApplicationGroupApplicationImpl define(String name) { + public ApplicationImpl define(String name) { return wrapModel(name); } - private ApplicationGroupApplicationImpl wrapModel(ApplicationInner inner) { - return new ApplicationGroupApplicationImpl(inner, manager()); + private ApplicationImpl wrapModel(ApplicationInner inner) { + return new ApplicationImpl(inner, manager()); } - private ApplicationGroupApplicationImpl wrapModel(String name) { - return new ApplicationGroupApplicationImpl(name, this.manager()); + private ApplicationImpl wrapModel(String name) { + return new ApplicationImpl(name, this.manager()); } @Override - public Observable listAsync(final String resourceGroupName, final String applicationGroupName) { + public Observable listAsync(final String resourceGroupName, final String applicationGroupName) { ApplicationsInner client = this.inner(); return client.listAsync(resourceGroupName, applicationGroupName) .flatMapIterable(new Func1, Iterable>() { @@ -52,25 +52,25 @@ public Iterable call(Page page) { return page.items(); } }) - .map(new Func1() { + .map(new Func1() { @Override - public ApplicationGroupApplication call(ApplicationInner inner) { + public Application call(ApplicationInner inner) { return wrapModel(inner); } }); } @Override - public Observable getAsync(String resourceGroupName, String applicationGroupName, String applicationName) { + public Observable getAsync(String resourceGroupName, String applicationGroupName, String applicationName) { ApplicationsInner client = this.inner(); return client.getAsync(resourceGroupName, applicationGroupName, applicationName) - .flatMap(new Func1>() { + .flatMap(new Func1>() { @Override - public Observable call(ApplicationInner inner) { + public Observable call(ApplicationInner inner) { if (inner == null) { return Observable.empty(); } else { - return Observable.just((ApplicationGroupApplication)wrapModel(inner)); + return Observable.just((Application)wrapModel(inner)); } } }); diff --git a/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/DesktopVirtualizationAPIClientImpl.java b/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/DesktopVirtualizationAPIClientImpl.java index fd0138e1b047..c72bf7e61e87 100644 --- a/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/DesktopVirtualizationAPIClientImpl.java +++ b/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/DesktopVirtualizationAPIClientImpl.java @@ -158,19 +158,6 @@ public WorkspacesInner workspaces() { return this.workspaces; } - /** - * The ApplicationGroupAssignmentsInner object to access its operations. - */ - private ApplicationGroupAssignmentsInner applicationGroupAssignments; - - /** - * Gets the ApplicationGroupAssignmentsInner object to access its operations. - * @return the ApplicationGroupAssignmentsInner object. - */ - public ApplicationGroupAssignmentsInner applicationGroupAssignments() { - return this.applicationGroupAssignments; - } - /** * The ApplicationGroupsInner object to access its operations. */ @@ -262,19 +249,6 @@ public SessionHostsInner sessionHosts() { return this.sessionHosts; } - /** - * The ActiveApplicationsInner object to access its operations. - */ - private ActiveApplicationsInner activeApplications; - - /** - * Gets the ActiveApplicationsInner object to access its operations. - * @return the ActiveApplicationsInner object. - */ - public ActiveApplicationsInner activeApplications() { - return this.activeApplications; - } - /** * Initializes an instance of DesktopVirtualizationAPIClient client. * @@ -312,7 +286,6 @@ protected void initialize() { this.generateClientRequestId = true; this.operations = new OperationsInner(restClient().retrofit(), this); this.workspaces = new WorkspacesInner(restClient().retrofit(), this); - this.applicationGroupAssignments = new ApplicationGroupAssignmentsInner(restClient().retrofit(), this); this.applicationGroups = new ApplicationGroupsInner(restClient().retrofit(), this); this.startMenuItems = new StartMenuItemsInner(restClient().retrofit(), this); this.applications = new ApplicationsInner(restClient().retrofit(), this); @@ -320,7 +293,6 @@ protected void initialize() { this.hostPools = new HostPoolsInner(restClient().retrofit(), this); this.userSessions = new UserSessionsInner(restClient().retrofit(), this); this.sessionHosts = new SessionHostsInner(restClient().retrofit(), this); - this.activeApplications = new ActiveApplicationsInner(restClient().retrofit(), this); this.azureClient = new AzureClient(this); } diff --git a/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/DesktopVirtualizationManager.java b/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/DesktopVirtualizationManager.java index ba282a8a0192..d665807467c1 100644 --- a/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/DesktopVirtualizationManager.java +++ b/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/DesktopVirtualizationManager.java @@ -18,7 +18,6 @@ import com.microsoft.rest.RestClient; import com.microsoft.azure.management.desktopvirtualization.v2019_12_10_preview.Operations; import com.microsoft.azure.management.desktopvirtualization.v2019_12_10_preview.Workspaces; -import com.microsoft.azure.management.desktopvirtualization.v2019_12_10_preview.ApplicationGroupAssignments; import com.microsoft.azure.management.desktopvirtualization.v2019_12_10_preview.ApplicationGroups; import com.microsoft.azure.management.desktopvirtualization.v2019_12_10_preview.StartMenuItems; import com.microsoft.azure.management.desktopvirtualization.v2019_12_10_preview.Applications; @@ -26,7 +25,6 @@ import com.microsoft.azure.management.desktopvirtualization.v2019_12_10_preview.HostPools; import com.microsoft.azure.management.desktopvirtualization.v2019_12_10_preview.UserSessions; import com.microsoft.azure.management.desktopvirtualization.v2019_12_10_preview.SessionHosts; -import com.microsoft.azure.management.desktopvirtualization.v2019_12_10_preview.ActiveApplications; import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl; import com.microsoft.azure.arm.resources.implementation.ManagerCore; @@ -36,7 +34,6 @@ public final class DesktopVirtualizationManager extends ManagerCore { private Operations operations; private Workspaces workspaces; - private ApplicationGroupAssignments applicationGroupAssignments; private ApplicationGroups applicationGroups; private StartMenuItems startMenuItems; private Applications applications; @@ -44,7 +41,6 @@ public final class DesktopVirtualizationManager extends ManagerCore implements HostPoolApplication { - private final DesktopVirtualizationManager manager; - - HostPoolApplicationImpl(ApplicationInner inner, DesktopVirtualizationManager manager) { - super(inner); - this.manager = manager; - } - - @Override - public DesktopVirtualizationManager manager() { - return this.manager; - } - - - - @Override - public String commandLineArguments() { - return this.inner().commandLineArguments(); - } - - @Override - public CommandLineSetting commandLineSetting() { - return this.inner().commandLineSetting(); - } - - @Override - public String description() { - return this.inner().description(); - } - - @Override - public String filePath() { - return this.inner().filePath(); - } - - @Override - public String friendlyName() { - return this.inner().friendlyName(); - } - - @Override - public byte[] iconContent() { - return this.inner().iconContent(); - } - - @Override - public String iconHash() { - return this.inner().iconHash(); - } - - @Override - public Integer iconIndex() { - return this.inner().iconIndex(); - } - - @Override - public String iconPath() { - return this.inner().iconPath(); - } - - @Override - public String id() { - return this.inner().id(); - } - - @Override - public String name() { - return this.inner().name(); - } - - @Override - public Boolean showInPortal() { - return this.inner().showInPortal(); - } - - @Override - public String type() { - return this.inner().type(); - } - -} diff --git a/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/HostPoolImpl.java b/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/HostPoolImpl.java index 5f7ce107d208..f0c467f8253d 100644 --- a/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/HostPoolImpl.java +++ b/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/HostPoolImpl.java @@ -17,6 +17,7 @@ import com.microsoft.azure.management.desktopvirtualization.v2019_12_10_preview.LoadBalancerType; import com.microsoft.azure.management.desktopvirtualization.v2019_12_10_preview.RegistrationInfo; import java.util.List; +import com.microsoft.azure.management.desktopvirtualization.v2019_12_10_preview.PreferredAppGroupType; import com.microsoft.azure.management.desktopvirtualization.v2019_12_10_preview.RegistrationInfoPatch; import rx.functions.Func1; @@ -110,6 +111,11 @@ public PersonalDesktopAssignmentType personalDesktopAssignmentType() { return this.inner().personalDesktopAssignmentType(); } + @Override + public PreferredAppGroupType preferredAppGroupType() { + return this.inner().preferredAppGroupType(); + } + @Override public RegistrationInfo registrationInfo() { return this.inner().registrationInfo(); @@ -179,6 +185,16 @@ public HostPoolImpl withPersonalDesktopAssignmentType(PersonalDesktopAssignmentT return this; } + @Override + public HostPoolImpl withPreferredAppGroupType(PreferredAppGroupType preferredAppGroupType) { + if (isInCreateMode()) { + this.inner().withPreferredAppGroupType(preferredAppGroupType); + } else { + this.updateParameter.withPreferredAppGroupType(preferredAppGroupType); + } + return this; + } + @Override public HostPoolImpl withCustomRdpProperty(String customRdpProperty) { if (isInCreateMode()) { diff --git a/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/HostPoolInner.java b/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/HostPoolInner.java index a0a5a280d26b..acac92052591 100644 --- a/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/HostPoolInner.java +++ b/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/HostPoolInner.java @@ -13,6 +13,7 @@ import com.microsoft.azure.management.desktopvirtualization.v2019_12_10_preview.LoadBalancerType; import com.microsoft.azure.management.desktopvirtualization.v2019_12_10_preview.RegistrationInfo; import java.util.List; +import com.microsoft.azure.management.desktopvirtualization.v2019_12_10_preview.PreferredAppGroupType; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.Resource; @@ -103,6 +104,14 @@ public class HostPoolInner extends Resource { @JsonProperty(value = "properties.ssoContext") private String ssoContext; + /** + * The type of preferred application group type, default to Desktop + * Application Group. Possible values include: 'None', 'Desktop', + * 'RailApplications'. + */ + @JsonProperty(value = "properties.preferredAppGroupType", required = true) + private PreferredAppGroupType preferredAppGroupType; + /** * Get friendly name of HostPool. * @@ -352,4 +361,24 @@ public HostPoolInner withSsoContext(String ssoContext) { return this; } + /** + * Get the type of preferred application group type, default to Desktop Application Group. Possible values include: 'None', 'Desktop', 'RailApplications'. + * + * @return the preferredAppGroupType value + */ + public PreferredAppGroupType preferredAppGroupType() { + return this.preferredAppGroupType; + } + + /** + * Set the type of preferred application group type, default to Desktop Application Group. Possible values include: 'None', 'Desktop', 'RailApplications'. + * + * @param preferredAppGroupType the preferredAppGroupType value to set + * @return the HostPoolInner object itself. + */ + public HostPoolInner withPreferredAppGroupType(PreferredAppGroupType preferredAppGroupType) { + this.preferredAppGroupType = preferredAppGroupType; + return this; + } + } diff --git a/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/SessionHostImpl.java b/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/SessionHostImpl.java index b74c20064e3b..f163b61999a0 100644 --- a/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/SessionHostImpl.java +++ b/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/SessionHostImpl.java @@ -161,6 +161,11 @@ public UpdateState updateState() { return this.inner().updateState(); } + @Override + public String virtualMachineId() { + return this.inner().virtualMachineId(); + } + @Override public SessionHostImpl withAllowNewSession(Boolean allowNewSession) { this.updateParameter.withAllowNewSession(allowNewSession); diff --git a/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/SessionHostInner.java b/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/SessionHostInner.java index 35f88b553e81..42542ddf8294 100644 --- a/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/SessionHostInner.java +++ b/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/SessionHostInner.java @@ -44,6 +44,12 @@ public class SessionHostInner extends ProxyResource { @JsonProperty(value = "properties.allowNewSession") private Boolean allowNewSession; + /** + * Resource Id of SessionHost's underlying virtual machine. + */ + @JsonProperty(value = "properties.virtualMachineId", access = JsonProperty.Access.WRITE_ONLY) + private String virtualMachineId; + /** * User assigned to SessionHost. */ @@ -174,6 +180,15 @@ public SessionHostInner withAllowNewSession(Boolean allowNewSession) { return this; } + /** + * Get resource Id of SessionHost's underlying virtual machine. + * + * @return the virtualMachineId value + */ + public String virtualMachineId() { + return this.virtualMachineId; + } + /** * Get user assigned to SessionHost. * diff --git a/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/WorkspaceApplicationGroupImpl.java b/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/WorkspaceApplicationGroupImpl.java deleted file mode 100644 index bb4618cf9cf5..000000000000 --- a/sdk/desktopvirtualization/mgmt-v2019_12_10_preview/src/main/java/com/microsoft/azure/management/desktopvirtualization/v2019_12_10_preview/implementation/WorkspaceApplicationGroupImpl.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * 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.desktopvirtualization.v2019_12_10_preview.implementation; - -import com.microsoft.azure.management.desktopvirtualization.v2019_12_10_preview.WorkspaceApplicationGroup; -import com.microsoft.azure.arm.model.implementation.WrapperImpl; -import rx.Observable; -import com.microsoft.azure.management.desktopvirtualization.v2019_12_10_preview.ApplicationGroupType; -import java.util.Map; - -class WorkspaceApplicationGroupImpl extends WrapperImpl implements WorkspaceApplicationGroup { - private final DesktopVirtualizationManager manager; - - WorkspaceApplicationGroupImpl(ApplicationGroupInner inner, DesktopVirtualizationManager manager) { - super(inner); - this.manager = manager; - } - - @Override - public DesktopVirtualizationManager manager() { - return this.manager; - } - - - - @Override - public ApplicationGroupType applicationGroupType() { - return this.inner().applicationGroupType(); - } - - @Override - public String description() { - return this.inner().description(); - } - - @Override - public String friendlyName() { - return this.inner().friendlyName(); - } - - @Override - public String hostPoolArmPath() { - return this.inner().hostPoolArmPath(); - } - - @Override - public String id() { - return this.inner().id(); - } - - @Override - public String location() { - return this.inner().location(); - } - - @Override - public String name() { - return this.inner().name(); - } - - @Override - public Map tags() { - return this.inner().getTags(); - } - - @Override - public String type() { - return this.inner().type(); - } - - @Override - public String workspaceArmPath() { - return this.inner().workspaceArmPath(); - } - -}