Skip to content

Commit 724ba89

Browse files
authored
Missing from spec annotations (#49571)
* Added client annotation method * Added method for projects * Added missing Beta annotations * hiding tsplocation * spelling mistake
1 parent 08da23f commit 724ba89

49 files changed

Lines changed: 1256 additions & 180 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

sdk/ai/azure-ai-agents/cspell.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ overrides:
55
words:
66
- dedup
77
- gitmcp
8+
- byot

sdk/ai/azure-ai-agents/customizations/beta-annotations.csv

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ field;com.azure.ai.agents.models.AgentDetails;Preview API. AgentEndpoints=V1Prev
1313
class;com.azure.ai.agents.models.AgentEndpointAuthorizationScheme;Preview API. AgentEndpoints=V1Preview;
1414
class;com.azure.ai.agents.models.AgentEndpointAuthorizationSchemeType;Preview API. AgentEndpoints=V1Preview;
1515
class;com.azure.ai.agents.models.AgentEndpointConfig;Preview API. AgentEndpoints=V1Preview;
16+
class;com.azure.ai.agents.models.AgentIdentifier;Preview API. AgentsOptimization=V1Preview;
1617
class;com.azure.ai.agents.models.AgentIdentity;Preview API. AgentEndpoints=V1Preview;
1718
class;com.azure.ai.agents.models.AgentSessionResource;Preview API. AgentEndpoints=V1Preview;
1819
class;com.azure.ai.agents.models.AgentSessionStatus;Preview API. AgentEndpoints=V1Preview;
@@ -22,12 +23,18 @@ field;com.azure.ai.agents.models.AgentVersionDetails;Preview API. AgentEndpoints
2223
field;com.azure.ai.agents.models.AgentVersionDetails;Preview API. AgentEndpoints=V1Preview;instance_identity
2324
class;com.azure.ai.agents.models.BotServiceAuthorizationScheme;Preview API. AgentEndpoints=V1Preview;
2425
class;com.azure.ai.agents.models.BotServiceRbacAuthorizationScheme;Preview API. AgentEndpoints=V1Preview;
26+
class;com.azure.ai.agents.models.CandidateDeployConfig;Preview API. AgentsOptimization=V1Preview;
27+
class;com.azure.ai.agents.models.CandidateFileInfo;Preview API. AgentsOptimization=V1Preview;
28+
class;com.azure.ai.agents.models.CandidateMetadata;Preview API. AgentsOptimization=V1Preview;
29+
class;com.azure.ai.agents.models.CandidateResults;Preview API. AgentsOptimization=V1Preview;
2530
class;com.azure.ai.agents.models.ChatSummaryMemoryItem;Preview API. MemoryStores=V1Preview;
2631
class;com.azure.ai.agents.models.CodeConfiguration;Preview API. CodeAgents=V1Preview;
2732
class;com.azure.ai.agents.models.ContainerConfiguration;Preview API. CodeAgents=V1Preview;
2833
class;com.azure.ai.agents.models.CreateAgentVersionFromCodeContent;Preview API. CodeAgents=V1Preview;
2934
class;com.azure.ai.agents.models.CreateAgentVersionFromCodeMetadata;Preview API. CodeAgents=V1Preview;
3035
class;com.azure.ai.agents.models.CreateAgentVersionInput;Preview API. CodeAgents=V1Preview, ExternalAgents=V1Preview, HostedAgents=V1Preview, WorkflowAgents=V1Preview;
36+
class;com.azure.ai.agents.models.DatasetInfo;Preview API. AgentsOptimization=V1Preview;
37+
class;com.azure.ai.agents.models.DatasetRef;Preview API. AgentsOptimization=V1Preview;
3138
class;com.azure.ai.agents.models.EntraAuthorizationScheme;Preview API. AgentEndpoints=V1Preview;
3239
class;com.azure.ai.agents.models.EntraIsolationKeySource;Preview API. AgentEndpoints=V1Preview;
3340
class;com.azure.ai.agents.models.ExternalAgentDefinition;Preview API. ExternalAgents=V1Preview;
@@ -54,8 +61,19 @@ class;com.azure.ai.agents.models.MemoryStoreSearchResponse;Preview API. MemorySt
5461
class;com.azure.ai.agents.models.MemoryStoreUpdateCompletedResult;Preview API. MemoryStores=V1Preview;
5562
class;com.azure.ai.agents.models.MemoryStoreUpdateResponse;Preview API. MemoryStores=V1Preview;
5663
class;com.azure.ai.agents.models.MemoryStoreUpdateStatus;Preview API. MemoryStores=V1Preview;
64+
class;com.azure.ai.agents.models.OptimizationAgentDefinition;Preview API. AgentsOptimization=V1Preview;
65+
class;com.azure.ai.agents.models.OptimizationCandidate;Preview API. AgentsOptimization=V1Preview;
66+
class;com.azure.ai.agents.models.OptimizationJob;Preview API. AgentsOptimization=V1Preview;
67+
class;com.azure.ai.agents.models.OptimizationJobInputs;Preview API. AgentsOptimization=V1Preview;
68+
class;com.azure.ai.agents.models.OptimizationJobProgress;Preview API. AgentsOptimization=V1Preview;
69+
class;com.azure.ai.agents.models.OptimizationJobResult;Preview API. AgentsOptimization=V1Preview;
70+
class;com.azure.ai.agents.models.OptimizationOptions;Preview API. AgentsOptimization=V1Preview;
71+
class;com.azure.ai.agents.models.OptimizationTaskResult;Preview API. AgentsOptimization=V1Preview;
5772
class;com.azure.ai.agents.models.OtlpTelemetryEndpoint;Preview API. HostedAgents=V1Preview;
5873
class;com.azure.ai.agents.models.ProceduralMemoryItem;Preview API. MemoryStores=V1Preview;
74+
class;com.azure.ai.agents.models.PromoteCandidateInput;Preview API. AgentsOptimization=V1Preview;
75+
class;com.azure.ai.agents.models.PromoteCandidateResult;Preview API. AgentsOptimization=V1Preview;
76+
class;com.azure.ai.agents.models.PromotionInfo;Preview API. AgentsOptimization=V1Preview;
5977
class;com.azure.ai.agents.models.SessionLogEvent;Preview API. HostedAgents=V1Preview;
6078
class;com.azure.ai.agents.models.SessionLogEventType;Preview API. HostedAgents=V1Preview;
6179
class;com.azure.ai.agents.models.TelemetryConfig;Preview API. HostedAgents=V1Preview;

sdk/ai/azure-ai-agents/customizations/src/main/java/AgentsCustomizations.java

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import com.azure.autorest.customization.ClassCustomization;
12
import com.azure.autorest.customization.Customization;
23
import com.azure.autorest.customization.LibraryCustomization;
34
import com.github.javaparser.StaticJavaParser;
@@ -27,6 +28,7 @@ public class AgentsCustomizations extends Customization {
2728
public void customize(LibraryCustomization libraryCustomization, Logger logger) {
2829
renameImageGenToolSize(libraryCustomization, logger);
2930
modifyPollingStrategies(libraryCustomization, logger);
31+
annotateBetaClients(libraryCustomization, logger);
3032
annotateBetaFields(libraryCustomization, loadBetaAnnotations(logger), logger);
3133
}
3234

@@ -67,6 +69,21 @@ private void modifyPollingStrategies(LibraryCustomization customization, Logger
6769
}));
6870
}
6971

