diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AvailabilitySet.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AvailabilitySet.java index 9038cc5ad770a..21cc859c3044e 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AvailabilitySet.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AvailabilitySet.java @@ -2,6 +2,7 @@ import com.microsoft.azure.management.compute.implementation.api.AvailabilitySetInner; import com.microsoft.azure.management.compute.implementation.api.InstanceViewStatus; +import com.microsoft.azure.management.resources.fluentcore.arm.collection.DefinitionAfterGroup; import com.microsoft.azure.management.resources.fluentcore.arm.models.GroupableResource; import com.microsoft.azure.management.resources.fluentcore.arm.models.Resource; import com.microsoft.azure.management.resources.fluentcore.model.Appliable; @@ -86,14 +87,9 @@ interface DefinitionBlank extends GroupableResource.DefinitionWithRegion { + interface DefinitionWithGroup extends GroupableResource.DefinitionWithGroup { } - /** - * The stage of the availability set definition after the resource group has been specified - */ - interface DefinitionAfterGroup extends DefinitionCreatable {} - /** * The stage of an availability set definition which contains all the minimum required inputs for * the resource to be created (via {@link DefinitionCreatable#create()}), but also allows @@ -101,6 +97,7 @@ interface DefinitionAfterGroup extends DefinitionCreatable {} */ interface DefinitionCreatable extends Creatable, + DefinitionAfterGroup, Resource.DefinitionWithTags { /** * Specifies the update domain count for the availability set. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AvailabilitySets.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AvailabilitySets.java index 53d5b42ac83c8..3f5cfbe18bc29 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AvailabilitySets.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AvailabilitySets.java @@ -21,6 +21,6 @@ public interface AvailabilitySets extends interface InGroup - extends ResourcesInGroup { + extends ResourcesInGroup { } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetsInGroupImpl.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetsInGroupImpl.java index 5a038effe7908..e4b970675dd73 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetsInGroupImpl.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetsInGroupImpl.java @@ -8,6 +8,7 @@ import com.microsoft.azure.CloudException; import com.microsoft.azure.PagedList; import com.microsoft.azure.management.compute.AvailabilitySet; +import com.microsoft.azure.management.compute.AvailabilitySet.DefinitionCreatable; import com.microsoft.azure.management.compute.AvailabilitySets; import com.microsoft.azure.management.resources.ResourceGroup; @@ -36,7 +37,7 @@ public PagedList list() throws CloudException, IOException { @Override - public AvailabilitySet.DefinitionAfterGroup define(String name) { + public DefinitionCreatable define(String name) { return this.availabilitySets .define(name) .withRegion(this.resourceGroup.location()) diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Network.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Network.java index 6deb3b7cef21e..7e82278b1482a 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Network.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Network.java @@ -9,6 +9,7 @@ import java.util.Map; import com.microsoft.azure.management.network.implementation.api.VirtualNetworkInner; +import com.microsoft.azure.management.resources.fluentcore.arm.collection.DefinitionAfterGroup; import com.microsoft.azure.management.resources.fluentcore.arm.models.GroupableResource; import com.microsoft.azure.management.resources.fluentcore.arm.models.Resource; import com.microsoft.azure.management.resources.fluentcore.model.Appliable; @@ -71,15 +72,9 @@ interface DefinitionBlank * The stage of the virtual network definition allowing to specify the resource group */ interface DefinitionWithGroup - extends GroupableResource.DefinitionWithGroup { + extends GroupableResource.DefinitionWithGroup { } - /** - * The stage of the virtual network definition after with the resource group already specified - */ - interface DefinitionAfterGroup - extends DefinitionCreatable {} - /** * The stage of the virtual network definition allowing to add subnets */ @@ -147,6 +142,7 @@ interface UpdateWithSubnet { * (see {@link DefinitionWithAddressSpace#withAddressSpace(String)). */ interface DefinitionCreatable extends + DefinitionAfterGroup, Creatable, Resource.DefinitionWithTags { diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Networks.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Networks.java index 4e868e3a37605..87f4f7b7ce977 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Networks.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Networks.java @@ -28,6 +28,6 @@ public interface Networks extends /** * Entry point to virtual network management within a specific resource group */ - interface InGroup extends ResourcesInGroup { + interface InGroup extends ResourcesInGroup { } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PublicIpAddress.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PublicIpAddress.java index cb80e749a27f1..c5fdbb9c07cb1 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PublicIpAddress.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PublicIpAddress.java @@ -6,6 +6,7 @@ package com.microsoft.azure.management.network; import com.microsoft.azure.management.network.implementation.api.PublicIPAddressInner; +import com.microsoft.azure.management.resources.fluentcore.arm.collection.DefinitionAfterGroup; import com.microsoft.azure.management.resources.fluentcore.arm.models.GroupableResource; import com.microsoft.azure.management.resources.fluentcore.arm.models.Resource; import com.microsoft.azure.management.resources.fluentcore.model.Creatable; @@ -83,16 +84,9 @@ interface DefinitionBlank * The stage of the public IP address definition allowing to specify the resource group */ interface DefinitionWithGroup - extends GroupableResource.DefinitionWithGroup { + extends GroupableResource.DefinitionWithGroup { } - /** - * The stage of the public IP address definition after the resource group has been specified - */ - interface DefinitionAfterGroup - extends DefinitionCreatable { - } - /** * A public IP address definition allowing to set the IP allocation method (static or dynamic) */ @@ -232,6 +226,7 @@ interface UpdateWithReverseFQDN { */ interface DefinitionCreatable extends Creatable, + DefinitionAfterGroup, DefinitionWithLeafDomainLabel, DefinitionWithIpAddress, DefinitionWithReverseFQDN, diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PublicIpAddresses.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PublicIpAddresses.java index 068bf64e7ebcd..5b47da28efa82 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PublicIpAddresses.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PublicIpAddresses.java @@ -29,6 +29,6 @@ public interface PublicIpAddresses extends * Entry point to public IP address management within a specific resource group */ interface InGroup extends - ResourcesInGroup{ + ResourcesInGroup{ } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PublicIpAddressesInGroupImpl.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PublicIpAddressesInGroupImpl.java index 6b37a6f764715..81869fdf16898 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PublicIpAddressesInGroupImpl.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PublicIpAddressesInGroupImpl.java @@ -23,7 +23,7 @@ public PublicIpAddressesInGroupImpl(PublicIpAddresses publicIpAddresses, Resourc } @Override - public PublicIpAddress.DefinitionAfterGroup define(String name) { + public PublicIpAddress.DefinitionCreatable define(String name) { return this.publicIpAddresses .define(name) .withRegion(this.resourceGroup.location()) diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/DefinitionAfterGroup.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/DefinitionAfterGroup.java new file mode 100644 index 0000000000000..cf47a7fe9424c --- /dev/null +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/DefinitionAfterGroup.java @@ -0,0 +1,12 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + */ +package com.microsoft.azure.management.resources.fluentcore.arm.collection; + +/** + * The point in the resource definition flow after the resource group has been specified + */ +public interface DefinitionAfterGroup { +} diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/ResourcesInGroup.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/ResourcesInGroup.java index 56989b5406795..520f0a59790a6 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/ResourcesInGroup.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/ResourcesInGroup.java @@ -10,7 +10,7 @@ import com.microsoft.azure.management.resources.fluentcore.collection.SupportsDeleting; import com.microsoft.azure.management.resources.fluentcore.collection.SupportsListing; -public interface ResourcesInGroup extends +public interface ResourcesInGroup extends SupportsListing, SupportsCreating, SupportsDeleting, diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccount.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccount.java index 73d7cb4c1f45d..eb0038a4908bf 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccount.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccount.java @@ -1,6 +1,7 @@ package com.microsoft.azure.management.storage; import com.microsoft.azure.CloudException; +import com.microsoft.azure.management.resources.fluentcore.arm.collection.DefinitionAfterGroup; import com.microsoft.azure.management.resources.fluentcore.arm.models.GroupableResource; import com.microsoft.azure.management.resources.fluentcore.model.Creatable; import com.microsoft.azure.management.resources.fluentcore.model.Refreshable; @@ -90,25 +91,24 @@ public interface StorageAccount extends **************************************************************/ /** - * Container interface for all the definitions + * Container interface for all the definitions that need to be implemented */ public interface Definitions extends + DefinitionAfterGroup, DefinitionBlank, DefinitionWithGroup, - DefinitionAfterGroup, DefinitionCreatable { } public interface DefinitionBlank extends GroupableResource.DefinitionWithRegion { } - public interface DefinitionWithGroup extends GroupableResource.DefinitionWithGroup { + public interface DefinitionWithGroup extends GroupableResource.DefinitionWithGroup { } - public interface DefinitionAfterGroup extends DefinitionCreatable { - } - - public interface DefinitionCreatable extends Creatable { + public interface DefinitionCreatable extends + Creatable, + DefinitionAfterGroup { DefinitionCreatable withAccountType(AccountType accountType); } } diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccounts.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccounts.java index 4a280af0ed52b..f2d9482ff3852 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccounts.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccounts.java @@ -22,6 +22,6 @@ public interface StorageAccounts extends SupportsDeletingByGroup { interface InGroup extends - ResourcesInGroup { + ResourcesInGroup { } } diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountsInGroupImpl.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountsInGroupImpl.java index 124689631b461..5e87ea59d27b3 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountsInGroupImpl.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountsInGroupImpl.java @@ -20,7 +20,7 @@ public StorageAccountsInGroupImpl(final StorageAccounts storageAccounts, final R } @Override - public StorageAccount.DefinitionAfterGroup define(String name) { + public StorageAccount.DefinitionCreatable define(String name) { return storageAccounts.define(name) .withRegion(resourceGroup.location()) .withExistingGroup(resourceGroup.name());