Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
114 changes: 50 additions & 64 deletions eng/emitter-package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions eng/emitter-package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"main": "dist/src/index.js",
"dependencies": {
"@azure-tools/typespec-java": "0.32.0"
"@azure-tools/typespec-java": "/mnt/vss/_work/1/s/autorest.java/typespec-extension/azure-tools-typespec-java-0.32.1.tgz"
},
"devDependencies": {
"@azure-tools/typespec-autorest": "0.59.0",
"@azure-tools/typespec-azure-core": "0.59.0",
"@azure-tools/typespec-azure-resource-manager": "0.59.0",
"@azure-tools/typespec-azure-resource-manager": "0.59.1",
"@azure-tools/typespec-azure-rulesets": "0.59.0",
"@azure-tools/typespec-client-generator-core": "0.59.0",
"@azure-tools/typespec-liftr-base": "0.8.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import com.azure.ai.projects.implementation.DatasetsImpl;
import com.azure.ai.projects.implementation.JsonMergePatchHelper;
import com.azure.ai.projects.implementation.models.PagedDatasetVersion;
import com.azure.ai.projects.models.AssetCredentialResult;
import com.azure.ai.projects.models.DatasetVersion;
import com.azure.ai.projects.models.FileDatasetVersion;
Expand Down Expand Up @@ -272,42 +273,6 @@ public Mono<FolderDatasetVersion> createDatasetWithFolder(String name, String ve
});
}

/**
* List all versions of the given DatasetVersion.
* <p><strong>Response Body Schema</strong></p>
*
* <pre>
* {@code
* {
* type: String(uri_file/uri_folder) (Required)
* dataUri: String (Optional, Required on create)
* isReference: Boolean (Optional)
* connectionName: String (Optional)
* id: String (Optional)
* name: String (Required)
* version: String (Required)
* description: String (Optional)
* tags (Optional): {
* String: String (Required)
* }
* }
* }
* </pre>
*
* @param name The name of the resource.
* @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.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
* @return paged collection of DatasetVersion items as paginated response with {@link PagedFlux}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedFlux<BinaryData> listDatasetVersions(String name, RequestOptions requestOptions) {
return this.serviceClient.listDatasetVersionsAsync(name, requestOptions);
}

/**
* List the latest version of each DatasetVersion.
* <p><strong>Response Body Schema</strong></p>
Expand Down Expand Up @@ -471,26 +436,15 @@ public Mono<Response<BinaryData>> createOrUpdateDatasetVersionWithResponse(Strin
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return paged collection of DatasetVersion items as paginated response with {@link PagedFlux}.
* @return paged collection of DatasetVersion items on successful completion of {@link Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedFlux<DatasetVersion> listDatasetVersions(String name) {
// Generated convenience method for listDatasetVersions
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<PagedDatasetVersion> listDatasetVersions(String name) {
// Generated convenience method for listDatasetVersionsWithResponse
RequestOptions requestOptions = new RequestOptions();
PagedFlux<BinaryData> pagedFluxResponse = listDatasetVersions(name, requestOptions);
return PagedFlux.create(() -> (continuationTokenParam, pageSizeParam) -> {
Flux<PagedResponse<BinaryData>> flux = (continuationTokenParam == null)
? pagedFluxResponse.byPage().take(1)
: pagedFluxResponse.byPage(continuationTokenParam).take(1);
return flux.map(pagedResponse -> new PagedResponseBase<Void, DatasetVersion>(pagedResponse.getRequest(),
pagedResponse.getStatusCode(), pagedResponse.getHeaders(),
pagedResponse.getValue()
.stream()
.map(protocolMethodData -> protocolMethodData.toObject(DatasetVersion.class))
.collect(Collectors.toList()),
pagedResponse.getContinuationToken(), null));
});
return listDatasetVersionsWithResponse(name, requestOptions).flatMap(FluxUtil::toMono)
.map(protocolMethodData -> protocolMethodData.toObject(PagedDatasetVersion.class));
}

/**
Expand Down Expand Up @@ -595,4 +549,46 @@ public Mono<DatasetVersion> createOrUpdateDatasetVersion(String name, String ver
.flatMap(FluxUtil::toMono)
.map(protocolMethodData -> protocolMethodData.toObject(DatasetVersion.class));
}

/**
* List all versions of the given DatasetVersion.
* <p><strong>Response Body Schema</strong></p>
*
* <pre>
* {@code
* {
* value (Required): [
* (Required){
* type: String(uri_file/uri_folder) (Required)
* dataUri: String (Optional, Required on create)
* isReference: Boolean (Optional)
* connectionName: String (Optional)
* id: String (Optional)
* name: String (Required)
* version: String (Required)
* description: String (Optional)
* tags (Optional): {
* String: String (Required)
* }
* }
* ]
* nextLink: String (Optional)
* }
* }
* </pre>
*
* @param name The name of the resource.
* @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.
* @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
* @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
* @return paged collection of DatasetVersion items along with {@link Response} on successful completion of
* {@link Mono}.
*/
@Generated
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<BinaryData>> listDatasetVersionsWithResponse(String name, RequestOptions requestOptions) {
return this.serviceClient.listDatasetVersionsWithResponseAsync(name, requestOptions);
}
}
Loading
Loading