Skip to content

Commit

Permalink
Dev Center rename to InUnit (#39957)
Browse files Browse the repository at this point in the history
* Rename to <InUnits>

* Update merged commit hash
  • Loading branch information
drielenr authored Apr 29, 2024
1 parent 52ffe16 commit 87e28e1
Show file tree
Hide file tree
Showing 11 changed files with 76 additions and 76 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ public final class DevBoxHardwareProfile implements JsonSerializable<DevBoxHardw
@Generated
private Integer vCpus;

/*
* The amount of memory available for the Dev Box.
*/
@Generated
private Integer memoryGb;

/**
* Creates an instance of DevBoxHardwareProfile class.
*/
Expand Down Expand Up @@ -62,16 +56,6 @@ public Integer getVCpus() {
return this.vCpus;
}

/**
* Get the memoryGb property: The amount of memory available for the Dev Box.
*
* @return the memoryGb value.
*/
@Generated
public Integer getMemoryGb() {
return this.memoryGb;
}

/**
* {@inheritDoc}
*/
Expand Down Expand Up @@ -102,12 +86,28 @@ public static DevBoxHardwareProfile fromJson(JsonReader jsonReader) throws IOExc
} else if ("vCPUs".equals(fieldName)) {
deserializedDevBoxHardwareProfile.vCpus = reader.getNullable(JsonReader::getInt);
} else if ("memoryGB".equals(fieldName)) {
deserializedDevBoxHardwareProfile.memoryGb = reader.getNullable(JsonReader::getInt);
deserializedDevBoxHardwareProfile.memoryInGb = reader.getNullable(JsonReader::getInt);
} else {
reader.skipChildren();
}
}
return deserializedDevBoxHardwareProfile;
});
}

/*
* The amount of memory available for the Dev Box.
*/
@Generated
private Integer memoryInGb;

/**
* Get the memoryInGb property: The amount of memory available for the Dev Box.
*
* @return the memoryInGb value.
*/
@Generated
public Integer getMemoryInGb() {
return this.memoryInGb;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,13 @@
@Immutable
public final class OsDisk implements JsonSerializable<OsDisk> {

/*
* The size of the OS Disk in gigabytes.
*/
@Generated
private Integer diskSizeGb;

/**
* Creates an instance of OsDisk class.
*/
@Generated
private OsDisk() {
}

/**
* Get the diskSizeGb property: The size of the OS Disk in gigabytes.
*
* @return the diskSizeGb value.
*/
@Generated
public Integer getDiskSizeGb() {
return this.diskSizeGb;
}

/**
* {@inheritDoc}
*/
Expand All @@ -66,12 +50,28 @@ public static OsDisk fromJson(JsonReader jsonReader) throws IOException {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("diskSizeGB".equals(fieldName)) {
deserializedOsDisk.diskSizeGb = reader.getNullable(JsonReader::getInt);
deserializedOsDisk.diskSizeInGb = reader.getNullable(JsonReader::getInt);
} else {
reader.skipChildren();
}
}
return deserializedOsDisk;
});
}

/*
* The size of the OS Disk in gigabytes.
*/
@Generated
private Integer diskSizeInGb;

/**
* Get the diskSizeInGb property: The size of the OS Disk in gigabytes.
*
* @return the diskSizeInGb value.
*/
@Generated
public Integer getDiskSizeInGb() {
return this.diskSizeInGb;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,6 @@ public final class StopOnDisconnectConfiguration implements JsonSerializable<Sto
@Generated
private final StopOnDisconnectStatus status;

/*
* The specified time in minutes to wait before stopping a Dev Box once disconnect
* is detected.
*/
@Generated
private Integer gracePeriodMinutes;

/**
* Creates an instance of StopOnDisconnectConfiguration class.
*
Expand All @@ -52,18 +45,6 @@ public StopOnDisconnectStatus getStatus() {
return this.status;
}

/**
* Get the gracePeriodMinutes property: The specified time in minutes to wait before stopping a Dev Box once
* disconnect
* is detected.
*
* @return the gracePeriodMinutes value.
*/
@Generated
public Integer getGracePeriodMinutes() {
return this.gracePeriodMinutes;
}

/**
* {@inheritDoc}
*/
Expand All @@ -72,7 +53,7 @@ public Integer getGracePeriodMinutes() {
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString());
jsonWriter.writeNumberField("gracePeriodMinutes", this.gracePeriodMinutes);
jsonWriter.writeNumberField("gracePeriodMinutes", this.gracePeriodInMinutes);
return jsonWriter.writeEndObject();
}

