Skip to content

Commit

Permalink
CodeGen from PR 29121 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge aa114de39d90edae5a808c301a04397af95bc5d9 into 88f9ba778e8611066336aa8713e3205788153913
  • Loading branch information
SDKAuto committed May 16, 2024
1 parent 3a888ba commit 2b3874a
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 68 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ public Mono<Response<BinaryData>> getEnvironmentDefinitionWithResponse(String pr
* }
* }</pre>
*
* @param projectName The DevCenter Project upon which to execute operations.
* @param projectName Name of the project.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
Expand Down Expand Up @@ -821,7 +821,7 @@ public Mono<EnvironmentDefinition> getEnvironmentDefinition(String projectName,
/**
* Lists all environment types configured for a project.
*
* @param projectName The DevCenter Project upon which to execute operations.
* @param projectName Name of the project.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ public Response<BinaryData> getEnvironmentDefinitionWithResponse(String projectN
* }
* }</pre>
*
* @param projectName The DevCenter Project upon which to execute operations.
* @param projectName Name of the project.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
Expand Down Expand Up @@ -752,7 +752,7 @@ public EnvironmentDefinition getEnvironmentDefinition(String projectName, String
/**
* Lists all environment types configured for a project.
*
* @param projectName The DevCenter Project upon which to execute operations.
* @param projectName Name of the project.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2508,7 +2508,7 @@ public Response<BinaryData> getEnvironmentDefinitionWithResponse(String projectN
* }
* }</pre>
*
* @param projectName The DevCenter Project upon which to execute operations.
* @param projectName Name of the project.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
Expand Down Expand Up @@ -2540,7 +2540,7 @@ private Mono<PagedResponse<BinaryData>> listEnvironmentTypesSinglePageAsync(Stri
* }
* }</pre>
*
* @param projectName The DevCenter Project upon which to execute operations.
* @param projectName Name of the project.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
Expand Down Expand Up @@ -2569,7 +2569,7 @@ public PagedFlux<BinaryData> listEnvironmentTypesAsync(String projectName, Reque
* }
* }</pre>
*
* @param projectName The DevCenter Project upon which to execute operations.
* @param projectName Name of the project.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
Expand Down Expand Up @@ -2599,7 +2599,7 @@ private PagedResponse<BinaryData> listEnvironmentTypesSinglePage(String projectN
* }
* }</pre>
*
* @param projectName The DevCenter Project upon which to execute operations.
* @param projectName Name of the project.
* @param requestOptions The options to configure the HTTP request before HTTP client sends it.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public final class DevCenterEnvironmentType implements JsonSerializable<DevCente
* Name of the environment type.
*/
@Generated
private final String name;
private String name;

/*
* Id of a subscription or management group that the environment type will be
Expand All @@ -37,20 +37,6 @@ public final class DevCenterEnvironmentType implements JsonSerializable<DevCente
@Generated
private final EnvironmentTypeStatus status;

/**
* Creates an instance of DevCenterEnvironmentType class.
*
* @param name the name value to set.
* @param deploymentTargetId the deploymentTargetId value to set.
* @param status the status value to set.
*/
@Generated
private DevCenterEnvironmentType(String name, String deploymentTargetId, EnvironmentTypeStatus status) {
this.name = name;
this.deploymentTargetId = deploymentTargetId;
this.status = status;
}

/**
* Get the name property: Name of the environment type.
*
Expand Down Expand Up @@ -90,7 +76,6 @@ public EnvironmentTypeStatus getStatus() {
@Override
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeStringField("name", this.name);
jsonWriter.writeStringField("deploymentTargetId", this.deploymentTargetId);
jsonWriter.writeStringField("status", this.status == null ? null : this.status.toString());
return jsonWriter.writeEndObject();
Expand Down Expand Up @@ -124,7 +109,22 @@ public static DevCenterEnvironmentType fromJson(JsonReader jsonReader) throws IO
reader.skipChildren();
}
}
return new DevCenterEnvironmentType(name, deploymentTargetId, status);
DevCenterEnvironmentType deserializedDevCenterEnvironmentType
= new DevCenterEnvironmentType(deploymentTargetId, status);
deserializedDevCenterEnvironmentType.name = name;
return deserializedDevCenterEnvironmentType;
});
}

/**
* Creates an instance of DevCenterEnvironmentType class.
*
* @param deploymentTargetId the deploymentTargetId value to set.
* @param status the status value to set.
*/
@Generated
private DevCenterEnvironmentType(String deploymentTargetId, EnvironmentTypeStatus status) {
this.deploymentTargetId = deploymentTargetId;
this.status = status;
}
}
Original file line number Diff line number Diff line change
@@ -1,75 +1,71 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.developer.devcenter.models;