72+
private void annotateBetaClients(LibraryCustomization customization, Logger logger) {
73+
customization.getPackage("com.azure.ai.agents")
74+
.listClasses()
75+
.stream()
76+
.filter(cc -> cc.getClassName().startsWith("Beta") && cc.getClassName().endsWith("Client"))
77+
.forEach(classCustomization -> {
78+
String simpleName = classCustomization.getClassName();
79+
logger.info("Annotating {} with @Beta", simpleName);
80+
classCustomization.customizeAst(ast -> ast.getClassByName(simpleName).ifPresent(clazz -> {
81+
ast.addImport("com.azure.ai.agents.implementation.utils.Beta");
82+
clazz.addAnnotation(betaAnnotation("This class is in preview and may change in future releases."));
83+
}));
84+
});
85+
}
86+
7087
private void annotateBetaFields(LibraryCustomization customization, List<String[]> betaAnnotations,
7188
Logger logger) {
7289
for (String[] entry : betaAnnotations) {
@@ -87,7 +104,7 @@ private void annotateBetaFields(LibraryCustomization customization, List<String[
87104
continue;
88105
}
89106

90-
classCustomization.getClass(packageName, simpleName).customizeAst(ast -> ast.getTypes().stream()
107+
classCustomization.customizeAst(ast -> ast.getTypes().stream()
91108
.filter(type -> type.getNameAsString().equals(simpleName))
92109
.findFirst()
93110
.ifPresent(type -> {

sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/BetaAgentsAsyncClient.java

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@
5252
/**
5353
* Initializes a new instance of the asynchronous AgentsClient type.
5454
*/
55-
@Beta(warningText = "Preview API.")
5655
@ServiceClient(builder = AgentsClientBuilder.class, isAsync = true)
56+
@Beta(warningText = "This class is in preview and may change in future releases.")
5757
public final class BetaAgentsAsyncClient {
5858

5959
@Generated
@@ -79,7 +79,7 @@ public final class BetaAgentsAsyncClient {
7979
* irrelevant).
8080
* Maximum upload size is 250 MB.
8181
* <p><strong>Response Body Schema</strong></p>
82-
*
82+
*
8383
* <pre>
8484
* {@code
8585
* {
@@ -188,7 +188,7 @@ Mono<Response<BinaryData>> createAgentFromCodeWithResponse(String agentName, Str
188188
* irrelevant).
189189
* Maximum upload size is 250 MB.
190190
* <p><strong>Response Body Schema</strong></p>
191-
*
191+
*
192192
* <pre>
193193
* {@code
194194
* {
@@ -295,7 +295,7 @@ Mono<Response<BinaryData>> updateAgentFromCodeWithResponse(String agentName, Str
295295
*
296296
* Applies a merge-patch update to the specified agent endpoint configuration.
297297
* <p><strong>Request Body Schema</strong></p>
298-
*
298+
*
299299
* <pre>
300300
* {@code
301301
* {
@@ -337,9 +337,9 @@ Mono<Response<BinaryData>> updateAgentFromCodeWithResponse(String agentName, Str
337337
* }
338338
* }
339339
* </pre>
340-
*
340+
*
341341
* <p><strong>Response Body Schema</strong></p>
342-
*
342+
*
343343
* <pre>
344344
* {@code
345345
* {
@@ -446,7 +446,7 @@ public Mono<Response<BinaryData>> updateAgentDetailsWithResponse(String agentNam
446446
* irrelevant).
447447
* Maximum upload size is 250 MB.
448448
* <p><strong>Response Body Schema</strong></p>
449-
*
449+
*
450450
* <pre>
451451
* {@code
452452
* {
@@ -524,7 +524,7 @@ Mono<Response<BinaryData>> createAgentVersionFromCodeWithResponse(String agentNa
524524
* </table>
525525
* You can add these to a request with {@link RequestOptions#addQueryParam}
526526
* <p><strong>Response Body Schema</strong></p>
527-
*
527+
*
528528
* <pre>
529529
* {@code
530530
* BinaryData
@@ -560,7 +560,7 @@ public Mono<Response<BinaryData>> downloadAgentCodeWithResponse(String agentName
560560
* </table>
561561
* You can add these to a request with {@link RequestOptions#addHeader}
562562
* <p><strong>Request Body Schema</strong></p>
563-
*
563+
*
564564
* <pre>
565565
* {@code
566566
* {
@@ -571,9 +571,9 @@ public Mono<Response<BinaryData>> downloadAgentCodeWithResponse(String agentName
571571
* }
572572
* }
573573
* </pre>
574-
*
574+
*
575575
* <p><strong>Response Body Schema</strong></p>
576-
*
576+
*
577577
* <pre>
578578
* {@code
579579
* {
@@ -619,7 +619,7 @@ public Mono<Response<BinaryData>> createSessionWithResponse(String agentName, Bi
619619
* </table>
620620
* You can add these to a request with {@link RequestOptions#addHeader}
621621
* <p><strong>Response Body Schema</strong></p>
622-
*
622+
*
623623
* <pre>
624624
* {@code
625625
* {
@@ -738,7 +738,7 @@ public Mono<Response<Void>> stopSessionWithResponse(String agentName, String ses
738738
* </table>
739739
* You can add these to a request with {@link RequestOptions#addHeader}
740740
* <p><strong>Response Body Schema</strong></p>
741-
*
741+
*
742742
* <pre>
743743
* {@code
744744
* {
@@ -799,7 +799,7 @@ public PagedFlux<BinaryData> listSessions(String agentName, RequestOptions reque
799799
* The stream remains open until the client disconnects or the server
800800
* terminates the connection. Clients should handle reconnection as needed.
801801
* <p><strong>Response Body Schema</strong></p>
802-
*
802+
*
803803
* <pre>
804804
* {@code
805805
* {
@@ -844,15 +844,15 @@ public Mono<Response<BinaryData>> getSessionLogStreamWithResponse(String agentNa
844844
* </table>
845845
* You can add these to a request with {@link RequestOptions#addHeader}
846846
* <p><strong>Request Body Schema</strong></p>
847-
*
847+
*
848848
* <pre>
849849
* {@code
850850
* BinaryData
851851
* }
852852
* </pre>
853-
*
853+
*
854854
* <p><strong>Response Body Schema</strong></p>
855-
*
855+
*
856856
* <pre>
857857
* {@code
858858
* {
@@ -896,7 +896,7 @@ public Mono<Response<BinaryData>> uploadSessionFileWithResponse(String agentName
896896
* </table>
897897
* You can add these to a request with {@link RequestOptions#addHeader}
898898
* <p><strong>Response Body Schema</strong></p>
899-
*
899+
*
900900
* <pre>
901901
* {@code
902902
* BinaryData
@@ -957,7 +957,7 @@ public Mono<Response<BinaryData>> downloadSessionFileWithResponse(String agentNa
957957
* </table>
958958
* You can add these to a request with {@link RequestOptions#addHeader}
959959
* <p><strong>Response Body Schema</strong></p>
960-
*
960+
*
961961
* <pre>
962962
* {@code
963963
* {
@@ -1038,7 +1038,7 @@ public Mono<Response<Void>> deleteSessionFileWithResponse(String agentName, Stri
10381038
* </table>
10391039
* You can add these to a request with {@link RequestOptions#addHeader}
10401040
* <p><strong>Request Body Schema</strong></p>
1041-
*
1041+
*
10421042
* <pre>
10431043
* {@code
10441044
* {
@@ -1066,9 +1066,9 @@ public Mono<Response<Void>> deleteSessionFileWithResponse(String agentName, Stri
10661066
* }
10671067
* }
10681068
* </pre>
1069-
*
1069+
*
10701070
* <p><strong>Response Body Schema</strong></p>
1071-
*
1071+
*
10721072
* <pre>
10731073
* {@code
10741074
* {
@@ -1216,7 +1216,7 @@ public Mono<Response<BinaryData>> createOptimizationJobWithResponse(BinaryData i
12161216
* Retrieves the specified agent optimization job.
12171217
* Returns 202 while the job is in progress and 200 after it reaches a terminal state.
12181218
* <p><strong>Response Body Schema</strong></p>
1219-
*
1219+
*
12201220
* <pre>
12211221
* {@code
12221222
* {
@@ -1387,7 +1387,7 @@ public Mono<Response<BinaryData>> getOptimizationJobWithResponse(String jobId, R
13871387
* </table>
13881388
* You can add these to a request with {@link RequestOptions#addQueryParam}
13891389
* <p><strong>Response Body Schema</strong></p>
1390-
*
1390+
*
13911391
* <pre>
13921392
* {@code
13931393
* {
@@ -1531,7 +1531,7 @@ public PagedFlux<BinaryData> listOptimizationJobs(RequestOptions requestOptions)
15311531
* Requests cancellation of the specified agent optimization job.
15321532
* The operation remains idempotent after the job reaches a terminal state.
15331533
* <p><strong>Response Body Schema</strong></p>
1534-
*
1534+
*
15351535
* <pre>
15361536
* {@code
15371537
* {
@@ -1725,7 +1725,7 @@ public Mono<Response<Void>> deleteOptimizationJobWithResponse(String jobId, Requ
17251725
* </table>
17261726
* You can add these to a request with {@link RequestOptions#addQueryParam}
17271727
* <p><strong>Response Body Schema</strong></p>
1728-
*
1728+
*
17291729
* <pre>
17301730
* {@code
17311731
* {
@@ -1803,7 +1803,7 @@ public PagedFlux<BinaryData> listOptimizationCandidates(String jobId, RequestOpt
18031803
*
18041804
* Retrieves metadata, manifest information, and promotion details for the specified candidate.
18051805
* <p><strong>Response Body Schema</strong></p>
1806-
*
1806+
*
18071807
* <pre>
18081808
* {@code
18091809
* {
@@ -1856,7 +1856,7 @@ public Mono<Response<BinaryData>> getOptimizationCandidateWithResponse(String jo
18561856
* Retrieves the deploy configuration JSON for the specified candidate.
18571857
* Clients can use it to compose `agents.create_version(...)` requests.
18581858
* <p><strong>Response Body Schema</strong></p>
1859-
*
1859+
*
18601860
* <pre>
18611861
* {@code
18621862
* {
@@ -1902,7 +1902,7 @@ public Mono<Response<BinaryData>> getOptimizationCandidateConfigWithResponse(Str
19021902
*
19031903
* Retrieves full per-task evaluation results for the specified candidate.
19041904
* <p><strong>Response Body Schema</strong></p>
1905-
*
1905+
*
19061906
* <pre>
19071907
* {@code
19081908
* {
@@ -1954,7 +1954,7 @@ public Mono<Response<BinaryData>> getOptimizationCandidateResultsWithResponse(St
19541954
*
19551955
* Streams the specified file from the candidate's blob directory.
19561956
* <p><strong>Response Body Schema</strong></p>
1957-
*
1957+
*
19581958
* <pre>
19591959
* {@code
19601960
* BinaryData
@@ -1987,7 +1987,7 @@ public Mono<Response<BinaryData>> getOptimizationCandidateFileWithResponse(Strin
19871987
*
19881988
* Promotes the specified candidate and records the deployment timestamp and target agent version.
19891989
* <p><strong>Request Body Schema</strong></p>
1990-
*
1990+
*
19911991
* <pre>
19921992
* {@code
19931993
* {
@@ -1996,9 +1996,9 @@ public Mono<Response<BinaryData>> getOptimizationCandidateFileWithResponse(Strin
19961996
* }
19971997
* }
19981998
* </pre>
1999-
*
1999+
*
20002000
* <p><strong>Response Body Schema</strong></p>
2001-
*
2001+
*
20022002
* <pre>
20032003
* {@code
20042004
* {

0 commit comments

Comments
 (0)