Skip to content

Commit

Permalink
Fix ci analyze exception
Browse files Browse the repository at this point in the history
  • Loading branch information
v-hongli1 committed Dec 20, 2024
1 parent 81b3825 commit e7873a6
Show file tree
Hide file tree
Showing 52 changed files with 1,719 additions and 321 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,29 @@ public final class ComputeManager extends Manager<ComputeManagementClient> {
private GalleryImageVersions galleryImageVersions;
private DiskEncryptionSets diskEncryptionSets;

/** @return the storage manager */
/**
* Gets the storage manager.
*
* @return the storage manager
*/
public StorageManager storageManager() {
return storageManager;
}

/** @return the network manager */
/**
* Gets the network manager.
*
* @return the network manager
*/
public NetworkManager networkManager() {
return networkManager;
}

/** @return the authorization manager */
/**
* Gets the authorization manager.
*
* @return the authorization manager
*/
public AuthorizationManager authorizationManager() {
return authorizationManager;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,20 @@ class EncryptionExtensionIdentifier {
private static final String LINUX_ENCRYPTION_TYPE_NAME = "AzureDiskEncryptionForLinux";
private static final String WINDOWS_ENCRYPTION_TYPE_NAME = "AzureDiskEncryption";

/** @return encryption extension publisher name */
/**
* Gets encryption extension publisher name.
*
* @return encryption extension publisher name
*/
static String publisherName() {
return ENCRYPTION_EXTENSION_PUBLISHER;
}

/** @return OS specific encryption extension type */
/**
* Gets OS specific encryption extension type.
*
* @return OS specific encryption extension type
*/
static String typeName(OperatingSystemTypes osType) {
if (osType == OperatingSystemTypes.LINUX) {
return LINUX_ENCRYPTION_TYPE_NAME;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,25 @@

/** Internal base type exposing settings to enable and disable disk encryption extension. */
abstract class EncryptionSettings {
/** @return encryption specific settings to be set on virtual machine storage profile */
/**
* Gets encryption specific settings to be set on virtual machine storage profile.
*
* @return encryption specific settings to be set on virtual machine storage profile
*/
abstract DiskEncryptionSettings storageProfileEncryptionSettings();

/** @return encryption extension public settings */
/**
* Gets encryption extension public settings.
*
* @return encryption extension public settings
*/
abstract HashMap<String, Object> extensionPublicSettings();

/** @return encryption extension protected settings */
/**
* Gets encryption extension protected settings.
*
* @return encryption extension protected settings
*/
abstract HashMap<String, Object> extensionProtectedSettings();

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,31 @@ class VirtualMachineExtensionsImpl extends
this.cacheCollection();
}

/** @return the extension as a map indexed by name. */
/**
* Gets the extension as a map indexed by name.
*
* @return the extension as a map indexed by name.
*/
public Map<String, VirtualMachineExtension> asMap() {
return this.asMapAsync().block();
}

/** @return an observable emits extensions in this collection as a map indexed by name. */
/**
* Gets an observable emits extensions in this collection as a map indexed by name.
*
* @return an observable emits extensions in this collection as a map indexed by name.
*/
public Mono<Map<String, VirtualMachineExtension>> asMapAsync() {
return listAsync().flatMapMany(Flux::fromIterable)
.collect(Collectors.toMap(extension -> extension.name(), extension -> extension))
.map(map -> Collections.unmodifiableMap(map));
}

/** @return a Mono emits extensions in this collection */
/**
* Gets a Mono emits extensions in this collection.
*
* @return a Mono emits extensions in this collection
*/
public Mono<List<VirtualMachineExtension>> listAsync() {
Flux<VirtualMachineExtensionImpl> extensions = Flux.fromIterable(this.collection().values());
// Resolve reference getExtensions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,32 @@
public interface AvailabilitySet extends GroupableResource<ComputeManager, AvailabilitySetInner>,
Refreshable<AvailabilitySet>, Updatable<AvailabilitySet.Update> {

/** @return the update domain count of this availability set */
/**
* Gets the update domain count of this availability set.
*
* @return the update domain count of this availability set
*/
int updateDomainCount();

/** @return the fault domain count of this availability set */
/**
* Gets the fault domain count of this availability set.
*
* @return the fault domain count of this availability set
*/
int faultDomainCount();

/** @return the availability set SKU */
/**
* Gets the availability set SKU.
*
* @return the availability set SKU
*/
AvailabilitySetSkuTypes sku();

/** @return the resource IDs of the virtual machines in the availability set */
/**
* Gets the resource IDs of the virtual machines in the availability set.
*
* @return the resource IDs of the virtual machines in the availability set
*/
Set<String> virtualMachineIds();

/**
Expand All @@ -40,10 +56,18 @@ public interface AvailabilitySet extends GroupableResource<ComputeManager, Avail
*/
ProximityPlacementGroup proximityPlacementGroup();

/** @return the statuses of the existing virtual machines in the availability set */
/**
* Gets the statuses of the existing virtual machines in the availability set.
*
* @return the statuses of the existing virtual machines in the availability set
*/
List<InstanceViewStatus> statuses();

/** @return the virtual machine sizes supported in the availability set */
/**
* Gets the virtual machine sizes supported in the availability set.
*
* @return the virtual machine sizes supported in the availability set
*/
PagedIterable<VirtualMachineSize> listVirtualMachineSizes();

// Fluent interfaces
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ public class ComputeResourceType extends ExpandableStringEnum<ComputeResourceTyp
/** Static value virtualMachines for ComputeResourceType. */
public static final ComputeResourceType VIRTUALMACHINES = fromString("virtualMachines");

/**
* Creates a new instance of ComputeResourceType value.
*
* @deprecated Use the {@link #fromString(String)} factory method.
*/
@Deprecated
public ComputeResourceType() {
}

/**
* Finds or creates compute resource type based on the specified string.
*
Expand All @@ -30,7 +39,11 @@ public static ComputeResourceType fromString(String str) {
return fromString(str, ComputeResourceType.class);
}

/** @return known compute resource types */
/**
* Gets known compute resource types.
*
* @return known compute resource types
*/
public static Collection<ComputeResourceType> values() {
return values(ComputeResourceType.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,25 @@
/** Type representing sku for an Azure compute resource. */
@Fluent
public interface ComputeSku extends HasInnerModel<ResourceSkuInner> {
/** @return the sku name */
/**
* Gets the SKU name.
*
* @return the SKU name
*/
ComputeSkuName name();

/** @return the sku tier */
/**
* Gets the SKU tier.
*
* @return the SKU tier
*/
ComputeSkuTier tier();

/** @return the compute resource type that the sku describes */
/**
* Gets the compute resource type that the SKU describes.
*
* @return the compute resource type that the SKU describes
*/
ComputeResourceType resourceType();

/**
Expand Down Expand Up @@ -54,24 +66,52 @@ public interface ComputeSku extends HasInnerModel<ResourceSkuInner> {
*/
AvailabilitySetSkuTypes availabilitySetSkuType();

/** @return the regions that the sku is available */
/**
* Gets the regions that the SKU is available.
*
* @return the regions that the sku is available
*/
List<Region> regions();

/** @return the availability zones supported for this sku, index by region */
/**
* Gets the availability zones supported for this SKU.
*
* @return the availability zones supported for this SKU, index by region
*/
Map<Region, Set<AvailabilityZoneId>> zones();

/** @return the scaling information of the sku */
/**
* Gets the scaling information of the SKU.
*
* @return the scaling information of the SKU
*/
ResourceSkuCapacity capacity();

/** @return the api versions that this sku supports */
/**
* Gets the api versions that this SKU supports.
*
* @return the api versions that this SKU supports
*/
List<String> apiVersions();

/** @return the metadata for querying the sku pricing information */
/**
* Gets the metadata for querying the SKU pricing information.
*
* @return the metadata for querying the SKU pricing information
*/
List<ResourceSkuCosts> costs();

/** @return the capabilities of the sku */
/**
* Gets the capabilities of the SKU.
*
* @return the capabilities of the SKU
*/
List<ResourceSkuCapabilities> capabilities();

/** @return the restrictions because of which SKU cannot be used */
/**
* Gets the restrictions because of which SKU cannot be used.
*
* @return the restrictions because of which SKU cannot be used
*/
List<ResourceSkuRestrictions> restrictions();
}
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,15 @@ public class ComputeSkuName extends ExpandableStringEnum<ComputeSkuName> {
/** Static value Standard_DS3 for ComputeSkuName. */
public static final ComputeSkuName STANDARD_DS3 = fromString("Standard_DS3");

/**
* Creates a new instance of ComputeSkuName value.
*
* @deprecated Use the {@link #fromString(String)} factory method.
*/
@Deprecated
public ComputeSkuName() {
}

/**
* Creates or finds a ComputeSkuName from its string representation.
*
Expand All @@ -386,7 +395,11 @@ public static ComputeSkuName fromString(String name) {
return fromString(name, ComputeSkuName.class);
}

/** @return known ComputeSkuName values */
/**
* Gets known ComputeSkuName values.
*
* @return known ComputeSkuName values
*/
public static Collection<ComputeSkuName> values() {
return values(ComputeSkuName.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ public class ComputeSkuTier extends ExpandableStringEnum<ComputeSkuTier> {
/** Static value Premium for ComputeSkuTier. */
public static final ComputeSkuTier PREMIUM = fromString("Premium");

/**
* Creates a new instance of ComputeSkuTier value.
*
* @deprecated Use the {@link #fromString(String)} factory method.
*/
@Deprecated
public ComputeSkuTier() {
}

/**
* Creates or finds a ComputeSkuTier from its string representation.
*
Expand All @@ -28,7 +37,11 @@ public static ComputeSkuTier fromString(String name) {
return fromString(name, ComputeSkuTier.class);
}

/** @return known ComputeSkuTier values */
/**
* Gets known ComputeSkuTier values.
*
* @return known ComputeSkuTier values
*/
public static Collection<ComputeSkuTier> values() {
return values(ComputeSkuTier.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,31 @@
/** An immutable client-side representation of an Azure compute resource usage info object. */
@Fluent
public interface ComputeUsage extends HasInnerModel<UsageInner> {
/** @return the unit of measurement */
/**
* Gets the unit of measurement.
*
* @return the unit of measurement
*/
ComputeUsageUnit unit();

/** @return the current count of the allocated resources in the subscription */
/**
* Gets the current count of the allocated resources in the subscription.
*
* @return the current count of the allocated resources in the subscription
*/
int currentValue();

/** @return the maximum count of the resources that can be allocated in the subscription */
/**
* Gets the maximum count of the resources that can be allocated in the subscription.
*
* @return the maximum count of the resources that can be allocated in the subscription
*/
long limit();

/** @return the name of the type of usage */
/**
* Gets the name of the type of usage.
*
* @return the name of the type of usage
*/
UsageName name();
}
Loading

0 comments on commit e7873a6

Please sign in to comment.