import com.azure.core.annotation.Generated;
import com.azure.core.util.ExpandableStringEnum;
import java.util.Collection;
package com.azure.developer.devcenter.models;

/**
* Enum describing allowed operation states.
*/
public final class DevCenterOperationStatus extends ExpandableStringEnum<DevCenterOperationStatus> {
public enum DevCenterOperationStatus {
/**
* The operation has not started.
*/
NOT_STARTED("NotStarted"),

/**
* The operation is in progress.
*/
@Generated
public static final DevCenterOperationStatus RUNNING = fromString("Running");
RUNNING("Running"),

/**
* The operation has been canceled by the user.
* The operation has completed successfully.
*/
@Generated
public static final DevCenterOperationStatus CANCELED = fromString("Canceled");
SUCCEEDED("Succeeded"),

/**
* The operation has failed.
*/
@Generated
public static final DevCenterOperationStatus FAILED = fromString("Failed");
FAILED("Failed"),

/**
* Creates a new instance of DevCenterOperationStatus value.
*
* @deprecated Use the {@link #fromString(String)} factory method.
* The operation has been canceled by the user.
*/
@Generated
@Deprecated
public DevCenterOperationStatus() {
}
CANCELED("Canceled");

/**
* Creates or finds a DevCenterOperationStatus from its string representation.
*
* @param name a name to look for.
* @return the corresponding DevCenterOperationStatus.
* The actual serialized value for a DevCenterOperationStatus instance.
*/
@Generated
public static DevCenterOperationStatus fromString(String name) {
return fromString(name, DevCenterOperationStatus.class);
}
private final String value;

/**
* Gets known DevCenterOperationStatus values.
*
* @return known DevCenterOperationStatus values.
*/
@Generated
public static Collection<DevCenterOperationStatus> values() {
return values(DevCenterOperationStatus.class);
DevCenterOperationStatus(String value) {
this.value = value;
}

/**
* The operation has not started.
* Parses a serialized value to a DevCenterOperationStatus instance.
*
* @param value the serialized value to parse.
* @return the parsed DevCenterOperationStatus object, or null if unable to parse.
*/
@Generated
public static final DevCenterOperationStatus NOT_STARTED = fromString("NotStarted");
public static DevCenterOperationStatus fromString(String value) {
if (value == null) {
return null;
}
DevCenterOperationStatus[] items = DevCenterOperationStatus.values();
for (DevCenterOperationStatus item : items) {
if (item.toString().equalsIgnoreCase(value)) {
return item;
}
}
return null;
}

/**
* The operation has completed successfully.
* {@inheritDoc}
*/
@Generated
public static final DevCenterOperationStatus SUCCEEDED = fromString("Succeeded");
@Override
public String toString() {
return this.value;
}
}
4 changes: 2 additions & 2 deletions 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: 5e976eab0086a3b9e66393597efb2437e75ce808
commit: ea05402820c853cfb2b63933d36dc4ba61944302
repo: Azure/azure-rest-api-specs
cleanup: true
additionalDirectories:

0 comments on commit 2b3874a

Please sign in to comment.