Skip to content

Commit

Permalink
mgmt, local generation for Compute ComputeRP 2024-07-01 (#41599)
Browse files Browse the repository at this point in the history
* mgmt, local generation for Compute ComputeRP 2024-07-01
  • Loading branch information
v-hongli1 authored Aug 23, 2024
1 parent 9cb33ee commit a7ceacb
Show file tree
Hide file tree
Showing 245 changed files with 1,658 additions and 844 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,12 @@
"old": "class com.azure.resourcemanager.sql.models.UserIdentity",
"new": "class com.azure.resourcemanager.sql.models.UserIdentity",
"justification": "Customer unlikely to subclass this class."
},
{
"ignore": true,
"code": "java.method.removed",
"old": "method com.azure.resourcemanager.compute.models.WindowsConfiguration com.azure.resourcemanager.compute.models.WindowsConfiguration::withEnableVMAgentPlatformUpdates(java.lang.Boolean)",
"justification": "Service changed the property to readOnly."
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion sdk/resourcemanager/api-specs.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"dir": "azure-resourcemanager-compute",
"source": "specification/compute/resource-manager/readme.md",
"package": "com.azure.resourcemanager.compute",
"args": "--tag=package-2024-03-02 --modelerfour.lenient-model-deduplication=true --rename-model=UserAssignedIdentitiesValue:VirtualMachineIdentityUserAssignedIdentities,VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue:VirtualMachineScaleSetIdentityUserAssignedIdentities --preserve-model=AvailabilitySetSkuTypes --remove-inner=StorageProfile"
"args": "--tag=package-2024-07-01 --modelerfour.lenient-model-deduplication=true --rename-model=UserAssignedIdentitiesValue:VirtualMachineIdentityUserAssignedIdentities,VirtualMachineScaleSetIdentityUserAssignedIdentitiesValue:VirtualMachineScaleSetIdentityUserAssignedIdentities --preserve-model=AvailabilitySetSkuTypes --remove-inner=StorageProfile"
},
"compute-hybrid": {
"dir": "../resourcemanagerhybrid/azure-resourcemanager-compute",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@

- Replaced `Jackson` with `azure-json` for serialization/deserialization.

#### Dependency Updates

- Updated `api-version` of ComputeRP to `2024-07-01`.

## 2.41.0 (2024-07-25)

### Breaking Changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "java",
"TagPrefix": "java/resourcemanager/azure-resourcemanager-compute",
"Tag": "java/resourcemanager/azure-resourcemanager-compute_edd86fab08"
"Tag": "java/resourcemanager/azure-resourcemanager-compute_84b714bb03"
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import com.azure.resourcemanager.compute.models.InstanceViewStatus;
import com.azure.resourcemanager.compute.models.ScheduledEventsPolicy;
import com.azure.resourcemanager.compute.models.Sku;
import java.io.IOException;
import java.util.List;
Expand Down Expand Up @@ -244,6 +245,31 @@ public List<InstanceViewStatus> statuses() {
return this.innerProperties() == null ? null : this.innerProperties().statuses();
}

/**
* Get the scheduledEventsPolicy property: Specifies Redeploy, Reboot and ScheduledEventsAdditionalPublishingTargets
* Scheduled Event related configurations for the availability set.
*
* @return the scheduledEventsPolicy value.
*/
public ScheduledEventsPolicy scheduledEventsPolicy() {
return this.innerProperties() == null ? null : this.innerProperties().scheduledEventsPolicy();
}

/**
* Set the scheduledEventsPolicy property: Specifies Redeploy, Reboot and ScheduledEventsAdditionalPublishingTargets
* Scheduled Event related configurations for the availability set.
*
* @param scheduledEventsPolicy the scheduledEventsPolicy value to set.
* @return the AvailabilitySetInner object itself.
*/
public AvailabilitySetInner withScheduledEventsPolicy(ScheduledEventsPolicy scheduledEventsPolicy) {
if (this.innerProperties() == null) {
this.innerProperties = new AvailabilitySetProperties();
}
this.innerProperties().withScheduledEventsPolicy(scheduledEventsPolicy);
return this;
}

/**
* Validates the instance.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import com.azure.json.JsonToken;
import com.azure.json.JsonWriter;
import com.azure.resourcemanager.compute.models.InstanceViewStatus;
import com.azure.resourcemanager.compute.models.ScheduledEventsPolicy;
import java.io.IOException;
import java.util.List;

Expand Down Expand Up @@ -45,6 +46,12 @@ public final class AvailabilitySetProperties implements JsonSerializable<Availab
*/
private List<InstanceViewStatus> statuses;

/*
* Specifies Redeploy, Reboot and ScheduledEventsAdditionalPublishingTargets Scheduled Event related configurations
* for the availability set.
*/
private ScheduledEventsPolicy scheduledEventsPolicy;

/**
* Creates an instance of AvailabilitySetProperties class.
*/
Expand Down Expand Up @@ -142,6 +149,28 @@ public List<InstanceViewStatus> statuses() {
return this.statuses;
}

/**
* Get the scheduledEventsPolicy property: Specifies Redeploy, Reboot and ScheduledEventsAdditionalPublishingTargets
* Scheduled Event related configurations for the availability set.
*
* @return the scheduledEventsPolicy value.
*/
public ScheduledEventsPolicy scheduledEventsPolicy() {
return this.scheduledEventsPolicy;
}

/**
* Set the scheduledEventsPolicy property: Specifies Redeploy, Reboot and ScheduledEventsAdditionalPublishingTargets
* Scheduled Event related configurations for the availability set.
*
* @param scheduledEventsPolicy the scheduledEventsPolicy value to set.
* @return the AvailabilitySetProperties object itself.
*/
public AvailabilitySetProperties withScheduledEventsPolicy(ScheduledEventsPolicy scheduledEventsPolicy) {
this.scheduledEventsPolicy = scheduledEventsPolicy;
return this;
}

/**
* Validates the instance.
*
Expand All @@ -151,6 +180,9 @@ public void validate() {
if (statuses() != null) {
statuses().forEach(e -> e.validate());
}
if (scheduledEventsPolicy() != null) {
scheduledEventsPolicy().validate();
}
}

/**
Expand All @@ -164,6 +196,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeArrayField("virtualMachines", this.virtualMachines,
(writer, element) -> writer.writeJson(element));
jsonWriter.writeJsonField("proximityPlacementGroup", this.proximityPlacementGroup);
jsonWriter.writeJsonField("scheduledEventsPolicy", this.scheduledEventsPolicy);
return jsonWriter.writeEndObject();
}

Expand Down Expand Up @@ -197,6 +230,9 @@ public static AvailabilitySetProperties fromJson(JsonReader jsonReader) throws I
List<InstanceViewStatus> statuses
= reader.readArray(reader1 -> InstanceViewStatus.fromJson(reader1));
deserializedAvailabilitySetProperties.statuses = statuses;
} else if ("scheduledEventsPolicy".equals(fieldName)) {
deserializedAvailabilitySetProperties.scheduledEventsPolicy
= ScheduledEventsPolicy.fromJson(reader);
} else {
reader.skipChildren();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public CapacityReservationGroupInstanceView instanceView() {
* Get the sharingProfile property: Specifies the settings to enable sharing across subscriptions for the capacity
* reservation group resource. Pls. keep in mind the capacity reservation group resource generally can be shared
* across subscriptions belonging to a single azure AAD tenant or cross AAD tenant if there is a trust relationship
* established between the AAD tenants. **Note:** Minimum api-version: 2024-03-01. Please refer to
* established between the AAD tenants. **Note:** Minimum api-version: 2023-09-01. Please refer to
* https://aka.ms/computereservationsharing for more details.
*
* @return the sharingProfile value.
Expand All @@ -184,7 +184,7 @@ public ResourceSharingProfile sharingProfile() {
* Set the sharingProfile property: Specifies the settings to enable sharing across subscriptions for the capacity
* reservation group resource. Pls. keep in mind the capacity reservation group resource generally can be shared
* across subscriptions belonging to a single azure AAD tenant or cross AAD tenant if there is a trust relationship
* established between the AAD tenants. **Note:** Minimum api-version: 2024-03-01. Please refer to
* established between the AAD tenants. **Note:** Minimum api-version: 2023-09-01. Please refer to
* https://aka.ms/computereservationsharing for more details.
*
* @param sharingProfile the sharingProfile value to set.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public final class CapacityReservationGroupProperties implements JsonSerializabl
* Specifies the settings to enable sharing across subscriptions for the capacity reservation group resource. Pls.
* keep in mind the capacity reservation group resource generally can be shared across subscriptions belonging to a
* single azure AAD tenant or cross AAD tenant if there is a trust relationship established between the AAD tenants.
* **Note:** Minimum api-version: 2024-03-01. Please refer to https://aka.ms/computereservationsharing for more
* **Note:** Minimum api-version: 2023-09-01. Please refer to https://aka.ms/computereservationsharing for more
* details.
*/
private ResourceSharingProfile sharingProfile;
Expand Down Expand Up @@ -85,7 +85,7 @@ public CapacityReservationGroupInstanceView instanceView() {
* Get the sharingProfile property: Specifies the settings to enable sharing across subscriptions for the capacity
* reservation group resource. Pls. keep in mind the capacity reservation group resource generally can be shared
* across subscriptions belonging to a single azure AAD tenant or cross AAD tenant if there is a trust relationship
* established between the AAD tenants. **Note:** Minimum api-version: 2024-03-01. Please refer to
* established between the AAD tenants. **Note:** Minimum api-version: 2023-09-01. Please refer to
* https://aka.ms/computereservationsharing for more details.
*
* @return the sharingProfile value.
Expand All @@ -98,7 +98,7 @@ public ResourceSharingProfile sharingProfile() {
* Set the sharingProfile property: Specifies the settings to enable sharing across subscriptions for the capacity
* reservation group resource. Pls. keep in mind the capacity reservation group resource generally can be shared
* across subscriptions belonging to a single azure AAD tenant or cross AAD tenant if there is a trust relationship
* established between the AAD tenants. **Note:** Minimum api-version: 2024-03-01. Please refer to
* established between the AAD tenants. **Note:** Minimum api-version: 2023-09-01. Please refer to
* https://aka.ms/computereservationsharing for more details.
*
* @param sharingProfile the sharingProfile value to set.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@
import com.azure.resourcemanager.compute.models.ScaleInPolicy;
import com.azure.resourcemanager.compute.models.ScheduledEventsPolicy;
import com.azure.resourcemanager.compute.models.Sku;
import com.azure.resourcemanager.compute.models.SkuProfile;
import com.azure.resourcemanager.compute.models.SpotRestorePolicy;
import com.azure.resourcemanager.compute.models.UpgradePolicy;
import com.azure.resourcemanager.compute.models.VirtualMachineScaleSetIdentity;
import com.azure.resourcemanager.compute.models.VirtualMachineScaleSetVMProfile;
import com.azure.resourcemanager.compute.models.ZonalPlatformFaultDomainAlignMode;
import java.io.IOException;
import java.time.OffsetDateTime;
import java.util.List;
Expand Down Expand Up @@ -58,7 +60,7 @@ public final class VirtualMachineScaleSetInner extends Resource {
private VirtualMachineScaleSetIdentity identity;

/*
* The virtual machine scale set zones. NOTE: Availability zones can only be set when you create the scale set
* The virtual machine scale set zones.
*/
private List<String> zones;

Expand Down Expand Up @@ -172,8 +174,7 @@ public VirtualMachineScaleSetInner withIdentity(VirtualMachineScaleSetIdentity i
}

/**
* Get the zones property: The virtual machine scale set zones. NOTE: Availability zones can only be set when you
* create the scale set.
* Get the zones property: The virtual machine scale set zones.
*
* @return the zones value.
*/
Expand All @@ -182,8 +183,7 @@ public List<String> zones() {
}

/**
* Set the zones property: The virtual machine scale set zones. NOTE: Availability zones can only be set when you
* create the scale set.
* Set the zones property: The virtual machine scale set zones.
*
* @param zones the zones value to set.
* @return the VirtualMachineScaleSetInner object itself.
Expand Down Expand Up @@ -739,6 +739,55 @@ public VirtualMachineScaleSetInner withResiliencyPolicy(ResiliencyPolicy resilie
return this;
}

/**
* Get the zonalPlatformFaultDomainAlignMode property: Specifies the align mode between Virtual Machine Scale Set
* compute and storage Fault Domain count.
*
* @return the zonalPlatformFaultDomainAlignMode value.
*/
public ZonalPlatformFaultDomainAlignMode zonalPlatformFaultDomainAlignMode() {
return this.innerProperties() == null ? null : this.innerProperties().zonalPlatformFaultDomainAlignMode();
}

/**
* Set the zonalPlatformFaultDomainAlignMode property: Specifies the align mode between Virtual Machine Scale Set
* compute and storage Fault Domain count.
*
* @param zonalPlatformFaultDomainAlignMode the zonalPlatformFaultDomainAlignMode value to set.
* @return the VirtualMachineScaleSetInner object itself.
*/
public VirtualMachineScaleSetInner
withZonalPlatformFaultDomainAlignMode(ZonalPlatformFaultDomainAlignMode zonalPlatformFaultDomainAlignMode) {
if (this.innerProperties() == null) {
this.innerProperties = new VirtualMachineScaleSetProperties();
}
this.innerProperties().withZonalPlatformFaultDomainAlignMode(zonalPlatformFaultDomainAlignMode);
return this;
}

/**
* Get the skuProfile property: Specifies the sku profile for the virtual machine scale set.
*
* @return the skuProfile value.
*/
public SkuProfile skuProfile() {
return this.innerProperties() == null ? null : this.innerProperties().skuProfile();
}

/**
* Set the skuProfile property: Specifies the sku profile for the virtual machine scale set.
*
* @param skuProfile the skuProfile value to set.
* @return the VirtualMachineScaleSetInner object itself.
*/
public VirtualMachineScaleSetInner withSkuProfile(SkuProfile skuProfile) {
if (this.innerProperties() == null) {
this.innerProperties = new VirtualMachineScaleSetProperties();
}
this.innerProperties().withSkuProfile(skuProfile);
return this;
}

/**
* Validates the instance.
*
Expand Down
Loading

0 comments on commit a7ceacb

Please sign in to comment.