Expand All @@ -89,22 +70,41 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
public static StopOnDisconnectConfiguration fromJson(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
StopOnDisconnectStatus status = null;
Integer gracePeriodMinutes = null;
Integer gracePeriodInMinutes = null;
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if ("status".equals(fieldName)) {
status = StopOnDisconnectStatus.fromString(reader.getString());
} else if ("gracePeriodMinutes".equals(fieldName)) {
gracePeriodMinutes = reader.getNullable(JsonReader::getInt);
gracePeriodInMinutes = reader.getNullable(JsonReader::getInt);
} else {
reader.skipChildren();
}
}
StopOnDisconnectConfiguration deserializedStopOnDisconnectConfiguration
= new StopOnDisconnectConfiguration(status);
deserializedStopOnDisconnectConfiguration.gracePeriodMinutes = gracePeriodMinutes;
deserializedStopOnDisconnectConfiguration.gracePeriodInMinutes = gracePeriodInMinutes;
return deserializedStopOnDisconnectConfiguration;
});
}

/*
* The specified time in minutes to wait before stopping a Dev Box once disconnect
* is detected.
*/
@Generated
private Integer gracePeriodInMinutes;

/**
* Get the gracePeriodInMinutes property: The specified time in minutes to wait before stopping a Dev Box once
* disconnect
* is detected.
*
* @return the gracePeriodInMinutes value.
*/
@Generated
public Integer getGracePeriodInMinutes() {
return this.gracePeriodInMinutes;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -250,13 +250,13 @@ public void validateDevBox(DevBox devBox) {
Assertions.assertNotNull(responseHardwareProfile);
Assertions.assertEquals(8, responseHardwareProfile.getVCpus());
Assertions.assertEquals(SkuName.GENERAL_I_8C32GB1024SSD_V2, responseHardwareProfile.getSkuName());
Assertions.assertEquals(32, responseHardwareProfile.getMemoryGb());
Assertions.assertEquals(32, responseHardwareProfile.getMemoryInGb());
// verify property "storageProfile"
DevBoxStorageProfile responseStorageProfile = devBox.getStorageProfile();
Assertions.assertNotNull(responseStorageProfile);
OsDisk responseStorageProfileOsDisk = responseStorageProfile.getOsDisk();
Assertions.assertNotNull(responseStorageProfileOsDisk);
Assertions.assertEquals(1024, responseStorageProfileOsDisk.getDiskSizeGb());
Assertions.assertEquals(1024, responseStorageProfileOsDisk.getDiskSizeInGb());
// verify property "imageReference"
DevBoxImageReference responseImageReference = devBox.getImageReference();
Assertions.assertNotNull(responseImageReference);
Expand Down Expand Up @@ -286,15 +286,15 @@ public void validatePool(DevBoxPool pool) {
Assertions.assertNotNull(responseHardwareProfile);
Assertions.assertEquals(8, responseHardwareProfile.getVCpus());
Assertions.assertEquals(SkuName.GENERAL_I_8C32GB1024SSD_V2, responseHardwareProfile.getSkuName());
Assertions.assertEquals(32, responseHardwareProfile.getMemoryGb());
Assertions.assertEquals(32, responseHardwareProfile.getMemoryInGb());
// verify property "hibernateSupport"
Assertions.assertEquals(HibernateSupport.DISABLED, pool.getHibernateSupport());
// verify property "storageProfile"
DevBoxStorageProfile responseStorageProfile = pool.getStorageProfile();
Assertions.assertNotNull(responseStorageProfile);
OsDisk responseStorageProfileOsDisk = responseStorageProfile.getOsDisk();
Assertions.assertNotNull(responseStorageProfileOsDisk);
Assertions.assertEquals(1024, responseStorageProfileOsDisk.getDiskSizeGb());
Assertions.assertEquals(1024, responseStorageProfileOsDisk.getDiskSizeInGb());
// verify property "imageReference"
DevBoxImageReference responseImageReference = pool.getImageReference();
Assertions.assertNotNull(responseImageReference);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ public void testGetsADevBoxTests() {
DevBoxHardwareProfile responseHardwareProfile = response.getHardwareProfile();
Assertions.assertNotNull(responseHardwareProfile);
Assertions.assertEquals(8, responseHardwareProfile.getVCpus());
Assertions.assertEquals(32, responseHardwareProfile.getMemoryGb());
Assertions.assertEquals(32, responseHardwareProfile.getMemoryInGb());
// verify property "storageProfile"
DevBoxStorageProfile responseStorageProfile = response.getStorageProfile();
Assertions.assertNotNull(responseStorageProfile);
OsDisk responseStorageProfileOsDisk = responseStorageProfile.getOsDisk();
Assertions.assertNotNull(responseStorageProfileOsDisk);
Assertions.assertEquals(1024, responseStorageProfileOsDisk.getDiskSizeGb());
Assertions.assertEquals(1024, responseStorageProfileOsDisk.getDiskSizeInGb());
// verify property "imageReference"
DevBoxImageReference responseImageReference = response.getImageReference();
Assertions.assertNotNull(responseImageReference);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ public void testGetsAPoolTests() {
DevBoxHardwareProfile responseHardwareProfile = response.getHardwareProfile();
Assertions.assertNotNull(responseHardwareProfile);
Assertions.assertEquals(8, responseHardwareProfile.getVCpus());
Assertions.assertEquals(32, responseHardwareProfile.getMemoryGb());
Assertions.assertEquals(32, responseHardwareProfile.getMemoryInGb());
// verify property "hibernateSupport"
Assertions.assertEquals(HibernateSupport.ENABLED, response.getHibernateSupport());
// verify property "storageProfile"
DevBoxStorageProfile responseStorageProfile = response.getStorageProfile();
Assertions.assertNotNull(responseStorageProfile);
OsDisk responseStorageProfileOsDisk = responseStorageProfile.getOsDisk();
Assertions.assertNotNull(responseStorageProfileOsDisk);
Assertions.assertEquals(1024, responseStorageProfileOsDisk.getDiskSizeGb());
Assertions.assertEquals(1024, responseStorageProfileOsDisk.getDiskSizeInGb());
// verify property "imageReference"
DevBoxImageReference responseImageReference = response.getImageReference();
Assertions.assertNotNull(responseImageReference);
Expand All @@ -57,7 +57,7 @@ public void testGetsAPoolTests() {
StopOnDisconnectConfiguration responseStopOnDisconnect = response.getStopOnDisconnect();
Assertions.assertNotNull(responseStopOnDisconnect);
Assertions.assertEquals(StopOnDisconnectStatus.ENABLED, responseStopOnDisconnect.getStatus());
Assertions.assertEquals(60, responseStopOnDisconnect.getGracePeriodMinutes());
Assertions.assertEquals(60, responseStopOnDisconnect.getGracePeriodInMinutes());
// verify property "healthStatus"
Assertions.assertEquals(PoolHealthStatus.HEALTHY, response.getHealthStatus());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ public void testListsAvailablePoolsTests() {
DevBoxHardwareProfile firstItemHardwareProfile = firstItem.getHardwareProfile();
Assertions.assertNotNull(firstItemHardwareProfile);
Assertions.assertEquals(8, firstItemHardwareProfile.getVCpus());
Assertions.assertEquals(32, firstItemHardwareProfile.getMemoryGb());
Assertions.assertEquals(32, firstItemHardwareProfile.getMemoryInGb());
// verify property "hibernateSupport"
Assertions.assertEquals(HibernateSupport.ENABLED, firstItem.getHibernateSupport());
// verify property "storageProfile"
DevBoxStorageProfile firstItemStorageProfile = firstItem.getStorageProfile();
Assertions.assertNotNull(firstItemStorageProfile);
OsDisk firstItemStorageProfileOsDisk = firstItemStorageProfile.getOsDisk();
Assertions.assertNotNull(firstItemStorageProfileOsDisk);
Assertions.assertEquals(1024, firstItemStorageProfileOsDisk.getDiskSizeGb());
Assertions.assertEquals(1024, firstItemStorageProfileOsDisk.getDiskSizeInGb());
// verify property "imageReference"
DevBoxImageReference firstItemImageReference = firstItem.getImageReference();
Assertions.assertNotNull(firstItemImageReference);
Expand All @@ -60,7 +60,7 @@ public void testListsAvailablePoolsTests() {
StopOnDisconnectConfiguration firstItemStopOnDisconnect = firstItem.getStopOnDisconnect();
Assertions.assertNotNull(firstItemStopOnDisconnect);
Assertions.assertEquals(StopOnDisconnectStatus.ENABLED, firstItemStopOnDisconnect.getStatus());
Assertions.assertEquals(60, firstItemStopOnDisconnect.getGracePeriodMinutes());
Assertions.assertEquals(60, firstItemStopOnDisconnect.getGracePeriodInMinutes());
// verify property "healthStatus"
Assertions.assertEquals(PoolHealthStatus.HEALTHY, firstItem.getHealthStatus());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ public void testListsDevBoxesInTheDevCenterForAParticularUserTests() {
DevBoxHardwareProfile firstItemHardwareProfile = firstItem.getHardwareProfile();
Assertions.assertNotNull(firstItemHardwareProfile);
Assertions.assertEquals(8, firstItemHardwareProfile.getVCpus());
Assertions.assertEquals(32, firstItemHardwareProfile.getMemoryGb());
Assertions.assertEquals(32, firstItemHardwareProfile.getMemoryInGb());
// verify property "storageProfile"
DevBoxStorageProfile firstItemStorageProfile = firstItem.getStorageProfile();
Assertions.assertNotNull(firstItemStorageProfile);
OsDisk firstItemStorageProfileOsDisk = firstItemStorageProfile.getOsDisk();
Assertions.assertNotNull(firstItemStorageProfileOsDisk);
Assertions.assertEquals(1024, firstItemStorageProfileOsDisk.getDiskSizeGb());
Assertions.assertEquals(1024, firstItemStorageProfileOsDisk.getDiskSizeInGb());
// verify property "imageReference"
DevBoxImageReference firstItemImageReference = firstItem.getImageReference();
Assertions.assertNotNull(firstItemImageReference);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ public void testListsDevBoxesInTheProjectForAParticularUserTests() {
DevBoxHardwareProfile firstItemHardwareProfile = firstItem.getHardwareProfile();
Assertions.assertNotNull(firstItemHardwareProfile);
Assertions.assertEquals(8, firstItemHardwareProfile.getVCpus());
Assertions.assertEquals(32, firstItemHardwareProfile.getMemoryGb());
Assertions.assertEquals(32, firstItemHardwareProfile.getMemoryInGb());
// verify property "storageProfile"
DevBoxStorageProfile firstItemStorageProfile = firstItem.getStorageProfile();
Assertions.assertNotNull(firstItemStorageProfile);
OsDisk firstItemStorageProfileOsDisk = firstItemStorageProfile.getOsDisk();
Assertions.assertNotNull(firstItemStorageProfileOsDisk);
Assertions.assertEquals(1024, firstItemStorageProfileOsDisk.getDiskSizeGb());
Assertions.assertEquals(1024, firstItemStorageProfileOsDisk.getDiskSizeInGb());
// verify property "imageReference"
DevBoxImageReference firstItemImageReference = firstItem.getImageReference();
Assertions.assertNotNull(firstItemImageReference);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ public void testListsDevBoxesThatTheCallerHasAccessToInTheDevCenterTests() {
DevBoxHardwareProfile firstItemHardwareProfile = firstItem.getHardwareProfile();
Assertions.assertNotNull(firstItemHardwareProfile);
Assertions.assertEquals(8, firstItemHardwareProfile.getVCpus());
Assertions.assertEquals(32, firstItemHardwareProfile.getMemoryGb());
Assertions.assertEquals(32, firstItemHardwareProfile.getMemoryInGb());
// verify property "storageProfile"
DevBoxStorageProfile firstItemStorageProfile = firstItem.getStorageProfile();
Assertions.assertNotNull(firstItemStorageProfile);
OsDisk firstItemStorageProfileOsDisk = firstItemStorageProfile.getOsDisk();
Assertions.assertNotNull(firstItemStorageProfileOsDisk);
Assertions.assertEquals(1024, firstItemStorageProfileOsDisk.getDiskSizeGb());
Assertions.assertEquals(1024, firstItemStorageProfileOsDisk.getDiskSizeInGb());
// verify property "imageReference"
DevBoxImageReference firstItemImageReference = firstItem.getImageReference();
Assertions.assertNotNull(firstItemImageReference);
Expand Down
2 changes: 1 addition & 1 deletion sdk/devcenter/azure-developer-devcenter/tsp-location.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
directory: specification/devcenter/DevCenter
commit: 202ca606b49642dbd328f0fd7da524c754475659
commit: 5e976eab0086a3b9e66393597efb2437e75ce808
repo: Azure/azure-rest-api-specs
cleanup: true

0 comments on commit 87e28e1

Please sign in to comment.