forked from Azure/azure-sdk-for-java
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CodeGen from PR 30873 in Azure/azure-rest-api-specs
Merge 830da1d53fc56974ee202002d1da3282340575c0 into e048fbb9268458be5114ab9903808161601cd879
- Loading branch information
SDKAuto
committed
Oct 8, 2024
1 parent
b471408
commit 58ba759
Showing
86 changed files
with
3,965 additions
and
1,944 deletions.
There are no files selected for viewing
4 changes: 3 additions & 1 deletion
4
sdk/computefleet/azure-resourcemanager-computefleet/CHANGELOG.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1,011 changes: 525 additions & 486 deletions
1,011
sdk/computefleet/azure-resourcemanager-computefleet/SAMPLE.md
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
.../src/main/java/com/azure/resourcemanager/computefleet/models/AcceleratorManufacturer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |
51 changes: 51 additions & 0 deletions
51
...utefleet/src/main/java/com/azure/resourcemanager/computefleet/models/AcceleratorType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |
130 changes: 130 additions & 0 deletions
130
...t/src/main/java/com/azure/resourcemanager/computefleet/models/AdditionalCapabilities.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
}); | ||
} | ||
} |
Oops, something went wrong.