Skip to content

Commit

Permalink
CodeGen from PR 30873 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge 830da1d53fc56974ee202002d1da3282340575c0 into e048fbb9268458be5114ab9903808161601cd879
  • Loading branch information
SDKAuto committed Oct 8, 2024
1 parent b471408 commit 58ba759
Show file tree
Hide file tree
Showing 86 changed files with 3,965 additions and 1,944 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.0.0-beta.3 (Unreleased)
## 1.0.0-beta.1 (2024-10-08)

- Azure Resource Manager Compute Fleet client library for Java. This package contains Microsoft Azure SDK for Compute Fleet Management SDK. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).

### Features Added

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Various documentation is available to help you get started
<dependency>
<groupId>com.azure.resourcemanager</groupId>
<artifactId>azure-resourcemanager-computefleet</artifactId>
<version>1.0.0-beta.2</version>
<version>1.0.0-beta.3</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
1,011 changes: 525 additions & 486 deletions sdk/computefleet/azure-resourcemanager-computefleet/SAMPLE.md

Large diffs are not rendered by default.

17 changes: 6 additions & 11 deletions sdk/computefleet/azure-resourcemanager-computefleet/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,9 @@
<jacoco.min.linecoverage>0</jacoco.min.linecoverage>
<jacoco.min.branchcoverage>0</jacoco.min.branchcoverage>
<revapi.skip>true</revapi.skip>
<spotless.skip>false</spotless.skip>
</properties>
<dependencies>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-json</artifactId>
<version>1.3.0</version> <!-- {x-version-update;com.azure:azure-json;dependency} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-core</artifactId>
Expand All @@ -68,18 +64,17 @@
<artifactId>azure-core-test</artifactId>
<version>1.27.0-beta.2</version> <!-- {x-version-update;com.azure:azure-core-test;dependency} -->
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>com.azure</groupId>
<artifactId>azure-core-http-jdk-httpclient</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-identity</artifactId>
<version>1.14.0</version> <!-- {x-version-update;com.azure:azure-identity;dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-json</artifactId>
<version>1.3.0</version> <!-- {x-version-update;com.azure:azure-json;dependency} -->
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public FleetsClient getFleets() {
this.defaultPollInterval = defaultPollInterval;
this.endpoint = endpoint;
this.subscriptionId = subscriptionId;
this.apiVersion = "2024-05-01-preview";
this.apiVersion = "2024-11-01";
this.operations = new OperationsClientImpl(this);
this.fleets = new FleetsClientImpl(this);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) TypeSpec Code Generator.

package com.azure.resourcemanager.computefleet.models;

import com.azure.core.util.ExpandableStringEnum;
import java.util.Collection;

/**
* Accelerator manufacturers supported by Azure VMs.
*/
public final class AcceleratorManufacturer extends ExpandableStringEnum<AcceleratorManufacturer> {
/**
* AMD GpuType.
*/
public static final AcceleratorManufacturer AMD = fromString("AMD");

/**
* Nvidia GpuType.
*/
public static final AcceleratorManufacturer NVIDIA = fromString("Nvidia");

/**
* Xilinx GpuType.
*/
public static final AcceleratorManufacturer XILINX = fromString("Xilinx");

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

/**
* Creates or finds a AcceleratorManufacturer from its string representation.
*
* @param name a name to look for.
* @return the corresponding AcceleratorManufacturer.
*/
public static AcceleratorManufacturer fromString(String name) {
return fromString(name, AcceleratorManufacturer.class);
}

/**
* Gets known AcceleratorManufacturer values.
*
* @return known AcceleratorManufacturer values.
*/
public static Collection<AcceleratorManufacturer> values() {
return values(AcceleratorManufacturer.class);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) TypeSpec Code Generator.

package com.azure.resourcemanager.computefleet.models;

import com.azure.core.util.ExpandableStringEnum;
import java.util.Collection;

/**
* Accelerator types supported by Azure VMs.
*/
public final class AcceleratorType extends ExpandableStringEnum<AcceleratorType> {
/**
* GPU Accelerator.
*/
public static final AcceleratorType GPU = fromString("GPU");

/**
* FPGA Accelerator.
*/
public static final AcceleratorType FPGA = fromString("FPGA");

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

/**
* Creates or finds a AcceleratorType from its string representation.
*
* @param name a name to look for.
* @return the corresponding AcceleratorType.
*/
public static AcceleratorType fromString(String name) {
return fromString(name, AcceleratorType.class);
}

/**
* Gets known AcceleratorType values.
*
* @return known AcceleratorType values.
*/
public static Collection<AcceleratorType> values() {
return values(AcceleratorType.class);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) TypeSpec Code Generator.

package com.azure.resourcemanager.computefleet.models;

import com.azure.core.annotation.Fluent;
import com.azure.json.JsonReader;
import com.azure.json.JsonSerializable;
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import java.io.IOException;

/**
* AdditionalCapabilities for VM.
*/
@Fluent
public final class AdditionalCapabilities implements JsonSerializable<AdditionalCapabilities> {
/*
* The flag that enables or disables a capability to have one or more managed data disks with UltraSSD_LRS storage
* account type on the VM or VMSS.
* Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale
* set only if this property is enabled.
*/
private Boolean ultraSSDEnabled;

/*
* The flag that enables or disables hibernation capability on the VM.
*/
private Boolean hibernationEnabled;

/**
* Creates an instance of AdditionalCapabilities class.
*/
public AdditionalCapabilities() {
}

/**
* Get the ultraSSDEnabled property: The flag that enables or disables a capability to have one or more managed data
* disks with UltraSSD_LRS storage account type on the VM or VMSS.
* Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale
* set only if this property is enabled.
*
* @return the ultraSSDEnabled value.
*/
public Boolean ultraSSDEnabled() {
return this.ultraSSDEnabled;
}

/**
* Set the ultraSSDEnabled property: The flag that enables or disables a capability to have one or more managed data
* disks with UltraSSD_LRS storage account type on the VM or VMSS.
* Managed disks with storage account type UltraSSD_LRS can be added to a virtual machine or virtual machine scale
* set only if this property is enabled.
*
* @param ultraSSDEnabled the ultraSSDEnabled value to set.
* @return the AdditionalCapabilities object itself.
*/
public AdditionalCapabilities withUltraSSDEnabled(Boolean ultraSSDEnabled) {
this.ultraSSDEnabled = ultraSSDEnabled;
return this;
}

/**
* Get the hibernationEnabled property: The flag that enables or disables hibernation capability on the VM.
*
* @return the hibernationEnabled value.
*/
public Boolean hibernationEnabled() {
return this.hibernationEnabled;
}

/**
* Set the hibernationEnabled property: The flag that enables or disables hibernation capability on the VM.
*
* @param hibernationEnabled the hibernationEnabled value to set.
* @return the AdditionalCapabilities object itself.
*/
public AdditionalCapabilities withHibernationEnabled(Boolean hibernationEnabled) {
this.hibernationEnabled = hibernationEnabled;
return this;
}

/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
}

/**
* {@inheritDoc}
*/
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeBooleanField("ultraSSDEnabled", this.ultraSSDEnabled);
jsonWriter.writeBooleanField("hibernationEnabled", this.hibernationEnabled);
return jsonWriter.writeEndObject();
}

/**
* Reads an instance of AdditionalCapabilities from the JsonReader.
*
* @param jsonReader The JsonReader being read.
* @return An instance of AdditionalCapabilities if the JsonReader was pointing to an instance of it, or null if it
* was pointing to JSON null.
* @throws IOException If an error occurs while reading the AdditionalCapabilities.
*/
public static AdditionalCapabilities fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
AdditionalCapabilities deserializedAdditionalCapabilities = new AdditionalCapabilities();
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();

if ("ultraSSDEnabled".equals(fieldName)) {
deserializedAdditionalCapabilities.ultraSSDEnabled = reader.getNullable(JsonReader::getBoolean);
} else if ("hibernationEnabled".equals(fieldName)) {
deserializedAdditionalCapabilities.hibernationEnabled = reader.getNullable(JsonReader::getBoolean);
} else {
reader.skipChildren();
}
}

return deserializedAdditionalCapabilities;
});
}
}
Loading

0 comments on commit 58ba759

Please sign in to comment.