From 15c2c5c4173c9ee0b7a0dbf8e31c8fab0e47ac92 Mon Sep 17 00:00:00 2001 From: Emmanuel Hugonnet Date: Fri, 6 Feb 2026 18:21:10 +0100 Subject: [PATCH] refactor: Update A2A protocol to align with spec revision - Move protocol version from AgentCard to AgentInterface level - Simplify resource identifiers from hierarchical names to flat IDs (e.g., "tasks/123" -> "123") - Restructure Part types: remove FilePart/DataPart in favor of unified Part with url/raw/data variants - Add OAuth flow support (ImplicitOAuthFlow, PasswordOAuthFlow) - Rename Security to SecurityRequirement for clarity - Standardize spelling: CANCELLED -> CANCELED - Update all client transports (gRPC, JSON-RPC, REST) and tests - Rename resubscribe to subscribeToTask Breaking changes in proto API affecting: - Task operations (get, cancel, subscribe) - Push notification config management - Message part structure Signed-off-by: Emmanuel Hugonnet --- README.md | 16 +- .../java/io/a2a/client/AbstractClient.java | 22 +- .../src/main/java/io/a2a/client/Client.java | 16 +- .../AuthenticationAuthorizationTest.java | 2 - .../java/io/a2a/client/ClientBuilderTest.java | 2 - .../client/transport/grpc/GrpcTransport.java | 50 +- .../transport/jsonrpc/JSONRPCTransport.java | 2 +- .../JSONRPCTransportStreamingTest.java | 18 +- .../jsonrpc/JSONRPCTransportTest.java | 15 +- .../transport/jsonrpc/JsonMessages.java | 99 +- .../jsonrpc/JsonStreamingMessages.java | 12 +- .../jsonrpc/sse/SSEEventListenerTest.java | 15 +- .../client/transport/rest/RestTransport.java | 23 +- .../transport/rest/JsonRestMessages.java | 51 +- .../transport/rest/RestTransportTest.java | 21 +- .../rest/sse/SSEEventListenerTest.java | 6 +- .../client/transport/spi/ClientTransport.java | 6 +- .../interceptors/auth/AuthInterceptor.java | 4 +- .../auth/AuthInterceptorTest.java | 6 +- .../spi/sse/SSEEventListenerTest.java | 14 +- .../cloud/CloudAgentCardProducer.java | 2 - .../examples/cloud/A2ACloudExampleClient.java | 2 +- .../helloworld/AgentCardProducer.java | 2 - ...otificationConfigStoreIntegrationTest.java | 4 +- .../core/ReplicatedQueueManager.java | 2 - .../core/EventSerializationTest.java | 3 - .../core/ReplicatedQueueManagerTest.java | 6 - ...ctiveMessagingReplicationStrategyTest.java | 2 - .../MultiInstanceReplicationAgentCards.java | 2 - .../MultiInstanceReplicationTest.java | 12 +- .../KafkaReplicationIntegrationTest.java | 21 +- .../ReplicationTestAgentCardProducer.java | 2 - .../java/io/a2a/client/http/JsonMessages.java | 3 +- .../io/a2a/jsonrpc/common/json/JsonUtil.java | 12 +- .../wrappers/StreamingJSONRPCRequest.java | 2 +- .../wrappers/SubscribeToTaskRequest.java | 2 +- .../StreamingEventKindSerializationTest.java | 1 - .../apps/quarkus/A2AServerRoutesTest.java | 35 +- .../rest/quarkus/A2AServerRoutesTest.java | 2 +- .../java/io/a2a/server/events/EventQueue.java | 6 +- .../DefaultRequestHandler.java | 12 +- .../requesthandlers/RequestHandler.java | 2 +- .../java/io/a2a/server/tasks/TaskUpdater.java | 1 - .../io/a2a/server/util/ArtifactUtils.java | 12 +- .../server/version/A2AVersionValidator.java | 16 +- .../a2a/server/events/EventConsumerTest.java | 9 +- .../io/a2a/server/events/EventQueueTest.java | 1 - .../AbstractA2ARequestHandlerTest.java | 4 +- .../io/a2a/server/tasks/TaskManagerTest.java | 10 - .../io/a2a/server/tasks/TaskUpdaterTest.java | 8 +- .../version/A2AVersionValidatorTest.java | 3 +- spec-grpc/pom.xml | 2 +- spec-grpc/src/main/java/io/a2a/grpc/A2A.java | 613 ++++----- .../main/java/io/a2a/grpc/A2AServiceGrpc.java | 8 +- .../src/main/java/io/a2a/grpc/AgentCard.java | 873 +++++-------- .../java/io/a2a/grpc/AgentCardOrBuilder.java | 82 +- .../main/java/io/a2a/grpc/AgentInterface.java | 182 ++- .../io/a2a/grpc/AgentInterfaceOrBuilder.java | 24 + .../src/main/java/io/a2a/grpc/AgentSkill.java | 359 +++--- .../java/io/a2a/grpc/AgentSkillOrBuilder.java | 29 +- .../java/io/a2a/grpc/AuthenticationInfo.java | 282 ++--- .../a2a/grpc/AuthenticationInfoOrBuilder.java | 43 +- .../java/io/a2a/grpc/CancelTaskRequest.java | 117 +- .../a2a/grpc/CancelTaskRequestOrBuilder.java | 18 +- ...eateTaskPushNotificationConfigRequest.java | 207 ++- ...ushNotificationConfigRequestOrBuilder.java | 28 +- .../src/main/java/io/a2a/grpc/DataPart.java | 617 --------- .../java/io/a2a/grpc/DataPartOrBuilder.java | 39 - ...leteTaskPushNotificationConfigRequest.java | 283 ++++- ...ushNotificationConfigRequestOrBuilder.java | 38 +- .../src/main/java/io/a2a/grpc/FilePart.java | 1109 ----------------- .../java/io/a2a/grpc/FilePartOrBuilder.java | 102 -- .../GetTaskPushNotificationConfigRequest.java | 283 ++++- ...ushNotificationConfigRequestOrBuilder.java | 38 +- .../main/java/io/a2a/grpc/GetTaskRequest.java | 117 +- .../io/a2a/grpc/GetTaskRequestOrBuilder.java | 18 +- .../java/io/a2a/grpc/ImplicitOAuthFlow.java | 1050 ++++++++++++++++ .../a2a/grpc/ImplicitOAuthFlowOrBuilder.java | 115 ++ ...ListTaskPushNotificationConfigRequest.java | 117 +- ...ushNotificationConfigRequestOrBuilder.java | 18 +- .../src/main/java/io/a2a/grpc/OAuthFlows.java | 432 +++++++ .../java/io/a2a/grpc/OAuthFlowsOrBuilder.java | 38 + spec-grpc/src/main/java/io/a2a/grpc/Part.java | 1055 +++++++++++----- .../main/java/io/a2a/grpc/PartOrBuilder.java | 109 +- .../java/io/a2a/grpc/PasswordOAuthFlow.java | 1050 ++++++++++++++++ .../a2a/grpc/PasswordOAuthFlowOrBuilder.java | 115 ++ .../io/a2a/grpc/PushNotificationConfig.java | 24 +- .../grpc/PushNotificationConfigOrBuilder.java | 6 +- ...Security.java => SecurityRequirement.java} | 114 +- ...java => SecurityRequirementOrBuilder.java} | 4 +- .../io/a2a/grpc/SendMessageConfiguration.java | 8 +- .../SendMessageConfigurationOrBuilder.java | 2 +- .../io/a2a/grpc/SubscribeToTaskRequest.java | 117 +- .../grpc/SubscribeToTaskRequestOrBuilder.java | 18 +- .../a2a/grpc/TaskPushNotificationConfig.java | 465 +++++-- .../TaskPushNotificationConfigOrBuilder.java | 58 +- .../src/main/java/io/a2a/grpc/TaskState.java | 20 +- .../io/a2a/grpc/TaskStatusUpdateEvent.java | 99 +- .../grpc/TaskStatusUpdateEventOrBuilder.java | 10 - .../a2a/grpc/mapper/A2ACommonFieldMapper.java | 25 +- .../a2a/grpc/mapper/AgentInterfaceMapper.java | 1 + .../grpc/mapper/AuthenticationInfoMapper.java | 14 + ...reateTaskPushNotificationConfigMapper.java | 82 +- .../io/a2a/grpc/mapper/DataPartMapper.java | 35 - ...askPushNotificationConfigParamsMapper.java | 12 +- .../io/a2a/grpc/mapper/FilePartMapper.java | 81 -- ...askPushNotificationConfigParamsMapper.java | 18 +- ...askPushNotificationConfigParamsMapper.java | 10 +- .../io/a2a/grpc/mapper/OAuthFlowsMapper.java | 2 + .../java/io/a2a/grpc/mapper/PartMapper.java | 71 +- .../io/a2a/grpc/mapper/SecurityMapper.java | 38 +- .../mapper/SubscribeToTaskRequestMapper.java | 6 +- .../a2a/grpc/mapper/TaskIdParamsMapper.java | 8 +- .../TaskPushNotificationConfigMapper.java | 76 +- .../grpc/mapper/TaskQueryParamsMapper.java | 4 +- .../io/a2a/grpc/mapper/TaskStateMapper.java | 4 +- .../mapper/TaskStatusUpdateEventMapper.java | 26 +- spec-grpc/src/main/proto/a2a.proto | 218 ++-- .../grpc/mapper/StreamResponseMapperTest.java | 3 - .../io/a2a/grpc/utils/JSONRPCUtilsTest.java | 20 +- .../java/io/a2a/grpc/utils/ToProtoTest.java | 81 +- .../java/io/a2a/spec/A2AProtocolError.java | 29 + spec/src/main/java/io/a2a/spec/AgentCard.java | 47 +- .../main/java/io/a2a/spec/AgentInterface.java | 28 +- .../src/main/java/io/a2a/spec/AgentSkill.java | 16 +- .../java/io/a2a/spec/AuthenticationInfo.java | 11 +- spec/src/main/java/io/a2a/spec/DataPart.java | 49 +- .../GetTaskPushNotificationConfigParams.java | 13 +- .../ListTaskPushNotificationConfigParams.java | 2 + .../main/java/io/a2a/spec/SecurityScheme.java | 2 +- .../io/a2a/spec/TaskStatusUpdateEvent.java | 39 +- .../io/a2a/spec/VersionNotSupportedError.java | 2 +- .../io/a2a/tck/server/AgentCardProducer.java | 2 - .../a2a/tck/server/AgentExecutorProducer.java | 18 +- .../apps/common/AbstractA2AServerTest.java | 58 +- .../server/apps/common/AgentCardProducer.java | 3 - .../transport/grpc/handler/GrpcHandler.java | 15 +- .../grpc/handler/GrpcHandlerTest.java | 276 ++-- .../jsonrpc/handler/JSONRPCHandler.java | 2 +- .../jsonrpc/handler/JSONRPCHandlerTest.java | 22 +- .../transport/rest/handler/RestHandler.java | 2 +- .../rest/handler/RestHandlerTest.java | 34 +- 142 files changed, 7092 insertions(+), 5569 deletions(-) delete mode 100644 spec-grpc/src/main/java/io/a2a/grpc/DataPart.java delete mode 100644 spec-grpc/src/main/java/io/a2a/grpc/DataPartOrBuilder.java delete mode 100644 spec-grpc/src/main/java/io/a2a/grpc/FilePart.java delete mode 100644 spec-grpc/src/main/java/io/a2a/grpc/FilePartOrBuilder.java create mode 100644 spec-grpc/src/main/java/io/a2a/grpc/ImplicitOAuthFlow.java create mode 100644 spec-grpc/src/main/java/io/a2a/grpc/ImplicitOAuthFlowOrBuilder.java create mode 100644 spec-grpc/src/main/java/io/a2a/grpc/PasswordOAuthFlow.java create mode 100644 spec-grpc/src/main/java/io/a2a/grpc/PasswordOAuthFlowOrBuilder.java rename spec-grpc/src/main/java/io/a2a/grpc/{Security.java => SecurityRequirement.java} (84%) rename spec-grpc/src/main/java/io/a2a/grpc/{SecurityOrBuilder.java => SecurityRequirementOrBuilder.java} (94%) delete mode 100644 spec-grpc/src/main/java/io/a2a/grpc/mapper/DataPartMapper.java delete mode 100644 spec-grpc/src/main/java/io/a2a/grpc/mapper/FilePartMapper.java diff --git a/README.md b/README.md index 941419f45..bd86952da 100644 --- a/README.md +++ b/README.md @@ -612,24 +612,24 @@ client.deleteTaskPushNotificationConfigurations( new DeleteTaskPushNotificationConfigParams("task-1234", "config-4567", clientCallContext); ``` -#### Resubscribe to a task +#### Subscribe to a task ```java -// Resubscribe to an ongoing task with id "task-1234" using configured consumers +// Subscribe to an ongoing task with id "task-1234" using configured consumers TaskIdParams taskIdParams = new TaskIdParams("task-1234"); -client.resubscribe(taskIdParams); +client.subscribeToTask(taskIdParams); -// Or resubscribe with custom consumers and error handler +// Or subscribe with custom consumers and error handler List> customConsumers = List.of( - (event, card) -> System.out.println("Resubscribe event: " + event) + (event, card) -> System.out.println("Subscribe event: " + event) ); Consumer customErrorHandler = error -> - System.err.println("Resubscribe error: " + error.getMessage()); + System.err.println("Subscribe error: " + error.getMessage()); -client.resubscribe(taskIdParams, customConsumers, customErrorHandler); +client.subscribeToTask(taskIdParams, customConsumers, customErrorHandler); // You can also optionally specify a ClientCallContext with call-specific config to use -client.resubscribe(taskIdParams, clientCallContext); +client.subscribeToTask(taskIdParams, clientCallContext); ``` #### Retrieve details about the server agent that this client agent is communicating with diff --git a/client/base/src/main/java/io/a2a/client/AbstractClient.java b/client/base/src/main/java/io/a2a/client/AbstractClient.java index c47d8238b..c3c8c648f 100644 --- a/client/base/src/main/java/io/a2a/client/AbstractClient.java +++ b/client/base/src/main/java/io/a2a/client/AbstractClient.java @@ -318,7 +318,7 @@ public abstract void deleteTaskPushNotificationConfigurations( @Nullable ClientCallContext context) throws A2AClientException; /** - * Resubscribe to a task's event stream. + * Subscribe to a task's event stream. * This is only available if both the client and server support streaming. * The configured client consumers will be used to handle messages, tasks, * and update events received from the remote agent. The configured streaming @@ -327,12 +327,12 @@ public abstract void deleteTaskPushNotificationConfigurations( * @param request the parameters specifying which task's notification configs to delete * @throws A2AClientException if resubscribing fails for any reason */ - public void resubscribe(@NonNull TaskIdParams request) throws A2AClientException { - resubscribe(request, consumers, streamingErrorHandler, null); + public void subscribeToTask(@NonNull TaskIdParams request) throws A2AClientException { + subscribeToTask(request, consumers, streamingErrorHandler, null); } /** - * Resubscribe to a task's event stream. + * Subscribe to a task's event stream. * This is only available if both the client and server support streaming. * The configured client consumers will be used to handle messages, tasks, * and update events received from the remote agent. The configured streaming @@ -342,13 +342,13 @@ public void resubscribe(@NonNull TaskIdParams request) throws A2AClientException * @param context optional client call context for the request * @throws A2AClientException if resubscribing fails for any reason */ - public void resubscribe(@NonNull TaskIdParams request, + public void subscribeToTask(@NonNull TaskIdParams request, @Nullable ClientCallContext context) throws A2AClientException { - resubscribe(request, consumers, streamingErrorHandler, context); + subscribeToTask(request, consumers, streamingErrorHandler, context); } /** - * Resubscribe to a task's event stream. + * Subscribe to a task's event stream. * This is only available if both the client and server support streaming. * The specified client consumers will be used to handle messages, tasks, and * update events received from the remote agent. The specified streaming error @@ -359,14 +359,14 @@ public void resubscribe(@NonNull TaskIdParams request, * @param streamingErrorHandler an error handler that should be used for the streaming case if an error occurs * @throws A2AClientException if resubscribing fails for any reason */ - public void resubscribe(@NonNull TaskIdParams request, + public void subscribeToTask(@NonNull TaskIdParams request, @NonNull List> consumers, @Nullable Consumer streamingErrorHandler) throws A2AClientException { - resubscribe(request, consumers, streamingErrorHandler, null); + subscribeToTask(request, consumers, streamingErrorHandler, null); } /** - * Resubscribe to a task's event stream. + * Subscribe to a task's event stream. * This is only available if both the client and server support streaming. * The specified client consumers will be used to handle messages, tasks, and * update events received from the remote agent. The specified streaming error @@ -378,7 +378,7 @@ public void resubscribe(@NonNull TaskIdParams request, * @param context optional client call context for the request * @throws A2AClientException if resubscribing fails for any reason */ - public abstract void resubscribe(@NonNull TaskIdParams request, + public abstract void subscribeToTask(@NonNull TaskIdParams request, @NonNull List> consumers, @Nullable Consumer streamingErrorHandler, @Nullable ClientCallContext context) throws A2AClientException; diff --git a/client/base/src/main/java/io/a2a/client/Client.java b/client/base/src/main/java/io/a2a/client/Client.java index 405155ee2..e60cac4e5 100644 --- a/client/base/src/main/java/io/a2a/client/Client.java +++ b/client/base/src/main/java/io/a2a/client/Client.java @@ -152,7 +152,7 @@ * * // Later, reconnect and resume receiving events * String taskId = "task-123"; // From original request - * client.resubscribe( + * client.subscribeToTask( * new TaskIdParams(taskId), * List.of((event, card) -> { * // Process events from where we left off @@ -529,7 +529,7 @@ public void deleteTaskPushNotificationConfigurations( } /** - * Resubscribe to an existing task to receive remaining events. + * Subscribe to an existing task to receive remaining events. *

* This method is useful when a client disconnects during a long-running task and wants to * resume receiving events without starting a new task. The agent will deliver any events @@ -551,7 +551,7 @@ public void deleteTaskPushNotificationConfigurations( * // ... client1 disconnects ... * * // Later, reconnect (client2) - * client2.resubscribe( + * client2.subscribeToTask( * new TaskIdParams(taskId), * List.of((event, card) -> { * if (event instanceof TaskUpdateEvent tue) { @@ -559,19 +559,19 @@ public void deleteTaskPushNotificationConfigurations( * tue.getTask().status().state()); * } * }), - * throwable -> System.err.println("Resubscribe error: " + throwable), + * throwable -> System.err.println("Subscribe error: " + throwable), * null * ); * } * - * @param request the task ID to resubscribe to + * @param request the task ID to subscribe to * @param consumers the event consumers for processing events (required) * @param streamingErrorHandler error handler for streaming errors (optional) * @param context custom call context for request interceptors (optional) - * @throws A2AClientException if resubscription is not supported or if the task cannot be found + * @throws A2AClientException if subscription is not supported or if the task cannot be found */ @Override - public void resubscribe(@NonNull TaskIdParams request, + public void subscribeToTask(@NonNull TaskIdParams request, @NonNull List> consumers, @Nullable Consumer streamingErrorHandler, @Nullable ClientCallContext context) throws A2AClientException { @@ -588,7 +588,7 @@ public void resubscribe(@NonNull TaskIdParams request, overriddenErrorHandler.accept(e); } }; - clientTransport.resubscribe(request, eventHandler, overriddenErrorHandler, context); + clientTransport.subscribeToTask(request, eventHandler, overriddenErrorHandler, context); } /** diff --git a/client/base/src/test/java/io/a2a/client/AuthenticationAuthorizationTest.java b/client/base/src/test/java/io/a2a/client/AuthenticationAuthorizationTest.java index 58b528881..5b8d9c94a 100644 --- a/client/base/src/test/java/io/a2a/client/AuthenticationAuthorizationTest.java +++ b/client/base/src/test/java/io/a2a/client/AuthenticationAuthorizationTest.java @@ -1,6 +1,5 @@ package io.a2a.client; -import static io.a2a.spec.AgentCard.CURRENT_PROTOCOL_VERSION; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockserver.model.HttpRequest.request; @@ -90,7 +89,6 @@ public void setUp() { .description("Test skill") .tags(Collections.singletonList("test")) .build())) - .protocolVersions(CURRENT_PROTOCOL_VERSION) .supportedInterfaces(java.util.Arrays.asList( new AgentInterface(TransportProtocol.JSONRPC.asString(), AGENT_URL), new AgentInterface(TransportProtocol.HTTP_JSON.asString(), AGENT_URL), diff --git a/client/base/src/test/java/io/a2a/client/ClientBuilderTest.java b/client/base/src/test/java/io/a2a/client/ClientBuilderTest.java index dd38c937d..3be9d4918 100644 --- a/client/base/src/test/java/io/a2a/client/ClientBuilderTest.java +++ b/client/base/src/test/java/io/a2a/client/ClientBuilderTest.java @@ -1,6 +1,5 @@ package io.a2a.client; -import static io.a2a.spec.AgentCard.CURRENT_PROTOCOL_VERSION; import java.util.Collections; import java.util.List; @@ -41,7 +40,6 @@ public class ClientBuilderTest { .tags(Collections.singletonList("hello world")) .examples(List.of("hi", "hello world")) .build())) - .protocolVersions(CURRENT_PROTOCOL_VERSION) .supportedInterfaces(List.of( new AgentInterface(TransportProtocol.JSONRPC.asString(), "http://localhost:9999"))) .build(); diff --git a/client/transport/grpc/src/main/java/io/a2a/client/transport/grpc/GrpcTransport.java b/client/transport/grpc/src/main/java/io/a2a/client/transport/grpc/GrpcTransport.java index 8cc67d7b0..7824e83c0 100644 --- a/client/transport/grpc/src/main/java/io/a2a/client/transport/grpc/GrpcTransport.java +++ b/client/transport/grpc/src/main/java/io/a2a/client/transport/grpc/GrpcTransport.java @@ -142,7 +142,7 @@ public void sendMessageStreaming(MessageSendParams request, Consumer eventConsumer, + public void subscribeToTask(TaskIdParams request, Consumer eventConsumer, Consumer errorConsumer, @Nullable ClientCallContext context) throws A2AClientException { checkNotNullParam("request", request); checkNotNullParam("eventConsumer", eventConsumer); io.a2a.grpc.SubscribeToTaskRequest grpcRequest = io.a2a.grpc.SubscribeToTaskRequest.newBuilder() .setTenant(resolveTenant(request.tenant())) - .setName("tasks/" + request.id()) + .setId(request.id()) .build(); PayloadAndHeaders payloadAndHeaders = applyInterceptors(SUBSCRIBE_TO_TASK_METHOD, grpcRequest, agentCard, context); @@ -331,12 +336,13 @@ public void resubscribe(TaskIdParams request, Consumer event A2AServiceStub stubWithMetadata = createAsyncStubWithMetadata(context, payloadAndHeaders); stubWithMetadata.subscribeToTask(grpcRequest, streamObserver); } catch (StatusRuntimeException e) { - throw GrpcErrorMapper.mapGrpcError(e, "Failed to resubscribe task push notification config: "); + throw GrpcErrorMapper.mapGrpcError(e, "Failed to subscribe task push notification config: "); } } /** * Ensure tenant is set, using agent default if not provided in request + * * @param request the initial request. * @return the updated request with the tenant set. */ @@ -447,24 +453,6 @@ private A2AServiceStub createAsyncStubWithMetadata(@Nullable ClientCallContext c return asyncStub.withInterceptors(MetadataUtils.newAttachHeadersInterceptor(metadata)); } - private String getTaskPushNotificationConfigName(GetTaskPushNotificationConfigParams params) { - return getTaskPushNotificationConfigName(params.id(), params.pushNotificationConfigId()); - } - - private String getTaskPushNotificationConfigName(String taskId, @Nullable String pushNotificationConfigId) { - StringBuilder name = new StringBuilder(); - name.append("tasks/"); - name.append(taskId); - if (pushNotificationConfigId != null) { - name.append("/pushNotificationConfigs/"); - name.append(pushNotificationConfigId); - } - //name.append("/pushNotificationConfigs/"); - // Use taskId as default config ID if none provided - //name.append(pushNotificationConfigId != null ? pushNotificationConfigId : taskId); - return name.toString(); - } - private PayloadAndHeaders applyInterceptors(String methodName, Object payload, AgentCard agentCard, @Nullable ClientCallContext clientCallContext) { PayloadAndHeaders payloadAndHeaders = new PayloadAndHeaders(payload, diff --git a/client/transport/jsonrpc/src/main/java/io/a2a/client/transport/jsonrpc/JSONRPCTransport.java b/client/transport/jsonrpc/src/main/java/io/a2a/client/transport/jsonrpc/JSONRPCTransport.java index 21ea398c1..9b8af4ea2 100644 --- a/client/transport/jsonrpc/src/main/java/io/a2a/client/transport/jsonrpc/JSONRPCTransport.java +++ b/client/transport/jsonrpc/src/main/java/io/a2a/client/transport/jsonrpc/JSONRPCTransport.java @@ -255,7 +255,7 @@ public void deleteTaskPushNotificationConfigurations(DeleteTaskPushNotificationC } @Override - public void resubscribe(TaskIdParams request, Consumer eventConsumer, + public void subscribeToTask(TaskIdParams request, Consumer eventConsumer, Consumer errorConsumer, @Nullable ClientCallContext context) throws A2AClientException { checkNotNullParam("request", request); checkNotNullParam("eventConsumer", eventConsumer); diff --git a/client/transport/jsonrpc/src/test/java/io/a2a/client/transport/jsonrpc/JSONRPCTransportStreamingTest.java b/client/transport/jsonrpc/src/test/java/io/a2a/client/transport/jsonrpc/JSONRPCTransportStreamingTest.java index c994ff89d..b06d07648 100644 --- a/client/transport/jsonrpc/src/test/java/io/a2a/client/transport/jsonrpc/JSONRPCTransportStreamingTest.java +++ b/client/transport/jsonrpc/src/test/java/io/a2a/client/transport/jsonrpc/JSONRPCTransportStreamingTest.java @@ -2,8 +2,8 @@ import static io.a2a.client.transport.jsonrpc.JsonStreamingMessages.SEND_MESSAGE_STREAMING_TEST_REQUEST; import static io.a2a.client.transport.jsonrpc.JsonStreamingMessages.SEND_MESSAGE_STREAMING_TEST_RESPONSE; -import static io.a2a.client.transport.jsonrpc.JsonStreamingMessages.TASK_RESUBSCRIPTION_REQUEST_TEST_RESPONSE; -import static io.a2a.client.transport.jsonrpc.JsonStreamingMessages.TASK_RESUBSCRIPTION_TEST_REQUEST; +import static io.a2a.client.transport.jsonrpc.JsonStreamingMessages.TASK_SUBSCRIPTION_TEST_REQUEST; +import static io.a2a.client.transport.jsonrpc.JsonStreamingMessages.TASK_SUBSCRIPTION_REQUEST_TEST_RESPONSE; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertInstanceOf; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -124,19 +124,17 @@ public void testA2AClientSendStreamingMessage() throws Exception { } @Test - public void testA2AClientResubscribeToTask() throws Exception { - this.server.when( - request() + public void testA2AClientSubscribeToTask() throws Exception { + this.server.when(request() .withMethod("POST") .withPath("/") - .withBody(JsonBody.json(TASK_RESUBSCRIPTION_TEST_REQUEST, MatchType.ONLY_MATCHING_FIELDS)) + .withBody(JsonBody.json(TASK_SUBSCRIPTION_TEST_REQUEST, MatchType.ONLY_MATCHING_FIELDS)) ) - .respond( - response() + .respond(response() .withStatusCode(200) .withHeader("Content-Type", "text/event-stream") - .withBody(TASK_RESUBSCRIPTION_REQUEST_TEST_RESPONSE) + .withBody(TASK_SUBSCRIPTION_REQUEST_TEST_RESPONSE) ); JSONRPCTransport client = new JSONRPCTransport("http://localhost:4001"); @@ -149,7 +147,7 @@ public void testA2AClientResubscribeToTask() throws Exception { latch.countDown(); }; Consumer errorHandler = error -> {}; - client.resubscribe(taskIdParams, eventHandler, errorHandler, null); + client.subscribeToTask(taskIdParams, eventHandler, errorHandler, null); boolean eventReceived = latch.await(10, TimeUnit.SECONDS); assertTrue(eventReceived); diff --git a/client/transport/jsonrpc/src/test/java/io/a2a/client/transport/jsonrpc/JSONRPCTransportTest.java b/client/transport/jsonrpc/src/test/java/io/a2a/client/transport/jsonrpc/JSONRPCTransportTest.java index 74fe9545a..f6677ff13 100644 --- a/client/transport/jsonrpc/src/test/java/io/a2a/client/transport/jsonrpc/JSONRPCTransportTest.java +++ b/client/transport/jsonrpc/src/test/java/io/a2a/client/transport/jsonrpc/JSONRPCTransportTest.java @@ -22,7 +22,7 @@ import static io.a2a.client.transport.jsonrpc.JsonMessages.SEND_MESSAGE_WITH_MIXED_PARTS_TEST_RESPONSE; import static io.a2a.client.transport.jsonrpc.JsonMessages.SET_TASK_PUSH_NOTIFICATION_CONFIG_TEST_REQUEST; import static io.a2a.client.transport.jsonrpc.JsonMessages.SET_TASK_PUSH_NOTIFICATION_CONFIG_TEST_RESPONSE; -import static io.a2a.spec.AgentCard.CURRENT_PROTOCOL_VERSION; +import static io.a2a.spec.AgentInterface.CURRENT_PROTOCOL_VERSION; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertInstanceOf; @@ -313,8 +313,7 @@ public void testA2AClientGetTaskPushNotificationConfig() throws Exception { assertNotNull(pushNotificationConfig); assertEquals("https://example.com/callback", pushNotificationConfig.url()); AuthenticationInfo authenticationInfo = pushNotificationConfig.authentication(); - assertTrue(authenticationInfo.schemes().size() == 1); - assertEquals("jwt", authenticationInfo.schemes().get(0)); + assertEquals("jwt", authenticationInfo.scheme()); } @Test @@ -338,15 +337,13 @@ public void testA2AClientCreateTaskPushNotificationConfig() throws Exception { PushNotificationConfig.builder() .id("c295ea44-7543-4f78-b524-7a38915ad6e4") .url("https://example.com/callback") - .authentication(new AuthenticationInfo(Collections.singletonList("jwt"), - null)) + .authentication(new AuthenticationInfo("jwt", null)) .build(), ""), null); PushNotificationConfig pushNotificationConfig = taskPushNotificationConfig.pushNotificationConfig(); assertNotNull(pushNotificationConfig); assertEquals("https://example.com/callback", pushNotificationConfig.url()); AuthenticationInfo authenticationInfo = pushNotificationConfig.authentication(); - assertEquals(1, authenticationInfo.schemes().size()); - assertEquals("jwt", authenticationInfo.schemes().get(0)); + assertEquals("jwt", authenticationInfo.scheme()); } @Test @@ -379,7 +376,7 @@ public void testA2AClientGetExtendedAgentCard() throws Exception { assertNotNull(securitySchemes); OpenIdConnectSecurityScheme google = (OpenIdConnectSecurityScheme) securitySchemes.get("google"); assertEquals("https://accounts.google.com/.well-known/openid-configuration", google.openIdConnectUrl()); - List>> security = agentCard.security(); + List>> security = agentCard.securityRequirements(); assertEquals(1, security.size()); Map> securityMap = security.get(0); List scopes = securityMap.get("google"); @@ -418,7 +415,7 @@ public void testA2AClientGetExtendedAgentCard() throws Exception { assertEquals("This is an extended skill.", skills.get(2).description()); assertEquals(List.of("extended"), skills.get(2).tags()); assertEquals("https://georoute-agent.example.com/icon.png", agentCard.iconUrl()); - assertEquals(CURRENT_PROTOCOL_VERSION, agentCard.protocolVersions().get(0)); + assertEquals(CURRENT_PROTOCOL_VERSION, agentCard.supportedInterfaces().get(0).protocolVersion()); } @Test diff --git a/client/transport/jsonrpc/src/test/java/io/a2a/client/transport/jsonrpc/JsonMessages.java b/client/transport/jsonrpc/src/test/java/io/a2a/client/transport/jsonrpc/JsonMessages.java index 211f5e4f6..b55c0f9d1 100644 --- a/client/transport/jsonrpc/src/test/java/io/a2a/client/transport/jsonrpc/JsonMessages.java +++ b/client/transport/jsonrpc/src/test/java/io/a2a/client/transport/jsonrpc/JsonMessages.java @@ -1,6 +1,6 @@ package io.a2a.client.transport.jsonrpc; -import static io.a2a.spec.AgentCard.CURRENT_PROTOCOL_VERSION; +import static io.a2a.spec.AgentInterface.CURRENT_PROTOCOL_VERSION; /** * Request and response messages used by the tests. These have been created following examples from @@ -8,9 +8,8 @@ */ public class JsonMessages { - static final String AGENT_CARD = String.format(""" + static final String AGENT_CARD = """ { - "protocolVersions": ["%s"], "name": "GeoSpatial Route Planner Agent", "description": "Provides advanced route planning, traffic analysis, and custom map generation services. This agent can calculate optimal routes, estimate travel times considering real-time traffic, and create personalized maps with points of interest.", "supportedInterfaces" : [ @@ -37,7 +36,7 @@ public class JsonMessages { } } }, - "security": [{ "schemes": { "google": { "list": ["openid", "profile", "email"] } } }], + "securityRequirements": [{ "schemes": { "google": { "list": ["openid", "profile", "email"] } } }], "defaultInputModes": ["application/json", "text/plain"], "defaultOutputModes": ["application/json", "image/png"], "skills": [ @@ -81,7 +80,7 @@ public class JsonMessages { "signature": "QFdkNLNszlGj3z3u0YQGt_T9LixY3qtdQpZmsTdDHDe3fXV9y9-B3m2-XgCpzuhiLt8E0tV6HXoZKHv4GtHgKQ" } ] - }""", CURRENT_PROTOCOL_VERSION); + }"""; static final String SEND_MESSAGE_TEST_REQUEST = """ { @@ -228,7 +227,7 @@ public class JsonMessages { "jsonrpc":"2.0", "method":"GetTask", "params":{ - "name":"tasks/de38c76d-d54c-436c-8b9f-4c2703648d64", + "id":"de38c76d-d54c-436c-8b9f-4c2703648d64", "historyLength":10 } } @@ -262,16 +261,12 @@ public class JsonMessages { "text":"tell me a joke" }, { - "file":{ - "file_with_uri":"file:///path/to/file.txt", - "mediaType":"text/plain" - } + "url":"file:///path/to/file.txt", + "mediaType":"text/plain" }, { - "file":{ - "file_with_bytes":"aGVsbG8=", - "name":"hello.txt" - } + "raw":"aGVsbG8=", + "filename":"hello.txt" } ], "messageId":"message-123" @@ -289,7 +284,7 @@ public class JsonMessages { "jsonrpc":"2.0", "method":"CancelTask", "params":{ - "name":"tasks/de38c76d-d54c-436c-8b9f-4c2703648d64" + "id":"de38c76d-d54c-436c-8b9f-4c2703648d64" } } """; @@ -302,7 +297,7 @@ public class JsonMessages { "id":"de38c76d-d54c-436c-8b9f-4c2703648d64", "contextId":"c295ea44-7543-4f78-b524-7a38915ad6e4", "status":{ - "state":"TASK_STATE_CANCELLED" + "state":"TASK_STATE_CANCELED" }, "metadata":{ @@ -316,7 +311,8 @@ public class JsonMessages { "jsonrpc":"2.0", "method":"GetTaskPushNotificationConfig", "params":{ - "name":"tasks/de38c76d-d54c-436c-8b9f-4c2703648d64/pushNotificationConfigs/c295ea44-7543-4f78-b524-7a38915ad6e4" + "taskId":"de38c76d-d54c-436c-8b9f-4c2703648d64", + "id":"c295ea44-7543-4f78-b524-7a38915ad6e4" } }"""; @@ -325,11 +321,12 @@ public class JsonMessages { "jsonrpc": "2.0", "id": "cd4c76de-d54c-436c-8b9f-4c2703648d64", "result": { - "name": "tasks/de38c76d-d54c-436c-8b9f-4c2703648d64/pushNotificationConfigs/c295ea44-7543-4f78-b524-7a38915ad6e4", + "taskId": "de38c76d-d54c-436c-8b9f-4c2703648d64", + "id": "c295ea44-7543-4f78-b524-7a38915ad6e4", "pushNotificationConfig": { "url": "https://example.com/callback", "authentication": { - "schemes": ["jwt"] + "scheme": "jwt" } } } @@ -341,17 +338,12 @@ public class JsonMessages { "jsonrpc":"2.0", "method":"CreateTaskPushNotificationConfig", "params":{ - "parent":"tasks/de38c76d-d54c-436c-8b9f-4c2703648d64", + "taskId":"de38c76d-d54c-436c-8b9f-4c2703648d64", "configId":"c295ea44-7543-4f78-b524-7a38915ad6e4", "config":{ - "name":"tasks/de38c76d-d54c-436c-8b9f-4c2703648d64/pushNotificationConfigs/c295ea44-7543-4f78-b524-7a38915ad6e4", - "pushNotificationConfig":{ - "url":"https://example.com/callback", - "authentication":{ - "schemes":[ - "jwt" - ] - } + "url":"https://example.com/callback", + "authentication":{ + "scheme":"jwt" } } } @@ -362,11 +354,12 @@ public class JsonMessages { "jsonrpc": "2.0", "id": "cd4c76de-d54c-436c-8b9f-4c2703648d64", "result": { - "name":"tasks/de38c76d-d54c-436c-8b9f-4c2703648d64/pushNotificationConfigs/c295ea44-7543-4f78-b524-7a38915ad6e4", + "taskId":"de38c76d-d54c-436c-8b9f-4c2703648d64", + "id":"c295ea44-7543-4f78-b524-7a38915ad6e4", "pushNotificationConfig": { "url": "https://example.com/callback", "authentication": { - "schemes": ["jwt"] + "scheme": "jwt" } } } @@ -387,10 +380,8 @@ public class JsonMessages { "text":"analyze this image" }, { - "file":{ - "fileWithUri":"file:///path/to/image.jpg", - "mediaType":"image/jpeg" - } + "url":"file:///path/to/image.jpg", + "mediaType":"image/jpeg" } ], "metadata":{ @@ -453,12 +444,10 @@ public class JsonMessages { }, { "data":{ - "data":{ - "temperature":25.5, - "humidity":60.2, - "location":"San Francisco", - "timestamp":"2024-01-15T10:30:00Z" - } + "temperature":25.5, + "humidity":60.2, + "location":"San Francisco", + "timestamp":"2024-01-15T10:30:00Z" } } ], @@ -521,19 +510,15 @@ public class JsonMessages { "text":"analyze this data and image" }, { - "file":{ - "fileWithBytes":"aGVsbG8=", - "mediaType":"image/png", - "name":"chart.png" - } + "raw":"aGVsbG8=", + "mediaType":"image/png", + "filename":"chart.png" }, { "data":{ - "data":{ - "chartType":"bar", - "dataPoints":[10.0, 20.0, 30.0, 40.0], - "labels":["Q1", "Q2", "Q3", "Q4"] - } + "chartType":"bar", + "dataPoints":[10.0, 20.0, 30.0, 40.0], + "labels":["Q1", "Q2", "Q3", "Q4"] } } ], @@ -589,7 +574,7 @@ public class JsonMessages { } """; - static final String GET_AUTHENTICATED_EXTENDED_AGENT_CARD_RESPONSE = String.format(""" + static final String GET_AUTHENTICATED_EXTENDED_AGENT_CARD_RESPONSE = """ { "jsonrpc": "2.0", "id": "1", @@ -618,7 +603,7 @@ public class JsonMessages { } } }, - "security": [{ "schemes": { "google": { "list": ["openid", "profile", "email"] } } }], + "securityRequirements": [{ "schemes": { "google": { "list": ["openid", "profile", "email"] } } }], "defaultInputModes": ["application/json", "text/plain"], "defaultOutputModes": ["application/json", "image/png"], "skills": [ @@ -662,7 +647,6 @@ public class JsonMessages { "tags": ["extended"] } ], - "protocolVersions": ["%s"], "signatures": [ { "protected": "eyJhbGciOiJFUzI1NiIsInR5cCI6IkpPU0UiLCJraWQiOiJrZXktMSIsImprdUI6Imh0dHBzOi8vZXhhbXBsZS5jb20vYWdlbnQvandrcy5qc29uIn0", @@ -670,9 +654,9 @@ public class JsonMessages { } ] } - }""", CURRENT_PROTOCOL_VERSION); + }"""; - static final String AGENT_CARD_SUPPORTS_EXTENDED = String.format(""" + static final String AGENT_CARD_SUPPORTS_EXTENDED = """ { "name": "GeoSpatial Route Planner Agent", "description": "Provides advanced route planning, traffic analysis, and custom map generation services. This agent can calculate optimal routes, estimate travel times considering real-time traffic, and create personalized maps with points of interest.", @@ -735,7 +719,6 @@ public class JsonMessages { "text/html" ] } - ], - "protocolVersions": ["%s"] - }""", CURRENT_PROTOCOL_VERSION); + ] + }"""; } diff --git a/client/transport/jsonrpc/src/test/java/io/a2a/client/transport/jsonrpc/JsonStreamingMessages.java b/client/transport/jsonrpc/src/test/java/io/a2a/client/transport/jsonrpc/JsonStreamingMessages.java index 021c6c7f6..39f2d7859 100644 --- a/client/transport/jsonrpc/src/test/java/io/a2a/client/transport/jsonrpc/JsonStreamingMessages.java +++ b/client/transport/jsonrpc/src/test/java/io/a2a/client/transport/jsonrpc/JsonStreamingMessages.java @@ -50,8 +50,7 @@ public class JsonStreamingMessages { "contextId": "2", "status": { "state": "TASK_STATE_SUBMITTED" - }, - "final": false + } } } }"""; @@ -66,8 +65,7 @@ public class JsonStreamingMessages { "contextId": "2", "status": { "state": "TASK_STATE_COMPLETED" - }, - "final": true + } } } }"""; @@ -141,19 +139,19 @@ public class JsonStreamingMessages { """; - static final String TASK_RESUBSCRIPTION_REQUEST_TEST_RESPONSE = + static final String TASK_SUBSCRIPTION_REQUEST_TEST_RESPONSE = """ event: message data: {"jsonrpc":"2.0","id":1,"result":{"task":{"id":"2","contextId":"context-1234","status":{"state":"TASK_STATE_COMPLETED"},"artifacts":[{"artifactId":"artifact-1","name":"joke","parts":[{"text":"Why did the chicken cross the road? To get to the other side!"}]}],"metadata":{}}}} """; - public static final String TASK_RESUBSCRIPTION_TEST_REQUEST = """ + public static final String TASK_SUBSCRIPTION_TEST_REQUEST = """ { "jsonrpc":"2.0", "method":"SubscribeToTask", "params":{ - "name":"tasks/task-1234" + "id":"task-1234" } }"""; } \ No newline at end of file diff --git a/client/transport/jsonrpc/src/test/java/io/a2a/client/transport/jsonrpc/sse/SSEEventListenerTest.java b/client/transport/jsonrpc/src/test/java/io/a2a/client/transport/jsonrpc/sse/SSEEventListenerTest.java index 0817b753f..23e162e7c 100644 --- a/client/transport/jsonrpc/src/test/java/io/a2a/client/transport/jsonrpc/sse/SSEEventListenerTest.java +++ b/client/transport/jsonrpc/src/test/java/io/a2a/client/transport/jsonrpc/sse/SSEEventListenerTest.java @@ -184,12 +184,15 @@ public void testOnFailure() { @Test public void testFinalTaskStatusUpdateEventCancels() { - TaskStatusUpdateEvent tsue = TaskStatusUpdateEvent.builder() - .taskId("1234") - .contextId("xyz") - .status(new TaskStatus(TaskState.COMPLETED)) - .isFinal(true) - .build(); + TaskStatus completedStatus = new TaskStatus(TaskState.COMPLETED); + // Use constructor since Builder doesn't have isFinal method + TaskStatusUpdateEvent tsue = new TaskStatusUpdateEvent( + "1234", + completedStatus, + "xyz", + completedStatus.state().isFinal(), // Derive from state + null + ); // Set up event handler AtomicReference receivedEvent = new AtomicReference<>(); diff --git a/client/transport/rest/src/main/java/io/a2a/client/transport/rest/RestTransport.java b/client/transport/rest/src/main/java/io/a2a/client/transport/rest/RestTransport.java index 88c86846d..61fb29428 100644 --- a/client/transport/rest/src/main/java/io/a2a/client/transport/rest/RestTransport.java +++ b/client/transport/rest/src/main/java/io/a2a/client/transport/rest/RestTransport.java @@ -27,7 +27,6 @@ import com.google.protobuf.InvalidProtocolBufferException; import com.google.protobuf.MessageOrBuilder; import com.google.protobuf.util.JsonFormat; -import io.a2a.client.http.A2ACardResolver; import io.a2a.client.http.A2AHttpClient; import io.a2a.client.http.A2AHttpClientFactory; import io.a2a.client.http.A2AHttpResponse; @@ -132,7 +131,7 @@ public void sendMessageStreaming(MessageSendParams messageSendParams, Consumer eventConsumer, + public void subscribeToTask(TaskIdParams request, Consumer eventConsumer, Consumer errorConsumer, @Nullable ClientCallContext context) throws A2AClientException { checkNotNullParam("request", request); io.a2a.grpc.SubscribeToTaskRequest.Builder builder = io.a2a.grpc.SubscribeToTaskRequest.newBuilder(); - builder.setName("tasks/" + request.id()); + builder.setId(request.id()); PayloadAndHeaders payloadAndHeaders = applyInterceptors(SUBSCRIBE_TO_TASK_METHOD, builder, agentCard, context); AtomicReference> ref = new AtomicReference<>(); diff --git a/client/transport/rest/src/test/java/io/a2a/client/transport/rest/JsonRestMessages.java b/client/transport/rest/src/test/java/io/a2a/client/transport/rest/JsonRestMessages.java index f324f004e..35ac4a9c5 100644 --- a/client/transport/rest/src/test/java/io/a2a/client/transport/rest/JsonRestMessages.java +++ b/client/transport/rest/src/test/java/io/a2a/client/transport/rest/JsonRestMessages.java @@ -48,7 +48,7 @@ public class JsonRestMessages { static final String CANCEL_TASK_TEST_REQUEST = """ { - "name": "tasks/de38c76d-d54c-436c-8b9f-4c2703648d64" + "id": "de38c76d-d54c-436c-8b9f-4c2703648d64" }"""; static final String CANCEL_TASK_TEST_RESPONSE = """ @@ -56,7 +56,7 @@ public class JsonRestMessages { "id": "de38c76d-d54c-436c-8b9f-4c2703648d64", "contextId": "c295ea44-7543-4f78-b524-7a38915ad6e4", "status": { - "state": "TASK_STATE_CANCELLED" + "state": "TASK_STATE_CANCELED" }, "metadata": {} }"""; @@ -86,16 +86,12 @@ public class JsonRestMessages { "text": "tell me a joke" }, { - "file": { - "file_with_uri": "file:///path/to/file.txt", - "mediaType": "text/plain" - } + "url": "file:///path/to/file.txt", + "mediaType": "text/plain" }, { - "file": { - "file_with_bytes": "aGVsbG8=", - "mediaType": "text/plain" - } + "raw": "aGVsbG8=", + "mediaType": "text/plain" } ], "messageId": "message-123" @@ -129,7 +125,7 @@ public class JsonRestMessages { "openIdConnectUrl": "https://accounts.google.com/.well-known/openid-configuration" } }, - "security": [{ "google": ["openid", "profile", "email"] }], + "securityRequirements": [{ "schemes": { "google": { "list": ["openid", "profile", "email"] } } }], "defaultInputModes": ["application/json", "text/plain"], "defaultOutputModes": ["application/json", "image/png"], "skills": [ @@ -195,7 +191,7 @@ public class JsonRestMessages { "openIdConnectUrl": "https://accounts.google.com/.well-known/openid-configuration" } }, - "security": [{ "google": ["openid", "profile", "email"] }], + "securityRequirements": [{ "schemes": { "google": { "list": ["openid", "profile", "email"] } } }], "defaultInputModes": ["application/json", "text/plain"], "defaultOutputModes": ["application/json", "image/png"], "skills": [ @@ -261,7 +257,7 @@ public class JsonRestMessages { "openIdConnectUrl": "https://accounts.google.com/.well-known/openid-configuration" } }, - "security": [{ "google": ["openid", "profile", "email"] }], + "securityRequirements": [{ "schemes": { "google": { "list": ["openid", "profile", "email"] } } }], "defaultInputModes": ["application/json", "text/plain"], "defaultOutputModes": ["application/json", "image/png"], "skills": [ @@ -311,11 +307,12 @@ public class JsonRestMessages { static final String GET_TASK_PUSH_NOTIFICATION_CONFIG_TEST_RESPONSE = """ { - "name": "tasks/de38c76d-d54c-436c-8b9f-4c2703648d64/pushNotificationConfigs/10", + "taskId": "de38c76d-d54c-436c-8b9f-4c2703648d64", + "id": "10", "pushNotificationConfig": { "url": "https://example.com/callback", "authentication": { - "schemes": ["jwt"] + "scheme": "jwt" } } }"""; @@ -323,16 +320,18 @@ public class JsonRestMessages { { "configs":[ { - "name": "tasks/de38c76d-d54c-436c-8b9f-4c2703648d64/pushNotificationConfigs/10", + "taskId": "de38c76d-d54c-436c-8b9f-4c2703648d64", + "id": "10", "pushNotificationConfig": { "url": "https://example.com/callback", "authentication": { - "schemes": ["jwt"] + "scheme": "jwt" } } }, { - "name": "tasks/de38c76d-d54c-436c-8b9f-4c2703648d64/pushNotificationConfigs/5", + "taskId": "de38c76d-d54c-436c-8b9f-4c2703648d64", + "id": "5", "pushNotificationConfig": { "url": "https://test.com/callback" } @@ -343,26 +342,24 @@ public class JsonRestMessages { static final String SET_TASK_PUSH_NOTIFICATION_CONFIG_TEST_REQUEST = """ { - "parent": "tasks/de38c76d-d54c-436c-8b9f-4c2703648d64", + "taskId": "de38c76d-d54c-436c-8b9f-4c2703648d64", "configId": "default-config-id", "config": { - "name": "tasks/de38c76d-d54c-436c-8b9f-4c2703648d64/pushNotificationConfigs/default-config-id", - "pushNotificationConfig": { - "url": "https://example.com/callback", - "authentication": { - "schemes": [ "jwt" ] - } + "url": "https://example.com/callback", + "authentication": { + "scheme": "jwt" } } }"""; static final String SET_TASK_PUSH_NOTIFICATION_CONFIG_TEST_RESPONSE = """ { - "name": "tasks/de38c76d-d54c-436c-8b9f-4c2703648d64/pushNotificationConfigs/10", + "taskId": "de38c76d-d54c-436c-8b9f-4c2703648d64", + "id": "10", "pushNotificationConfig": { "url": "https://example.com/callback", "authentication": { - "schemes": ["jwt"] + "scheme": "jwt" } } }"""; diff --git a/client/transport/rest/src/test/java/io/a2a/client/transport/rest/RestTransportTest.java b/client/transport/rest/src/test/java/io/a2a/client/transport/rest/RestTransportTest.java index 04efb4eca..476a93ba2 100644 --- a/client/transport/rest/src/test/java/io/a2a/client/transport/rest/RestTransportTest.java +++ b/client/transport/rest/src/test/java/io/a2a/client/transport/rest/RestTransportTest.java @@ -13,7 +13,6 @@ import static io.a2a.client.transport.rest.JsonRestMessages.SET_TASK_PUSH_NOTIFICATION_CONFIG_TEST_REQUEST; import static io.a2a.client.transport.rest.JsonRestMessages.SET_TASK_PUSH_NOTIFICATION_CONFIG_TEST_RESPONSE; import static io.a2a.client.transport.rest.JsonRestMessages.TASK_RESUBSCRIPTION_REQUEST_TEST_RESPONSE; -import static io.a2a.spec.AgentCard.CURRENT_PROTOCOL_VERSION; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertInstanceOf; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -90,7 +89,6 @@ public class RestTransportTest { .tags(Collections.singletonList("hello world")) .examples(List.of("hi", "hello world")) .build())) - .protocolVersions(CURRENT_PROTOCOL_VERSION) .build(); @BeforeEach @@ -309,15 +307,14 @@ public void testCreateTaskPushNotificationConfiguration() throws Exception { .id("default-config-id") .url("https://example.com/callback") .authentication( - new AuthenticationInfo(Collections.singletonList("jwt"), null)) + new AuthenticationInfo("jwt", null)) .build(), "tenant"); TaskPushNotificationConfig taskPushNotificationConfig = client.createTaskPushNotificationConfiguration(pushedConfig, null); PushNotificationConfig pushNotificationConfig = taskPushNotificationConfig.pushNotificationConfig(); assertNotNull(pushNotificationConfig); assertEquals("https://example.com/callback", pushNotificationConfig.url()); AuthenticationInfo authenticationInfo = pushNotificationConfig.authentication(); - assertEquals(1, authenticationInfo.schemes().size()); - assertEquals("jwt", authenticationInfo.schemes().get(0)); + assertEquals("jwt", authenticationInfo.scheme()); } /** @@ -343,8 +340,7 @@ public void testGetTaskPushNotificationConfiguration() throws Exception { assertNotNull(pushNotificationConfig); assertEquals("https://example.com/callback", pushNotificationConfig.url()); AuthenticationInfo authenticationInfo = pushNotificationConfig.authentication(); - assertTrue(authenticationInfo.schemes().size() == 1); - assertEquals("jwt", authenticationInfo.schemes().get(0)); + assertEquals("jwt", authenticationInfo.scheme()); } /** @@ -372,8 +368,7 @@ public void testListTaskPushNotificationConfigurations() throws Exception { assertEquals("https://example.com/callback", pushNotificationConfig.url()); assertEquals("10", pushNotificationConfig.id()); AuthenticationInfo authenticationInfo = pushNotificationConfig.authentication(); - assertTrue(authenticationInfo.schemes().size() == 1); - assertEquals("jwt", authenticationInfo.schemes().get(0)); + assertEquals("jwt", authenticationInfo.scheme()); assertEquals("", authenticationInfo.credentials()); pushNotificationConfig = result.configs().get(1).pushNotificationConfig(); assertNotNull(pushNotificationConfig); @@ -404,11 +399,11 @@ public void testDeleteTaskPushNotificationConfigurations() throws Exception { } /** - * Test of resubscribe method, of class JSONRestTransport. + * Test of subscribe method, of class JSONRestTransport. */ @Test - public void testResubscribe() throws Exception { - log.info("Testing resubscribe"); + public void testSubscribe() throws Exception { + log.info("Testing subscribeToTask"); this.server.when( request() @@ -432,7 +427,7 @@ public void testResubscribe() throws Exception { latch.countDown(); }; Consumer errorHandler = error -> {}; - client.resubscribe(taskIdParams, eventHandler, errorHandler, null); + client.subscribeToTask(taskIdParams, eventHandler, errorHandler, null); boolean eventReceived = latch.await(10, TimeUnit.SECONDS); assertTrue(eventReceived); diff --git a/client/transport/rest/src/test/java/io/a2a/client/transport/rest/sse/SSEEventListenerTest.java b/client/transport/rest/src/test/java/io/a2a/client/transport/rest/sse/SSEEventListenerTest.java index 1a2bd7f26..eed199ab3 100644 --- a/client/transport/rest/src/test/java/io/a2a/client/transport/rest/sse/SSEEventListenerTest.java +++ b/client/transport/rest/src/test/java/io/a2a/client/transport/rest/sse/SSEEventListenerTest.java @@ -151,8 +151,7 @@ public void testOnMessageWithStatusUpdateEvent() { "contextId": "2", "status": { "state": "TASK_STATE_SUBMITTED" - }, - "final": false + } } } """; @@ -187,8 +186,7 @@ public void testOnMessageWithFinalStatusUpdateEventCancels() { "contextId": "2", "status": { "state": "TASK_STATE_COMPLETED" - }, - "final": true + } } } """; diff --git a/client/transport/spi/src/main/java/io/a2a/client/transport/spi/ClientTransport.java b/client/transport/spi/src/main/java/io/a2a/client/transport/spi/ClientTransport.java index 504e4c601..82fe40996 100644 --- a/client/transport/spi/src/main/java/io/a2a/client/transport/spi/ClientTransport.java +++ b/client/transport/spi/src/main/java/io/a2a/client/transport/spi/ClientTransport.java @@ -127,13 +127,13 @@ void deleteTaskPushNotificationConfigurations( /** * Reconnect to get task updates for an existing task. * - * @param request the task ID parameters specifying which task to resubscribe to + * @param request the task ID parameters specifying which task to subscribe to * @param eventConsumer consumer that will receive streaming events as they arrive * @param errorConsumer consumer that will be called if an error occurs during streaming * @param context optional client call context for the request (may be {@code null}) - * @throws A2AClientException if resubscribing to the task fails for any reason + * @throws A2AClientException if subscribing to the task fails for any reason */ - void resubscribe(TaskIdParams request, Consumer eventConsumer, + void subscribeToTask(TaskIdParams request, Consumer eventConsumer, Consumer errorConsumer, @Nullable ClientCallContext context) throws A2AClientException; /** diff --git a/client/transport/spi/src/main/java/io/a2a/client/transport/spi/interceptors/auth/AuthInterceptor.java b/client/transport/spi/src/main/java/io/a2a/client/transport/spi/interceptors/auth/AuthInterceptor.java index 3573d6784..6cfc322da 100644 --- a/client/transport/spi/src/main/java/io/a2a/client/transport/spi/interceptors/auth/AuthInterceptor.java +++ b/client/transport/spi/src/main/java/io/a2a/client/transport/spi/interceptors/auth/AuthInterceptor.java @@ -35,10 +35,10 @@ public AuthInterceptor(final CredentialService credentialService) { public PayloadAndHeaders intercept(String methodName, @Nullable Object payload, Map headers, @Nullable AgentCard agentCard, @Nullable ClientCallContext clientCallContext) { Map updatedHeaders = new HashMap<>(headers == null ? new HashMap<>() : headers); - if (agentCard == null || agentCard.security() == null || agentCard.securitySchemes() == null) { + if (agentCard == null || agentCard.securityRequirements()== null || agentCard.securitySchemes() == null) { return new PayloadAndHeaders(payload, updatedHeaders); } - for (Map> requirement : agentCard.security()) { + for (Map> requirement : agentCard.securityRequirements()) { for (String securitySchemeName : requirement.keySet()) { String credential = credentialService.getCredential(securitySchemeName, clientCallContext); if (credential != null && agentCard.securitySchemes().containsKey(securitySchemeName)) { diff --git a/client/transport/spi/src/test/java/io/a2a/client/transport/spi/interceptors/auth/AuthInterceptorTest.java b/client/transport/spi/src/test/java/io/a2a/client/transport/spi/interceptors/auth/AuthInterceptorTest.java index a9f07c83e..9ea69f354 100644 --- a/client/transport/spi/src/test/java/io/a2a/client/transport/spi/interceptors/auth/AuthInterceptorTest.java +++ b/client/transport/spi/src/test/java/io/a2a/client/transport/spi/interceptors/auth/AuthInterceptorTest.java @@ -235,7 +235,7 @@ void testAvailableSecuritySchemeNotInAgentCardSecuritySchemes() { .defaultInputModes(List.of("text")) .defaultOutputModes(List.of("text")) .skills(List.of()) - .security(List.of(Map.of(schemeName, List.of()))) + .securityRequirements(List.of(Map.of(schemeName, List.of()))) .securitySchemes(Map.of()) // no security schemes .build(); @@ -289,7 +289,7 @@ void testNoAgentCardSecuritySpecified() { .defaultInputModes(List.of("text")) .defaultOutputModes(List.of("text")) .skills(List.of()) - .security(null) // no security info + .securityRequirements(null) // no security info .build(); Map requestPayload = Map.of("test", "payload"); @@ -321,7 +321,7 @@ private AgentCard createAgentCard(String schemeName, SecurityScheme securitySche .defaultInputModes(List.of("text")) .defaultOutputModes(List.of("text")) .skills(List.of()) - .security(List.of(Map.of(schemeName, List.of()))) + .securityRequirements(List.of(Map.of(schemeName, List.of()))) .securitySchemes(Map.of(schemeName, securityScheme)) .build(); } diff --git a/client/transport/spi/src/test/java/io/a2a/client/transport/spi/sse/SSEEventListenerTest.java b/client/transport/spi/src/test/java/io/a2a/client/transport/spi/sse/SSEEventListenerTest.java index 3b0f37b2e..ac1392c5e 100644 --- a/client/transport/spi/src/test/java/io/a2a/client/transport/spi/sse/SSEEventListenerTest.java +++ b/client/transport/spi/src/test/java/io/a2a/client/transport/spi/sse/SSEEventListenerTest.java @@ -118,12 +118,14 @@ private static Task createTask(TaskState state) { } private static TaskStatusUpdateEvent createTaskStatusUpdateEvent(TaskState state, boolean isFinal) { - return TaskStatusUpdateEvent.builder() - .taskId(TEST_TASK_ID) - .contextId(TEST_CONTEXT_ID) - .status(new TaskStatus(state)) - .isFinal(isFinal) - .build(); + // Use constructor since Builder doesn't have isFinal method + return new TaskStatusUpdateEvent( + TEST_TASK_ID, + new TaskStatus(state), + TEST_CONTEXT_ID, + isFinal, + null + ); } private static TestSSEEventListener createListenerWithEventCapture(AtomicReference eventCapture) { diff --git a/examples/cloud-deployment/server/src/main/java/io/a2a/examples/cloud/CloudAgentCardProducer.java b/examples/cloud-deployment/server/src/main/java/io/a2a/examples/cloud/CloudAgentCardProducer.java index e96c6f1c1..b3adbcdd8 100644 --- a/examples/cloud-deployment/server/src/main/java/io/a2a/examples/cloud/CloudAgentCardProducer.java +++ b/examples/cloud-deployment/server/src/main/java/io/a2a/examples/cloud/CloudAgentCardProducer.java @@ -1,6 +1,5 @@ package io.a2a.examples.cloud; -import static io.a2a.spec.AgentCard.CURRENT_PROTOCOL_VERSION; import java.util.Collections; import java.util.List; @@ -57,7 +56,6 @@ public AgentCard agentCard() { )) .build() )) - .protocolVersions(CURRENT_PROTOCOL_VERSION) .build(); } } diff --git a/examples/cloud-deployment/server/src/test/java/io/a2a/examples/cloud/A2ACloudExampleClient.java b/examples/cloud-deployment/server/src/test/java/io/a2a/examples/cloud/A2ACloudExampleClient.java index b29b0b55f..0dce363df 100644 --- a/examples/cloud-deployment/server/src/test/java/io/a2a/examples/cloud/A2ACloudExampleClient.java +++ b/examples/cloud-deployment/server/src/test/java/io/a2a/examples/cloud/A2ACloudExampleClient.java @@ -199,7 +199,7 @@ private void subscribeToTaskUpdates() { Thread.sleep(1000); // Wait for Kafka events to propagate } - streamingClient.resubscribe( + streamingClient.subscribeToTask( new TaskIdParams(serverTaskId), List.of(this::handleSubscriptionEvent), this::handleSubscriptionError diff --git a/examples/helloworld/server/src/main/java/io/a2a/examples/helloworld/AgentCardProducer.java b/examples/helloworld/server/src/main/java/io/a2a/examples/helloworld/AgentCardProducer.java index 165b1574e..3725e1bd7 100644 --- a/examples/helloworld/server/src/main/java/io/a2a/examples/helloworld/AgentCardProducer.java +++ b/examples/helloworld/server/src/main/java/io/a2a/examples/helloworld/AgentCardProducer.java @@ -1,6 +1,5 @@ package io.a2a.examples.helloworld; -import static io.a2a.spec.AgentCard.CURRENT_PROTOCOL_VERSION; import java.util.Collections; import java.util.List; @@ -42,7 +41,6 @@ public AgentCard agentCard() { .tags(Collections.singletonList("hello world")) .examples(List.of("hi", "hello world")) .build())) - .protocolVersions(CURRENT_PROTOCOL_VERSION) .build(); } } diff --git a/extras/push-notification-config-store-database-jpa/src/test/java/io/a2a/extras/pushnotificationconfigstore/database/jpa/JpaDatabasePushNotificationConfigStoreIntegrationTest.java b/extras/push-notification-config-store-database-jpa/src/test/java/io/a2a/extras/pushnotificationconfigstore/database/jpa/JpaDatabasePushNotificationConfigStoreIntegrationTest.java index ab06747de..0366e236a 100644 --- a/extras/push-notification-config-store-database-jpa/src/test/java/io/a2a/extras/pushnotificationconfigstore/database/jpa/JpaDatabasePushNotificationConfigStoreIntegrationTest.java +++ b/extras/push-notification-config-store-database-jpa/src/test/java/io/a2a/extras/pushnotificationconfigstore/database/jpa/JpaDatabasePushNotificationConfigStoreIntegrationTest.java @@ -129,7 +129,7 @@ public void testJpaDatabasePushNotificationConfigStoreIntegration() throws Excep // Step 3: Verify the configuration was stored using client API TaskPushNotificationConfig storedConfig = client.getTaskPushNotificationConfiguration( - new GetTaskPushNotificationConfigParams(taskId)); + new GetTaskPushNotificationConfigParams(taskId, "test-config-1")); assertNotNull(storedConfig); assertEquals(taskId, storedConfig.taskId()); @@ -183,7 +183,7 @@ public void testJpaDatabasePushNotificationConfigStoreIntegration() throws Excep // Verify deletion by asserting that getting the config now throws an exception assertThrows(A2AClientException.class, () -> { - client.getTaskPushNotificationConfiguration(new GetTaskPushNotificationConfigParams(taskId)); + client.getTaskPushNotificationConfiguration(new GetTaskPushNotificationConfigParams(taskId, "test-config-1")); }, "Getting a deleted config should throw an A2AClientException"); } diff --git a/extras/queue-manager-replicated/core/src/main/java/io/a2a/extras/queuemanager/replicated/core/ReplicatedQueueManager.java b/extras/queue-manager-replicated/core/src/main/java/io/a2a/extras/queuemanager/replicated/core/ReplicatedQueueManager.java index 44dfbe427..a5e3c629c 100644 --- a/extras/queue-manager-replicated/core/src/main/java/io/a2a/extras/queuemanager/replicated/core/ReplicatedQueueManager.java +++ b/extras/queue-manager-replicated/core/src/main/java/io/a2a/extras/queuemanager/replicated/core/ReplicatedQueueManager.java @@ -16,7 +16,6 @@ import io.a2a.server.events.MainEventBus; import io.a2a.server.events.QueueManager; import io.a2a.server.tasks.TaskStateProvider; -import org.jspecify.annotations.Nullable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -170,7 +169,6 @@ public void onTaskFinalized(@Observes(during = TransactionPhase.AFTER_SUCCESS) T .taskId(taskId) .contextId(finalTask.contextId()) .status(finalTask.status()) - .isFinal(true) .build(); // Send TaskStatusUpdateEvent FIRST to ensure it arrives before poison pill diff --git a/extras/queue-manager-replicated/core/src/test/java/io/a2a/extras/queuemanager/replicated/core/EventSerializationTest.java b/extras/queue-manager-replicated/core/src/test/java/io/a2a/extras/queuemanager/replicated/core/EventSerializationTest.java index ca781b5b0..33eaa908f 100644 --- a/extras/queue-manager-replicated/core/src/test/java/io/a2a/extras/queuemanager/replicated/core/EventSerializationTest.java +++ b/extras/queue-manager-replicated/core/src/test/java/io/a2a/extras/queuemanager/replicated/core/EventSerializationTest.java @@ -110,7 +110,6 @@ public void testTaskStatusUpdateEventSerialization() throws JsonProcessingExcept .taskId("test-task-abc") .contextId("test-context-def") .status(status) - .isFinal(true) .build(); // Test serialization as Event @@ -206,7 +205,6 @@ public void testReplicatedEventWithStreamingEventSerialization() throws JsonProc .taskId("replicated-test-task") .contextId("replicated-test-context") .status(new TaskStatus(TaskState.WORKING)) - .isFinal(false) .build(); // Create ReplicatedEventQueueItem with StreamingEventKind @@ -280,7 +278,6 @@ public void testReplicatedEventBackwardCompatibility() throws JsonProcessingExce .taskId("backward-compat-task") .contextId("backward-compat-context") .status(new TaskStatus(TaskState.COMPLETED)) - .isFinal(true) .build(); // Use the backward compatibility constructor diff --git a/extras/queue-manager-replicated/core/src/test/java/io/a2a/extras/queuemanager/replicated/core/ReplicatedQueueManagerTest.java b/extras/queue-manager-replicated/core/src/test/java/io/a2a/extras/queuemanager/replicated/core/ReplicatedQueueManagerTest.java index 14b4c1f51..b766863aa 100644 --- a/extras/queue-manager-replicated/core/src/test/java/io/a2a/extras/queuemanager/replicated/core/ReplicatedQueueManagerTest.java +++ b/extras/queue-manager-replicated/core/src/test/java/io/a2a/extras/queuemanager/replicated/core/ReplicatedQueueManagerTest.java @@ -67,7 +67,6 @@ void setUp() { .taskId("test-task") .contextId("test-context") .status(new TaskStatus(TaskState.SUBMITTED)) - .isFinal(false) .build(); } @@ -80,7 +79,6 @@ private TaskStatusUpdateEvent createEventForTask(String taskId) { .taskId(taskId) .contextId("test-context") .status(new TaskStatus(TaskState.SUBMITTED)) - .isFinal(false) .build(); } @@ -277,7 +275,6 @@ void testReplicatedEventJsonSerialization() throws Exception { .taskId("json-test-task") .contextId("json-test-context") .status(new TaskStatus(TaskState.COMPLETED)) - .isFinal(true) .build(); ReplicatedEventQueueItem original = new ReplicatedEventQueueItem("json-test-task", originalEvent); @@ -350,7 +347,6 @@ public void onTaskFinalized(String tid) { .taskId(taskId) // Use same taskId as queue .contextId("test-context") .status(new TaskStatus(TaskState.WORKING)) - .isFinal(false) .build(); queue.enqueueEvent(event); } @@ -376,7 +372,6 @@ public void onTaskFinalized(String tid) { .taskId(taskId) // Use same taskId as queue .contextId("test-context") .status(new TaskStatus(TaskState.COMPLETED)) - .isFinal(true) .build(); ReplicatedEventQueueItem replicatedEvent = new ReplicatedEventQueueItem(taskId, event); queueManager.onReplicatedEvent(replicatedEvent); @@ -505,7 +500,6 @@ void testReplicatedEventToExistingQueueWhenTaskBecomesInactive() throws Interrup .taskId(taskId) .contextId("test-context") .status(new TaskStatus(TaskState.COMPLETED)) - .isFinal(true) .build(); ReplicatedEventQueueItem replicatedEvent = new ReplicatedEventQueueItem(taskId, newEvent); queueManager.onReplicatedEvent(replicatedEvent); diff --git a/extras/queue-manager-replicated/replication-mp-reactive/src/test/java/io/a2a/extras/queuemanager/replicated/mp_reactive/ReactiveMessagingReplicationStrategyTest.java b/extras/queue-manager-replicated/replication-mp-reactive/src/test/java/io/a2a/extras/queuemanager/replicated/mp_reactive/ReactiveMessagingReplicationStrategyTest.java index 4638f7385..81bb9ffe0 100644 --- a/extras/queue-manager-replicated/replication-mp-reactive/src/test/java/io/a2a/extras/queuemanager/replicated/mp_reactive/ReactiveMessagingReplicationStrategyTest.java +++ b/extras/queue-manager-replicated/replication-mp-reactive/src/test/java/io/a2a/extras/queuemanager/replicated/mp_reactive/ReactiveMessagingReplicationStrategyTest.java @@ -44,7 +44,6 @@ public void setUp() { .taskId("test-task") .contextId("test-context") .status(new TaskStatus(TaskState.SUBMITTED)) - .isFinal(false) .build(); } @@ -54,7 +53,6 @@ private String createValidJsonMessage(String taskId, String contextId) throws Ex .taskId(taskId) .contextId(contextId) .status(new TaskStatus(TaskState.WORKING)) - .isFinal(false) .build(); ReplicatedEventQueueItem replicatedEvent = new ReplicatedEventQueueItem(taskId, event); return JsonUtil.toJson(replicatedEvent); diff --git a/extras/queue-manager-replicated/tests-multi-instance/quarkus-common/src/main/java/io/a2a/extras/queuemanager/replicated/tests/multiinstance/common/MultiInstanceReplicationAgentCards.java b/extras/queue-manager-replicated/tests-multi-instance/quarkus-common/src/main/java/io/a2a/extras/queuemanager/replicated/tests/multiinstance/common/MultiInstanceReplicationAgentCards.java index a8020f5ae..4d1133ad9 100644 --- a/extras/queue-manager-replicated/tests-multi-instance/quarkus-common/src/main/java/io/a2a/extras/queuemanager/replicated/tests/multiinstance/common/MultiInstanceReplicationAgentCards.java +++ b/extras/queue-manager-replicated/tests-multi-instance/quarkus-common/src/main/java/io/a2a/extras/queuemanager/replicated/tests/multiinstance/common/MultiInstanceReplicationAgentCards.java @@ -1,6 +1,5 @@ package io.a2a.extras.queuemanager.replicated.tests.multiinstance.common; -import static io.a2a.spec.AgentCard.CURRENT_PROTOCOL_VERSION; import java.util.Collections; import java.util.List; @@ -47,7 +46,6 @@ public static AgentCard createAgentCard(int instanceNumber, int port) { .description("Fire-and-forget agent for testing replication") .tags(Collections.singletonList("test")) .build())) - .protocolVersions(CURRENT_PROTOCOL_VERSION) .build(); } } diff --git a/extras/queue-manager-replicated/tests-multi-instance/tests/src/test/java/io/a2a/extras/queuemanager/replicated/tests/multiinstance/MultiInstanceReplicationTest.java b/extras/queue-manager-replicated/tests-multi-instance/tests/src/test/java/io/a2a/extras/queuemanager/replicated/tests/multiinstance/MultiInstanceReplicationTest.java index b98f0e87d..81bc23af3 100644 --- a/extras/queue-manager-replicated/tests-multi-instance/tests/src/test/java/io/a2a/extras/queuemanager/replicated/tests/multiinstance/MultiInstanceReplicationTest.java +++ b/extras/queue-manager-replicated/tests-multi-instance/tests/src/test/java/io/a2a/extras/queuemanager/replicated/tests/multiinstance/MultiInstanceReplicationTest.java @@ -244,7 +244,7 @@ public void testInfrastructureStartup() { /** * Main multi-instance replication test following architect's guidance: * 1. Send initial message on app1 (creates task in non-final state) - * 2. Resubscribe to that task from both app1 and app2 + * 2. Subscribe to that task from both app1 and app2 * 3. Send message on app1, verify both subscribers receive it * 4. Send message on app2, verify both subscribers receive it * 5. Send final message to transition task to COMPLETED @@ -328,7 +328,7 @@ public void testMultiInstanceEventReplication() throws Exception { } System.out.println("APP1 received event: " + eventDetail); - // Per A2A spec 3.1.6: Handle initial TaskEvent on resubscribe + // Per A2A spec 3.1.6: Handle initial TaskEvent on subscribe if (!app1ReceivedInitialTask.get() && event instanceof io.a2a.client.TaskEvent) { app1ReceivedInitialTask.set(true); System.out.println("APP1 filtered initial TaskEvent"); @@ -360,7 +360,7 @@ public void testMultiInstanceEventReplication() throws Exception { } System.out.println("APP2 received event: " + eventDetail); - // Per A2A spec 3.1.6: Handle initial TaskEvent on resubscribe + // Per A2A spec 3.1.6: Handle initial TaskEvent on subscribe if (!app2ReceivedInitialTask.get() && event instanceof io.a2a.client.TaskEvent) { app2ReceivedInitialTask.set(true); System.out.println("APP2 filtered initial TaskEvent"); @@ -378,9 +378,9 @@ public void testMultiInstanceEventReplication() throws Exception { } }; - // Start subscriptions (resubscribe returns void) - getClient1().resubscribe(new TaskIdParams(taskId), List.of(app1Subscriber), app1ErrorHandler); - getClient2().resubscribe(new TaskIdParams(taskId), List.of(app2Subscriber), app2ErrorHandler); + // Start subscriptions (subscribe returns void) + getClient1().subscribeToTask(new TaskIdParams(taskId), List.of(app1Subscriber), app1ErrorHandler); + getClient2().subscribeToTask(new TaskIdParams(taskId), List.of(app2Subscriber), app2ErrorHandler); // Wait for subscriptions to be established - at least one event should arrive on each await() diff --git a/extras/queue-manager-replicated/tests-single-instance/src/test/java/io/a2a/extras/queuemanager/replicated/tests/KafkaReplicationIntegrationTest.java b/extras/queue-manager-replicated/tests-single-instance/src/test/java/io/a2a/extras/queuemanager/replicated/tests/KafkaReplicationIntegrationTest.java index d38f8244c..26fd1bb2d 100644 --- a/extras/queue-manager-replicated/tests-single-instance/src/test/java/io/a2a/extras/queuemanager/replicated/tests/KafkaReplicationIntegrationTest.java +++ b/extras/queue-manager-replicated/tests-single-instance/src/test/java/io/a2a/extras/queuemanager/replicated/tests/KafkaReplicationIntegrationTest.java @@ -227,13 +227,13 @@ public void testKafkaEventReceivedByA2AServer() throws Exception { Thread.sleep(1000); // Set up resubscription to listen for task updates using streaming client - CountDownLatch resubscribeLatch = new CountDownLatch(1); + CountDownLatch subscribeLatch = new CountDownLatch(1); AtomicReference receivedCompletedEvent = new AtomicReference<>(); AtomicBoolean wasUnexpectedEvent = new AtomicBoolean(false); AtomicReference errorRef = new AtomicReference<>(); AtomicBoolean receivedInitialTask = new AtomicBoolean(false); - // Create consumer to handle resubscribed events + // Create consumer to handle subscribed events BiConsumer consumer = (event, agentCard) -> { // Per A2A spec 3.1.6: ENFORCE that first event is TaskEvent if (!receivedInitialTask.get()) { @@ -241,7 +241,7 @@ public void testKafkaEventReceivedByA2AServer() throws Exception { receivedInitialTask.set(true); return; } else { - throw new AssertionError("First event on resubscribe MUST be TaskEvent, but was: " + event.getClass().getSimpleName()); + throw new AssertionError("First event on subscribe MUST be TaskEvent, but was: " + event.getClass().getSimpleName()); } } @@ -250,7 +250,7 @@ public void testKafkaEventReceivedByA2AServer() throws Exception { if (taskUpdateEvent.getUpdateEvent() instanceof TaskStatusUpdateEvent statusEvent) { if (statusEvent.status().state() == TaskState.COMPLETED) { receivedCompletedEvent.set(statusEvent); - resubscribeLatch.countDown(); + subscribeLatch.countDown(); } } else { wasUnexpectedEvent.set(true); @@ -267,18 +267,17 @@ public void testKafkaEventReceivedByA2AServer() throws Exception { if (!isStreamClosedError(error)) { errorRef.set(error); } - resubscribeLatch.countDown(); + subscribeLatch.countDown(); }; - // Resubscribe to the task to listen for updates - streamingClient.resubscribe(new TaskIdParams(taskId), List.of(consumer), errorHandler); + // Subscribe to the task to listen for updates + streamingClient.subscribeToTask(new TaskIdParams(taskId), List.of(consumer), errorHandler); // Now manually send a TaskStatusUpdateEvent to Kafka using reactive messaging TaskStatusUpdateEvent statusEvent = TaskStatusUpdateEvent.builder() .taskId(taskId) .contextId(contextId) .status(new TaskStatus(TaskState.COMPLETED)) - .isFinal(true) .build(); ReplicatedEventQueueItem replicatedEvent = new ReplicatedEventQueueItem(taskId, statusEvent); @@ -289,7 +288,7 @@ public void testKafkaEventReceivedByA2AServer() throws Exception { // Wait for the replicated event to be received via streaming resubscription // This tests the full round-trip: Manual Kafka Event -> A2A System -> Streaming Client - assertTrue(resubscribeLatch.await(15, TimeUnit.SECONDS), "Should receive COMPLETED event via resubscription"); + assertTrue(subscribeLatch.await(15, TimeUnit.SECONDS), "Should receive COMPLETED event via resubscription"); // Verify no unexpected events or errors assertFalse(wasUnexpectedEvent.get(), "Should not receive unexpected events"); @@ -373,8 +372,8 @@ public void testQueueClosedEventTerminatesRemoteSubscribers() throws Exception { streamCompletedLatch.countDown(); }; - // Resubscribe to the task - this creates a streaming subscription - streamingClient.resubscribe(new TaskIdParams(taskId), List.of(consumer), errorHandler); + // Subscribe to the task - this creates a streaming subscription + streamingClient.subscribeToTask(new TaskIdParams(taskId), List.of(consumer), errorHandler); // Wait for the EventConsumer to start polling (replaces unreliable Thread.sleep) // This ensures the consumer is ready to receive the QueueClosedEvent diff --git a/extras/queue-manager-replicated/tests-single-instance/src/test/java/io/a2a/extras/queuemanager/replicated/tests/ReplicationTestAgentCardProducer.java b/extras/queue-manager-replicated/tests-single-instance/src/test/java/io/a2a/extras/queuemanager/replicated/tests/ReplicationTestAgentCardProducer.java index 9b5bea30f..3461ab7d4 100644 --- a/extras/queue-manager-replicated/tests-single-instance/src/test/java/io/a2a/extras/queuemanager/replicated/tests/ReplicationTestAgentCardProducer.java +++ b/extras/queue-manager-replicated/tests-single-instance/src/test/java/io/a2a/extras/queuemanager/replicated/tests/ReplicationTestAgentCardProducer.java @@ -1,6 +1,5 @@ package io.a2a.extras.queuemanager.replicated.tests; -import static io.a2a.spec.AgentCard.CURRENT_PROTOCOL_VERSION; import java.util.List; @@ -38,7 +37,6 @@ public AgentCard agentCard() { .skills(List.of()) .supportedInterfaces(List.of( new AgentInterface(TransportProtocol.JSONRPC.asString(), "http://localhost:8081"))) - .protocolVersions(CURRENT_PROTOCOL_VERSION) .build(); } } \ No newline at end of file diff --git a/http-client/src/test/java/io/a2a/client/http/JsonMessages.java b/http-client/src/test/java/io/a2a/client/http/JsonMessages.java index eff6d55e5..89d146787 100644 --- a/http-client/src/test/java/io/a2a/client/http/JsonMessages.java +++ b/http-client/src/test/java/io/a2a/client/http/JsonMessages.java @@ -8,7 +8,6 @@ public class JsonMessages { static final String AGENT_CARD = """ { - "protocolVersions": ["0.2.9"], "name": "GeoSpatial Route Planner Agent", "description": "Provides advanced route planning, traffic analysis, and custom map generation services. This agent can calculate optimal routes, estimate travel times considering real-time traffic, and create personalized maps with points of interest.", "supportedInterfaces" : [ @@ -34,7 +33,7 @@ public class JsonMessages { } } }, - "security": [{ "schemes": { "google": { "list": ["openid", "profile", "email"] } } }], + "securityRequirements": [{ "schemes": { "google": { "list": ["openid", "profile", "email"] } } }], "defaultInputModes": ["application/json", "text/plain"], "defaultOutputModes": ["application/json", "image/png"], "skills": [ diff --git a/jsonrpc-common/src/main/java/io/a2a/jsonrpc/common/json/JsonUtil.java b/jsonrpc-common/src/main/java/io/a2a/jsonrpc/common/json/JsonUtil.java index c0aea8ad2..77452f93e 100644 --- a/jsonrpc-common/src/main/java/io/a2a/jsonrpc/common/json/JsonUtil.java +++ b/jsonrpc-common/src/main/java/io/a2a/jsonrpc/common/json/JsonUtil.java @@ -567,9 +567,9 @@ public void write(JsonWriter out, Part value) throws java.io.IOException { out.name(FILE); delegateGson.toJson(filePart.file(), FileContent.class, out); } else if (value instanceof DataPart dataPart) { - // DataPart: { "data": {...} } + // DataPart: { "data": } out.name(DATA); - delegateGson.toJson(dataPart.data(), Map.class, out); + delegateGson.toJson(dataPart.data(), Object.class, out); } else { throw new JsonSyntaxException("Unknown Part subclass: " + value.getClass().getName()); } @@ -605,12 +605,12 @@ Part read(JsonReader in) throws java.io.IOException { case TEXT -> new TextPart(jsonObject.get(TEXT).getAsString()); case FILE -> new FilePart(delegateGson.fromJson(jsonObject.get(FILE), FileContent.class)); case DATA -> { - @SuppressWarnings("unchecked") - Map dataMap = delegateGson.fromJson( + // DataPart supports any JSON value: object, array, primitive, or null + Object data = delegateGson.fromJson( jsonObject.get(DATA), - new TypeToken>(){}.getType() + Object.class ); - yield new DataPart(dataMap); + yield new DataPart(data); } default -> throw new JsonSyntaxException(format("Part must have one of: %s (found: %s)", VALID_KEYS, discriminator)); diff --git a/jsonrpc-common/src/main/java/io/a2a/jsonrpc/common/wrappers/StreamingJSONRPCRequest.java b/jsonrpc-common/src/main/java/io/a2a/jsonrpc/common/wrappers/StreamingJSONRPCRequest.java index cbf33a72d..c55200847 100644 --- a/jsonrpc-common/src/main/java/io/a2a/jsonrpc/common/wrappers/StreamingJSONRPCRequest.java +++ b/jsonrpc-common/src/main/java/io/a2a/jsonrpc/common/wrappers/StreamingJSONRPCRequest.java @@ -13,7 +13,7 @@ * The A2A Protocol defines two primary streaming operations: *

    *
  • {@link SendStreamingMessageRequest} - Stream task execution events in real-time
  • - *
  • {@link SubscribeToTaskRequest} - Resubscribe to events from an existing task
  • + *
  • {@link SubscribeToTaskRequest} - Subscribe to events from an existing task
  • *
*

* Streaming requests follow the JSON-RPC 2.0 specification structure but the response diff --git a/jsonrpc-common/src/main/java/io/a2a/jsonrpc/common/wrappers/SubscribeToTaskRequest.java b/jsonrpc-common/src/main/java/io/a2a/jsonrpc/common/wrappers/SubscribeToTaskRequest.java index 27acb3a14..1c965d5b1 100644 --- a/jsonrpc-common/src/main/java/io/a2a/jsonrpc/common/wrappers/SubscribeToTaskRequest.java +++ b/jsonrpc-common/src/main/java/io/a2a/jsonrpc/common/wrappers/SubscribeToTaskRequest.java @@ -8,7 +8,7 @@ import io.a2a.spec.TaskIdParams; /** - * JSON-RPC request to resubscribe to an ongoing or completed task's event stream. + * JSON-RPC request to subscribe to an ongoing or completed task's event stream. *

* This request allows clients to reconnect to a task and receive its events, enabling * recovery from disconnections or retrieval of missed updates. The agent will stream diff --git a/jsonrpc-common/src/test/java/io/a2a/jsonrpc/common/json/StreamingEventKindSerializationTest.java b/jsonrpc-common/src/test/java/io/a2a/jsonrpc/common/json/StreamingEventKindSerializationTest.java index 08eea2835..e7dcdc670 100644 --- a/jsonrpc-common/src/test/java/io/a2a/jsonrpc/common/json/StreamingEventKindSerializationTest.java +++ b/jsonrpc-common/src/test/java/io/a2a/jsonrpc/common/json/StreamingEventKindSerializationTest.java @@ -97,7 +97,6 @@ void testTaskStatusUpdateEventSerialization() throws JsonProcessingException { .taskId("task-abc") .contextId("context-def") .status(new TaskStatus(TaskState.WORKING)) - .isFinal(false) .build(); // Serialize as StreamingEventKind diff --git a/reference/jsonrpc/src/test/java/io/a2a/server/apps/quarkus/A2AServerRoutesTest.java b/reference/jsonrpc/src/test/java/io/a2a/server/apps/quarkus/A2AServerRoutesTest.java index b2da1d413..25b7cc708 100644 --- a/reference/jsonrpc/src/test/java/io/a2a/server/apps/quarkus/A2AServerRoutesTest.java +++ b/reference/jsonrpc/src/test/java/io/a2a/server/apps/quarkus/A2AServerRoutesTest.java @@ -3,7 +3,6 @@ import static io.a2a.spec.A2AMethods.CANCEL_TASK_METHOD; import static io.a2a.spec.A2AMethods.GET_EXTENDED_AGENT_CARD_METHOD; import static io.a2a.spec.A2AMethods.SEND_STREAMING_MESSAGE_METHOD; -import static io.a2a.spec.AgentCard.CURRENT_PROTOCOL_VERSION; import static io.a2a.transport.jsonrpc.context.JSONRPCContextKeys.METHOD_NAME_KEY; import static io.a2a.transport.jsonrpc.context.JSONRPCContextKeys.TENANT_KEY; import static java.util.Collections.singletonList; @@ -226,7 +225,7 @@ public void testGetTask_MethodNameSetInContext() { "id": "cd4c76de-d54c-436c-8b9f-4c2703648d64", "method": "GetTask", "params": { - "name": "tasks/de38c76d-d54c-436c-8b9f-4c2703648d64", + "id": "de38c76d-d54c-436c-8b9f-4c2703648d64", "historyLength": 10 } }"""; @@ -263,7 +262,7 @@ public void testCancelTask_MethodNameSetInContext() { "id": "cd4c76de-d54c-436c-8b9f-4c2703648d64", "method": "CancelTask", "params": { - "name": "tasks/de38c76d-d54c-436c-8b9f-4c2703648d64" + "id": "de38c76d-d54c-436c-8b9f-4c2703648d64" } }"""; when(mockRequestBody.asString()).thenReturn(jsonRpcRequest); @@ -299,7 +298,7 @@ public void testTaskResubscription_MethodNameSetInContext() { "id": "cd4c76de-d54c-436c-8b9f-4c2703648d64", "method": "SubscribeToTask", "params": { - "name": "tasks/de38c76d-d54c-436c-8b9f-4c2703648d64" + "id": "de38c76d-d54c-436c-8b9f-4c2703648d64" } }"""; when(mockRequestBody.asString()).thenReturn(jsonRpcRequest); @@ -331,16 +330,13 @@ public void testCreateTaskPushNotificationConfig_MethodNameSetInContext() { "id": "cd4c76de-d54c-436c-8b9f-4c2703648d64", "method": "CreateTaskPushNotificationConfig", "params": { - "parent": "tasks/de38c76d-d54c-436c-8b9f-4c2703648d64", + "taskId": "de38c76d-d54c-436c-8b9f-4c2703648d64", "configId": "config-123", "config": { - "name": "tasks/de38c76d-d54c-436c-8b9f-4c2703648d64/pushNotificationConfigs/config-123", - "pushNotificationConfig": { "url": "https://example.com/callback", "authentication": { - "schemes": ["jwt"] + "scheme": "jwt" } - } } } }"""; @@ -352,7 +348,7 @@ public void testCreateTaskPushNotificationConfig_MethodNameSetInContext() { PushNotificationConfig.builder() .id("config-123") .url("https://example.com/callback") - .authentication(new AuthenticationInfo(Collections.singletonList("jwt"), null)) + .authentication(new AuthenticationInfo("jwt", null)) .build(), "tenant"); @@ -382,7 +378,8 @@ public void testGetTaskPushNotificationConfig_MethodNameSetInContext() { "id": "cd4c76de-d54c-436c-8b9f-4c2703648d64", "method": "GetTaskPushNotificationConfig", "params": { - "name": "tasks/de38c76d-d54c-436c-8b9f-4c2703648d64/pushNotificationConfigs/config-456" + "taskId": "de38c76d-d54c-436c-8b9f-4c2703648d64", + "id": "config-456" } }"""; when(mockRequestBody.asString()).thenReturn(jsonRpcRequest); @@ -422,7 +419,9 @@ public void testListTaskPushNotificationConfig_MethodNameSetInContext() { "id": "cd4c76de-d54c-436c-8b9f-4c2703648d64", "method": "ListTaskPushNotificationConfig", "params": { - "parent": "tasks/de38c76d-d54c-436c-8b9f-4c2703648d64" + "taskId": "de38c76d-d54c-436c-8b9f-4c2703648d64", + "pageSize": 0, + "pageToken": "" } }"""; when(mockRequestBody.asString()).thenReturn(jsonRpcRequest); @@ -462,7 +461,8 @@ public void testDeleteTaskPushNotificationConfig_MethodNameSetInContext() { "id": "cd4c76de-d54c-436c-8b9f-4c2703648d64", "method": "DeleteTaskPushNotificationConfig", "params": { - "name": "tasks/de38c76d-d54c-436c-8b9f-4c2703648d64/pushNotificationConfigs/config-456" + "taskId": "de38c76d-d54c-436c-8b9f-4c2703648d64", + "id": "config-456" } }"""; when(mockRequestBody.asString()).thenReturn(jsonRpcRequest); @@ -497,7 +497,6 @@ public void testGetExtendedCard_MethodNameSetInContext() { .name("Test Agent") .description("Test agent description") .version("1.0.0") - .protocolVersions(CURRENT_PROTOCOL_VERSION) .capabilities(AgentCapabilities.builder().build()) .defaultInputModes(Collections.singletonList("text")) .defaultOutputModes(Collections.singletonList("text")) @@ -532,7 +531,7 @@ public void testTenantExtraction_MultiSegmentPath() { "id": "cd4c76de-d54c-436c-8b9f-4c2703648d64", "method": "GetTask", "params": { - "name": "tasks/de38c76d-d54c-436c-8b9f-4c2703648d64", + "id": "de38c76d-d54c-436c-8b9f-4c2703648d64", "historyLength": 10 } }"""; @@ -569,7 +568,7 @@ public void testTenantExtraction_RootPath() { "id": "cd4c76de-d54c-436c-8b9f-4c2703648d64", "method": "GetTask", "params": { - "name": "tasks/de38c76d-d54c-436c-8b9f-4c2703648d64", + "id": "de38c76d-d54c-436c-8b9f-4c2703648d64", "historyLength": 10 } }"""; @@ -606,7 +605,7 @@ public void testTenantExtraction_SingleSegmentPath() { "id": "cd4c76de-d54c-436c-8b9f-4c2703648d64", "method": "GetTask", "params": { - "name": "tasks/de38c76d-d54c-436c-8b9f-4c2703648d64", + "id": "de38c76d-d54c-436c-8b9f-4c2703648d64", "historyLength": 10 } }"""; @@ -643,7 +642,7 @@ public void testTenantExtraction_ThreeSegmentPath() { "id": "cd4c76de-d54c-436c-8b9f-4c2703648d64", "method": "GetTask", "params": { - "name": "tasks/de38c76d-d54c-436c-8b9f-4c2703648d64", + "id": "de38c76d-d54c-436c-8b9f-4c2703648d64", "historyLength": 10 } }"""; diff --git a/reference/rest/src/test/java/io/a2a/server/rest/quarkus/A2AServerRoutesTest.java b/reference/rest/src/test/java/io/a2a/server/rest/quarkus/A2AServerRoutesTest.java index 9ef8f7c47..a8ce70f7f 100644 --- a/reference/rest/src/test/java/io/a2a/server/rest/quarkus/A2AServerRoutesTest.java +++ b/reference/rest/src/test/java/io/a2a/server/rest/quarkus/A2AServerRoutesTest.java @@ -175,7 +175,7 @@ public void testCancelTask_MethodNameSetInContext() { } @Test - public void testResubscribeTask_MethodNameSetInContext() { + public void testSubscribeTask_MethodNameSetInContext() { // Arrange when(mockRoutingContext.pathParam("taskId")).thenReturn("task123"); HTTPRestResponse mockHttpResponse = mock(HTTPRestResponse.class); diff --git a/server-common/src/main/java/io/a2a/server/events/EventQueue.java b/server-common/src/main/java/io/a2a/server/events/EventQueue.java index 122d4b0f8..4899a926d 100644 --- a/server-common/src/main/java/io/a2a/server/events/EventQueue.java +++ b/server-common/src/main/java/io/a2a/server/events/EventQueue.java @@ -224,7 +224,7 @@ public void enqueueEvent(Event event) { * Enqueues an event directly to this specific queue only, bypassing the MainEventBus. *

* This method is used for enqueuing already-persisted events (e.g., current task state - * on resubscribe) that should only be sent to this specific subscriber, not distributed + * on subscribe) that should only be sent to this specific subscriber, not distributed * to all children or sent through MainEventBusProcessor. *

*

@@ -236,7 +236,7 @@ public void enqueueEvent(Event event) { */ public void enqueueLocalOnly(EventQueueItem item) { throw new UnsupportedOperationException( - "enqueueLocalOnly is only supported on ChildQueue for resubscribe scenarios"); + "enqueueLocalOnly is only supported on ChildQueue for subscribe scenarios"); } /** @@ -504,7 +504,7 @@ void childClosing(ChildQueue child, boolean immediate) { boolean isFinalized = taskStateProvider.isTaskFinalized(taskId); if (!isFinalized) { LOGGER.debug("MainQueue for task {} has no children, but task is not finalized - keeping queue open for potential resubscriptions", taskId); - return; // Don't close - keep queue open for fire-and-forget or late resubscribes + return; // Don't close - keep queue open for fire-and-forget or late subscribes } LOGGER.debug("MainQueue for task {} has no children and task is finalized - closing queue", taskId); } else { diff --git a/server-common/src/main/java/io/a2a/server/requesthandlers/DefaultRequestHandler.java b/server-common/src/main/java/io/a2a/server/requesthandlers/DefaultRequestHandler.java index e1a16eb3c..31a1a6670 100644 --- a/server-common/src/main/java/io/a2a/server/requesthandlers/DefaultRequestHandler.java +++ b/server-common/src/main/java/io/a2a/server/requesthandlers/DefaultRequestHandler.java @@ -14,7 +14,6 @@ import java.util.concurrent.CompletableFuture; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; -import java.util.concurrent.CountDownLatch; import java.util.concurrent.Executor; import java.util.concurrent.Flow; import java.util.concurrent.TimeoutException; @@ -36,7 +35,6 @@ import io.a2a.server.events.EventQueue; import io.a2a.server.events.EventQueueItem; import io.a2a.server.events.MainEventBusProcessor; -import io.a2a.server.events.MainEventBusProcessorCallback; import io.a2a.server.events.QueueManager; import io.a2a.server.tasks.PushNotificationConfigStore; import io.a2a.server.tasks.PushNotificationSender; @@ -786,9 +784,9 @@ private PushNotificationConfig getPushNotificationConfig(ListTaskPushNotificatio } @Override - public Flow.Publisher onResubscribeToTask( + public Flow.Publisher onSubscribeToTask( TaskIdParams params, ServerCallContext context) throws A2AError { - LOGGER.debug("onResubscribeToTask - taskId: {}", params.id()); + LOGGER.debug("onSubscribeToTask - taskId: {}", params.id()); Task task = taskStore.get(params.id()); if (task == null) { throw new TaskNotFoundError(); @@ -797,7 +795,7 @@ public Flow.Publisher onResubscribeToTask( TaskManager taskManager = new TaskManager(task.id(), task.contextId(), taskStore, null); ResultAggregator resultAggregator = new ResultAggregator(taskManager, null, executor, eventConsumerExecutor); EventQueue queue = queueManager.tap(task.id()); - LOGGER.debug("onResubscribeToTask - tapped queue: {}", queue != null ? System.identityHashCode(queue) : "null"); + LOGGER.debug("onSubscribeToTask - tapped queue: {}", queue != null ? System.identityHashCode(queue) : "null"); if (queue == null) { // If task is in final state, queue legitimately doesn't exist anymore @@ -815,11 +813,11 @@ public Flow.Publisher onResubscribeToTask( // representing the current state of the task at the time of subscription." // Enqueue the current task state directly to this ChildQueue only (already persisted, no need for MainEventBus) queue.enqueueEventLocalOnly(task); - LOGGER.debug("onResubscribeToTask - enqueued current task state as first event for taskId: {}", params.id()); + LOGGER.debug("onSubscribeToTask - enqueued current task state as first event for taskId: {}", params.id()); EventConsumer consumer = new EventConsumer(queue); Flow.Publisher results = resultAggregator.consumeAndEmit(consumer); - LOGGER.debug("onResubscribeToTask - returning publisher for taskId: {}", params.id()); + LOGGER.debug("onSubscribeToTask - returning publisher for taskId: {}", params.id()); return convertingProcessor(results, item -> (StreamingEventKind) item.getEvent()); } diff --git a/server-common/src/main/java/io/a2a/server/requesthandlers/RequestHandler.java b/server-common/src/main/java/io/a2a/server/requesthandlers/RequestHandler.java index 639098967..ff6139654 100644 --- a/server-common/src/main/java/io/a2a/server/requesthandlers/RequestHandler.java +++ b/server-common/src/main/java/io/a2a/server/requesthandlers/RequestHandler.java @@ -47,7 +47,7 @@ TaskPushNotificationConfig onGetTaskPushNotificationConfig( GetTaskPushNotificationConfigParams params, ServerCallContext context) throws A2AError; - Flow.Publisher onResubscribeToTask( + Flow.Publisher onSubscribeToTask( TaskIdParams params, ServerCallContext context) throws A2AError; diff --git a/server-common/src/main/java/io/a2a/server/tasks/TaskUpdater.java b/server-common/src/main/java/io/a2a/server/tasks/TaskUpdater.java index 022cde56b..c28e55c5c 100644 --- a/server-common/src/main/java/io/a2a/server/tasks/TaskUpdater.java +++ b/server-common/src/main/java/io/a2a/server/tasks/TaskUpdater.java @@ -52,7 +52,6 @@ public void updateStatus(TaskState state, @Nullable Message message, boolean isF TaskStatusUpdateEvent event = TaskStatusUpdateEvent.builder() .taskId(taskId) .contextId(contextId) - .isFinal(isFinal) .status(new TaskStatus(state, message, null)) .build(); eventQueue.enqueueEvent(event); diff --git a/server-common/src/main/java/io/a2a/server/util/ArtifactUtils.java b/server-common/src/main/java/io/a2a/server/util/ArtifactUtils.java index 633b38ced..df49a7c8a 100644 --- a/server-common/src/main/java/io/a2a/server/util/ArtifactUtils.java +++ b/server-common/src/main/java/io/a2a/server/util/ArtifactUtils.java @@ -78,13 +78,15 @@ public static Artifact newTextArtifact(String name, String text) { /** * Creates a new Artifact object containing only a single DataPart. + *

+ * Supports any JSON value type: objects (Map), arrays (List), primitives (String, Number, Boolean), or null. * * @param name The human-readable name of the artifact. - * @param data The structured data content of the artifact. + * @param data The structured data content of the artifact (JSON object, array, primitive, or null). * @param description An optional description of the artifact. * @return A new {@code Artifact} object with a generated artifact_id. */ - public static Artifact newDataArtifact(String name, Map data, @Nullable String description) { + public static Artifact newDataArtifact(String name, Object data, @Nullable String description) { return newArtifact( name, List.of(new DataPart(data)), @@ -94,12 +96,14 @@ public static Artifact newDataArtifact(String name, Map data, @N /** * Creates a new Artifact object containing only a single DataPart with empty description. + *

+ * Supports any JSON value type: objects (Map), arrays (List), primitives (String, Number, Boolean), or null. * * @param name The human-readable name of the artifact. - * @param data The structured data content of the artifact. + * @param data The structured data content of the artifact (JSON object, array, primitive, or null). * @return A new {@code Artifact} object with a generated artifact_id. */ - public static Artifact newDataArtifact(String name, Map data) { + public static Artifact newDataArtifact(String name, Object data) { return newDataArtifact(name, data, null); } } diff --git a/server-common/src/main/java/io/a2a/server/version/A2AVersionValidator.java b/server-common/src/main/java/io/a2a/server/version/A2AVersionValidator.java index 91159428a..da667e538 100644 --- a/server-common/src/main/java/io/a2a/server/version/A2AVersionValidator.java +++ b/server-common/src/main/java/io/a2a/server/version/A2AVersionValidator.java @@ -1,9 +1,11 @@ package io.a2a.server.version; import java.util.List; +import java.util.stream.Collectors; import io.a2a.server.ServerCallContext; import io.a2a.spec.AgentCard; +import io.a2a.spec.AgentInterface; import io.a2a.spec.VersionNotSupportedError; /** @@ -16,15 +18,15 @@ * * *

If the client does not specify a version, the current protocol version - * ({@link AgentCard#CURRENT_PROTOCOL_VERSION}) is assumed as the default. + * ({@link AgentInterface#CURRENT_PROTOCOL_VERSION}) is assumed as the default. */ public class A2AVersionValidator { /** * Validates that the client's requested protocol version is compatible with the agent's - * supported version. + * supported versions across all interfaces. * - * @param agentCard the agent card containing the supported protocol version + * @param agentCard the agent card containing the supported interfaces with their protocol versions * @param context the server call context containing the requested protocol version * @throws VersionNotSupportedError if the versions are incompatible */ @@ -34,10 +36,14 @@ public static void validateProtocolVersion(AgentCard agentCard, ServerCallContex // If client didn't specify a version, default to current version if (requestedVersion == null || requestedVersion.trim().isEmpty()) { - requestedVersion = AgentCard.CURRENT_PROTOCOL_VERSION; + requestedVersion = AgentInterface.CURRENT_PROTOCOL_VERSION; } - List supportedVersions = agentCard.protocolVersions(); + // Collect all unique protocol versions from all supported interfaces + List supportedVersions = agentCard.supportedInterfaces().stream() + .map(AgentInterface::protocolVersion) + .distinct() + .collect(Collectors.toList()); if (!isVersionCompatible(supportedVersions, requestedVersion)) { throw new VersionNotSupportedError( diff --git a/server-common/src/test/java/io/a2a/server/events/EventConsumerTest.java b/server-common/src/test/java/io/a2a/server/events/EventConsumerTest.java index 146bfb10a..2dcf7c4b1 100644 --- a/server-common/src/test/java/io/a2a/server/events/EventConsumerTest.java +++ b/server-common/src/test/java/io/a2a/server/events/EventConsumerTest.java @@ -158,8 +158,7 @@ public void testConsumeAllMultipleEvents() throws JsonProcessingException { TaskStatusUpdateEvent.builder() .taskId(TASK_ID) .contextId("session-xyz") - .status(new TaskStatus(TaskState.WORKING)) - .isFinal(true) + .status(new TaskStatus(TaskState.COMPLETED)) .build()); for (Event event : events) { @@ -194,8 +193,7 @@ public void testConsumeUntilMessage() throws Exception { TaskStatusUpdateEvent.builder() .taskId(TASK_ID) .contextId("session-xyz") - .status(new TaskStatus(TaskState.WORKING)) - .isFinal(true) + .status(new TaskStatus(TaskState.COMPLETED)) .build()); for (Event event : events) { @@ -258,8 +256,7 @@ public void testConsumeTaskInputRequired() { TaskStatusUpdateEvent.builder() .taskId(TASK_ID) .contextId("session-xyz") - .status(new TaskStatus(TaskState.WORKING)) - .isFinal(true) + .status(new TaskStatus(TaskState.COMPLETED)) .build()); for (Event event : events) { eventQueue.enqueueEvent(event); diff --git a/server-common/src/test/java/io/a2a/server/events/EventQueueTest.java b/server-common/src/test/java/io/a2a/server/events/EventQueueTest.java index 2499a8173..1adcc57ca 100644 --- a/server-common/src/test/java/io/a2a/server/events/EventQueueTest.java +++ b/server-common/src/test/java/io/a2a/server/events/EventQueueTest.java @@ -352,7 +352,6 @@ public void testDequeueEventWait() throws Exception { .taskId(TASK_ID) .contextId("session-xyz") .status(new TaskStatus(TaskState.WORKING)) - .isFinal(true) .build(); eventQueue.enqueueEvent(event); diff --git a/server-common/src/test/java/io/a2a/server/requesthandlers/AbstractA2ARequestHandlerTest.java b/server-common/src/test/java/io/a2a/server/requesthandlers/AbstractA2ARequestHandlerTest.java index 274453fd1..968937b89 100644 --- a/server-common/src/test/java/io/a2a/server/requesthandlers/AbstractA2ARequestHandlerTest.java +++ b/server-common/src/test/java/io/a2a/server/requesthandlers/AbstractA2ARequestHandlerTest.java @@ -1,6 +1,5 @@ package io.a2a.server.requesthandlers; -import static io.a2a.spec.AgentCard.CURRENT_PROTOCOL_VERSION; import java.io.IOException; import java.io.InputStream; @@ -144,8 +143,7 @@ protected static AgentCard createAgentCard(boolean streaming, boolean pushNotifi .build()) .defaultInputModes(new ArrayList<>()) .defaultOutputModes(new ArrayList<>()) - .skills(new ArrayList<>()) - .protocolVersions(CURRENT_PROTOCOL_VERSION); + .skills(new ArrayList<>()); return builder.build(); } diff --git a/server-common/src/test/java/io/a2a/server/tasks/TaskManagerTest.java b/server-common/src/test/java/io/a2a/server/tasks/TaskManagerTest.java index ca4aa07b1..c058ee22e 100644 --- a/server-common/src/test/java/io/a2a/server/tasks/TaskManagerTest.java +++ b/server-common/src/test/java/io/a2a/server/tasks/TaskManagerTest.java @@ -141,7 +141,6 @@ public void testEnsureTaskNonExistentForStatusUpdate() throws A2AServerException .taskId("new-task") .contextId("some-context") .status(new TaskStatus(TaskState.SUBMITTED)) - .isFinal(false) .build(); taskManagerWithoutId.saveTaskEvent(event, false); @@ -353,7 +352,6 @@ public void testAddingTaskWithDifferentIdViaStatusUpdateFails() { .taskId("different-task-id") .contextId("session-xyz") .status(new TaskStatus(TaskState.WORKING)) - .isFinal(false) .build(); assertThrows(A2AServerException.class, () -> { @@ -399,7 +397,6 @@ public void testTaskWithNoMessageUsesInitialMessage() throws A2AServerException .taskId("new-task-id") .contextId("some-context") .status(new TaskStatus(TaskState.SUBMITTED)) - .isFinal(false) .build(); taskManagerWithInitialMessage.saveTaskEvent(event, false); @@ -437,7 +434,6 @@ public void testTaskWithMessageDoesNotUseInitialMessage() throws A2AServerExcept .taskId("new-task-id") .contextId("some-context") .status(new TaskStatus(TaskState.SUBMITTED, taskMessage, null)) - .isFinal(false) .build(); taskManagerWithInitialMessage.saveTaskEvent(event, false); @@ -566,7 +562,6 @@ public void testSaveTaskEventMetadataUpdate() throws A2AServerException { .taskId(minimalTask.id()) .contextId(minimalTask.contextId()) .status(new TaskStatus(TaskState.WORKING)) - .isFinal(false) .metadata(newMetadata) .build(); @@ -586,7 +581,6 @@ public void testSaveTaskEventMetadataUpdateNull() throws A2AServerException { .taskId(minimalTask.id()) .contextId(minimalTask.contextId()) .status(new TaskStatus(TaskState.WORKING)) - .isFinal(false) .metadata(null) .build(); @@ -615,7 +609,6 @@ public void testSaveTaskEventMetadataMergeExisting() throws A2AServerException { .taskId(minimalTask.id()) .contextId(minimalTask.contextId()) .status(new TaskStatus(TaskState.WORKING)) - .isFinal(false) .metadata(newMetadata) .build(); @@ -643,7 +636,6 @@ public void testCreateTaskWithInitialMessage() throws A2AServerException { .taskId("new-task-id") .contextId("some-context") .status(new TaskStatus(TaskState.SUBMITTED)) - .isFinal(false) .build(); taskManagerWithMessage.saveTaskEvent(event, false); @@ -672,7 +664,6 @@ public void testCreateTaskWithoutInitialMessage() throws A2AServerException { .taskId("new-task-id") .contextId("some-context") .status(new TaskStatus(TaskState.SUBMITTED)) - .isFinal(false) .build(); taskManagerWithoutMessage.saveTaskEvent(event, false); @@ -728,7 +719,6 @@ public void testUpdateWithMessage() throws A2AServerException { .taskId("new-task-id") .contextId("some-context") .status(new TaskStatus(TaskState.SUBMITTED, taskMessage, null)) - .isFinal(false) .build(); taskManagerWithInitialMessage.saveTaskEvent(event, false); diff --git a/server-common/src/test/java/io/a2a/server/tasks/TaskUpdaterTest.java b/server-common/src/test/java/io/a2a/server/tasks/TaskUpdaterTest.java index 73da17824..a5ec77f01 100644 --- a/server-common/src/test/java/io/a2a/server/tasks/TaskUpdaterTest.java +++ b/server-common/src/test/java/io/a2a/server/tasks/TaskUpdaterTest.java @@ -186,13 +186,13 @@ public void testRequiresInputWithMessage() throws Exception { @Test public void testRequiresInputWithFinalTrue() throws Exception { taskUpdater.requiresInput(true); - checkTaskStatusUpdateEventOnQueue(true, TaskState.INPUT_REQUIRED, null); + checkTaskStatusUpdateEventOnQueue(false, TaskState.INPUT_REQUIRED, null); } @Test public void testRequiresInputWithMessageAndFinalTrue() throws Exception { taskUpdater.requiresInput(SAMPLE_MESSAGE, true); - checkTaskStatusUpdateEventOnQueue(true, TaskState.INPUT_REQUIRED, SAMPLE_MESSAGE); + checkTaskStatusUpdateEventOnQueue(false, TaskState.INPUT_REQUIRED, SAMPLE_MESSAGE); } @Test @@ -210,13 +210,13 @@ public void testRequiresAuthWithMessage() throws Exception { @Test public void testRequiresAuthWithFinalTrue() throws Exception { taskUpdater.requiresAuth(true); - checkTaskStatusUpdateEventOnQueue(true, TaskState.AUTH_REQUIRED, null); + checkTaskStatusUpdateEventOnQueue(false, TaskState.AUTH_REQUIRED, null); } @Test public void testRequiresAuthWithMessageAndFinalTrue() throws Exception { taskUpdater.requiresAuth(SAMPLE_MESSAGE, true); - checkTaskStatusUpdateEventOnQueue(true, TaskState.AUTH_REQUIRED, SAMPLE_MESSAGE); + checkTaskStatusUpdateEventOnQueue(false, TaskState.AUTH_REQUIRED, SAMPLE_MESSAGE); } @Test diff --git a/server-common/src/test/java/io/a2a/server/version/A2AVersionValidatorTest.java b/server-common/src/test/java/io/a2a/server/version/A2AVersionValidatorTest.java index 43e0f55dd..8156fad4c 100644 --- a/server-common/src/test/java/io/a2a/server/version/A2AVersionValidatorTest.java +++ b/server-common/src/test/java/io/a2a/server/version/A2AVersionValidatorTest.java @@ -144,7 +144,7 @@ private AgentCard createAgentCard(String protocolVersion) { return AgentCard.builder() .name("test-card") .description("Test card") - .supportedInterfaces(List.of(new AgentInterface("GRPC", "http://localhost:9999"))) + .supportedInterfaces(List.of(new AgentInterface("GRPC", "http://localhost:9999", "", protocolVersion))) .version("1.0.0") .capabilities(AgentCapabilities.builder() .streaming(false) @@ -153,7 +153,6 @@ private AgentCard createAgentCard(String protocolVersion) { .defaultInputModes(List.of("text")) .defaultOutputModes(List.of("text")) .skills(Collections.emptyList()) - .protocolVersions(protocolVersion) .build(); } diff --git a/spec-grpc/pom.xml b/spec-grpc/pom.xml index b602f7613..3b2f28c0d 100644 --- a/spec-grpc/pom.xml +++ b/spec-grpc/pom.xml @@ -96,7 +96,7 @@ io.github.ascopes protobuf-maven-plugin - 4.0.3 + 4.1.2 ${skip.protobuf.generate} true diff --git a/spec-grpc/src/main/java/io/a2a/grpc/A2A.java b/spec-grpc/src/main/java/io/a2a/grpc/A2A.java index 6dc06f861..7b1286314 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/A2A.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/A2A.java @@ -46,16 +46,6 @@ public static void registerAllExtensions( static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_a2a_v1_Part_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_a2a_v1_FilePart_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_a2a_v1_FilePart_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_a2a_v1_DataPart_descriptor; - static final - com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_a2a_v1_DataPart_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_a2a_v1_Message_descriptor; static final @@ -137,15 +127,15 @@ public static void registerAllExtensions( com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_a2a_v1_StringList_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor - internal_static_a2a_v1_Security_descriptor; + internal_static_a2a_v1_SecurityRequirement_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_a2a_v1_Security_fieldAccessorTable; + internal_static_a2a_v1_SecurityRequirement_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor - internal_static_a2a_v1_Security_SchemesEntry_descriptor; + internal_static_a2a_v1_SecurityRequirement_SchemesEntry_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable - internal_static_a2a_v1_Security_SchemesEntry_fieldAccessorTable; + internal_static_a2a_v1_SecurityRequirement_SchemesEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_a2a_v1_SecurityScheme_descriptor; static final @@ -201,6 +191,26 @@ public static void registerAllExtensions( static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_a2a_v1_ClientCredentialsOAuthFlow_ScopesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_a2a_v1_ImplicitOAuthFlow_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_a2a_v1_ImplicitOAuthFlow_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_a2a_v1_ImplicitOAuthFlow_ScopesEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_a2a_v1_ImplicitOAuthFlow_ScopesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_a2a_v1_PasswordOAuthFlow_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_a2a_v1_PasswordOAuthFlow_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_a2a_v1_PasswordOAuthFlow_ScopesEntry_descriptor; + static final + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_a2a_v1_PasswordOAuthFlow_ScopesEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_a2a_v1_DeviceCodeOAuthFlow_descriptor; static final @@ -308,224 +318,237 @@ public static void registerAllExtensions( "\n\nTaskStatus\022%\n\005state\030\001 \001(\0162\021.a2a.v1.Tas" + "kStateB\003\340A\002\022 \n\007message\030\002 \001(\0132\017.a2a.v1.Me" + "ssage\022-\n\ttimestamp\030\003 \001(\0132\032.google.protob" + - "uf.Timestamp\"\215\001\n\004Part\022\016\n\004text\030\001 \001(\tH\000\022 \n" + - "\004file\030\002 \001(\0132\020.a2a.v1.FilePartH\000\022 \n\004data\030" + - "\003 \001(\0132\020.a2a.v1.DataPartH\000\022)\n\010metadata\030\004 " + - "\001(\0132\027.google.protobuf.StructB\006\n\004part\"h\n\010" + - "FilePart\022\027\n\rfile_with_uri\030\001 \001(\tH\000\022\031\n\017fil" + - "e_with_bytes\030\002 \001(\014H\000\022\022\n\nmedia_type\030\003 \001(\t" + - "\022\014\n\004name\030\004 \001(\tB\006\n\004file\"6\n\010DataPart\022*\n\004da" + - "ta\030\001 \001(\0132\027.google.protobuf.StructB\003\340A\002\"\345" + - "\001\n\007Message\022\027\n\nmessage_id\030\001 \001(\tB\003\340A\002\022\022\n\nc" + - "ontext_id\030\002 \001(\t\022\017\n\007task_id\030\003 \001(\t\022\037\n\004role" + - "\030\004 \001(\0162\014.a2a.v1.RoleB\003\340A\002\022 \n\005parts\030\005 \003(\013" + + "uf.Timestamp\"\270\001\n\004Part\022\016\n\004text\030\001 \001(\tH\000\022\r\n" + + "\003raw\030\002 \001(\014H\000\022\r\n\003url\030\003 \001(\tH\000\022&\n\004data\030\004 \001(" + + "\0132\026.google.protobuf.ValueH\000\022)\n\010metadata\030" + + "\005 \001(\0132\027.google.protobuf.Struct\022\020\n\010filena" + + "me\030\006 \001(\t\022\022\n\nmedia_type\030\007 \001(\tB\t\n\007content\"" + + "\345\001\n\007Message\022\027\n\nmessage_id\030\001 \001(\tB\003\340A\002\022\022\n\n" + + "context_id\030\002 \001(\t\022\017\n\007task_id\030\003 \001(\t\022\037\n\004rol" + + "e\030\004 \001(\0162\014.a2a.v1.RoleB\003\340A\002\022 \n\005parts\030\005 \003(" + + "\0132\014.a2a.v1.PartB\003\340A\002\022)\n\010metadata\030\006 \001(\0132\027" + + ".google.protobuf.Struct\022\022\n\nextensions\030\007 " + + "\003(\t\022\032\n\022reference_task_ids\030\010 \003(\t\"\250\001\n\010Arti" + + "fact\022\030\n\013artifact_id\030\001 \001(\tB\003\340A\002\022\014\n\004name\030\003" + + " \001(\t\022\023\n\013description\030\004 \001(\t\022 \n\005parts\030\005 \003(\013" + "2\014.a2a.v1.PartB\003\340A\002\022)\n\010metadata\030\006 \001(\0132\027." + "google.protobuf.Struct\022\022\n\nextensions\030\007 \003" + - "(\t\022\032\n\022reference_task_ids\030\010 \003(\t\"\250\001\n\010Artif" + - "act\022\030\n\013artifact_id\030\001 \001(\tB\003\340A\002\022\014\n\004name\030\003 " + - "\001(\t\022\023\n\013description\030\004 \001(\t\022 \n\005parts\030\005 \003(\0132" + - "\014.a2a.v1.PartB\003\340A\002\022)\n\010metadata\030\006 \001(\0132\027.g" + - "oogle.protobuf.Struct\022\022\n\nextensions\030\007 \003(" + - "\t\"\256\001\n\025TaskStatusUpdateEvent\022\024\n\007task_id\030\001" + - " \001(\tB\003\340A\002\022\027\n\ncontext_id\030\002 \001(\tB\003\340A\002\022\'\n\006st" + - "atus\030\003 \001(\0132\022.a2a.v1.TaskStatusB\003\340A\002\022\022\n\005f" + - "inal\030\004 \001(\010B\003\340A\002\022)\n\010metadata\030\005 \001(\0132\027.goog" + - "le.protobuf.Struct\"\300\001\n\027TaskArtifactUpdat" + - "eEvent\022\024\n\007task_id\030\001 \001(\tB\003\340A\002\022\027\n\ncontext_" + - "id\030\002 \001(\tB\003\340A\002\022\'\n\010artifact\030\003 \001(\0132\020.a2a.v1" + - ".ArtifactB\003\340A\002\022\016\n\006append\030\004 \001(\010\022\022\n\nlast_c" + - "hunk\030\005 \001(\010\022)\n\010metadata\030\006 \001(\0132\027.google.pr" + - "otobuf.Struct\"y\n\026PushNotificationConfig\022" + - "\n\n\002id\030\001 \001(\t\022\020\n\003url\030\002 \001(\tB\003\340A\002\022\r\n\005token\030\003" + - " \001(\t\0222\n\016authentication\030\004 \001(\0132\032.a2a.v1.Au" + - "thenticationInfo\"?\n\022AuthenticationInfo\022\024" + - "\n\007schemes\030\001 \003(\tB\003\340A\002\022\023\n\013credentials\030\002 \001(" + - "\t\"Q\n\016AgentInterface\022\020\n\003url\030\001 \001(\tB\003\340A\002\022\035\n" + - "\020protocol_binding\030\002 \001(\tB\003\340A\002\022\016\n\006tenant\030\003" + - " \001(\t\"\310\005\n\tAgentCard\022\036\n\021protocol_versions\030" + - "\020 \003(\tB\003\340A\002\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\030\n\013descrip" + - "tion\030\002 \001(\tB\003\340A\002\0229\n\024supported_interfaces\030" + - "\023 \003(\0132\026.a2a.v1.AgentInterfaceB\003\340A\002\022\'\n\010pr" + - "ovider\030\004 \001(\0132\025.a2a.v1.AgentProvider\022\024\n\007v" + - "ersion\030\005 \001(\tB\003\340A\002\022\036\n\021documentation_url\030\006" + - " \001(\tH\000\210\001\001\0224\n\014capabilities\030\007 \001(\0132\031.a2a.v1" + - ".AgentCapabilitiesB\003\340A\002\022@\n\020security_sche" + - "mes\030\010 \003(\0132&.a2a.v1.AgentCard.SecuritySch" + - "emesEntry\022\"\n\010security\030\t \003(\0132\020.a2a.v1.Sec" + - "urity\022 \n\023default_input_modes\030\n \003(\tB\003\340A\002\022" + - "!\n\024default_output_modes\030\013 \003(\tB\003\340A\002\022\'\n\006sk" + - "ills\030\014 \003(\0132\022.a2a.v1.AgentSkillB\003\340A\002\022.\n\ns" + - "ignatures\030\021 \003(\0132\032.a2a.v1.AgentCardSignat" + - "ure\022\025\n\010icon_url\030\022 \001(\tH\001\210\001\001\032N\n\024SecuritySc" + - "hemesEntry\022\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 \001(\0132\026" + - ".a2a.v1.SecurityScheme:\0028\001B\024\n\022_documenta" + - "tion_urlB\013\n\t_icon_urlJ\004\010\003\020\004J\004\010\016\020\017J\004\010\017\020\020\"" + - "<\n\rAgentProvider\022\020\n\003url\030\001 \001(\tB\003\340A\002\022\031\n\014or" + - "ganization\030\002 \001(\tB\003\340A\002\"\335\001\n\021AgentCapabilit" + - "ies\022\026\n\tstreaming\030\001 \001(\010H\000\210\001\001\022\037\n\022push_noti" + - "fications\030\002 \001(\010H\001\210\001\001\022*\n\nextensions\030\003 \003(\013" + - "2\026.a2a.v1.AgentExtension\022 \n\023extended_age" + - "nt_card\030\005 \001(\010H\002\210\001\001B\014\n\n_streamingB\025\n\023_pus" + - "h_notificationsB\026\n\024_extended_agent_cardJ" + - "\004\010\004\020\005\"m\n\016AgentExtension\022\013\n\003uri\030\001 \001(\t\022\023\n\013" + - "description\030\002 \001(\t\022\020\n\010required\030\003 \001(\010\022\'\n\006p" + - "arams\030\004 \001(\0132\027.google.protobuf.Struct\"\276\001\n" + - "\nAgentSkill\022\017\n\002id\030\001 \001(\tB\003\340A\002\022\021\n\004name\030\002 \001" + - "(\tB\003\340A\002\022\030\n\013description\030\003 \001(\tB\003\340A\002\022\021\n\004tag" + - "s\030\004 \003(\tB\003\340A\002\022\020\n\010examples\030\005 \003(\t\022\023\n\013input_" + - "modes\030\006 \003(\t\022\024\n\014output_modes\030\007 \003(\t\022\"\n\010sec" + - "urity\030\010 \003(\0132\020.a2a.v1.Security\"m\n\022AgentCa" + - "rdSignature\022\026\n\tprotected\030\001 \001(\tB\003\340A\002\022\026\n\ts" + - "ignature\030\002 \001(\tB\003\340A\002\022\'\n\006header\030\003 \001(\0132\027.go" + - "ogle.protobuf.Struct\"v\n\032TaskPushNotifica" + - "tionConfig\022\021\n\004name\030\001 \001(\tB\003\340A\002\022E\n\030push_no" + - "tification_config\030\002 \001(\0132\036.a2a.v1.PushNot" + - "ificationConfigB\003\340A\002\"\032\n\nStringList\022\014\n\004li" + - "st\030\001 \003(\t\"~\n\010Security\022.\n\007schemes\030\001 \003(\0132\035." + - "a2a.v1.Security.SchemesEntry\032B\n\014SchemesE" + - "ntry\022\013\n\003key\030\001 \001(\t\022!\n\005value\030\002 \001(\0132\022.a2a.v" + - "1.StringList:\0028\001\"\361\002\n\016SecurityScheme\022?\n\027a" + - "pi_key_security_scheme\030\001 \001(\0132\034.a2a.v1.AP" + - "IKeySecuritySchemeH\000\022C\n\031http_auth_securi" + - "ty_scheme\030\002 \001(\0132\036.a2a.v1.HTTPAuthSecurit" + - "ySchemeH\000\022>\n\026oauth2_security_scheme\030\003 \001(" + - "\0132\034.a2a.v1.OAuth2SecuritySchemeH\000\022N\n\037ope" + - "n_id_connect_security_scheme\030\004 \001(\0132#.a2a" + - ".v1.OpenIdConnectSecuritySchemeH\000\022?\n\024mtl" + - "s_security_scheme\030\005 \001(\0132\037.a2a.v1.MutualT" + - "lsSecuritySchemeH\000B\010\n\006scheme\"U\n\024APIKeySe" + - "curityScheme\022\023\n\013description\030\001 \001(\t\022\025\n\010loc" + - "ation\030\002 \001(\tB\003\340A\002\022\021\n\004name\030\003 \001(\tB\003\340A\002\"Y\n\026H" + - "TTPAuthSecurityScheme\022\023\n\013description\030\001 \001" + - "(\t\022\023\n\006scheme\030\002 \001(\tB\003\340A\002\022\025\n\rbearer_format" + - "\030\003 \001(\t\"p\n\024OAuth2SecurityScheme\022\023\n\013descri" + - "ption\030\001 \001(\t\022&\n\005flows\030\002 \001(\0132\022.a2a.v1.OAut" + - "hFlowsB\003\340A\002\022\033\n\023oauth2_metadata_url\030\003 \001(\t" + - "\"T\n\033OpenIdConnectSecurityScheme\022\023\n\013descr" + - "iption\030\001 \001(\t\022 \n\023open_id_connect_url\030\002 \001(" + - "\tB\003\340A\002\".\n\027MutualTlsSecurityScheme\022\023\n\013des" + - "cription\030\001 \001(\t\"\330\001\n\nOAuthFlows\022@\n\022authori" + - "zation_code\030\001 \001(\0132\".a2a.v1.Authorization" + - "CodeOAuthFlowH\000\022@\n\022client_credentials\030\002 " + - "\001(\0132\".a2a.v1.ClientCredentialsOAuthFlowH" + - "\000\0222\n\013device_code\030\005 \001(\0132\033.a2a.v1.DeviceCo" + - "deOAuthFlowH\000B\006\n\004flowJ\004\010\003\020\004J\004\010\004\020\005\"\364\001\n\032Au" + - "thorizationCodeOAuthFlow\022\036\n\021authorizatio" + - "n_url\030\001 \001(\tB\003\340A\002\022\026\n\ttoken_url\030\002 \001(\tB\003\340A\002" + - "\022\023\n\013refresh_url\030\003 \001(\t\022C\n\006scopes\030\004 \003(\0132.." + - "a2a.v1.AuthorizationCodeOAuthFlow.Scopes" + - "EntryB\003\340A\002\022\025\n\rpkce_required\030\005 \001(\010\032-\n\013Sco" + - "pesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001" + - "\"\275\001\n\032ClientCredentialsOAuthFlow\022\026\n\ttoken" + - "_url\030\001 \001(\tB\003\340A\002\022\023\n\013refresh_url\030\002 \001(\t\022C\n\006" + - "scopes\030\003 \003(\0132..a2a.v1.ClientCredentialsO" + - "AuthFlow.ScopesEntryB\003\340A\002\032-\n\013ScopesEntry" + - "\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\326\001\n\023Dev" + - "iceCodeOAuthFlow\022%\n\030device_authorization" + - "_url\030\001 \001(\tB\003\340A\002\022\026\n\ttoken_url\030\002 \001(\tB\003\340A\002\022" + - "\023\n\013refresh_url\030\003 \001(\t\022<\n\006scopes\030\004 \003(\0132\'.a" + - "2a.v1.DeviceCodeOAuthFlow.ScopesEntryB\003\340" + - "A\002\032-\n\013ScopesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030" + - "\002 \001(\t:\0028\001\"\257\001\n\022SendMessageRequest\022\016\n\006tena" + - "nt\030\004 \001(\t\022%\n\007message\030\001 \001(\0132\017.a2a.v1.Messa" + - "geB\003\340A\002\0227\n\rconfiguration\030\002 \001(\0132 .a2a.v1." + - "SendMessageConfiguration\022)\n\010metadata\030\003 \001" + - "(\0132\027.google.protobuf.Struct\"c\n\016GetTaskRe" + - "quest\022\016\n\006tenant\030\003 \001(\t\022\021\n\004name\030\001 \001(\tB\003\340A\002" + - "\022\033\n\016history_length\030\002 \001(\005H\000\210\001\001B\021\n\017_histor" + - "y_length\"\265\002\n\020ListTasksRequest\022\016\n\006tenant\030" + - "\t \001(\t\022\022\n\ncontext_id\030\001 \001(\t\022!\n\006status\030\002 \001(" + - "\0162\021.a2a.v1.TaskState\022\026\n\tpage_size\030\003 \001(\005H" + - "\000\210\001\001\022\022\n\npage_token\030\004 \001(\t\022\033\n\016history_leng" + - "th\030\005 \001(\005H\001\210\001\001\022:\n\026status_timestamp_after\030" + - "\006 \001(\0132\032.google.protobuf.Timestamp\022\036\n\021inc" + - "lude_artifacts\030\007 \001(\010H\002\210\001\001B\014\n\n_page_sizeB" + - "\021\n\017_history_lengthB\024\n\022_include_artifacts" + - "\"\204\001\n\021ListTasksResponse\022 \n\005tasks\030\001 \003(\0132\014." + - "a2a.v1.TaskB\003\340A\002\022\034\n\017next_page_token\030\002 \001(" + - "\tB\003\340A\002\022\026\n\tpage_size\030\003 \001(\005B\003\340A\002\022\027\n\ntotal_" + - "size\030\004 \001(\005B\003\340A\002\"1\n\021CancelTaskRequest\022\016\n\006" + - "tenant\030\002 \001(\t\022\014\n\004name\030\001 \001(\t\"D\n$GetTaskPus" + - "hNotificationConfigRequest\022\016\n\006tenant\030\002 \001" + - "(\t\022\014\n\004name\030\001 \001(\t\"G\n\'DeleteTaskPushNotifi" + - "cationConfigRequest\022\016\n\006tenant\030\002 \001(\t\022\014\n\004n" + - "ame\030\001 \001(\t\"\237\001\n\'CreateTaskPushNotification" + - "ConfigRequest\022\016\n\006tenant\030\004 \001(\t\022\023\n\006parent\030" + - "\001 \001(\tB\003\340A\002\022\026\n\tconfig_id\030\002 \001(\tB\003\340A\002\0227\n\006co" + - "nfig\030\003 \001(\0132\".a2a.v1.TaskPushNotification" + - "ConfigB\003\340A\002\"6\n\026SubscribeToTaskRequest\022\016\n" + - "\006tenant\030\002 \001(\t\022\014\n\004name\030\001 \001(\t\"n\n%ListTaskP" + - "ushNotificationConfigRequest\022\016\n\006tenant\030\004" + - " \001(\t\022\016\n\006parent\030\001 \001(\t\022\021\n\tpage_size\030\002 \001(\005\022" + - "\022\n\npage_token\030\003 \001(\t\"-\n\033GetExtendedAgentC" + - "ardRequest\022\016\n\006tenant\030\001 \001(\t\"b\n\023SendMessag" + - "eResponse\022\034\n\004task\030\001 \001(\0132\014.a2a.v1.TaskH\000\022" + - "\"\n\007message\030\002 \001(\0132\017.a2a.v1.MessageH\000B\t\n\007p" + - "ayload\"\321\001\n\016StreamResponse\022\034\n\004task\030\001 \001(\0132" + - "\014.a2a.v1.TaskH\000\022\"\n\007message\030\002 \001(\0132\017.a2a.v" + - "1.MessageH\000\0226\n\rstatus_update\030\003 \001(\0132\035.a2a" + - ".v1.TaskStatusUpdateEventH\000\022:\n\017artifact_" + - "update\030\004 \001(\0132\037.a2a.v1.TaskArtifactUpdate" + - "EventH\000B\t\n\007payload\"v\n&ListTaskPushNotifi" + - "cationConfigResponse\0223\n\007configs\030\001 \003(\0132\"." + - "a2a.v1.TaskPushNotificationConfig\022\027\n\017nex" + - "t_page_token\030\002 \001(\t*\372\001\n\tTaskState\022\032\n\026TASK" + - "_STATE_UNSPECIFIED\020\000\022\030\n\024TASK_STATE_SUBMI" + - "TTED\020\001\022\026\n\022TASK_STATE_WORKING\020\002\022\030\n\024TASK_S" + - "TATE_COMPLETED\020\003\022\025\n\021TASK_STATE_FAILED\020\004\022" + - "\030\n\024TASK_STATE_CANCELLED\020\005\022\035\n\031TASK_STATE_" + - "INPUT_REQUIRED\020\006\022\027\n\023TASK_STATE_REJECTED\020" + - "\007\022\034\n\030TASK_STATE_AUTH_REQUIRED\020\010*;\n\004Role\022" + - "\024\n\020ROLE_UNSPECIFIED\020\000\022\r\n\tROLE_USER\020\001\022\016\n\n" + - "ROLE_AGENT\020\0022\304\016\n\nA2AService\022}\n\013SendMessa" + - "ge\022\032.a2a.v1.SendMessageRequest\032\033.a2a.v1." + - "SendMessageResponse\"5\202\323\344\223\002/\"\r/message:se" + - "nd:\001*Z\033\"\026/{tenant}/message:send:\001*\022\207\001\n\024S" + - "endStreamingMessage\022\032.a2a.v1.SendMessage" + - "Request\032\026.a2a.v1.StreamResponse\"9\202\323\344\223\0023\"" + - "\017/message:stream:\001*Z\035\"\030/{tenant}/message" + - ":stream:\001*0\001\022k\n\007GetTask\022\026.a2a.v1.GetTask" + - "Request\032\014.a2a.v1.Task\":\332A\004name\202\323\344\223\002-\022\017/{" + - "name=tasks/*}Z\032\022\030/{tenant}/{name=tasks/*" + - "}\022c\n\tListTasks\022\030.a2a.v1.ListTasksRequest" + - "\032\031.a2a.v1.ListTasksResponse\"!\202\323\344\223\002\033\022\006/ta" + - "sksZ\021\022\017/{tenant}/tasks\022~\n\nCancelTask\022\031.a" + - "2a.v1.CancelTaskRequest\032\014.a2a.v1.Task\"G\202" + - "\323\344\223\002A\"\026/{name=tasks/*}:cancel:\001*Z$\"\037/{te" + - "nant}/{name=tasks/*}:cancel:\001*\022\224\001\n\017Subsc" + - "ribeToTask\022\036.a2a.v1.SubscribeToTaskReque" + - "st\032\026.a2a.v1.StreamResponse\"G\202\323\344\223\002A\022\031/{na" + - "me=tasks/*}:subscribeZ$\022\"/{tenant}/{name" + - "=tasks/*}:subscribe0\001\022\201\002\n CreateTaskPush" + - "NotificationConfig\022/.a2a.v1.CreateTaskPu" + - "shNotificationConfigRequest\032\".a2a.v1.Tas" + - "kPushNotificationConfig\"\207\001\332A\rparent,conf" + - "ig\202\323\344\223\002q\")/{parent=tasks/*/pushNotificat" + - "ionConfigs}:\006configZ<\"2/{tenant}/{parent" + - "=tasks/*/pushNotificationConfigs}:\006confi" + - "g\022\341\001\n\035GetTaskPushNotificationConfig\022,.a2" + - "a.v1.GetTaskPushNotificationConfigReques" + - "t\032\".a2a.v1.TaskPushNotificationConfig\"n\332" + - "A\004name\202\323\344\223\002a\022)/{name=tasks/*/pushNotific" + - "ationConfigs/*}Z4\0222/{tenant}/{name=tasks" + - "/*/pushNotificationConfigs/*}\022\361\001\n\036ListTa" + - "skPushNotificationConfig\022-.a2a.v1.ListTa" + - "skPushNotificationConfigRequest\032..a2a.v1" + - ".ListTaskPushNotificationConfigResponse\"" + - "p\332A\006parent\202\323\344\223\002a\022)/{parent=tasks/*}/push" + - "NotificationConfigsZ4\0222/{tenant}/{parent" + - "=tasks/*}/pushNotificationConfigs\022\211\001\n\024Ge" + - "tExtendedAgentCard\022#.a2a.v1.GetExtendedA" + - "gentCardRequest\032\021.a2a.v1.AgentCard\"9\202\323\344\223" + - "\0023\022\022/extendedAgentCardZ\035\022\033/{tenant}/exte" + - "ndedAgentCard\022\333\001\n DeleteTaskPushNotifica" + - "tionConfig\022/.a2a.v1.DeleteTaskPushNotifi" + - "cationConfigRequest\032\026.google.protobuf.Em" + - "pty\"n\332A\004name\202\323\344\223\002a*)/{name=tasks/*/pushN" + - "otificationConfigs/*}Z4*2/{tenant}/{name" + - "=tasks/*/pushNotificationConfigs/*}B7\n\013i" + - "o.a2a.grpcB\003A2AP\001Z\030google.golang.org/a2a" + - "/v1\252\002\006A2a.V1b\006proto3" + "(\t\"\240\001\n\025TaskStatusUpdateEvent\022\024\n\007task_id\030" + + "\001 \001(\tB\003\340A\002\022\027\n\ncontext_id\030\002 \001(\tB\003\340A\002\022\'\n\006s" + + "tatus\030\003 \001(\0132\022.a2a.v1.TaskStatusB\003\340A\002\022)\n\010" + + "metadata\030\005 \001(\0132\027.google.protobuf.StructJ" + + "\004\010\004\020\005\"\300\001\n\027TaskArtifactUpdateEvent\022\024\n\007tas" + + "k_id\030\001 \001(\tB\003\340A\002\022\027\n\ncontext_id\030\002 \001(\tB\003\340A\002" + + "\022\'\n\010artifact\030\003 \001(\0132\020.a2a.v1.ArtifactB\003\340A" + + "\002\022\016\n\006append\030\004 \001(\010\022\022\n\nlast_chunk\030\005 \001(\010\022)\n" + + "\010metadata\030\006 \001(\0132\027.google.protobuf.Struct" + + "\"y\n\026PushNotificationConfig\022\n\n\002id\030\001 \001(\t\022\020" + + "\n\003url\030\002 \001(\tB\003\340A\002\022\r\n\005token\030\003 \001(\t\0222\n\016authe" + + "ntication\030\004 \001(\0132\032.a2a.v1.AuthenticationI" + + "nfo\">\n\022AuthenticationInfo\022\023\n\006scheme\030\001 \001(" + + "\tB\003\340A\002\022\023\n\013credentials\030\002 \001(\t\"p\n\016AgentInte" + + "rface\022\020\n\003url\030\001 \001(\tB\003\340A\002\022\035\n\020protocol_bind" + + "ing\030\002 \001(\tB\003\340A\002\022\016\n\006tenant\030\003 \001(\t\022\035\n\020protoc" + + "ol_version\030\004 \001(\tB\003\340A\002\"\314\005\n\tAgentCard\022\021\n\004n" + + "ame\030\001 \001(\tB\003\340A\002\022\030\n\013description\030\002 \001(\tB\003\340A\002" + + "\0229\n\024supported_interfaces\030\023 \003(\0132\026.a2a.v1." + + "AgentInterfaceB\003\340A\002\022\'\n\010provider\030\004 \001(\0132\025." + + "a2a.v1.AgentProvider\022\024\n\007version\030\005 \001(\tB\003\340" + + "A\002\022\036\n\021documentation_url\030\006 \001(\tH\000\210\001\001\0224\n\014ca" + + "pabilities\030\007 \001(\0132\031.a2a.v1.AgentCapabilit" + + "iesB\003\340A\002\022@\n\020security_schemes\030\010 \003(\0132&.a2a" + + ".v1.AgentCard.SecuritySchemesEntry\022:\n\025se" + + "curity_requirements\030\r \003(\0132\033.a2a.v1.Secur" + + "ityRequirement\022 \n\023default_input_modes\030\n " + + "\003(\tB\003\340A\002\022!\n\024default_output_modes\030\013 \003(\tB\003" + + "\340A\002\022\'\n\006skills\030\014 \003(\0132\022.a2a.v1.AgentSkillB" + + "\003\340A\002\022.\n\nsignatures\030\021 \003(\0132\032.a2a.v1.AgentC" + + "ardSignature\022\025\n\010icon_url\030\022 \001(\tH\001\210\001\001\032N\n\024S" + + "ecuritySchemesEntry\022\013\n\003key\030\001 \001(\t\022%\n\005valu" + + "e\030\002 \001(\0132\026.a2a.v1.SecurityScheme:\0028\001B\024\n\022_" + + "documentation_urlB\013\n\t_icon_urlJ\004\010\003\020\004J\004\010\t" + + "\020\nJ\004\010\016\020\017J\004\010\017\020\020J\004\010\020\020\021\"<\n\rAgentProvider\022\020\n" + + "\003url\030\001 \001(\tB\003\340A\002\022\031\n\014organization\030\002 \001(\tB\003\340" + + "A\002\"\335\001\n\021AgentCapabilities\022\026\n\tstreaming\030\001 " + + "\001(\010H\000\210\001\001\022\037\n\022push_notifications\030\002 \001(\010H\001\210\001" + + "\001\022*\n\nextensions\030\003 \003(\0132\026.a2a.v1.AgentExte" + + "nsion\022 \n\023extended_agent_card\030\005 \001(\010H\002\210\001\001B" + + "\014\n\n_streamingB\025\n\023_push_notificationsB\026\n\024" + + "_extended_agent_cardJ\004\010\004\020\005\"m\n\016AgentExten" + + "sion\022\013\n\003uri\030\001 \001(\t\022\023\n\013description\030\002 \001(\t\022\020" + + "\n\010required\030\003 \001(\010\022\'\n\006params\030\004 \001(\0132\027.googl" + + "e.protobuf.Struct\"\326\001\n\nAgentSkill\022\017\n\002id\030\001" + + " \001(\tB\003\340A\002\022\021\n\004name\030\002 \001(\tB\003\340A\002\022\030\n\013descript" + + "ion\030\003 \001(\tB\003\340A\002\022\021\n\004tags\030\004 \003(\tB\003\340A\002\022\020\n\010exa" + + "mples\030\005 \003(\t\022\023\n\013input_modes\030\006 \003(\t\022\024\n\014outp" + + "ut_modes\030\007 \003(\t\022:\n\025security_requirements\030" + + "\010 \003(\0132\033.a2a.v1.SecurityRequirement\"m\n\022Ag" + + "entCardSignature\022\026\n\tprotected\030\001 \001(\tB\003\340A\002" + + "\022\026\n\tsignature\030\002 \001(\tB\003\340A\002\022\'\n\006header\030\003 \001(\013" + + "2\027.google.protobuf.Struct\"\232\001\n\032TaskPushNo" + + "tificationConfig\022\016\n\006tenant\030\004 \001(\t\022\017\n\002id\030\001" + + " \001(\tB\003\340A\002\022\024\n\007task_id\030\003 \001(\tB\003\340A\002\022E\n\030push_" + + "notification_config\030\002 \001(\0132\036.a2a.v1.PushN" + + "otificationConfigB\003\340A\002\"\032\n\nStringList\022\014\n\004" + + "list\030\001 \003(\t\"\224\001\n\023SecurityRequirement\0229\n\007sc" + + "hemes\030\001 \003(\0132(.a2a.v1.SecurityRequirement" + + ".SchemesEntry\032B\n\014SchemesEntry\022\013\n\003key\030\001 \001" + + "(\t\022!\n\005value\030\002 \001(\0132\022.a2a.v1.StringList:\0028" + + "\001\"\361\002\n\016SecurityScheme\022?\n\027api_key_security" + + "_scheme\030\001 \001(\0132\034.a2a.v1.APIKeySecuritySch" + + "emeH\000\022C\n\031http_auth_security_scheme\030\002 \001(\013" + + "2\036.a2a.v1.HTTPAuthSecuritySchemeH\000\022>\n\026oa" + + "uth2_security_scheme\030\003 \001(\0132\034.a2a.v1.OAut" + + "h2SecuritySchemeH\000\022N\n\037open_id_connect_se" + + "curity_scheme\030\004 \001(\0132#.a2a.v1.OpenIdConne" + + "ctSecuritySchemeH\000\022?\n\024mtls_security_sche" + + "me\030\005 \001(\0132\037.a2a.v1.MutualTlsSecuritySchem" + + "eH\000B\010\n\006scheme\"U\n\024APIKeySecurityScheme\022\023\n" + + "\013description\030\001 \001(\t\022\025\n\010location\030\002 \001(\tB\003\340A" + + "\002\022\021\n\004name\030\003 \001(\tB\003\340A\002\"Y\n\026HTTPAuthSecurity" + + "Scheme\022\023\n\013description\030\001 \001(\t\022\023\n\006scheme\030\002 " + + "\001(\tB\003\340A\002\022\025\n\rbearer_format\030\003 \001(\t\"p\n\024OAuth" + + "2SecurityScheme\022\023\n\013description\030\001 \001(\t\022&\n\005" + + "flows\030\002 \001(\0132\022.a2a.v1.OAuthFlowsB\003\340A\002\022\033\n\023" + + "oauth2_metadata_url\030\003 \001(\t\"T\n\033OpenIdConne" + + "ctSecurityScheme\022\023\n\013description\030\001 \001(\t\022 \n" + + "\023open_id_connect_url\030\002 \001(\tB\003\340A\002\".\n\027Mutua" + + "lTlsSecurityScheme\022\023\n\013description\030\001 \001(\t\"" + + "\262\002\n\nOAuthFlows\022@\n\022authorization_code\030\001 \001" + + "(\0132\".a2a.v1.AuthorizationCodeOAuthFlowH\000" + + "\022@\n\022client_credentials\030\002 \001(\0132\".a2a.v1.Cl" + + "ientCredentialsOAuthFlowH\000\0221\n\010implicit\030\003" + + " \001(\0132\031.a2a.v1.ImplicitOAuthFlowB\002\030\001H\000\0221\n" + + "\010password\030\004 \001(\0132\031.a2a.v1.PasswordOAuthFl" + + "owB\002\030\001H\000\0222\n\013device_code\030\005 \001(\0132\033.a2a.v1.D" + + "eviceCodeOAuthFlowH\000B\006\n\004flow\"\364\001\n\032Authori" + + "zationCodeOAuthFlow\022\036\n\021authorization_url" + + "\030\001 \001(\tB\003\340A\002\022\026\n\ttoken_url\030\002 \001(\tB\003\340A\002\022\023\n\013r" + + "efresh_url\030\003 \001(\t\022C\n\006scopes\030\004 \003(\0132..a2a.v" + + "1.AuthorizationCodeOAuthFlow.ScopesEntry" + + "B\003\340A\002\022\025\n\rpkce_required\030\005 \001(\010\032-\n\013ScopesEn" + + "try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\275\001\n\032" + + "ClientCredentialsOAuthFlow\022\026\n\ttoken_url\030" + + "\001 \001(\tB\003\340A\002\022\023\n\013refresh_url\030\002 \001(\t\022C\n\006scope" + + "s\030\003 \003(\0132..a2a.v1.ClientCredentialsOAuthF" + + "low.ScopesEntryB\003\340A\002\032-\n\013ScopesEntry\022\013\n\003k" + + "ey\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\251\001\n\021Implicit" + + "OAuthFlow\022\031\n\021authorization_url\030\001 \001(\t\022\023\n\013" + + "refresh_url\030\002 \001(\t\0225\n\006scopes\030\003 \003(\0132%.a2a." + + "v1.ImplicitOAuthFlow.ScopesEntry\032-\n\013Scop" + + "esEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"" + + "\241\001\n\021PasswordOAuthFlow\022\021\n\ttoken_url\030\001 \001(\t" + + "\022\023\n\013refresh_url\030\002 \001(\t\0225\n\006scopes\030\003 \003(\0132%." + + "a2a.v1.PasswordOAuthFlow.ScopesEntry\032-\n\013" + + "ScopesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:" + + "\0028\001\"\326\001\n\023DeviceCodeOAuthFlow\022%\n\030device_au" + + "thorization_url\030\001 \001(\tB\003\340A\002\022\026\n\ttoken_url\030" + + "\002 \001(\tB\003\340A\002\022\023\n\013refresh_url\030\003 \001(\t\022<\n\006scope" + + "s\030\004 \003(\0132\'.a2a.v1.DeviceCodeOAuthFlow.Sco" + + "pesEntryB\003\340A\002\032-\n\013ScopesEntry\022\013\n\003key\030\001 \001(" + + "\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\257\001\n\022SendMessageRequ" + + "est\022\016\n\006tenant\030\004 \001(\t\022%\n\007message\030\001 \001(\0132\017.a" + + "2a.v1.MessageB\003\340A\002\0227\n\rconfiguration\030\002 \001(" + + "\0132 .a2a.v1.SendMessageConfiguration\022)\n\010m" + + "etadata\030\003 \001(\0132\027.google.protobuf.Struct\"a" + + "\n\016GetTaskRequest\022\016\n\006tenant\030\003 \001(\t\022\017\n\002id\030\001" + + " \001(\tB\003\340A\002\022\033\n\016history_length\030\002 \001(\005H\000\210\001\001B\021" + + "\n\017_history_length\"\265\002\n\020ListTasksRequest\022\016" + + "\n\006tenant\030\t \001(\t\022\022\n\ncontext_id\030\001 \001(\t\022!\n\006st" + + "atus\030\002 \001(\0162\021.a2a.v1.TaskState\022\026\n\tpage_si" + + "ze\030\003 \001(\005H\000\210\001\001\022\022\n\npage_token\030\004 \001(\t\022\033\n\016his" + + "tory_length\030\005 \001(\005H\001\210\001\001\022:\n\026status_timesta" + + "mp_after\030\006 \001(\0132\032.google.protobuf.Timesta" + + "mp\022\036\n\021include_artifacts\030\007 \001(\010H\002\210\001\001B\014\n\n_p" + + "age_sizeB\021\n\017_history_lengthB\024\n\022_include_" + + "artifacts\"\204\001\n\021ListTasksResponse\022 \n\005tasks" + + "\030\001 \003(\0132\014.a2a.v1.TaskB\003\340A\002\022\034\n\017next_page_t" + + "oken\030\002 \001(\tB\003\340A\002\022\026\n\tpage_size\030\003 \001(\005B\003\340A\002\022" + + "\027\n\ntotal_size\030\004 \001(\005B\003\340A\002\"4\n\021CancelTaskRe" + + "quest\022\016\n\006tenant\030\002 \001(\t\022\017\n\002id\030\001 \001(\tB\003\340A\002\"]" + + "\n$GetTaskPushNotificationConfigRequest\022\016" + + "\n\006tenant\030\002 \001(\t\022\024\n\007task_id\030\003 \001(\tB\003\340A\002\022\017\n\002" + + "id\030\001 \001(\tB\003\340A\002\"`\n\'DeleteTaskPushNotificat" + + "ionConfigRequest\022\016\n\006tenant\030\002 \001(\t\022\024\n\007task" + + "_id\030\003 \001(\tB\003\340A\002\022\017\n\002id\030\001 \001(\tB\003\340A\002\"\242\001\n\'Crea" + + "teTaskPushNotificationConfigRequest\022\016\n\006t" + + "enant\030\004 \001(\t\022\024\n\007task_id\030\001 \001(\tB\003\340A\002\022\026\n\tcon" + + "fig_id\030\002 \001(\tB\003\340A\002\0223\n\006config\030\005 \001(\0132\036.a2a." + + "v1.PushNotificationConfigB\003\340A\002J\004\010\003\020\004\"9\n\026" + + "SubscribeToTaskRequest\022\016\n\006tenant\030\002 \001(\t\022\017" + + "\n\002id\030\001 \001(\tB\003\340A\002\"t\n%ListTaskPushNotificat" + + "ionConfigRequest\022\016\n\006tenant\030\004 \001(\t\022\024\n\007task" + + "_id\030\001 \001(\tB\003\340A\002\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npag" + + "e_token\030\003 \001(\t\"-\n\033GetExtendedAgentCardReq" + + "uest\022\016\n\006tenant\030\001 \001(\t\"b\n\023SendMessageRespo" + + "nse\022\034\n\004task\030\001 \001(\0132\014.a2a.v1.TaskH\000\022\"\n\007mes" + + "sage\030\002 \001(\0132\017.a2a.v1.MessageH\000B\t\n\007payload" + + "\"\321\001\n\016StreamResponse\022\034\n\004task\030\001 \001(\0132\014.a2a." + + "v1.TaskH\000\022\"\n\007message\030\002 \001(\0132\017.a2a.v1.Mess" + + "ageH\000\0226\n\rstatus_update\030\003 \001(\0132\035.a2a.v1.Ta" + + "skStatusUpdateEventH\000\022:\n\017artifact_update" + + "\030\004 \001(\0132\037.a2a.v1.TaskArtifactUpdateEventH" + + "\000B\t\n\007payload\"v\n&ListTaskPushNotification" + + "ConfigResponse\0223\n\007configs\030\001 \003(\0132\".a2a.v1" + + ".TaskPushNotificationConfig\022\027\n\017next_page" + + "_token\030\002 \001(\t*\371\001\n\tTaskState\022\032\n\026TASK_STATE" + + "_UNSPECIFIED\020\000\022\030\n\024TASK_STATE_SUBMITTED\020\001" + + "\022\026\n\022TASK_STATE_WORKING\020\002\022\030\n\024TASK_STATE_C" + + "OMPLETED\020\003\022\025\n\021TASK_STATE_FAILED\020\004\022\027\n\023TAS" + + "K_STATE_CANCELED\020\005\022\035\n\031TASK_STATE_INPUT_R" + + "EQUIRED\020\006\022\027\n\023TASK_STATE_REJECTED\020\007\022\034\n\030TA" + + "SK_STATE_AUTH_REQUIRED\020\010*;\n\004Role\022\024\n\020ROLE" + + "_UNSPECIFIED\020\000\022\r\n\tROLE_USER\020\001\022\016\n\nROLE_AG" + + "ENT\020\0022\352\016\n\nA2AService\022}\n\013SendMessage\022\032.a2" + + "a.v1.SendMessageRequest\032\033.a2a.v1.SendMes" + + "sageResponse\"5\202\323\344\223\002/\"\r/message:send:\001*Z\033" + + "\"\026/{tenant}/message:send:\001*\022\207\001\n\024SendStre" + + "amingMessage\022\032.a2a.v1.SendMessageRequest" + + "\032\026.a2a.v1.StreamResponse\"9\202\323\344\223\0023\"\017/messa" + + "ge:stream:\001*Z\035\"\030/{tenant}/message:stream" + + ":\001*0\001\022e\n\007GetTask\022\026.a2a.v1.GetTaskRequest" + + "\032\014.a2a.v1.Task\"4\332A\002id\202\323\344\223\002)\022\r/tasks/{id=" + + "*}Z\030\022\026/{tenant}/tasks/{id=*}\022c\n\tListTask" + + "s\022\030.a2a.v1.ListTasksRequest\032\031.a2a.v1.Lis" + + "tTasksResponse\"!\202\323\344\223\002\033\022\006/tasksZ\021\022\017/{tena" + + "nt}/tasks\022z\n\nCancelTask\022\031.a2a.v1.CancelT" + + "askRequest\032\014.a2a.v1.Task\"C\202\323\344\223\002=\"\024/tasks" + + "/{id=*}:cancel:\001*Z\"\"\035/{tenant}/tasks/{id" + + "=*}:cancel:\001*\022\220\001\n\017SubscribeToTask\022\036.a2a." + + "v1.SubscribeToTaskRequest\032\026.a2a.v1.Strea" + + "mResponse\"C\202\323\344\223\002=\022\027/tasks/{id=*}:subscri" + + "beZ\"\022 /{tenant}/tasks/{id=*}:subscribe0\001" + + "\022\204\002\n CreateTaskPushNotificationConfig\022/." + + "a2a.v1.CreateTaskPushNotificationConfigR" + + "equest\032\".a2a.v1.TaskPushNotificationConf" + + "ig\"\212\001\332A\016task_id,config\202\323\344\223\002s\"*/tasks/{ta" + + "sk_id=*}/pushNotificationConfigs:\006config" + + "Z=\"3/{tenant}/tasks/{task_id=*}/pushNoti" + + "ficationConfigs:\006config\022\370\001\n\035GetTaskPushN" + + "otificationConfig\022,.a2a.v1.GetTaskPushNo" + + "tificationConfigRequest\032\".a2a.v1.TaskPus" + + "hNotificationConfig\"\204\001\332A\ntask_id,id\202\323\344\223\002" + + "q\0221/tasks/{task_id=*}/pushNotificationCo" + + "nfigs/{id=*}Z<\022:/{tenant}/tasks/{task_id" + + "=*}/pushNotificationConfigs/{id=*}\022\364\001\n\036L" + + "istTaskPushNotificationConfig\022-.a2a.v1.L" + + "istTaskPushNotificationConfigRequest\032..a" + + "2a.v1.ListTaskPushNotificationConfigResp" + + "onse\"s\332A\007task_id\202\323\344\223\002c\022*/tasks/{task_id=" + + "*}/pushNotificationConfigsZ5\0223/{tenant}/" + + "tasks/{task_id=*}/pushNotificationConfig" + + "s\022\211\001\n\024GetExtendedAgentCard\022#.a2a.v1.GetE" + + "xtendedAgentCardRequest\032\021.a2a.v1.AgentCa" + + "rd\"9\202\323\344\223\0023\022\022/extendedAgentCardZ\035\022\033/{tena" + + "nt}/extendedAgentCard\022\362\001\n DeleteTaskPush" + + "NotificationConfig\022/.a2a.v1.DeleteTaskPu" + + "shNotificationConfigRequest\032\026.google.pro" + + "tobuf.Empty\"\204\001\332A\ntask_id,id\202\323\344\223\002q*1/task" + + "s/{task_id=*}/pushNotificationConfigs/{i" + + "d=*}Z<*:/{tenant}/tasks/{task_id=*}/push" + + "NotificationConfigs/{id=*}B7\n\013io.a2a.grp" + + "cB\003A2AP\001Z\030google.golang.org/a2a/v1\252\002\006A2a" + + ".V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -560,67 +583,55 @@ public static void registerAllExtensions( internal_static_a2a_v1_Part_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_a2a_v1_Part_descriptor, - new java.lang.String[] { "Text", "File", "Data", "Metadata", "Part", }); - internal_static_a2a_v1_FilePart_descriptor = - getDescriptor().getMessageType(4); - internal_static_a2a_v1_FilePart_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_a2a_v1_FilePart_descriptor, - new java.lang.String[] { "FileWithUri", "FileWithBytes", "MediaType", "Name", "File", }); - internal_static_a2a_v1_DataPart_descriptor = - getDescriptor().getMessageType(5); - internal_static_a2a_v1_DataPart_fieldAccessorTable = new - com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_a2a_v1_DataPart_descriptor, - new java.lang.String[] { "Data", }); + new java.lang.String[] { "Text", "Raw", "Url", "Data", "Metadata", "Filename", "MediaType", "Content", }); internal_static_a2a_v1_Message_descriptor = - getDescriptor().getMessageType(6); + getDescriptor().getMessageType(4); internal_static_a2a_v1_Message_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_a2a_v1_Message_descriptor, new java.lang.String[] { "MessageId", "ContextId", "TaskId", "Role", "Parts", "Metadata", "Extensions", "ReferenceTaskIds", }); internal_static_a2a_v1_Artifact_descriptor = - getDescriptor().getMessageType(7); + getDescriptor().getMessageType(5); internal_static_a2a_v1_Artifact_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_a2a_v1_Artifact_descriptor, new java.lang.String[] { "ArtifactId", "Name", "Description", "Parts", "Metadata", "Extensions", }); internal_static_a2a_v1_TaskStatusUpdateEvent_descriptor = - getDescriptor().getMessageType(8); + getDescriptor().getMessageType(6); internal_static_a2a_v1_TaskStatusUpdateEvent_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_a2a_v1_TaskStatusUpdateEvent_descriptor, - new java.lang.String[] { "TaskId", "ContextId", "Status", "Final", "Metadata", }); + new java.lang.String[] { "TaskId", "ContextId", "Status", "Metadata", }); internal_static_a2a_v1_TaskArtifactUpdateEvent_descriptor = - getDescriptor().getMessageType(9); + getDescriptor().getMessageType(7); internal_static_a2a_v1_TaskArtifactUpdateEvent_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_a2a_v1_TaskArtifactUpdateEvent_descriptor, new java.lang.String[] { "TaskId", "ContextId", "Artifact", "Append", "LastChunk", "Metadata", }); internal_static_a2a_v1_PushNotificationConfig_descriptor = - getDescriptor().getMessageType(10); + getDescriptor().getMessageType(8); internal_static_a2a_v1_PushNotificationConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_a2a_v1_PushNotificationConfig_descriptor, new java.lang.String[] { "Id", "Url", "Token", "Authentication", }); internal_static_a2a_v1_AuthenticationInfo_descriptor = - getDescriptor().getMessageType(11); + getDescriptor().getMessageType(9); internal_static_a2a_v1_AuthenticationInfo_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_a2a_v1_AuthenticationInfo_descriptor, - new java.lang.String[] { "Schemes", "Credentials", }); + new java.lang.String[] { "Scheme", "Credentials", }); internal_static_a2a_v1_AgentInterface_descriptor = - getDescriptor().getMessageType(12); + getDescriptor().getMessageType(10); internal_static_a2a_v1_AgentInterface_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_a2a_v1_AgentInterface_descriptor, - new java.lang.String[] { "Url", "ProtocolBinding", "Tenant", }); + new java.lang.String[] { "Url", "ProtocolBinding", "Tenant", "ProtocolVersion", }); internal_static_a2a_v1_AgentCard_descriptor = - getDescriptor().getMessageType(13); + getDescriptor().getMessageType(11); internal_static_a2a_v1_AgentCard_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_a2a_v1_AgentCard_descriptor, - new java.lang.String[] { "ProtocolVersions", "Name", "Description", "SupportedInterfaces", "Provider", "Version", "DocumentationUrl", "Capabilities", "SecuritySchemes", "Security", "DefaultInputModes", "DefaultOutputModes", "Skills", "Signatures", "IconUrl", }); + new java.lang.String[] { "Name", "Description", "SupportedInterfaces", "Provider", "Version", "DocumentationUrl", "Capabilities", "SecuritySchemes", "SecurityRequirements", "DefaultInputModes", "DefaultOutputModes", "Skills", "Signatures", "IconUrl", }); internal_static_a2a_v1_AgentCard_SecuritySchemesEntry_descriptor = internal_static_a2a_v1_AgentCard_descriptor.getNestedType(0); internal_static_a2a_v1_AgentCard_SecuritySchemesEntry_fieldAccessorTable = new @@ -628,103 +639,103 @@ public static void registerAllExtensions( internal_static_a2a_v1_AgentCard_SecuritySchemesEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_a2a_v1_AgentProvider_descriptor = - getDescriptor().getMessageType(14); + getDescriptor().getMessageType(12); internal_static_a2a_v1_AgentProvider_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_a2a_v1_AgentProvider_descriptor, new java.lang.String[] { "Url", "Organization", }); internal_static_a2a_v1_AgentCapabilities_descriptor = - getDescriptor().getMessageType(15); + getDescriptor().getMessageType(13); internal_static_a2a_v1_AgentCapabilities_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_a2a_v1_AgentCapabilities_descriptor, new java.lang.String[] { "Streaming", "PushNotifications", "Extensions", "ExtendedAgentCard", }); internal_static_a2a_v1_AgentExtension_descriptor = - getDescriptor().getMessageType(16); + getDescriptor().getMessageType(14); internal_static_a2a_v1_AgentExtension_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_a2a_v1_AgentExtension_descriptor, new java.lang.String[] { "Uri", "Description", "Required", "Params", }); internal_static_a2a_v1_AgentSkill_descriptor = - getDescriptor().getMessageType(17); + getDescriptor().getMessageType(15); internal_static_a2a_v1_AgentSkill_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_a2a_v1_AgentSkill_descriptor, - new java.lang.String[] { "Id", "Name", "Description", "Tags", "Examples", "InputModes", "OutputModes", "Security", }); + new java.lang.String[] { "Id", "Name", "Description", "Tags", "Examples", "InputModes", "OutputModes", "SecurityRequirements", }); internal_static_a2a_v1_AgentCardSignature_descriptor = - getDescriptor().getMessageType(18); + getDescriptor().getMessageType(16); internal_static_a2a_v1_AgentCardSignature_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_a2a_v1_AgentCardSignature_descriptor, new java.lang.String[] { "Protected", "Signature", "Header", }); internal_static_a2a_v1_TaskPushNotificationConfig_descriptor = - getDescriptor().getMessageType(19); + getDescriptor().getMessageType(17); internal_static_a2a_v1_TaskPushNotificationConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_a2a_v1_TaskPushNotificationConfig_descriptor, - new java.lang.String[] { "Name", "PushNotificationConfig", }); + new java.lang.String[] { "Tenant", "Id", "TaskId", "PushNotificationConfig", }); internal_static_a2a_v1_StringList_descriptor = - getDescriptor().getMessageType(20); + getDescriptor().getMessageType(18); internal_static_a2a_v1_StringList_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_a2a_v1_StringList_descriptor, new java.lang.String[] { "List", }); - internal_static_a2a_v1_Security_descriptor = - getDescriptor().getMessageType(21); - internal_static_a2a_v1_Security_fieldAccessorTable = new + internal_static_a2a_v1_SecurityRequirement_descriptor = + getDescriptor().getMessageType(19); + internal_static_a2a_v1_SecurityRequirement_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_a2a_v1_Security_descriptor, + internal_static_a2a_v1_SecurityRequirement_descriptor, new java.lang.String[] { "Schemes", }); - internal_static_a2a_v1_Security_SchemesEntry_descriptor = - internal_static_a2a_v1_Security_descriptor.getNestedType(0); - internal_static_a2a_v1_Security_SchemesEntry_fieldAccessorTable = new + internal_static_a2a_v1_SecurityRequirement_SchemesEntry_descriptor = + internal_static_a2a_v1_SecurityRequirement_descriptor.getNestedType(0); + internal_static_a2a_v1_SecurityRequirement_SchemesEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( - internal_static_a2a_v1_Security_SchemesEntry_descriptor, + internal_static_a2a_v1_SecurityRequirement_SchemesEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_a2a_v1_SecurityScheme_descriptor = - getDescriptor().getMessageType(22); + getDescriptor().getMessageType(20); internal_static_a2a_v1_SecurityScheme_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_a2a_v1_SecurityScheme_descriptor, new java.lang.String[] { "ApiKeySecurityScheme", "HttpAuthSecurityScheme", "Oauth2SecurityScheme", "OpenIdConnectSecurityScheme", "MtlsSecurityScheme", "Scheme", }); internal_static_a2a_v1_APIKeySecurityScheme_descriptor = - getDescriptor().getMessageType(23); + getDescriptor().getMessageType(21); internal_static_a2a_v1_APIKeySecurityScheme_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_a2a_v1_APIKeySecurityScheme_descriptor, new java.lang.String[] { "Description", "Location", "Name", }); internal_static_a2a_v1_HTTPAuthSecurityScheme_descriptor = - getDescriptor().getMessageType(24); + getDescriptor().getMessageType(22); internal_static_a2a_v1_HTTPAuthSecurityScheme_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_a2a_v1_HTTPAuthSecurityScheme_descriptor, new java.lang.String[] { "Description", "Scheme", "BearerFormat", }); internal_static_a2a_v1_OAuth2SecurityScheme_descriptor = - getDescriptor().getMessageType(25); + getDescriptor().getMessageType(23); internal_static_a2a_v1_OAuth2SecurityScheme_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_a2a_v1_OAuth2SecurityScheme_descriptor, new java.lang.String[] { "Description", "Flows", "Oauth2MetadataUrl", }); internal_static_a2a_v1_OpenIdConnectSecurityScheme_descriptor = - getDescriptor().getMessageType(26); + getDescriptor().getMessageType(24); internal_static_a2a_v1_OpenIdConnectSecurityScheme_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_a2a_v1_OpenIdConnectSecurityScheme_descriptor, new java.lang.String[] { "Description", "OpenIdConnectUrl", }); internal_static_a2a_v1_MutualTlsSecurityScheme_descriptor = - getDescriptor().getMessageType(27); + getDescriptor().getMessageType(25); internal_static_a2a_v1_MutualTlsSecurityScheme_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_a2a_v1_MutualTlsSecurityScheme_descriptor, new java.lang.String[] { "Description", }); internal_static_a2a_v1_OAuthFlows_descriptor = - getDescriptor().getMessageType(28); + getDescriptor().getMessageType(26); internal_static_a2a_v1_OAuthFlows_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_a2a_v1_OAuthFlows_descriptor, - new java.lang.String[] { "AuthorizationCode", "ClientCredentials", "DeviceCode", "Flow", }); + new java.lang.String[] { "AuthorizationCode", "ClientCredentials", "Implicit", "Password", "DeviceCode", "Flow", }); internal_static_a2a_v1_AuthorizationCodeOAuthFlow_descriptor = - getDescriptor().getMessageType(29); + getDescriptor().getMessageType(27); internal_static_a2a_v1_AuthorizationCodeOAuthFlow_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_a2a_v1_AuthorizationCodeOAuthFlow_descriptor, @@ -736,7 +747,7 @@ public static void registerAllExtensions( internal_static_a2a_v1_AuthorizationCodeOAuthFlow_ScopesEntry_descriptor, new java.lang.String[] { "Key", "Value", }); internal_static_a2a_v1_ClientCredentialsOAuthFlow_descriptor = - getDescriptor().getMessageType(30); + getDescriptor().getMessageType(28); internal_static_a2a_v1_ClientCredentialsOAuthFlow_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_a2a_v1_ClientCredentialsOAuthFlow_descriptor, @@ -747,6 +758,30 @@ public static void registerAllExtensions( com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_a2a_v1_ClientCredentialsOAuthFlow_ScopesEntry_descriptor, new java.lang.String[] { "Key", "Value", }); + internal_static_a2a_v1_ImplicitOAuthFlow_descriptor = + getDescriptor().getMessageType(29); + internal_static_a2a_v1_ImplicitOAuthFlow_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_a2a_v1_ImplicitOAuthFlow_descriptor, + new java.lang.String[] { "AuthorizationUrl", "RefreshUrl", "Scopes", }); + internal_static_a2a_v1_ImplicitOAuthFlow_ScopesEntry_descriptor = + internal_static_a2a_v1_ImplicitOAuthFlow_descriptor.getNestedType(0); + internal_static_a2a_v1_ImplicitOAuthFlow_ScopesEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_a2a_v1_ImplicitOAuthFlow_ScopesEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_a2a_v1_PasswordOAuthFlow_descriptor = + getDescriptor().getMessageType(30); + internal_static_a2a_v1_PasswordOAuthFlow_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_a2a_v1_PasswordOAuthFlow_descriptor, + new java.lang.String[] { "TokenUrl", "RefreshUrl", "Scopes", }); + internal_static_a2a_v1_PasswordOAuthFlow_ScopesEntry_descriptor = + internal_static_a2a_v1_PasswordOAuthFlow_descriptor.getNestedType(0); + internal_static_a2a_v1_PasswordOAuthFlow_ScopesEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_a2a_v1_PasswordOAuthFlow_ScopesEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); internal_static_a2a_v1_DeviceCodeOAuthFlow_descriptor = getDescriptor().getMessageType(31); internal_static_a2a_v1_DeviceCodeOAuthFlow_fieldAccessorTable = new @@ -770,7 +805,7 @@ public static void registerAllExtensions( internal_static_a2a_v1_GetTaskRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_a2a_v1_GetTaskRequest_descriptor, - new java.lang.String[] { "Tenant", "Name", "HistoryLength", }); + new java.lang.String[] { "Tenant", "Id", "HistoryLength", }); internal_static_a2a_v1_ListTasksRequest_descriptor = getDescriptor().getMessageType(34); internal_static_a2a_v1_ListTasksRequest_fieldAccessorTable = new @@ -788,37 +823,37 @@ public static void registerAllExtensions( internal_static_a2a_v1_CancelTaskRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_a2a_v1_CancelTaskRequest_descriptor, - new java.lang.String[] { "Tenant", "Name", }); + new java.lang.String[] { "Tenant", "Id", }); internal_static_a2a_v1_GetTaskPushNotificationConfigRequest_descriptor = getDescriptor().getMessageType(37); internal_static_a2a_v1_GetTaskPushNotificationConfigRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_a2a_v1_GetTaskPushNotificationConfigRequest_descriptor, - new java.lang.String[] { "Tenant", "Name", }); + new java.lang.String[] { "Tenant", "TaskId", "Id", }); internal_static_a2a_v1_DeleteTaskPushNotificationConfigRequest_descriptor = getDescriptor().getMessageType(38); internal_static_a2a_v1_DeleteTaskPushNotificationConfigRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_a2a_v1_DeleteTaskPushNotificationConfigRequest_descriptor, - new java.lang.String[] { "Tenant", "Name", }); + new java.lang.String[] { "Tenant", "TaskId", "Id", }); internal_static_a2a_v1_CreateTaskPushNotificationConfigRequest_descriptor = getDescriptor().getMessageType(39); internal_static_a2a_v1_CreateTaskPushNotificationConfigRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_a2a_v1_CreateTaskPushNotificationConfigRequest_descriptor, - new java.lang.String[] { "Tenant", "Parent", "ConfigId", "Config", }); + new java.lang.String[] { "Tenant", "TaskId", "ConfigId", "Config", }); internal_static_a2a_v1_SubscribeToTaskRequest_descriptor = getDescriptor().getMessageType(40); internal_static_a2a_v1_SubscribeToTaskRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_a2a_v1_SubscribeToTaskRequest_descriptor, - new java.lang.String[] { "Tenant", "Name", }); + new java.lang.String[] { "Tenant", "Id", }); internal_static_a2a_v1_ListTaskPushNotificationConfigRequest_descriptor = getDescriptor().getMessageType(41); internal_static_a2a_v1_ListTaskPushNotificationConfigRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_a2a_v1_ListTaskPushNotificationConfigRequest_descriptor, - new java.lang.String[] { "Tenant", "Parent", "PageSize", "PageToken", }); + new java.lang.String[] { "Tenant", "TaskId", "PageSize", "PageToken", }); internal_static_a2a_v1_GetExtendedAgentCardRequest_descriptor = getDescriptor().getMessageType(42); internal_static_a2a_v1_GetExtendedAgentCardRequest_fieldAccessorTable = new diff --git a/spec-grpc/src/main/java/io/a2a/grpc/A2AServiceGrpc.java b/spec-grpc/src/main/java/io/a2a/grpc/A2AServiceGrpc.java index 522c9083b..6d179b674 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/A2AServiceGrpc.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/A2AServiceGrpc.java @@ -475,7 +475,7 @@ default void cancelTask(io.a2a.grpc.CancelTaskRequest request, /** *

      * SubscribeToTask allows subscribing to task updates for tasks not in terminal state.
-     * Returns UnsupportedOperationError if task is in terminal state (completed, failed, cancelled, rejected).
+     * Returns UnsupportedOperationError if task is in terminal state (completed, failed, canceled, rejected).
      * 
*/ default void subscribeToTask(io.a2a.grpc.SubscribeToTaskRequest request, @@ -625,7 +625,7 @@ public void cancelTask(io.a2a.grpc.CancelTaskRequest request, /** *
      * SubscribeToTask allows subscribing to task updates for tasks not in terminal state.
-     * Returns UnsupportedOperationError if task is in terminal state (completed, failed, cancelled, rejected).
+     * Returns UnsupportedOperationError if task is in terminal state (completed, failed, canceled, rejected).
      * 
*/ public void subscribeToTask(io.a2a.grpc.SubscribeToTaskRequest request, @@ -764,7 +764,7 @@ public io.a2a.grpc.Task cancelTask(io.a2a.grpc.CancelTaskRequest request) throws /** *
      * SubscribeToTask allows subscribing to task updates for tasks not in terminal state.
-     * Returns UnsupportedOperationError if task is in terminal state (completed, failed, cancelled, rejected).
+     * Returns UnsupportedOperationError if task is in terminal state (completed, failed, canceled, rejected).
      * 
*/ @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/10918") @@ -898,7 +898,7 @@ public io.a2a.grpc.Task cancelTask(io.a2a.grpc.CancelTaskRequest request) { /** *
      * SubscribeToTask allows subscribing to task updates for tasks not in terminal state.
-     * Returns UnsupportedOperationError if task is in terminal state (completed, failed, cancelled, rejected).
+     * Returns UnsupportedOperationError if task is in terminal state (completed, failed, canceled, rejected).
      * 
*/ public java.util.Iterator subscribeToTask( diff --git a/spec-grpc/src/main/java/io/a2a/grpc/AgentCard.java b/spec-grpc/src/main/java/io/a2a/grpc/AgentCard.java index 5111e4f12..2b06f54b8 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/AgentCard.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/AgentCard.java @@ -36,14 +36,12 @@ private AgentCard(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } private AgentCard() { - protocolVersions_ = - com.google.protobuf.LazyStringArrayList.emptyList(); name_ = ""; description_ = ""; supportedInterfaces_ = java.util.Collections.emptyList(); version_ = ""; documentationUrl_ = ""; - security_ = java.util.Collections.emptyList(); + securityRequirements_ = java.util.Collections.emptyList(); defaultInputModes_ = com.google.protobuf.LazyStringArrayList.emptyList(); defaultOutputModes_ = @@ -79,71 +77,6 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl } private int bitField0_; - public static final int PROTOCOL_VERSIONS_FIELD_NUMBER = 16; - @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList protocolVersions_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - /** - *
-   * The versions of the A2A protocol this agent supports.
-   * For stable versions (1.x+), list only the latest supported minor version per major version.
-   * For legacy experimental versions (0.x), explicitly list each supported version.
-   * Default: ["1.0"]
-   * 
- * - * repeated string protocol_versions = 16 [(.google.api.field_behavior) = REQUIRED]; - * @return A list containing the protocolVersions. - */ - public com.google.protobuf.ProtocolStringList - getProtocolVersionsList() { - return protocolVersions_; - } - /** - *
-   * The versions of the A2A protocol this agent supports.
-   * For stable versions (1.x+), list only the latest supported minor version per major version.
-   * For legacy experimental versions (0.x), explicitly list each supported version.
-   * Default: ["1.0"]
-   * 
- * - * repeated string protocol_versions = 16 [(.google.api.field_behavior) = REQUIRED]; - * @return The count of protocolVersions. - */ - public int getProtocolVersionsCount() { - return protocolVersions_.size(); - } - /** - *
-   * The versions of the A2A protocol this agent supports.
-   * For stable versions (1.x+), list only the latest supported minor version per major version.
-   * For legacy experimental versions (0.x), explicitly list each supported version.
-   * Default: ["1.0"]
-   * 
- * - * repeated string protocol_versions = 16 [(.google.api.field_behavior) = REQUIRED]; - * @param index The index of the element to return. - * @return The protocolVersions at the given index. - */ - public java.lang.String getProtocolVersions(int index) { - return protocolVersions_.get(index); - } - /** - *
-   * The versions of the A2A protocol this agent supports.
-   * For stable versions (1.x+), list only the latest supported minor version per major version.
-   * For legacy experimental versions (0.x), explicitly list each supported version.
-   * Default: ["1.0"]
-   * 
- * - * repeated string protocol_versions = 16 [(.google.api.field_behavior) = REQUIRED]; - * @param index The index of the value to return. - * @return The bytes of the protocolVersions at the given index. - */ - public com.google.protobuf.ByteString - getProtocolVersionsBytes(int index) { - return protocolVersions_.getByteString(index); - } - public static final int NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; @@ -584,70 +517,65 @@ public io.a2a.grpc.SecurityScheme getSecuritySchemesOrThrow( return map.get(key); } - public static final int SECURITY_FIELD_NUMBER = 9; + public static final int SECURITY_REQUIREMENTS_FIELD_NUMBER = 13; @SuppressWarnings("serial") - private java.util.List security_; + private java.util.List securityRequirements_; /** *
-   * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
    * Security requirements for contacting the agent.
    * 
* - * repeated .a2a.v1.Security security = 9; + * repeated .a2a.v1.SecurityRequirement security_requirements = 13; */ @java.lang.Override - public java.util.List getSecurityList() { - return security_; + public java.util.List getSecurityRequirementsList() { + return securityRequirements_; } /** *
-   * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
    * Security requirements for contacting the agent.
    * 
* - * repeated .a2a.v1.Security security = 9; + * repeated .a2a.v1.SecurityRequirement security_requirements = 13; */ @java.lang.Override - public java.util.List - getSecurityOrBuilderList() { - return security_; + public java.util.List + getSecurityRequirementsOrBuilderList() { + return securityRequirements_; } /** *
-   * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
    * Security requirements for contacting the agent.
    * 
* - * repeated .a2a.v1.Security security = 9; + * repeated .a2a.v1.SecurityRequirement security_requirements = 13; */ @java.lang.Override - public int getSecurityCount() { - return security_.size(); + public int getSecurityRequirementsCount() { + return securityRequirements_.size(); } /** *
-   * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
    * Security requirements for contacting the agent.
    * 
* - * repeated .a2a.v1.Security security = 9; + * repeated .a2a.v1.SecurityRequirement security_requirements = 13; */ @java.lang.Override - public io.a2a.grpc.Security getSecurity(int index) { - return security_.get(index); + public io.a2a.grpc.SecurityRequirement getSecurityRequirements(int index) { + return securityRequirements_.get(index); } /** *
-   * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
    * Security requirements for contacting the agent.
    * 
* - * repeated .a2a.v1.Security security = 9; + * repeated .a2a.v1.SecurityRequirement security_requirements = 13; */ @java.lang.Override - public io.a2a.grpc.SecurityOrBuilder getSecurityOrBuilder( + public io.a2a.grpc.SecurityRequirementOrBuilder getSecurityRequirementsOrBuilder( int index) { - return security_.get(index); + return securityRequirements_.get(index); } public static final int DEFAULT_INPUT_MODES_FIELD_NUMBER = 10; @@ -993,9 +921,6 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) internalGetSecuritySchemes(), SecuritySchemesDefaultEntryHolder.defaultEntry, 8); - for (int i = 0; i < security_.size(); i++) { - output.writeMessage(9, security_.get(i)); - } for (int i = 0; i < defaultInputModes_.size(); i++) { com.google.protobuf.GeneratedMessage.writeString(output, 10, defaultInputModes_.getRaw(i)); } @@ -1005,8 +930,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < skills_.size(); i++) { output.writeMessage(12, skills_.get(i)); } - for (int i = 0; i < protocolVersions_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 16, protocolVersions_.getRaw(i)); + for (int i = 0; i < securityRequirements_.size(); i++) { + output.writeMessage(13, securityRequirements_.get(i)); } for (int i = 0; i < signatures_.size(); i++) { output.writeMessage(17, signatures_.get(i)); @@ -1056,10 +981,6 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(8, securitySchemes__); } - for (int i = 0; i < security_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, security_.get(i)); - } { int dataSize = 0; for (int i = 0; i < defaultInputModes_.size(); i++) { @@ -1080,13 +1001,9 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(12, skills_.get(i)); } - { - int dataSize = 0; - for (int i = 0; i < protocolVersions_.size(); i++) { - dataSize += computeStringSizeNoTag(protocolVersions_.getRaw(i)); - } - size += dataSize; - size += 2 * getProtocolVersionsList().size(); + for (int i = 0; i < securityRequirements_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(13, securityRequirements_.get(i)); } for (int i = 0; i < signatures_.size(); i++) { size += com.google.protobuf.CodedOutputStream @@ -1114,8 +1031,6 @@ public boolean equals(final java.lang.Object obj) { } io.a2a.grpc.AgentCard other = (io.a2a.grpc.AgentCard) obj; - if (!getProtocolVersionsList() - .equals(other.getProtocolVersionsList())) return false; if (!getName() .equals(other.getName())) return false; if (!getDescription() @@ -1141,8 +1056,8 @@ public boolean equals(final java.lang.Object obj) { } if (!internalGetSecuritySchemes().equals( other.internalGetSecuritySchemes())) return false; - if (!getSecurityList() - .equals(other.getSecurityList())) return false; + if (!getSecurityRequirementsList() + .equals(other.getSecurityRequirementsList())) return false; if (!getDefaultInputModesList() .equals(other.getDefaultInputModesList())) return false; if (!getDefaultOutputModesList() @@ -1167,10 +1082,6 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (getProtocolVersionsCount() > 0) { - hash = (37 * hash) + PROTOCOL_VERSIONS_FIELD_NUMBER; - hash = (53 * hash) + getProtocolVersionsList().hashCode(); - } hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; @@ -1197,9 +1108,9 @@ public int hashCode() { hash = (37 * hash) + SECURITY_SCHEMES_FIELD_NUMBER; hash = (53 * hash) + internalGetSecuritySchemes().hashCode(); } - if (getSecurityCount() > 0) { - hash = (37 * hash) + SECURITY_FIELD_NUMBER; - hash = (53 * hash) + getSecurityList().hashCode(); + if (getSecurityRequirementsCount() > 0) { + hash = (37 * hash) + SECURITY_REQUIREMENTS_FIELD_NUMBER; + hash = (53 * hash) + getSecurityRequirementsList().hashCode(); } if (getDefaultInputModesCount() > 0) { hash = (37 * hash) + DEFAULT_INPUT_MODES_FIELD_NUMBER; @@ -1384,7 +1295,7 @@ private void maybeForceBuilderInitialization() { internalGetSupportedInterfacesFieldBuilder(); internalGetProviderFieldBuilder(); internalGetCapabilitiesFieldBuilder(); - internalGetSecurityFieldBuilder(); + internalGetSecurityRequirementsFieldBuilder(); internalGetSkillsFieldBuilder(); internalGetSignaturesFieldBuilder(); } @@ -1393,8 +1304,6 @@ private void maybeForceBuilderInitialization() { public Builder clear() { super.clear(); bitField0_ = 0; - protocolVersions_ = - com.google.protobuf.LazyStringArrayList.emptyList(); name_ = ""; description_ = ""; if (supportedInterfacesBuilder_ == null) { @@ -1403,7 +1312,7 @@ public Builder clear() { supportedInterfaces_ = null; supportedInterfacesBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000004); provider_ = null; if (providerBuilder_ != null) { providerBuilder_.dispose(); @@ -1417,13 +1326,13 @@ public Builder clear() { capabilitiesBuilder_ = null; } internalGetMutableSecuritySchemes().clear(); - if (securityBuilder_ == null) { - security_ = java.util.Collections.emptyList(); + if (securityRequirementsBuilder_ == null) { + securityRequirements_ = java.util.Collections.emptyList(); } else { - security_ = null; - securityBuilder_.clear(); + securityRequirements_ = null; + securityRequirementsBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ = (bitField0_ & ~0x00000100); defaultInputModes_ = com.google.protobuf.LazyStringArrayList.emptyList(); defaultOutputModes_ = @@ -1434,14 +1343,14 @@ public Builder clear() { skills_ = null; skillsBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00001000); + bitField0_ = (bitField0_ & ~0x00000800); if (signaturesBuilder_ == null) { signatures_ = java.util.Collections.emptyList(); } else { signatures_ = null; signaturesBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00002000); + bitField0_ = (bitField0_ & ~0x00001000); iconUrl_ = ""; return this; } @@ -1477,36 +1386,36 @@ public io.a2a.grpc.AgentCard buildPartial() { private void buildPartialRepeatedFields(io.a2a.grpc.AgentCard result) { if (supportedInterfacesBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { + if (((bitField0_ & 0x00000004) != 0)) { supportedInterfaces_ = java.util.Collections.unmodifiableList(supportedInterfaces_); - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000004); } result.supportedInterfaces_ = supportedInterfaces_; } else { result.supportedInterfaces_ = supportedInterfacesBuilder_.build(); } - if (securityBuilder_ == null) { - if (((bitField0_ & 0x00000200) != 0)) { - security_ = java.util.Collections.unmodifiableList(security_); - bitField0_ = (bitField0_ & ~0x00000200); + if (securityRequirementsBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0)) { + securityRequirements_ = java.util.Collections.unmodifiableList(securityRequirements_); + bitField0_ = (bitField0_ & ~0x00000100); } - result.security_ = security_; + result.securityRequirements_ = securityRequirements_; } else { - result.security_ = securityBuilder_.build(); + result.securityRequirements_ = securityRequirementsBuilder_.build(); } if (skillsBuilder_ == null) { - if (((bitField0_ & 0x00001000) != 0)) { + if (((bitField0_ & 0x00000800) != 0)) { skills_ = java.util.Collections.unmodifiableList(skills_); - bitField0_ = (bitField0_ & ~0x00001000); + bitField0_ = (bitField0_ & ~0x00000800); } result.skills_ = skills_; } else { result.skills_ = skillsBuilder_.build(); } if (signaturesBuilder_ == null) { - if (((bitField0_ & 0x00002000) != 0)) { + if (((bitField0_ & 0x00001000) != 0)) { signatures_ = java.util.Collections.unmodifiableList(signatures_); - bitField0_ = (bitField0_ & ~0x00002000); + bitField0_ = (bitField0_ & ~0x00001000); } result.signatures_ = signatures_; } else { @@ -1517,47 +1426,43 @@ private void buildPartialRepeatedFields(io.a2a.grpc.AgentCard result) { private void buildPartial0(io.a2a.grpc.AgentCard result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { - protocolVersions_.makeImmutable(); - result.protocolVersions_ = protocolVersions_; - } - if (((from_bitField0_ & 0x00000002) != 0)) { result.name_ = name_; } - if (((from_bitField0_ & 0x00000004) != 0)) { + if (((from_bitField0_ & 0x00000002) != 0)) { result.description_ = description_; } int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000010) != 0)) { + if (((from_bitField0_ & 0x00000008) != 0)) { result.provider_ = providerBuilder_ == null ? provider_ : providerBuilder_.build(); to_bitField0_ |= 0x00000001; } - if (((from_bitField0_ & 0x00000020) != 0)) { + if (((from_bitField0_ & 0x00000010) != 0)) { result.version_ = version_; } - if (((from_bitField0_ & 0x00000040) != 0)) { + if (((from_bitField0_ & 0x00000020) != 0)) { result.documentationUrl_ = documentationUrl_; to_bitField0_ |= 0x00000002; } - if (((from_bitField0_ & 0x00000080) != 0)) { + if (((from_bitField0_ & 0x00000040) != 0)) { result.capabilities_ = capabilitiesBuilder_ == null ? capabilities_ : capabilitiesBuilder_.build(); to_bitField0_ |= 0x00000004; } - if (((from_bitField0_ & 0x00000100) != 0)) { + if (((from_bitField0_ & 0x00000080) != 0)) { result.securitySchemes_ = internalGetSecuritySchemes().build(SecuritySchemesDefaultEntryHolder.defaultEntry); } - if (((from_bitField0_ & 0x00000400) != 0)) { + if (((from_bitField0_ & 0x00000200) != 0)) { defaultInputModes_.makeImmutable(); result.defaultInputModes_ = defaultInputModes_; } - if (((from_bitField0_ & 0x00000800) != 0)) { + if (((from_bitField0_ & 0x00000400) != 0)) { defaultOutputModes_.makeImmutable(); result.defaultOutputModes_ = defaultOutputModes_; } - if (((from_bitField0_ & 0x00004000) != 0)) { + if (((from_bitField0_ & 0x00002000) != 0)) { result.iconUrl_ = iconUrl_; to_bitField0_ |= 0x00000008; } @@ -1576,31 +1481,21 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(io.a2a.grpc.AgentCard other) { if (other == io.a2a.grpc.AgentCard.getDefaultInstance()) return this; - if (!other.protocolVersions_.isEmpty()) { - if (protocolVersions_.isEmpty()) { - protocolVersions_ = other.protocolVersions_; - bitField0_ |= 0x00000001; - } else { - ensureProtocolVersionsIsMutable(); - protocolVersions_.addAll(other.protocolVersions_); - } - onChanged(); - } if (!other.getName().isEmpty()) { name_ = other.name_; - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000001; onChanged(); } if (!other.getDescription().isEmpty()) { description_ = other.description_; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; onChanged(); } if (supportedInterfacesBuilder_ == null) { if (!other.supportedInterfaces_.isEmpty()) { if (supportedInterfaces_.isEmpty()) { supportedInterfaces_ = other.supportedInterfaces_; - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000004); } else { ensureSupportedInterfacesIsMutable(); supportedInterfaces_.addAll(other.supportedInterfaces_); @@ -1613,7 +1508,7 @@ public Builder mergeFrom(io.a2a.grpc.AgentCard other) { supportedInterfacesBuilder_.dispose(); supportedInterfacesBuilder_ = null; supportedInterfaces_ = other.supportedInterfaces_; - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000004); supportedInterfacesBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? internalGetSupportedInterfacesFieldBuilder() : null; @@ -1627,12 +1522,12 @@ public Builder mergeFrom(io.a2a.grpc.AgentCard other) { } if (!other.getVersion().isEmpty()) { version_ = other.version_; - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000010; onChanged(); } if (other.hasDocumentationUrl()) { documentationUrl_ = other.documentationUrl_; - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000020; onChanged(); } if (other.hasCapabilities()) { @@ -1640,37 +1535,37 @@ public Builder mergeFrom(io.a2a.grpc.AgentCard other) { } internalGetMutableSecuritySchemes().mergeFrom( other.internalGetSecuritySchemes()); - bitField0_ |= 0x00000100; - if (securityBuilder_ == null) { - if (!other.security_.isEmpty()) { - if (security_.isEmpty()) { - security_ = other.security_; - bitField0_ = (bitField0_ & ~0x00000200); + bitField0_ |= 0x00000080; + if (securityRequirementsBuilder_ == null) { + if (!other.securityRequirements_.isEmpty()) { + if (securityRequirements_.isEmpty()) { + securityRequirements_ = other.securityRequirements_; + bitField0_ = (bitField0_ & ~0x00000100); } else { - ensureSecurityIsMutable(); - security_.addAll(other.security_); + ensureSecurityRequirementsIsMutable(); + securityRequirements_.addAll(other.securityRequirements_); } onChanged(); } } else { - if (!other.security_.isEmpty()) { - if (securityBuilder_.isEmpty()) { - securityBuilder_.dispose(); - securityBuilder_ = null; - security_ = other.security_; - bitField0_ = (bitField0_ & ~0x00000200); - securityBuilder_ = + if (!other.securityRequirements_.isEmpty()) { + if (securityRequirementsBuilder_.isEmpty()) { + securityRequirementsBuilder_.dispose(); + securityRequirementsBuilder_ = null; + securityRequirements_ = other.securityRequirements_; + bitField0_ = (bitField0_ & ~0x00000100); + securityRequirementsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - internalGetSecurityFieldBuilder() : null; + internalGetSecurityRequirementsFieldBuilder() : null; } else { - securityBuilder_.addAllMessages(other.security_); + securityRequirementsBuilder_.addAllMessages(other.securityRequirements_); } } } if (!other.defaultInputModes_.isEmpty()) { if (defaultInputModes_.isEmpty()) { defaultInputModes_ = other.defaultInputModes_; - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000200; } else { ensureDefaultInputModesIsMutable(); defaultInputModes_.addAll(other.defaultInputModes_); @@ -1680,7 +1575,7 @@ public Builder mergeFrom(io.a2a.grpc.AgentCard other) { if (!other.defaultOutputModes_.isEmpty()) { if (defaultOutputModes_.isEmpty()) { defaultOutputModes_ = other.defaultOutputModes_; - bitField0_ |= 0x00000800; + bitField0_ |= 0x00000400; } else { ensureDefaultOutputModesIsMutable(); defaultOutputModes_.addAll(other.defaultOutputModes_); @@ -1691,7 +1586,7 @@ public Builder mergeFrom(io.a2a.grpc.AgentCard other) { if (!other.skills_.isEmpty()) { if (skills_.isEmpty()) { skills_ = other.skills_; - bitField0_ = (bitField0_ & ~0x00001000); + bitField0_ = (bitField0_ & ~0x00000800); } else { ensureSkillsIsMutable(); skills_.addAll(other.skills_); @@ -1704,7 +1599,7 @@ public Builder mergeFrom(io.a2a.grpc.AgentCard other) { skillsBuilder_.dispose(); skillsBuilder_ = null; skills_ = other.skills_; - bitField0_ = (bitField0_ & ~0x00001000); + bitField0_ = (bitField0_ & ~0x00000800); skillsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? internalGetSkillsFieldBuilder() : null; @@ -1717,7 +1612,7 @@ public Builder mergeFrom(io.a2a.grpc.AgentCard other) { if (!other.signatures_.isEmpty()) { if (signatures_.isEmpty()) { signatures_ = other.signatures_; - bitField0_ = (bitField0_ & ~0x00002000); + bitField0_ = (bitField0_ & ~0x00001000); } else { ensureSignaturesIsMutable(); signatures_.addAll(other.signatures_); @@ -1730,7 +1625,7 @@ public Builder mergeFrom(io.a2a.grpc.AgentCard other) { signaturesBuilder_.dispose(); signaturesBuilder_ = null; signatures_ = other.signatures_; - bitField0_ = (bitField0_ & ~0x00002000); + bitField0_ = (bitField0_ & ~0x00001000); signaturesBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? internalGetSignaturesFieldBuilder() : null; @@ -1741,7 +1636,7 @@ public Builder mergeFrom(io.a2a.grpc.AgentCard other) { } if (other.hasIconUrl()) { iconUrl_ = other.iconUrl_; - bitField0_ |= 0x00004000; + bitField0_ |= 0x00002000; onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); @@ -1772,36 +1667,36 @@ public Builder mergeFrom( break; case 10: { name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000001; break; } // case 10 case 18: { description_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; break; } // case 18 case 34: { input.readMessage( internalGetProviderFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000008; break; } // case 34 case 42: { version_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000010; break; } // case 42 case 50: { documentationUrl_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; + bitField0_ |= 0x00000020; break; } // case 50 case 58: { input.readMessage( internalGetCapabilitiesFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000080; + bitField0_ |= 0x00000040; break; } // case 58 case 66: { @@ -1810,22 +1705,9 @@ public Builder mergeFrom( SecuritySchemesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutableSecuritySchemes().ensureBuilderMap().put( securitySchemes__.getKey(), securitySchemes__.getValue()); - bitField0_ |= 0x00000100; + bitField0_ |= 0x00000080; break; } // case 66 - case 74: { - io.a2a.grpc.Security m = - input.readMessage( - io.a2a.grpc.Security.parser(), - extensionRegistry); - if (securityBuilder_ == null) { - ensureSecurityIsMutable(); - security_.add(m); - } else { - securityBuilder_.addMessage(m); - } - break; - } // case 74 case 82: { java.lang.String s = input.readStringRequireUtf8(); ensureDefaultInputModesIsMutable(); @@ -1851,12 +1733,19 @@ public Builder mergeFrom( } break; } // case 98 - case 130: { - java.lang.String s = input.readStringRequireUtf8(); - ensureProtocolVersionsIsMutable(); - protocolVersions_.add(s); + case 106: { + io.a2a.grpc.SecurityRequirement m = + input.readMessage( + io.a2a.grpc.SecurityRequirement.parser(), + extensionRegistry); + if (securityRequirementsBuilder_ == null) { + ensureSecurityRequirementsIsMutable(); + securityRequirements_.add(m); + } else { + securityRequirementsBuilder_.addMessage(m); + } break; - } // case 130 + } // case 106 case 138: { io.a2a.grpc.AgentCardSignature m = input.readMessage( @@ -1872,7 +1761,7 @@ public Builder mergeFrom( } // case 138 case 146: { iconUrl_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00004000; + bitField0_ |= 0x00002000; break; } // case 146 case 154: { @@ -1905,180 +1794,6 @@ public Builder mergeFrom( } private int bitField0_; - private com.google.protobuf.LazyStringArrayList protocolVersions_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - private void ensureProtocolVersionsIsMutable() { - if (!protocolVersions_.isModifiable()) { - protocolVersions_ = new com.google.protobuf.LazyStringArrayList(protocolVersions_); - } - bitField0_ |= 0x00000001; - } - /** - *
-     * The versions of the A2A protocol this agent supports.
-     * For stable versions (1.x+), list only the latest supported minor version per major version.
-     * For legacy experimental versions (0.x), explicitly list each supported version.
-     * Default: ["1.0"]
-     * 
- * - * repeated string protocol_versions = 16 [(.google.api.field_behavior) = REQUIRED]; - * @return A list containing the protocolVersions. - */ - public com.google.protobuf.ProtocolStringList - getProtocolVersionsList() { - protocolVersions_.makeImmutable(); - return protocolVersions_; - } - /** - *
-     * The versions of the A2A protocol this agent supports.
-     * For stable versions (1.x+), list only the latest supported minor version per major version.
-     * For legacy experimental versions (0.x), explicitly list each supported version.
-     * Default: ["1.0"]
-     * 
- * - * repeated string protocol_versions = 16 [(.google.api.field_behavior) = REQUIRED]; - * @return The count of protocolVersions. - */ - public int getProtocolVersionsCount() { - return protocolVersions_.size(); - } - /** - *
-     * The versions of the A2A protocol this agent supports.
-     * For stable versions (1.x+), list only the latest supported minor version per major version.
-     * For legacy experimental versions (0.x), explicitly list each supported version.
-     * Default: ["1.0"]
-     * 
- * - * repeated string protocol_versions = 16 [(.google.api.field_behavior) = REQUIRED]; - * @param index The index of the element to return. - * @return The protocolVersions at the given index. - */ - public java.lang.String getProtocolVersions(int index) { - return protocolVersions_.get(index); - } - /** - *
-     * The versions of the A2A protocol this agent supports.
-     * For stable versions (1.x+), list only the latest supported minor version per major version.
-     * For legacy experimental versions (0.x), explicitly list each supported version.
-     * Default: ["1.0"]
-     * 
- * - * repeated string protocol_versions = 16 [(.google.api.field_behavior) = REQUIRED]; - * @param index The index of the value to return. - * @return The bytes of the protocolVersions at the given index. - */ - public com.google.protobuf.ByteString - getProtocolVersionsBytes(int index) { - return protocolVersions_.getByteString(index); - } - /** - *
-     * The versions of the A2A protocol this agent supports.
-     * For stable versions (1.x+), list only the latest supported minor version per major version.
-     * For legacy experimental versions (0.x), explicitly list each supported version.
-     * Default: ["1.0"]
-     * 
- * - * repeated string protocol_versions = 16 [(.google.api.field_behavior) = REQUIRED]; - * @param index The index to set the value at. - * @param value The protocolVersions to set. - * @return This builder for chaining. - */ - public Builder setProtocolVersions( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureProtocolVersionsIsMutable(); - protocolVersions_.set(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The versions of the A2A protocol this agent supports.
-     * For stable versions (1.x+), list only the latest supported minor version per major version.
-     * For legacy experimental versions (0.x), explicitly list each supported version.
-     * Default: ["1.0"]
-     * 
- * - * repeated string protocol_versions = 16 [(.google.api.field_behavior) = REQUIRED]; - * @param value The protocolVersions to add. - * @return This builder for chaining. - */ - public Builder addProtocolVersions( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureProtocolVersionsIsMutable(); - protocolVersions_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The versions of the A2A protocol this agent supports.
-     * For stable versions (1.x+), list only the latest supported minor version per major version.
-     * For legacy experimental versions (0.x), explicitly list each supported version.
-     * Default: ["1.0"]
-     * 
- * - * repeated string protocol_versions = 16 [(.google.api.field_behavior) = REQUIRED]; - * @param values The protocolVersions to add. - * @return This builder for chaining. - */ - public Builder addAllProtocolVersions( - java.lang.Iterable values) { - ensureProtocolVersionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, protocolVersions_); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * The versions of the A2A protocol this agent supports.
-     * For stable versions (1.x+), list only the latest supported minor version per major version.
-     * For legacy experimental versions (0.x), explicitly list each supported version.
-     * Default: ["1.0"]
-     * 
- * - * repeated string protocol_versions = 16 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearProtocolVersions() { - protocolVersions_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001);; - onChanged(); - return this; - } - /** - *
-     * The versions of the A2A protocol this agent supports.
-     * For stable versions (1.x+), list only the latest supported minor version per major version.
-     * For legacy experimental versions (0.x), explicitly list each supported version.
-     * Default: ["1.0"]
-     * 
- * - * repeated string protocol_versions = 16 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes of the protocolVersions to add. - * @return This builder for chaining. - */ - public Builder addProtocolVersionsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureProtocolVersionsIsMutable(); - protocolVersions_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - private java.lang.Object name_ = ""; /** *
@@ -2137,7 +1852,7 @@ public Builder setName(
         java.lang.String value) {
       if (value == null) { throw new NullPointerException(); }
       name_ = value;
-      bitField0_ |= 0x00000002;
+      bitField0_ |= 0x00000001;
       onChanged();
       return this;
     }
@@ -2152,7 +1867,7 @@ public Builder setName(
      */
     public Builder clearName() {
       name_ = getDefaultInstance().getName();
-      bitField0_ = (bitField0_ & ~0x00000002);
+      bitField0_ = (bitField0_ & ~0x00000001);
       onChanged();
       return this;
     }
@@ -2171,7 +1886,7 @@ public Builder setNameBytes(
       if (value == null) { throw new NullPointerException(); }
       checkByteStringIsUtf8(value);
       name_ = value;
-      bitField0_ |= 0x00000002;
+      bitField0_ |= 0x00000001;
       onChanged();
       return this;
     }
@@ -2237,7 +1952,7 @@ public Builder setDescription(
         java.lang.String value) {
       if (value == null) { throw new NullPointerException(); }
       description_ = value;
-      bitField0_ |= 0x00000004;
+      bitField0_ |= 0x00000002;
       onChanged();
       return this;
     }
@@ -2253,7 +1968,7 @@ public Builder setDescription(
      */
     public Builder clearDescription() {
       description_ = getDefaultInstance().getDescription();
-      bitField0_ = (bitField0_ & ~0x00000004);
+      bitField0_ = (bitField0_ & ~0x00000002);
       onChanged();
       return this;
     }
@@ -2273,7 +1988,7 @@ public Builder setDescriptionBytes(
       if (value == null) { throw new NullPointerException(); }
       checkByteStringIsUtf8(value);
       description_ = value;
-      bitField0_ |= 0x00000004;
+      bitField0_ |= 0x00000002;
       onChanged();
       return this;
     }
@@ -2281,9 +1996,9 @@ public Builder setDescriptionBytes(
     private java.util.List supportedInterfaces_ =
       java.util.Collections.emptyList();
     private void ensureSupportedInterfacesIsMutable() {
-      if (!((bitField0_ & 0x00000008) != 0)) {
+      if (!((bitField0_ & 0x00000004) != 0)) {
         supportedInterfaces_ = new java.util.ArrayList(supportedInterfaces_);
-        bitField0_ |= 0x00000008;
+        bitField0_ |= 0x00000004;
        }
     }
 
@@ -2477,7 +2192,7 @@ public Builder addAllSupportedInterfaces(
     public Builder clearSupportedInterfaces() {
       if (supportedInterfacesBuilder_ == null) {
         supportedInterfaces_ = java.util.Collections.emptyList();
-        bitField0_ = (bitField0_ & ~0x00000008);
+        bitField0_ = (bitField0_ & ~0x00000004);
         onChanged();
       } else {
         supportedInterfacesBuilder_.clear();
@@ -2582,7 +2297,7 @@ public io.a2a.grpc.AgentInterface.Builder addSupportedInterfacesBuilder(
         supportedInterfacesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             io.a2a.grpc.AgentInterface, io.a2a.grpc.AgentInterface.Builder, io.a2a.grpc.AgentInterfaceOrBuilder>(
                 supportedInterfaces_,
-                ((bitField0_ & 0x00000008) != 0),
+                ((bitField0_ & 0x00000004) != 0),
                 getParentForChildren(),
                 isClean());
         supportedInterfaces_ = null;
@@ -2602,7 +2317,7 @@ public io.a2a.grpc.AgentInterface.Builder addSupportedInterfacesBuilder(
      * @return Whether the provider field is set.
      */
     public boolean hasProvider() {
-      return ((bitField0_ & 0x00000010) != 0);
+      return ((bitField0_ & 0x00000008) != 0);
     }
     /**
      * 
@@ -2635,7 +2350,7 @@ public Builder setProvider(io.a2a.grpc.AgentProvider value) {
       } else {
         providerBuilder_.setMessage(value);
       }
-      bitField0_ |= 0x00000010;
+      bitField0_ |= 0x00000008;
       onChanged();
       return this;
     }
@@ -2653,7 +2368,7 @@ public Builder setProvider(
       } else {
         providerBuilder_.setMessage(builderForValue.build());
       }
-      bitField0_ |= 0x00000010;
+      bitField0_ |= 0x00000008;
       onChanged();
       return this;
     }
@@ -2666,7 +2381,7 @@ public Builder setProvider(
      */
     public Builder mergeProvider(io.a2a.grpc.AgentProvider value) {
       if (providerBuilder_ == null) {
-        if (((bitField0_ & 0x00000010) != 0) &&
+        if (((bitField0_ & 0x00000008) != 0) &&
           provider_ != null &&
           provider_ != io.a2a.grpc.AgentProvider.getDefaultInstance()) {
           getProviderBuilder().mergeFrom(value);
@@ -2677,7 +2392,7 @@ public Builder mergeProvider(io.a2a.grpc.AgentProvider value) {
         providerBuilder_.mergeFrom(value);
       }
       if (provider_ != null) {
-        bitField0_ |= 0x00000010;
+        bitField0_ |= 0x00000008;
         onChanged();
       }
       return this;
@@ -2690,7 +2405,7 @@ public Builder mergeProvider(io.a2a.grpc.AgentProvider value) {
      * .a2a.v1.AgentProvider provider = 4;
      */
     public Builder clearProvider() {
-      bitField0_ = (bitField0_ & ~0x00000010);
+      bitField0_ = (bitField0_ & ~0x00000008);
       provider_ = null;
       if (providerBuilder_ != null) {
         providerBuilder_.dispose();
@@ -2707,7 +2422,7 @@ public Builder clearProvider() {
      * .a2a.v1.AgentProvider provider = 4;
      */
     public io.a2a.grpc.AgentProvider.Builder getProviderBuilder() {
-      bitField0_ |= 0x00000010;
+      bitField0_ |= 0x00000008;
       onChanged();
       return internalGetProviderFieldBuilder().getBuilder();
     }
@@ -2805,7 +2520,7 @@ public Builder setVersion(
         java.lang.String value) {
       if (value == null) { throw new NullPointerException(); }
       version_ = value;
-      bitField0_ |= 0x00000020;
+      bitField0_ |= 0x00000010;
       onChanged();
       return this;
     }
@@ -2820,7 +2535,7 @@ public Builder setVersion(
      */
     public Builder clearVersion() {
       version_ = getDefaultInstance().getVersion();
-      bitField0_ = (bitField0_ & ~0x00000020);
+      bitField0_ = (bitField0_ & ~0x00000010);
       onChanged();
       return this;
     }
@@ -2839,7 +2554,7 @@ public Builder setVersionBytes(
       if (value == null) { throw new NullPointerException(); }
       checkByteStringIsUtf8(value);
       version_ = value;
-      bitField0_ |= 0x00000020;
+      bitField0_ |= 0x00000010;
       onChanged();
       return this;
     }
@@ -2854,7 +2569,7 @@ public Builder setVersionBytes(
      * @return Whether the documentationUrl field is set.
      */
     public boolean hasDocumentationUrl() {
-      return ((bitField0_ & 0x00000040) != 0);
+      return ((bitField0_ & 0x00000020) != 0);
     }
     /**
      * 
@@ -2910,7 +2625,7 @@ public Builder setDocumentationUrl(
         java.lang.String value) {
       if (value == null) { throw new NullPointerException(); }
       documentationUrl_ = value;
-      bitField0_ |= 0x00000040;
+      bitField0_ |= 0x00000020;
       onChanged();
       return this;
     }
@@ -2924,7 +2639,7 @@ public Builder setDocumentationUrl(
      */
     public Builder clearDocumentationUrl() {
       documentationUrl_ = getDefaultInstance().getDocumentationUrl();
-      bitField0_ = (bitField0_ & ~0x00000040);
+      bitField0_ = (bitField0_ & ~0x00000020);
       onChanged();
       return this;
     }
@@ -2942,7 +2657,7 @@ public Builder setDocumentationUrlBytes(
       if (value == null) { throw new NullPointerException(); }
       checkByteStringIsUtf8(value);
       documentationUrl_ = value;
-      bitField0_ |= 0x00000040;
+      bitField0_ |= 0x00000020;
       onChanged();
       return this;
     }
@@ -2959,7 +2674,7 @@ public Builder setDocumentationUrlBytes(
      * @return Whether the capabilities field is set.
      */
     public boolean hasCapabilities() {
-      return ((bitField0_ & 0x00000080) != 0);
+      return ((bitField0_ & 0x00000040) != 0);
     }
     /**
      * 
@@ -2992,7 +2707,7 @@ public Builder setCapabilities(io.a2a.grpc.AgentCapabilities value) {
       } else {
         capabilitiesBuilder_.setMessage(value);
       }
-      bitField0_ |= 0x00000080;
+      bitField0_ |= 0x00000040;
       onChanged();
       return this;
     }
@@ -3010,7 +2725,7 @@ public Builder setCapabilities(
       } else {
         capabilitiesBuilder_.setMessage(builderForValue.build());
       }
-      bitField0_ |= 0x00000080;
+      bitField0_ |= 0x00000040;
       onChanged();
       return this;
     }
@@ -3023,7 +2738,7 @@ public Builder setCapabilities(
      */
     public Builder mergeCapabilities(io.a2a.grpc.AgentCapabilities value) {
       if (capabilitiesBuilder_ == null) {
-        if (((bitField0_ & 0x00000080) != 0) &&
+        if (((bitField0_ & 0x00000040) != 0) &&
           capabilities_ != null &&
           capabilities_ != io.a2a.grpc.AgentCapabilities.getDefaultInstance()) {
           getCapabilitiesBuilder().mergeFrom(value);
@@ -3034,7 +2749,7 @@ public Builder mergeCapabilities(io.a2a.grpc.AgentCapabilities value) {
         capabilitiesBuilder_.mergeFrom(value);
       }
       if (capabilities_ != null) {
-        bitField0_ |= 0x00000080;
+        bitField0_ |= 0x00000040;
         onChanged();
       }
       return this;
@@ -3047,7 +2762,7 @@ public Builder mergeCapabilities(io.a2a.grpc.AgentCapabilities value) {
      * .a2a.v1.AgentCapabilities capabilities = 7 [(.google.api.field_behavior) = REQUIRED];
      */
     public Builder clearCapabilities() {
-      bitField0_ = (bitField0_ & ~0x00000080);
+      bitField0_ = (bitField0_ & ~0x00000040);
       capabilities_ = null;
       if (capabilitiesBuilder_ != null) {
         capabilitiesBuilder_.dispose();
@@ -3064,7 +2779,7 @@ public Builder clearCapabilities() {
      * .a2a.v1.AgentCapabilities capabilities = 7 [(.google.api.field_behavior) = REQUIRED];
      */
     public io.a2a.grpc.AgentCapabilities.Builder getCapabilitiesBuilder() {
-      bitField0_ |= 0x00000080;
+      bitField0_ |= 0x00000040;
       onChanged();
       return internalGetCapabilitiesFieldBuilder().getBuilder();
     }
@@ -3132,7 +2847,7 @@ public com.google.protobuf.MapEntry(securitySchemesConverter);
       }
-      bitField0_ |= 0x00000100;
+      bitField0_ |= 0x00000080;
       onChanged();
       return securitySchemes_;
     }
@@ -3206,7 +2921,7 @@ public io.a2a.grpc.SecurityScheme getSecuritySchemesOrThrow(
       return securitySchemesConverter.build(map.get(key));
     }
     public Builder clearSecuritySchemes() {
-      bitField0_ = (bitField0_ & ~0x00000100);
+      bitField0_ = (bitField0_ & ~0x00000080);
       internalGetMutableSecuritySchemes().clear();
       return this;
     }
@@ -3230,7 +2945,7 @@ public Builder removeSecuritySchemes(
     @java.lang.Deprecated
     public java.util.Map
         getMutableSecuritySchemes() {
-      bitField0_ |= 0x00000100;
+      bitField0_ |= 0x00000080;
       return internalGetMutableSecuritySchemes().ensureMessageMap();
     }
     /**
@@ -3247,7 +2962,7 @@ public Builder putSecuritySchemes(
       if (value == null) { throw new NullPointerException("map value"); }
       internalGetMutableSecuritySchemes().ensureBuilderMap()
           .put(key, value);
-      bitField0_ |= 0x00000100;
+      bitField0_ |= 0x00000080;
       return this;
     }
     /**
@@ -3266,7 +2981,7 @@ public Builder putAllSecuritySchemes(
       }
       internalGetMutableSecuritySchemes().ensureBuilderMap()
           .putAll(values);
-      bitField0_ |= 0x00000100;
+      bitField0_ |= 0x00000080;
       return this;
     }
     /**
@@ -3291,334 +3006,316 @@ public io.a2a.grpc.SecurityScheme.Builder putSecuritySchemesBuilderIfAbsent(
       return (io.a2a.grpc.SecurityScheme.Builder) entry;
     }
 
-    private java.util.List security_ =
+    private java.util.List securityRequirements_ =
       java.util.Collections.emptyList();
-    private void ensureSecurityIsMutable() {
-      if (!((bitField0_ & 0x00000200) != 0)) {
-        security_ = new java.util.ArrayList(security_);
-        bitField0_ |= 0x00000200;
+    private void ensureSecurityRequirementsIsMutable() {
+      if (!((bitField0_ & 0x00000100) != 0)) {
+        securityRequirements_ = new java.util.ArrayList(securityRequirements_);
+        bitField0_ |= 0x00000100;
        }
     }
 
     private com.google.protobuf.RepeatedFieldBuilder<
-        io.a2a.grpc.Security, io.a2a.grpc.Security.Builder, io.a2a.grpc.SecurityOrBuilder> securityBuilder_;
+        io.a2a.grpc.SecurityRequirement, io.a2a.grpc.SecurityRequirement.Builder, io.a2a.grpc.SecurityRequirementOrBuilder> securityRequirementsBuilder_;
 
     /**
      * 
-     * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
      * Security requirements for contacting the agent.
      * 
* - * repeated .a2a.v1.Security security = 9; + * repeated .a2a.v1.SecurityRequirement security_requirements = 13; */ - public java.util.List getSecurityList() { - if (securityBuilder_ == null) { - return java.util.Collections.unmodifiableList(security_); + public java.util.List getSecurityRequirementsList() { + if (securityRequirementsBuilder_ == null) { + return java.util.Collections.unmodifiableList(securityRequirements_); } else { - return securityBuilder_.getMessageList(); + return securityRequirementsBuilder_.getMessageList(); } } /** *
-     * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
      * Security requirements for contacting the agent.
      * 
* - * repeated .a2a.v1.Security security = 9; + * repeated .a2a.v1.SecurityRequirement security_requirements = 13; */ - public int getSecurityCount() { - if (securityBuilder_ == null) { - return security_.size(); + public int getSecurityRequirementsCount() { + if (securityRequirementsBuilder_ == null) { + return securityRequirements_.size(); } else { - return securityBuilder_.getCount(); + return securityRequirementsBuilder_.getCount(); } } /** *
-     * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
      * Security requirements for contacting the agent.
      * 
* - * repeated .a2a.v1.Security security = 9; + * repeated .a2a.v1.SecurityRequirement security_requirements = 13; */ - public io.a2a.grpc.Security getSecurity(int index) { - if (securityBuilder_ == null) { - return security_.get(index); + public io.a2a.grpc.SecurityRequirement getSecurityRequirements(int index) { + if (securityRequirementsBuilder_ == null) { + return securityRequirements_.get(index); } else { - return securityBuilder_.getMessage(index); + return securityRequirementsBuilder_.getMessage(index); } } /** *
-     * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
      * Security requirements for contacting the agent.
      * 
* - * repeated .a2a.v1.Security security = 9; + * repeated .a2a.v1.SecurityRequirement security_requirements = 13; */ - public Builder setSecurity( - int index, io.a2a.grpc.Security value) { - if (securityBuilder_ == null) { + public Builder setSecurityRequirements( + int index, io.a2a.grpc.SecurityRequirement value) { + if (securityRequirementsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureSecurityIsMutable(); - security_.set(index, value); + ensureSecurityRequirementsIsMutable(); + securityRequirements_.set(index, value); onChanged(); } else { - securityBuilder_.setMessage(index, value); + securityRequirementsBuilder_.setMessage(index, value); } return this; } /** *
-     * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
      * Security requirements for contacting the agent.
      * 
* - * repeated .a2a.v1.Security security = 9; + * repeated .a2a.v1.SecurityRequirement security_requirements = 13; */ - public Builder setSecurity( - int index, io.a2a.grpc.Security.Builder builderForValue) { - if (securityBuilder_ == null) { - ensureSecurityIsMutable(); - security_.set(index, builderForValue.build()); + public Builder setSecurityRequirements( + int index, io.a2a.grpc.SecurityRequirement.Builder builderForValue) { + if (securityRequirementsBuilder_ == null) { + ensureSecurityRequirementsIsMutable(); + securityRequirements_.set(index, builderForValue.build()); onChanged(); } else { - securityBuilder_.setMessage(index, builderForValue.build()); + securityRequirementsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
-     * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
      * Security requirements for contacting the agent.
      * 
* - * repeated .a2a.v1.Security security = 9; + * repeated .a2a.v1.SecurityRequirement security_requirements = 13; */ - public Builder addSecurity(io.a2a.grpc.Security value) { - if (securityBuilder_ == null) { + public Builder addSecurityRequirements(io.a2a.grpc.SecurityRequirement value) { + if (securityRequirementsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureSecurityIsMutable(); - security_.add(value); + ensureSecurityRequirementsIsMutable(); + securityRequirements_.add(value); onChanged(); } else { - securityBuilder_.addMessage(value); + securityRequirementsBuilder_.addMessage(value); } return this; } /** *
-     * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
      * Security requirements for contacting the agent.
      * 
* - * repeated .a2a.v1.Security security = 9; + * repeated .a2a.v1.SecurityRequirement security_requirements = 13; */ - public Builder addSecurity( - int index, io.a2a.grpc.Security value) { - if (securityBuilder_ == null) { + public Builder addSecurityRequirements( + int index, io.a2a.grpc.SecurityRequirement value) { + if (securityRequirementsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureSecurityIsMutable(); - security_.add(index, value); + ensureSecurityRequirementsIsMutable(); + securityRequirements_.add(index, value); onChanged(); } else { - securityBuilder_.addMessage(index, value); + securityRequirementsBuilder_.addMessage(index, value); } return this; } /** *
-     * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
      * Security requirements for contacting the agent.
      * 
* - * repeated .a2a.v1.Security security = 9; + * repeated .a2a.v1.SecurityRequirement security_requirements = 13; */ - public Builder addSecurity( - io.a2a.grpc.Security.Builder builderForValue) { - if (securityBuilder_ == null) { - ensureSecurityIsMutable(); - security_.add(builderForValue.build()); + public Builder addSecurityRequirements( + io.a2a.grpc.SecurityRequirement.Builder builderForValue) { + if (securityRequirementsBuilder_ == null) { + ensureSecurityRequirementsIsMutable(); + securityRequirements_.add(builderForValue.build()); onChanged(); } else { - securityBuilder_.addMessage(builderForValue.build()); + securityRequirementsBuilder_.addMessage(builderForValue.build()); } return this; } /** *
-     * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
      * Security requirements for contacting the agent.
      * 
* - * repeated .a2a.v1.Security security = 9; + * repeated .a2a.v1.SecurityRequirement security_requirements = 13; */ - public Builder addSecurity( - int index, io.a2a.grpc.Security.Builder builderForValue) { - if (securityBuilder_ == null) { - ensureSecurityIsMutable(); - security_.add(index, builderForValue.build()); + public Builder addSecurityRequirements( + int index, io.a2a.grpc.SecurityRequirement.Builder builderForValue) { + if (securityRequirementsBuilder_ == null) { + ensureSecurityRequirementsIsMutable(); + securityRequirements_.add(index, builderForValue.build()); onChanged(); } else { - securityBuilder_.addMessage(index, builderForValue.build()); + securityRequirementsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
-     * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
      * Security requirements for contacting the agent.
      * 
* - * repeated .a2a.v1.Security security = 9; + * repeated .a2a.v1.SecurityRequirement security_requirements = 13; */ - public Builder addAllSecurity( - java.lang.Iterable values) { - if (securityBuilder_ == null) { - ensureSecurityIsMutable(); + public Builder addAllSecurityRequirements( + java.lang.Iterable values) { + if (securityRequirementsBuilder_ == null) { + ensureSecurityRequirementsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, security_); + values, securityRequirements_); onChanged(); } else { - securityBuilder_.addAllMessages(values); + securityRequirementsBuilder_.addAllMessages(values); } return this; } /** *
-     * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
      * Security requirements for contacting the agent.
      * 
* - * repeated .a2a.v1.Security security = 9; + * repeated .a2a.v1.SecurityRequirement security_requirements = 13; */ - public Builder clearSecurity() { - if (securityBuilder_ == null) { - security_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000200); + public Builder clearSecurityRequirements() { + if (securityRequirementsBuilder_ == null) { + securityRequirements_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); onChanged(); } else { - securityBuilder_.clear(); + securityRequirementsBuilder_.clear(); } return this; } /** *
-     * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
      * Security requirements for contacting the agent.
      * 
* - * repeated .a2a.v1.Security security = 9; + * repeated .a2a.v1.SecurityRequirement security_requirements = 13; */ - public Builder removeSecurity(int index) { - if (securityBuilder_ == null) { - ensureSecurityIsMutable(); - security_.remove(index); + public Builder removeSecurityRequirements(int index) { + if (securityRequirementsBuilder_ == null) { + ensureSecurityRequirementsIsMutable(); + securityRequirements_.remove(index); onChanged(); } else { - securityBuilder_.remove(index); + securityRequirementsBuilder_.remove(index); } return this; } /** *
-     * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
      * Security requirements for contacting the agent.
      * 
* - * repeated .a2a.v1.Security security = 9; + * repeated .a2a.v1.SecurityRequirement security_requirements = 13; */ - public io.a2a.grpc.Security.Builder getSecurityBuilder( + public io.a2a.grpc.SecurityRequirement.Builder getSecurityRequirementsBuilder( int index) { - return internalGetSecurityFieldBuilder().getBuilder(index); + return internalGetSecurityRequirementsFieldBuilder().getBuilder(index); } /** *
-     * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
      * Security requirements for contacting the agent.
      * 
* - * repeated .a2a.v1.Security security = 9; + * repeated .a2a.v1.SecurityRequirement security_requirements = 13; */ - public io.a2a.grpc.SecurityOrBuilder getSecurityOrBuilder( + public io.a2a.grpc.SecurityRequirementOrBuilder getSecurityRequirementsOrBuilder( int index) { - if (securityBuilder_ == null) { - return security_.get(index); } else { - return securityBuilder_.getMessageOrBuilder(index); + if (securityRequirementsBuilder_ == null) { + return securityRequirements_.get(index); } else { + return securityRequirementsBuilder_.getMessageOrBuilder(index); } } /** *
-     * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
      * Security requirements for contacting the agent.
      * 
* - * repeated .a2a.v1.Security security = 9; + * repeated .a2a.v1.SecurityRequirement security_requirements = 13; */ - public java.util.List - getSecurityOrBuilderList() { - if (securityBuilder_ != null) { - return securityBuilder_.getMessageOrBuilderList(); + public java.util.List + getSecurityRequirementsOrBuilderList() { + if (securityRequirementsBuilder_ != null) { + return securityRequirementsBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(security_); + return java.util.Collections.unmodifiableList(securityRequirements_); } } /** *
-     * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
      * Security requirements for contacting the agent.
      * 
* - * repeated .a2a.v1.Security security = 9; + * repeated .a2a.v1.SecurityRequirement security_requirements = 13; */ - public io.a2a.grpc.Security.Builder addSecurityBuilder() { - return internalGetSecurityFieldBuilder().addBuilder( - io.a2a.grpc.Security.getDefaultInstance()); + public io.a2a.grpc.SecurityRequirement.Builder addSecurityRequirementsBuilder() { + return internalGetSecurityRequirementsFieldBuilder().addBuilder( + io.a2a.grpc.SecurityRequirement.getDefaultInstance()); } /** *
-     * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
      * Security requirements for contacting the agent.
      * 
* - * repeated .a2a.v1.Security security = 9; + * repeated .a2a.v1.SecurityRequirement security_requirements = 13; */ - public io.a2a.grpc.Security.Builder addSecurityBuilder( + public io.a2a.grpc.SecurityRequirement.Builder addSecurityRequirementsBuilder( int index) { - return internalGetSecurityFieldBuilder().addBuilder( - index, io.a2a.grpc.Security.getDefaultInstance()); + return internalGetSecurityRequirementsFieldBuilder().addBuilder( + index, io.a2a.grpc.SecurityRequirement.getDefaultInstance()); } /** *
-     * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
      * Security requirements for contacting the agent.
      * 
* - * repeated .a2a.v1.Security security = 9; + * repeated .a2a.v1.SecurityRequirement security_requirements = 13; */ - public java.util.List - getSecurityBuilderList() { - return internalGetSecurityFieldBuilder().getBuilderList(); + public java.util.List + getSecurityRequirementsBuilderList() { + return internalGetSecurityRequirementsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - io.a2a.grpc.Security, io.a2a.grpc.Security.Builder, io.a2a.grpc.SecurityOrBuilder> - internalGetSecurityFieldBuilder() { - if (securityBuilder_ == null) { - securityBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - io.a2a.grpc.Security, io.a2a.grpc.Security.Builder, io.a2a.grpc.SecurityOrBuilder>( - security_, - ((bitField0_ & 0x00000200) != 0), + io.a2a.grpc.SecurityRequirement, io.a2a.grpc.SecurityRequirement.Builder, io.a2a.grpc.SecurityRequirementOrBuilder> + internalGetSecurityRequirementsFieldBuilder() { + if (securityRequirementsBuilder_ == null) { + securityRequirementsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + io.a2a.grpc.SecurityRequirement, io.a2a.grpc.SecurityRequirement.Builder, io.a2a.grpc.SecurityRequirementOrBuilder>( + securityRequirements_, + ((bitField0_ & 0x00000100) != 0), getParentForChildren(), isClean()); - security_ = null; + securityRequirements_ = null; } - return securityBuilder_; + return securityRequirementsBuilder_; } private com.google.protobuf.LazyStringArrayList defaultInputModes_ = @@ -3627,7 +3324,7 @@ private void ensureDefaultInputModesIsMutable() { if (!defaultInputModes_.isModifiable()) { defaultInputModes_ = new com.google.protobuf.LazyStringArrayList(defaultInputModes_); } - bitField0_ |= 0x00000400; + bitField0_ |= 0x00000200; } /** *
@@ -3703,7 +3400,7 @@ public Builder setDefaultInputModes(
       if (value == null) { throw new NullPointerException(); }
       ensureDefaultInputModesIsMutable();
       defaultInputModes_.set(index, value);
-      bitField0_ |= 0x00000400;
+      bitField0_ |= 0x00000200;
       onChanged();
       return this;
     }
@@ -3723,7 +3420,7 @@ public Builder addDefaultInputModes(
       if (value == null) { throw new NullPointerException(); }
       ensureDefaultInputModesIsMutable();
       defaultInputModes_.add(value);
-      bitField0_ |= 0x00000400;
+      bitField0_ |= 0x00000200;
       onChanged();
       return this;
     }
@@ -3743,7 +3440,7 @@ public Builder addAllDefaultInputModes(
       ensureDefaultInputModesIsMutable();
       com.google.protobuf.AbstractMessageLite.Builder.addAll(
           values, defaultInputModes_);
-      bitField0_ |= 0x00000400;
+      bitField0_ |= 0x00000200;
       onChanged();
       return this;
     }
@@ -3760,7 +3457,7 @@ public Builder addAllDefaultInputModes(
     public Builder clearDefaultInputModes() {
       defaultInputModes_ =
         com.google.protobuf.LazyStringArrayList.emptyList();
-      bitField0_ = (bitField0_ & ~0x00000400);;
+      bitField0_ = (bitField0_ & ~0x00000200);;
       onChanged();
       return this;
     }
@@ -3781,7 +3478,7 @@ public Builder addDefaultInputModesBytes(
       checkByteStringIsUtf8(value);
       ensureDefaultInputModesIsMutable();
       defaultInputModes_.add(value);
-      bitField0_ |= 0x00000400;
+      bitField0_ |= 0x00000200;
       onChanged();
       return this;
     }
@@ -3792,7 +3489,7 @@ private void ensureDefaultOutputModesIsMutable() {
       if (!defaultOutputModes_.isModifiable()) {
         defaultOutputModes_ = new com.google.protobuf.LazyStringArrayList(defaultOutputModes_);
       }
-      bitField0_ |= 0x00000800;
+      bitField0_ |= 0x00000400;
     }
     /**
      * 
@@ -3858,7 +3555,7 @@ public Builder setDefaultOutputModes(
       if (value == null) { throw new NullPointerException(); }
       ensureDefaultOutputModesIsMutable();
       defaultOutputModes_.set(index, value);
-      bitField0_ |= 0x00000800;
+      bitField0_ |= 0x00000400;
       onChanged();
       return this;
     }
@@ -3876,7 +3573,7 @@ public Builder addDefaultOutputModes(
       if (value == null) { throw new NullPointerException(); }
       ensureDefaultOutputModesIsMutable();
       defaultOutputModes_.add(value);
-      bitField0_ |= 0x00000800;
+      bitField0_ |= 0x00000400;
       onChanged();
       return this;
     }
@@ -3894,7 +3591,7 @@ public Builder addAllDefaultOutputModes(
       ensureDefaultOutputModesIsMutable();
       com.google.protobuf.AbstractMessageLite.Builder.addAll(
           values, defaultOutputModes_);
-      bitField0_ |= 0x00000800;
+      bitField0_ |= 0x00000400;
       onChanged();
       return this;
     }
@@ -3909,7 +3606,7 @@ public Builder addAllDefaultOutputModes(
     public Builder clearDefaultOutputModes() {
       defaultOutputModes_ =
         com.google.protobuf.LazyStringArrayList.emptyList();
-      bitField0_ = (bitField0_ & ~0x00000800);;
+      bitField0_ = (bitField0_ & ~0x00000400);;
       onChanged();
       return this;
     }
@@ -3928,7 +3625,7 @@ public Builder addDefaultOutputModesBytes(
       checkByteStringIsUtf8(value);
       ensureDefaultOutputModesIsMutable();
       defaultOutputModes_.add(value);
-      bitField0_ |= 0x00000800;
+      bitField0_ |= 0x00000400;
       onChanged();
       return this;
     }
@@ -3936,9 +3633,9 @@ public Builder addDefaultOutputModesBytes(
     private java.util.List skills_ =
       java.util.Collections.emptyList();
     private void ensureSkillsIsMutable() {
-      if (!((bitField0_ & 0x00001000) != 0)) {
+      if (!((bitField0_ & 0x00000800) != 0)) {
         skills_ = new java.util.ArrayList(skills_);
-        bitField0_ |= 0x00001000;
+        bitField0_ |= 0x00000800;
        }
     }
 
@@ -4154,7 +3851,7 @@ public Builder addAllSkills(
     public Builder clearSkills() {
       if (skillsBuilder_ == null) {
         skills_ = java.util.Collections.emptyList();
-        bitField0_ = (bitField0_ & ~0x00001000);
+        bitField0_ = (bitField0_ & ~0x00000800);
         onChanged();
       } else {
         skillsBuilder_.clear();
@@ -4273,7 +3970,7 @@ public io.a2a.grpc.AgentSkill.Builder addSkillsBuilder(
         skillsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             io.a2a.grpc.AgentSkill, io.a2a.grpc.AgentSkill.Builder, io.a2a.grpc.AgentSkillOrBuilder>(
                 skills_,
-                ((bitField0_ & 0x00001000) != 0),
+                ((bitField0_ & 0x00000800) != 0),
                 getParentForChildren(),
                 isClean());
         skills_ = null;
@@ -4284,9 +3981,9 @@ public io.a2a.grpc.AgentSkill.Builder addSkillsBuilder(
     private java.util.List signatures_ =
       java.util.Collections.emptyList();
     private void ensureSignaturesIsMutable() {
-      if (!((bitField0_ & 0x00002000) != 0)) {
+      if (!((bitField0_ & 0x00001000) != 0)) {
         signatures_ = new java.util.ArrayList(signatures_);
-        bitField0_ |= 0x00002000;
+        bitField0_ |= 0x00001000;
        }
     }
 
@@ -4480,7 +4177,7 @@ public Builder addAllSignatures(
     public Builder clearSignatures() {
       if (signaturesBuilder_ == null) {
         signatures_ = java.util.Collections.emptyList();
-        bitField0_ = (bitField0_ & ~0x00002000);
+        bitField0_ = (bitField0_ & ~0x00001000);
         onChanged();
       } else {
         signaturesBuilder_.clear();
@@ -4585,7 +4282,7 @@ public io.a2a.grpc.AgentCardSignature.Builder addSignaturesBuilder(
         signaturesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
             io.a2a.grpc.AgentCardSignature, io.a2a.grpc.AgentCardSignature.Builder, io.a2a.grpc.AgentCardSignatureOrBuilder>(
                 signatures_,
-                ((bitField0_ & 0x00002000) != 0),
+                ((bitField0_ & 0x00001000) != 0),
                 getParentForChildren(),
                 isClean());
         signatures_ = null;
@@ -4603,7 +4300,7 @@ public io.a2a.grpc.AgentCardSignature.Builder addSignaturesBuilder(
      * @return Whether the iconUrl field is set.
      */
     public boolean hasIconUrl() {
-      return ((bitField0_ & 0x00004000) != 0);
+      return ((bitField0_ & 0x00002000) != 0);
     }
     /**
      * 
@@ -4659,7 +4356,7 @@ public Builder setIconUrl(
         java.lang.String value) {
       if (value == null) { throw new NullPointerException(); }
       iconUrl_ = value;
-      bitField0_ |= 0x00004000;
+      bitField0_ |= 0x00002000;
       onChanged();
       return this;
     }
@@ -4673,7 +4370,7 @@ public Builder setIconUrl(
      */
     public Builder clearIconUrl() {
       iconUrl_ = getDefaultInstance().getIconUrl();
-      bitField0_ = (bitField0_ & ~0x00004000);
+      bitField0_ = (bitField0_ & ~0x00002000);
       onChanged();
       return this;
     }
@@ -4691,7 +4388,7 @@ public Builder setIconUrlBytes(
       if (value == null) { throw new NullPointerException(); }
       checkByteStringIsUtf8(value);
       iconUrl_ = value;
-      bitField0_ |= 0x00004000;
+      bitField0_ |= 0x00002000;
       onChanged();
       return this;
     }
diff --git a/spec-grpc/src/main/java/io/a2a/grpc/AgentCardOrBuilder.java b/spec-grpc/src/main/java/io/a2a/grpc/AgentCardOrBuilder.java
index 8c31e3053..379ec0282 100644
--- a/spec-grpc/src/main/java/io/a2a/grpc/AgentCardOrBuilder.java
+++ b/spec-grpc/src/main/java/io/a2a/grpc/AgentCardOrBuilder.java
@@ -10,59 +10,6 @@ public interface AgentCardOrBuilder extends
     // @@protoc_insertion_point(interface_extends:a2a.v1.AgentCard)
     com.google.protobuf.MessageOrBuilder {
 
-  /**
-   * 
-   * The versions of the A2A protocol this agent supports.
-   * For stable versions (1.x+), list only the latest supported minor version per major version.
-   * For legacy experimental versions (0.x), explicitly list each supported version.
-   * Default: ["1.0"]
-   * 
- * - * repeated string protocol_versions = 16 [(.google.api.field_behavior) = REQUIRED]; - * @return A list containing the protocolVersions. - */ - java.util.List - getProtocolVersionsList(); - /** - *
-   * The versions of the A2A protocol this agent supports.
-   * For stable versions (1.x+), list only the latest supported minor version per major version.
-   * For legacy experimental versions (0.x), explicitly list each supported version.
-   * Default: ["1.0"]
-   * 
- * - * repeated string protocol_versions = 16 [(.google.api.field_behavior) = REQUIRED]; - * @return The count of protocolVersions. - */ - int getProtocolVersionsCount(); - /** - *
-   * The versions of the A2A protocol this agent supports.
-   * For stable versions (1.x+), list only the latest supported minor version per major version.
-   * For legacy experimental versions (0.x), explicitly list each supported version.
-   * Default: ["1.0"]
-   * 
- * - * repeated string protocol_versions = 16 [(.google.api.field_behavior) = REQUIRED]; - * @param index The index of the element to return. - * @return The protocolVersions at the given index. - */ - java.lang.String getProtocolVersions(int index); - /** - *
-   * The versions of the A2A protocol this agent supports.
-   * For stable versions (1.x+), list only the latest supported minor version per major version.
-   * For legacy experimental versions (0.x), explicitly list each supported version.
-   * Default: ["1.0"]
-   * 
- * - * repeated string protocol_versions = 16 [(.google.api.field_behavior) = REQUIRED]; - * @param index The index of the value to return. - * @return The bytes of the protocolVersions at the given index. - */ - com.google.protobuf.ByteString - getProtocolVersionsBytes(int index); - /** *
    * A human readable name for the agent.
@@ -314,51 +261,46 @@ io.a2a.grpc.SecurityScheme getSecuritySchemesOrThrow(
 
   /**
    * 
-   * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
    * Security requirements for contacting the agent.
    * 
* - * repeated .a2a.v1.Security security = 9; + * repeated .a2a.v1.SecurityRequirement security_requirements = 13; */ - java.util.List - getSecurityList(); + java.util.List + getSecurityRequirementsList(); /** *
-   * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
    * Security requirements for contacting the agent.
    * 
* - * repeated .a2a.v1.Security security = 9; + * repeated .a2a.v1.SecurityRequirement security_requirements = 13; */ - io.a2a.grpc.Security getSecurity(int index); + io.a2a.grpc.SecurityRequirement getSecurityRequirements(int index); /** *
-   * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
    * Security requirements for contacting the agent.
    * 
* - * repeated .a2a.v1.Security security = 9; + * repeated .a2a.v1.SecurityRequirement security_requirements = 13; */ - int getSecurityCount(); + int getSecurityRequirementsCount(); /** *
-   * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
    * Security requirements for contacting the agent.
    * 
* - * repeated .a2a.v1.Security security = 9; + * repeated .a2a.v1.SecurityRequirement security_requirements = 13; */ - java.util.List - getSecurityOrBuilderList(); + java.util.List + getSecurityRequirementsOrBuilderList(); /** *
-   * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
    * Security requirements for contacting the agent.
    * 
* - * repeated .a2a.v1.Security security = 9; + * repeated .a2a.v1.SecurityRequirement security_requirements = 13; */ - io.a2a.grpc.SecurityOrBuilder getSecurityOrBuilder( + io.a2a.grpc.SecurityRequirementOrBuilder getSecurityRequirementsOrBuilder( int index); /** diff --git a/spec-grpc/src/main/java/io/a2a/grpc/AgentInterface.java b/spec-grpc/src/main/java/io/a2a/grpc/AgentInterface.java index 17db01b94..ac8001a8e 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/AgentInterface.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/AgentInterface.java @@ -8,7 +8,7 @@ /** *
  * --8<-- [start:AgentInterface]
- * Declares a combination of a target URL and a transport protocol for interacting with the agent.
+ * Declares a combination of a target URL, transport and protocol version for interacting with the agent.
  * This allows agents to expose the same functionality over multiple protocol binding mechanisms.
  * 
* @@ -37,6 +37,7 @@ private AgentInterface() { url_ = ""; protocolBinding_ = ""; tenant_ = ""; + protocolVersion_ = ""; } public static final com.google.protobuf.Descriptors.Descriptor @@ -199,6 +200,57 @@ public java.lang.String getTenant() { } } + public static final int PROTOCOL_VERSION_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object protocolVersion_ = ""; + /** + *
+   * The version of the A2A protocol this interface exposes.
+   * Use the latest supported minor version per major version.
+   * Examples: "0.3", "1.0"
+   * 
+ * + * string protocol_version = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return The protocolVersion. + */ + @java.lang.Override + public java.lang.String getProtocolVersion() { + java.lang.Object ref = protocolVersion_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + protocolVersion_ = s; + return s; + } + } + /** + *
+   * The version of the A2A protocol this interface exposes.
+   * Use the latest supported minor version per major version.
+   * Examples: "0.3", "1.0"
+   * 
+ * + * string protocol_version = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for protocolVersion. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getProtocolVersionBytes() { + java.lang.Object ref = protocolVersion_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + protocolVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -222,6 +274,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tenant_)) { com.google.protobuf.GeneratedMessage.writeString(output, 3, tenant_); } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(protocolVersion_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, protocolVersion_); + } getUnknownFields().writeTo(output); } @@ -240,6 +295,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tenant_)) { size += com.google.protobuf.GeneratedMessage.computeStringSize(3, tenant_); } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(protocolVersion_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, protocolVersion_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -261,6 +319,8 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getProtocolBinding())) return false; if (!getTenant() .equals(other.getTenant())) return false; + if (!getProtocolVersion() + .equals(other.getProtocolVersion())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -278,6 +338,8 @@ public int hashCode() { hash = (53 * hash) + getProtocolBinding().hashCode(); hash = (37 * hash) + TENANT_FIELD_NUMBER; hash = (53 * hash) + getTenant().hashCode(); + hash = (37 * hash) + PROTOCOL_VERSION_FIELD_NUMBER; + hash = (53 * hash) + getProtocolVersion().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -378,7 +440,7 @@ protected Builder newBuilderForType( /** *
    * --8<-- [start:AgentInterface]
-   * Declares a combination of a target URL and a transport protocol for interacting with the agent.
+   * Declares a combination of a target URL, transport and protocol version for interacting with the agent.
    * This allows agents to expose the same functionality over multiple protocol binding mechanisms.
    * 
* @@ -418,6 +480,7 @@ public Builder clear() { url_ = ""; protocolBinding_ = ""; tenant_ = ""; + protocolVersion_ = ""; return this; } @@ -460,6 +523,9 @@ private void buildPartial0(io.a2a.grpc.AgentInterface result) { if (((from_bitField0_ & 0x00000004) != 0)) { result.tenant_ = tenant_; } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.protocolVersion_ = protocolVersion_; + } } @java.lang.Override @@ -489,6 +555,11 @@ public Builder mergeFrom(io.a2a.grpc.AgentInterface other) { bitField0_ |= 0x00000004; onChanged(); } + if (!other.getProtocolVersion().isEmpty()) { + protocolVersion_ = other.protocolVersion_; + bitField0_ |= 0x00000008; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -530,6 +601,11 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 26 + case 34: { + protocolVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -838,6 +914,108 @@ public Builder setTenantBytes( return this; } + private java.lang.Object protocolVersion_ = ""; + /** + *
+     * The version of the A2A protocol this interface exposes.
+     * Use the latest supported minor version per major version.
+     * Examples: "0.3", "1.0"
+     * 
+ * + * string protocol_version = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return The protocolVersion. + */ + public java.lang.String getProtocolVersion() { + java.lang.Object ref = protocolVersion_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + protocolVersion_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The version of the A2A protocol this interface exposes.
+     * Use the latest supported minor version per major version.
+     * Examples: "0.3", "1.0"
+     * 
+ * + * string protocol_version = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for protocolVersion. + */ + public com.google.protobuf.ByteString + getProtocolVersionBytes() { + java.lang.Object ref = protocolVersion_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + protocolVersion_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The version of the A2A protocol this interface exposes.
+     * Use the latest supported minor version per major version.
+     * Examples: "0.3", "1.0"
+     * 
+ * + * string protocol_version = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param value The protocolVersion to set. + * @return This builder for chaining. + */ + public Builder setProtocolVersion( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + protocolVersion_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
+     * The version of the A2A protocol this interface exposes.
+     * Use the latest supported minor version per major version.
+     * Examples: "0.3", "1.0"
+     * 
+ * + * string protocol_version = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearProtocolVersion() { + protocolVersion_ = getDefaultInstance().getProtocolVersion(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + *
+     * The version of the A2A protocol this interface exposes.
+     * Use the latest supported minor version per major version.
+     * Examples: "0.3", "1.0"
+     * 
+ * + * string protocol_version = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for protocolVersion to set. + * @return This builder for chaining. + */ + public Builder setProtocolVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + protocolVersion_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:a2a.v1.AgentInterface) } diff --git a/spec-grpc/src/main/java/io/a2a/grpc/AgentInterfaceOrBuilder.java b/spec-grpc/src/main/java/io/a2a/grpc/AgentInterfaceOrBuilder.java index cfc8b7ad9..3dfe76f41 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/AgentInterfaceOrBuilder.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/AgentInterfaceOrBuilder.java @@ -75,4 +75,28 @@ public interface AgentInterfaceOrBuilder extends */ com.google.protobuf.ByteString getTenantBytes(); + + /** + *
+   * The version of the A2A protocol this interface exposes.
+   * Use the latest supported minor version per major version.
+   * Examples: "0.3", "1.0"
+   * 
+ * + * string protocol_version = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return The protocolVersion. + */ + java.lang.String getProtocolVersion(); + /** + *
+   * The version of the A2A protocol this interface exposes.
+   * Use the latest supported minor version per major version.
+   * Examples: "0.3", "1.0"
+   * 
+ * + * string protocol_version = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for protocolVersion. + */ + com.google.protobuf.ByteString + getProtocolVersionBytes(); } diff --git a/spec-grpc/src/main/java/io/a2a/grpc/AgentSkill.java b/spec-grpc/src/main/java/io/a2a/grpc/AgentSkill.java index 19596fe14..087596019 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/AgentSkill.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/AgentSkill.java @@ -44,7 +44,7 @@ private AgentSkill() { com.google.protobuf.LazyStringArrayList.emptyList(); outputModes_ = com.google.protobuf.LazyStringArrayList.emptyList(); - security_ = java.util.Collections.emptyList(); + securityRequirements_ = java.util.Collections.emptyList(); } public static final com.google.protobuf.Descriptors.Descriptor @@ -413,70 +413,65 @@ public java.lang.String getOutputModes(int index) { return outputModes_.getByteString(index); } - public static final int SECURITY_FIELD_NUMBER = 8; + public static final int SECURITY_REQUIREMENTS_FIELD_NUMBER = 8; @SuppressWarnings("serial") - private java.util.List security_; + private java.util.List securityRequirements_; /** *
-   * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
    * Security schemes necessary for this skill.
    * 
* - * repeated .a2a.v1.Security security = 8; + * repeated .a2a.v1.SecurityRequirement security_requirements = 8; */ @java.lang.Override - public java.util.List getSecurityList() { - return security_; + public java.util.List getSecurityRequirementsList() { + return securityRequirements_; } /** *
-   * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
    * Security schemes necessary for this skill.
    * 
* - * repeated .a2a.v1.Security security = 8; + * repeated .a2a.v1.SecurityRequirement security_requirements = 8; */ @java.lang.Override - public java.util.List - getSecurityOrBuilderList() { - return security_; + public java.util.List + getSecurityRequirementsOrBuilderList() { + return securityRequirements_; } /** *
-   * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
    * Security schemes necessary for this skill.
    * 
* - * repeated .a2a.v1.Security security = 8; + * repeated .a2a.v1.SecurityRequirement security_requirements = 8; */ @java.lang.Override - public int getSecurityCount() { - return security_.size(); + public int getSecurityRequirementsCount() { + return securityRequirements_.size(); } /** *
-   * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
    * Security schemes necessary for this skill.
    * 
* - * repeated .a2a.v1.Security security = 8; + * repeated .a2a.v1.SecurityRequirement security_requirements = 8; */ @java.lang.Override - public io.a2a.grpc.Security getSecurity(int index) { - return security_.get(index); + public io.a2a.grpc.SecurityRequirement getSecurityRequirements(int index) { + return securityRequirements_.get(index); } /** *
-   * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
    * Security schemes necessary for this skill.
    * 
* - * repeated .a2a.v1.Security security = 8; + * repeated .a2a.v1.SecurityRequirement security_requirements = 8; */ @java.lang.Override - public io.a2a.grpc.SecurityOrBuilder getSecurityOrBuilder( + public io.a2a.grpc.SecurityRequirementOrBuilder getSecurityRequirementsOrBuilder( int index) { - return security_.get(index); + return securityRequirements_.get(index); } private byte memoizedIsInitialized = -1; @@ -514,8 +509,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < outputModes_.size(); i++) { com.google.protobuf.GeneratedMessage.writeString(output, 7, outputModes_.getRaw(i)); } - for (int i = 0; i < security_.size(); i++) { - output.writeMessage(8, security_.get(i)); + for (int i = 0; i < securityRequirements_.size(); i++) { + output.writeMessage(8, securityRequirements_.get(i)); } getUnknownFields().writeTo(output); } @@ -567,9 +562,9 @@ public int getSerializedSize() { size += dataSize; size += 1 * getOutputModesList().size(); } - for (int i = 0; i < security_.size(); i++) { + for (int i = 0; i < securityRequirements_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, security_.get(i)); + .computeMessageSize(8, securityRequirements_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -600,8 +595,8 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getInputModesList())) return false; if (!getOutputModesList() .equals(other.getOutputModesList())) return false; - if (!getSecurityList() - .equals(other.getSecurityList())) return false; + if (!getSecurityRequirementsList() + .equals(other.getSecurityRequirementsList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -635,9 +630,9 @@ public int hashCode() { hash = (37 * hash) + OUTPUT_MODES_FIELD_NUMBER; hash = (53 * hash) + getOutputModesList().hashCode(); } - if (getSecurityCount() > 0) { - hash = (37 * hash) + SECURITY_FIELD_NUMBER; - hash = (53 * hash) + getSecurityList().hashCode(); + if (getSecurityRequirementsCount() > 0) { + hash = (37 * hash) + SECURITY_REQUIREMENTS_FIELD_NUMBER; + hash = (53 * hash) + getSecurityRequirementsList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; @@ -786,11 +781,11 @@ public Builder clear() { com.google.protobuf.LazyStringArrayList.emptyList(); outputModes_ = com.google.protobuf.LazyStringArrayList.emptyList(); - if (securityBuilder_ == null) { - security_ = java.util.Collections.emptyList(); + if (securityRequirementsBuilder_ == null) { + securityRequirements_ = java.util.Collections.emptyList(); } else { - security_ = null; - securityBuilder_.clear(); + securityRequirements_ = null; + securityRequirementsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000080); return this; @@ -826,14 +821,14 @@ public io.a2a.grpc.AgentSkill buildPartial() { } private void buildPartialRepeatedFields(io.a2a.grpc.AgentSkill result) { - if (securityBuilder_ == null) { + if (securityRequirementsBuilder_ == null) { if (((bitField0_ & 0x00000080) != 0)) { - security_ = java.util.Collections.unmodifiableList(security_); + securityRequirements_ = java.util.Collections.unmodifiableList(securityRequirements_); bitField0_ = (bitField0_ & ~0x00000080); } - result.security_ = security_; + result.securityRequirements_ = securityRequirements_; } else { - result.security_ = securityBuilder_.build(); + result.securityRequirements_ = securityRequirementsBuilder_.build(); } } @@ -933,29 +928,29 @@ public Builder mergeFrom(io.a2a.grpc.AgentSkill other) { } onChanged(); } - if (securityBuilder_ == null) { - if (!other.security_.isEmpty()) { - if (security_.isEmpty()) { - security_ = other.security_; + if (securityRequirementsBuilder_ == null) { + if (!other.securityRequirements_.isEmpty()) { + if (securityRequirements_.isEmpty()) { + securityRequirements_ = other.securityRequirements_; bitField0_ = (bitField0_ & ~0x00000080); } else { - ensureSecurityIsMutable(); - security_.addAll(other.security_); + ensureSecurityRequirementsIsMutable(); + securityRequirements_.addAll(other.securityRequirements_); } onChanged(); } } else { - if (!other.security_.isEmpty()) { - if (securityBuilder_.isEmpty()) { - securityBuilder_.dispose(); - securityBuilder_ = null; - security_ = other.security_; + if (!other.securityRequirements_.isEmpty()) { + if (securityRequirementsBuilder_.isEmpty()) { + securityRequirementsBuilder_.dispose(); + securityRequirementsBuilder_ = null; + securityRequirements_ = other.securityRequirements_; bitField0_ = (bitField0_ & ~0x00000080); - securityBuilder_ = + securityRequirementsBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - internalGetSecurityFieldBuilder() : null; + internalGetSecurityRequirementsFieldBuilder() : null; } else { - securityBuilder_.addAllMessages(other.security_); + securityRequirementsBuilder_.addAllMessages(other.securityRequirements_); } } } @@ -1025,15 +1020,15 @@ public Builder mergeFrom( break; } // case 58 case 66: { - io.a2a.grpc.Security m = + io.a2a.grpc.SecurityRequirement m = input.readMessage( - io.a2a.grpc.Security.parser(), + io.a2a.grpc.SecurityRequirement.parser(), extensionRegistry); - if (securityBuilder_ == null) { - ensureSecurityIsMutable(); - security_.add(m); + if (securityRequirementsBuilder_ == null) { + ensureSecurityRequirementsIsMutable(); + securityRequirements_.add(m); } else { - securityBuilder_.addMessage(m); + securityRequirementsBuilder_.addMessage(m); } break; } // case 66 @@ -1918,334 +1913,316 @@ public Builder addOutputModesBytes( return this; } - private java.util.List security_ = + private java.util.List securityRequirements_ = java.util.Collections.emptyList(); - private void ensureSecurityIsMutable() { + private void ensureSecurityRequirementsIsMutable() { if (!((bitField0_ & 0x00000080) != 0)) { - security_ = new java.util.ArrayList(security_); + securityRequirements_ = new java.util.ArrayList(securityRequirements_); bitField0_ |= 0x00000080; } } private com.google.protobuf.RepeatedFieldBuilder< - io.a2a.grpc.Security, io.a2a.grpc.Security.Builder, io.a2a.grpc.SecurityOrBuilder> securityBuilder_; + io.a2a.grpc.SecurityRequirement, io.a2a.grpc.SecurityRequirement.Builder, io.a2a.grpc.SecurityRequirementOrBuilder> securityRequirementsBuilder_; /** *
-     * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
      * Security schemes necessary for this skill.
      * 
* - * repeated .a2a.v1.Security security = 8; + * repeated .a2a.v1.SecurityRequirement security_requirements = 8; */ - public java.util.List getSecurityList() { - if (securityBuilder_ == null) { - return java.util.Collections.unmodifiableList(security_); + public java.util.List getSecurityRequirementsList() { + if (securityRequirementsBuilder_ == null) { + return java.util.Collections.unmodifiableList(securityRequirements_); } else { - return securityBuilder_.getMessageList(); + return securityRequirementsBuilder_.getMessageList(); } } /** *
-     * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
      * Security schemes necessary for this skill.
      * 
* - * repeated .a2a.v1.Security security = 8; + * repeated .a2a.v1.SecurityRequirement security_requirements = 8; */ - public int getSecurityCount() { - if (securityBuilder_ == null) { - return security_.size(); + public int getSecurityRequirementsCount() { + if (securityRequirementsBuilder_ == null) { + return securityRequirements_.size(); } else { - return securityBuilder_.getCount(); + return securityRequirementsBuilder_.getCount(); } } /** *
-     * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
      * Security schemes necessary for this skill.
      * 
* - * repeated .a2a.v1.Security security = 8; + * repeated .a2a.v1.SecurityRequirement security_requirements = 8; */ - public io.a2a.grpc.Security getSecurity(int index) { - if (securityBuilder_ == null) { - return security_.get(index); + public io.a2a.grpc.SecurityRequirement getSecurityRequirements(int index) { + if (securityRequirementsBuilder_ == null) { + return securityRequirements_.get(index); } else { - return securityBuilder_.getMessage(index); + return securityRequirementsBuilder_.getMessage(index); } } /** *
-     * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
      * Security schemes necessary for this skill.
      * 
* - * repeated .a2a.v1.Security security = 8; + * repeated .a2a.v1.SecurityRequirement security_requirements = 8; */ - public Builder setSecurity( - int index, io.a2a.grpc.Security value) { - if (securityBuilder_ == null) { + public Builder setSecurityRequirements( + int index, io.a2a.grpc.SecurityRequirement value) { + if (securityRequirementsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureSecurityIsMutable(); - security_.set(index, value); + ensureSecurityRequirementsIsMutable(); + securityRequirements_.set(index, value); onChanged(); } else { - securityBuilder_.setMessage(index, value); + securityRequirementsBuilder_.setMessage(index, value); } return this; } /** *
-     * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
      * Security schemes necessary for this skill.
      * 
* - * repeated .a2a.v1.Security security = 8; + * repeated .a2a.v1.SecurityRequirement security_requirements = 8; */ - public Builder setSecurity( - int index, io.a2a.grpc.Security.Builder builderForValue) { - if (securityBuilder_ == null) { - ensureSecurityIsMutable(); - security_.set(index, builderForValue.build()); + public Builder setSecurityRequirements( + int index, io.a2a.grpc.SecurityRequirement.Builder builderForValue) { + if (securityRequirementsBuilder_ == null) { + ensureSecurityRequirementsIsMutable(); + securityRequirements_.set(index, builderForValue.build()); onChanged(); } else { - securityBuilder_.setMessage(index, builderForValue.build()); + securityRequirementsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
-     * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
      * Security schemes necessary for this skill.
      * 
* - * repeated .a2a.v1.Security security = 8; + * repeated .a2a.v1.SecurityRequirement security_requirements = 8; */ - public Builder addSecurity(io.a2a.grpc.Security value) { - if (securityBuilder_ == null) { + public Builder addSecurityRequirements(io.a2a.grpc.SecurityRequirement value) { + if (securityRequirementsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureSecurityIsMutable(); - security_.add(value); + ensureSecurityRequirementsIsMutable(); + securityRequirements_.add(value); onChanged(); } else { - securityBuilder_.addMessage(value); + securityRequirementsBuilder_.addMessage(value); } return this; } /** *
-     * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
      * Security schemes necessary for this skill.
      * 
* - * repeated .a2a.v1.Security security = 8; + * repeated .a2a.v1.SecurityRequirement security_requirements = 8; */ - public Builder addSecurity( - int index, io.a2a.grpc.Security value) { - if (securityBuilder_ == null) { + public Builder addSecurityRequirements( + int index, io.a2a.grpc.SecurityRequirement value) { + if (securityRequirementsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureSecurityIsMutable(); - security_.add(index, value); + ensureSecurityRequirementsIsMutable(); + securityRequirements_.add(index, value); onChanged(); } else { - securityBuilder_.addMessage(index, value); + securityRequirementsBuilder_.addMessage(index, value); } return this; } /** *
-     * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
      * Security schemes necessary for this skill.
      * 
* - * repeated .a2a.v1.Security security = 8; + * repeated .a2a.v1.SecurityRequirement security_requirements = 8; */ - public Builder addSecurity( - io.a2a.grpc.Security.Builder builderForValue) { - if (securityBuilder_ == null) { - ensureSecurityIsMutable(); - security_.add(builderForValue.build()); + public Builder addSecurityRequirements( + io.a2a.grpc.SecurityRequirement.Builder builderForValue) { + if (securityRequirementsBuilder_ == null) { + ensureSecurityRequirementsIsMutable(); + securityRequirements_.add(builderForValue.build()); onChanged(); } else { - securityBuilder_.addMessage(builderForValue.build()); + securityRequirementsBuilder_.addMessage(builderForValue.build()); } return this; } /** *
-     * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
      * Security schemes necessary for this skill.
      * 
* - * repeated .a2a.v1.Security security = 8; + * repeated .a2a.v1.SecurityRequirement security_requirements = 8; */ - public Builder addSecurity( - int index, io.a2a.grpc.Security.Builder builderForValue) { - if (securityBuilder_ == null) { - ensureSecurityIsMutable(); - security_.add(index, builderForValue.build()); + public Builder addSecurityRequirements( + int index, io.a2a.grpc.SecurityRequirement.Builder builderForValue) { + if (securityRequirementsBuilder_ == null) { + ensureSecurityRequirementsIsMutable(); + securityRequirements_.add(index, builderForValue.build()); onChanged(); } else { - securityBuilder_.addMessage(index, builderForValue.build()); + securityRequirementsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
-     * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
      * Security schemes necessary for this skill.
      * 
* - * repeated .a2a.v1.Security security = 8; + * repeated .a2a.v1.SecurityRequirement security_requirements = 8; */ - public Builder addAllSecurity( - java.lang.Iterable values) { - if (securityBuilder_ == null) { - ensureSecurityIsMutable(); + public Builder addAllSecurityRequirements( + java.lang.Iterable values) { + if (securityRequirementsBuilder_ == null) { + ensureSecurityRequirementsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, security_); + values, securityRequirements_); onChanged(); } else { - securityBuilder_.addAllMessages(values); + securityRequirementsBuilder_.addAllMessages(values); } return this; } /** *
-     * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
      * Security schemes necessary for this skill.
      * 
* - * repeated .a2a.v1.Security security = 8; + * repeated .a2a.v1.SecurityRequirement security_requirements = 8; */ - public Builder clearSecurity() { - if (securityBuilder_ == null) { - security_ = java.util.Collections.emptyList(); + public Builder clearSecurityRequirements() { + if (securityRequirementsBuilder_ == null) { + securityRequirements_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000080); onChanged(); } else { - securityBuilder_.clear(); + securityRequirementsBuilder_.clear(); } return this; } /** *
-     * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
      * Security schemes necessary for this skill.
      * 
* - * repeated .a2a.v1.Security security = 8; + * repeated .a2a.v1.SecurityRequirement security_requirements = 8; */ - public Builder removeSecurity(int index) { - if (securityBuilder_ == null) { - ensureSecurityIsMutable(); - security_.remove(index); + public Builder removeSecurityRequirements(int index) { + if (securityRequirementsBuilder_ == null) { + ensureSecurityRequirementsIsMutable(); + securityRequirements_.remove(index); onChanged(); } else { - securityBuilder_.remove(index); + securityRequirementsBuilder_.remove(index); } return this; } /** *
-     * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
      * Security schemes necessary for this skill.
      * 
* - * repeated .a2a.v1.Security security = 8; + * repeated .a2a.v1.SecurityRequirement security_requirements = 8; */ - public io.a2a.grpc.Security.Builder getSecurityBuilder( + public io.a2a.grpc.SecurityRequirement.Builder getSecurityRequirementsBuilder( int index) { - return internalGetSecurityFieldBuilder().getBuilder(index); + return internalGetSecurityRequirementsFieldBuilder().getBuilder(index); } /** *
-     * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
      * Security schemes necessary for this skill.
      * 
* - * repeated .a2a.v1.Security security = 8; + * repeated .a2a.v1.SecurityRequirement security_requirements = 8; */ - public io.a2a.grpc.SecurityOrBuilder getSecurityOrBuilder( + public io.a2a.grpc.SecurityRequirementOrBuilder getSecurityRequirementsOrBuilder( int index) { - if (securityBuilder_ == null) { - return security_.get(index); } else { - return securityBuilder_.getMessageOrBuilder(index); + if (securityRequirementsBuilder_ == null) { + return securityRequirements_.get(index); } else { + return securityRequirementsBuilder_.getMessageOrBuilder(index); } } /** *
-     * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
      * Security schemes necessary for this skill.
      * 
* - * repeated .a2a.v1.Security security = 8; + * repeated .a2a.v1.SecurityRequirement security_requirements = 8; */ - public java.util.List - getSecurityOrBuilderList() { - if (securityBuilder_ != null) { - return securityBuilder_.getMessageOrBuilderList(); + public java.util.List + getSecurityRequirementsOrBuilderList() { + if (securityRequirementsBuilder_ != null) { + return securityRequirementsBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(security_); + return java.util.Collections.unmodifiableList(securityRequirements_); } } /** *
-     * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
      * Security schemes necessary for this skill.
      * 
* - * repeated .a2a.v1.Security security = 8; + * repeated .a2a.v1.SecurityRequirement security_requirements = 8; */ - public io.a2a.grpc.Security.Builder addSecurityBuilder() { - return internalGetSecurityFieldBuilder().addBuilder( - io.a2a.grpc.Security.getDefaultInstance()); + public io.a2a.grpc.SecurityRequirement.Builder addSecurityRequirementsBuilder() { + return internalGetSecurityRequirementsFieldBuilder().addBuilder( + io.a2a.grpc.SecurityRequirement.getDefaultInstance()); } /** *
-     * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
      * Security schemes necessary for this skill.
      * 
* - * repeated .a2a.v1.Security security = 8; + * repeated .a2a.v1.SecurityRequirement security_requirements = 8; */ - public io.a2a.grpc.Security.Builder addSecurityBuilder( + public io.a2a.grpc.SecurityRequirement.Builder addSecurityRequirementsBuilder( int index) { - return internalGetSecurityFieldBuilder().addBuilder( - index, io.a2a.grpc.Security.getDefaultInstance()); + return internalGetSecurityRequirementsFieldBuilder().addBuilder( + index, io.a2a.grpc.SecurityRequirement.getDefaultInstance()); } /** *
-     * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
      * Security schemes necessary for this skill.
      * 
* - * repeated .a2a.v1.Security security = 8; + * repeated .a2a.v1.SecurityRequirement security_requirements = 8; */ - public java.util.List - getSecurityBuilderList() { - return internalGetSecurityFieldBuilder().getBuilderList(); + public java.util.List + getSecurityRequirementsBuilderList() { + return internalGetSecurityRequirementsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilder< - io.a2a.grpc.Security, io.a2a.grpc.Security.Builder, io.a2a.grpc.SecurityOrBuilder> - internalGetSecurityFieldBuilder() { - if (securityBuilder_ == null) { - securityBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - io.a2a.grpc.Security, io.a2a.grpc.Security.Builder, io.a2a.grpc.SecurityOrBuilder>( - security_, + io.a2a.grpc.SecurityRequirement, io.a2a.grpc.SecurityRequirement.Builder, io.a2a.grpc.SecurityRequirementOrBuilder> + internalGetSecurityRequirementsFieldBuilder() { + if (securityRequirementsBuilder_ == null) { + securityRequirementsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< + io.a2a.grpc.SecurityRequirement, io.a2a.grpc.SecurityRequirement.Builder, io.a2a.grpc.SecurityRequirementOrBuilder>( + securityRequirements_, ((bitField0_ & 0x00000080) != 0), getParentForChildren(), isClean()); - security_ = null; + securityRequirements_ = null; } - return securityBuilder_; + return securityRequirementsBuilder_; } // @@protoc_insertion_point(builder_scope:a2a.v1.AgentSkill) diff --git a/spec-grpc/src/main/java/io/a2a/grpc/AgentSkillOrBuilder.java b/spec-grpc/src/main/java/io/a2a/grpc/AgentSkillOrBuilder.java index c9615febc..8cb65a6c5 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/AgentSkillOrBuilder.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/AgentSkillOrBuilder.java @@ -236,50 +236,45 @@ public interface AgentSkillOrBuilder extends /** *
-   * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
    * Security schemes necessary for this skill.
    * 
* - * repeated .a2a.v1.Security security = 8; + * repeated .a2a.v1.SecurityRequirement security_requirements = 8; */ - java.util.List - getSecurityList(); + java.util.List + getSecurityRequirementsList(); /** *
-   * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
    * Security schemes necessary for this skill.
    * 
* - * repeated .a2a.v1.Security security = 8; + * repeated .a2a.v1.SecurityRequirement security_requirements = 8; */ - io.a2a.grpc.Security getSecurity(int index); + io.a2a.grpc.SecurityRequirement getSecurityRequirements(int index); /** *
-   * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
    * Security schemes necessary for this skill.
    * 
* - * repeated .a2a.v1.Security security = 8; + * repeated .a2a.v1.SecurityRequirement security_requirements = 8; */ - int getSecurityCount(); + int getSecurityRequirementsCount(); /** *
-   * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
    * Security schemes necessary for this skill.
    * 
* - * repeated .a2a.v1.Security security = 8; + * repeated .a2a.v1.SecurityRequirement security_requirements = 8; */ - java.util.List - getSecurityOrBuilderList(); + java.util.List + getSecurityRequirementsOrBuilderList(); /** *
-   * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
    * Security schemes necessary for this skill.
    * 
* - * repeated .a2a.v1.Security security = 8; + * repeated .a2a.v1.SecurityRequirement security_requirements = 8; */ - io.a2a.grpc.SecurityOrBuilder getSecurityOrBuilder( + io.a2a.grpc.SecurityRequirementOrBuilder getSecurityRequirementsOrBuilder( int index); } diff --git a/spec-grpc/src/main/java/io/a2a/grpc/AuthenticationInfo.java b/spec-grpc/src/main/java/io/a2a/grpc/AuthenticationInfo.java index 38b9e065c..703a6da52 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/AuthenticationInfo.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/AuthenticationInfo.java @@ -33,8 +33,7 @@ private AuthenticationInfo(com.google.protobuf.GeneratedMessage.Builder build super(builder); } private AuthenticationInfo() { - schemes_ = - com.google.protobuf.LazyStringArrayList.emptyList(); + scheme_ = ""; credentials_ = ""; } @@ -51,57 +50,53 @@ private AuthenticationInfo() { io.a2a.grpc.AuthenticationInfo.class, io.a2a.grpc.AuthenticationInfo.Builder.class); } - public static final int SCHEMES_FIELD_NUMBER = 1; + public static final int SCHEME_FIELD_NUMBER = 1; @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList schemes_ = - com.google.protobuf.LazyStringArrayList.emptyList(); + private volatile java.lang.Object scheme_ = ""; /** *
-   * A list of supported authentication schemes (e.g., 'Basic', 'Bearer').
+   * HTTP Authentication Scheme from the [IANA registry](https://www.iana.org/assignments/http-authschemes/).
+   * Common values: `Bearer`, `Basic`, `Digest`. Scheme names are case-insensitive per [RFC 9110 Section 11.1](https://www.rfc-editor.org/rfc/rfc9110#section-11.1).
    * 
* - * repeated string schemes = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return A list containing the schemes. + * string scheme = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The scheme. */ - public com.google.protobuf.ProtocolStringList - getSchemesList() { - return schemes_; - } - /** - *
-   * A list of supported authentication schemes (e.g., 'Basic', 'Bearer').
-   * 
- * - * repeated string schemes = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The count of schemes. - */ - public int getSchemesCount() { - return schemes_.size(); - } - /** - *
-   * A list of supported authentication schemes (e.g., 'Basic', 'Bearer').
-   * 
- * - * repeated string schemes = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param index The index of the element to return. - * @return The schemes at the given index. - */ - public java.lang.String getSchemes(int index) { - return schemes_.get(index); + @java.lang.Override + public java.lang.String getScheme() { + java.lang.Object ref = scheme_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + scheme_ = s; + return s; + } } /** *
-   * A list of supported authentication schemes (e.g., 'Basic', 'Bearer').
+   * HTTP Authentication Scheme from the [IANA registry](https://www.iana.org/assignments/http-authschemes/).
+   * Common values: `Bearer`, `Basic`, `Digest`. Scheme names are case-insensitive per [RFC 9110 Section 11.1](https://www.rfc-editor.org/rfc/rfc9110#section-11.1).
    * 
* - * repeated string schemes = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param index The index of the value to return. - * @return The bytes of the schemes at the given index. + * string scheme = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for scheme. */ + @java.lang.Override public com.google.protobuf.ByteString - getSchemesBytes(int index) { - return schemes_.getByteString(index); + getSchemeBytes() { + java.lang.Object ref = scheme_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + scheme_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } public static final int CREDENTIALS_FIELD_NUMBER = 2; @@ -109,7 +104,7 @@ public java.lang.String getSchemes(int index) { private volatile java.lang.Object credentials_ = ""; /** *
-   * Optional credentials
+   * Push Notification credentials. Format depends on the scheme (e.g., token for Bearer).
    * 
* * string credentials = 2; @@ -130,7 +125,7 @@ public java.lang.String getCredentials() { } /** *
-   * Optional credentials
+   * Push Notification credentials. Format depends on the scheme (e.g., token for Bearer).
    * 
* * string credentials = 2; @@ -165,8 +160,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < schemes_.size(); i++) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, schemes_.getRaw(i)); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(scheme_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, scheme_); } if (!com.google.protobuf.GeneratedMessage.isStringEmpty(credentials_)) { com.google.protobuf.GeneratedMessage.writeString(output, 2, credentials_); @@ -180,13 +175,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - { - int dataSize = 0; - for (int i = 0; i < schemes_.size(); i++) { - dataSize += computeStringSizeNoTag(schemes_.getRaw(i)); - } - size += dataSize; - size += 1 * getSchemesList().size(); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(scheme_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, scheme_); } if (!com.google.protobuf.GeneratedMessage.isStringEmpty(credentials_)) { size += com.google.protobuf.GeneratedMessage.computeStringSize(2, credentials_); @@ -206,8 +196,8 @@ public boolean equals(final java.lang.Object obj) { } io.a2a.grpc.AuthenticationInfo other = (io.a2a.grpc.AuthenticationInfo) obj; - if (!getSchemesList() - .equals(other.getSchemesList())) return false; + if (!getScheme() + .equals(other.getScheme())) return false; if (!getCredentials() .equals(other.getCredentials())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; @@ -221,10 +211,8 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (getSchemesCount() > 0) { - hash = (37 * hash) + SCHEMES_FIELD_NUMBER; - hash = (53 * hash) + getSchemesList().hashCode(); - } + hash = (37 * hash) + SCHEME_FIELD_NUMBER; + hash = (53 * hash) + getScheme().hashCode(); hash = (37 * hash) + CREDENTIALS_FIELD_NUMBER; hash = (53 * hash) + getCredentials().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); @@ -363,8 +351,7 @@ private Builder( public Builder clear() { super.clear(); bitField0_ = 0; - schemes_ = - com.google.protobuf.LazyStringArrayList.emptyList(); + scheme_ = ""; credentials_ = ""; return this; } @@ -400,8 +387,7 @@ public io.a2a.grpc.AuthenticationInfo buildPartial() { private void buildPartial0(io.a2a.grpc.AuthenticationInfo result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { - schemes_.makeImmutable(); - result.schemes_ = schemes_; + result.scheme_ = scheme_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.credentials_ = credentials_; @@ -420,14 +406,9 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(io.a2a.grpc.AuthenticationInfo other) { if (other == io.a2a.grpc.AuthenticationInfo.getDefaultInstance()) return this; - if (!other.schemes_.isEmpty()) { - if (schemes_.isEmpty()) { - schemes_ = other.schemes_; - bitField0_ |= 0x00000001; - } else { - ensureSchemesIsMutable(); - schemes_.addAll(other.schemes_); - } + if (!other.getScheme().isEmpty()) { + scheme_ = other.scheme_; + bitField0_ |= 0x00000001; onChanged(); } if (!other.getCredentials().isEmpty()) { @@ -462,9 +443,8 @@ public Builder mergeFrom( done = true; break; case 10: { - java.lang.String s = input.readStringRequireUtf8(); - ensureSchemesIsMutable(); - schemes_.add(s); + scheme_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; break; } // case 10 case 18: { @@ -489,148 +469,98 @@ public Builder mergeFrom( } private int bitField0_; - private com.google.protobuf.LazyStringArrayList schemes_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - private void ensureSchemesIsMutable() { - if (!schemes_.isModifiable()) { - schemes_ = new com.google.protobuf.LazyStringArrayList(schemes_); - } - bitField0_ |= 0x00000001; - } - /** - *
-     * A list of supported authentication schemes (e.g., 'Basic', 'Bearer').
-     * 
- * - * repeated string schemes = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return A list containing the schemes. - */ - public com.google.protobuf.ProtocolStringList - getSchemesList() { - schemes_.makeImmutable(); - return schemes_; - } - /** - *
-     * A list of supported authentication schemes (e.g., 'Basic', 'Bearer').
-     * 
- * - * repeated string schemes = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The count of schemes. - */ - public int getSchemesCount() { - return schemes_.size(); - } + private java.lang.Object scheme_ = ""; /** *
-     * A list of supported authentication schemes (e.g., 'Basic', 'Bearer').
+     * HTTP Authentication Scheme from the [IANA registry](https://www.iana.org/assignments/http-authschemes/).
+     * Common values: `Bearer`, `Basic`, `Digest`. Scheme names are case-insensitive per [RFC 9110 Section 11.1](https://www.rfc-editor.org/rfc/rfc9110#section-11.1).
      * 
* - * repeated string schemes = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param index The index of the element to return. - * @return The schemes at the given index. + * string scheme = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The scheme. */ - public java.lang.String getSchemes(int index) { - return schemes_.get(index); + public java.lang.String getScheme() { + java.lang.Object ref = scheme_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + scheme_ = s; + return s; + } else { + return (java.lang.String) ref; + } } /** *
-     * A list of supported authentication schemes (e.g., 'Basic', 'Bearer').
+     * HTTP Authentication Scheme from the [IANA registry](https://www.iana.org/assignments/http-authschemes/).
+     * Common values: `Bearer`, `Basic`, `Digest`. Scheme names are case-insensitive per [RFC 9110 Section 11.1](https://www.rfc-editor.org/rfc/rfc9110#section-11.1).
      * 
* - * repeated string schemes = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param index The index of the value to return. - * @return The bytes of the schemes at the given index. + * string scheme = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for scheme. */ public com.google.protobuf.ByteString - getSchemesBytes(int index) { - return schemes_.getByteString(index); - } - /** - *
-     * A list of supported authentication schemes (e.g., 'Basic', 'Bearer').
-     * 
- * - * repeated string schemes = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param index The index to set the value at. - * @param value The schemes to set. - * @return This builder for chaining. - */ - public Builder setSchemes( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureSchemesIsMutable(); - schemes_.set(index, value); - bitField0_ |= 0x00000001; - onChanged(); - return this; + getSchemeBytes() { + java.lang.Object ref = scheme_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + scheme_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } /** *
-     * A list of supported authentication schemes (e.g., 'Basic', 'Bearer').
+     * HTTP Authentication Scheme from the [IANA registry](https://www.iana.org/assignments/http-authschemes/).
+     * Common values: `Bearer`, `Basic`, `Digest`. Scheme names are case-insensitive per [RFC 9110 Section 11.1](https://www.rfc-editor.org/rfc/rfc9110#section-11.1).
      * 
* - * repeated string schemes = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The schemes to add. + * string scheme = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The scheme to set. * @return This builder for chaining. */ - public Builder addSchemes( + public Builder setScheme( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - ensureSchemesIsMutable(); - schemes_.add(value); - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * A list of supported authentication schemes (e.g., 'Basic', 'Bearer').
-     * 
- * - * repeated string schemes = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param values The schemes to add. - * @return This builder for chaining. - */ - public Builder addAllSchemes( - java.lang.Iterable values) { - ensureSchemesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, schemes_); + scheme_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** *
-     * A list of supported authentication schemes (e.g., 'Basic', 'Bearer').
+     * HTTP Authentication Scheme from the [IANA registry](https://www.iana.org/assignments/http-authschemes/).
+     * Common values: `Bearer`, `Basic`, `Digest`. Scheme names are case-insensitive per [RFC 9110 Section 11.1](https://www.rfc-editor.org/rfc/rfc9110#section-11.1).
      * 
* - * repeated string schemes = 1 [(.google.api.field_behavior) = REQUIRED]; + * string scheme = 1 [(.google.api.field_behavior) = REQUIRED]; * @return This builder for chaining. */ - public Builder clearSchemes() { - schemes_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001);; + public Builder clearScheme() { + scheme_ = getDefaultInstance().getScheme(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** *
-     * A list of supported authentication schemes (e.g., 'Basic', 'Bearer').
+     * HTTP Authentication Scheme from the [IANA registry](https://www.iana.org/assignments/http-authschemes/).
+     * Common values: `Bearer`, `Basic`, `Digest`. Scheme names are case-insensitive per [RFC 9110 Section 11.1](https://www.rfc-editor.org/rfc/rfc9110#section-11.1).
      * 
* - * repeated string schemes = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes of the schemes to add. + * string scheme = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for scheme to set. * @return This builder for chaining. */ - public Builder addSchemesBytes( + public Builder setSchemeBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - ensureSchemesIsMutable(); - schemes_.add(value); + scheme_ = value; bitField0_ |= 0x00000001; onChanged(); return this; @@ -639,7 +569,7 @@ public Builder addSchemesBytes( private java.lang.Object credentials_ = ""; /** *
-     * Optional credentials
+     * Push Notification credentials. Format depends on the scheme (e.g., token for Bearer).
      * 
* * string credentials = 2; @@ -659,7 +589,7 @@ public java.lang.String getCredentials() { } /** *
-     * Optional credentials
+     * Push Notification credentials. Format depends on the scheme (e.g., token for Bearer).
      * 
* * string credentials = 2; @@ -680,7 +610,7 @@ public java.lang.String getCredentials() { } /** *
-     * Optional credentials
+     * Push Notification credentials. Format depends on the scheme (e.g., token for Bearer).
      * 
* * string credentials = 2; @@ -697,7 +627,7 @@ public Builder setCredentials( } /** *
-     * Optional credentials
+     * Push Notification credentials. Format depends on the scheme (e.g., token for Bearer).
      * 
* * string credentials = 2; @@ -711,7 +641,7 @@ public Builder clearCredentials() { } /** *
-     * Optional credentials
+     * Push Notification credentials. Format depends on the scheme (e.g., token for Bearer).
      * 
* * string credentials = 2; diff --git a/spec-grpc/src/main/java/io/a2a/grpc/AuthenticationInfoOrBuilder.java b/spec-grpc/src/main/java/io/a2a/grpc/AuthenticationInfoOrBuilder.java index 37c96ed29..b142c3670 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/AuthenticationInfoOrBuilder.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/AuthenticationInfoOrBuilder.java @@ -12,48 +12,29 @@ public interface AuthenticationInfoOrBuilder extends /** *
-   * A list of supported authentication schemes (e.g., 'Basic', 'Bearer').
+   * HTTP Authentication Scheme from the [IANA registry](https://www.iana.org/assignments/http-authschemes/).
+   * Common values: `Bearer`, `Basic`, `Digest`. Scheme names are case-insensitive per [RFC 9110 Section 11.1](https://www.rfc-editor.org/rfc/rfc9110#section-11.1).
    * 
* - * repeated string schemes = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return A list containing the schemes. + * string scheme = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The scheme. */ - java.util.List - getSchemesList(); + java.lang.String getScheme(); /** *
-   * A list of supported authentication schemes (e.g., 'Basic', 'Bearer').
+   * HTTP Authentication Scheme from the [IANA registry](https://www.iana.org/assignments/http-authschemes/).
+   * Common values: `Bearer`, `Basic`, `Digest`. Scheme names are case-insensitive per [RFC 9110 Section 11.1](https://www.rfc-editor.org/rfc/rfc9110#section-11.1).
    * 
* - * repeated string schemes = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The count of schemes. - */ - int getSchemesCount(); - /** - *
-   * A list of supported authentication schemes (e.g., 'Basic', 'Bearer').
-   * 
- * - * repeated string schemes = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param index The index of the element to return. - * @return The schemes at the given index. - */ - java.lang.String getSchemes(int index); - /** - *
-   * A list of supported authentication schemes (e.g., 'Basic', 'Bearer').
-   * 
- * - * repeated string schemes = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param index The index of the value to return. - * @return The bytes of the schemes at the given index. + * string scheme = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for scheme. */ com.google.protobuf.ByteString - getSchemesBytes(int index); + getSchemeBytes(); /** *
-   * Optional credentials
+   * Push Notification credentials. Format depends on the scheme (e.g., token for Bearer).
    * 
* * string credentials = 2; @@ -62,7 +43,7 @@ public interface AuthenticationInfoOrBuilder extends java.lang.String getCredentials(); /** *
-   * Optional credentials
+   * Push Notification credentials. Format depends on the scheme (e.g., token for Bearer).
    * 
* * string credentials = 2; diff --git a/spec-grpc/src/main/java/io/a2a/grpc/CancelTaskRequest.java b/spec-grpc/src/main/java/io/a2a/grpc/CancelTaskRequest.java index cb1e12880..3aa57435f 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/CancelTaskRequest.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/CancelTaskRequest.java @@ -34,7 +34,7 @@ private CancelTaskRequest(com.google.protobuf.GeneratedMessage.Builder builde } private CancelTaskRequest() { tenant_ = ""; - name_ = ""; + id_ = ""; } public static final com.google.protobuf.Descriptors.Descriptor @@ -97,49 +97,47 @@ public java.lang.String getTenant() { } } - public static final int NAME_FIELD_NUMBER = 1; + public static final int ID_FIELD_NUMBER = 1; @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; + private volatile java.lang.Object id_ = ""; /** *
-   * The resource name of the task to cancel.
-   * Format: tasks/{task_id}
+   * The resource id of the task to cancel.
    * 
* - * string name = 1; - * @return The name. + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The id. */ @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; + public java.lang.String getId() { + java.lang.Object ref = id_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - name_ = s; + id_ = s; return s; } } /** *
-   * The resource name of the task to cancel.
-   * Format: tasks/{task_id}
+   * The resource id of the task to cancel.
    * 
* - * string name = 1; - * @return The bytes for name. + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for id. */ @java.lang.Override public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; + getIdBytes() { + java.lang.Object ref = id_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - name_ = b; + id_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -160,8 +158,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, id_); } if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tenant_)) { com.google.protobuf.GeneratedMessage.writeString(output, 2, tenant_); @@ -175,8 +173,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, id_); } if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tenant_)) { size += com.google.protobuf.GeneratedMessage.computeStringSize(2, tenant_); @@ -198,8 +196,8 @@ public boolean equals(final java.lang.Object obj) { if (!getTenant() .equals(other.getTenant())) return false; - if (!getName() - .equals(other.getName())) return false; + if (!getId() + .equals(other.getId())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -213,8 +211,8 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + TENANT_FIELD_NUMBER; hash = (53 * hash) + getTenant().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -352,7 +350,7 @@ public Builder clear() { super.clear(); bitField0_ = 0; tenant_ = ""; - name_ = ""; + id_ = ""; return this; } @@ -390,7 +388,7 @@ private void buildPartial0(io.a2a.grpc.CancelTaskRequest result) { result.tenant_ = tenant_; } if (((from_bitField0_ & 0x00000002) != 0)) { - result.name_ = name_; + result.id_ = id_; } } @@ -411,8 +409,8 @@ public Builder mergeFrom(io.a2a.grpc.CancelTaskRequest other) { bitField0_ |= 0x00000001; onChanged(); } - if (!other.getName().isEmpty()) { - name_ = other.name_; + if (!other.getId().isEmpty()) { + id_ = other.id_; bitField0_ |= 0x00000002; onChanged(); } @@ -443,7 +441,7 @@ public Builder mergeFrom( done = true; break; case 10: { - name_ = input.readStringRequireUtf8(); + id_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 10 @@ -561,23 +559,22 @@ public Builder setTenantBytes( return this; } - private java.lang.Object name_ = ""; + private java.lang.Object id_ = ""; /** *
-     * The resource name of the task to cancel.
-     * Format: tasks/{task_id}
+     * The resource id of the task to cancel.
      * 
* - * string name = 1; - * @return The name. + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The id. */ - public java.lang.String getName() { - java.lang.Object ref = name_; + public java.lang.String getId() { + java.lang.Object ref = id_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - name_ = s; + id_ = s; return s; } else { return (java.lang.String) ref; @@ -585,21 +582,20 @@ public java.lang.String getName() { } /** *
-     * The resource name of the task to cancel.
-     * Format: tasks/{task_id}
+     * The resource id of the task to cancel.
      * 
* - * string name = 1; - * @return The bytes for name. + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for id. */ public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; + getIdBytes() { + java.lang.Object ref = id_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - name_ = b; + id_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -607,52 +603,49 @@ public java.lang.String getName() { } /** *
-     * The resource name of the task to cancel.
-     * Format: tasks/{task_id}
+     * The resource id of the task to cancel.
      * 
* - * string name = 1; - * @param value The name to set. + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The id to set. * @return This builder for chaining. */ - public Builder setName( + public Builder setId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - name_ = value; + id_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** *
-     * The resource name of the task to cancel.
-     * Format: tasks/{task_id}
+     * The resource id of the task to cancel.
      * 
* - * string name = 1; + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; * @return This builder for chaining. */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); + public Builder clearId() { + id_ = getDefaultInstance().getId(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** *
-     * The resource name of the task to cancel.
-     * Format: tasks/{task_id}
+     * The resource id of the task to cancel.
      * 
* - * string name = 1; - * @param value The bytes for name to set. + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for id to set. * @return This builder for chaining. */ - public Builder setNameBytes( + public Builder setIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - name_ = value; + id_ = value; bitField0_ |= 0x00000002; onChanged(); return this; diff --git a/spec-grpc/src/main/java/io/a2a/grpc/CancelTaskRequestOrBuilder.java b/spec-grpc/src/main/java/io/a2a/grpc/CancelTaskRequestOrBuilder.java index b8a5e4f11..1e3251328 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/CancelTaskRequestOrBuilder.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/CancelTaskRequestOrBuilder.java @@ -32,23 +32,21 @@ public interface CancelTaskRequestOrBuilder extends /** *
-   * The resource name of the task to cancel.
-   * Format: tasks/{task_id}
+   * The resource id of the task to cancel.
    * 
* - * string name = 1; - * @return The name. + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The id. */ - java.lang.String getName(); + java.lang.String getId(); /** *
-   * The resource name of the task to cancel.
-   * Format: tasks/{task_id}
+   * The resource id of the task to cancel.
    * 
* - * string name = 1; - * @return The bytes for name. + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for id. */ com.google.protobuf.ByteString - getNameBytes(); + getIdBytes(); } diff --git a/spec-grpc/src/main/java/io/a2a/grpc/CreateTaskPushNotificationConfigRequest.java b/spec-grpc/src/main/java/io/a2a/grpc/CreateTaskPushNotificationConfigRequest.java index 5f8143cb3..f445a86d2 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/CreateTaskPushNotificationConfigRequest.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/CreateTaskPushNotificationConfigRequest.java @@ -34,7 +34,7 @@ private CreateTaskPushNotificationConfigRequest(com.google.protobuf.GeneratedMes } private CreateTaskPushNotificationConfigRequest() { tenant_ = ""; - parent_ = ""; + taskId_ = ""; configId_ = ""; } @@ -99,49 +99,47 @@ public java.lang.String getTenant() { } } - public static final int PARENT_FIELD_NUMBER = 1; + public static final int TASK_ID_FIELD_NUMBER = 1; @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; + private volatile java.lang.Object taskId_ = ""; /** *
-   * The parent task resource for this config.
-   * Format: tasks/{task_id}
+   * The parent task resource id.
    * 
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The parent. + * string task_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The taskId. */ @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; + public java.lang.String getTaskId() { + java.lang.Object ref = taskId_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - parent_ = s; + taskId_ = s; return s; } } /** *
-   * The parent task resource for this config.
-   * Format: tasks/{task_id}
+   * The parent task resource id.
    * 
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for parent. + * string task_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for taskId. */ @java.lang.Override public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; + getTaskIdBytes() { + java.lang.Object ref = taskId_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - parent_ = b; + taskId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -195,14 +193,14 @@ public java.lang.String getConfigId() { } } - public static final int CONFIG_FIELD_NUMBER = 3; - private io.a2a.grpc.TaskPushNotificationConfig config_; + public static final int CONFIG_FIELD_NUMBER = 5; + private io.a2a.grpc.PushNotificationConfig config_; /** *
    * The configuration to create.
    * 
* - * .a2a.v1.TaskPushNotificationConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; + * .a2a.v1.PushNotificationConfig config = 5 [(.google.api.field_behavior) = REQUIRED]; * @return Whether the config field is set. */ @java.lang.Override @@ -214,23 +212,23 @@ public boolean hasConfig() { * The configuration to create. *
* - * .a2a.v1.TaskPushNotificationConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; + * .a2a.v1.PushNotificationConfig config = 5 [(.google.api.field_behavior) = REQUIRED]; * @return The config. */ @java.lang.Override - public io.a2a.grpc.TaskPushNotificationConfig getConfig() { - return config_ == null ? io.a2a.grpc.TaskPushNotificationConfig.getDefaultInstance() : config_; + public io.a2a.grpc.PushNotificationConfig getConfig() { + return config_ == null ? io.a2a.grpc.PushNotificationConfig.getDefaultInstance() : config_; } /** *
    * The configuration to create.
    * 
* - * .a2a.v1.TaskPushNotificationConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; + * .a2a.v1.PushNotificationConfig config = 5 [(.google.api.field_behavior) = REQUIRED]; */ @java.lang.Override - public io.a2a.grpc.TaskPushNotificationConfigOrBuilder getConfigOrBuilder() { - return config_ == null ? io.a2a.grpc.TaskPushNotificationConfig.getDefaultInstance() : config_; + public io.a2a.grpc.PushNotificationConfigOrBuilder getConfigOrBuilder() { + return config_ == null ? io.a2a.grpc.PushNotificationConfig.getDefaultInstance() : config_; } private byte memoizedIsInitialized = -1; @@ -247,18 +245,18 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(taskId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, taskId_); } if (!com.google.protobuf.GeneratedMessage.isStringEmpty(configId_)) { com.google.protobuf.GeneratedMessage.writeString(output, 2, configId_); } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(3, getConfig()); - } if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tenant_)) { com.google.protobuf.GeneratedMessage.writeString(output, 4, tenant_); } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(5, getConfig()); + } getUnknownFields().writeTo(output); } @@ -268,19 +266,19 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(taskId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, taskId_); } if (!com.google.protobuf.GeneratedMessage.isStringEmpty(configId_)) { size += com.google.protobuf.GeneratedMessage.computeStringSize(2, configId_); } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getConfig()); - } if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tenant_)) { size += com.google.protobuf.GeneratedMessage.computeStringSize(4, tenant_); } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getConfig()); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -298,8 +296,8 @@ public boolean equals(final java.lang.Object obj) { if (!getTenant() .equals(other.getTenant())) return false; - if (!getParent() - .equals(other.getParent())) return false; + if (!getTaskId() + .equals(other.getTaskId())) return false; if (!getConfigId() .equals(other.getConfigId())) return false; if (hasConfig() != other.hasConfig()) return false; @@ -320,8 +318,8 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + TENANT_FIELD_NUMBER; hash = (53 * hash) + getTenant().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + TASK_ID_FIELD_NUMBER; + hash = (53 * hash) + getTaskId().hashCode(); hash = (37 * hash) + CONFIG_ID_FIELD_NUMBER; hash = (53 * hash) + getConfigId().hashCode(); if (hasConfig()) { @@ -471,7 +469,7 @@ public Builder clear() { super.clear(); bitField0_ = 0; tenant_ = ""; - parent_ = ""; + taskId_ = ""; configId_ = ""; config_ = null; if (configBuilder_ != null) { @@ -515,7 +513,7 @@ private void buildPartial0(io.a2a.grpc.CreateTaskPushNotificationConfigRequest r result.tenant_ = tenant_; } if (((from_bitField0_ & 0x00000002) != 0)) { - result.parent_ = parent_; + result.taskId_ = taskId_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.configId_ = configId_; @@ -547,8 +545,8 @@ public Builder mergeFrom(io.a2a.grpc.CreateTaskPushNotificationConfigRequest oth bitField0_ |= 0x00000001; onChanged(); } - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; + if (!other.getTaskId().isEmpty()) { + taskId_ = other.taskId_; bitField0_ |= 0x00000002; onChanged(); } @@ -587,7 +585,7 @@ public Builder mergeFrom( done = true; break; case 10: { - parent_ = input.readStringRequireUtf8(); + taskId_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 10 @@ -596,18 +594,18 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 18 - case 26: { - input.readMessage( - internalGetConfigFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 26 case 34: { tenant_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 34 + case 42: { + input.readMessage( + internalGetConfigFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 42 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -717,23 +715,22 @@ public Builder setTenantBytes( return this; } - private java.lang.Object parent_ = ""; + private java.lang.Object taskId_ = ""; /** *
-     * The parent task resource for this config.
-     * Format: tasks/{task_id}
+     * The parent task resource id.
      * 
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The parent. + * string task_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The taskId. */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; + public java.lang.String getTaskId() { + java.lang.Object ref = taskId_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - parent_ = s; + taskId_ = s; return s; } else { return (java.lang.String) ref; @@ -741,21 +738,20 @@ public java.lang.String getParent() { } /** *
-     * The parent task resource for this config.
-     * Format: tasks/{task_id}
+     * The parent task resource id.
      * 
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for parent. + * string task_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for taskId. */ public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; + getTaskIdBytes() { + java.lang.Object ref = taskId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - parent_ = b; + taskId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -763,52 +759,49 @@ public java.lang.String getParent() { } /** *
-     * The parent task resource for this config.
-     * Format: tasks/{task_id}
+     * The parent task resource id.
      * 
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The parent to set. + * string task_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The taskId to set. * @return This builder for chaining. */ - public Builder setParent( + public Builder setTaskId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - parent_ = value; + taskId_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** *
-     * The parent task resource for this config.
-     * Format: tasks/{task_id}
+     * The parent task resource id.
      * 
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * string task_id = 1 [(.google.api.field_behavior) = REQUIRED]; * @return This builder for chaining. */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); + public Builder clearTaskId() { + taskId_ = getDefaultInstance().getTaskId(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** *
-     * The parent task resource for this config.
-     * Format: tasks/{task_id}
+     * The parent task resource id.
      * 
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for parent to set. + * string task_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for taskId to set. * @return This builder for chaining. */ - public Builder setParentBytes( + public Builder setTaskIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - parent_ = value; + taskId_ = value; bitField0_ |= 0x00000002; onChanged(); return this; @@ -906,15 +899,15 @@ public Builder setConfigIdBytes( return this; } - private io.a2a.grpc.TaskPushNotificationConfig config_; + private io.a2a.grpc.PushNotificationConfig config_; private com.google.protobuf.SingleFieldBuilder< - io.a2a.grpc.TaskPushNotificationConfig, io.a2a.grpc.TaskPushNotificationConfig.Builder, io.a2a.grpc.TaskPushNotificationConfigOrBuilder> configBuilder_; + io.a2a.grpc.PushNotificationConfig, io.a2a.grpc.PushNotificationConfig.Builder, io.a2a.grpc.PushNotificationConfigOrBuilder> configBuilder_; /** *
      * The configuration to create.
      * 
* - * .a2a.v1.TaskPushNotificationConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; + * .a2a.v1.PushNotificationConfig config = 5 [(.google.api.field_behavior) = REQUIRED]; * @return Whether the config field is set. */ public boolean hasConfig() { @@ -925,12 +918,12 @@ public boolean hasConfig() { * The configuration to create. *
* - * .a2a.v1.TaskPushNotificationConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; + * .a2a.v1.PushNotificationConfig config = 5 [(.google.api.field_behavior) = REQUIRED]; * @return The config. */ - public io.a2a.grpc.TaskPushNotificationConfig getConfig() { + public io.a2a.grpc.PushNotificationConfig getConfig() { if (configBuilder_ == null) { - return config_ == null ? io.a2a.grpc.TaskPushNotificationConfig.getDefaultInstance() : config_; + return config_ == null ? io.a2a.grpc.PushNotificationConfig.getDefaultInstance() : config_; } else { return configBuilder_.getMessage(); } @@ -940,9 +933,9 @@ public io.a2a.grpc.TaskPushNotificationConfig getConfig() { * The configuration to create. *
* - * .a2a.v1.TaskPushNotificationConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; + * .a2a.v1.PushNotificationConfig config = 5 [(.google.api.field_behavior) = REQUIRED]; */ - public Builder setConfig(io.a2a.grpc.TaskPushNotificationConfig value) { + public Builder setConfig(io.a2a.grpc.PushNotificationConfig value) { if (configBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -960,10 +953,10 @@ public Builder setConfig(io.a2a.grpc.TaskPushNotificationConfig value) { * The configuration to create. *
* - * .a2a.v1.TaskPushNotificationConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; + * .a2a.v1.PushNotificationConfig config = 5 [(.google.api.field_behavior) = REQUIRED]; */ public Builder setConfig( - io.a2a.grpc.TaskPushNotificationConfig.Builder builderForValue) { + io.a2a.grpc.PushNotificationConfig.Builder builderForValue) { if (configBuilder_ == null) { config_ = builderForValue.build(); } else { @@ -978,13 +971,13 @@ public Builder setConfig( * The configuration to create. *
* - * .a2a.v1.TaskPushNotificationConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; + * .a2a.v1.PushNotificationConfig config = 5 [(.google.api.field_behavior) = REQUIRED]; */ - public Builder mergeConfig(io.a2a.grpc.TaskPushNotificationConfig value) { + public Builder mergeConfig(io.a2a.grpc.PushNotificationConfig value) { if (configBuilder_ == null) { if (((bitField0_ & 0x00000008) != 0) && config_ != null && - config_ != io.a2a.grpc.TaskPushNotificationConfig.getDefaultInstance()) { + config_ != io.a2a.grpc.PushNotificationConfig.getDefaultInstance()) { getConfigBuilder().mergeFrom(value); } else { config_ = value; @@ -1003,7 +996,7 @@ public Builder mergeConfig(io.a2a.grpc.TaskPushNotificationConfig value) { * The configuration to create. *
* - * .a2a.v1.TaskPushNotificationConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; + * .a2a.v1.PushNotificationConfig config = 5 [(.google.api.field_behavior) = REQUIRED]; */ public Builder clearConfig() { bitField0_ = (bitField0_ & ~0x00000008); @@ -1020,9 +1013,9 @@ public Builder clearConfig() { * The configuration to create. *
* - * .a2a.v1.TaskPushNotificationConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; + * .a2a.v1.PushNotificationConfig config = 5 [(.google.api.field_behavior) = REQUIRED]; */ - public io.a2a.grpc.TaskPushNotificationConfig.Builder getConfigBuilder() { + public io.a2a.grpc.PushNotificationConfig.Builder getConfigBuilder() { bitField0_ |= 0x00000008; onChanged(); return internalGetConfigFieldBuilder().getBuilder(); @@ -1032,14 +1025,14 @@ public io.a2a.grpc.TaskPushNotificationConfig.Builder getConfigBuilder() { * The configuration to create. *
* - * .a2a.v1.TaskPushNotificationConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; + * .a2a.v1.PushNotificationConfig config = 5 [(.google.api.field_behavior) = REQUIRED]; */ - public io.a2a.grpc.TaskPushNotificationConfigOrBuilder getConfigOrBuilder() { + public io.a2a.grpc.PushNotificationConfigOrBuilder getConfigOrBuilder() { if (configBuilder_ != null) { return configBuilder_.getMessageOrBuilder(); } else { return config_ == null ? - io.a2a.grpc.TaskPushNotificationConfig.getDefaultInstance() : config_; + io.a2a.grpc.PushNotificationConfig.getDefaultInstance() : config_; } } /** @@ -1047,14 +1040,14 @@ public io.a2a.grpc.TaskPushNotificationConfigOrBuilder getConfigOrBuilder() { * The configuration to create. * * - * .a2a.v1.TaskPushNotificationConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; + * .a2a.v1.PushNotificationConfig config = 5 [(.google.api.field_behavior) = REQUIRED]; */ private com.google.protobuf.SingleFieldBuilder< - io.a2a.grpc.TaskPushNotificationConfig, io.a2a.grpc.TaskPushNotificationConfig.Builder, io.a2a.grpc.TaskPushNotificationConfigOrBuilder> + io.a2a.grpc.PushNotificationConfig, io.a2a.grpc.PushNotificationConfig.Builder, io.a2a.grpc.PushNotificationConfigOrBuilder> internalGetConfigFieldBuilder() { if (configBuilder_ == null) { configBuilder_ = new com.google.protobuf.SingleFieldBuilder< - io.a2a.grpc.TaskPushNotificationConfig, io.a2a.grpc.TaskPushNotificationConfig.Builder, io.a2a.grpc.TaskPushNotificationConfigOrBuilder>( + io.a2a.grpc.PushNotificationConfig, io.a2a.grpc.PushNotificationConfig.Builder, io.a2a.grpc.PushNotificationConfigOrBuilder>( getConfig(), getParentForChildren(), isClean()); diff --git a/spec-grpc/src/main/java/io/a2a/grpc/CreateTaskPushNotificationConfigRequestOrBuilder.java b/spec-grpc/src/main/java/io/a2a/grpc/CreateTaskPushNotificationConfigRequestOrBuilder.java index 536c31416..77a661f26 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/CreateTaskPushNotificationConfigRequestOrBuilder.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/CreateTaskPushNotificationConfigRequestOrBuilder.java @@ -32,25 +32,23 @@ public interface CreateTaskPushNotificationConfigRequestOrBuilder extends /** *
-   * The parent task resource for this config.
-   * Format: tasks/{task_id}
+   * The parent task resource id.
    * 
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The parent. + * string task_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The taskId. */ - java.lang.String getParent(); + java.lang.String getTaskId(); /** *
-   * The parent task resource for this config.
-   * Format: tasks/{task_id}
+   * The parent task resource id.
    * 
* - * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for parent. + * string task_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for taskId. */ com.google.protobuf.ByteString - getParentBytes(); + getTaskIdBytes(); /** *
@@ -77,7 +75,7 @@ public interface CreateTaskPushNotificationConfigRequestOrBuilder extends
    * The configuration to create.
    * 
* - * .a2a.v1.TaskPushNotificationConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; + * .a2a.v1.PushNotificationConfig config = 5 [(.google.api.field_behavior) = REQUIRED]; * @return Whether the config field is set. */ boolean hasConfig(); @@ -86,16 +84,16 @@ public interface CreateTaskPushNotificationConfigRequestOrBuilder extends * The configuration to create. * * - * .a2a.v1.TaskPushNotificationConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; + * .a2a.v1.PushNotificationConfig config = 5 [(.google.api.field_behavior) = REQUIRED]; * @return The config. */ - io.a2a.grpc.TaskPushNotificationConfig getConfig(); + io.a2a.grpc.PushNotificationConfig getConfig(); /** *
    * The configuration to create.
    * 
* - * .a2a.v1.TaskPushNotificationConfig config = 3 [(.google.api.field_behavior) = REQUIRED]; + * .a2a.v1.PushNotificationConfig config = 5 [(.google.api.field_behavior) = REQUIRED]; */ - io.a2a.grpc.TaskPushNotificationConfigOrBuilder getConfigOrBuilder(); + io.a2a.grpc.PushNotificationConfigOrBuilder getConfigOrBuilder(); } diff --git a/spec-grpc/src/main/java/io/a2a/grpc/DataPart.java b/spec-grpc/src/main/java/io/a2a/grpc/DataPart.java deleted file mode 100644 index 92d0a6e6e..000000000 --- a/spec-grpc/src/main/java/io/a2a/grpc/DataPart.java +++ /dev/null @@ -1,617 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: a2a.proto -// Protobuf Java Version: 4.33.1 - -package io.a2a.grpc; - -/** - *
- * --8<-- [start:DataPart]
- * DataPart represents a structured blob.
- * 
- * - * Protobuf type {@code a2a.v1.DataPart} - */ -@com.google.protobuf.Generated -public final class DataPart extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:a2a.v1.DataPart) - DataPartOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 1, - /* suffix= */ "", - "DataPart"); - } - // Use DataPart.newBuilder() to construct. - private DataPart(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private DataPart() { - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.a2a.grpc.A2A.internal_static_a2a_v1_DataPart_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.a2a.grpc.A2A.internal_static_a2a_v1_DataPart_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.a2a.grpc.DataPart.class, io.a2a.grpc.DataPart.Builder.class); - } - - private int bitField0_; - public static final int DATA_FIELD_NUMBER = 1; - private com.google.protobuf.Struct data_; - /** - *
-   * A JSON object containing arbitrary data.
-   * 
- * - * .google.protobuf.Struct data = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the data field is set. - */ - @java.lang.Override - public boolean hasData() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-   * A JSON object containing arbitrary data.
-   * 
- * - * .google.protobuf.Struct data = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The data. - */ - @java.lang.Override - public com.google.protobuf.Struct getData() { - return data_ == null ? com.google.protobuf.Struct.getDefaultInstance() : data_; - } - /** - *
-   * A JSON object containing arbitrary data.
-   * 
- * - * .google.protobuf.Struct data = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - @java.lang.Override - public com.google.protobuf.StructOrBuilder getDataOrBuilder() { - return data_ == null ? com.google.protobuf.Struct.getDefaultInstance() : data_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getData()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getData()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.a2a.grpc.DataPart)) { - return super.equals(obj); - } - io.a2a.grpc.DataPart other = (io.a2a.grpc.DataPart) obj; - - if (hasData() != other.hasData()) return false; - if (hasData()) { - if (!getData() - .equals(other.getData())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasData()) { - hash = (37 * hash) + DATA_FIELD_NUMBER; - hash = (53 * hash) + getData().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.a2a.grpc.DataPart parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.a2a.grpc.DataPart parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.a2a.grpc.DataPart parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.a2a.grpc.DataPart parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.a2a.grpc.DataPart parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.a2a.grpc.DataPart parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.a2a.grpc.DataPart parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static io.a2a.grpc.DataPart parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.a2a.grpc.DataPart parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.a2a.grpc.DataPart parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.a2a.grpc.DataPart parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static io.a2a.grpc.DataPart parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.a2a.grpc.DataPart prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * --8<-- [start:DataPart]
-   * DataPart represents a structured blob.
-   * 
- * - * Protobuf type {@code a2a.v1.DataPart} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:a2a.v1.DataPart) - io.a2a.grpc.DataPartOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.a2a.grpc.A2A.internal_static_a2a_v1_DataPart_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.a2a.grpc.A2A.internal_static_a2a_v1_DataPart_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.a2a.grpc.DataPart.class, io.a2a.grpc.DataPart.Builder.class); - } - - // Construct using io.a2a.grpc.DataPart.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage - .alwaysUseFieldBuilders) { - internalGetDataFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - data_ = null; - if (dataBuilder_ != null) { - dataBuilder_.dispose(); - dataBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.a2a.grpc.A2A.internal_static_a2a_v1_DataPart_descriptor; - } - - @java.lang.Override - public io.a2a.grpc.DataPart getDefaultInstanceForType() { - return io.a2a.grpc.DataPart.getDefaultInstance(); - } - - @java.lang.Override - public io.a2a.grpc.DataPart build() { - io.a2a.grpc.DataPart result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.a2a.grpc.DataPart buildPartial() { - io.a2a.grpc.DataPart result = new io.a2a.grpc.DataPart(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.a2a.grpc.DataPart result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.data_ = dataBuilder_ == null - ? data_ - : dataBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.a2a.grpc.DataPart) { - return mergeFrom((io.a2a.grpc.DataPart)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.a2a.grpc.DataPart other) { - if (other == io.a2a.grpc.DataPart.getDefaultInstance()) return this; - if (other.hasData()) { - mergeData(other.getData()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - internalGetDataFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private com.google.protobuf.Struct data_; - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> dataBuilder_; - /** - *
-     * A JSON object containing arbitrary data.
-     * 
- * - * .google.protobuf.Struct data = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the data field is set. - */ - public boolean hasData() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - *
-     * A JSON object containing arbitrary data.
-     * 
- * - * .google.protobuf.Struct data = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The data. - */ - public com.google.protobuf.Struct getData() { - if (dataBuilder_ == null) { - return data_ == null ? com.google.protobuf.Struct.getDefaultInstance() : data_; - } else { - return dataBuilder_.getMessage(); - } - } - /** - *
-     * A JSON object containing arbitrary data.
-     * 
- * - * .google.protobuf.Struct data = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setData(com.google.protobuf.Struct value) { - if (dataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - data_ = value; - } else { - dataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * A JSON object containing arbitrary data.
-     * 
- * - * .google.protobuf.Struct data = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder setData( - com.google.protobuf.Struct.Builder builderForValue) { - if (dataBuilder_ == null) { - data_ = builderForValue.build(); - } else { - dataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
-     * A JSON object containing arbitrary data.
-     * 
- * - * .google.protobuf.Struct data = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder mergeData(com.google.protobuf.Struct value) { - if (dataBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - data_ != null && - data_ != com.google.protobuf.Struct.getDefaultInstance()) { - getDataBuilder().mergeFrom(value); - } else { - data_ = value; - } - } else { - dataBuilder_.mergeFrom(value); - } - if (data_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - *
-     * A JSON object containing arbitrary data.
-     * 
- * - * .google.protobuf.Struct data = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public Builder clearData() { - bitField0_ = (bitField0_ & ~0x00000001); - data_ = null; - if (dataBuilder_ != null) { - dataBuilder_.dispose(); - dataBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
-     * A JSON object containing arbitrary data.
-     * 
- * - * .google.protobuf.Struct data = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.protobuf.Struct.Builder getDataBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return internalGetDataFieldBuilder().getBuilder(); - } - /** - *
-     * A JSON object containing arbitrary data.
-     * 
- * - * .google.protobuf.Struct data = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - public com.google.protobuf.StructOrBuilder getDataOrBuilder() { - if (dataBuilder_ != null) { - return dataBuilder_.getMessageOrBuilder(); - } else { - return data_ == null ? - com.google.protobuf.Struct.getDefaultInstance() : data_; - } - } - /** - *
-     * A JSON object containing arbitrary data.
-     * 
- * - * .google.protobuf.Struct data = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> - internalGetDataFieldBuilder() { - if (dataBuilder_ == null) { - dataBuilder_ = new com.google.protobuf.SingleFieldBuilder< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( - getData(), - getParentForChildren(), - isClean()); - data_ = null; - } - return dataBuilder_; - } - - // @@protoc_insertion_point(builder_scope:a2a.v1.DataPart) - } - - // @@protoc_insertion_point(class_scope:a2a.v1.DataPart) - private static final io.a2a.grpc.DataPart DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.a2a.grpc.DataPart(); - } - - public static io.a2a.grpc.DataPart getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DataPart parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.a2a.grpc.DataPart getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/spec-grpc/src/main/java/io/a2a/grpc/DataPartOrBuilder.java b/spec-grpc/src/main/java/io/a2a/grpc/DataPartOrBuilder.java deleted file mode 100644 index 4b61fc851..000000000 --- a/spec-grpc/src/main/java/io/a2a/grpc/DataPartOrBuilder.java +++ /dev/null @@ -1,39 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: a2a.proto -// Protobuf Java Version: 4.33.1 - -package io.a2a.grpc; - -@com.google.protobuf.Generated -public interface DataPartOrBuilder extends - // @@protoc_insertion_point(interface_extends:a2a.v1.DataPart) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * A JSON object containing arbitrary data.
-   * 
- * - * .google.protobuf.Struct data = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return Whether the data field is set. - */ - boolean hasData(); - /** - *
-   * A JSON object containing arbitrary data.
-   * 
- * - * .google.protobuf.Struct data = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The data. - */ - com.google.protobuf.Struct getData(); - /** - *
-   * A JSON object containing arbitrary data.
-   * 
- * - * .google.protobuf.Struct data = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - com.google.protobuf.StructOrBuilder getDataOrBuilder(); -} diff --git a/spec-grpc/src/main/java/io/a2a/grpc/DeleteTaskPushNotificationConfigRequest.java b/spec-grpc/src/main/java/io/a2a/grpc/DeleteTaskPushNotificationConfigRequest.java index cb6914e0b..bb1ac53b5 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/DeleteTaskPushNotificationConfigRequest.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/DeleteTaskPushNotificationConfigRequest.java @@ -34,7 +34,8 @@ private DeleteTaskPushNotificationConfigRequest(com.google.protobuf.GeneratedMes } private DeleteTaskPushNotificationConfigRequest() { tenant_ = ""; - name_ = ""; + taskId_ = ""; + id_ = ""; } public static final com.google.protobuf.Descriptors.Descriptor @@ -97,49 +98,94 @@ public java.lang.String getTenant() { } } - public static final int NAME_FIELD_NUMBER = 1; + public static final int TASK_ID_FIELD_NUMBER = 3; @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; + private volatile java.lang.Object taskId_ = ""; /** *
-   * The resource name of the config to delete.
-   * Format: tasks/{task_id}/pushNotificationConfigs/{config_id}
+   * The parent task resource id.
    * 
* - * string name = 1; - * @return The name. + * string task_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The taskId. */ @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; + public java.lang.String getTaskId() { + java.lang.Object ref = taskId_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - name_ = s; + taskId_ = s; return s; } } /** *
-   * The resource name of the config to delete.
-   * Format: tasks/{task_id}/pushNotificationConfigs/{config_id}
+   * The parent task resource id.
    * 
* - * string name = 1; - * @return The bytes for name. + * string task_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for taskId. */ @java.lang.Override public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; + getTaskIdBytes() { + java.lang.Object ref = taskId_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - name_ = b; + taskId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + *
+   * The resource id of the config to delete.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *
+   * The resource id of the config to delete.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -160,12 +206,15 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, id_); } if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tenant_)) { com.google.protobuf.GeneratedMessage.writeString(output, 2, tenant_); } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(taskId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, taskId_); + } getUnknownFields().writeTo(output); } @@ -175,12 +224,15 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, id_); } if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tenant_)) { size += com.google.protobuf.GeneratedMessage.computeStringSize(2, tenant_); } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(taskId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, taskId_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -198,8 +250,10 @@ public boolean equals(final java.lang.Object obj) { if (!getTenant() .equals(other.getTenant())) return false; - if (!getName() - .equals(other.getName())) return false; + if (!getTaskId() + .equals(other.getTaskId())) return false; + if (!getId() + .equals(other.getId())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -213,8 +267,10 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + TENANT_FIELD_NUMBER; hash = (53 * hash) + getTenant().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + TASK_ID_FIELD_NUMBER; + hash = (53 * hash) + getTaskId().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -352,7 +408,8 @@ public Builder clear() { super.clear(); bitField0_ = 0; tenant_ = ""; - name_ = ""; + taskId_ = ""; + id_ = ""; return this; } @@ -390,7 +447,10 @@ private void buildPartial0(io.a2a.grpc.DeleteTaskPushNotificationConfigRequest r result.tenant_ = tenant_; } if (((from_bitField0_ & 0x00000002) != 0)) { - result.name_ = name_; + result.taskId_ = taskId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.id_ = id_; } } @@ -411,11 +471,16 @@ public Builder mergeFrom(io.a2a.grpc.DeleteTaskPushNotificationConfigRequest oth bitField0_ |= 0x00000001; onChanged(); } - if (!other.getName().isEmpty()) { - name_ = other.name_; + if (!other.getTaskId().isEmpty()) { + taskId_ = other.taskId_; bitField0_ |= 0x00000002; onChanged(); } + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000004; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -443,8 +508,8 @@ public Builder mergeFrom( done = true; break; case 10: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; break; } // case 10 case 18: { @@ -452,6 +517,11 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 18 + case 26: { + taskId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -561,23 +631,22 @@ public Builder setTenantBytes( return this; } - private java.lang.Object name_ = ""; + private java.lang.Object taskId_ = ""; /** *
-     * The resource name of the config to delete.
-     * Format: tasks/{task_id}/pushNotificationConfigs/{config_id}
+     * The parent task resource id.
      * 
* - * string name = 1; - * @return The name. + * string task_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The taskId. */ - public java.lang.String getName() { - java.lang.Object ref = name_; + public java.lang.String getTaskId() { + java.lang.Object ref = taskId_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - name_ = s; + taskId_ = s; return s; } else { return (java.lang.String) ref; @@ -585,21 +654,20 @@ public java.lang.String getName() { } /** *
-     * The resource name of the config to delete.
-     * Format: tasks/{task_id}/pushNotificationConfigs/{config_id}
+     * The parent task resource id.
      * 
* - * string name = 1; - * @return The bytes for name. + * string task_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for taskId. */ public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; + getTaskIdBytes() { + java.lang.Object ref = taskId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - name_ = b; + taskId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -607,57 +675,146 @@ public java.lang.String getName() { } /** *
-     * The resource name of the config to delete.
-     * Format: tasks/{task_id}/pushNotificationConfigs/{config_id}
+     * The parent task resource id.
      * 
* - * string name = 1; - * @param value The name to set. + * string task_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param value The taskId to set. * @return This builder for chaining. */ - public Builder setName( + public Builder setTaskId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - name_ = value; + taskId_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** *
-     * The resource name of the config to delete.
-     * Format: tasks/{task_id}/pushNotificationConfigs/{config_id}
+     * The parent task resource id.
      * 
* - * string name = 1; + * string task_id = 3 [(.google.api.field_behavior) = REQUIRED]; * @return This builder for chaining. */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); + public Builder clearTaskId() { + taskId_ = getDefaultInstance().getTaskId(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** *
-     * The resource name of the config to delete.
-     * Format: tasks/{task_id}/pushNotificationConfigs/{config_id}
+     * The parent task resource id.
      * 
* - * string name = 1; - * @param value The bytes for name to set. + * string task_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for taskId to set. * @return This builder for chaining. */ - public Builder setNameBytes( + public Builder setTaskIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - name_ = value; + taskId_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } + private java.lang.Object id_ = ""; + /** + *
+     * The resource id of the config to delete.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The resource id of the config to delete.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The resource id of the config to delete.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The resource id of the config to delete.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The resource id of the config to delete.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:a2a.v1.DeleteTaskPushNotificationConfigRequest) } diff --git a/spec-grpc/src/main/java/io/a2a/grpc/DeleteTaskPushNotificationConfigRequestOrBuilder.java b/spec-grpc/src/main/java/io/a2a/grpc/DeleteTaskPushNotificationConfigRequestOrBuilder.java index 336d7eba7..4219aea04 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/DeleteTaskPushNotificationConfigRequestOrBuilder.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/DeleteTaskPushNotificationConfigRequestOrBuilder.java @@ -32,23 +32,41 @@ public interface DeleteTaskPushNotificationConfigRequestOrBuilder extends /** *
-   * The resource name of the config to delete.
-   * Format: tasks/{task_id}/pushNotificationConfigs/{config_id}
+   * The parent task resource id.
    * 
* - * string name = 1; - * @return The name. + * string task_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The taskId. */ - java.lang.String getName(); + java.lang.String getTaskId(); /** *
-   * The resource name of the config to delete.
-   * Format: tasks/{task_id}/pushNotificationConfigs/{config_id}
+   * The parent task resource id.
    * 
* - * string name = 1; - * @return The bytes for name. + * string task_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for taskId. */ com.google.protobuf.ByteString - getNameBytes(); + getTaskIdBytes(); + + /** + *
+   * The resource id of the config to delete.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The id. + */ + java.lang.String getId(); + /** + *
+   * The resource id of the config to delete.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); } diff --git a/spec-grpc/src/main/java/io/a2a/grpc/FilePart.java b/spec-grpc/src/main/java/io/a2a/grpc/FilePart.java deleted file mode 100644 index 8d2526d62..000000000 --- a/spec-grpc/src/main/java/io/a2a/grpc/FilePart.java +++ /dev/null @@ -1,1109 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: a2a.proto -// Protobuf Java Version: 4.33.1 - -package io.a2a.grpc; - -/** - *
- * --8<-- [start:FilePart]
- * FilePart represents the different ways files can be provided. If files are
- * small, directly feeding the bytes is supported via file_with_bytes. If the
- * file is large, the agent should read the content as appropriate directly
- * from the file_with_uri source.
- * 
- * - * Protobuf type {@code a2a.v1.FilePart} - */ -@com.google.protobuf.Generated -public final class FilePart extends - com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:a2a.v1.FilePart) - FilePartOrBuilder { -private static final long serialVersionUID = 0L; - static { - com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( - com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, - /* major= */ 4, - /* minor= */ 33, - /* patch= */ 1, - /* suffix= */ "", - "FilePart"); - } - // Use FilePart.newBuilder() to construct. - private FilePart(com.google.protobuf.GeneratedMessage.Builder builder) { - super(builder); - } - private FilePart() { - mediaType_ = ""; - name_ = ""; - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.a2a.grpc.A2A.internal_static_a2a_v1_FilePart_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.a2a.grpc.A2A.internal_static_a2a_v1_FilePart_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.a2a.grpc.FilePart.class, io.a2a.grpc.FilePart.Builder.class); - } - - private int fileCase_ = 0; - @SuppressWarnings("serial") - private java.lang.Object file_; - public enum FileCase - implements com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - FILE_WITH_URI(1), - FILE_WITH_BYTES(2), - FILE_NOT_SET(0); - private final int value; - private FileCase(int value) { - this.value = value; - } - /** - * @param value The number of the enum to look for. - * @return The enum associated with the given number. - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static FileCase valueOf(int value) { - return forNumber(value); - } - - public static FileCase forNumber(int value) { - switch (value) { - case 1: return FILE_WITH_URI; - case 2: return FILE_WITH_BYTES; - case 0: return FILE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public FileCase - getFileCase() { - return FileCase.forNumber( - fileCase_); - } - - public static final int FILE_WITH_URI_FIELD_NUMBER = 1; - /** - *
-   * A URL pointing to the file's content.
-   * 
- * - * string file_with_uri = 1; - * @return Whether the fileWithUri field is set. - */ - public boolean hasFileWithUri() { - return fileCase_ == 1; - } - /** - *
-   * A URL pointing to the file's content.
-   * 
- * - * string file_with_uri = 1; - * @return The fileWithUri. - */ - public java.lang.String getFileWithUri() { - java.lang.Object ref = ""; - if (fileCase_ == 1) { - ref = file_; - } - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (fileCase_ == 1) { - file_ = s; - } - return s; - } - } - /** - *
-   * A URL pointing to the file's content.
-   * 
- * - * string file_with_uri = 1; - * @return The bytes for fileWithUri. - */ - public com.google.protobuf.ByteString - getFileWithUriBytes() { - java.lang.Object ref = ""; - if (fileCase_ == 1) { - ref = file_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (fileCase_ == 1) { - file_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILE_WITH_BYTES_FIELD_NUMBER = 2; - /** - *
-   * The base64-encoded content of the file.
-   * 
- * - * bytes file_with_bytes = 2; - * @return Whether the fileWithBytes field is set. - */ - @java.lang.Override - public boolean hasFileWithBytes() { - return fileCase_ == 2; - } - /** - *
-   * The base64-encoded content of the file.
-   * 
- * - * bytes file_with_bytes = 2; - * @return The fileWithBytes. - */ - @java.lang.Override - public com.google.protobuf.ByteString getFileWithBytes() { - if (fileCase_ == 2) { - return (com.google.protobuf.ByteString) file_; - } - return com.google.protobuf.ByteString.EMPTY; - } - - public static final int MEDIA_TYPE_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object mediaType_ = ""; - /** - *
-   * The media type of the file (e.g., "application/pdf").
-   * 
- * - * string media_type = 3; - * @return The mediaType. - */ - @java.lang.Override - public java.lang.String getMediaType() { - java.lang.Object ref = mediaType_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mediaType_ = s; - return s; - } - } - /** - *
-   * The media type of the file (e.g., "application/pdf").
-   * 
- * - * string media_type = 3; - * @return The bytes for mediaType. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getMediaTypeBytes() { - java.lang.Object ref = mediaType_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mediaType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NAME_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
-   * An optional name for the file (e.g., "document.pdf").
-   * 
- * - * string name = 4; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - *
-   * An optional name for the file (e.g., "document.pdf").
-   * 
- * - * string name = 4; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (fileCase_ == 1) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, file_); - } - if (fileCase_ == 2) { - output.writeBytes( - 2, (com.google.protobuf.ByteString) file_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(mediaType_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 3, mediaType_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 4, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (fileCase_ == 1) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, file_); - } - if (fileCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize( - 2, (com.google.protobuf.ByteString) file_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(mediaType_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(3, mediaType_); - } - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(4, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.a2a.grpc.FilePart)) { - return super.equals(obj); - } - io.a2a.grpc.FilePart other = (io.a2a.grpc.FilePart) obj; - - if (!getMediaType() - .equals(other.getMediaType())) return false; - if (!getName() - .equals(other.getName())) return false; - if (!getFileCase().equals(other.getFileCase())) return false; - switch (fileCase_) { - case 1: - if (!getFileWithUri() - .equals(other.getFileWithUri())) return false; - break; - case 2: - if (!getFileWithBytes() - .equals(other.getFileWithBytes())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + MEDIA_TYPE_FIELD_NUMBER; - hash = (53 * hash) + getMediaType().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - switch (fileCase_) { - case 1: - hash = (37 * hash) + FILE_WITH_URI_FIELD_NUMBER; - hash = (53 * hash) + getFileWithUri().hashCode(); - break; - case 2: - hash = (37 * hash) + FILE_WITH_BYTES_FIELD_NUMBER; - hash = (53 * hash) + getFileWithBytes().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.a2a.grpc.FilePart parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.a2a.grpc.FilePart parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.a2a.grpc.FilePart parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.a2a.grpc.FilePart parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.a2a.grpc.FilePart parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.a2a.grpc.FilePart parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.a2a.grpc.FilePart parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static io.a2a.grpc.FilePart parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.a2a.grpc.FilePart parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.a2a.grpc.FilePart parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.a2a.grpc.FilePart parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input); - } - public static io.a2a.grpc.FilePart parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessage - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.a2a.grpc.FilePart prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - *
-   * --8<-- [start:FilePart]
-   * FilePart represents the different ways files can be provided. If files are
-   * small, directly feeding the bytes is supported via file_with_bytes. If the
-   * file is large, the agent should read the content as appropriate directly
-   * from the file_with_uri source.
-   * 
- * - * Protobuf type {@code a2a.v1.FilePart} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:a2a.v1.FilePart) - io.a2a.grpc.FilePartOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.a2a.grpc.A2A.internal_static_a2a_v1_FilePart_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.a2a.grpc.A2A.internal_static_a2a_v1_FilePart_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.a2a.grpc.FilePart.class, io.a2a.grpc.FilePart.Builder.class); - } - - // Construct using io.a2a.grpc.FilePart.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - mediaType_ = ""; - name_ = ""; - fileCase_ = 0; - file_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.a2a.grpc.A2A.internal_static_a2a_v1_FilePart_descriptor; - } - - @java.lang.Override - public io.a2a.grpc.FilePart getDefaultInstanceForType() { - return io.a2a.grpc.FilePart.getDefaultInstance(); - } - - @java.lang.Override - public io.a2a.grpc.FilePart build() { - io.a2a.grpc.FilePart result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.a2a.grpc.FilePart buildPartial() { - io.a2a.grpc.FilePart result = new io.a2a.grpc.FilePart(this); - if (bitField0_ != 0) { buildPartial0(result); } - buildPartialOneofs(result); - onBuilt(); - return result; - } - - private void buildPartial0(io.a2a.grpc.FilePart result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000004) != 0)) { - result.mediaType_ = mediaType_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.name_ = name_; - } - } - - private void buildPartialOneofs(io.a2a.grpc.FilePart result) { - result.fileCase_ = fileCase_; - result.file_ = this.file_; - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.a2a.grpc.FilePart) { - return mergeFrom((io.a2a.grpc.FilePart)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.a2a.grpc.FilePart other) { - if (other == io.a2a.grpc.FilePart.getDefaultInstance()) return this; - if (!other.getMediaType().isEmpty()) { - mediaType_ = other.mediaType_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000008; - onChanged(); - } - switch (other.getFileCase()) { - case FILE_WITH_URI: { - fileCase_ = 1; - file_ = other.file_; - onChanged(); - break; - } - case FILE_WITH_BYTES: { - setFileWithBytes(other.getFileWithBytes()); - break; - } - case FILE_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - fileCase_ = 1; - file_ = s; - break; - } // case 10 - case 18: { - file_ = input.readBytes(); - fileCase_ = 2; - break; - } // case 18 - case 26: { - mediaType_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - break; - } // case 34 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int fileCase_ = 0; - private java.lang.Object file_; - public FileCase - getFileCase() { - return FileCase.forNumber( - fileCase_); - } - - public Builder clearFile() { - fileCase_ = 0; - file_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - /** - *
-     * A URL pointing to the file's content.
-     * 
- * - * string file_with_uri = 1; - * @return Whether the fileWithUri field is set. - */ - @java.lang.Override - public boolean hasFileWithUri() { - return fileCase_ == 1; - } - /** - *
-     * A URL pointing to the file's content.
-     * 
- * - * string file_with_uri = 1; - * @return The fileWithUri. - */ - @java.lang.Override - public java.lang.String getFileWithUri() { - java.lang.Object ref = ""; - if (fileCase_ == 1) { - ref = file_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (fileCase_ == 1) { - file_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * A URL pointing to the file's content.
-     * 
- * - * string file_with_uri = 1; - * @return The bytes for fileWithUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getFileWithUriBytes() { - java.lang.Object ref = ""; - if (fileCase_ == 1) { - ref = file_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - if (fileCase_ == 1) { - file_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * A URL pointing to the file's content.
-     * 
- * - * string file_with_uri = 1; - * @param value The fileWithUri to set. - * @return This builder for chaining. - */ - public Builder setFileWithUri( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - fileCase_ = 1; - file_ = value; - onChanged(); - return this; - } - /** - *
-     * A URL pointing to the file's content.
-     * 
- * - * string file_with_uri = 1; - * @return This builder for chaining. - */ - public Builder clearFileWithUri() { - if (fileCase_ == 1) { - fileCase_ = 0; - file_ = null; - onChanged(); - } - return this; - } - /** - *
-     * A URL pointing to the file's content.
-     * 
- * - * string file_with_uri = 1; - * @param value The bytes for fileWithUri to set. - * @return This builder for chaining. - */ - public Builder setFileWithUriBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - fileCase_ = 1; - file_ = value; - onChanged(); - return this; - } - - /** - *
-     * The base64-encoded content of the file.
-     * 
- * - * bytes file_with_bytes = 2; - * @return Whether the fileWithBytes field is set. - */ - public boolean hasFileWithBytes() { - return fileCase_ == 2; - } - /** - *
-     * The base64-encoded content of the file.
-     * 
- * - * bytes file_with_bytes = 2; - * @return The fileWithBytes. - */ - public com.google.protobuf.ByteString getFileWithBytes() { - if (fileCase_ == 2) { - return (com.google.protobuf.ByteString) file_; - } - return com.google.protobuf.ByteString.EMPTY; - } - /** - *
-     * The base64-encoded content of the file.
-     * 
- * - * bytes file_with_bytes = 2; - * @param value The fileWithBytes to set. - * @return This builder for chaining. - */ - public Builder setFileWithBytes(com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - fileCase_ = 2; - file_ = value; - onChanged(); - return this; - } - /** - *
-     * The base64-encoded content of the file.
-     * 
- * - * bytes file_with_bytes = 2; - * @return This builder for chaining. - */ - public Builder clearFileWithBytes() { - if (fileCase_ == 2) { - fileCase_ = 0; - file_ = null; - onChanged(); - } - return this; - } - - private java.lang.Object mediaType_ = ""; - /** - *
-     * The media type of the file (e.g., "application/pdf").
-     * 
- * - * string media_type = 3; - * @return The mediaType. - */ - public java.lang.String getMediaType() { - java.lang.Object ref = mediaType_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - mediaType_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * The media type of the file (e.g., "application/pdf").
-     * 
- * - * string media_type = 3; - * @return The bytes for mediaType. - */ - public com.google.protobuf.ByteString - getMediaTypeBytes() { - java.lang.Object ref = mediaType_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - mediaType_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * The media type of the file (e.g., "application/pdf").
-     * 
- * - * string media_type = 3; - * @param value The mediaType to set. - * @return This builder for chaining. - */ - public Builder setMediaType( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - mediaType_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
-     * The media type of the file (e.g., "application/pdf").
-     * 
- * - * string media_type = 3; - * @return This builder for chaining. - */ - public Builder clearMediaType() { - mediaType_ = getDefaultInstance().getMediaType(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
-     * The media type of the file (e.g., "application/pdf").
-     * 
- * - * string media_type = 3; - * @param value The bytes for mediaType to set. - * @return This builder for chaining. - */ - public Builder setMediaTypeBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - mediaType_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private java.lang.Object name_ = ""; - /** - *
-     * An optional name for the file (e.g., "document.pdf").
-     * 
- * - * string name = 4; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
-     * An optional name for the file (e.g., "document.pdf").
-     * 
- * - * string name = 4; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
-     * An optional name for the file (e.g., "document.pdf").
-     * 
- * - * string name = 4; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * An optional name for the file (e.g., "document.pdf").
-     * 
- * - * string name = 4; - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - return this; - } - /** - *
-     * An optional name for the file (e.g., "document.pdf").
-     * 
- * - * string name = 4; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - - // @@protoc_insertion_point(builder_scope:a2a.v1.FilePart) - } - - // @@protoc_insertion_point(class_scope:a2a.v1.FilePart) - private static final io.a2a.grpc.FilePart DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.a2a.grpc.FilePart(); - } - - public static io.a2a.grpc.FilePart getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public FilePart parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.a2a.grpc.FilePart getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/spec-grpc/src/main/java/io/a2a/grpc/FilePartOrBuilder.java b/spec-grpc/src/main/java/io/a2a/grpc/FilePartOrBuilder.java deleted file mode 100644 index 2fbad2bf2..000000000 --- a/spec-grpc/src/main/java/io/a2a/grpc/FilePartOrBuilder.java +++ /dev/null @@ -1,102 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// NO CHECKED-IN PROTOBUF GENCODE -// source: a2a.proto -// Protobuf Java Version: 4.33.1 - -package io.a2a.grpc; - -@com.google.protobuf.Generated -public interface FilePartOrBuilder extends - // @@protoc_insertion_point(interface_extends:a2a.v1.FilePart) - com.google.protobuf.MessageOrBuilder { - - /** - *
-   * A URL pointing to the file's content.
-   * 
- * - * string file_with_uri = 1; - * @return Whether the fileWithUri field is set. - */ - boolean hasFileWithUri(); - /** - *
-   * A URL pointing to the file's content.
-   * 
- * - * string file_with_uri = 1; - * @return The fileWithUri. - */ - java.lang.String getFileWithUri(); - /** - *
-   * A URL pointing to the file's content.
-   * 
- * - * string file_with_uri = 1; - * @return The bytes for fileWithUri. - */ - com.google.protobuf.ByteString - getFileWithUriBytes(); - - /** - *
-   * The base64-encoded content of the file.
-   * 
- * - * bytes file_with_bytes = 2; - * @return Whether the fileWithBytes field is set. - */ - boolean hasFileWithBytes(); - /** - *
-   * The base64-encoded content of the file.
-   * 
- * - * bytes file_with_bytes = 2; - * @return The fileWithBytes. - */ - com.google.protobuf.ByteString getFileWithBytes(); - - /** - *
-   * The media type of the file (e.g., "application/pdf").
-   * 
- * - * string media_type = 3; - * @return The mediaType. - */ - java.lang.String getMediaType(); - /** - *
-   * The media type of the file (e.g., "application/pdf").
-   * 
- * - * string media_type = 3; - * @return The bytes for mediaType. - */ - com.google.protobuf.ByteString - getMediaTypeBytes(); - - /** - *
-   * An optional name for the file (e.g., "document.pdf").
-   * 
- * - * string name = 4; - * @return The name. - */ - java.lang.String getName(); - /** - *
-   * An optional name for the file (e.g., "document.pdf").
-   * 
- * - * string name = 4; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - io.a2a.grpc.FilePart.FileCase getFileCase(); -} diff --git a/spec-grpc/src/main/java/io/a2a/grpc/GetTaskPushNotificationConfigRequest.java b/spec-grpc/src/main/java/io/a2a/grpc/GetTaskPushNotificationConfigRequest.java index 5d5819669..e254a9022 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/GetTaskPushNotificationConfigRequest.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/GetTaskPushNotificationConfigRequest.java @@ -33,7 +33,8 @@ private GetTaskPushNotificationConfigRequest(com.google.protobuf.GeneratedMessag } private GetTaskPushNotificationConfigRequest() { tenant_ = ""; - name_ = ""; + taskId_ = ""; + id_ = ""; } public static final com.google.protobuf.Descriptors.Descriptor @@ -96,49 +97,94 @@ public java.lang.String getTenant() { } } - public static final int NAME_FIELD_NUMBER = 1; + public static final int TASK_ID_FIELD_NUMBER = 3; @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; + private volatile java.lang.Object taskId_ = ""; /** *
-   * The resource name of the config to retrieve.
-   * Format: tasks/{task_id}/pushNotificationConfigs/{config_id}
+   * The parent task resource id.
    * 
* - * string name = 1; - * @return The name. + * string task_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The taskId. */ @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; + public java.lang.String getTaskId() { + java.lang.Object ref = taskId_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - name_ = s; + taskId_ = s; return s; } } /** *
-   * The resource name of the config to retrieve.
-   * Format: tasks/{task_id}/pushNotificationConfigs/{config_id}
+   * The parent task resource id.
    * 
* - * string name = 1; - * @return The bytes for name. + * string task_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for taskId. */ @java.lang.Override public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; + getTaskIdBytes() { + java.lang.Object ref = taskId_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - name_ = b; + taskId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + *
+   * The resource id of the config to retrieve.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *
+   * The resource id of the config to retrieve.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -159,12 +205,15 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, id_); } if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tenant_)) { com.google.protobuf.GeneratedMessage.writeString(output, 2, tenant_); } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(taskId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, taskId_); + } getUnknownFields().writeTo(output); } @@ -174,12 +223,15 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, id_); } if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tenant_)) { size += com.google.protobuf.GeneratedMessage.computeStringSize(2, tenant_); } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(taskId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, taskId_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -197,8 +249,10 @@ public boolean equals(final java.lang.Object obj) { if (!getTenant() .equals(other.getTenant())) return false; - if (!getName() - .equals(other.getName())) return false; + if (!getTaskId() + .equals(other.getTaskId())) return false; + if (!getId() + .equals(other.getId())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -212,8 +266,10 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + TENANT_FIELD_NUMBER; hash = (53 * hash) + getTenant().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + TASK_ID_FIELD_NUMBER; + hash = (53 * hash) + getTaskId().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -350,7 +406,8 @@ public Builder clear() { super.clear(); bitField0_ = 0; tenant_ = ""; - name_ = ""; + taskId_ = ""; + id_ = ""; return this; } @@ -388,7 +445,10 @@ private void buildPartial0(io.a2a.grpc.GetTaskPushNotificationConfigRequest resu result.tenant_ = tenant_; } if (((from_bitField0_ & 0x00000002) != 0)) { - result.name_ = name_; + result.taskId_ = taskId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.id_ = id_; } } @@ -409,11 +469,16 @@ public Builder mergeFrom(io.a2a.grpc.GetTaskPushNotificationConfigRequest other) bitField0_ |= 0x00000001; onChanged(); } - if (!other.getName().isEmpty()) { - name_ = other.name_; + if (!other.getTaskId().isEmpty()) { + taskId_ = other.taskId_; bitField0_ |= 0x00000002; onChanged(); } + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000004; + onChanged(); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -441,8 +506,8 @@ public Builder mergeFrom( done = true; break; case 10: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; break; } // case 10 case 18: { @@ -450,6 +515,11 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 18 + case 26: { + taskId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -559,23 +629,22 @@ public Builder setTenantBytes( return this; } - private java.lang.Object name_ = ""; + private java.lang.Object taskId_ = ""; /** *
-     * The resource name of the config to retrieve.
-     * Format: tasks/{task_id}/pushNotificationConfigs/{config_id}
+     * The parent task resource id.
      * 
* - * string name = 1; - * @return The name. + * string task_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The taskId. */ - public java.lang.String getName() { - java.lang.Object ref = name_; + public java.lang.String getTaskId() { + java.lang.Object ref = taskId_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - name_ = s; + taskId_ = s; return s; } else { return (java.lang.String) ref; @@ -583,21 +652,20 @@ public java.lang.String getName() { } /** *
-     * The resource name of the config to retrieve.
-     * Format: tasks/{task_id}/pushNotificationConfigs/{config_id}
+     * The parent task resource id.
      * 
* - * string name = 1; - * @return The bytes for name. + * string task_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for taskId. */ public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; + getTaskIdBytes() { + java.lang.Object ref = taskId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - name_ = b; + taskId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -605,57 +673,146 @@ public java.lang.String getName() { } /** *
-     * The resource name of the config to retrieve.
-     * Format: tasks/{task_id}/pushNotificationConfigs/{config_id}
+     * The parent task resource id.
      * 
* - * string name = 1; - * @param value The name to set. + * string task_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param value The taskId to set. * @return This builder for chaining. */ - public Builder setName( + public Builder setTaskId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - name_ = value; + taskId_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** *
-     * The resource name of the config to retrieve.
-     * Format: tasks/{task_id}/pushNotificationConfigs/{config_id}
+     * The parent task resource id.
      * 
* - * string name = 1; + * string task_id = 3 [(.google.api.field_behavior) = REQUIRED]; * @return This builder for chaining. */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); + public Builder clearTaskId() { + taskId_ = getDefaultInstance().getTaskId(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** *
-     * The resource name of the config to retrieve.
-     * Format: tasks/{task_id}/pushNotificationConfigs/{config_id}
+     * The parent task resource id.
      * 
* - * string name = 1; - * @param value The bytes for name to set. + * string task_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for taskId to set. * @return This builder for chaining. */ - public Builder setNameBytes( + public Builder setTaskIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - name_ = value; + taskId_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } + private java.lang.Object id_ = ""; + /** + *
+     * The resource id of the config to retrieve.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The resource id of the config to retrieve.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The resource id of the config to retrieve.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The resource id of the config to retrieve.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The resource id of the config to retrieve.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:a2a.v1.GetTaskPushNotificationConfigRequest) } diff --git a/spec-grpc/src/main/java/io/a2a/grpc/GetTaskPushNotificationConfigRequestOrBuilder.java b/spec-grpc/src/main/java/io/a2a/grpc/GetTaskPushNotificationConfigRequestOrBuilder.java index 8224a30a2..5e9047f46 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/GetTaskPushNotificationConfigRequestOrBuilder.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/GetTaskPushNotificationConfigRequestOrBuilder.java @@ -32,23 +32,41 @@ public interface GetTaskPushNotificationConfigRequestOrBuilder extends /** *
-   * The resource name of the config to retrieve.
-   * Format: tasks/{task_id}/pushNotificationConfigs/{config_id}
+   * The parent task resource id.
    * 
* - * string name = 1; - * @return The name. + * string task_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The taskId. */ - java.lang.String getName(); + java.lang.String getTaskId(); /** *
-   * The resource name of the config to retrieve.
-   * Format: tasks/{task_id}/pushNotificationConfigs/{config_id}
+   * The parent task resource id.
    * 
* - * string name = 1; - * @return The bytes for name. + * string task_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for taskId. */ com.google.protobuf.ByteString - getNameBytes(); + getTaskIdBytes(); + + /** + *
+   * The resource id of the config to retrieve.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The id. + */ + java.lang.String getId(); + /** + *
+   * The resource id of the config to retrieve.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); } diff --git a/spec-grpc/src/main/java/io/a2a/grpc/GetTaskRequest.java b/spec-grpc/src/main/java/io/a2a/grpc/GetTaskRequest.java index 76d9264a0..9fa872c52 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/GetTaskRequest.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/GetTaskRequest.java @@ -34,7 +34,7 @@ private GetTaskRequest(com.google.protobuf.GeneratedMessage.Builder builder) } private GetTaskRequest() { tenant_ = ""; - name_ = ""; + id_ = ""; } public static final com.google.protobuf.Descriptors.Descriptor @@ -98,49 +98,47 @@ public java.lang.String getTenant() { } } - public static final int NAME_FIELD_NUMBER = 1; + public static final int ID_FIELD_NUMBER = 1; @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; + private volatile java.lang.Object id_ = ""; /** *
-   * The resource name of the task.
-   * Format: tasks/{task_id}
+   * The resource id of the task.
    * 
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The name. + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The id. */ @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; + public java.lang.String getId() { + java.lang.Object ref = id_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - name_ = s; + id_ = s; return s; } } /** *
-   * The resource name of the task.
-   * Format: tasks/{task_id}
+   * The resource id of the task.
    * 
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for name. + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for id. */ @java.lang.Override public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; + getIdBytes() { + java.lang.Object ref = id_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - name_ = b; + id_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -194,8 +192,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, id_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeInt32(2, historyLength_); @@ -212,8 +210,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, id_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream @@ -239,8 +237,8 @@ public boolean equals(final java.lang.Object obj) { if (!getTenant() .equals(other.getTenant())) return false; - if (!getName() - .equals(other.getName())) return false; + if (!getId() + .equals(other.getId())) return false; if (hasHistoryLength() != other.hasHistoryLength()) return false; if (hasHistoryLength()) { if (getHistoryLength() @@ -259,8 +257,8 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + TENANT_FIELD_NUMBER; hash = (53 * hash) + getTenant().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); if (hasHistoryLength()) { hash = (37 * hash) + HISTORY_LENGTH_FIELD_NUMBER; hash = (53 * hash) + getHistoryLength(); @@ -402,7 +400,7 @@ public Builder clear() { super.clear(); bitField0_ = 0; tenant_ = ""; - name_ = ""; + id_ = ""; historyLength_ = 0; return this; } @@ -441,7 +439,7 @@ private void buildPartial0(io.a2a.grpc.GetTaskRequest result) { result.tenant_ = tenant_; } if (((from_bitField0_ & 0x00000002) != 0)) { - result.name_ = name_; + result.id_ = id_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000004) != 0)) { @@ -468,8 +466,8 @@ public Builder mergeFrom(io.a2a.grpc.GetTaskRequest other) { bitField0_ |= 0x00000001; onChanged(); } - if (!other.getName().isEmpty()) { - name_ = other.name_; + if (!other.getId().isEmpty()) { + id_ = other.id_; bitField0_ |= 0x00000002; onChanged(); } @@ -503,7 +501,7 @@ public Builder mergeFrom( done = true; break; case 10: { - name_ = input.readStringRequireUtf8(); + id_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 10 @@ -626,23 +624,22 @@ public Builder setTenantBytes( return this; } - private java.lang.Object name_ = ""; + private java.lang.Object id_ = ""; /** *
-     * The resource name of the task.
-     * Format: tasks/{task_id}
+     * The resource id of the task.
      * 
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The name. + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The id. */ - public java.lang.String getName() { - java.lang.Object ref = name_; + public java.lang.String getId() { + java.lang.Object ref = id_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - name_ = s; + id_ = s; return s; } else { return (java.lang.String) ref; @@ -650,21 +647,20 @@ public java.lang.String getName() { } /** *
-     * The resource name of the task.
-     * Format: tasks/{task_id}
+     * The resource id of the task.
      * 
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for name. + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for id. */ public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; + getIdBytes() { + java.lang.Object ref = id_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - name_ = b; + id_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -672,52 +668,49 @@ public java.lang.String getName() { } /** *
-     * The resource name of the task.
-     * Format: tasks/{task_id}
+     * The resource id of the task.
      * 
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The name to set. + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The id to set. * @return This builder for chaining. */ - public Builder setName( + public Builder setId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - name_ = value; + id_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** *
-     * The resource name of the task.
-     * Format: tasks/{task_id}
+     * The resource id of the task.
      * 
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; * @return This builder for chaining. */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); + public Builder clearId() { + id_ = getDefaultInstance().getId(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** *
-     * The resource name of the task.
-     * Format: tasks/{task_id}
+     * The resource id of the task.
      * 
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for name to set. + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for id to set. * @return This builder for chaining. */ - public Builder setNameBytes( + public Builder setIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - name_ = value; + id_ = value; bitField0_ |= 0x00000002; onChanged(); return this; diff --git a/spec-grpc/src/main/java/io/a2a/grpc/GetTaskRequestOrBuilder.java b/spec-grpc/src/main/java/io/a2a/grpc/GetTaskRequestOrBuilder.java index 1ef78600d..7a86eb56c 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/GetTaskRequestOrBuilder.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/GetTaskRequestOrBuilder.java @@ -32,25 +32,23 @@ public interface GetTaskRequestOrBuilder extends /** *
-   * The resource name of the task.
-   * Format: tasks/{task_id}
+   * The resource id of the task.
    * 
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The name. + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The id. */ - java.lang.String getName(); + java.lang.String getId(); /** *
-   * The resource name of the task.
-   * Format: tasks/{task_id}
+   * The resource id of the task.
    * 
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for name. + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for id. */ com.google.protobuf.ByteString - getNameBytes(); + getIdBytes(); /** *
diff --git a/spec-grpc/src/main/java/io/a2a/grpc/ImplicitOAuthFlow.java b/spec-grpc/src/main/java/io/a2a/grpc/ImplicitOAuthFlow.java
new file mode 100644
index 000000000..e1fd0601c
--- /dev/null
+++ b/spec-grpc/src/main/java/io/a2a/grpc/ImplicitOAuthFlow.java
@@ -0,0 +1,1050 @@
+// Generated by the protocol buffer compiler.  DO NOT EDIT!
+// NO CHECKED-IN PROTOBUF GENCODE
+// source: a2a.proto
+// Protobuf Java Version: 4.33.1
+
+package io.a2a.grpc;
+
+/**
+ * 
+ * DEPRECATED
+ * 
+ * + * Protobuf type {@code a2a.v1.ImplicitOAuthFlow} + */ +@com.google.protobuf.Generated +public final class ImplicitOAuthFlow extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:a2a.v1.ImplicitOAuthFlow) + ImplicitOAuthFlowOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 1, + /* suffix= */ "", + "ImplicitOAuthFlow"); + } + // Use ImplicitOAuthFlow.newBuilder() to construct. + private ImplicitOAuthFlow(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ImplicitOAuthFlow() { + authorizationUrl_ = ""; + refreshUrl_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.a2a.grpc.A2A.internal_static_a2a_v1_ImplicitOAuthFlow_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetScopes(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.a2a.grpc.A2A.internal_static_a2a_v1_ImplicitOAuthFlow_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.a2a.grpc.ImplicitOAuthFlow.class, io.a2a.grpc.ImplicitOAuthFlow.Builder.class); + } + + public static final int AUTHORIZATION_URL_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object authorizationUrl_ = ""; + /** + *
+   * The authorization URL to be used for this flow. This MUST be in the
+   * form of a URL. The OAuth2 standard requires the use of TLS
+   * 
+ * + * string authorization_url = 1; + * @return The authorizationUrl. + */ + @java.lang.Override + public java.lang.String getAuthorizationUrl() { + java.lang.Object ref = authorizationUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + authorizationUrl_ = s; + return s; + } + } + /** + *
+   * The authorization URL to be used for this flow. This MUST be in the
+   * form of a URL. The OAuth2 standard requires the use of TLS
+   * 
+ * + * string authorization_url = 1; + * @return The bytes for authorizationUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAuthorizationUrlBytes() { + java.lang.Object ref = authorizationUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + authorizationUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REFRESH_URL_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object refreshUrl_ = ""; + /** + *
+   * The URL to be used for obtaining refresh tokens. This MUST be in the
+   * form of a URL. The OAuth2 standard requires the use of TLS.
+   * 
+ * + * string refresh_url = 2; + * @return The refreshUrl. + */ + @java.lang.Override + public java.lang.String getRefreshUrl() { + java.lang.Object ref = refreshUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + refreshUrl_ = s; + return s; + } + } + /** + *
+   * The URL to be used for obtaining refresh tokens. This MUST be in the
+   * form of a URL. The OAuth2 standard requires the use of TLS.
+   * 
+ * + * string refresh_url = 2; + * @return The bytes for refreshUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRefreshUrlBytes() { + java.lang.Object ref = refreshUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + refreshUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCOPES_FIELD_NUMBER = 3; + private static final class ScopesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + io.a2a.grpc.A2A.internal_static_a2a_v1_ImplicitOAuthFlow_ScopesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> scopes_; + private com.google.protobuf.MapField + internalGetScopes() { + if (scopes_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ScopesDefaultEntryHolder.defaultEntry); + } + return scopes_; + } + public int getScopesCount() { + return internalGetScopes().getMap().size(); + } + /** + *
+   * The available scopes for the OAuth2 security scheme. A map between the
+   * scope name and a short description for it. The map MAY be empty.
+   * 
+ * + * map<string, string> scopes = 3; + */ + @java.lang.Override + public boolean containsScopes( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetScopes().getMap().containsKey(key); + } + /** + * Use {@link #getScopesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getScopes() { + return getScopesMap(); + } + /** + *
+   * The available scopes for the OAuth2 security scheme. A map between the
+   * scope name and a short description for it. The map MAY be empty.
+   * 
+ * + * map<string, string> scopes = 3; + */ + @java.lang.Override + public java.util.Map getScopesMap() { + return internalGetScopes().getMap(); + } + /** + *
+   * The available scopes for the OAuth2 security scheme. A map between the
+   * scope name and a short description for it. The map MAY be empty.
+   * 
+ * + * map<string, string> scopes = 3; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getScopesOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetScopes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * The available scopes for the OAuth2 security scheme. A map between the
+   * scope name and a short description for it. The map MAY be empty.
+   * 
+ * + * map<string, string> scopes = 3; + */ + @java.lang.Override + public java.lang.String getScopesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetScopes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(authorizationUrl_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, authorizationUrl_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(refreshUrl_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, refreshUrl_); + } + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetScopes(), + ScopesDefaultEntryHolder.defaultEntry, + 3); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(authorizationUrl_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, authorizationUrl_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(refreshUrl_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, refreshUrl_); + } + for (java.util.Map.Entry entry + : internalGetScopes().getMap().entrySet()) { + com.google.protobuf.MapEntry + scopes__ = ScopesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, scopes__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.a2a.grpc.ImplicitOAuthFlow)) { + return super.equals(obj); + } + io.a2a.grpc.ImplicitOAuthFlow other = (io.a2a.grpc.ImplicitOAuthFlow) obj; + + if (!getAuthorizationUrl() + .equals(other.getAuthorizationUrl())) return false; + if (!getRefreshUrl() + .equals(other.getRefreshUrl())) return false; + if (!internalGetScopes().equals( + other.internalGetScopes())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + AUTHORIZATION_URL_FIELD_NUMBER; + hash = (53 * hash) + getAuthorizationUrl().hashCode(); + hash = (37 * hash) + REFRESH_URL_FIELD_NUMBER; + hash = (53 * hash) + getRefreshUrl().hashCode(); + if (!internalGetScopes().getMap().isEmpty()) { + hash = (37 * hash) + SCOPES_FIELD_NUMBER; + hash = (53 * hash) + internalGetScopes().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.a2a.grpc.ImplicitOAuthFlow parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.a2a.grpc.ImplicitOAuthFlow parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.a2a.grpc.ImplicitOAuthFlow parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.a2a.grpc.ImplicitOAuthFlow parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.a2a.grpc.ImplicitOAuthFlow parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.a2a.grpc.ImplicitOAuthFlow parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.a2a.grpc.ImplicitOAuthFlow parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static io.a2a.grpc.ImplicitOAuthFlow parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.a2a.grpc.ImplicitOAuthFlow parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.a2a.grpc.ImplicitOAuthFlow parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.a2a.grpc.ImplicitOAuthFlow parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static io.a2a.grpc.ImplicitOAuthFlow parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.a2a.grpc.ImplicitOAuthFlow prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * DEPRECATED
+   * 
+ * + * Protobuf type {@code a2a.v1.ImplicitOAuthFlow} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:a2a.v1.ImplicitOAuthFlow) + io.a2a.grpc.ImplicitOAuthFlowOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.a2a.grpc.A2A.internal_static_a2a_v1_ImplicitOAuthFlow_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetScopes(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetMutableScopes(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.a2a.grpc.A2A.internal_static_a2a_v1_ImplicitOAuthFlow_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.a2a.grpc.ImplicitOAuthFlow.class, io.a2a.grpc.ImplicitOAuthFlow.Builder.class); + } + + // Construct using io.a2a.grpc.ImplicitOAuthFlow.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + authorizationUrl_ = ""; + refreshUrl_ = ""; + internalGetMutableScopes().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.a2a.grpc.A2A.internal_static_a2a_v1_ImplicitOAuthFlow_descriptor; + } + + @java.lang.Override + public io.a2a.grpc.ImplicitOAuthFlow getDefaultInstanceForType() { + return io.a2a.grpc.ImplicitOAuthFlow.getDefaultInstance(); + } + + @java.lang.Override + public io.a2a.grpc.ImplicitOAuthFlow build() { + io.a2a.grpc.ImplicitOAuthFlow result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.a2a.grpc.ImplicitOAuthFlow buildPartial() { + io.a2a.grpc.ImplicitOAuthFlow result = new io.a2a.grpc.ImplicitOAuthFlow(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.a2a.grpc.ImplicitOAuthFlow result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.authorizationUrl_ = authorizationUrl_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.refreshUrl_ = refreshUrl_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.scopes_ = internalGetScopes(); + result.scopes_.makeImmutable(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.a2a.grpc.ImplicitOAuthFlow) { + return mergeFrom((io.a2a.grpc.ImplicitOAuthFlow)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.a2a.grpc.ImplicitOAuthFlow other) { + if (other == io.a2a.grpc.ImplicitOAuthFlow.getDefaultInstance()) return this; + if (!other.getAuthorizationUrl().isEmpty()) { + authorizationUrl_ = other.authorizationUrl_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRefreshUrl().isEmpty()) { + refreshUrl_ = other.refreshUrl_; + bitField0_ |= 0x00000002; + onChanged(); + } + internalGetMutableScopes().mergeFrom( + other.internalGetScopes()); + bitField0_ |= 0x00000004; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + authorizationUrl_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + refreshUrl_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + com.google.protobuf.MapEntry + scopes__ = input.readMessage( + ScopesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableScopes().getMutableMap().put( + scopes__.getKey(), scopes__.getValue()); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object authorizationUrl_ = ""; + /** + *
+     * The authorization URL to be used for this flow. This MUST be in the
+     * form of a URL. The OAuth2 standard requires the use of TLS
+     * 
+ * + * string authorization_url = 1; + * @return The authorizationUrl. + */ + public java.lang.String getAuthorizationUrl() { + java.lang.Object ref = authorizationUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + authorizationUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The authorization URL to be used for this flow. This MUST be in the
+     * form of a URL. The OAuth2 standard requires the use of TLS
+     * 
+ * + * string authorization_url = 1; + * @return The bytes for authorizationUrl. + */ + public com.google.protobuf.ByteString + getAuthorizationUrlBytes() { + java.lang.Object ref = authorizationUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + authorizationUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The authorization URL to be used for this flow. This MUST be in the
+     * form of a URL. The OAuth2 standard requires the use of TLS
+     * 
+ * + * string authorization_url = 1; + * @param value The authorizationUrl to set. + * @return This builder for chaining. + */ + public Builder setAuthorizationUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + authorizationUrl_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The authorization URL to be used for this flow. This MUST be in the
+     * form of a URL. The OAuth2 standard requires the use of TLS
+     * 
+ * + * string authorization_url = 1; + * @return This builder for chaining. + */ + public Builder clearAuthorizationUrl() { + authorizationUrl_ = getDefaultInstance().getAuthorizationUrl(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The authorization URL to be used for this flow. This MUST be in the
+     * form of a URL. The OAuth2 standard requires the use of TLS
+     * 
+ * + * string authorization_url = 1; + * @param value The bytes for authorizationUrl to set. + * @return This builder for chaining. + */ + public Builder setAuthorizationUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + authorizationUrl_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object refreshUrl_ = ""; + /** + *
+     * The URL to be used for obtaining refresh tokens. This MUST be in the
+     * form of a URL. The OAuth2 standard requires the use of TLS.
+     * 
+ * + * string refresh_url = 2; + * @return The refreshUrl. + */ + public java.lang.String getRefreshUrl() { + java.lang.Object ref = refreshUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + refreshUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The URL to be used for obtaining refresh tokens. This MUST be in the
+     * form of a URL. The OAuth2 standard requires the use of TLS.
+     * 
+ * + * string refresh_url = 2; + * @return The bytes for refreshUrl. + */ + public com.google.protobuf.ByteString + getRefreshUrlBytes() { + java.lang.Object ref = refreshUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + refreshUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The URL to be used for obtaining refresh tokens. This MUST be in the
+     * form of a URL. The OAuth2 standard requires the use of TLS.
+     * 
+ * + * string refresh_url = 2; + * @param value The refreshUrl to set. + * @return This builder for chaining. + */ + public Builder setRefreshUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + refreshUrl_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The URL to be used for obtaining refresh tokens. This MUST be in the
+     * form of a URL. The OAuth2 standard requires the use of TLS.
+     * 
+ * + * string refresh_url = 2; + * @return This builder for chaining. + */ + public Builder clearRefreshUrl() { + refreshUrl_ = getDefaultInstance().getRefreshUrl(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The URL to be used for obtaining refresh tokens. This MUST be in the
+     * form of a URL. The OAuth2 standard requires the use of TLS.
+     * 
+ * + * string refresh_url = 2; + * @param value The bytes for refreshUrl to set. + * @return This builder for chaining. + */ + public Builder setRefreshUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + refreshUrl_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> scopes_; + private com.google.protobuf.MapField + internalGetScopes() { + if (scopes_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ScopesDefaultEntryHolder.defaultEntry); + } + return scopes_; + } + private com.google.protobuf.MapField + internalGetMutableScopes() { + if (scopes_ == null) { + scopes_ = com.google.protobuf.MapField.newMapField( + ScopesDefaultEntryHolder.defaultEntry); + } + if (!scopes_.isMutable()) { + scopes_ = scopes_.copy(); + } + bitField0_ |= 0x00000004; + onChanged(); + return scopes_; + } + public int getScopesCount() { + return internalGetScopes().getMap().size(); + } + /** + *
+     * The available scopes for the OAuth2 security scheme. A map between the
+     * scope name and a short description for it. The map MAY be empty.
+     * 
+ * + * map<string, string> scopes = 3; + */ + @java.lang.Override + public boolean containsScopes( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetScopes().getMap().containsKey(key); + } + /** + * Use {@link #getScopesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getScopes() { + return getScopesMap(); + } + /** + *
+     * The available scopes for the OAuth2 security scheme. A map between the
+     * scope name and a short description for it. The map MAY be empty.
+     * 
+ * + * map<string, string> scopes = 3; + */ + @java.lang.Override + public java.util.Map getScopesMap() { + return internalGetScopes().getMap(); + } + /** + *
+     * The available scopes for the OAuth2 security scheme. A map between the
+     * scope name and a short description for it. The map MAY be empty.
+     * 
+ * + * map<string, string> scopes = 3; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getScopesOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetScopes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * The available scopes for the OAuth2 security scheme. A map between the
+     * scope name and a short description for it. The map MAY be empty.
+     * 
+ * + * map<string, string> scopes = 3; + */ + @java.lang.Override + public java.lang.String getScopesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetScopes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearScopes() { + bitField0_ = (bitField0_ & ~0x00000004); + internalGetMutableScopes().getMutableMap() + .clear(); + return this; + } + /** + *
+     * The available scopes for the OAuth2 security scheme. A map between the
+     * scope name and a short description for it. The map MAY be empty.
+     * 
+ * + * map<string, string> scopes = 3; + */ + public Builder removeScopes( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableScopes().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableScopes() { + bitField0_ |= 0x00000004; + return internalGetMutableScopes().getMutableMap(); + } + /** + *
+     * The available scopes for the OAuth2 security scheme. A map between the
+     * scope name and a short description for it. The map MAY be empty.
+     * 
+ * + * map<string, string> scopes = 3; + */ + public Builder putScopes( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableScopes().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000004; + return this; + } + /** + *
+     * The available scopes for the OAuth2 security scheme. A map between the
+     * scope name and a short description for it. The map MAY be empty.
+     * 
+ * + * map<string, string> scopes = 3; + */ + public Builder putAllScopes( + java.util.Map values) { + internalGetMutableScopes().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000004; + return this; + } + + // @@protoc_insertion_point(builder_scope:a2a.v1.ImplicitOAuthFlow) + } + + // @@protoc_insertion_point(class_scope:a2a.v1.ImplicitOAuthFlow) + private static final io.a2a.grpc.ImplicitOAuthFlow DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.a2a.grpc.ImplicitOAuthFlow(); + } + + public static io.a2a.grpc.ImplicitOAuthFlow getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ImplicitOAuthFlow parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.a2a.grpc.ImplicitOAuthFlow getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/spec-grpc/src/main/java/io/a2a/grpc/ImplicitOAuthFlowOrBuilder.java b/spec-grpc/src/main/java/io/a2a/grpc/ImplicitOAuthFlowOrBuilder.java new file mode 100644 index 000000000..3b0180dbc --- /dev/null +++ b/spec-grpc/src/main/java/io/a2a/grpc/ImplicitOAuthFlowOrBuilder.java @@ -0,0 +1,115 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: a2a.proto +// Protobuf Java Version: 4.33.1 + +package io.a2a.grpc; + +@com.google.protobuf.Generated +public interface ImplicitOAuthFlowOrBuilder extends + // @@protoc_insertion_point(interface_extends:a2a.v1.ImplicitOAuthFlow) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The authorization URL to be used for this flow. This MUST be in the
+   * form of a URL. The OAuth2 standard requires the use of TLS
+   * 
+ * + * string authorization_url = 1; + * @return The authorizationUrl. + */ + java.lang.String getAuthorizationUrl(); + /** + *
+   * The authorization URL to be used for this flow. This MUST be in the
+   * form of a URL. The OAuth2 standard requires the use of TLS
+   * 
+ * + * string authorization_url = 1; + * @return The bytes for authorizationUrl. + */ + com.google.protobuf.ByteString + getAuthorizationUrlBytes(); + + /** + *
+   * The URL to be used for obtaining refresh tokens. This MUST be in the
+   * form of a URL. The OAuth2 standard requires the use of TLS.
+   * 
+ * + * string refresh_url = 2; + * @return The refreshUrl. + */ + java.lang.String getRefreshUrl(); + /** + *
+   * The URL to be used for obtaining refresh tokens. This MUST be in the
+   * form of a URL. The OAuth2 standard requires the use of TLS.
+   * 
+ * + * string refresh_url = 2; + * @return The bytes for refreshUrl. + */ + com.google.protobuf.ByteString + getRefreshUrlBytes(); + + /** + *
+   * The available scopes for the OAuth2 security scheme. A map between the
+   * scope name and a short description for it. The map MAY be empty.
+   * 
+ * + * map<string, string> scopes = 3; + */ + int getScopesCount(); + /** + *
+   * The available scopes for the OAuth2 security scheme. A map between the
+   * scope name and a short description for it. The map MAY be empty.
+   * 
+ * + * map<string, string> scopes = 3; + */ + boolean containsScopes( + java.lang.String key); + /** + * Use {@link #getScopesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getScopes(); + /** + *
+   * The available scopes for the OAuth2 security scheme. A map between the
+   * scope name and a short description for it. The map MAY be empty.
+   * 
+ * + * map<string, string> scopes = 3; + */ + java.util.Map + getScopesMap(); + /** + *
+   * The available scopes for the OAuth2 security scheme. A map between the
+   * scope name and a short description for it. The map MAY be empty.
+   * 
+ * + * map<string, string> scopes = 3; + */ + /* nullable */ +java.lang.String getScopesOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * The available scopes for the OAuth2 security scheme. A map between the
+   * scope name and a short description for it. The map MAY be empty.
+   * 
+ * + * map<string, string> scopes = 3; + */ + java.lang.String getScopesOrThrow( + java.lang.String key); +} diff --git a/spec-grpc/src/main/java/io/a2a/grpc/ListTaskPushNotificationConfigRequest.java b/spec-grpc/src/main/java/io/a2a/grpc/ListTaskPushNotificationConfigRequest.java index cbcdcfd18..b80396df7 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/ListTaskPushNotificationConfigRequest.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/ListTaskPushNotificationConfigRequest.java @@ -33,7 +33,7 @@ private ListTaskPushNotificationConfigRequest(com.google.protobuf.GeneratedMessa } private ListTaskPushNotificationConfigRequest() { tenant_ = ""; - parent_ = ""; + taskId_ = ""; pageToken_ = ""; } @@ -97,49 +97,47 @@ public java.lang.String getTenant() { } } - public static final int PARENT_FIELD_NUMBER = 1; + public static final int TASK_ID_FIELD_NUMBER = 1; @SuppressWarnings("serial") - private volatile java.lang.Object parent_ = ""; + private volatile java.lang.Object taskId_ = ""; /** *
-   * The parent task resource.
-   * Format: tasks/{task_id}
+   * The parent task resource id.
    * 
* - * string parent = 1; - * @return The parent. + * string task_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The taskId. */ @java.lang.Override - public java.lang.String getParent() { - java.lang.Object ref = parent_; + public java.lang.String getTaskId() { + java.lang.Object ref = taskId_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - parent_ = s; + taskId_ = s; return s; } } /** *
-   * The parent task resource.
-   * Format: tasks/{task_id}
+   * The parent task resource id.
    * 
* - * string parent = 1; - * @return The bytes for parent. + * string task_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for taskId. */ @java.lang.Override public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; + getTaskIdBytes() { + java.lang.Object ref = taskId_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - parent_ = b; + taskId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -222,8 +220,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(taskId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, taskId_); } if (pageSize_ != 0) { output.writeInt32(2, pageSize_); @@ -243,8 +241,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(taskId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, taskId_); } if (pageSize_ != 0) { size += com.google.protobuf.CodedOutputStream @@ -273,8 +271,8 @@ public boolean equals(final java.lang.Object obj) { if (!getTenant() .equals(other.getTenant())) return false; - if (!getParent() - .equals(other.getParent())) return false; + if (!getTaskId() + .equals(other.getTaskId())) return false; if (getPageSize() != other.getPageSize()) return false; if (!getPageToken() @@ -292,8 +290,8 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + TENANT_FIELD_NUMBER; hash = (53 * hash) + getTenant().hashCode(); - hash = (37 * hash) + PARENT_FIELD_NUMBER; - hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + TASK_ID_FIELD_NUMBER; + hash = (53 * hash) + getTaskId().hashCode(); hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; hash = (53 * hash) + getPageSize(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; @@ -434,7 +432,7 @@ public Builder clear() { super.clear(); bitField0_ = 0; tenant_ = ""; - parent_ = ""; + taskId_ = ""; pageSize_ = 0; pageToken_ = ""; return this; @@ -474,7 +472,7 @@ private void buildPartial0(io.a2a.grpc.ListTaskPushNotificationConfigRequest res result.tenant_ = tenant_; } if (((from_bitField0_ & 0x00000002) != 0)) { - result.parent_ = parent_; + result.taskId_ = taskId_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.pageSize_ = pageSize_; @@ -501,8 +499,8 @@ public Builder mergeFrom(io.a2a.grpc.ListTaskPushNotificationConfigRequest other bitField0_ |= 0x00000001; onChanged(); } - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; + if (!other.getTaskId().isEmpty()) { + taskId_ = other.taskId_; bitField0_ |= 0x00000002; onChanged(); } @@ -541,7 +539,7 @@ public Builder mergeFrom( done = true; break; case 10: { - parent_ = input.readStringRequireUtf8(); + taskId_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 10 @@ -669,23 +667,22 @@ public Builder setTenantBytes( return this; } - private java.lang.Object parent_ = ""; + private java.lang.Object taskId_ = ""; /** *
-     * The parent task resource.
-     * Format: tasks/{task_id}
+     * The parent task resource id.
      * 
* - * string parent = 1; - * @return The parent. + * string task_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The taskId. */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; + public java.lang.String getTaskId() { + java.lang.Object ref = taskId_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - parent_ = s; + taskId_ = s; return s; } else { return (java.lang.String) ref; @@ -693,21 +690,20 @@ public java.lang.String getParent() { } /** *
-     * The parent task resource.
-     * Format: tasks/{task_id}
+     * The parent task resource id.
      * 
* - * string parent = 1; - * @return The bytes for parent. + * string task_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for taskId. */ public com.google.protobuf.ByteString - getParentBytes() { - java.lang.Object ref = parent_; + getTaskIdBytes() { + java.lang.Object ref = taskId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - parent_ = b; + taskId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -715,52 +711,49 @@ public java.lang.String getParent() { } /** *
-     * The parent task resource.
-     * Format: tasks/{task_id}
+     * The parent task resource id.
      * 
* - * string parent = 1; - * @param value The parent to set. + * string task_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The taskId to set. * @return This builder for chaining. */ - public Builder setParent( + public Builder setTaskId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - parent_ = value; + taskId_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** *
-     * The parent task resource.
-     * Format: tasks/{task_id}
+     * The parent task resource id.
      * 
* - * string parent = 1; + * string task_id = 1 [(.google.api.field_behavior) = REQUIRED]; * @return This builder for chaining. */ - public Builder clearParent() { - parent_ = getDefaultInstance().getParent(); + public Builder clearTaskId() { + taskId_ = getDefaultInstance().getTaskId(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** *
-     * The parent task resource.
-     * Format: tasks/{task_id}
+     * The parent task resource id.
      * 
* - * string parent = 1; - * @param value The bytes for parent to set. + * string task_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for taskId to set. * @return This builder for chaining. */ - public Builder setParentBytes( + public Builder setTaskIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - parent_ = value; + taskId_ = value; bitField0_ |= 0x00000002; onChanged(); return this; diff --git a/spec-grpc/src/main/java/io/a2a/grpc/ListTaskPushNotificationConfigRequestOrBuilder.java b/spec-grpc/src/main/java/io/a2a/grpc/ListTaskPushNotificationConfigRequestOrBuilder.java index 690539ac2..ba43bb3d7 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/ListTaskPushNotificationConfigRequestOrBuilder.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/ListTaskPushNotificationConfigRequestOrBuilder.java @@ -32,25 +32,23 @@ public interface ListTaskPushNotificationConfigRequestOrBuilder extends /** *
-   * The parent task resource.
-   * Format: tasks/{task_id}
+   * The parent task resource id.
    * 
* - * string parent = 1; - * @return The parent. + * string task_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The taskId. */ - java.lang.String getParent(); + java.lang.String getTaskId(); /** *
-   * The parent task resource.
-   * Format: tasks/{task_id}
+   * The parent task resource id.
    * 
* - * string parent = 1; - * @return The bytes for parent. + * string task_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for taskId. */ com.google.protobuf.ByteString - getParentBytes(); + getTaskIdBytes(); /** *
diff --git a/spec-grpc/src/main/java/io/a2a/grpc/OAuthFlows.java b/spec-grpc/src/main/java/io/a2a/grpc/OAuthFlows.java
index e4fd7c957..8b1a661f7 100644
--- a/spec-grpc/src/main/java/io/a2a/grpc/OAuthFlows.java
+++ b/spec-grpc/src/main/java/io/a2a/grpc/OAuthFlows.java
@@ -56,6 +56,8 @@ public enum FlowCase
           com.google.protobuf.AbstractMessage.InternalOneOfEnum {
     AUTHORIZATION_CODE(1),
     CLIENT_CREDENTIALS(2),
+    @java.lang.Deprecated IMPLICIT(3),
+    @java.lang.Deprecated PASSWORD(4),
     DEVICE_CODE(5),
     FLOW_NOT_SET(0);
     private final int value;
@@ -76,6 +78,8 @@ public static FlowCase forNumber(int value) {
       switch (value) {
         case 1: return AUTHORIZATION_CODE;
         case 2: return CLIENT_CREDENTIALS;
+        case 3: return IMPLICIT;
+        case 4: return PASSWORD;
         case 5: return DEVICE_CODE;
         case 0: return FLOW_NOT_SET;
         default: return null;
@@ -178,6 +182,76 @@ public io.a2a.grpc.ClientCredentialsOAuthFlowOrBuilder getClientCredentialsOrBui
     return io.a2a.grpc.ClientCredentialsOAuthFlow.getDefaultInstance();
   }
 
+  public static final int IMPLICIT_FIELD_NUMBER = 3;
+  /**
+   * .a2a.v1.ImplicitOAuthFlow implicit = 3 [deprecated = true];
+   * @deprecated a2a.v1.OAuthFlows.implicit is deprecated.
+   *     See a2a.proto;l=633
+   * @return Whether the implicit field is set.
+   */
+  @java.lang.Override
+  @java.lang.Deprecated public boolean hasImplicit() {
+    return flowCase_ == 3;
+  }
+  /**
+   * .a2a.v1.ImplicitOAuthFlow implicit = 3 [deprecated = true];
+   * @deprecated a2a.v1.OAuthFlows.implicit is deprecated.
+   *     See a2a.proto;l=633
+   * @return The implicit.
+   */
+  @java.lang.Override
+  @java.lang.Deprecated public io.a2a.grpc.ImplicitOAuthFlow getImplicit() {
+    if (flowCase_ == 3) {
+       return (io.a2a.grpc.ImplicitOAuthFlow) flow_;
+    }
+    return io.a2a.grpc.ImplicitOAuthFlow.getDefaultInstance();
+  }
+  /**
+   * .a2a.v1.ImplicitOAuthFlow implicit = 3 [deprecated = true];
+   */
+  @java.lang.Override
+  @java.lang.Deprecated public io.a2a.grpc.ImplicitOAuthFlowOrBuilder getImplicitOrBuilder() {
+    if (flowCase_ == 3) {
+       return (io.a2a.grpc.ImplicitOAuthFlow) flow_;
+    }
+    return io.a2a.grpc.ImplicitOAuthFlow.getDefaultInstance();
+  }
+
+  public static final int PASSWORD_FIELD_NUMBER = 4;
+  /**
+   * .a2a.v1.PasswordOAuthFlow password = 4 [deprecated = true];
+   * @deprecated a2a.v1.OAuthFlows.password is deprecated.
+   *     See a2a.proto;l=634
+   * @return Whether the password field is set.
+   */
+  @java.lang.Override
+  @java.lang.Deprecated public boolean hasPassword() {
+    return flowCase_ == 4;
+  }
+  /**
+   * .a2a.v1.PasswordOAuthFlow password = 4 [deprecated = true];
+   * @deprecated a2a.v1.OAuthFlows.password is deprecated.
+   *     See a2a.proto;l=634
+   * @return The password.
+   */
+  @java.lang.Override
+  @java.lang.Deprecated public io.a2a.grpc.PasswordOAuthFlow getPassword() {
+    if (flowCase_ == 4) {
+       return (io.a2a.grpc.PasswordOAuthFlow) flow_;
+    }
+    return io.a2a.grpc.PasswordOAuthFlow.getDefaultInstance();
+  }
+  /**
+   * .a2a.v1.PasswordOAuthFlow password = 4 [deprecated = true];
+   */
+  @java.lang.Override
+  @java.lang.Deprecated public io.a2a.grpc.PasswordOAuthFlowOrBuilder getPasswordOrBuilder() {
+    if (flowCase_ == 4) {
+       return (io.a2a.grpc.PasswordOAuthFlow) flow_;
+    }
+    return io.a2a.grpc.PasswordOAuthFlow.getDefaultInstance();
+  }
+
   public static final int DEVICE_CODE_FIELD_NUMBER = 5;
   /**
    * 
@@ -241,6 +315,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
     if (flowCase_ == 2) {
       output.writeMessage(2, (io.a2a.grpc.ClientCredentialsOAuthFlow) flow_);
     }
+    if (flowCase_ == 3) {
+      output.writeMessage(3, (io.a2a.grpc.ImplicitOAuthFlow) flow_);
+    }
+    if (flowCase_ == 4) {
+      output.writeMessage(4, (io.a2a.grpc.PasswordOAuthFlow) flow_);
+    }
     if (flowCase_ == 5) {
       output.writeMessage(5, (io.a2a.grpc.DeviceCodeOAuthFlow) flow_);
     }
@@ -261,6 +341,14 @@ public int getSerializedSize() {
       size += com.google.protobuf.CodedOutputStream
         .computeMessageSize(2, (io.a2a.grpc.ClientCredentialsOAuthFlow) flow_);
     }
+    if (flowCase_ == 3) {
+      size += com.google.protobuf.CodedOutputStream
+        .computeMessageSize(3, (io.a2a.grpc.ImplicitOAuthFlow) flow_);
+    }
+    if (flowCase_ == 4) {
+      size += com.google.protobuf.CodedOutputStream
+        .computeMessageSize(4, (io.a2a.grpc.PasswordOAuthFlow) flow_);
+    }
     if (flowCase_ == 5) {
       size += com.google.protobuf.CodedOutputStream
         .computeMessageSize(5, (io.a2a.grpc.DeviceCodeOAuthFlow) flow_);
@@ -290,6 +378,14 @@ public boolean equals(final java.lang.Object obj) {
         if (!getClientCredentials()
             .equals(other.getClientCredentials())) return false;
         break;
+      case 3:
+        if (!getImplicit()
+            .equals(other.getImplicit())) return false;
+        break;
+      case 4:
+        if (!getPassword()
+            .equals(other.getPassword())) return false;
+        break;
       case 5:
         if (!getDeviceCode()
             .equals(other.getDeviceCode())) return false;
@@ -317,6 +413,14 @@ public int hashCode() {
         hash = (37 * hash) + CLIENT_CREDENTIALS_FIELD_NUMBER;
         hash = (53 * hash) + getClientCredentials().hashCode();
         break;
+      case 3:
+        hash = (37 * hash) + IMPLICIT_FIELD_NUMBER;
+        hash = (53 * hash) + getImplicit().hashCode();
+        break;
+      case 4:
+        hash = (37 * hash) + PASSWORD_FIELD_NUMBER;
+        hash = (53 * hash) + getPassword().hashCode();
+        break;
       case 5:
         hash = (37 * hash) + DEVICE_CODE_FIELD_NUMBER;
         hash = (53 * hash) + getDeviceCode().hashCode();
@@ -466,6 +570,12 @@ public Builder clear() {
       if (clientCredentialsBuilder_ != null) {
         clientCredentialsBuilder_.clear();
       }
+      if (implicitBuilder_ != null) {
+        implicitBuilder_.clear();
+      }
+      if (passwordBuilder_ != null) {
+        passwordBuilder_.clear();
+      }
       if (deviceCodeBuilder_ != null) {
         deviceCodeBuilder_.clear();
       }
@@ -518,6 +628,14 @@ private void buildPartialOneofs(io.a2a.grpc.OAuthFlows result) {
           clientCredentialsBuilder_ != null) {
         result.flow_ = clientCredentialsBuilder_.build();
       }
+      if (flowCase_ == 3 &&
+          implicitBuilder_ != null) {
+        result.flow_ = implicitBuilder_.build();
+      }
+      if (flowCase_ == 4 &&
+          passwordBuilder_ != null) {
+        result.flow_ = passwordBuilder_.build();
+      }
       if (flowCase_ == 5 &&
           deviceCodeBuilder_ != null) {
         result.flow_ = deviceCodeBuilder_.build();
@@ -545,6 +663,14 @@ public Builder mergeFrom(io.a2a.grpc.OAuthFlows other) {
           mergeClientCredentials(other.getClientCredentials());
           break;
         }
+        case IMPLICIT: {
+          mergeImplicit(other.getImplicit());
+          break;
+        }
+        case PASSWORD: {
+          mergePassword(other.getPassword());
+          break;
+        }
         case DEVICE_CODE: {
           mergeDeviceCode(other.getDeviceCode());
           break;
@@ -593,6 +719,20 @@ public Builder mergeFrom(
               flowCase_ = 2;
               break;
             } // case 18
+            case 26: {
+              input.readMessage(
+                  internalGetImplicitFieldBuilder().getBuilder(),
+                  extensionRegistry);
+              flowCase_ = 3;
+              break;
+            } // case 26
+            case 34: {
+              input.readMessage(
+                  internalGetPasswordFieldBuilder().getBuilder(),
+                  extensionRegistry);
+              flowCase_ = 4;
+              break;
+            } // case 34
             case 42: {
               input.readMessage(
                   internalGetDeviceCodeFieldBuilder().getBuilder(),
@@ -988,6 +1128,298 @@ public io.a2a.grpc.ClientCredentialsOAuthFlowOrBuilder getClientCredentialsOrBui
       return clientCredentialsBuilder_;
     }
 
+    private com.google.protobuf.SingleFieldBuilder<
+        io.a2a.grpc.ImplicitOAuthFlow, io.a2a.grpc.ImplicitOAuthFlow.Builder, io.a2a.grpc.ImplicitOAuthFlowOrBuilder> implicitBuilder_;
+    /**
+     * .a2a.v1.ImplicitOAuthFlow implicit = 3 [deprecated = true];
+     * @deprecated a2a.v1.OAuthFlows.implicit is deprecated.
+     *     See a2a.proto;l=633
+     * @return Whether the implicit field is set.
+     */
+    @java.lang.Override
+    @java.lang.Deprecated public boolean hasImplicit() {
+      return flowCase_ == 3;
+    }
+    /**
+     * .a2a.v1.ImplicitOAuthFlow implicit = 3 [deprecated = true];
+     * @deprecated a2a.v1.OAuthFlows.implicit is deprecated.
+     *     See a2a.proto;l=633
+     * @return The implicit.
+     */
+    @java.lang.Override
+    @java.lang.Deprecated public io.a2a.grpc.ImplicitOAuthFlow getImplicit() {
+      if (implicitBuilder_ == null) {
+        if (flowCase_ == 3) {
+          return (io.a2a.grpc.ImplicitOAuthFlow) flow_;
+        }
+        return io.a2a.grpc.ImplicitOAuthFlow.getDefaultInstance();
+      } else {
+        if (flowCase_ == 3) {
+          return implicitBuilder_.getMessage();
+        }
+        return io.a2a.grpc.ImplicitOAuthFlow.getDefaultInstance();
+      }
+    }
+    /**
+     * .a2a.v1.ImplicitOAuthFlow implicit = 3 [deprecated = true];
+     */
+    @java.lang.Deprecated public Builder setImplicit(io.a2a.grpc.ImplicitOAuthFlow value) {
+      if (implicitBuilder_ == null) {
+        if (value == null) {
+          throw new NullPointerException();
+        }
+        flow_ = value;
+        onChanged();
+      } else {
+        implicitBuilder_.setMessage(value);
+      }
+      flowCase_ = 3;
+      return this;
+    }
+    /**
+     * .a2a.v1.ImplicitOAuthFlow implicit = 3 [deprecated = true];
+     */
+    @java.lang.Deprecated public Builder setImplicit(
+        io.a2a.grpc.ImplicitOAuthFlow.Builder builderForValue) {
+      if (implicitBuilder_ == null) {
+        flow_ = builderForValue.build();
+        onChanged();
+      } else {
+        implicitBuilder_.setMessage(builderForValue.build());
+      }
+      flowCase_ = 3;
+      return this;
+    }
+    /**
+     * .a2a.v1.ImplicitOAuthFlow implicit = 3 [deprecated = true];
+     */
+    @java.lang.Deprecated public Builder mergeImplicit(io.a2a.grpc.ImplicitOAuthFlow value) {
+      if (implicitBuilder_ == null) {
+        if (flowCase_ == 3 &&
+            flow_ != io.a2a.grpc.ImplicitOAuthFlow.getDefaultInstance()) {
+          flow_ = io.a2a.grpc.ImplicitOAuthFlow.newBuilder((io.a2a.grpc.ImplicitOAuthFlow) flow_)
+              .mergeFrom(value).buildPartial();
+        } else {
+          flow_ = value;
+        }
+        onChanged();
+      } else {
+        if (flowCase_ == 3) {
+          implicitBuilder_.mergeFrom(value);
+        } else {
+          implicitBuilder_.setMessage(value);
+        }
+      }
+      flowCase_ = 3;
+      return this;
+    }
+    /**
+     * .a2a.v1.ImplicitOAuthFlow implicit = 3 [deprecated = true];
+     */
+    @java.lang.Deprecated public Builder clearImplicit() {
+      if (implicitBuilder_ == null) {
+        if (flowCase_ == 3) {
+          flowCase_ = 0;
+          flow_ = null;
+          onChanged();
+        }
+      } else {
+        if (flowCase_ == 3) {
+          flowCase_ = 0;
+          flow_ = null;
+        }
+        implicitBuilder_.clear();
+      }
+      return this;
+    }
+    /**
+     * .a2a.v1.ImplicitOAuthFlow implicit = 3 [deprecated = true];
+     */
+    @java.lang.Deprecated public io.a2a.grpc.ImplicitOAuthFlow.Builder getImplicitBuilder() {
+      return internalGetImplicitFieldBuilder().getBuilder();
+    }
+    /**
+     * .a2a.v1.ImplicitOAuthFlow implicit = 3 [deprecated = true];
+     */
+    @java.lang.Override
+    @java.lang.Deprecated public io.a2a.grpc.ImplicitOAuthFlowOrBuilder getImplicitOrBuilder() {
+      if ((flowCase_ == 3) && (implicitBuilder_ != null)) {
+        return implicitBuilder_.getMessageOrBuilder();
+      } else {
+        if (flowCase_ == 3) {
+          return (io.a2a.grpc.ImplicitOAuthFlow) flow_;
+        }
+        return io.a2a.grpc.ImplicitOAuthFlow.getDefaultInstance();
+      }
+    }
+    /**
+     * .a2a.v1.ImplicitOAuthFlow implicit = 3 [deprecated = true];
+     */
+    private com.google.protobuf.SingleFieldBuilder<
+        io.a2a.grpc.ImplicitOAuthFlow, io.a2a.grpc.ImplicitOAuthFlow.Builder, io.a2a.grpc.ImplicitOAuthFlowOrBuilder> 
+        internalGetImplicitFieldBuilder() {
+      if (implicitBuilder_ == null) {
+        if (!(flowCase_ == 3)) {
+          flow_ = io.a2a.grpc.ImplicitOAuthFlow.getDefaultInstance();
+        }
+        implicitBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+            io.a2a.grpc.ImplicitOAuthFlow, io.a2a.grpc.ImplicitOAuthFlow.Builder, io.a2a.grpc.ImplicitOAuthFlowOrBuilder>(
+                (io.a2a.grpc.ImplicitOAuthFlow) flow_,
+                getParentForChildren(),
+                isClean());
+        flow_ = null;
+      }
+      flowCase_ = 3;
+      onChanged();
+      return implicitBuilder_;
+    }
+
+    private com.google.protobuf.SingleFieldBuilder<
+        io.a2a.grpc.PasswordOAuthFlow, io.a2a.grpc.PasswordOAuthFlow.Builder, io.a2a.grpc.PasswordOAuthFlowOrBuilder> passwordBuilder_;
+    /**
+     * .a2a.v1.PasswordOAuthFlow password = 4 [deprecated = true];
+     * @deprecated a2a.v1.OAuthFlows.password is deprecated.
+     *     See a2a.proto;l=634
+     * @return Whether the password field is set.
+     */
+    @java.lang.Override
+    @java.lang.Deprecated public boolean hasPassword() {
+      return flowCase_ == 4;
+    }
+    /**
+     * .a2a.v1.PasswordOAuthFlow password = 4 [deprecated = true];
+     * @deprecated a2a.v1.OAuthFlows.password is deprecated.
+     *     See a2a.proto;l=634
+     * @return The password.
+     */
+    @java.lang.Override
+    @java.lang.Deprecated public io.a2a.grpc.PasswordOAuthFlow getPassword() {
+      if (passwordBuilder_ == null) {
+        if (flowCase_ == 4) {
+          return (io.a2a.grpc.PasswordOAuthFlow) flow_;
+        }
+        return io.a2a.grpc.PasswordOAuthFlow.getDefaultInstance();
+      } else {
+        if (flowCase_ == 4) {
+          return passwordBuilder_.getMessage();
+        }
+        return io.a2a.grpc.PasswordOAuthFlow.getDefaultInstance();
+      }
+    }
+    /**
+     * .a2a.v1.PasswordOAuthFlow password = 4 [deprecated = true];
+     */
+    @java.lang.Deprecated public Builder setPassword(io.a2a.grpc.PasswordOAuthFlow value) {
+      if (passwordBuilder_ == null) {
+        if (value == null) {
+          throw new NullPointerException();
+        }
+        flow_ = value;
+        onChanged();
+      } else {
+        passwordBuilder_.setMessage(value);
+      }
+      flowCase_ = 4;
+      return this;
+    }
+    /**
+     * .a2a.v1.PasswordOAuthFlow password = 4 [deprecated = true];
+     */
+    @java.lang.Deprecated public Builder setPassword(
+        io.a2a.grpc.PasswordOAuthFlow.Builder builderForValue) {
+      if (passwordBuilder_ == null) {
+        flow_ = builderForValue.build();
+        onChanged();
+      } else {
+        passwordBuilder_.setMessage(builderForValue.build());
+      }
+      flowCase_ = 4;
+      return this;
+    }
+    /**
+     * .a2a.v1.PasswordOAuthFlow password = 4 [deprecated = true];
+     */
+    @java.lang.Deprecated public Builder mergePassword(io.a2a.grpc.PasswordOAuthFlow value) {
+      if (passwordBuilder_ == null) {
+        if (flowCase_ == 4 &&
+            flow_ != io.a2a.grpc.PasswordOAuthFlow.getDefaultInstance()) {
+          flow_ = io.a2a.grpc.PasswordOAuthFlow.newBuilder((io.a2a.grpc.PasswordOAuthFlow) flow_)
+              .mergeFrom(value).buildPartial();
+        } else {
+          flow_ = value;
+        }
+        onChanged();
+      } else {
+        if (flowCase_ == 4) {
+          passwordBuilder_.mergeFrom(value);
+        } else {
+          passwordBuilder_.setMessage(value);
+        }
+      }
+      flowCase_ = 4;
+      return this;
+    }
+    /**
+     * .a2a.v1.PasswordOAuthFlow password = 4 [deprecated = true];
+     */
+    @java.lang.Deprecated public Builder clearPassword() {
+      if (passwordBuilder_ == null) {
+        if (flowCase_ == 4) {
+          flowCase_ = 0;
+          flow_ = null;
+          onChanged();
+        }
+      } else {
+        if (flowCase_ == 4) {
+          flowCase_ = 0;
+          flow_ = null;
+        }
+        passwordBuilder_.clear();
+      }
+      return this;
+    }
+    /**
+     * .a2a.v1.PasswordOAuthFlow password = 4 [deprecated = true];
+     */
+    @java.lang.Deprecated public io.a2a.grpc.PasswordOAuthFlow.Builder getPasswordBuilder() {
+      return internalGetPasswordFieldBuilder().getBuilder();
+    }
+    /**
+     * .a2a.v1.PasswordOAuthFlow password = 4 [deprecated = true];
+     */
+    @java.lang.Override
+    @java.lang.Deprecated public io.a2a.grpc.PasswordOAuthFlowOrBuilder getPasswordOrBuilder() {
+      if ((flowCase_ == 4) && (passwordBuilder_ != null)) {
+        return passwordBuilder_.getMessageOrBuilder();
+      } else {
+        if (flowCase_ == 4) {
+          return (io.a2a.grpc.PasswordOAuthFlow) flow_;
+        }
+        return io.a2a.grpc.PasswordOAuthFlow.getDefaultInstance();
+      }
+    }
+    /**
+     * .a2a.v1.PasswordOAuthFlow password = 4 [deprecated = true];
+     */
+    private com.google.protobuf.SingleFieldBuilder<
+        io.a2a.grpc.PasswordOAuthFlow, io.a2a.grpc.PasswordOAuthFlow.Builder, io.a2a.grpc.PasswordOAuthFlowOrBuilder> 
+        internalGetPasswordFieldBuilder() {
+      if (passwordBuilder_ == null) {
+        if (!(flowCase_ == 4)) {
+          flow_ = io.a2a.grpc.PasswordOAuthFlow.getDefaultInstance();
+        }
+        passwordBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+            io.a2a.grpc.PasswordOAuthFlow, io.a2a.grpc.PasswordOAuthFlow.Builder, io.a2a.grpc.PasswordOAuthFlowOrBuilder>(
+                (io.a2a.grpc.PasswordOAuthFlow) flow_,
+                getParentForChildren(),
+                isClean());
+        flow_ = null;
+      }
+      flowCase_ = 4;
+      onChanged();
+      return passwordBuilder_;
+    }
+
     private com.google.protobuf.SingleFieldBuilder<
         io.a2a.grpc.DeviceCodeOAuthFlow, io.a2a.grpc.DeviceCodeOAuthFlow.Builder, io.a2a.grpc.DeviceCodeOAuthFlowOrBuilder> deviceCodeBuilder_;
     /**
diff --git a/spec-grpc/src/main/java/io/a2a/grpc/OAuthFlowsOrBuilder.java b/spec-grpc/src/main/java/io/a2a/grpc/OAuthFlowsOrBuilder.java
index cb84fa83e..1debd6d12 100644
--- a/spec-grpc/src/main/java/io/a2a/grpc/OAuthFlowsOrBuilder.java
+++ b/spec-grpc/src/main/java/io/a2a/grpc/OAuthFlowsOrBuilder.java
@@ -64,6 +64,44 @@ public interface OAuthFlowsOrBuilder extends
    */
   io.a2a.grpc.ClientCredentialsOAuthFlowOrBuilder getClientCredentialsOrBuilder();
 
+  /**
+   * .a2a.v1.ImplicitOAuthFlow implicit = 3 [deprecated = true];
+   * @deprecated a2a.v1.OAuthFlows.implicit is deprecated.
+   *     See a2a.proto;l=633
+   * @return Whether the implicit field is set.
+   */
+  @java.lang.Deprecated boolean hasImplicit();
+  /**
+   * .a2a.v1.ImplicitOAuthFlow implicit = 3 [deprecated = true];
+   * @deprecated a2a.v1.OAuthFlows.implicit is deprecated.
+   *     See a2a.proto;l=633
+   * @return The implicit.
+   */
+  @java.lang.Deprecated io.a2a.grpc.ImplicitOAuthFlow getImplicit();
+  /**
+   * .a2a.v1.ImplicitOAuthFlow implicit = 3 [deprecated = true];
+   */
+  @java.lang.Deprecated io.a2a.grpc.ImplicitOAuthFlowOrBuilder getImplicitOrBuilder();
+
+  /**
+   * .a2a.v1.PasswordOAuthFlow password = 4 [deprecated = true];
+   * @deprecated a2a.v1.OAuthFlows.password is deprecated.
+   *     See a2a.proto;l=634
+   * @return Whether the password field is set.
+   */
+  @java.lang.Deprecated boolean hasPassword();
+  /**
+   * .a2a.v1.PasswordOAuthFlow password = 4 [deprecated = true];
+   * @deprecated a2a.v1.OAuthFlows.password is deprecated.
+   *     See a2a.proto;l=634
+   * @return The password.
+   */
+  @java.lang.Deprecated io.a2a.grpc.PasswordOAuthFlow getPassword();
+  /**
+   * .a2a.v1.PasswordOAuthFlow password = 4 [deprecated = true];
+   */
+  @java.lang.Deprecated io.a2a.grpc.PasswordOAuthFlowOrBuilder getPasswordOrBuilder();
+
   /**
    * 
    * Configuration for the OAuth Device Code flow.
diff --git a/spec-grpc/src/main/java/io/a2a/grpc/Part.java b/spec-grpc/src/main/java/io/a2a/grpc/Part.java
index 511d10dae..879380c96 100644
--- a/spec-grpc/src/main/java/io/a2a/grpc/Part.java
+++ b/spec-grpc/src/main/java/io/a2a/grpc/Part.java
@@ -35,6 +35,8 @@ private Part(com.google.protobuf.GeneratedMessage.Builder builder) {
     super(builder);
   }
   private Part() {
+    filename_ = "";
+    mediaType_ = "";
   }
 
   public static final com.google.protobuf.Descriptors.Descriptor
@@ -51,18 +53,19 @@ private Part() {
   }
 
   private int bitField0_;
-  private int partCase_ = 0;
+  private int contentCase_ = 0;
   @SuppressWarnings("serial")
-  private java.lang.Object part_;
-  public enum PartCase
+  private java.lang.Object content_;
+  public enum ContentCase
       implements com.google.protobuf.Internal.EnumLite,
           com.google.protobuf.AbstractMessage.InternalOneOfEnum {
     TEXT(1),
-    FILE(2),
-    DATA(3),
-    PART_NOT_SET(0);
+    RAW(2),
+    URL(3),
+    DATA(4),
+    CONTENT_NOT_SET(0);
     private final int value;
-    private PartCase(int value) {
+    private ContentCase(int value) {
       this.value = value;
     }
     /**
@@ -71,16 +74,17 @@ private PartCase(int value) {
      * @deprecated Use {@link #forNumber(int)} instead.
      */
     @java.lang.Deprecated
-    public static PartCase valueOf(int value) {
+    public static ContentCase valueOf(int value) {
       return forNumber(value);
     }
 
-    public static PartCase forNumber(int value) {
+    public static ContentCase forNumber(int value) {
       switch (value) {
         case 1: return TEXT;
-        case 2: return FILE;
-        case 3: return DATA;
-        case 0: return PART_NOT_SET;
+        case 2: return RAW;
+        case 3: return URL;
+        case 4: return DATA;
+        case 0: return CONTENT_NOT_SET;
         default: return null;
       }
     }
@@ -89,10 +93,10 @@ public int getNumber() {
     }
   };
 
-  public PartCase
-  getPartCase() {
-    return PartCase.forNumber(
-        partCase_);
+  public ContentCase
+  getContentCase() {
+    return ContentCase.forNumber(
+        contentCase_);
   }
 
   public static final int TEXT_FIELD_NUMBER = 1;
@@ -105,7 +109,7 @@ public int getNumber() {
    * @return Whether the text field is set.
    */
   public boolean hasText() {
-    return partCase_ == 1;
+    return contentCase_ == 1;
   }
   /**
    * 
@@ -117,8 +121,8 @@ public boolean hasText() {
    */
   public java.lang.String getText() {
     java.lang.Object ref = "";
-    if (partCase_ == 1) {
-      ref = part_;
+    if (contentCase_ == 1) {
+      ref = content_;
     }
     if (ref instanceof java.lang.String) {
       return (java.lang.String) ref;
@@ -126,8 +130,8 @@ public java.lang.String getText() {
       com.google.protobuf.ByteString bs = 
           (com.google.protobuf.ByteString) ref;
       java.lang.String s = bs.toStringUtf8();
-      if (partCase_ == 1) {
-        part_ = s;
+      if (contentCase_ == 1) {
+        content_ = s;
       }
       return s;
     }
@@ -143,15 +147,15 @@ public java.lang.String getText() {
   public com.google.protobuf.ByteString
       getTextBytes() {
     java.lang.Object ref = "";
-    if (partCase_ == 1) {
-      ref = part_;
+    if (contentCase_ == 1) {
+      ref = content_;
     }
     if (ref instanceof java.lang.String) {
       com.google.protobuf.ByteString b = 
           com.google.protobuf.ByteString.copyFromUtf8(
               (java.lang.String) ref);
-      if (partCase_ == 1) {
-        part_ = b;
+      if (contentCase_ == 1) {
+        content_ = b;
       }
       return b;
     } else {
@@ -159,100 +163,150 @@ public java.lang.String getText() {
     }
   }
 
-  public static final int FILE_FIELD_NUMBER = 2;
+  public static final int RAW_FIELD_NUMBER = 2;
   /**
    * 
-   * The file content, represented as either a URI or as base64-encoded bytes.
+   * The raw byte content of a file. In JSON serialization, this is encoded as a base64 string.
    * 
* - * .a2a.v1.FilePart file = 2; - * @return Whether the file field is set. + * bytes raw = 2; + * @return Whether the raw field is set. */ @java.lang.Override - public boolean hasFile() { - return partCase_ == 2; + public boolean hasRaw() { + return contentCase_ == 2; } /** *
-   * The file content, represented as either a URI or as base64-encoded bytes.
+   * The raw byte content of a file. In JSON serialization, this is encoded as a base64 string.
    * 
* - * .a2a.v1.FilePart file = 2; - * @return The file. + * bytes raw = 2; + * @return The raw. */ @java.lang.Override - public io.a2a.grpc.FilePart getFile() { - if (partCase_ == 2) { - return (io.a2a.grpc.FilePart) part_; + public com.google.protobuf.ByteString getRaw() { + if (contentCase_ == 2) { + return (com.google.protobuf.ByteString) content_; } - return io.a2a.grpc.FilePart.getDefaultInstance(); + return com.google.protobuf.ByteString.EMPTY; } + + public static final int URL_FIELD_NUMBER = 3; /** *
-   * The file content, represented as either a URI or as base64-encoded bytes.
+   * A URL pointing to the file's content.
    * 
* - * .a2a.v1.FilePart file = 2; + * string url = 3; + * @return Whether the url field is set. */ - @java.lang.Override - public io.a2a.grpc.FilePartOrBuilder getFileOrBuilder() { - if (partCase_ == 2) { - return (io.a2a.grpc.FilePart) part_; + public boolean hasUrl() { + return contentCase_ == 3; + } + /** + *
+   * A URL pointing to the file's content.
+   * 
+ * + * string url = 3; + * @return The url. + */ + public java.lang.String getUrl() { + java.lang.Object ref = ""; + if (contentCase_ == 3) { + ref = content_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (contentCase_ == 3) { + content_ = s; + } + return s; + } + } + /** + *
+   * A URL pointing to the file's content.
+   * 
+ * + * string url = 3; + * @return The bytes for url. + */ + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = ""; + if (contentCase_ == 3) { + ref = content_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (contentCase_ == 3) { + content_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - return io.a2a.grpc.FilePart.getDefaultInstance(); } - public static final int DATA_FIELD_NUMBER = 3; + public static final int DATA_FIELD_NUMBER = 4; /** *
-   * The structured data content.
+   * Arbitrary structured data as a JSON value (object, array, string, number, boolean, or null).
    * 
* - * .a2a.v1.DataPart data = 3; + * .google.protobuf.Value data = 4; * @return Whether the data field is set. */ @java.lang.Override public boolean hasData() { - return partCase_ == 3; + return contentCase_ == 4; } /** *
-   * The structured data content.
+   * Arbitrary structured data as a JSON value (object, array, string, number, boolean, or null).
    * 
* - * .a2a.v1.DataPart data = 3; + * .google.protobuf.Value data = 4; * @return The data. */ @java.lang.Override - public io.a2a.grpc.DataPart getData() { - if (partCase_ == 3) { - return (io.a2a.grpc.DataPart) part_; + public com.google.protobuf.Value getData() { + if (contentCase_ == 4) { + return (com.google.protobuf.Value) content_; } - return io.a2a.grpc.DataPart.getDefaultInstance(); + return com.google.protobuf.Value.getDefaultInstance(); } /** *
-   * The structured data content.
+   * Arbitrary structured data as a JSON value (object, array, string, number, boolean, or null).
    * 
* - * .a2a.v1.DataPart data = 3; + * .google.protobuf.Value data = 4; */ @java.lang.Override - public io.a2a.grpc.DataPartOrBuilder getDataOrBuilder() { - if (partCase_ == 3) { - return (io.a2a.grpc.DataPart) part_; + public com.google.protobuf.ValueOrBuilder getDataOrBuilder() { + if (contentCase_ == 4) { + return (com.google.protobuf.Value) content_; } - return io.a2a.grpc.DataPart.getDefaultInstance(); + return com.google.protobuf.Value.getDefaultInstance(); } - public static final int METADATA_FIELD_NUMBER = 4; + public static final int METADATA_FIELD_NUMBER = 5; private com.google.protobuf.Struct metadata_; /** *
    * Optional metadata associated with this part.
    * 
* - * .google.protobuf.Struct metadata = 4; + * .google.protobuf.Struct metadata = 5; * @return Whether the metadata field is set. */ @java.lang.Override @@ -264,7 +318,7 @@ public boolean hasMetadata() { * Optional metadata associated with this part. *
* - * .google.protobuf.Struct metadata = 4; + * .google.protobuf.Struct metadata = 5; * @return The metadata. */ @java.lang.Override @@ -276,13 +330,109 @@ public com.google.protobuf.Struct getMetadata() { * Optional metadata associated with this part. *
* - * .google.protobuf.Struct metadata = 4; + * .google.protobuf.Struct metadata = 5; */ @java.lang.Override public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() { return metadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : metadata_; } + public static final int FILENAME_FIELD_NUMBER = 6; + @SuppressWarnings("serial") + private volatile java.lang.Object filename_ = ""; + /** + *
+   * An optional name for the file (e.g., "document.pdf").
+   * 
+ * + * string filename = 6; + * @return The filename. + */ + @java.lang.Override + public java.lang.String getFilename() { + java.lang.Object ref = filename_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filename_ = s; + return s; + } + } + /** + *
+   * An optional name for the file (e.g., "document.pdf").
+   * 
+ * + * string filename = 6; + * @return The bytes for filename. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getFilenameBytes() { + java.lang.Object ref = filename_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filename_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MEDIA_TYPE_FIELD_NUMBER = 7; + @SuppressWarnings("serial") + private volatile java.lang.Object mediaType_ = ""; + /** + *
+   * The media type (MIME type) of the part content (e.g., "text/plain", "application/json", "image/png").
+   * This field is available for all part types.
+   * 
+ * + * string media_type = 7; + * @return The mediaType. + */ + @java.lang.Override + public java.lang.String getMediaType() { + java.lang.Object ref = mediaType_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mediaType_ = s; + return s; + } + } + /** + *
+   * The media type (MIME type) of the part content (e.g., "text/plain", "application/json", "image/png").
+   * This field is available for all part types.
+   * 
+ * + * string media_type = 7; + * @return The bytes for mediaType. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getMediaTypeBytes() { + java.lang.Object ref = mediaType_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mediaType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -297,17 +447,27 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (partCase_ == 1) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, part_); + if (contentCase_ == 1) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, content_); } - if (partCase_ == 2) { - output.writeMessage(2, (io.a2a.grpc.FilePart) part_); + if (contentCase_ == 2) { + output.writeBytes( + 2, (com.google.protobuf.ByteString) content_); } - if (partCase_ == 3) { - output.writeMessage(3, (io.a2a.grpc.DataPart) part_); + if (contentCase_ == 3) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, content_); + } + if (contentCase_ == 4) { + output.writeMessage(4, (com.google.protobuf.Value) content_); } if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(4, getMetadata()); + output.writeMessage(5, getMetadata()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filename_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 6, filename_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(mediaType_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 7, mediaType_); } getUnknownFields().writeTo(output); } @@ -318,20 +478,30 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (partCase_ == 1) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, part_); + if (contentCase_ == 1) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, content_); } - if (partCase_ == 2) { + if (contentCase_ == 2) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, (io.a2a.grpc.FilePart) part_); + .computeBytesSize( + 2, (com.google.protobuf.ByteString) content_); + } + if (contentCase_ == 3) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, content_); } - if (partCase_ == 3) { + if (contentCase_ == 4) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, (io.a2a.grpc.DataPart) part_); + .computeMessageSize(4, (com.google.protobuf.Value) content_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getMetadata()); + .computeMessageSize(5, getMetadata()); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filename_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, filename_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(mediaType_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, mediaType_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -353,17 +523,25 @@ public boolean equals(final java.lang.Object obj) { if (!getMetadata() .equals(other.getMetadata())) return false; } - if (!getPartCase().equals(other.getPartCase())) return false; - switch (partCase_) { + if (!getFilename() + .equals(other.getFilename())) return false; + if (!getMediaType() + .equals(other.getMediaType())) return false; + if (!getContentCase().equals(other.getContentCase())) return false; + switch (contentCase_) { case 1: if (!getText() .equals(other.getText())) return false; break; case 2: - if (!getFile() - .equals(other.getFile())) return false; + if (!getRaw() + .equals(other.getRaw())) return false; break; case 3: + if (!getUrl() + .equals(other.getUrl())) return false; + break; + case 4: if (!getData() .equals(other.getData())) return false; break; @@ -385,16 +563,24 @@ public int hashCode() { hash = (37 * hash) + METADATA_FIELD_NUMBER; hash = (53 * hash) + getMetadata().hashCode(); } - switch (partCase_) { + hash = (37 * hash) + FILENAME_FIELD_NUMBER; + hash = (53 * hash) + getFilename().hashCode(); + hash = (37 * hash) + MEDIA_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getMediaType().hashCode(); + switch (contentCase_) { case 1: hash = (37 * hash) + TEXT_FIELD_NUMBER; hash = (53 * hash) + getText().hashCode(); break; case 2: - hash = (37 * hash) + FILE_FIELD_NUMBER; - hash = (53 * hash) + getFile().hashCode(); + hash = (37 * hash) + RAW_FIELD_NUMBER; + hash = (53 * hash) + getRaw().hashCode(); break; case 3: + hash = (37 * hash) + URL_FIELD_NUMBER; + hash = (53 * hash) + getUrl().hashCode(); + break; + case 4: hash = (37 * hash) + DATA_FIELD_NUMBER; hash = (53 * hash) + getData().hashCode(); break; @@ -545,9 +731,6 @@ private void maybeForceBuilderInitialization() { public Builder clear() { super.clear(); bitField0_ = 0; - if (fileBuilder_ != null) { - fileBuilder_.clear(); - } if (dataBuilder_ != null) { dataBuilder_.clear(); } @@ -556,8 +739,10 @@ public Builder clear() { metadataBuilder_.dispose(); metadataBuilder_ = null; } - partCase_ = 0; - part_ = null; + filename_ = ""; + mediaType_ = ""; + contentCase_ = 0; + content_ = null; return this; } @@ -593,25 +778,27 @@ public io.a2a.grpc.Part buildPartial() { private void buildPartial0(io.a2a.grpc.Part result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000008) != 0)) { + if (((from_bitField0_ & 0x00000010) != 0)) { result.metadata_ = metadataBuilder_ == null ? metadata_ : metadataBuilder_.build(); to_bitField0_ |= 0x00000001; } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.filename_ = filename_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.mediaType_ = mediaType_; + } result.bitField0_ |= to_bitField0_; } private void buildPartialOneofs(io.a2a.grpc.Part result) { - result.partCase_ = partCase_; - result.part_ = this.part_; - if (partCase_ == 2 && - fileBuilder_ != null) { - result.part_ = fileBuilder_.build(); - } - if (partCase_ == 3 && + result.contentCase_ = contentCase_; + result.content_ = this.content_; + if (contentCase_ == 4 && dataBuilder_ != null) { - result.part_ = dataBuilder_.build(); + result.content_ = dataBuilder_.build(); } } @@ -630,22 +817,38 @@ public Builder mergeFrom(io.a2a.grpc.Part other) { if (other.hasMetadata()) { mergeMetadata(other.getMetadata()); } - switch (other.getPartCase()) { + if (!other.getFilename().isEmpty()) { + filename_ = other.filename_; + bitField0_ |= 0x00000020; + onChanged(); + } + if (!other.getMediaType().isEmpty()) { + mediaType_ = other.mediaType_; + bitField0_ |= 0x00000040; + onChanged(); + } + switch (other.getContentCase()) { case TEXT: { - partCase_ = 1; - part_ = other.part_; + contentCase_ = 1; + content_ = other.content_; onChanged(); break; } - case FILE: { - mergeFile(other.getFile()); + case RAW: { + setRaw(other.getRaw()); + break; + } + case URL: { + contentCase_ = 3; + content_ = other.content_; + onChanged(); break; } case DATA: { mergeData(other.getData()); break; } - case PART_NOT_SET: { + case CONTENT_NOT_SET: { break; } } @@ -677,31 +880,45 @@ public Builder mergeFrom( break; case 10: { java.lang.String s = input.readStringRequireUtf8(); - partCase_ = 1; - part_ = s; + contentCase_ = 1; + content_ = s; break; } // case 10 case 18: { - input.readMessage( - internalGetFileFieldBuilder().getBuilder(), - extensionRegistry); - partCase_ = 2; + content_ = input.readBytes(); + contentCase_ = 2; break; } // case 18 case 26: { + java.lang.String s = input.readStringRequireUtf8(); + contentCase_ = 3; + content_ = s; + break; + } // case 26 + case 34: { input.readMessage( internalGetDataFieldBuilder().getBuilder(), extensionRegistry); - partCase_ = 3; + contentCase_ = 4; break; - } // case 26 - case 34: { + } // case 34 + case 42: { input.readMessage( internalGetMetadataFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; break; - } // case 34 + } // case 42 + case 50: { + filename_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 58: { + mediaType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 58 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -717,17 +934,17 @@ public Builder mergeFrom( } // finally return this; } - private int partCase_ = 0; - private java.lang.Object part_; - public PartCase - getPartCase() { - return PartCase.forNumber( - partCase_); + private int contentCase_ = 0; + private java.lang.Object content_; + public ContentCase + getContentCase() { + return ContentCase.forNumber( + contentCase_); } - public Builder clearPart() { - partCase_ = 0; - part_ = null; + public Builder clearContent() { + contentCase_ = 0; + content_ = null; onChanged(); return this; } @@ -744,7 +961,7 @@ public Builder clearPart() { */ @java.lang.Override public boolean hasText() { - return partCase_ == 1; + return contentCase_ == 1; } /** *
@@ -757,15 +974,15 @@ public boolean hasText() {
     @java.lang.Override
     public java.lang.String getText() {
       java.lang.Object ref = "";
-      if (partCase_ == 1) {
-        ref = part_;
+      if (contentCase_ == 1) {
+        ref = content_;
       }
       if (!(ref instanceof java.lang.String)) {
         com.google.protobuf.ByteString bs =
             (com.google.protobuf.ByteString) ref;
         java.lang.String s = bs.toStringUtf8();
-        if (partCase_ == 1) {
-          part_ = s;
+        if (contentCase_ == 1) {
+          content_ = s;
         }
         return s;
       } else {
@@ -784,15 +1001,15 @@ public java.lang.String getText() {
     public com.google.protobuf.ByteString
         getTextBytes() {
       java.lang.Object ref = "";
-      if (partCase_ == 1) {
-        ref = part_;
+      if (contentCase_ == 1) {
+        ref = content_;
       }
       if (ref instanceof String) {
         com.google.protobuf.ByteString b = 
             com.google.protobuf.ByteString.copyFromUtf8(
                 (java.lang.String) ref);
-        if (partCase_ == 1) {
-          part_ = b;
+        if (contentCase_ == 1) {
+          content_ = b;
         }
         return b;
       } else {
@@ -811,8 +1028,8 @@ public java.lang.String getText() {
     public Builder setText(
         java.lang.String value) {
       if (value == null) { throw new NullPointerException(); }
-      partCase_ = 1;
-      part_ = value;
+      contentCase_ = 1;
+      content_ = value;
       onChanged();
       return this;
     }
@@ -825,9 +1042,9 @@ public Builder setText(
      * @return This builder for chaining.
      */
     public Builder clearText() {
-      if (partCase_ == 1) {
-        partCase_ = 0;
-        part_ = null;
+      if (contentCase_ == 1) {
+        contentCase_ = 0;
+        content_ = null;
         onChanged();
       }
       return this;
@@ -845,309 +1062,306 @@ public Builder setTextBytes(
         com.google.protobuf.ByteString value) {
       if (value == null) { throw new NullPointerException(); }
       checkByteStringIsUtf8(value);
-      partCase_ = 1;
-      part_ = value;
+      contentCase_ = 1;
+      content_ = value;
       onChanged();
       return this;
     }
 
-    private com.google.protobuf.SingleFieldBuilder<
-        io.a2a.grpc.FilePart, io.a2a.grpc.FilePart.Builder, io.a2a.grpc.FilePartOrBuilder> fileBuilder_;
     /**
      * 
-     * The file content, represented as either a URI or as base64-encoded bytes.
+     * The raw byte content of a file. In JSON serialization, this is encoded as a base64 string.
      * 
* - * .a2a.v1.FilePart file = 2; - * @return Whether the file field is set. + * bytes raw = 2; + * @return Whether the raw field is set. */ - @java.lang.Override - public boolean hasFile() { - return partCase_ == 2; + public boolean hasRaw() { + return contentCase_ == 2; } /** *
-     * The file content, represented as either a URI or as base64-encoded bytes.
+     * The raw byte content of a file. In JSON serialization, this is encoded as a base64 string.
      * 
* - * .a2a.v1.FilePart file = 2; - * @return The file. + * bytes raw = 2; + * @return The raw. */ - @java.lang.Override - public io.a2a.grpc.FilePart getFile() { - if (fileBuilder_ == null) { - if (partCase_ == 2) { - return (io.a2a.grpc.FilePart) part_; - } - return io.a2a.grpc.FilePart.getDefaultInstance(); - } else { - if (partCase_ == 2) { - return fileBuilder_.getMessage(); - } - return io.a2a.grpc.FilePart.getDefaultInstance(); + public com.google.protobuf.ByteString getRaw() { + if (contentCase_ == 2) { + return (com.google.protobuf.ByteString) content_; } + return com.google.protobuf.ByteString.EMPTY; } /** *
-     * The file content, represented as either a URI or as base64-encoded bytes.
+     * The raw byte content of a file. In JSON serialization, this is encoded as a base64 string.
      * 
* - * .a2a.v1.FilePart file = 2; + * bytes raw = 2; + * @param value The raw to set. + * @return This builder for chaining. */ - public Builder setFile(io.a2a.grpc.FilePart value) { - if (fileBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - part_ = value; - onChanged(); - } else { - fileBuilder_.setMessage(value); - } - partCase_ = 2; + public Builder setRaw(com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + contentCase_ = 2; + content_ = value; + onChanged(); return this; } /** *
-     * The file content, represented as either a URI or as base64-encoded bytes.
+     * The raw byte content of a file. In JSON serialization, this is encoded as a base64 string.
      * 
* - * .a2a.v1.FilePart file = 2; + * bytes raw = 2; + * @return This builder for chaining. */ - public Builder setFile( - io.a2a.grpc.FilePart.Builder builderForValue) { - if (fileBuilder_ == null) { - part_ = builderForValue.build(); + public Builder clearRaw() { + if (contentCase_ == 2) { + contentCase_ = 0; + content_ = null; onChanged(); - } else { - fileBuilder_.setMessage(builderForValue.build()); } - partCase_ = 2; return this; } + /** *
-     * The file content, represented as either a URI or as base64-encoded bytes.
+     * A URL pointing to the file's content.
      * 
* - * .a2a.v1.FilePart file = 2; + * string url = 3; + * @return Whether the url field is set. */ - public Builder mergeFile(io.a2a.grpc.FilePart value) { - if (fileBuilder_ == null) { - if (partCase_ == 2 && - part_ != io.a2a.grpc.FilePart.getDefaultInstance()) { - part_ = io.a2a.grpc.FilePart.newBuilder((io.a2a.grpc.FilePart) part_) - .mergeFrom(value).buildPartial(); - } else { - part_ = value; + @java.lang.Override + public boolean hasUrl() { + return contentCase_ == 3; + } + /** + *
+     * A URL pointing to the file's content.
+     * 
+ * + * string url = 3; + * @return The url. + */ + @java.lang.Override + public java.lang.String getUrl() { + java.lang.Object ref = ""; + if (contentCase_ == 3) { + ref = content_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (contentCase_ == 3) { + content_ = s; } - onChanged(); + return s; } else { - if (partCase_ == 2) { - fileBuilder_.mergeFrom(value); - } else { - fileBuilder_.setMessage(value); - } + return (java.lang.String) ref; } - partCase_ = 2; - return this; } /** *
-     * The file content, represented as either a URI or as base64-encoded bytes.
+     * A URL pointing to the file's content.
      * 
* - * .a2a.v1.FilePart file = 2; + * string url = 3; + * @return The bytes for url. */ - public Builder clearFile() { - if (fileBuilder_ == null) { - if (partCase_ == 2) { - partCase_ = 0; - part_ = null; - onChanged(); + @java.lang.Override + public com.google.protobuf.ByteString + getUrlBytes() { + java.lang.Object ref = ""; + if (contentCase_ == 3) { + ref = content_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (contentCase_ == 3) { + content_ = b; } + return b; } else { - if (partCase_ == 2) { - partCase_ = 0; - part_ = null; - } - fileBuilder_.clear(); + return (com.google.protobuf.ByteString) ref; } - return this; } /** *
-     * The file content, represented as either a URI or as base64-encoded bytes.
+     * A URL pointing to the file's content.
      * 
* - * .a2a.v1.FilePart file = 2; + * string url = 3; + * @param value The url to set. + * @return This builder for chaining. */ - public io.a2a.grpc.FilePart.Builder getFileBuilder() { - return internalGetFileFieldBuilder().getBuilder(); + public Builder setUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + contentCase_ = 3; + content_ = value; + onChanged(); + return this; } /** *
-     * The file content, represented as either a URI or as base64-encoded bytes.
+     * A URL pointing to the file's content.
      * 
* - * .a2a.v1.FilePart file = 2; + * string url = 3; + * @return This builder for chaining. */ - @java.lang.Override - public io.a2a.grpc.FilePartOrBuilder getFileOrBuilder() { - if ((partCase_ == 2) && (fileBuilder_ != null)) { - return fileBuilder_.getMessageOrBuilder(); - } else { - if (partCase_ == 2) { - return (io.a2a.grpc.FilePart) part_; - } - return io.a2a.grpc.FilePart.getDefaultInstance(); + public Builder clearUrl() { + if (contentCase_ == 3) { + contentCase_ = 0; + content_ = null; + onChanged(); } + return this; } /** *
-     * The file content, represented as either a URI or as base64-encoded bytes.
+     * A URL pointing to the file's content.
      * 
* - * .a2a.v1.FilePart file = 2; + * string url = 3; + * @param value The bytes for url to set. + * @return This builder for chaining. */ - private com.google.protobuf.SingleFieldBuilder< - io.a2a.grpc.FilePart, io.a2a.grpc.FilePart.Builder, io.a2a.grpc.FilePartOrBuilder> - internalGetFileFieldBuilder() { - if (fileBuilder_ == null) { - if (!(partCase_ == 2)) { - part_ = io.a2a.grpc.FilePart.getDefaultInstance(); - } - fileBuilder_ = new com.google.protobuf.SingleFieldBuilder< - io.a2a.grpc.FilePart, io.a2a.grpc.FilePart.Builder, io.a2a.grpc.FilePartOrBuilder>( - (io.a2a.grpc.FilePart) part_, - getParentForChildren(), - isClean()); - part_ = null; - } - partCase_ = 2; + public Builder setUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + contentCase_ = 3; + content_ = value; onChanged(); - return fileBuilder_; + return this; } private com.google.protobuf.SingleFieldBuilder< - io.a2a.grpc.DataPart, io.a2a.grpc.DataPart.Builder, io.a2a.grpc.DataPartOrBuilder> dataBuilder_; + com.google.protobuf.Value, com.google.protobuf.Value.Builder, com.google.protobuf.ValueOrBuilder> dataBuilder_; /** *
-     * The structured data content.
+     * Arbitrary structured data as a JSON value (object, array, string, number, boolean, or null).
      * 
* - * .a2a.v1.DataPart data = 3; + * .google.protobuf.Value data = 4; * @return Whether the data field is set. */ @java.lang.Override public boolean hasData() { - return partCase_ == 3; + return contentCase_ == 4; } /** *
-     * The structured data content.
+     * Arbitrary structured data as a JSON value (object, array, string, number, boolean, or null).
      * 
* - * .a2a.v1.DataPart data = 3; + * .google.protobuf.Value data = 4; * @return The data. */ @java.lang.Override - public io.a2a.grpc.DataPart getData() { + public com.google.protobuf.Value getData() { if (dataBuilder_ == null) { - if (partCase_ == 3) { - return (io.a2a.grpc.DataPart) part_; + if (contentCase_ == 4) { + return (com.google.protobuf.Value) content_; } - return io.a2a.grpc.DataPart.getDefaultInstance(); + return com.google.protobuf.Value.getDefaultInstance(); } else { - if (partCase_ == 3) { + if (contentCase_ == 4) { return dataBuilder_.getMessage(); } - return io.a2a.grpc.DataPart.getDefaultInstance(); + return com.google.protobuf.Value.getDefaultInstance(); } } /** *
-     * The structured data content.
+     * Arbitrary structured data as a JSON value (object, array, string, number, boolean, or null).
      * 
* - * .a2a.v1.DataPart data = 3; + * .google.protobuf.Value data = 4; */ - public Builder setData(io.a2a.grpc.DataPart value) { + public Builder setData(com.google.protobuf.Value value) { if (dataBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - part_ = value; + content_ = value; onChanged(); } else { dataBuilder_.setMessage(value); } - partCase_ = 3; + contentCase_ = 4; return this; } /** *
-     * The structured data content.
+     * Arbitrary structured data as a JSON value (object, array, string, number, boolean, or null).
      * 
* - * .a2a.v1.DataPart data = 3; + * .google.protobuf.Value data = 4; */ public Builder setData( - io.a2a.grpc.DataPart.Builder builderForValue) { + com.google.protobuf.Value.Builder builderForValue) { if (dataBuilder_ == null) { - part_ = builderForValue.build(); + content_ = builderForValue.build(); onChanged(); } else { dataBuilder_.setMessage(builderForValue.build()); } - partCase_ = 3; + contentCase_ = 4; return this; } /** *
-     * The structured data content.
+     * Arbitrary structured data as a JSON value (object, array, string, number, boolean, or null).
      * 
* - * .a2a.v1.DataPart data = 3; + * .google.protobuf.Value data = 4; */ - public Builder mergeData(io.a2a.grpc.DataPart value) { + public Builder mergeData(com.google.protobuf.Value value) { if (dataBuilder_ == null) { - if (partCase_ == 3 && - part_ != io.a2a.grpc.DataPart.getDefaultInstance()) { - part_ = io.a2a.grpc.DataPart.newBuilder((io.a2a.grpc.DataPart) part_) + if (contentCase_ == 4 && + content_ != com.google.protobuf.Value.getDefaultInstance()) { + content_ = com.google.protobuf.Value.newBuilder((com.google.protobuf.Value) content_) .mergeFrom(value).buildPartial(); } else { - part_ = value; + content_ = value; } onChanged(); } else { - if (partCase_ == 3) { + if (contentCase_ == 4) { dataBuilder_.mergeFrom(value); } else { dataBuilder_.setMessage(value); } } - partCase_ = 3; + contentCase_ = 4; return this; } /** *
-     * The structured data content.
+     * Arbitrary structured data as a JSON value (object, array, string, number, boolean, or null).
      * 
* - * .a2a.v1.DataPart data = 3; + * .google.protobuf.Value data = 4; */ public Builder clearData() { if (dataBuilder_ == null) { - if (partCase_ == 3) { - partCase_ = 0; - part_ = null; + if (contentCase_ == 4) { + contentCase_ = 0; + content_ = null; onChanged(); } } else { - if (partCase_ == 3) { - partCase_ = 0; - part_ = null; + if (contentCase_ == 4) { + contentCase_ = 0; + content_ = null; } dataBuilder_.clear(); } @@ -1155,54 +1369,54 @@ public Builder clearData() { } /** *
-     * The structured data content.
+     * Arbitrary structured data as a JSON value (object, array, string, number, boolean, or null).
      * 
* - * .a2a.v1.DataPart data = 3; + * .google.protobuf.Value data = 4; */ - public io.a2a.grpc.DataPart.Builder getDataBuilder() { + public com.google.protobuf.Value.Builder getDataBuilder() { return internalGetDataFieldBuilder().getBuilder(); } /** *
-     * The structured data content.
+     * Arbitrary structured data as a JSON value (object, array, string, number, boolean, or null).
      * 
* - * .a2a.v1.DataPart data = 3; + * .google.protobuf.Value data = 4; */ @java.lang.Override - public io.a2a.grpc.DataPartOrBuilder getDataOrBuilder() { - if ((partCase_ == 3) && (dataBuilder_ != null)) { + public com.google.protobuf.ValueOrBuilder getDataOrBuilder() { + if ((contentCase_ == 4) && (dataBuilder_ != null)) { return dataBuilder_.getMessageOrBuilder(); } else { - if (partCase_ == 3) { - return (io.a2a.grpc.DataPart) part_; + if (contentCase_ == 4) { + return (com.google.protobuf.Value) content_; } - return io.a2a.grpc.DataPart.getDefaultInstance(); + return com.google.protobuf.Value.getDefaultInstance(); } } /** *
-     * The structured data content.
+     * Arbitrary structured data as a JSON value (object, array, string, number, boolean, or null).
      * 
* - * .a2a.v1.DataPart data = 3; + * .google.protobuf.Value data = 4; */ private com.google.protobuf.SingleFieldBuilder< - io.a2a.grpc.DataPart, io.a2a.grpc.DataPart.Builder, io.a2a.grpc.DataPartOrBuilder> + com.google.protobuf.Value, com.google.protobuf.Value.Builder, com.google.protobuf.ValueOrBuilder> internalGetDataFieldBuilder() { if (dataBuilder_ == null) { - if (!(partCase_ == 3)) { - part_ = io.a2a.grpc.DataPart.getDefaultInstance(); + if (!(contentCase_ == 4)) { + content_ = com.google.protobuf.Value.getDefaultInstance(); } dataBuilder_ = new com.google.protobuf.SingleFieldBuilder< - io.a2a.grpc.DataPart, io.a2a.grpc.DataPart.Builder, io.a2a.grpc.DataPartOrBuilder>( - (io.a2a.grpc.DataPart) part_, + com.google.protobuf.Value, com.google.protobuf.Value.Builder, com.google.protobuf.ValueOrBuilder>( + (com.google.protobuf.Value) content_, getParentForChildren(), isClean()); - part_ = null; + content_ = null; } - partCase_ = 3; + contentCase_ = 4; onChanged(); return dataBuilder_; } @@ -1215,18 +1429,18 @@ public io.a2a.grpc.DataPartOrBuilder getDataOrBuilder() { * Optional metadata associated with this part. *
* - * .google.protobuf.Struct metadata = 4; + * .google.protobuf.Struct metadata = 5; * @return Whether the metadata field is set. */ public boolean hasMetadata() { - return ((bitField0_ & 0x00000008) != 0); + return ((bitField0_ & 0x00000010) != 0); } /** *
      * Optional metadata associated with this part.
      * 
* - * .google.protobuf.Struct metadata = 4; + * .google.protobuf.Struct metadata = 5; * @return The metadata. */ public com.google.protobuf.Struct getMetadata() { @@ -1241,7 +1455,7 @@ public com.google.protobuf.Struct getMetadata() { * Optional metadata associated with this part. *
* - * .google.protobuf.Struct metadata = 4; + * .google.protobuf.Struct metadata = 5; */ public Builder setMetadata(com.google.protobuf.Struct value) { if (metadataBuilder_ == null) { @@ -1252,7 +1466,7 @@ public Builder setMetadata(com.google.protobuf.Struct value) { } else { metadataBuilder_.setMessage(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -1261,7 +1475,7 @@ public Builder setMetadata(com.google.protobuf.Struct value) { * Optional metadata associated with this part. *
* - * .google.protobuf.Struct metadata = 4; + * .google.protobuf.Struct metadata = 5; */ public Builder setMetadata( com.google.protobuf.Struct.Builder builderForValue) { @@ -1270,7 +1484,7 @@ public Builder setMetadata( } else { metadataBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -1279,11 +1493,11 @@ public Builder setMetadata( * Optional metadata associated with this part. *
* - * .google.protobuf.Struct metadata = 4; + * .google.protobuf.Struct metadata = 5; */ public Builder mergeMetadata(com.google.protobuf.Struct value) { if (metadataBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && + if (((bitField0_ & 0x00000010) != 0) && metadata_ != null && metadata_ != com.google.protobuf.Struct.getDefaultInstance()) { getMetadataBuilder().mergeFrom(value); @@ -1294,7 +1508,7 @@ public Builder mergeMetadata(com.google.protobuf.Struct value) { metadataBuilder_.mergeFrom(value); } if (metadata_ != null) { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); } return this; @@ -1304,10 +1518,10 @@ public Builder mergeMetadata(com.google.protobuf.Struct value) { * Optional metadata associated with this part. * * - * .google.protobuf.Struct metadata = 4; + * .google.protobuf.Struct metadata = 5; */ public Builder clearMetadata() { - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); metadata_ = null; if (metadataBuilder_ != null) { metadataBuilder_.dispose(); @@ -1321,10 +1535,10 @@ public Builder clearMetadata() { * Optional metadata associated with this part. * * - * .google.protobuf.Struct metadata = 4; + * .google.protobuf.Struct metadata = 5; */ public com.google.protobuf.Struct.Builder getMetadataBuilder() { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; onChanged(); return internalGetMetadataFieldBuilder().getBuilder(); } @@ -1333,7 +1547,7 @@ public com.google.protobuf.Struct.Builder getMetadataBuilder() { * Optional metadata associated with this part. * * - * .google.protobuf.Struct metadata = 4; + * .google.protobuf.Struct metadata = 5; */ public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() { if (metadataBuilder_ != null) { @@ -1348,7 +1562,7 @@ public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() { * Optional metadata associated with this part. * * - * .google.protobuf.Struct metadata = 4; + * .google.protobuf.Struct metadata = 5; */ private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> @@ -1364,6 +1578,195 @@ public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() { return metadataBuilder_; } + private java.lang.Object filename_ = ""; + /** + *
+     * An optional name for the file (e.g., "document.pdf").
+     * 
+ * + * string filename = 6; + * @return The filename. + */ + public java.lang.String getFilename() { + java.lang.Object ref = filename_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filename_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * An optional name for the file (e.g., "document.pdf").
+     * 
+ * + * string filename = 6; + * @return The bytes for filename. + */ + public com.google.protobuf.ByteString + getFilenameBytes() { + java.lang.Object ref = filename_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + filename_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * An optional name for the file (e.g., "document.pdf").
+     * 
+ * + * string filename = 6; + * @param value The filename to set. + * @return This builder for chaining. + */ + public Builder setFilename( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + filename_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + *
+     * An optional name for the file (e.g., "document.pdf").
+     * 
+ * + * string filename = 6; + * @return This builder for chaining. + */ + public Builder clearFilename() { + filename_ = getDefaultInstance().getFilename(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+     * An optional name for the file (e.g., "document.pdf").
+     * 
+ * + * string filename = 6; + * @param value The bytes for filename to set. + * @return This builder for chaining. + */ + public Builder setFilenameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + filename_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + + private java.lang.Object mediaType_ = ""; + /** + *
+     * The media type (MIME type) of the part content (e.g., "text/plain", "application/json", "image/png").
+     * This field is available for all part types.
+     * 
+ * + * string media_type = 7; + * @return The mediaType. + */ + public java.lang.String getMediaType() { + java.lang.Object ref = mediaType_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + mediaType_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The media type (MIME type) of the part content (e.g., "text/plain", "application/json", "image/png").
+     * This field is available for all part types.
+     * 
+ * + * string media_type = 7; + * @return The bytes for mediaType. + */ + public com.google.protobuf.ByteString + getMediaTypeBytes() { + java.lang.Object ref = mediaType_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + mediaType_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The media type (MIME type) of the part content (e.g., "text/plain", "application/json", "image/png").
+     * This field is available for all part types.
+     * 
+ * + * string media_type = 7; + * @param value The mediaType to set. + * @return This builder for chaining. + */ + public Builder setMediaType( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + mediaType_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + *
+     * The media type (MIME type) of the part content (e.g., "text/plain", "application/json", "image/png").
+     * This field is available for all part types.
+     * 
+ * + * string media_type = 7; + * @return This builder for chaining. + */ + public Builder clearMediaType() { + mediaType_ = getDefaultInstance().getMediaType(); + bitField0_ = (bitField0_ & ~0x00000040); + onChanged(); + return this; + } + /** + *
+     * The media type (MIME type) of the part content (e.g., "text/plain", "application/json", "image/png").
+     * This field is available for all part types.
+     * 
+ * + * string media_type = 7; + * @param value The bytes for mediaType to set. + * @return This builder for chaining. + */ + public Builder setMediaTypeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + mediaType_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:a2a.v1.Part) } diff --git a/spec-grpc/src/main/java/io/a2a/grpc/PartOrBuilder.java b/spec-grpc/src/main/java/io/a2a/grpc/PartOrBuilder.java index 8c8657625..0216594f2 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/PartOrBuilder.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/PartOrBuilder.java @@ -41,64 +41,85 @@ public interface PartOrBuilder extends /** *
-   * The file content, represented as either a URI or as base64-encoded bytes.
+   * The raw byte content of a file. In JSON serialization, this is encoded as a base64 string.
    * 
* - * .a2a.v1.FilePart file = 2; - * @return Whether the file field is set. + * bytes raw = 2; + * @return Whether the raw field is set. */ - boolean hasFile(); + boolean hasRaw(); /** *
-   * The file content, represented as either a URI or as base64-encoded bytes.
+   * The raw byte content of a file. In JSON serialization, this is encoded as a base64 string.
    * 
* - * .a2a.v1.FilePart file = 2; - * @return The file. + * bytes raw = 2; + * @return The raw. */ - io.a2a.grpc.FilePart getFile(); + com.google.protobuf.ByteString getRaw(); + + /** + *
+   * A URL pointing to the file's content.
+   * 
+ * + * string url = 3; + * @return Whether the url field is set. + */ + boolean hasUrl(); + /** + *
+   * A URL pointing to the file's content.
+   * 
+ * + * string url = 3; + * @return The url. + */ + java.lang.String getUrl(); /** *
-   * The file content, represented as either a URI or as base64-encoded bytes.
+   * A URL pointing to the file's content.
    * 
* - * .a2a.v1.FilePart file = 2; + * string url = 3; + * @return The bytes for url. */ - io.a2a.grpc.FilePartOrBuilder getFileOrBuilder(); + com.google.protobuf.ByteString + getUrlBytes(); /** *
-   * The structured data content.
+   * Arbitrary structured data as a JSON value (object, array, string, number, boolean, or null).
    * 
* - * .a2a.v1.DataPart data = 3; + * .google.protobuf.Value data = 4; * @return Whether the data field is set. */ boolean hasData(); /** *
-   * The structured data content.
+   * Arbitrary structured data as a JSON value (object, array, string, number, boolean, or null).
    * 
* - * .a2a.v1.DataPart data = 3; + * .google.protobuf.Value data = 4; * @return The data. */ - io.a2a.grpc.DataPart getData(); + com.google.protobuf.Value getData(); /** *
-   * The structured data content.
+   * Arbitrary structured data as a JSON value (object, array, string, number, boolean, or null).
    * 
* - * .a2a.v1.DataPart data = 3; + * .google.protobuf.Value data = 4; */ - io.a2a.grpc.DataPartOrBuilder getDataOrBuilder(); + com.google.protobuf.ValueOrBuilder getDataOrBuilder(); /** *
    * Optional metadata associated with this part.
    * 
* - * .google.protobuf.Struct metadata = 4; + * .google.protobuf.Struct metadata = 5; * @return Whether the metadata field is set. */ boolean hasMetadata(); @@ -107,7 +128,7 @@ public interface PartOrBuilder extends * Optional metadata associated with this part. * * - * .google.protobuf.Struct metadata = 4; + * .google.protobuf.Struct metadata = 5; * @return The metadata. */ com.google.protobuf.Struct getMetadata(); @@ -116,9 +137,51 @@ public interface PartOrBuilder extends * Optional metadata associated with this part. * * - * .google.protobuf.Struct metadata = 4; + * .google.protobuf.Struct metadata = 5; */ com.google.protobuf.StructOrBuilder getMetadataOrBuilder(); - io.a2a.grpc.Part.PartCase getPartCase(); + /** + *
+   * An optional name for the file (e.g., "document.pdf").
+   * 
+ * + * string filename = 6; + * @return The filename. + */ + java.lang.String getFilename(); + /** + *
+   * An optional name for the file (e.g., "document.pdf").
+   * 
+ * + * string filename = 6; + * @return The bytes for filename. + */ + com.google.protobuf.ByteString + getFilenameBytes(); + + /** + *
+   * The media type (MIME type) of the part content (e.g., "text/plain", "application/json", "image/png").
+   * This field is available for all part types.
+   * 
+ * + * string media_type = 7; + * @return The mediaType. + */ + java.lang.String getMediaType(); + /** + *
+   * The media type (MIME type) of the part content (e.g., "text/plain", "application/json", "image/png").
+   * This field is available for all part types.
+   * 
+ * + * string media_type = 7; + * @return The bytes for mediaType. + */ + com.google.protobuf.ByteString + getMediaTypeBytes(); + + io.a2a.grpc.Part.ContentCase getContentCase(); } diff --git a/spec-grpc/src/main/java/io/a2a/grpc/PasswordOAuthFlow.java b/spec-grpc/src/main/java/io/a2a/grpc/PasswordOAuthFlow.java new file mode 100644 index 000000000..50f6032bb --- /dev/null +++ b/spec-grpc/src/main/java/io/a2a/grpc/PasswordOAuthFlow.java @@ -0,0 +1,1050 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: a2a.proto +// Protobuf Java Version: 4.33.1 + +package io.a2a.grpc; + +/** + *
+ * DEPRECATED
+ * 
+ * + * Protobuf type {@code a2a.v1.PasswordOAuthFlow} + */ +@com.google.protobuf.Generated +public final class PasswordOAuthFlow extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:a2a.v1.PasswordOAuthFlow) + PasswordOAuthFlowOrBuilder { +private static final long serialVersionUID = 0L; + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 1, + /* suffix= */ "", + "PasswordOAuthFlow"); + } + // Use PasswordOAuthFlow.newBuilder() to construct. + private PasswordOAuthFlow(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private PasswordOAuthFlow() { + tokenUrl_ = ""; + refreshUrl_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.a2a.grpc.A2A.internal_static_a2a_v1_PasswordOAuthFlow_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetScopes(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.a2a.grpc.A2A.internal_static_a2a_v1_PasswordOAuthFlow_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.a2a.grpc.PasswordOAuthFlow.class, io.a2a.grpc.PasswordOAuthFlow.Builder.class); + } + + public static final int TOKEN_URL_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object tokenUrl_ = ""; + /** + *
+   * The token URL to be used for this flow. This MUST be in the form of a URL.
+   * The OAuth2 standard requires the use of TLS.
+   * 
+ * + * string token_url = 1; + * @return The tokenUrl. + */ + @java.lang.Override + public java.lang.String getTokenUrl() { + java.lang.Object ref = tokenUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tokenUrl_ = s; + return s; + } + } + /** + *
+   * The token URL to be used for this flow. This MUST be in the form of a URL.
+   * The OAuth2 standard requires the use of TLS.
+   * 
+ * + * string token_url = 1; + * @return The bytes for tokenUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTokenUrlBytes() { + java.lang.Object ref = tokenUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tokenUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REFRESH_URL_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object refreshUrl_ = ""; + /** + *
+   * The URL to be used for obtaining refresh tokens. This MUST be in the
+   * form of a URL. The OAuth2 standard requires the use of TLS.
+   * 
+ * + * string refresh_url = 2; + * @return The refreshUrl. + */ + @java.lang.Override + public java.lang.String getRefreshUrl() { + java.lang.Object ref = refreshUrl_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + refreshUrl_ = s; + return s; + } + } + /** + *
+   * The URL to be used for obtaining refresh tokens. This MUST be in the
+   * form of a URL. The OAuth2 standard requires the use of TLS.
+   * 
+ * + * string refresh_url = 2; + * @return The bytes for refreshUrl. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getRefreshUrlBytes() { + java.lang.Object ref = refreshUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + refreshUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SCOPES_FIELD_NUMBER = 3; + private static final class ScopesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + io.a2a.grpc.A2A.internal_static_a2a_v1_PasswordOAuthFlow_ScopesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + @SuppressWarnings("serial") + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> scopes_; + private com.google.protobuf.MapField + internalGetScopes() { + if (scopes_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ScopesDefaultEntryHolder.defaultEntry); + } + return scopes_; + } + public int getScopesCount() { + return internalGetScopes().getMap().size(); + } + /** + *
+   * The available scopes for the OAuth2 security scheme. A map between the
+   * scope name and a short description for it. The map MAY be empty.
+   * 
+ * + * map<string, string> scopes = 3; + */ + @java.lang.Override + public boolean containsScopes( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetScopes().getMap().containsKey(key); + } + /** + * Use {@link #getScopesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getScopes() { + return getScopesMap(); + } + /** + *
+   * The available scopes for the OAuth2 security scheme. A map between the
+   * scope name and a short description for it. The map MAY be empty.
+   * 
+ * + * map<string, string> scopes = 3; + */ + @java.lang.Override + public java.util.Map getScopesMap() { + return internalGetScopes().getMap(); + } + /** + *
+   * The available scopes for the OAuth2 security scheme. A map between the
+   * scope name and a short description for it. The map MAY be empty.
+   * 
+ * + * map<string, string> scopes = 3; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getScopesOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetScopes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * The available scopes for the OAuth2 security scheme. A map between the
+   * scope name and a short description for it. The map MAY be empty.
+   * 
+ * + * map<string, string> scopes = 3; + */ + @java.lang.Override + public java.lang.String getScopesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetScopes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tokenUrl_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, tokenUrl_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(refreshUrl_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, refreshUrl_); + } + com.google.protobuf.GeneratedMessage + .serializeStringMapTo( + output, + internalGetScopes(), + ScopesDefaultEntryHolder.defaultEntry, + 3); + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tokenUrl_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, tokenUrl_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(refreshUrl_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, refreshUrl_); + } + for (java.util.Map.Entry entry + : internalGetScopes().getMap().entrySet()) { + com.google.protobuf.MapEntry + scopes__ = ScopesDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, scopes__); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.a2a.grpc.PasswordOAuthFlow)) { + return super.equals(obj); + } + io.a2a.grpc.PasswordOAuthFlow other = (io.a2a.grpc.PasswordOAuthFlow) obj; + + if (!getTokenUrl() + .equals(other.getTokenUrl())) return false; + if (!getRefreshUrl() + .equals(other.getRefreshUrl())) return false; + if (!internalGetScopes().equals( + other.internalGetScopes())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TOKEN_URL_FIELD_NUMBER; + hash = (53 * hash) + getTokenUrl().hashCode(); + hash = (37 * hash) + REFRESH_URL_FIELD_NUMBER; + hash = (53 * hash) + getRefreshUrl().hashCode(); + if (!internalGetScopes().getMap().isEmpty()) { + hash = (37 * hash) + SCOPES_FIELD_NUMBER; + hash = (53 * hash) + internalGetScopes().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.a2a.grpc.PasswordOAuthFlow parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.a2a.grpc.PasswordOAuthFlow parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.a2a.grpc.PasswordOAuthFlow parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.a2a.grpc.PasswordOAuthFlow parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.a2a.grpc.PasswordOAuthFlow parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.a2a.grpc.PasswordOAuthFlow parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.a2a.grpc.PasswordOAuthFlow parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static io.a2a.grpc.PasswordOAuthFlow parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static io.a2a.grpc.PasswordOAuthFlow parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.a2a.grpc.PasswordOAuthFlow parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.a2a.grpc.PasswordOAuthFlow parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input); + } + public static io.a2a.grpc.PasswordOAuthFlow parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessage + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.a2a.grpc.PasswordOAuthFlow prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + *
+   * DEPRECATED
+   * 
+ * + * Protobuf type {@code a2a.v1.PasswordOAuthFlow} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:a2a.v1.PasswordOAuthFlow) + io.a2a.grpc.PasswordOAuthFlowOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.a2a.grpc.A2A.internal_static_a2a_v1_PasswordOAuthFlow_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetScopes(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( + int number) { + switch (number) { + case 3: + return internalGetMutableScopes(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.a2a.grpc.A2A.internal_static_a2a_v1_PasswordOAuthFlow_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.a2a.grpc.PasswordOAuthFlow.class, io.a2a.grpc.PasswordOAuthFlow.Builder.class); + } + + // Construct using io.a2a.grpc.PasswordOAuthFlow.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + tokenUrl_ = ""; + refreshUrl_ = ""; + internalGetMutableScopes().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.a2a.grpc.A2A.internal_static_a2a_v1_PasswordOAuthFlow_descriptor; + } + + @java.lang.Override + public io.a2a.grpc.PasswordOAuthFlow getDefaultInstanceForType() { + return io.a2a.grpc.PasswordOAuthFlow.getDefaultInstance(); + } + + @java.lang.Override + public io.a2a.grpc.PasswordOAuthFlow build() { + io.a2a.grpc.PasswordOAuthFlow result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.a2a.grpc.PasswordOAuthFlow buildPartial() { + io.a2a.grpc.PasswordOAuthFlow result = new io.a2a.grpc.PasswordOAuthFlow(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.a2a.grpc.PasswordOAuthFlow result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.tokenUrl_ = tokenUrl_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.refreshUrl_ = refreshUrl_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.scopes_ = internalGetScopes(); + result.scopes_.makeImmutable(); + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.a2a.grpc.PasswordOAuthFlow) { + return mergeFrom((io.a2a.grpc.PasswordOAuthFlow)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.a2a.grpc.PasswordOAuthFlow other) { + if (other == io.a2a.grpc.PasswordOAuthFlow.getDefaultInstance()) return this; + if (!other.getTokenUrl().isEmpty()) { + tokenUrl_ = other.tokenUrl_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRefreshUrl().isEmpty()) { + refreshUrl_ = other.refreshUrl_; + bitField0_ |= 0x00000002; + onChanged(); + } + internalGetMutableScopes().mergeFrom( + other.internalGetScopes()); + bitField0_ |= 0x00000004; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + tokenUrl_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + refreshUrl_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + com.google.protobuf.MapEntry + scopes__ = input.readMessage( + ScopesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableScopes().getMutableMap().put( + scopes__.getKey(), scopes__.getValue()); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object tokenUrl_ = ""; + /** + *
+     * The token URL to be used for this flow. This MUST be in the form of a URL.
+     * The OAuth2 standard requires the use of TLS.
+     * 
+ * + * string token_url = 1; + * @return The tokenUrl. + */ + public java.lang.String getTokenUrl() { + java.lang.Object ref = tokenUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tokenUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The token URL to be used for this flow. This MUST be in the form of a URL.
+     * The OAuth2 standard requires the use of TLS.
+     * 
+ * + * string token_url = 1; + * @return The bytes for tokenUrl. + */ + public com.google.protobuf.ByteString + getTokenUrlBytes() { + java.lang.Object ref = tokenUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tokenUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The token URL to be used for this flow. This MUST be in the form of a URL.
+     * The OAuth2 standard requires the use of TLS.
+     * 
+ * + * string token_url = 1; + * @param value The tokenUrl to set. + * @return This builder for chaining. + */ + public Builder setTokenUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + tokenUrl_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
+     * The token URL to be used for this flow. This MUST be in the form of a URL.
+     * The OAuth2 standard requires the use of TLS.
+     * 
+ * + * string token_url = 1; + * @return This builder for chaining. + */ + public Builder clearTokenUrl() { + tokenUrl_ = getDefaultInstance().getTokenUrl(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
+     * The token URL to be used for this flow. This MUST be in the form of a URL.
+     * The OAuth2 standard requires the use of TLS.
+     * 
+ * + * string token_url = 1; + * @param value The bytes for tokenUrl to set. + * @return This builder for chaining. + */ + public Builder setTokenUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + tokenUrl_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object refreshUrl_ = ""; + /** + *
+     * The URL to be used for obtaining refresh tokens. This MUST be in the
+     * form of a URL. The OAuth2 standard requires the use of TLS.
+     * 
+ * + * string refresh_url = 2; + * @return The refreshUrl. + */ + public java.lang.String getRefreshUrl() { + java.lang.Object ref = refreshUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + refreshUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The URL to be used for obtaining refresh tokens. This MUST be in the
+     * form of a URL. The OAuth2 standard requires the use of TLS.
+     * 
+ * + * string refresh_url = 2; + * @return The bytes for refreshUrl. + */ + public com.google.protobuf.ByteString + getRefreshUrlBytes() { + java.lang.Object ref = refreshUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + refreshUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The URL to be used for obtaining refresh tokens. This MUST be in the
+     * form of a URL. The OAuth2 standard requires the use of TLS.
+     * 
+ * + * string refresh_url = 2; + * @param value The refreshUrl to set. + * @return This builder for chaining. + */ + public Builder setRefreshUrl( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + refreshUrl_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The URL to be used for obtaining refresh tokens. This MUST be in the
+     * form of a URL. The OAuth2 standard requires the use of TLS.
+     * 
+ * + * string refresh_url = 2; + * @return This builder for chaining. + */ + public Builder clearRefreshUrl() { + refreshUrl_ = getDefaultInstance().getRefreshUrl(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The URL to be used for obtaining refresh tokens. This MUST be in the
+     * form of a URL. The OAuth2 standard requires the use of TLS.
+     * 
+ * + * string refresh_url = 2; + * @param value The bytes for refreshUrl to set. + * @return This builder for chaining. + */ + public Builder setRefreshUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + refreshUrl_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> scopes_; + private com.google.protobuf.MapField + internalGetScopes() { + if (scopes_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ScopesDefaultEntryHolder.defaultEntry); + } + return scopes_; + } + private com.google.protobuf.MapField + internalGetMutableScopes() { + if (scopes_ == null) { + scopes_ = com.google.protobuf.MapField.newMapField( + ScopesDefaultEntryHolder.defaultEntry); + } + if (!scopes_.isMutable()) { + scopes_ = scopes_.copy(); + } + bitField0_ |= 0x00000004; + onChanged(); + return scopes_; + } + public int getScopesCount() { + return internalGetScopes().getMap().size(); + } + /** + *
+     * The available scopes for the OAuth2 security scheme. A map between the
+     * scope name and a short description for it. The map MAY be empty.
+     * 
+ * + * map<string, string> scopes = 3; + */ + @java.lang.Override + public boolean containsScopes( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + return internalGetScopes().getMap().containsKey(key); + } + /** + * Use {@link #getScopesMap()} instead. + */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getScopes() { + return getScopesMap(); + } + /** + *
+     * The available scopes for the OAuth2 security scheme. A map between the
+     * scope name and a short description for it. The map MAY be empty.
+     * 
+ * + * map<string, string> scopes = 3; + */ + @java.lang.Override + public java.util.Map getScopesMap() { + return internalGetScopes().getMap(); + } + /** + *
+     * The available scopes for the OAuth2 security scheme. A map between the
+     * scope name and a short description for it. The map MAY be empty.
+     * 
+ * + * map<string, string> scopes = 3; + */ + @java.lang.Override + public /* nullable */ +java.lang.String getScopesOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetScopes().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * The available scopes for the OAuth2 security scheme. A map between the
+     * scope name and a short description for it. The map MAY be empty.
+     * 
+ * + * map<string, string> scopes = 3; + */ + @java.lang.Override + public java.lang.String getScopesOrThrow( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + java.util.Map map = + internalGetScopes().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + public Builder clearScopes() { + bitField0_ = (bitField0_ & ~0x00000004); + internalGetMutableScopes().getMutableMap() + .clear(); + return this; + } + /** + *
+     * The available scopes for the OAuth2 security scheme. A map between the
+     * scope name and a short description for it. The map MAY be empty.
+     * 
+ * + * map<string, string> scopes = 3; + */ + public Builder removeScopes( + java.lang.String key) { + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableScopes().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableScopes() { + bitField0_ |= 0x00000004; + return internalGetMutableScopes().getMutableMap(); + } + /** + *
+     * The available scopes for the OAuth2 security scheme. A map between the
+     * scope name and a short description for it. The map MAY be empty.
+     * 
+ * + * map<string, string> scopes = 3; + */ + public Builder putScopes( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } + internalGetMutableScopes().getMutableMap() + .put(key, value); + bitField0_ |= 0x00000004; + return this; + } + /** + *
+     * The available scopes for the OAuth2 security scheme. A map between the
+     * scope name and a short description for it. The map MAY be empty.
+     * 
+ * + * map<string, string> scopes = 3; + */ + public Builder putAllScopes( + java.util.Map values) { + internalGetMutableScopes().getMutableMap() + .putAll(values); + bitField0_ |= 0x00000004; + return this; + } + + // @@protoc_insertion_point(builder_scope:a2a.v1.PasswordOAuthFlow) + } + + // @@protoc_insertion_point(class_scope:a2a.v1.PasswordOAuthFlow) + private static final io.a2a.grpc.PasswordOAuthFlow DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.a2a.grpc.PasswordOAuthFlow(); + } + + public static io.a2a.grpc.PasswordOAuthFlow getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PasswordOAuthFlow parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public io.a2a.grpc.PasswordOAuthFlow getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/spec-grpc/src/main/java/io/a2a/grpc/PasswordOAuthFlowOrBuilder.java b/spec-grpc/src/main/java/io/a2a/grpc/PasswordOAuthFlowOrBuilder.java new file mode 100644 index 000000000..d319dd1e7 --- /dev/null +++ b/spec-grpc/src/main/java/io/a2a/grpc/PasswordOAuthFlowOrBuilder.java @@ -0,0 +1,115 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: a2a.proto +// Protobuf Java Version: 4.33.1 + +package io.a2a.grpc; + +@com.google.protobuf.Generated +public interface PasswordOAuthFlowOrBuilder extends + // @@protoc_insertion_point(interface_extends:a2a.v1.PasswordOAuthFlow) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The token URL to be used for this flow. This MUST be in the form of a URL.
+   * The OAuth2 standard requires the use of TLS.
+   * 
+ * + * string token_url = 1; + * @return The tokenUrl. + */ + java.lang.String getTokenUrl(); + /** + *
+   * The token URL to be used for this flow. This MUST be in the form of a URL.
+   * The OAuth2 standard requires the use of TLS.
+   * 
+ * + * string token_url = 1; + * @return The bytes for tokenUrl. + */ + com.google.protobuf.ByteString + getTokenUrlBytes(); + + /** + *
+   * The URL to be used for obtaining refresh tokens. This MUST be in the
+   * form of a URL. The OAuth2 standard requires the use of TLS.
+   * 
+ * + * string refresh_url = 2; + * @return The refreshUrl. + */ + java.lang.String getRefreshUrl(); + /** + *
+   * The URL to be used for obtaining refresh tokens. This MUST be in the
+   * form of a URL. The OAuth2 standard requires the use of TLS.
+   * 
+ * + * string refresh_url = 2; + * @return The bytes for refreshUrl. + */ + com.google.protobuf.ByteString + getRefreshUrlBytes(); + + /** + *
+   * The available scopes for the OAuth2 security scheme. A map between the
+   * scope name and a short description for it. The map MAY be empty.
+   * 
+ * + * map<string, string> scopes = 3; + */ + int getScopesCount(); + /** + *
+   * The available scopes for the OAuth2 security scheme. A map between the
+   * scope name and a short description for it. The map MAY be empty.
+   * 
+ * + * map<string, string> scopes = 3; + */ + boolean containsScopes( + java.lang.String key); + /** + * Use {@link #getScopesMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getScopes(); + /** + *
+   * The available scopes for the OAuth2 security scheme. A map between the
+   * scope name and a short description for it. The map MAY be empty.
+   * 
+ * + * map<string, string> scopes = 3; + */ + java.util.Map + getScopesMap(); + /** + *
+   * The available scopes for the OAuth2 security scheme. A map between the
+   * scope name and a short description for it. The map MAY be empty.
+   * 
+ * + * map<string, string> scopes = 3; + */ + /* nullable */ +java.lang.String getScopesOrDefault( + java.lang.String key, + /* nullable */ +java.lang.String defaultValue); + /** + *
+   * The available scopes for the OAuth2 security scheme. A map between the
+   * scope name and a short description for it. The map MAY be empty.
+   * 
+ * + * map<string, string> scopes = 3; + */ + java.lang.String getScopesOrThrow( + java.lang.String key); +} diff --git a/spec-grpc/src/main/java/io/a2a/grpc/PushNotificationConfig.java b/spec-grpc/src/main/java/io/a2a/grpc/PushNotificationConfig.java index cec0fdf08..5c23d23ba 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/PushNotificationConfig.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/PushNotificationConfig.java @@ -197,7 +197,7 @@ public java.lang.String getToken() { private io.a2a.grpc.AuthenticationInfo authentication_; /** *
-   * Information about the authentication to sent with the notification
+   * Authentication information required to send the notification
    * 
* * .a2a.v1.AuthenticationInfo authentication = 4; @@ -209,7 +209,7 @@ public boolean hasAuthentication() { } /** *
-   * Information about the authentication to sent with the notification
+   * Authentication information required to send the notification
    * 
* * .a2a.v1.AuthenticationInfo authentication = 4; @@ -221,7 +221,7 @@ public io.a2a.grpc.AuthenticationInfo getAuthentication() { } /** *
-   * Information about the authentication to sent with the notification
+   * Authentication information required to send the notification
    * 
* * .a2a.v1.AuthenticationInfo authentication = 4; @@ -904,7 +904,7 @@ public Builder setTokenBytes( io.a2a.grpc.AuthenticationInfo, io.a2a.grpc.AuthenticationInfo.Builder, io.a2a.grpc.AuthenticationInfoOrBuilder> authenticationBuilder_; /** *
-     * Information about the authentication to sent with the notification
+     * Authentication information required to send the notification
      * 
* * .a2a.v1.AuthenticationInfo authentication = 4; @@ -915,7 +915,7 @@ public boolean hasAuthentication() { } /** *
-     * Information about the authentication to sent with the notification
+     * Authentication information required to send the notification
      * 
* * .a2a.v1.AuthenticationInfo authentication = 4; @@ -930,7 +930,7 @@ public io.a2a.grpc.AuthenticationInfo getAuthentication() { } /** *
-     * Information about the authentication to sent with the notification
+     * Authentication information required to send the notification
      * 
* * .a2a.v1.AuthenticationInfo authentication = 4; @@ -950,7 +950,7 @@ public Builder setAuthentication(io.a2a.grpc.AuthenticationInfo value) { } /** *
-     * Information about the authentication to sent with the notification
+     * Authentication information required to send the notification
      * 
* * .a2a.v1.AuthenticationInfo authentication = 4; @@ -968,7 +968,7 @@ public Builder setAuthentication( } /** *
-     * Information about the authentication to sent with the notification
+     * Authentication information required to send the notification
      * 
* * .a2a.v1.AuthenticationInfo authentication = 4; @@ -993,7 +993,7 @@ public Builder mergeAuthentication(io.a2a.grpc.AuthenticationInfo value) { } /** *
-     * Information about the authentication to sent with the notification
+     * Authentication information required to send the notification
      * 
* * .a2a.v1.AuthenticationInfo authentication = 4; @@ -1010,7 +1010,7 @@ public Builder clearAuthentication() { } /** *
-     * Information about the authentication to sent with the notification
+     * Authentication information required to send the notification
      * 
* * .a2a.v1.AuthenticationInfo authentication = 4; @@ -1022,7 +1022,7 @@ public io.a2a.grpc.AuthenticationInfo.Builder getAuthenticationBuilder() { } /** *
-     * Information about the authentication to sent with the notification
+     * Authentication information required to send the notification
      * 
* * .a2a.v1.AuthenticationInfo authentication = 4; @@ -1037,7 +1037,7 @@ public io.a2a.grpc.AuthenticationInfoOrBuilder getAuthenticationOrBuilder() { } /** *
-     * Information about the authentication to sent with the notification
+     * Authentication information required to send the notification
      * 
* * .a2a.v1.AuthenticationInfo authentication = 4; diff --git a/spec-grpc/src/main/java/io/a2a/grpc/PushNotificationConfigOrBuilder.java b/spec-grpc/src/main/java/io/a2a/grpc/PushNotificationConfigOrBuilder.java index bcfaf4c2e..b65c0d5a0 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/PushNotificationConfigOrBuilder.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/PushNotificationConfigOrBuilder.java @@ -72,7 +72,7 @@ public interface PushNotificationConfigOrBuilder extends /** *
-   * Information about the authentication to sent with the notification
+   * Authentication information required to send the notification
    * 
* * .a2a.v1.AuthenticationInfo authentication = 4; @@ -81,7 +81,7 @@ public interface PushNotificationConfigOrBuilder extends boolean hasAuthentication(); /** *
-   * Information about the authentication to sent with the notification
+   * Authentication information required to send the notification
    * 
* * .a2a.v1.AuthenticationInfo authentication = 4; @@ -90,7 +90,7 @@ public interface PushNotificationConfigOrBuilder extends io.a2a.grpc.AuthenticationInfo getAuthentication(); /** *
-   * Information about the authentication to sent with the notification
+   * Authentication information required to send the notification
    * 
* * .a2a.v1.AuthenticationInfo authentication = 4; diff --git a/spec-grpc/src/main/java/io/a2a/grpc/Security.java b/spec-grpc/src/main/java/io/a2a/grpc/SecurityRequirement.java similarity index 84% rename from spec-grpc/src/main/java/io/a2a/grpc/Security.java rename to spec-grpc/src/main/java/io/a2a/grpc/SecurityRequirement.java index f04498f98..945b2608d 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/Security.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/SecurityRequirement.java @@ -6,13 +6,13 @@ package io.a2a.grpc; /** - * Protobuf type {@code a2a.v1.Security} + * Protobuf type {@code a2a.v1.SecurityRequirement} */ @com.google.protobuf.Generated -public final class Security extends +public final class SecurityRequirement extends com.google.protobuf.GeneratedMessage implements - // @@protoc_insertion_point(message_implements:a2a.v1.Security) - SecurityOrBuilder { + // @@protoc_insertion_point(message_implements:a2a.v1.SecurityRequirement) + SecurityRequirementOrBuilder { private static final long serialVersionUID = 0L; static { com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( @@ -21,18 +21,18 @@ public final class Security extends /* minor= */ 33, /* patch= */ 1, /* suffix= */ "", - "Security"); + "SecurityRequirement"); } - // Use Security.newBuilder() to construct. - private Security(com.google.protobuf.GeneratedMessage.Builder builder) { + // Use SecurityRequirement.newBuilder() to construct. + private SecurityRequirement(com.google.protobuf.GeneratedMessage.Builder builder) { super(builder); } - private Security() { + private SecurityRequirement() { } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.a2a.grpc.A2A.internal_static_a2a_v1_Security_descriptor; + return io.a2a.grpc.A2A.internal_static_a2a_v1_SecurityRequirement_descriptor; } @SuppressWarnings({"rawtypes"}) @@ -50,9 +50,9 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldRefl @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.a2a.grpc.A2A.internal_static_a2a_v1_Security_fieldAccessorTable + return io.a2a.grpc.A2A.internal_static_a2a_v1_SecurityRequirement_fieldAccessorTable .ensureFieldAccessorsInitialized( - io.a2a.grpc.Security.class, io.a2a.grpc.Security.Builder.class); + io.a2a.grpc.SecurityRequirement.class, io.a2a.grpc.SecurityRequirement.Builder.class); } public static final int SCHEMES_FIELD_NUMBER = 1; @@ -61,7 +61,7 @@ private static final class SchemesDefaultEntryHolder { java.lang.String, io.a2a.grpc.StringList> defaultEntry = com.google.protobuf.MapEntry .newDefaultInstance( - io.a2a.grpc.A2A.internal_static_a2a_v1_Security_SchemesEntry_descriptor, + io.a2a.grpc.A2A.internal_static_a2a_v1_SecurityRequirement_SchemesEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.MESSAGE, @@ -183,10 +183,10 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof io.a2a.grpc.Security)) { + if (!(obj instanceof io.a2a.grpc.SecurityRequirement)) { return super.equals(obj); } - io.a2a.grpc.Security other = (io.a2a.grpc.Security) obj; + io.a2a.grpc.SecurityRequirement other = (io.a2a.grpc.SecurityRequirement) obj; if (!internalGetSchemes().equals( other.internalGetSchemes())) return false; @@ -210,44 +210,44 @@ public int hashCode() { return hash; } - public static io.a2a.grpc.Security parseFrom( + public static io.a2a.grpc.SecurityRequirement parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static io.a2a.grpc.Security parseFrom( + public static io.a2a.grpc.SecurityRequirement parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static io.a2a.grpc.Security parseFrom( + public static io.a2a.grpc.SecurityRequirement parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static io.a2a.grpc.Security parseFrom( + public static io.a2a.grpc.SecurityRequirement parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static io.a2a.grpc.Security parseFrom(byte[] data) + public static io.a2a.grpc.SecurityRequirement parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static io.a2a.grpc.Security parseFrom( + public static io.a2a.grpc.SecurityRequirement parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static io.a2a.grpc.Security parseFrom(java.io.InputStream input) + public static io.a2a.grpc.SecurityRequirement parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } - public static io.a2a.grpc.Security parseFrom( + public static io.a2a.grpc.SecurityRequirement parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -255,26 +255,26 @@ public static io.a2a.grpc.Security parseFrom( .parseWithIOException(PARSER, input, extensionRegistry); } - public static io.a2a.grpc.Security parseDelimitedFrom(java.io.InputStream input) + public static io.a2a.grpc.SecurityRequirement parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input); } - public static io.a2a.grpc.Security parseDelimitedFrom( + public static io.a2a.grpc.SecurityRequirement parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static io.a2a.grpc.Security parseFrom( + public static io.a2a.grpc.SecurityRequirement parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessage .parseWithIOException(PARSER, input); } - public static io.a2a.grpc.Security parseFrom( + public static io.a2a.grpc.SecurityRequirement parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -287,7 +287,7 @@ public static io.a2a.grpc.Security parseFrom( public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(io.a2a.grpc.Security prototype) { + public static Builder newBuilder(io.a2a.grpc.SecurityRequirement prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override @@ -303,15 +303,15 @@ protected Builder newBuilderForType( return builder; } /** - * Protobuf type {@code a2a.v1.Security} + * Protobuf type {@code a2a.v1.SecurityRequirement} */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements - // @@protoc_insertion_point(builder_implements:a2a.v1.Security) - io.a2a.grpc.SecurityOrBuilder { + // @@protoc_insertion_point(builder_implements:a2a.v1.SecurityRequirement) + io.a2a.grpc.SecurityRequirementOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.a2a.grpc.A2A.internal_static_a2a_v1_Security_descriptor; + return io.a2a.grpc.A2A.internal_static_a2a_v1_SecurityRequirement_descriptor; } @SuppressWarnings({"rawtypes"}) @@ -339,12 +339,12 @@ protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFi @java.lang.Override protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { - return io.a2a.grpc.A2A.internal_static_a2a_v1_Security_fieldAccessorTable + return io.a2a.grpc.A2A.internal_static_a2a_v1_SecurityRequirement_fieldAccessorTable .ensureFieldAccessorsInitialized( - io.a2a.grpc.Security.class, io.a2a.grpc.Security.Builder.class); + io.a2a.grpc.SecurityRequirement.class, io.a2a.grpc.SecurityRequirement.Builder.class); } - // Construct using io.a2a.grpc.Security.newBuilder() + // Construct using io.a2a.grpc.SecurityRequirement.newBuilder() private Builder() { } @@ -365,17 +365,17 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return io.a2a.grpc.A2A.internal_static_a2a_v1_Security_descriptor; + return io.a2a.grpc.A2A.internal_static_a2a_v1_SecurityRequirement_descriptor; } @java.lang.Override - public io.a2a.grpc.Security getDefaultInstanceForType() { - return io.a2a.grpc.Security.getDefaultInstance(); + public io.a2a.grpc.SecurityRequirement getDefaultInstanceForType() { + return io.a2a.grpc.SecurityRequirement.getDefaultInstance(); } @java.lang.Override - public io.a2a.grpc.Security build() { - io.a2a.grpc.Security result = buildPartial(); + public io.a2a.grpc.SecurityRequirement build() { + io.a2a.grpc.SecurityRequirement result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -383,14 +383,14 @@ public io.a2a.grpc.Security build() { } @java.lang.Override - public io.a2a.grpc.Security buildPartial() { - io.a2a.grpc.Security result = new io.a2a.grpc.Security(this); + public io.a2a.grpc.SecurityRequirement buildPartial() { + io.a2a.grpc.SecurityRequirement result = new io.a2a.grpc.SecurityRequirement(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - private void buildPartial0(io.a2a.grpc.Security result) { + private void buildPartial0(io.a2a.grpc.SecurityRequirement result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.schemes_ = internalGetSchemes().build(SchemesDefaultEntryHolder.defaultEntry); @@ -399,16 +399,16 @@ private void buildPartial0(io.a2a.grpc.Security result) { @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.a2a.grpc.Security) { - return mergeFrom((io.a2a.grpc.Security)other); + if (other instanceof io.a2a.grpc.SecurityRequirement) { + return mergeFrom((io.a2a.grpc.SecurityRequirement)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(io.a2a.grpc.Security other) { - if (other == io.a2a.grpc.Security.getDefaultInstance()) return this; + public Builder mergeFrom(io.a2a.grpc.SecurityRequirement other) { + if (other == io.a2a.grpc.SecurityRequirement.getDefaultInstance()) return this; internalGetMutableSchemes().mergeFrom( other.internalGetSchemes()); bitField0_ |= 0x00000001; @@ -619,23 +619,23 @@ public io.a2a.grpc.StringList.Builder putSchemesBuilderIfAbsent( return (io.a2a.grpc.StringList.Builder) entry; } - // @@protoc_insertion_point(builder_scope:a2a.v1.Security) + // @@protoc_insertion_point(builder_scope:a2a.v1.SecurityRequirement) } - // @@protoc_insertion_point(class_scope:a2a.v1.Security) - private static final io.a2a.grpc.Security DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:a2a.v1.SecurityRequirement) + private static final io.a2a.grpc.SecurityRequirement DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new io.a2a.grpc.Security(); + DEFAULT_INSTANCE = new io.a2a.grpc.SecurityRequirement(); } - public static io.a2a.grpc.Security getDefaultInstance() { + public static io.a2a.grpc.SecurityRequirement getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public Security parsePartialFrom( + public SecurityRequirement parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -654,17 +654,17 @@ public Security parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public io.a2a.grpc.Security getDefaultInstanceForType() { + public io.a2a.grpc.SecurityRequirement getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/spec-grpc/src/main/java/io/a2a/grpc/SecurityOrBuilder.java b/spec-grpc/src/main/java/io/a2a/grpc/SecurityRequirementOrBuilder.java similarity index 94% rename from spec-grpc/src/main/java/io/a2a/grpc/SecurityOrBuilder.java rename to spec-grpc/src/main/java/io/a2a/grpc/SecurityRequirementOrBuilder.java index cb1b2372f..14b23d252 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/SecurityOrBuilder.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/SecurityRequirementOrBuilder.java @@ -6,8 +6,8 @@ package io.a2a.grpc; @com.google.protobuf.Generated -public interface SecurityOrBuilder extends - // @@protoc_insertion_point(interface_extends:a2a.v1.Security) +public interface SecurityRequirementOrBuilder extends + // @@protoc_insertion_point(interface_extends:a2a.v1.SecurityRequirement) com.google.protobuf.MessageOrBuilder { /** diff --git a/spec-grpc/src/main/java/io/a2a/grpc/SendMessageConfiguration.java b/spec-grpc/src/main/java/io/a2a/grpc/SendMessageConfiguration.java index 6bec1fb51..57374039f 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/SendMessageConfiguration.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/SendMessageConfiguration.java @@ -179,7 +179,7 @@ public int getHistoryLength() { private boolean blocking_ = false; /** *
-   * If true, the operation waits until the task reaches a terminal state before returning. Default is false.
+   * If true, the operation waits until the task reaches a terminal or interrupted state before returning. Default is false.
    * 
* * bool blocking = 4; @@ -977,7 +977,7 @@ public Builder clearHistoryLength() { private boolean blocking_ ; /** *
-     * If true, the operation waits until the task reaches a terminal state before returning. Default is false.
+     * If true, the operation waits until the task reaches a terminal or interrupted state before returning. Default is false.
      * 
* * bool blocking = 4; @@ -989,7 +989,7 @@ public boolean getBlocking() { } /** *
-     * If true, the operation waits until the task reaches a terminal state before returning. Default is false.
+     * If true, the operation waits until the task reaches a terminal or interrupted state before returning. Default is false.
      * 
* * bool blocking = 4; @@ -1005,7 +1005,7 @@ public Builder setBlocking(boolean value) { } /** *
-     * If true, the operation waits until the task reaches a terminal state before returning. Default is false.
+     * If true, the operation waits until the task reaches a terminal or interrupted state before returning. Default is false.
      * 
* * bool blocking = 4; diff --git a/spec-grpc/src/main/java/io/a2a/grpc/SendMessageConfigurationOrBuilder.java b/spec-grpc/src/main/java/io/a2a/grpc/SendMessageConfigurationOrBuilder.java index 2fed6a6af..a9e9fc401 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/SendMessageConfigurationOrBuilder.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/SendMessageConfigurationOrBuilder.java @@ -105,7 +105,7 @@ public interface SendMessageConfigurationOrBuilder extends /** *
-   * If true, the operation waits until the task reaches a terminal state before returning. Default is false.
+   * If true, the operation waits until the task reaches a terminal or interrupted state before returning. Default is false.
    * 
* * bool blocking = 4; diff --git a/spec-grpc/src/main/java/io/a2a/grpc/SubscribeToTaskRequest.java b/spec-grpc/src/main/java/io/a2a/grpc/SubscribeToTaskRequest.java index cdef789c1..82a95620a 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/SubscribeToTaskRequest.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/SubscribeToTaskRequest.java @@ -33,7 +33,7 @@ private SubscribeToTaskRequest(com.google.protobuf.GeneratedMessage.Builder b } private SubscribeToTaskRequest() { tenant_ = ""; - name_ = ""; + id_ = ""; } public static final com.google.protobuf.Descriptors.Descriptor @@ -96,49 +96,47 @@ public java.lang.String getTenant() { } } - public static final int NAME_FIELD_NUMBER = 1; + public static final int ID_FIELD_NUMBER = 1; @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; + private volatile java.lang.Object id_ = ""; /** *
-   * The resource name of the task to subscribe to.
-   * Format: tasks/{task_id}
+   * The resource id of the task to subscribe to.
    * 
* - * string name = 1; - * @return The name. + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The id. */ @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; + public java.lang.String getId() { + java.lang.Object ref = id_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - name_ = s; + id_ = s; return s; } } /** *
-   * The resource name of the task to subscribe to.
-   * Format: tasks/{task_id}
+   * The resource id of the task to subscribe to.
    * 
* - * string name = 1; - * @return The bytes for name. + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for id. */ @java.lang.Override public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; + getIdBytes() { + java.lang.Object ref = id_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - name_ = b; + id_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -159,8 +157,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, id_); } if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tenant_)) { com.google.protobuf.GeneratedMessage.writeString(output, 2, tenant_); @@ -174,8 +172,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, id_); } if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tenant_)) { size += com.google.protobuf.GeneratedMessage.computeStringSize(2, tenant_); @@ -197,8 +195,8 @@ public boolean equals(final java.lang.Object obj) { if (!getTenant() .equals(other.getTenant())) return false; - if (!getName() - .equals(other.getName())) return false; + if (!getId() + .equals(other.getId())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -212,8 +210,8 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + TENANT_FIELD_NUMBER; hash = (53 * hash) + getTenant().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -350,7 +348,7 @@ public Builder clear() { super.clear(); bitField0_ = 0; tenant_ = ""; - name_ = ""; + id_ = ""; return this; } @@ -388,7 +386,7 @@ private void buildPartial0(io.a2a.grpc.SubscribeToTaskRequest result) { result.tenant_ = tenant_; } if (((from_bitField0_ & 0x00000002) != 0)) { - result.name_ = name_; + result.id_ = id_; } } @@ -409,8 +407,8 @@ public Builder mergeFrom(io.a2a.grpc.SubscribeToTaskRequest other) { bitField0_ |= 0x00000001; onChanged(); } - if (!other.getName().isEmpty()) { - name_ = other.name_; + if (!other.getId().isEmpty()) { + id_ = other.id_; bitField0_ |= 0x00000002; onChanged(); } @@ -441,7 +439,7 @@ public Builder mergeFrom( done = true; break; case 10: { - name_ = input.readStringRequireUtf8(); + id_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 10 @@ -559,23 +557,22 @@ public Builder setTenantBytes( return this; } - private java.lang.Object name_ = ""; + private java.lang.Object id_ = ""; /** *
-     * The resource name of the task to subscribe to.
-     * Format: tasks/{task_id}
+     * The resource id of the task to subscribe to.
      * 
* - * string name = 1; - * @return The name. + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The id. */ - public java.lang.String getName() { - java.lang.Object ref = name_; + public java.lang.String getId() { + java.lang.Object ref = id_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - name_ = s; + id_ = s; return s; } else { return (java.lang.String) ref; @@ -583,21 +580,20 @@ public java.lang.String getName() { } /** *
-     * The resource name of the task to subscribe to.
-     * Format: tasks/{task_id}
+     * The resource id of the task to subscribe to.
      * 
* - * string name = 1; - * @return The bytes for name. + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for id. */ public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; + getIdBytes() { + java.lang.Object ref = id_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - name_ = b; + id_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -605,52 +601,49 @@ public java.lang.String getName() { } /** *
-     * The resource name of the task to subscribe to.
-     * Format: tasks/{task_id}
+     * The resource id of the task to subscribe to.
      * 
* - * string name = 1; - * @param value The name to set. + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The id to set. * @return This builder for chaining. */ - public Builder setName( + public Builder setId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - name_ = value; + id_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** *
-     * The resource name of the task to subscribe to.
-     * Format: tasks/{task_id}
+     * The resource id of the task to subscribe to.
      * 
* - * string name = 1; + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; * @return This builder for chaining. */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); + public Builder clearId() { + id_ = getDefaultInstance().getId(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** *
-     * The resource name of the task to subscribe to.
-     * Format: tasks/{task_id}
+     * The resource id of the task to subscribe to.
      * 
* - * string name = 1; - * @param value The bytes for name to set. + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for id to set. * @return This builder for chaining. */ - public Builder setNameBytes( + public Builder setIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - name_ = value; + id_ = value; bitField0_ |= 0x00000002; onChanged(); return this; diff --git a/spec-grpc/src/main/java/io/a2a/grpc/SubscribeToTaskRequestOrBuilder.java b/spec-grpc/src/main/java/io/a2a/grpc/SubscribeToTaskRequestOrBuilder.java index 0d4a4fda9..39f287b30 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/SubscribeToTaskRequestOrBuilder.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/SubscribeToTaskRequestOrBuilder.java @@ -32,23 +32,21 @@ public interface SubscribeToTaskRequestOrBuilder extends /** *
-   * The resource name of the task to subscribe to.
-   * Format: tasks/{task_id}
+   * The resource id of the task to subscribe to.
    * 
* - * string name = 1; - * @return The name. + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The id. */ - java.lang.String getName(); + java.lang.String getId(); /** *
-   * The resource name of the task to subscribe to.
-   * Format: tasks/{task_id}
+   * The resource id of the task to subscribe to.
    * 
* - * string name = 1; - * @return The bytes for name. + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for id. */ com.google.protobuf.ByteString - getNameBytes(); + getIdBytes(); } diff --git a/spec-grpc/src/main/java/io/a2a/grpc/TaskPushNotificationConfig.java b/spec-grpc/src/main/java/io/a2a/grpc/TaskPushNotificationConfig.java index e33fb5cf4..745594565 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/TaskPushNotificationConfig.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/TaskPushNotificationConfig.java @@ -34,7 +34,9 @@ private TaskPushNotificationConfig(com.google.protobuf.GeneratedMessage.Builder< super(builder); } private TaskPushNotificationConfig() { - name_ = ""; + tenant_ = ""; + id_ = ""; + taskId_ = ""; } public static final com.google.protobuf.Descriptors.Descriptor @@ -51,49 +53,141 @@ private TaskPushNotificationConfig() { } private int bitField0_; - public static final int NAME_FIELD_NUMBER = 1; + public static final int TENANT_FIELD_NUMBER = 4; @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; + private volatile java.lang.Object tenant_ = ""; /** *
-   * The resource name of the config.
-   * Format: tasks/{task_id}/pushNotificationConfigs/{config_id}
+   * Optional tenant
    * 
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The name. + * string tenant = 4; + * @return The tenant. */ @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; + public java.lang.String getTenant() { + java.lang.Object ref = tenant_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - name_ = s; + tenant_ = s; return s; } } /** *
-   * The resource name of the config.
-   * Format: tasks/{task_id}/pushNotificationConfigs/{config_id}
+   * Optional tenant
    * 
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for name. + * string tenant = 4; + * @return The bytes for tenant. */ @java.lang.Override public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; + getTenantBytes() { + java.lang.Object ref = tenant_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - name_ = b; + tenant_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; + /** + *
+   * The id of the config.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + *
+   * The id of the config.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TASK_ID_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object taskId_ = ""; + /** + *
+   * The id of the task this config is associated with.
+   * 
+ * + * string task_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The taskId. + */ + @java.lang.Override + public java.lang.String getTaskId() { + java.lang.Object ref = taskId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + taskId_ = s; + return s; + } + } + /** + *
+   * The id of the task this config is associated with.
+   * 
+ * + * string task_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for taskId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTaskIdBytes() { + java.lang.Object ref = taskId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + taskId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -152,12 +246,18 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, id_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getPushNotificationConfig()); } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(taskId_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, taskId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tenant_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, tenant_); + } getUnknownFields().writeTo(output); } @@ -167,13 +267,19 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, id_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getPushNotificationConfig()); } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(taskId_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, taskId_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(tenant_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, tenant_); + } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -189,8 +295,12 @@ public boolean equals(final java.lang.Object obj) { } io.a2a.grpc.TaskPushNotificationConfig other = (io.a2a.grpc.TaskPushNotificationConfig) obj; - if (!getName() - .equals(other.getName())) return false; + if (!getTenant() + .equals(other.getTenant())) return false; + if (!getId() + .equals(other.getId())) return false; + if (!getTaskId() + .equals(other.getTaskId())) return false; if (hasPushNotificationConfig() != other.hasPushNotificationConfig()) return false; if (hasPushNotificationConfig()) { if (!getPushNotificationConfig() @@ -207,8 +317,12 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + TENANT_FIELD_NUMBER; + hash = (53 * hash) + getTenant().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + TASK_ID_FIELD_NUMBER; + hash = (53 * hash) + getTaskId().hashCode(); if (hasPushNotificationConfig()) { hash = (37 * hash) + PUSH_NOTIFICATION_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getPushNotificationConfig().hashCode(); @@ -356,7 +470,9 @@ private void maybeForceBuilderInitialization() { public Builder clear() { super.clear(); bitField0_ = 0; - name_ = ""; + tenant_ = ""; + id_ = ""; + taskId_ = ""; pushNotificationConfig_ = null; if (pushNotificationConfigBuilder_ != null) { pushNotificationConfigBuilder_.dispose(); @@ -396,10 +512,16 @@ public io.a2a.grpc.TaskPushNotificationConfig buildPartial() { private void buildPartial0(io.a2a.grpc.TaskPushNotificationConfig result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { - result.name_ = name_; + result.tenant_ = tenant_; } - int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000002) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.taskId_ = taskId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { result.pushNotificationConfig_ = pushNotificationConfigBuilder_ == null ? pushNotificationConfig_ : pushNotificationConfigBuilder_.build(); @@ -420,11 +542,21 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(io.a2a.grpc.TaskPushNotificationConfig other) { if (other == io.a2a.grpc.TaskPushNotificationConfig.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; + if (!other.getTenant().isEmpty()) { + tenant_ = other.tenant_; bitField0_ |= 0x00000001; onChanged(); } + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getTaskId().isEmpty()) { + taskId_ = other.taskId_; + bitField0_ |= 0x00000004; + onChanged(); + } if (other.hasPushNotificationConfig()) { mergePushNotificationConfig(other.getPushNotificationConfig()); } @@ -455,17 +587,27 @@ public Builder mergeFrom( done = true; break; case 10: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; break; } // case 10 case 18: { input.readMessage( internalGetPushNotificationConfigFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000008; break; } // case 18 + case 26: { + taskId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + tenant_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -483,23 +625,22 @@ public Builder mergeFrom( } private int bitField0_; - private java.lang.Object name_ = ""; + private java.lang.Object tenant_ = ""; /** *
-     * The resource name of the config.
-     * Format: tasks/{task_id}/pushNotificationConfigs/{config_id}
+     * Optional tenant
      * 
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The name. + * string tenant = 4; + * @return The tenant. */ - public java.lang.String getName() { - java.lang.Object ref = name_; + public java.lang.String getTenant() { + java.lang.Object ref = tenant_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - name_ = s; + tenant_ = s; return s; } else { return (java.lang.String) ref; @@ -507,21 +648,20 @@ public java.lang.String getName() { } /** *
-     * The resource name of the config.
-     * Format: tasks/{task_id}/pushNotificationConfigs/{config_id}
+     * Optional tenant
      * 
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for name. + * string tenant = 4; + * @return The bytes for tenant. */ public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; + getTenantBytes() { + java.lang.Object ref = tenant_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - name_ = b; + tenant_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -529,57 +669,238 @@ public java.lang.String getName() { } /** *
-     * The resource name of the config.
-     * Format: tasks/{task_id}/pushNotificationConfigs/{config_id}
+     * Optional tenant
      * 
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The name to set. + * string tenant = 4; + * @param value The tenant to set. * @return This builder for chaining. */ - public Builder setName( + public Builder setTenant( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - name_ = value; + tenant_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** *
-     * The resource name of the config.
-     * Format: tasks/{task_id}/pushNotificationConfigs/{config_id}
+     * Optional tenant
      * 
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * string tenant = 4; * @return This builder for chaining. */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); + public Builder clearTenant() { + tenant_ = getDefaultInstance().getTenant(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** *
-     * The resource name of the config.
-     * Format: tasks/{task_id}/pushNotificationConfigs/{config_id}
+     * Optional tenant
      * 
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param value The bytes for name to set. + * string tenant = 4; + * @param value The bytes for tenant to set. * @return This builder for chaining. */ - public Builder setNameBytes( + public Builder setTenantBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - name_ = value; + tenant_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } + private java.lang.Object id_ = ""; + /** + *
+     * The id of the config.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The id of the config.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for id. + */ + public com.google.protobuf.ByteString + getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The id of the config.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
+     * The id of the config.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearId() { + id_ = getDefaultInstance().getId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
+     * The id of the config.
+     * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object taskId_ = ""; + /** + *
+     * The id of the task this config is associated with.
+     * 
+ * + * string task_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The taskId. + */ + public java.lang.String getTaskId() { + java.lang.Object ref = taskId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + taskId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The id of the task this config is associated with.
+     * 
+ * + * string task_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for taskId. + */ + public com.google.protobuf.ByteString + getTaskIdBytes() { + java.lang.Object ref = taskId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + taskId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The id of the task this config is associated with.
+     * 
+ * + * string task_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param value The taskId to set. + * @return This builder for chaining. + */ + public Builder setTaskId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + taskId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
+     * The id of the task this config is associated with.
+     * 
+ * + * string task_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return This builder for chaining. + */ + public Builder clearTaskId() { + taskId_ = getDefaultInstance().getTaskId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
+     * The id of the task this config is associated with.
+     * 
+ * + * string task_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param value The bytes for taskId to set. + * @return This builder for chaining. + */ + public Builder setTaskIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + taskId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + private io.a2a.grpc.PushNotificationConfig pushNotificationConfig_; private com.google.protobuf.SingleFieldBuilder< io.a2a.grpc.PushNotificationConfig, io.a2a.grpc.PushNotificationConfig.Builder, io.a2a.grpc.PushNotificationConfigOrBuilder> pushNotificationConfigBuilder_; @@ -592,7 +913,7 @@ public Builder setNameBytes( * @return Whether the pushNotificationConfig field is set. */ public boolean hasPushNotificationConfig() { - return ((bitField0_ & 0x00000002) != 0); + return ((bitField0_ & 0x00000008) != 0); } /** *
@@ -625,7 +946,7 @@ public Builder setPushNotificationConfig(io.a2a.grpc.PushNotificationConfig valu
       } else {
         pushNotificationConfigBuilder_.setMessage(value);
       }
-      bitField0_ |= 0x00000002;
+      bitField0_ |= 0x00000008;
       onChanged();
       return this;
     }
@@ -643,7 +964,7 @@ public Builder setPushNotificationConfig(
       } else {
         pushNotificationConfigBuilder_.setMessage(builderForValue.build());
       }
-      bitField0_ |= 0x00000002;
+      bitField0_ |= 0x00000008;
       onChanged();
       return this;
     }
@@ -656,7 +977,7 @@ public Builder setPushNotificationConfig(
      */
     public Builder mergePushNotificationConfig(io.a2a.grpc.PushNotificationConfig value) {
       if (pushNotificationConfigBuilder_ == null) {
-        if (((bitField0_ & 0x00000002) != 0) &&
+        if (((bitField0_ & 0x00000008) != 0) &&
           pushNotificationConfig_ != null &&
           pushNotificationConfig_ != io.a2a.grpc.PushNotificationConfig.getDefaultInstance()) {
           getPushNotificationConfigBuilder().mergeFrom(value);
@@ -667,7 +988,7 @@ public Builder mergePushNotificationConfig(io.a2a.grpc.PushNotificationConfig va
         pushNotificationConfigBuilder_.mergeFrom(value);
       }
       if (pushNotificationConfig_ != null) {
-        bitField0_ |= 0x00000002;
+        bitField0_ |= 0x00000008;
         onChanged();
       }
       return this;
@@ -680,7 +1001,7 @@ public Builder mergePushNotificationConfig(io.a2a.grpc.PushNotificationConfig va
      * .a2a.v1.PushNotificationConfig push_notification_config = 2 [(.google.api.field_behavior) = REQUIRED];
      */
     public Builder clearPushNotificationConfig() {
-      bitField0_ = (bitField0_ & ~0x00000002);
+      bitField0_ = (bitField0_ & ~0x00000008);
       pushNotificationConfig_ = null;
       if (pushNotificationConfigBuilder_ != null) {
         pushNotificationConfigBuilder_.dispose();
@@ -697,7 +1018,7 @@ public Builder clearPushNotificationConfig() {
      * .a2a.v1.PushNotificationConfig push_notification_config = 2 [(.google.api.field_behavior) = REQUIRED];
      */
     public io.a2a.grpc.PushNotificationConfig.Builder getPushNotificationConfigBuilder() {
-      bitField0_ |= 0x00000002;
+      bitField0_ |= 0x00000008;
       onChanged();
       return internalGetPushNotificationConfigFieldBuilder().getBuilder();
     }
diff --git a/spec-grpc/src/main/java/io/a2a/grpc/TaskPushNotificationConfigOrBuilder.java b/spec-grpc/src/main/java/io/a2a/grpc/TaskPushNotificationConfigOrBuilder.java
index 741c9b4cf..2da32ae41 100644
--- a/spec-grpc/src/main/java/io/a2a/grpc/TaskPushNotificationConfigOrBuilder.java
+++ b/spec-grpc/src/main/java/io/a2a/grpc/TaskPushNotificationConfigOrBuilder.java
@@ -12,25 +12,63 @@ public interface TaskPushNotificationConfigOrBuilder extends
 
   /**
    * 
-   * The resource name of the config.
-   * Format: tasks/{task_id}/pushNotificationConfigs/{config_id}
+   * Optional tenant
    * 
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The name. + * string tenant = 4; + * @return The tenant. */ - java.lang.String getName(); + java.lang.String getTenant(); /** *
-   * The resource name of the config.
-   * Format: tasks/{task_id}/pushNotificationConfigs/{config_id}
+   * Optional tenant
    * 
* - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return The bytes for name. + * string tenant = 4; + * @return The bytes for tenant. */ com.google.protobuf.ByteString - getNameBytes(); + getTenantBytes(); + + /** + *
+   * The id of the config.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The id. + */ + java.lang.String getId(); + /** + *
+   * The id of the config.
+   * 
+ * + * string id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for id. + */ + com.google.protobuf.ByteString + getIdBytes(); + + /** + *
+   * The id of the task this config is associated with.
+   * 
+ * + * string task_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The taskId. + */ + java.lang.String getTaskId(); + /** + *
+   * The id of the task this config is associated with.
+   * 
+ * + * string task_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return The bytes for taskId. + */ + com.google.protobuf.ByteString + getTaskIdBytes(); /** *
diff --git a/spec-grpc/src/main/java/io/a2a/grpc/TaskState.java b/spec-grpc/src/main/java/io/a2a/grpc/TaskState.java
index c5f4bccd6..9fc6b6441 100644
--- a/spec-grpc/src/main/java/io/a2a/grpc/TaskState.java
+++ b/spec-grpc/src/main/java/io/a2a/grpc/TaskState.java
@@ -58,13 +58,13 @@ public enum TaskState
   TASK_STATE_FAILED(4),
   /**
    * 
-   * Represents the status a task was cancelled before it finished.
+   * Represents the status a task was canceled before it finished.
    * This is a terminal state.
    * 
* - * TASK_STATE_CANCELLED = 5; + * TASK_STATE_CANCELED = 5; */ - TASK_STATE_CANCELLED(5), + TASK_STATE_CANCELED(5), /** *
    * Represents the status that the task requires information to complete.
@@ -87,8 +87,7 @@ public enum TaskState
   /**
    * 
    * Represents the state that some authentication is needed from the upstream
-   * client. Authentication is expected to come out-of-band thus this is not
-   * an interrupted or terminal state.
+   * client. This is an interrupted state. Authentication is expected to come out-of-band.
    * 
* * TASK_STATE_AUTH_REQUIRED = 8; @@ -148,13 +147,13 @@ public enum TaskState public static final int TASK_STATE_FAILED_VALUE = 4; /** *
-   * Represents the status a task was cancelled before it finished.
+   * Represents the status a task was canceled before it finished.
    * This is a terminal state.
    * 
* - * TASK_STATE_CANCELLED = 5; + * TASK_STATE_CANCELED = 5; */ - public static final int TASK_STATE_CANCELLED_VALUE = 5; + public static final int TASK_STATE_CANCELED_VALUE = 5; /** *
    * Represents the status that the task requires information to complete.
@@ -177,8 +176,7 @@ public enum TaskState
   /**
    * 
    * Represents the state that some authentication is needed from the upstream
-   * client. Authentication is expected to come out-of-band thus this is not
-   * an interrupted or terminal state.
+   * client. This is an interrupted state. Authentication is expected to come out-of-band.
    * 
* * TASK_STATE_AUTH_REQUIRED = 8; @@ -215,7 +213,7 @@ public static TaskState forNumber(int value) { case 2: return TASK_STATE_WORKING; case 3: return TASK_STATE_COMPLETED; case 4: return TASK_STATE_FAILED; - case 5: return TASK_STATE_CANCELLED; + case 5: return TASK_STATE_CANCELED; case 6: return TASK_STATE_INPUT_REQUIRED; case 7: return TASK_STATE_REJECTED; case 8: return TASK_STATE_AUTH_REQUIRED; diff --git a/spec-grpc/src/main/java/io/a2a/grpc/TaskStatusUpdateEvent.java b/spec-grpc/src/main/java/io/a2a/grpc/TaskStatusUpdateEvent.java index 38b6b4768..06cb104e0 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/TaskStatusUpdateEvent.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/TaskStatusUpdateEvent.java @@ -184,21 +184,6 @@ public io.a2a.grpc.TaskStatusOrBuilder getStatusOrBuilder() { return status_ == null ? io.a2a.grpc.TaskStatus.getDefaultInstance() : status_; } - public static final int FINAL_FIELD_NUMBER = 4; - private boolean final_ = false; - /** - *
-   * If true, this is the final event in the stream for this interaction.
-   * 
- * - * bool final = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return The final. - */ - @java.lang.Override - public boolean getFinal() { - return final_; - } - public static final int METADATA_FIELD_NUMBER = 5; private com.google.protobuf.Struct metadata_; /** @@ -260,9 +245,6 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getStatus()); } - if (final_ != false) { - output.writeBool(4, final_); - } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(5, getMetadata()); } @@ -285,10 +267,6 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getStatus()); } - if (final_ != false) { - size += com.google.protobuf.CodedOutputStream - .computeBoolSize(4, final_); - } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, getMetadata()); @@ -317,8 +295,6 @@ public boolean equals(final java.lang.Object obj) { if (!getStatus() .equals(other.getStatus())) return false; } - if (getFinal() - != other.getFinal()) return false; if (hasMetadata() != other.hasMetadata()) return false; if (hasMetadata()) { if (!getMetadata() @@ -343,9 +319,6 @@ public int hashCode() { hash = (37 * hash) + STATUS_FIELD_NUMBER; hash = (53 * hash) + getStatus().hashCode(); } - hash = (37 * hash) + FINAL_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( - getFinal()); if (hasMetadata()) { hash = (37 * hash) + METADATA_FIELD_NUMBER; hash = (53 * hash) + getMetadata().hashCode(); @@ -501,7 +474,6 @@ public Builder clear() { statusBuilder_.dispose(); statusBuilder_ = null; } - final_ = false; metadata_ = null; if (metadataBuilder_ != null) { metadataBuilder_.dispose(); @@ -554,9 +526,6 @@ private void buildPartial0(io.a2a.grpc.TaskStatusUpdateEvent result) { to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000008) != 0)) { - result.final_ = final_; - } - if (((from_bitField0_ & 0x00000010) != 0)) { result.metadata_ = metadataBuilder_ == null ? metadata_ : metadataBuilder_.build(); @@ -590,9 +559,6 @@ public Builder mergeFrom(io.a2a.grpc.TaskStatusUpdateEvent other) { if (other.hasStatus()) { mergeStatus(other.getStatus()); } - if (other.getFinal() != false) { - setFinal(other.getFinal()); - } if (other.hasMetadata()) { mergeMetadata(other.getMetadata()); } @@ -639,16 +605,11 @@ public Builder mergeFrom( bitField0_ |= 0x00000004; break; } // case 26 - case 32: { - final_ = input.readBool(); - bitField0_ |= 0x00000008; - break; - } // case 32 case 42: { input.readMessage( internalGetMetadataFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000008; break; } // case 42 default: { @@ -1009,50 +970,6 @@ public io.a2a.grpc.TaskStatusOrBuilder getStatusOrBuilder() { return statusBuilder_; } - private boolean final_ ; - /** - *
-     * If true, this is the final event in the stream for this interaction.
-     * 
- * - * bool final = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return The final. - */ - @java.lang.Override - public boolean getFinal() { - return final_; - } - /** - *
-     * If true, this is the final event in the stream for this interaction.
-     * 
- * - * bool final = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param value The final to set. - * @return This builder for chaining. - */ - public Builder setFinal(boolean value) { - - final_ = value; - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
-     * If true, this is the final event in the stream for this interaction.
-     * 
- * - * bool final = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return This builder for chaining. - */ - public Builder clearFinal() { - bitField0_ = (bitField0_ & ~0x00000008); - final_ = false; - onChanged(); - return this; - } - private com.google.protobuf.Struct metadata_; private com.google.protobuf.SingleFieldBuilder< com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> metadataBuilder_; @@ -1065,7 +982,7 @@ public Builder clearFinal() { * @return Whether the metadata field is set. */ public boolean hasMetadata() { - return ((bitField0_ & 0x00000010) != 0); + return ((bitField0_ & 0x00000008) != 0); } /** *
@@ -1098,7 +1015,7 @@ public Builder setMetadata(com.google.protobuf.Struct value) {
       } else {
         metadataBuilder_.setMessage(value);
       }
-      bitField0_ |= 0x00000010;
+      bitField0_ |= 0x00000008;
       onChanged();
       return this;
     }
@@ -1116,7 +1033,7 @@ public Builder setMetadata(
       } else {
         metadataBuilder_.setMessage(builderForValue.build());
       }
-      bitField0_ |= 0x00000010;
+      bitField0_ |= 0x00000008;
       onChanged();
       return this;
     }
@@ -1129,7 +1046,7 @@ public Builder setMetadata(
      */
     public Builder mergeMetadata(com.google.protobuf.Struct value) {
       if (metadataBuilder_ == null) {
-        if (((bitField0_ & 0x00000010) != 0) &&
+        if (((bitField0_ & 0x00000008) != 0) &&
           metadata_ != null &&
           metadata_ != com.google.protobuf.Struct.getDefaultInstance()) {
           getMetadataBuilder().mergeFrom(value);
@@ -1140,7 +1057,7 @@ public Builder mergeMetadata(com.google.protobuf.Struct value) {
         metadataBuilder_.mergeFrom(value);
       }
       if (metadata_ != null) {
-        bitField0_ |= 0x00000010;
+        bitField0_ |= 0x00000008;
         onChanged();
       }
       return this;
@@ -1153,7 +1070,7 @@ public Builder mergeMetadata(com.google.protobuf.Struct value) {
      * .google.protobuf.Struct metadata = 5;
      */
     public Builder clearMetadata() {
-      bitField0_ = (bitField0_ & ~0x00000010);
+      bitField0_ = (bitField0_ & ~0x00000008);
       metadata_ = null;
       if (metadataBuilder_ != null) {
         metadataBuilder_.dispose();
@@ -1170,7 +1087,7 @@ public Builder clearMetadata() {
      * .google.protobuf.Struct metadata = 5;
      */
     public com.google.protobuf.Struct.Builder getMetadataBuilder() {
-      bitField0_ |= 0x00000010;
+      bitField0_ |= 0x00000008;
       onChanged();
       return internalGetMetadataFieldBuilder().getBuilder();
     }
diff --git a/spec-grpc/src/main/java/io/a2a/grpc/TaskStatusUpdateEventOrBuilder.java b/spec-grpc/src/main/java/io/a2a/grpc/TaskStatusUpdateEventOrBuilder.java
index 6e086c3f3..225000e2a 100644
--- a/spec-grpc/src/main/java/io/a2a/grpc/TaskStatusUpdateEventOrBuilder.java
+++ b/spec-grpc/src/main/java/io/a2a/grpc/TaskStatusUpdateEventOrBuilder.java
@@ -77,16 +77,6 @@ public interface TaskStatusUpdateEventOrBuilder extends
    */
   io.a2a.grpc.TaskStatusOrBuilder getStatusOrBuilder();
 
-  /**
-   * 
-   * If true, this is the final event in the stream for this interaction.
-   * 
- * - * bool final = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return The final. - */ - boolean getFinal(); - /** *
    * Optional metadata to associate with the task update.
diff --git a/spec-grpc/src/main/java/io/a2a/grpc/mapper/A2ACommonFieldMapper.java b/spec-grpc/src/main/java/io/a2a/grpc/mapper/A2ACommonFieldMapper.java
index 0acdc5d3e..45063b3ed 100644
--- a/spec-grpc/src/main/java/io/a2a/grpc/mapper/A2ACommonFieldMapper.java
+++ b/spec-grpc/src/main/java/io/a2a/grpc/mapper/A2ACommonFieldMapper.java
@@ -173,13 +173,14 @@ default Map structToMap(Struct struct) {
     /**
      * Converts a Java Object to protobuf Value.
      * 

- * Supports String, Number, Boolean, Map, and List types. - * Used internally for struct conversion. + * Supports String, Number, Boolean, Map, List types, and null. + * Used for struct conversion and arbitrary JSON data. * * @param value the Java object * @return protobuf Value */ - private Value objectToValue(Object value) { + @SuppressWarnings("unchecked") + default Value objectToValue(Object value) { Value.Builder valueBuilder = Value.newBuilder(); if (value instanceof String) { valueBuilder.setStringValue((String) value); @@ -198,13 +199,21 @@ private Value objectToValue(Object value) { /** * Converts protobuf Value to Java Object. *

- * Returns appropriate Java type based on Value's kind. - * Used internally for struct conversion. + * Returns appropriate Java type based on Value's kind: + *

    + *
  • STRUCT_VALUE -> {@code Map}
  • + *
  • LIST_VALUE -> {@code List} + *
  • BOOL_VALUE -> {@code Boolean}
  • + *
  • NUMBER_VALUE -> {@code Double}
  • + *
  • STRING_VALUE -> {@code String}
  • + *
  • NULL_VALUE -> {@code null}
  • + * + * Used for struct conversion and arbitrary JSON data. * * @param value the protobuf Value * @return Java object (String, Double, Boolean, Map, List, or null) */ - private Object valueToObject(Value value) { + default Object valueToObject(Value value) { switch (value.getKindCase()) { case STRUCT_VALUE: return structToMap(value.getStructValue()); @@ -227,12 +236,12 @@ private Object valueToObject(Value value) { /** * Converts Java List to protobuf ListValue. *

    - * Used internally for struct conversion. + * Used for struct conversion and arbitrary JSON data. * * @param list the Java list * @return protobuf ListValue */ - private com.google.protobuf.ListValue listToListValue(List list) { + default com.google.protobuf.ListValue listToListValue(List list) { com.google.protobuf.ListValue.Builder listValueBuilder = com.google.protobuf.ListValue.newBuilder(); if (list != null) { list.forEach(o -> listValueBuilder.addValues(objectToValue(o))); diff --git a/spec-grpc/src/main/java/io/a2a/grpc/mapper/AgentInterfaceMapper.java b/spec-grpc/src/main/java/io/a2a/grpc/mapper/AgentInterfaceMapper.java index 383afb3a1..184a8c346 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/mapper/AgentInterfaceMapper.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/mapper/AgentInterfaceMapper.java @@ -2,6 +2,7 @@ import org.mapstruct.CollectionMappingStrategy; import org.mapstruct.Mapper; +import org.mapstruct.Mapping; /** * Mapper between {@link io.a2a.spec.AgentInterface} and {@link io.a2a.grpc.AgentInterface}. diff --git a/spec-grpc/src/main/java/io/a2a/grpc/mapper/AuthenticationInfoMapper.java b/spec-grpc/src/main/java/io/a2a/grpc/mapper/AuthenticationInfoMapper.java index 8d6db42ea..1e50f6d3d 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/mapper/AuthenticationInfoMapper.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/mapper/AuthenticationInfoMapper.java @@ -1,11 +1,15 @@ package io.a2a.grpc.mapper; + import org.mapstruct.CollectionMappingStrategy; import org.mapstruct.Mapper; import org.mapstruct.Mapping; /** * Mapper between {@link io.a2a.spec.AuthenticationInfo} and {@link io.a2a.grpc.AuthenticationInfo}. + *

    + * Maps between domain AuthenticationInfo (schemes as List of String) and proto AuthenticationInfo (scheme as String). + * The proto scheme field is mapped to/from the first element of the domain schemes list. */ @Mapper(config = A2AProtoMapperConfig.class, collectionMappingStrategy = CollectionMappingStrategy.ADDER_PREFERRED) @@ -13,8 +17,18 @@ public interface AuthenticationInfoMapper { AuthenticationInfoMapper INSTANCE = A2AMappers.getMapper(AuthenticationInfoMapper.class); + /** + * Converts domain AuthenticationInfo to proto AuthenticationInfo. + * Takes the first scheme from the schemes list. + */ @Mapping(target = "credentials", source = "credentials", conditionExpression = "java(domain.credentials() != null)") io.a2a.grpc.AuthenticationInfo toProto(io.a2a.spec.AuthenticationInfo domain); + /** + * Converts proto AuthenticationInfo to domain AuthenticationInfo. + * Wraps the single scheme in a list. + */ io.a2a.spec.AuthenticationInfo fromProto(io.a2a.grpc.AuthenticationInfo proto); + + } diff --git a/spec-grpc/src/main/java/io/a2a/grpc/mapper/CreateTaskPushNotificationConfigMapper.java b/spec-grpc/src/main/java/io/a2a/grpc/mapper/CreateTaskPushNotificationConfigMapper.java index 428ea2846..ed15e7500 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/mapper/CreateTaskPushNotificationConfigMapper.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/mapper/CreateTaskPushNotificationConfigMapper.java @@ -8,17 +8,6 @@ /** * MapStruct mapper for CreateTaskPushNotificationConfigRequest → TaskPushNotificationConfig. - *

    - * Handles resource name parsing and ID override logic for creating push notification configs. - *

    - * Resource Name Handling: - *

      - *
    • Extracts taskId from parent resource name (format: "tasks/{task_id}")
    • - *
    • Fallback: Extracts from config.name if parent is blank
    • - *
    • Overrides PushNotificationConfig.id with config_id from request
    • - *
    - *

    - * Compile-Time Safety: If the proto changes fields, MapStruct will fail to compile. */ @Mapper(config = A2AProtoMapperConfig.class, uses = {PushNotificationConfigMapper.class}) public interface CreateTaskPushNotificationConfigMapper { @@ -27,87 +16,50 @@ public interface CreateTaskPushNotificationConfigMapper { /** * Converts CreateTaskPushNotificationConfigRequest to domain TaskPushNotificationConfig. - *

    - * Extracts taskId from parent resource name and maps PushNotificationConfig with - * ID override from config_id field. - * The tenant field is set to null as it's not present in the protobuf definition. * * @param request the protobuf CreateTaskPushNotificationConfigRequest * @return domain TaskPushNotificationConfig */ - @Mapping(target = "taskId", expression = "java(extractTaskId(request))") + @Mapping(target = "taskId", source = "taskId") @Mapping(target = "pushNotificationConfig", expression = "java(mapPushNotificationConfigWithId(request))") + @Mapping(target = "tenant", source = "tenant") TaskPushNotificationConfig fromProto(CreateTaskPushNotificationConfigRequest request); /** - * Converts CreateTaskPushNotificationConfigRequest to domain TaskPushNotificationConfig. - *

    - * Extracts taskId from parent resource name and maps PushNotificationConfig with - * ID override from config_id field. + * Converts domain TaskPushNotificationConfig to CreateTaskPushNotificationConfigRequest. * - * @param config the domainTaskPushNotificationConfig + * @param config the domain TaskPushNotificationConfig * @return proto CreateTaskPushNotificationConfigRequest */ - @Mapping(target = "parent", expression = "java(ResourceNameParser.defineTaskName(config.taskId()))") + @Mapping(target = "taskId", source = "taskId") @Mapping(target = "configId", expression = "java(extractConfigId(config))") - @Mapping(target = "config", expression = "java(mapPushNotificationConfig(config))") + @Mapping(target = "config", source = "pushNotificationConfig") + @Mapping(target = "tenant", source = "tenant") CreateTaskPushNotificationConfigRequest toProto(TaskPushNotificationConfig config); /** - * Extracts the task ID from the parent resource name. - *

    - * Format: "tasks/{task_id}" - * Fallback: If parent is blank, extracts from config.name instead. - * - * @param request the protobuf CreateTaskPushNotificationConfigRequest - * @return the extracted task ID - */ - default String extractTaskId(CreateTaskPushNotificationConfigRequest request) { - String parent = request.getParent(); - - if (parent == null || parent.isBlank()) { - // Fallback: extract from config.name - return ResourceNameParser.extractTaskId(request.getConfig().getName()); - } - - // Extract from parent resource name - return ResourceNameParser.extractParentId(parent); - } - - /** - * Extracts the config ID from the configuration. If it is not defined, the task ID is used. + * Extracts the config ID from the configuration. * * @param config the TaskPushNotificationConfig * @return the extracted config ID */ default String extractConfigId(TaskPushNotificationConfig config) { - if (config.pushNotificationConfig() != null && config.pushNotificationConfig().id() != null && !config.pushNotificationConfig().id().isBlank()) { - return config.pushNotificationConfig().id(); - } - return config.taskId(); + return config.pushNotificationConfig() != null ? config.pushNotificationConfig().id() : null; } /** * Maps the protobuf PushNotificationConfig to domain, injecting config_id from request. - *

    - * The config_id from the request overrides the ID in the proto's PushNotificationConfig. * * @param request the protobuf CreateTaskPushNotificationConfigRequest * @return domain PushNotificationConfig with config_id injected */ default PushNotificationConfig mapPushNotificationConfigWithId(CreateTaskPushNotificationConfigRequest request) { - // Check if config and push_notification_config exist - if (!request.hasConfig() - || !request.getConfig().hasPushNotificationConfig() - || request.getConfig().getPushNotificationConfig() - .equals(io.a2a.grpc.PushNotificationConfig.getDefaultInstance())) { + if (!request.hasConfig()) { return null; } // Map the proto PushNotificationConfig - PushNotificationConfig result = PushNotificationConfigMapper.INSTANCE.fromProto( - request.getConfig().getPushNotificationConfig() - ); + PushNotificationConfig result = PushNotificationConfigMapper.INSTANCE.fromProto(request.getConfig()); // Override ID with config_id from request String configId = request.getConfigId(); @@ -122,16 +74,4 @@ default PushNotificationConfig mapPushNotificationConfigWithId(CreateTaskPushNot return result; } - - /** - * Maps the protobuf PushNotificationConfig to domain, injecting config_id from request. - *

    - * The config_id from the request overrides the ID in the proto's PushNotificationConfig. - * - * @param domain the protobuf CreateTaskPushNotificationConfigRequest - * @return domain PushNotificationConfig with config_id injected - */ - default io.a2a.grpc.TaskPushNotificationConfig mapPushNotificationConfig(TaskPushNotificationConfig domain) { - return TaskPushNotificationConfigMapper.INSTANCE.toProto(domain); - } } diff --git a/spec-grpc/src/main/java/io/a2a/grpc/mapper/DataPartMapper.java b/spec-grpc/src/main/java/io/a2a/grpc/mapper/DataPartMapper.java deleted file mode 100644 index 68a79eea6..000000000 --- a/spec-grpc/src/main/java/io/a2a/grpc/mapper/DataPartMapper.java +++ /dev/null @@ -1,35 +0,0 @@ -package io.a2a.grpc.mapper; - -import org.mapstruct.Mapper; -import org.mapstruct.Mapping; - -/** - * Mapper between {@link io.a2a.spec.DataPart} and {@link io.a2a.grpc.DataPart}. - *

    - * Handles conversion of structured data using Protobuf Struct. - * Uses CommonFieldMapper for Map ↔ Struct conversion. - *

    - * Note: Proto DataPart only has 'data' field. Domain DataPart also has 'metadata' field - * (inherited from Part), which is not persisted in the proto and will be null after conversion. - * Uses @ObjectFactory to resolve constructor ambiguity. - */ -@Mapper(config = A2AProtoMapperConfig.class, uses = {A2ACommonFieldMapper.class}) -public interface DataPartMapper { - - DataPartMapper INSTANCE = A2AMappers.getMapper(DataPartMapper.class); - - /** - * Converts domain DataPart to proto DataPart. - * Uses CommonFieldMapper for Map → Struct conversion. - * Metadata is ignored (not part of proto definition). - */ - @Mapping(target = "data", source = "data", conditionExpression = "java(domain.data() != null)", qualifiedByName = "mapToStruct") - io.a2a.grpc.DataPart toProto(io.a2a.spec.DataPart domain); - - /** - * Converts proto DataPart to domain DataPart. - * Uses CommonFieldMapper for Struct → Map conversion via Builder. - */ - @Mapping(target = "data", source = "data", qualifiedByName = "structToMap") - io.a2a.spec.DataPart fromProto(io.a2a.grpc.DataPart proto); -} diff --git a/spec-grpc/src/main/java/io/a2a/grpc/mapper/DeleteTaskPushNotificationConfigParamsMapper.java b/spec-grpc/src/main/java/io/a2a/grpc/mapper/DeleteTaskPushNotificationConfigParamsMapper.java index 5ab14bf2c..f7ddd3ce4 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/mapper/DeleteTaskPushNotificationConfigParamsMapper.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/mapper/DeleteTaskPushNotificationConfigParamsMapper.java @@ -8,8 +8,6 @@ /** * Mapper between {@link io.a2a.grpc.DeleteTaskPushNotificationConfigRequest} and {@link io.a2a.spec.DeleteTaskPushNotificationConfigParams}. - *

    - * Extracts task ID and config ID from resource name format "tasks/{taskId}/pushNotificationConfigs/{configId}" using {@link ResourceNameParser}. */ @Mapper(config = A2AProtoMapperConfig.class) public interface DeleteTaskPushNotificationConfigParamsMapper { @@ -18,18 +16,18 @@ public interface DeleteTaskPushNotificationConfigParamsMapper { /** * Converts proto DeleteTaskPushNotificationConfigRequest to domain DeleteTaskPushNotificationConfigParams. - * Parses the name field to extract both task ID and config ID. */ @BeanMapping(builder = @Builder(buildMethod = "build")) - @Mapping(target = "id", expression = "java(ResourceNameParser.parseTaskPushNotificationConfigName(proto.getName())[0])") - @Mapping(target = "pushNotificationConfigId", expression = "java(ResourceNameParser.parseTaskPushNotificationConfigName(proto.getName())[1])") + @Mapping(target = "id", source = "taskId") + @Mapping(target = "pushNotificationConfigId", source = "id") @Mapping(target = "tenant", source = "tenant") DeleteTaskPushNotificationConfigParams fromProto(io.a2a.grpc.DeleteTaskPushNotificationConfigRequest proto); /** * Converts domain DeleteTaskPushNotificationConfigParams to proto DeleteTaskPushNotificationConfigRequest. - * Constructs the name field from task ID and config ID. */ - @Mapping(target = "name", expression = "java(ResourceNameParser.defineTaskPushNotificationConfigName(domain.id(), domain.pushNotificationConfigId()))") + @Mapping(target = "taskId", source = "id") + @Mapping(target = "id", source = "pushNotificationConfigId") + @Mapping(target = "tenant", source = "tenant") io.a2a.grpc.DeleteTaskPushNotificationConfigRequest toProto(DeleteTaskPushNotificationConfigParams domain); } diff --git a/spec-grpc/src/main/java/io/a2a/grpc/mapper/FilePartMapper.java b/spec-grpc/src/main/java/io/a2a/grpc/mapper/FilePartMapper.java deleted file mode 100644 index 2b1993756..000000000 --- a/spec-grpc/src/main/java/io/a2a/grpc/mapper/FilePartMapper.java +++ /dev/null @@ -1,81 +0,0 @@ -package io.a2a.grpc.mapper; - - -import java.util.Base64; - -import com.google.protobuf.ByteString; -import io.a2a.spec.FileContent; -import io.a2a.spec.FileWithBytes; -import io.a2a.spec.FileWithUri; -import io.a2a.spec.InvalidRequestError; -import org.mapstruct.Mapper; - -/** - * Mapper between {@link io.a2a.spec.FilePart} and {@link io.a2a.grpc.FilePart}. - *

    - * Handles polymorphic FileContent (FileWithBytes vs FileWithUri) conversion. - *

    - * Manual Implementation Required: Must use manual default methods to handle protobuf oneof pattern - * (file_with_bytes vs file_with_uri fields) and ByteString conversion, which MapStruct cannot automatically handle. - */ -@Mapper(config = A2AProtoMapperConfig.class) -public interface FilePartMapper { - - FilePartMapper INSTANCE = A2AMappers.getMapper(FilePartMapper.class); - - /** - * Converts domain FilePart to proto FilePart. - * Handles FileWithBytes and FileWithUri polymorphism. - */ - default io.a2a.grpc.FilePart toProto(io.a2a.spec.FilePart domain) { - if (domain == null) { - return null; - } - - io.a2a.grpc.FilePart.Builder builder = io.a2a.grpc.FilePart.newBuilder(); - FileContent fileContent = domain.file(); - - if (fileContent instanceof FileWithBytes fileWithBytes) { - builder.setFileWithBytes(ByteString.copyFrom(Base64.getDecoder().decode(fileWithBytes.bytes()))); - if (fileWithBytes.mimeType() != null) { - builder.setMediaType(fileWithBytes.mimeType()); - } - if (fileWithBytes.name() != null) { - builder.setName(fileWithBytes.name()); - } - } else if (fileContent instanceof FileWithUri fileWithUri) { - builder.setFileWithUri(fileWithUri.uri()); - if (fileWithUri.mimeType() != null) { - builder.setMediaType(fileWithUri.mimeType()); - } - if (fileWithUri.name() != null) { - builder.setName(fileWithUri.name()); - } - } - - return builder.build(); - } - - /** - * Converts proto FilePart to domain FilePart. - * Reconstructs FileWithBytes or FileWithUri based on oneof field. - */ - default io.a2a.spec.FilePart fromProto(io.a2a.grpc.FilePart proto) { - if (proto == null) { - return null; - } - - String mimeType = proto.getMediaType().isEmpty() ? null : proto.getMediaType(); - String name = proto.getName().isEmpty() ? null : proto.getName(); - - if (proto.hasFileWithBytes()) { - String bytes = Base64.getEncoder().encodeToString(proto.getFileWithBytes().toByteArray()); - return new io.a2a.spec.FilePart(new FileWithBytes(mimeType, name, bytes)); - } else if (proto.hasFileWithUri()) { - String uri = proto.getFileWithUri(); - return new io.a2a.spec.FilePart(new FileWithUri(mimeType, name, uri)); - } - - throw new InvalidRequestError(); - } -} diff --git a/spec-grpc/src/main/java/io/a2a/grpc/mapper/GetTaskPushNotificationConfigParamsMapper.java b/spec-grpc/src/main/java/io/a2a/grpc/mapper/GetTaskPushNotificationConfigParamsMapper.java index 2a4be5f34..5a74ac2cc 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/mapper/GetTaskPushNotificationConfigParamsMapper.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/mapper/GetTaskPushNotificationConfigParamsMapper.java @@ -8,11 +8,6 @@ /** * Mapper between {@link io.a2a.grpc.GetTaskPushNotificationConfigRequest} and {@link io.a2a.spec.GetTaskPushNotificationConfigParams}. - *

    - * Extracts task ID and config ID from resource name using {@link ResourceNameParser}. - * Handles both formats: - * - "tasks/{taskId}" (uses taskId as configId) - * - "tasks/{taskId}/pushNotificationConfigs/{configId}" */ @Mapper(config = A2AProtoMapperConfig.class) public interface GetTaskPushNotificationConfigParamsMapper { @@ -21,19 +16,18 @@ public interface GetTaskPushNotificationConfigParamsMapper { /** * Converts proto GetTaskPushNotificationConfigRequest to domain GetTaskPushNotificationConfigParams. - * Parses the name field to extract both task ID and config ID. */ @BeanMapping(builder = @Builder(buildMethod = "build")) - @Mapping(target = "id", expression = "java(ResourceNameParser.parseGetTaskPushNotificationConfigName(proto.getName())[0])") - @Mapping(target = "pushNotificationConfigId", expression = "java(ResourceNameParser.parseGetTaskPushNotificationConfigName(proto.getName())[1])") + @Mapping(target = "id", source = "taskId") + @Mapping(target = "pushNotificationConfigId", source = "id") @Mapping(target = "tenant", source = "tenant") GetTaskPushNotificationConfigParams fromProto(io.a2a.grpc.GetTaskPushNotificationConfigRequest proto); /** - * Converts domain Message to proto Message.Uses CommonFieldMapper for metadata conversion and ADDER_PREFERRED for lists. - * @param domain - * @return + * Converts domain GetTaskPushNotificationConfigParams to proto GetTaskPushNotificationConfigRequest. */ - @Mapping(target = "name", expression = "java(ResourceNameParser.defineGetTaskPushNotificationConfigName(domain.id(), domain.pushNotificationConfigId()))") + @Mapping(target = "taskId", source = "id") + @Mapping(target = "id", source = "pushNotificationConfigId", conditionExpression = "java(domain.pushNotificationConfigId() != null)") + @Mapping(target = "tenant", source = "tenant") io.a2a.grpc.GetTaskPushNotificationConfigRequest toProto(GetTaskPushNotificationConfigParams domain); } diff --git a/spec-grpc/src/main/java/io/a2a/grpc/mapper/ListTaskPushNotificationConfigParamsMapper.java b/spec-grpc/src/main/java/io/a2a/grpc/mapper/ListTaskPushNotificationConfigParamsMapper.java index 1e653eea8..f54ba28d2 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/mapper/ListTaskPushNotificationConfigParamsMapper.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/mapper/ListTaskPushNotificationConfigParamsMapper.java @@ -8,8 +8,6 @@ /** * Mapper between {@link io.a2a.grpc.ListTaskPushNotificationConfigRequest} and {@link io.a2a.spec.ListTaskPushNotificationConfigParams}. - *

    - * Extracts task ID from parent resource name format "tasks/{id}" using {@link ResourceNameParser}. */ @Mapper(config = A2AProtoMapperConfig.class) public interface ListTaskPushNotificationConfigParamsMapper { @@ -18,16 +16,16 @@ public interface ListTaskPushNotificationConfigParamsMapper { /** * Converts proto ListTaskPushNotificationConfigRequest to domain ListTaskPushNotificationConfigParams. - * Extracts task ID from the parent field and maps pagination parameters. */ @BeanMapping(builder = @Builder(buildMethod = "build")) - @Mapping(target = "id", expression = "java(ResourceNameParser.extractParentId(proto.getParent()))") + @Mapping(target = "id", source = "taskId") + @Mapping(target = "tenant", source = "tenant") ListTaskPushNotificationConfigParams fromProto(io.a2a.grpc.ListTaskPushNotificationConfigRequest proto); /** * Converts domain ListTaskPushNotificationConfigParams to proto ListTaskPushNotificationConfigRequest. - * Constructs the parent field from task ID. */ - @Mapping(target = "parent", expression = "java(ResourceNameParser.defineTaskName(domain.id()))") + @Mapping(target = "taskId", source = "id") + @Mapping(target = "tenant", source = "tenant") io.a2a.grpc.ListTaskPushNotificationConfigRequest toProto(ListTaskPushNotificationConfigParams domain); } diff --git a/spec-grpc/src/main/java/io/a2a/grpc/mapper/OAuthFlowsMapper.java b/spec-grpc/src/main/java/io/a2a/grpc/mapper/OAuthFlowsMapper.java index e919b50d6..66894d49a 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/mapper/OAuthFlowsMapper.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/mapper/OAuthFlowsMapper.java @@ -17,6 +17,8 @@ public interface OAuthFlowsMapper { OAuthFlowsMapper INSTANCE = A2AMappers.getMapper(OAuthFlowsMapper.class); + @Mapping(target = "implicit", ignore = true) + @Mapping(target = "password", ignore = true) io.a2a.grpc.OAuthFlows toProto(io.a2a.spec.OAuthFlows domain); io.a2a.spec.OAuthFlows fromProto(io.a2a.grpc.OAuthFlows proto); diff --git a/spec-grpc/src/main/java/io/a2a/grpc/mapper/PartMapper.java b/spec-grpc/src/main/java/io/a2a/grpc/mapper/PartMapper.java index 98c777256..41cef1a8d 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/mapper/PartMapper.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/mapper/PartMapper.java @@ -1,7 +1,14 @@ package io.a2a.grpc.mapper; +import java.util.Base64; + +import com.google.protobuf.ByteString; +import com.google.protobuf.Value; import io.a2a.spec.DataPart; +import io.a2a.spec.FileContent; import io.a2a.spec.FilePart; +import io.a2a.spec.FileWithBytes; +import io.a2a.spec.FileWithUri; import io.a2a.spec.InvalidRequestError; import io.a2a.spec.Part; import io.a2a.spec.TextPart; @@ -10,24 +17,25 @@ /** * Mapper between {@link io.a2a.spec.Part} and {@link io.a2a.grpc.Part}. *

    - * Handles polymorphic Part conversion by delegating to type-specific mappers: + * Handles polymorphic Part conversion using the proto's oneof content field: *

      - *
    • TextPart - handled directly (text field on proto Part)
    • - *
    • FilePart - delegated to FilePartMapper
    • - *
    • DataPart - delegated to DataPartMapper
    • + *
    • TextPart - maps to Part.text
    • + *
    • FilePart(FileWithBytes) - maps to Part.raw + Part.filename + Part.media_type
    • + *
    • FilePart(FileWithUri) - maps to Part.url + Part.filename + Part.media_type
    • + *
    • DataPart - maps to Part.data (google.protobuf.Value containing any JSON value: object, array, primitive, or null)
    • *
    *

    - * Manual Implementation Required: Must use manual instanceof dispatch to handle protobuf oneof pattern - * (text vs file vs data fields), as MapStruct's @SubclassMapping maps to different target types, not different fields of the same type. + * Manual Implementation Required: Must use manual instanceof dispatch to handle protobuf oneof pattern, + * as MapStruct's @SubclassMapping maps to different target types, not different fields of the same type. */ -@Mapper(config = A2AProtoMapperConfig.class, uses = {FilePartMapper.class, DataPartMapper.class}) +@Mapper(config = A2AProtoMapperConfig.class, uses = {A2ACommonFieldMapper.class}) public interface PartMapper { PartMapper INSTANCE = A2AMappers.getMapper(PartMapper.class); /** * Converts domain Part to proto Part. - * Handles TextPart, FilePart, and DataPart polymorphism. + * Handles TextPart, FilePart (FileWithBytes and FileWithUri), and DataPart polymorphism. */ default io.a2a.grpc.Part toProto(Part domain) { if (domain == null) { @@ -39,9 +47,31 @@ default io.a2a.grpc.Part toProto(Part domain) { if (domain instanceof TextPart textPart) { builder.setText(textPart.text()); } else if (domain instanceof FilePart filePart) { - builder.setFile(FilePartMapper.INSTANCE.toProto(filePart)); + FileContent fileContent = filePart.file(); + + if (fileContent instanceof FileWithBytes fileWithBytes) { + // Map to raw (bytes), filename, and media_type + builder.setRaw(ByteString.copyFrom(Base64.getDecoder().decode(fileWithBytes.bytes()))); + if (fileWithBytes.name() != null) { + builder.setFilename(fileWithBytes.name()); + } + if (fileWithBytes.mimeType() != null) { + builder.setMediaType(fileWithBytes.mimeType()); + } + } else if (fileContent instanceof FileWithUri fileWithUri) { + // Map to url, filename, and media_type + builder.setUrl(fileWithUri.uri()); + if (fileWithUri.name() != null) { + builder.setFilename(fileWithUri.name()); + } + if (fileWithUri.mimeType() != null) { + builder.setMediaType(fileWithUri.mimeType()); + } + } } else if (domain instanceof DataPart dataPart) { - builder.setData(DataPartMapper.INSTANCE.toProto(dataPart)); + // Map data to google.protobuf.Value (supports object, array, primitive, or null) + Value dataValue = A2ACommonFieldMapper.INSTANCE.objectToValue(dataPart.data()); + builder.setData(dataValue); } return builder.build(); @@ -49,7 +79,7 @@ default io.a2a.grpc.Part toProto(Part domain) { /** * Converts proto Part to domain Part. - * Reconstructs TextPart, FilePart, or DataPart based on oneof field. + * Reconstructs TextPart, FilePart, or DataPart based on oneof content field. */ default Part fromProto(io.a2a.grpc.Part proto) { if (proto == null) { @@ -58,10 +88,23 @@ default Part fromProto(io.a2a.grpc.Part proto) { if (proto.hasText()) { return new TextPart(proto.getText()); - } else if (proto.hasFile()) { - return FilePartMapper.INSTANCE.fromProto(proto.getFile()); + } else if (proto.hasRaw()) { + // raw bytes → FilePart(FileWithBytes) + String bytes = Base64.getEncoder().encodeToString(proto.getRaw().toByteArray()); + String mimeType = proto.getMediaType().isEmpty() ? null : proto.getMediaType(); + String name = proto.getFilename().isEmpty() ? null : proto.getFilename(); + return new FilePart(new FileWithBytes(mimeType, name, bytes)); + } else if (proto.hasUrl()) { + // url → FilePart(FileWithUri) + String uri = proto.getUrl(); + String mimeType = proto.getMediaType().isEmpty() ? null : proto.getMediaType(); + String name = proto.getFilename().isEmpty() ? null : proto.getFilename(); + return new FilePart(new FileWithUri(mimeType, name, uri)); } else if (proto.hasData()) { - return DataPartMapper.INSTANCE.fromProto(proto.getData()); + // data (google.protobuf.Value containing any JSON value) → DataPart + Value dataValue = proto.getData(); + Object data = A2ACommonFieldMapper.INSTANCE.valueToObject(dataValue); + return new DataPart(data); } throw new InvalidRequestError(); diff --git a/spec-grpc/src/main/java/io/a2a/grpc/mapper/SecurityMapper.java b/spec-grpc/src/main/java/io/a2a/grpc/mapper/SecurityMapper.java index 1e6f26dde..e00e5f70f 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/mapper/SecurityMapper.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/mapper/SecurityMapper.java @@ -6,17 +6,17 @@ import java.util.Map; import com.google.protobuf.ProtocolStringList; -import io.a2a.grpc.Security; +import io.a2a.grpc.SecurityRequirement; import io.a2a.grpc.StringList; import org.mapstruct.Mapper; /** - * Mapper between domain security requirements and protobuf Security messages. + * Mapper between domain security requirements and protobuf SecurityRequirement messages. *

    * Domain representation: {@code List>>} where each map represents * one security option with scheme names as keys and scopes as values. *

    - * Proto representation: {@code repeated Security} where each Security has + * Proto representation: {@code repeated SecurityRequirement} where each SecurityRequirement has * {@code map schemes}. *

    * Example: A security requirement that allows either OAuth2 with read/write scopes OR API Key: @@ -26,13 +26,13 @@ * {"apiKey": []} * ] * Proto: [ - * Security{schemes: {"oauth2": StringList{values: ["read", "write"]}}}, - * Security{schemes: {"apiKey": StringList{values: []}}} + * SecurityRequirement{schemes: {"oauth2": StringList{values: ["read", "write"]}}}, + * SecurityRequirement{schemes: {"apiKey": StringList{values: []}}} * ] * *

    * Manual Implementation Required: Handles complex nested structure ({@code List>>} ↔ - * {@code repeated Security} with {@code map}) requiring manual iteration and StringList wrapper handling. + * {@code repeated SecurityRequirement} with {@code map}) requiring manual iteration and StringList wrapper handling. */ @Mapper(config = A2AProtoMapperConfig.class) public interface SecurityMapper { @@ -40,19 +40,19 @@ public interface SecurityMapper { SecurityMapper INSTANCE = A2AMappers.getMapper(SecurityMapper.class); /** - * Converts a single domain security requirement map to a proto Security message. + * Converts a single domain security requirement map to a proto SecurityRequirement message. *

    * MapStruct will call this method for each element when mapping the list. * * @param schemeMap map of scheme names to scopes - * @return Security proto message, or null if input is null + * @return SecurityRequirement proto message, or null if input is null */ - default Security mapSecurityItem(Map> schemeMap) { + default SecurityRequirement mapSecurityItem(Map> schemeMap) { if (schemeMap == null) { return null; } - Security.Builder securityBuilder = Security.newBuilder(); + SecurityRequirement.Builder securityBuilder = SecurityRequirement.newBuilder(); for (Map.Entry> entry : schemeMap.entrySet()) { StringList.Builder stringListBuilder = StringList.newBuilder(); if (entry.getValue() != null) { @@ -64,20 +64,20 @@ default Security mapSecurityItem(Map> schemeMap) { } /** - * Converts domain security requirements to proto Security messages. + * Converts domain security requirements to proto SecurityRequirement messages. *

    - * Each Map in the domain list becomes one Security message in proto, representing + * Each Map in the domain list becomes one SecurityRequirement message in proto, representing * one way to satisfy the security requirements (OR relationship between list items). * * @param domainSecurity list of maps representing security requirement options - * @return list of Security proto messages, or null if input is null + * @return list of SecurityRequirement proto messages, or null if input is null */ - default List toProto(List>> domainSecurity) { + default List toProto(List>> domainSecurity) { if (domainSecurity == null) { return null; } - List protoList = new ArrayList<>(domainSecurity.size()); + List protoList = new ArrayList<>(domainSecurity.size()); for (Map> schemeMap : domainSecurity) { protoList.add(mapSecurityItem(schemeMap)); } @@ -85,18 +85,18 @@ default List toProto(List>> domainSecurity) { } /** - * Converts proto Security messages to domain security requirements. + * Converts proto SecurityRequirement messages to domain security requirements. * - * @param protoSecurity list of Security proto messages + * @param protoSecurity list of SecurityRequirement proto messages * @return list of maps representing security requirement options, or null if input is null */ - default List>> fromProto(List protoSecurity) { + default List>> fromProto(List protoSecurity) { if (protoSecurity == null) { return null; } List>> domainList = new ArrayList<>(protoSecurity.size()); - for (Security security : protoSecurity) { + for (SecurityRequirement security : protoSecurity) { Map> schemeMap = new LinkedHashMap<>(); for (Map.Entry entry : security.getSchemesMap().entrySet()) { ProtocolStringList listList = entry.getValue().getListList(); diff --git a/spec-grpc/src/main/java/io/a2a/grpc/mapper/SubscribeToTaskRequestMapper.java b/spec-grpc/src/main/java/io/a2a/grpc/mapper/SubscribeToTaskRequestMapper.java index 4768fd5c7..c21d1d8a7 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/mapper/SubscribeToTaskRequestMapper.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/mapper/SubscribeToTaskRequestMapper.java @@ -33,7 +33,7 @@ default io.a2a.grpc.SubscribeToTaskRequest toProto(SubscribeToTaskRequest domain return null; } return io.a2a.grpc.SubscribeToTaskRequest.newBuilder() - .setName(ResourceNameParser.defineTaskName(domain.getParams().id())) + .setId(domain.getParams().id()) .build(); } @@ -45,11 +45,11 @@ default io.a2a.grpc.SubscribeToTaskRequest toProto(SubscribeToTaskRequest domain * @return the domain SubscribeToTaskRequest */ default SubscribeToTaskRequest fromProto(io.a2a.grpc.SubscribeToTaskRequest proto) { - if (proto == null || proto.getName() == null) { + if (proto == null || proto.getId()== null) { return null; } return SubscribeToTaskRequest.builder() - .params(new io.a2a.spec.TaskIdParams(ResourceNameParser.extractTaskId(proto.getName()))) + .params(new io.a2a.spec.TaskIdParams(proto.getId())) .build(); } } diff --git a/spec-grpc/src/main/java/io/a2a/grpc/mapper/TaskIdParamsMapper.java b/spec-grpc/src/main/java/io/a2a/grpc/mapper/TaskIdParamsMapper.java index e83c90a42..70595b50e 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/mapper/TaskIdParamsMapper.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/mapper/TaskIdParamsMapper.java @@ -21,7 +21,7 @@ public interface TaskIdParamsMapper { * Extracts task ID from the resource name. */ @BeanMapping(builder = @Builder(buildMethod = "build")) - @Mapping(target = "id", expression = "java(ResourceNameParser.extractTaskId(proto.getName()))") + @Mapping(target = "id", source = "id") TaskIdParams fromProtoCancelTaskRequest(io.a2a.grpc.CancelTaskRequest proto); /** @@ -29,7 +29,7 @@ public interface TaskIdParamsMapper { * Extracts task ID from the resource name. */ @BeanMapping(builder = @Builder(buildMethod = "build")) - @Mapping(target = "name", expression = "java(ResourceNameParser.defineTaskName(domain.id()))") + @Mapping(target = "id", source = "id") io.a2a.grpc.CancelTaskRequest toProtoCancelTaskRequest(TaskIdParams domain); @@ -38,7 +38,7 @@ public interface TaskIdParamsMapper { * Extracts task ID from the resource name. */ @BeanMapping(builder = @Builder(buildMethod = "build")) - @Mapping(target = "id", expression = "java(ResourceNameParser.extractTaskId(proto.getName()))") + @Mapping(target = "id", source = "id") @Mapping(target = "tenant", source = "tenant") TaskIdParams fromProtoSubscribeToTaskRequest(io.a2a.grpc.SubscribeToTaskRequest proto); @@ -47,6 +47,6 @@ public interface TaskIdParamsMapper { * Creates resource name from task ID. */ @BeanMapping(builder = @Builder(buildMethod = "build")) - @Mapping(target = "name", expression = "java(ResourceNameParser.defineTaskName(domain.id()))") + @Mapping(target = "id", source = "id") io.a2a.grpc.SubscribeToTaskRequest toProtoSubscribeToTaskRequest(TaskIdParams domain); } diff --git a/spec-grpc/src/main/java/io/a2a/grpc/mapper/TaskPushNotificationConfigMapper.java b/spec-grpc/src/main/java/io/a2a/grpc/mapper/TaskPushNotificationConfigMapper.java index 1289938e7..996bda0ac 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/mapper/TaskPushNotificationConfigMapper.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/mapper/TaskPushNotificationConfigMapper.java @@ -6,17 +6,10 @@ import org.mapstruct.Mapping; /** - * MapStruct mapper for TaskPushNotificationConfig with resource name handling. + * MapStruct mapper for TaskPushNotificationConfig. *

    - * This mapper provides compile-time safety while handling the Google Cloud resource name - * convention where the protobuf has a single "name" field in the format - * "tasks/{task_id}/pushNotificationConfigs/{config_id}", but the domain model has separate - * taskId and configId fields. - *

    - * Resource Name Format: tasks/{task_id}/pushNotificationConfigs/{config_id} - *

    - * Compile-Time Safety: If the proto adds/removes/renames fields, MapStruct will - * fail to compile, ensuring we update the domain model accordingly. + * Maps between domain TaskPushNotificationConfig and proto TaskPushNotificationConfig. + * The proto now has direct task_id and id fields instead of a resource name. */ @Mapper(config = A2AProtoMapperConfig.class, uses = {PushNotificationConfigMapper.class}) public interface TaskPushNotificationConfigMapper { @@ -25,80 +18,44 @@ public interface TaskPushNotificationConfigMapper { /** * Converts domain TaskPushNotificationConfig to protobuf TaskPushNotificationConfig. - *

    - * Synthesizes the resource name from taskId and configId following the format: - * "tasks/{task_id}/pushNotificationConfigs/{config_id}" * * @param config the domain TaskPushNotificationConfig - * @return protobuf TaskPushNotificationConfig with synthesized resource name + * @return protobuf TaskPushNotificationConfig */ - @Mapping(target = "name", expression = "java(buildResourceName(config))") + @Mapping(target = "id", expression = "java(extractId(config))") + @Mapping(target = "taskId", source = "taskId") @Mapping(target = "pushNotificationConfig", source = "pushNotificationConfig") + @Mapping(target = "tenant", source = "tenant", conditionExpression = "java(config.tenant() != null)") io.a2a.grpc.TaskPushNotificationConfig toProto(TaskPushNotificationConfig config); /** * Converts protobuf TaskPushNotificationConfig to domain TaskPushNotificationConfig. - *

    - * Parses the resource name to extract taskId and configId, then creates the domain object. - * The configId is injected into the PushNotificationConfig if it differs from what's in the proto. - * The tenant field is set to null as it's not present in the protobuf definition. * * @param proto the protobuf TaskPushNotificationConfig - * @return domain TaskPushNotificationConfig with extracted taskId and configId - * @throws IllegalArgumentException if the resource name format is invalid + * @return domain TaskPushNotificationConfig */ - @Mapping(target = "taskId", expression = "java(extractTaskId(proto))") + @Mapping(target = "taskId", source = "taskId") @Mapping(target = "pushNotificationConfig", expression = "java(mapPushNotificationConfigWithId(proto))") - @Mapping(target = "tenant", expression = "java(null)") + @Mapping(target = "tenant", expression = "java(proto.getTenant().isEmpty() ? null : proto.getTenant())") TaskPushNotificationConfig fromProto(io.a2a.grpc.TaskPushNotificationConfig proto); /** - * Builds the resource name from domain model fields. - *

    - * Format: "tasks/{task_id}/pushNotificationConfigs/{config_id}" - * If configId is null, format: "tasks/{task_id}/pushNotificationConfigs" + * Extracts the config ID from the PushNotificationConfig. * * @param config the domain TaskPushNotificationConfig - * @return the synthesized resource name + * @return the config ID */ - default String buildResourceName(TaskPushNotificationConfig config) { - String taskId = config.taskId(); - String configId = config.pushNotificationConfig().id(); - - if (configId == null || configId.isEmpty()) { - return "tasks/" + taskId + "/pushNotificationConfigs"; - } - return "tasks/" + taskId + "/pushNotificationConfigs/" + configId; + default String extractId(TaskPushNotificationConfig config) { + return config.pushNotificationConfig() != null ? config.pushNotificationConfig().id() : null; } /** - * Extracts the task ID from the protobuf resource name. - * - * @param proto the protobuf TaskPushNotificationConfig - * @return the extracted task ID - * @throws IllegalArgumentException if the resource name format is invalid - */ - default String extractTaskId(io.a2a.grpc.TaskPushNotificationConfig proto) { - String[] parts = ResourceNameParser.parseTaskPushNotificationConfigName(proto.getName()); - return parts[0]; // taskId - } - - /** - * Maps the protobuf PushNotificationConfig to domain, injecting the configId from the resource name. - *

    - * The configId is parsed from the resource name and may override the ID in the proto's - * PushNotificationConfig if they differ. + * Maps the protobuf PushNotificationConfig to domain, ensuring the ID matches the proto's id field. * * @param proto the protobuf TaskPushNotificationConfig * @return domain PushNotificationConfig with correct ID - * @throws IllegalArgumentException if the resource name format is invalid */ default PushNotificationConfig mapPushNotificationConfigWithId(io.a2a.grpc.TaskPushNotificationConfig proto) { - // Parse configId from resource name - String[] parts = ResourceNameParser.parseTaskPushNotificationConfigName(proto.getName()); - String configId = parts[1]; // configId - - // Check if proto has PushNotificationConfig if (!proto.hasPushNotificationConfig() || proto.getPushNotificationConfig().equals(io.a2a.grpc.PushNotificationConfig.getDefaultInstance())) { return null; @@ -107,7 +64,8 @@ default PushNotificationConfig mapPushNotificationConfigWithId(io.a2a.grpc.TaskP // Map the proto PushNotificationConfig PushNotificationConfig result = PushNotificationConfigMapper.INSTANCE.fromProto(proto.getPushNotificationConfig()); - // Override ID if configId from resource name differs from the one in PushNotificationConfig + // Override ID with the id from TaskPushNotificationConfig if they differ + String configId = proto.getId(); if (configId != null && !configId.isEmpty() && !configId.equals(result.id())) { return new PushNotificationConfig(result.url(), result.token(), result.authentication(), configId); } diff --git a/spec-grpc/src/main/java/io/a2a/grpc/mapper/TaskQueryParamsMapper.java b/spec-grpc/src/main/java/io/a2a/grpc/mapper/TaskQueryParamsMapper.java index 5c0ddabaa..4d13ff514 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/mapper/TaskQueryParamsMapper.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/mapper/TaskQueryParamsMapper.java @@ -21,12 +21,12 @@ public interface TaskQueryParamsMapper { * Extracts task ID from the resource name. */ @BeanMapping(builder = @Builder(buildMethod = "build")) - @Mapping(target = "id", expression = "java(ResourceNameParser.extractTaskId(proto.getName()))") + @Mapping(target = "id", source = "id") @Mapping(target = "historyLength", source = "historyLength") TaskQueryParams fromProto(io.a2a.grpc.GetTaskRequest proto); @BeanMapping(builder = @Builder(buildMethod = "build")) - @Mapping(target = "name", expression = "java(ResourceNameParser.defineTaskName(domain.id()))") + @Mapping(target = "id", source = "id") @Mapping(target = "historyLength", source = "historyLength") @Mapping(target = "tenant", source = "tenant") io.a2a.grpc.GetTaskRequest toProto(TaskQueryParams domain); diff --git a/spec-grpc/src/main/java/io/a2a/grpc/mapper/TaskStateMapper.java b/spec-grpc/src/main/java/io/a2a/grpc/mapper/TaskStateMapper.java index f151be7c2..80e260a61 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/mapper/TaskStateMapper.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/mapper/TaskStateMapper.java @@ -35,7 +35,7 @@ default io.a2a.grpc.TaskState toProto(io.a2a.spec.TaskState domain) { case INPUT_REQUIRED -> io.a2a.grpc.TaskState.TASK_STATE_INPUT_REQUIRED; case AUTH_REQUIRED -> io.a2a.grpc.TaskState.TASK_STATE_AUTH_REQUIRED; case COMPLETED -> io.a2a.grpc.TaskState.TASK_STATE_COMPLETED; - case CANCELED -> io.a2a.grpc.TaskState.TASK_STATE_CANCELLED; // Note spelling difference + case CANCELED -> io.a2a.grpc.TaskState.TASK_STATE_CANCELED; case FAILED -> io.a2a.grpc.TaskState.TASK_STATE_FAILED; case REJECTED -> io.a2a.grpc.TaskState.TASK_STATE_REJECTED; case UNKNOWN -> io.a2a.grpc.TaskState.UNRECOGNIZED; @@ -59,7 +59,7 @@ default io.a2a.spec.TaskState fromProto(io.a2a.grpc.TaskState proto) { case TASK_STATE_INPUT_REQUIRED -> io.a2a.spec.TaskState.INPUT_REQUIRED; case TASK_STATE_AUTH_REQUIRED -> io.a2a.spec.TaskState.AUTH_REQUIRED; case TASK_STATE_COMPLETED -> io.a2a.spec.TaskState.COMPLETED; - case TASK_STATE_CANCELLED -> io.a2a.spec.TaskState.CANCELED; // Note spelling difference + case TASK_STATE_CANCELED -> io.a2a.spec.TaskState.CANCELED; case TASK_STATE_FAILED -> io.a2a.spec.TaskState.FAILED; case TASK_STATE_REJECTED -> io.a2a.spec.TaskState.REJECTED; case TASK_STATE_UNSPECIFIED, UNRECOGNIZED -> io.a2a.spec.TaskState.UNKNOWN; diff --git a/spec-grpc/src/main/java/io/a2a/grpc/mapper/TaskStatusUpdateEventMapper.java b/spec-grpc/src/main/java/io/a2a/grpc/mapper/TaskStatusUpdateEventMapper.java index 8187df48a..f8ced3ecf 100644 --- a/spec-grpc/src/main/java/io/a2a/grpc/mapper/TaskStatusUpdateEventMapper.java +++ b/spec-grpc/src/main/java/io/a2a/grpc/mapper/TaskStatusUpdateEventMapper.java @@ -1,8 +1,7 @@ package io.a2a.grpc.mapper; +import io.a2a.spec.TaskStatus; import io.a2a.spec.TaskStatusUpdateEvent; -import org.mapstruct.BeanMapping; -import org.mapstruct.Builder; import org.mapstruct.Mapper; import org.mapstruct.Mapping; @@ -20,19 +19,26 @@ public interface TaskStatusUpdateEventMapper { /** * Converts domain TaskStatusUpdateEvent to proto. * Uses declarative mapping with CommonFieldMapper for metadata conversion. - * Maps record's isFinal field to proto's final field. + * Note: isFinal field is ignored as it has been removed from the proto (field 4 is reserved). */ @Mapping(target = "metadata", source = "metadata", qualifiedByName = "metadataToProto") - @Mapping(target = "final", source = "isFinal") io.a2a.grpc.TaskStatusUpdateEvent toProto(TaskStatusUpdateEvent domain); /** * Converts proto TaskStatusUpdateEvent to domain. - * Now fully declarative using Builder pattern configured via @BeanMapping. - * MapStruct automatically maps proto.getFinal() → builder.isFinal(). + * Note: isFinal is derived from status.state().isFinal() since the field has been removed from the proto (field 4 is reserved). */ - @BeanMapping(builder = @Builder(buildMethod = "build")) - @Mapping(target = "isFinal", source = "final") - @Mapping(target = "metadata", source = "metadata", qualifiedByName = "metadataFromProto") - TaskStatusUpdateEvent fromProto(io.a2a.grpc.TaskStatusUpdateEvent proto); + default TaskStatusUpdateEvent fromProto(io.a2a.grpc.TaskStatusUpdateEvent proto) { + if (proto == null) { + return null; + } + TaskStatus status = TaskStatusMapper.INSTANCE.fromProto(proto.getStatus()); + return new TaskStatusUpdateEvent( + proto.getTaskId(), + status, + proto.getContextId(), + status != null && status.state() != null && status.state().isFinal(), + A2ACommonFieldMapper.INSTANCE.metadataFromProto(proto.getMetadata()) + ); + } } diff --git a/spec-grpc/src/main/proto/a2a.proto b/spec-grpc/src/main/proto/a2a.proto index 0f701b6e8..97157cce8 100644 --- a/spec-grpc/src/main/proto/a2a.proto +++ b/spec-grpc/src/main/proto/a2a.proto @@ -9,6 +9,8 @@ import "google/protobuf/empty.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; +//From commit b86d8bb2edd20a972951666823cf6c9f51317550 + option csharp_namespace = "A2a.V1"; option go_package = "google.golang.org/a2a/v1"; option java_multiple_files = true; @@ -43,12 +45,12 @@ service A2AService { // Get the current state of a task from the agent. rpc GetTask(GetTaskRequest) returns (Task) { option (google.api.http) = { - get: "/{name=tasks/*}" + get: "/tasks/{id=*}" additional_bindings: { - get: "/{tenant}/{name=tasks/*}" + get: "/{tenant}/tasks/{id=*}" } }; - option (google.api.method_signature) = "name"; + option (google.api.method_signature) = "id"; } // List tasks with optional filtering and pagination. rpc ListTasks(ListTasksRequest) returns (ListTasksResponse) { @@ -62,21 +64,21 @@ service A2AService { // Cancel a task. rpc CancelTask(CancelTaskRequest) returns (Task) { option (google.api.http) = { - post: "/{name=tasks/*}:cancel" + post: "/tasks/{id=*}:cancel" body: "*" additional_bindings: { - post: "/{tenant}/{name=tasks/*}:cancel" + post: "/{tenant}/tasks/{id=*}:cancel" body: "*" } }; } // SubscribeToTask allows subscribing to task updates for tasks not in terminal state. - // Returns UnsupportedOperationError if task is in terminal state (completed, failed, cancelled, rejected). + // Returns UnsupportedOperationError if task is in terminal state (completed, failed, canceled, rejected). rpc SubscribeToTask(SubscribeToTaskRequest) returns (stream StreamResponse) { option (google.api.http) = { - get: "/{name=tasks/*}:subscribe" + get: "/tasks/{id=*}:subscribe" additional_bindings: { - get: "/{tenant}/{name=tasks/*}:subscribe" + get: "/{tenant}/tasks/{id=*}:subscribe" } }; } @@ -84,34 +86,34 @@ service A2AService { // Create a push notification config for a task. rpc CreateTaskPushNotificationConfig(CreateTaskPushNotificationConfigRequest) returns (TaskPushNotificationConfig) { option (google.api.http) = { - post: "/{parent=tasks/*/pushNotificationConfigs}" + post: "/tasks/{task_id=*}/pushNotificationConfigs" body: "config" additional_bindings: { - post: "/{tenant}/{parent=tasks/*/pushNotificationConfigs}" + post: "/{tenant}/tasks/{task_id=*}/pushNotificationConfigs" body: "config" } }; - option (google.api.method_signature) = "parent,config"; + option (google.api.method_signature) = "task_id,config"; } // Get a push notification config for a task. rpc GetTaskPushNotificationConfig(GetTaskPushNotificationConfigRequest) returns (TaskPushNotificationConfig) { option (google.api.http) = { - get: "/{name=tasks/*/pushNotificationConfigs/*}" + get: "/tasks/{task_id=*}/pushNotificationConfigs/{id=*}" additional_bindings: { - get: "/{tenant}/{name=tasks/*/pushNotificationConfigs/*}" + get: "/{tenant}/tasks/{task_id=*}/pushNotificationConfigs/{id=*}" } }; - option (google.api.method_signature) = "name"; + option (google.api.method_signature) = "task_id,id"; } // Get a list of push notifications configured for a task. rpc ListTaskPushNotificationConfig(ListTaskPushNotificationConfigRequest) returns (ListTaskPushNotificationConfigResponse) { option (google.api.http) = { - get: "/{parent=tasks/*}/pushNotificationConfigs" + get: "/tasks/{task_id=*}/pushNotificationConfigs" additional_bindings: { - get: "/{tenant}/{parent=tasks/*}/pushNotificationConfigs" + get: "/{tenant}/tasks/{task_id=*}/pushNotificationConfigs" } }; - option (google.api.method_signature) = "parent"; + option (google.api.method_signature) = "task_id"; } // GetExtendedAgentCard returns the extended agent card for authenticated agents. rpc GetExtendedAgentCard(GetExtendedAgentCardRequest) returns (AgentCard) { @@ -125,12 +127,12 @@ service A2AService { // Delete a push notification config for a task. rpc DeleteTaskPushNotificationConfig(DeleteTaskPushNotificationConfigRequest) returns (google.protobuf.Empty) { option (google.api.http) = { - delete: "/{name=tasks/*/pushNotificationConfigs/*}" + delete: "/tasks/{task_id=*}/pushNotificationConfigs/{id=*}" additional_bindings: { - delete: "/{tenant}/{name=tasks/*/pushNotificationConfigs/*}" + delete: "/{tenant}/tasks/{task_id=*}/pushNotificationConfigs/{id=*}" } }; - option (google.api.method_signature) = "name"; + option (google.api.method_signature) = "task_id,id"; } } @@ -148,7 +150,7 @@ message SendMessageConfiguration { // value of zero is a request to not include any messages. The server MUST NOT // return more messages than the provided value, but MAY apply a lower limit. optional int32 history_length = 3; - // If true, the operation waits until the task reaches a terminal state before returning. Default is false. + // If true, the operation waits until the task reaches a terminal or interrupted state before returning. Default is false. bool blocking = 4; } // --8<-- [end:SendMessageConfiguration] @@ -191,9 +193,9 @@ enum TaskState { TASK_STATE_COMPLETED = 3; // Represents the status a task is done but failed. This is a terminal state. TASK_STATE_FAILED = 4; - // Represents the status a task was cancelled before it finished. + // Represents the status a task was canceled before it finished. // This is a terminal state. - TASK_STATE_CANCELLED = 5; + TASK_STATE_CANCELED = 5; // Represents the status that the task requires information to complete. // This is an interrupted state. TASK_STATE_INPUT_REQUIRED = 6; @@ -202,8 +204,7 @@ enum TaskState { // has determined it can't or won't proceed. This is a terminal state. TASK_STATE_REJECTED = 7; // Represents the state that some authentication is needed from the upstream - // client. Authentication is expected to come out-of-band thus this is not - // an interrupted or terminal state. + // client. This is an interrupted state. Authentication is expected to come out-of-band. TASK_STATE_AUTH_REQUIRED = 8; } // --8<-- [end:TaskState] @@ -226,45 +227,25 @@ message TaskStatus { // Parts can be purely textual, some sort of file (image, video, etc) or // a structured data blob (i.e. JSON). message Part { - oneof part { + oneof content { // The string content of the text part. string text = 1; - // The file content, represented as either a URI or as base64-encoded bytes. - FilePart file = 2; - // The structured data content. - DataPart data = 3; - } - // Optional metadata associated with this part. - google.protobuf.Struct metadata = 4; -} -// --8<-- [end:Part] - -// --8<-- [start:FilePart] -// FilePart represents the different ways files can be provided. If files are -// small, directly feeding the bytes is supported via file_with_bytes. If the -// file is large, the agent should read the content as appropriate directly -// from the file_with_uri source. -message FilePart { - oneof file { + // The raw byte content of a file. In JSON serialization, this is encoded as a base64 string. + bytes raw = 2; // A URL pointing to the file's content. - string file_with_uri = 1; - // The base64-encoded content of the file. - bytes file_with_bytes = 2; + string url = 3; + // Arbitrary structured data as a JSON value (object, array, string, number, boolean, or null). + google.protobuf.Value data = 4; } - // The media type of the file (e.g., "application/pdf"). - string media_type = 3; + // Optional metadata associated with this part. + google.protobuf.Struct metadata = 5; // An optional name for the file (e.g., "document.pdf"). - string name = 4; + string filename = 6; + // The media type (MIME type) of the part content (e.g., "text/plain", "application/json", "image/png"). + // This field is available for all part types. + string media_type = 7; } -// --8<-- [end:FilePart] - -// --8<-- [start:DataPart] -// DataPart represents a structured blob. -message DataPart { - // A JSON object containing arbitrary data. - google.protobuf.Struct data = 1 [(google.api.field_behavior) = REQUIRED]; -} -// --8<-- [end:DataPart] +// --8<-- [end:Part] // --8<-- [start:Role] // Defines the sender of a message in A2A protocol communication. @@ -338,8 +319,7 @@ message TaskStatusUpdateEvent { string context_id = 2 [(google.api.field_behavior) = REQUIRED]; // The new status of the task. TaskStatus status = 3 [(google.api.field_behavior) = REQUIRED]; - // If true, this is the final event in the stream for this interaction. - bool final = 4 [(google.api.field_behavior) = REQUIRED]; + reserved 4; // Optional metadata to associate with the task update. google.protobuf.Struct metadata = 5; } @@ -374,7 +354,7 @@ message PushNotificationConfig { string url = 2 [(google.api.field_behavior) = REQUIRED]; // Token unique for this task/session string token = 3; - // Information about the authentication to sent with the notification + // Authentication information required to send the notification AuthenticationInfo authentication = 4; } // --8<-- [end:PushNotificationConfig] @@ -382,15 +362,16 @@ message PushNotificationConfig { // --8<-- [start:PushNotificationAuthenticationInfo] // Defines authentication details, used for push notifications. message AuthenticationInfo { - // A list of supported authentication schemes (e.g., 'Basic', 'Bearer'). - repeated string schemes = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional credentials + // HTTP Authentication Scheme from the [IANA registry](https://www.iana.org/assignments/http-authschemes/). + // Common values: `Bearer`, `Basic`, `Digest`. Scheme names are case-insensitive per [RFC 9110 Section 11.1](https://www.rfc-editor.org/rfc/rfc9110#section-11.1). + string scheme = 1 [(google.api.field_behavior) = REQUIRED]; + // Push Notification credentials. Format depends on the scheme (e.g., token for Bearer). string credentials = 2; } // --8<-- [end:PushNotificationAuthenticationInfo] // --8<-- [start:AgentInterface] -// Declares a combination of a target URL and a transport protocol for interacting with the agent. +// Declares a combination of a target URL, transport and protocol version for interacting with the agent. // This allows agents to expose the same functionality over multiple protocol binding mechanisms. message AgentInterface { // The URL where this interface is available. Must be a valid absolute HTTPS URL in production. @@ -402,6 +383,10 @@ message AgentInterface { string protocol_binding = 2 [(google.api.field_behavior) = REQUIRED]; // Tenant to be set in the request when calling the agent. string tenant = 3; + // The version of the A2A protocol this interface exposes. + // Use the latest supported minor version per major version. + // Examples: "0.3", "1.0" + string protocol_version = 4 [(google.api.field_behavior) = REQUIRED]; } // --8<-- [end:AgentInterface] @@ -411,14 +396,9 @@ message AgentInterface { // communication methods, and security requirements. // Next ID: 20 message AgentCard { - // The versions of the A2A protocol this agent supports. - // For stable versions (1.x+), list only the latest supported minor version per major version. - // For legacy experimental versions (0.x), explicitly list each supported version. - // Default: ["1.0"] - repeated string protocol_versions = 16 [(google.api.field_behavior) = REQUIRED]; // Reserve these field numbers as they were previously used by removed // fields. - reserved 3, 14, 15; + reserved 3, 9, 14, 15, 16; // A human readable name for the agent. // Example: "Recipe Agent" string name = 1 [(google.api.field_behavior) = REQUIRED]; @@ -439,9 +419,8 @@ message AgentCard { AgentCapabilities capabilities = 7 [(google.api.field_behavior) = REQUIRED]; // The security scheme details used for authenticating with this agent. map security_schemes = 8; - // protolint:disable REPEATED_FIELD_NAMES_PLURALIZED // Security requirements for contacting the agent. - repeated Security security = 9; + repeated SecurityRequirement security_requirements = 13; // protolint:enable REPEATED_FIELD_NAMES_PLURALIZED // The set of interaction modes that the agent supports across all skills. // This can be overridden per skill. Defined as media types. @@ -518,10 +497,8 @@ message AgentSkill { repeated string input_modes = 6; // The set of supported output media types for this skill, overriding the agent's defaults. repeated string output_modes = 7; - // protolint:disable REPEATED_FIELD_NAMES_PLURALIZED // Security schemes necessary for this skill. - repeated Security security = 8; - // protolint:enable REPEATED_FIELD_NAMES_PLURALIZED + repeated SecurityRequirement security_requirements = 8; } // --8<-- [end:AgentSkill] @@ -543,9 +520,15 @@ message AgentCardSignature { // A container associating a push notification configuration with a specific // task. message TaskPushNotificationConfig { - // The resource name of the config. - // Format: tasks/{task_id}/pushNotificationConfigs/{config_id} - string name = 1 [(google.api.field_behavior) = REQUIRED]; + // Optional tenant + string tenant = 4; + + // The id of the config. + string id = 1 [(google.api.field_behavior) = REQUIRED]; + + // The id of the task this config is associated with. + string task_id = 3 [(google.api.field_behavior) = REQUIRED]; + // The push notification configuration details. PushNotificationConfig push_notification_config = 2 [(google.api.field_behavior) = REQUIRED]; } @@ -557,7 +540,7 @@ message StringList { } // protolint:enable REPEATED_FIELD_NAMES_PLURALIZED -message Security { +message SecurityRequirement { map schemes = 1; } @@ -643,13 +626,13 @@ message MutualTlsSecurityScheme { // --8<-- [start:OAuthFlows] // Defines the configuration for the supported OAuth 2.0 flows. message OAuthFlows { - // Tags 3 and 4 were previously used by deprecated OAuth flows. - reserved 3, 4; oneof flow { // Configuration for the OAuth Authorization Code flow. AuthorizationCodeOAuthFlow authorization_code = 1; // Configuration for the OAuth Client Credentials flow. ClientCredentialsOAuthFlow client_credentials = 2; + ImplicitOAuthFlow implicit = 3 [deprecated = true]; + PasswordOAuthFlow password = 4 [deprecated = true]; // Configuration for the OAuth Device Code flow. DeviceCodeOAuthFlow device_code = 5; } @@ -685,6 +668,32 @@ message ClientCredentialsOAuthFlow { } // --8<-- [end:ClientCredentialsOAuthFlow] +// DEPRECATED +message ImplicitOAuthFlow { + // The authorization URL to be used for this flow. This MUST be in the + // form of a URL. The OAuth2 standard requires the use of TLS + string authorization_url = 1; + // The URL to be used for obtaining refresh tokens. This MUST be in the + // form of a URL. The OAuth2 standard requires the use of TLS. + string refresh_url = 2; + // The available scopes for the OAuth2 security scheme. A map between the + // scope name and a short description for it. The map MAY be empty. + map scopes = 3; +} + +// DEPRECATED +message PasswordOAuthFlow { + // The token URL to be used for this flow. This MUST be in the form of a URL. + // The OAuth2 standard requires the use of TLS. + string token_url = 1; + // The URL to be used for obtaining refresh tokens. This MUST be in the + // form of a URL. The OAuth2 standard requires the use of TLS. + string refresh_url = 2; + // The available scopes for the OAuth2 security scheme. A map between the + // scope name and a short description for it. The map MAY be empty. + map scopes = 3; +} + // --8<-- [start:DeviceCodeOAuthFlow] // Defines configuration details for the OAuth 2.0 Device Code flow (RFC 8628). // This flow is designed for input-constrained devices such as IoT devices, @@ -721,9 +730,8 @@ message SendMessageRequest { message GetTaskRequest { // Optional tenant, provided as a path parameter. string tenant = 3; - // The resource name of the task. - // Format: tasks/{task_id} - string name = 1 [(google.api.field_behavior) = REQUIRED]; + // The resource id of the task. + string id = 1 [(google.api.field_behavior) = REQUIRED]; // The maximum number of most recent messages from the task's history to retrieve. An // unset value means the client does not impose any limit. A value of zero is // a request to not include any messages. The server MUST NOT return more @@ -776,9 +784,8 @@ message ListTasksResponse { message CancelTaskRequest { // Optional tenant, provided as a path parameter. string tenant = 2; - // The resource name of the task to cancel. - // Format: tasks/{task_id} - string name = 1; + // The resource id of the task to cancel. + string id = 1 [(google.api.field_behavior) = REQUIRED]; } // --8<-- [end:CancelTaskRequest] @@ -786,9 +793,10 @@ message CancelTaskRequest { message GetTaskPushNotificationConfigRequest { // Optional tenant, provided as a path parameter. string tenant = 2; - // The resource name of the config to retrieve. - // Format: tasks/{task_id}/pushNotificationConfigs/{config_id} - string name = 1; + // The parent task resource id. + string task_id = 3 [(google.api.field_behavior) = REQUIRED]; + // The resource id of the config to retrieve. + string id = 1 [(google.api.field_behavior) = REQUIRED]; } // --8<-- [end:GetTaskPushNotificationConfigRequest] @@ -797,24 +805,25 @@ message GetTaskPushNotificationConfigRequest { message DeleteTaskPushNotificationConfigRequest { // Optional tenant, provided as a path parameter. string tenant = 2; - // The resource name of the config to delete. - // Format: tasks/{task_id}/pushNotificationConfigs/{config_id} - string name = 1; + // The parent task resource id. + string task_id = 3 [(google.api.field_behavior) = REQUIRED]; + // The resource id of the config to delete. + string id = 1 [(google.api.field_behavior) = REQUIRED]; } // --8<-- [end:DeleteTaskPushNotificationConfigRequest] // --8<-- [start:CreateTaskPushNotificationConfigRequest] // Represents a request for the `CreateTaskPushNotificationConfig` method. message CreateTaskPushNotificationConfigRequest { + reserved 3; // Optional tenant, provided as a path parameter. string tenant = 4; - // The parent task resource for this config. - // Format: tasks/{task_id} - string parent = 1 [(google.api.field_behavior) = REQUIRED]; + // The parent task resource id. + string task_id = 1 [(google.api.field_behavior) = REQUIRED]; // The ID for the new config. string config_id = 2 [(google.api.field_behavior) = REQUIRED]; // The configuration to create. - TaskPushNotificationConfig config = 3 [(google.api.field_behavior) = REQUIRED]; + PushNotificationConfig config = 5 [(google.api.field_behavior) = REQUIRED]; } // --8<-- [end:CreateTaskPushNotificationConfigRequest] @@ -822,9 +831,8 @@ message CreateTaskPushNotificationConfigRequest { message SubscribeToTaskRequest { // Optional tenant, provided as a path parameter. string tenant = 2; - // The resource name of the task to subscribe to. - // Format: tasks/{task_id} - string name = 1; + // The resource id of the task to subscribe to. + string id = 1 [(google.api.field_behavior) = REQUIRED]; } // --8<-- [end:SubscribeToTaskRequest] @@ -832,9 +840,9 @@ message SubscribeToTaskRequest { message ListTaskPushNotificationConfigRequest { // Optional tenant, provided as a path parameter. string tenant = 4; - // The parent task resource. - // Format: tasks/{task_id} - string parent = 1; + // The parent task resource id. + string task_id = 1 [(google.api.field_behavior) = REQUIRED]; + // The maximum number of configurations to return. int32 page_size = 2; @@ -886,4 +894,4 @@ message ListTaskPushNotificationConfigResponse { // If this field is omitted, there are no subsequent pages. string next_page_token = 2; } -// --8<-- [end:ListTaskPushNotificationConfigResponse] \ No newline at end of file +// --8<-- [end:ListTaskPushNotificationConfigResponse] diff --git a/spec-grpc/src/test/java/io/a2a/grpc/mapper/StreamResponseMapperTest.java b/spec-grpc/src/test/java/io/a2a/grpc/mapper/StreamResponseMapperTest.java index bd007d61f..4fad9f91e 100644 --- a/spec-grpc/src/test/java/io/a2a/grpc/mapper/StreamResponseMapperTest.java +++ b/spec-grpc/src/test/java/io/a2a/grpc/mapper/StreamResponseMapperTest.java @@ -119,7 +119,6 @@ void testConvertTaskStatusUpdateEvent_ToProto() { .taskId("task-123") .contextId("context-456") .status(new TaskStatus(TaskState.WORKING)) - .isFinal(false) .build(); // Act @@ -131,7 +130,6 @@ void testConvertTaskStatusUpdateEvent_ToProto() { assertEquals("task-123", result.getStatusUpdate().getTaskId()); assertEquals("context-456", result.getStatusUpdate().getContextId()); assertEquals(io.a2a.grpc.TaskState.TASK_STATE_WORKING, result.getStatusUpdate().getStatus().getState()); - assertEquals(false, result.getStatusUpdate().getFinal()); } @Test @@ -144,7 +142,6 @@ void testConvertTaskStatusUpdateEvent_FromProto() { .setStatus(io.a2a.grpc.TaskStatus.newBuilder() .setState(io.a2a.grpc.TaskState.TASK_STATE_WORKING) .build()) - .setFinal(false) .build()) .build(); diff --git a/spec-grpc/src/test/java/io/a2a/grpc/utils/JSONRPCUtilsTest.java b/spec-grpc/src/test/java/io/a2a/grpc/utils/JSONRPCUtilsTest.java index 60f137893..f10692424 100644 --- a/spec-grpc/src/test/java/io/a2a/grpc/utils/JSONRPCUtilsTest.java +++ b/spec-grpc/src/test/java/io/a2a/grpc/utils/JSONRPCUtilsTest.java @@ -33,16 +33,13 @@ public void testParseCreateTaskPushNotificationConfigRequest_ValidProtoFormat() "method": "CreateTaskPushNotificationConfig", "id": "1", "params": { - "parent": "tasks/task-123", + "taskId": "task-123", "configId": "config-456", "tenant": "", "config": { - "name": "tasks/task-123/pushNotificationConfigs/config-456", - "pushNotificationConfig": { - "url": "https://example.com/callback", - "authentication": { - "schemes": ["jwt"] - } + "url": "https://example.com/callback", + "authentication": { + "scheme": "jwt" } } } @@ -73,7 +70,8 @@ public void testParseGetTaskPushNotificationConfigRequest_ValidProtoFormat() thr "method": "GetTaskPushNotificationConfig", "id": "2", "params": { - "name": "tasks/task-123/pushNotificationConfigs/config-456" + "taskId": "task-123", + "id": "config-456" } } """; @@ -277,7 +275,8 @@ public void testGenerateCreateTaskPushNotificationConfigResponse_Success() throw "jsonrpc": "2.0", "id": "1", "result": { - "name": "tasks/task-123/pushNotificationConfigs/config-456", + "taskId": "task-123", + "id": "config-456", "pushNotificationConfig": { "url": "https://example.com/callback", "id": "config-456" @@ -303,7 +302,8 @@ public void testGenerateGetTaskPushNotificationConfigResponse_Success() throws E "jsonrpc": "2.0", "id": "2", "result": { - "name": "tasks/task-123/pushNotificationConfigs/config-456", + "taskId": "task-123", + "id": "config-456", "pushNotificationConfig": { "url": "https://example.com/callback", "id": "config-456" diff --git a/spec-grpc/src/test/java/io/a2a/grpc/utils/ToProtoTest.java b/spec-grpc/src/test/java/io/a2a/grpc/utils/ToProtoTest.java index 2e3b412e0..4a3b1e2c6 100644 --- a/spec-grpc/src/test/java/io/a2a/grpc/utils/ToProtoTest.java +++ b/spec-grpc/src/test/java/io/a2a/grpc/utils/ToProtoTest.java @@ -2,11 +2,10 @@ import static io.a2a.grpc.Role.ROLE_AGENT; import static io.a2a.grpc.Role.ROLE_USER; -import static io.a2a.spec.AgentCard.CURRENT_PROTOCOL_VERSION; +import static io.a2a.spec.AgentInterface.CURRENT_PROTOCOL_VERSION; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertTrue; import java.time.OffsetDateTime; import java.util.Collections; @@ -49,7 +48,7 @@ public void convertAgentCard() { AgentCard agentCard = AgentCard.builder() .name("Hello World Agent") .description("Just a hello world agent") - .supportedInterfaces(Collections.singletonList(new AgentInterface("jsonrpc", "http://localhost:9999", ""))) + .supportedInterfaces(Collections.singletonList(new AgentInterface("jsonrpc", "http://localhost:9999", "", "123"))) .version("1.0.0") .documentationUrl("http://example.com/docs") .capabilities(AgentCapabilities.builder() @@ -65,7 +64,6 @@ public void convertAgentCard() { .tags(Collections.singletonList("hello world")) .examples(List.of("hi", "hello world")) .build())) - .protocolVersions("123") // Weird protool version on purpose to make sure non-default takes effect .build(); io.a2a.grpc.AgentCard result = ProtoUtils.ToProto.agentCard(agentCard); assertEquals("Hello World Agent", result.getName()); @@ -73,18 +71,18 @@ public void convertAgentCard() { assertEquals(1, result.getSupportedInterfacesList().size()); assertEquals("http://localhost:9999", result.getSupportedInterfacesList().get(0).getUrl()); assertEquals("jsonrpc", result.getSupportedInterfacesList().get(0).getProtocolBinding()); + assertEquals("123", result.getSupportedInterfacesList().get(0).getProtocolVersion()); assertEquals("1.0.0", result.getVersion()); assertEquals("http://example.com/docs", result.getDocumentationUrl()); assertEquals(1, result.getDefaultInputModesCount()); assertEquals("text", result.getDefaultInputModes(0)); assertEquals(1, result.getDefaultOutputModesCount()); assertEquals("text", result.getDefaultOutputModes(0)); - // protocolVersions is now a repeated field, checking if the list contains the value - assertTrue(result.getProtocolVersionsList().contains("123")); + // protocolVersion is now in AgentInterface agentCard = AgentCard.builder() .name("Hello World Agent") .description("Just a hello world agent") - .supportedInterfaces(Collections.singletonList(new AgentInterface("jsonrpc", "http://localhost:9999", ""))) + .supportedInterfaces(Collections.singletonList(new AgentInterface("jsonrpc", "http://localhost:9999"))) .version("1.0.0") .documentationUrl("http://example.com/docs") .capabilities(AgentCapabilities.builder() @@ -102,8 +100,7 @@ public void convertAgentCard() { .build())) // .iconUrl("http://example.com/icon.svg") .securitySchemes(Map.of("basic", HTTPAuthSecurityScheme.builder().scheme("basic").description("Basic Auth").build())) - .security(List.of(Map.of("oauth", List.of("read")))) - .protocolVersions(CURRENT_PROTOCOL_VERSION) + .securityRequirements(List.of(Map.of("oauth", List.of("read")))) .build(); result = ProtoUtils.ToProto.agentCard(agentCard); assertEquals("Hello World Agent", result.getName()); @@ -111,19 +108,19 @@ public void convertAgentCard() { assertEquals(1, result.getSupportedInterfacesList().size()); assertEquals("http://localhost:9999", result.getSupportedInterfacesList().get(0).getUrl()); assertEquals("jsonrpc", result.getSupportedInterfacesList().get(0).getProtocolBinding()); + assertEquals(CURRENT_PROTOCOL_VERSION, result.getSupportedInterfacesList().get(0).getProtocolVersion()); assertEquals("1.0.0", result.getVersion()); assertEquals("http://example.com/docs", result.getDocumentationUrl()); assertEquals(1, result.getDefaultInputModesCount()); assertEquals("text", result.getDefaultInputModes(0)); assertEquals(1, result.getDefaultOutputModesCount()); assertEquals("text", result.getDefaultOutputModes(0)); - // protocolVersions is now a repeated field, checking if the list contains the value - assertTrue(result.getProtocolVersionsList().contains(CURRENT_PROTOCOL_VERSION)); - assertEquals(1, result.getSecurityCount()); - assertEquals(1, result.getSecurity(0).getSchemesMap().size()); - assertEquals(true, result.getSecurity(0).getSchemesMap().containsKey("oauth")); - assertEquals(1, result.getSecurity(0).getSchemesMap().get("oauth").getListCount()); - assertEquals("read", result.getSecurity(0).getSchemesMap().get("oauth").getList(0)); + // protocolVersions field has been removed from the proto + assertEquals(1, result.getSecurityRequirementsCount()); + assertEquals(1, result.getSecurityRequirements(0).getSchemesMap().size()); + assertEquals(true, result.getSecurityRequirements(0).getSchemesMap().containsKey("oauth")); + assertEquals(1, result.getSecurityRequirements(0).getSchemesMap().get("oauth").getListCount()); + assertEquals("read", result.getSecurityRequirements(0).getSchemesMap().get("oauth").getList(0)); assertEquals(1, result.getSecuritySchemesMap().size()); assertEquals(true, result.getSecuritySchemesMap().containsKey("basic")); assertEquals(result.getSecuritySchemesMap().get("basic").getApiKeySecurityScheme().getDefaultInstanceForType(), result.getSecuritySchemesMap().get("basic").getApiKeySecurityScheme()); @@ -164,7 +161,8 @@ public void convertTask() { assertEquals("artefact", result.getArtifacts(0).getName()); assertEquals(1, result.getArtifacts(0).getPartsCount()); assertEquals(true, result.getArtifacts(0).getParts(0).hasText()); - assertEquals(false, result.getArtifacts(0).getParts(0).hasFile()); + assertEquals(false, result.getArtifacts(0).getParts(0).hasRaw()); + assertEquals(false, result.getArtifacts(0).getParts(0).hasUrl()); assertEquals(false, result.getArtifacts(0).getParts(0).hasData()); assertEquals("text", result.getArtifacts(0).getParts(0).getText()); assertEquals(1, result.getHistoryCount()); @@ -173,8 +171,9 @@ public void convertTask() { assertEquals(ROLE_USER, result.getHistory(0).getRole()); assertEquals(1, result.getHistory(0).getPartsCount()); assertEquals("tell me a joke", result.getHistory(0).getParts(0).getText()); - assertEquals(io.a2a.grpc.FilePart.getDefaultInstance(), result.getHistory(0).getParts(0).getFile()); - assertEquals(io.a2a.grpc.DataPart.getDefaultInstance(), result.getHistory(0).getParts(0).getData()); + assertEquals(false, result.getHistory(0).getParts(0).hasRaw()); + assertEquals(false, result.getHistory(0).getParts(0).hasUrl()); + assertEquals(false, result.getHistory(0).getParts(0).hasData()); } @Test @@ -185,8 +184,9 @@ public void convertMessage() { assertEquals(ROLE_USER, result.getRole()); assertEquals(1, result.getPartsCount()); assertEquals("tell me a joke", result.getParts(0).getText()); - assertEquals(io.a2a.grpc.FilePart.getDefaultInstance(), result.getParts(0).getFile()); - assertEquals(io.a2a.grpc.DataPart.getDefaultInstance(), result.getParts(0).getData()); + assertEquals(false, result.getParts(0).hasRaw()); + assertEquals(false, result.getParts(0).hasUrl()); + assertEquals(false, result.getParts(0).hasData()); Message message = Message.builder() .role(Message.Role.AGENT) .parts(Collections.singletonList(new TextPart("tell me a joke"))) @@ -198,8 +198,9 @@ public void convertMessage() { assertEquals(ROLE_AGENT, result.getRole()); assertEquals(1, result.getPartsCount()); assertEquals("tell me a joke", result.getParts(0).getText()); - assertEquals(io.a2a.grpc.FilePart.getDefaultInstance(), result.getParts(0).getFile()); - assertEquals(io.a2a.grpc.DataPart.getDefaultInstance(), result.getParts(0).getData()); + assertEquals(false, result.getParts(0).hasRaw()); + assertEquals(false, result.getParts(0).hasUrl()); + assertEquals(false, result.getParts(0).hasData()); } @Test @@ -210,7 +211,8 @@ public void convertTaskPushNotificationConfig() { .id("xyz") .build(), null); io.a2a.grpc.TaskPushNotificationConfig result = ProtoUtils.ToProto.taskPushNotificationConfig(taskPushConfig); - assertEquals("tasks/push-task-123/pushNotificationConfigs/xyz", result.getName()); + assertEquals("push-task-123", result.getTaskId()); + assertEquals("xyz", result.getId()); assertNotNull(result.getPushNotificationConfig()); assertEquals("http://example.com", result.getPushNotificationConfig().getUrl()); assertEquals("xyz", result.getPushNotificationConfig().getId()); @@ -219,20 +221,20 @@ public void convertTaskPushNotificationConfig() { = new TaskPushNotificationConfig("push-task-123", PushNotificationConfig.builder() .token("AAAAAA") - .authentication(new AuthenticationInfo(Collections.singletonList("jwt"), "credentials")) + .authentication(new AuthenticationInfo("jwt", "credentials")) .url("http://example.com") .id("xyz") .build(), null); result = ProtoUtils.ToProto.taskPushNotificationConfig(taskPushConfig); - assertEquals("tasks/push-task-123/pushNotificationConfigs/xyz", result.getName()); + assertEquals("push-task-123", result.getTaskId()); + assertEquals("xyz", result.getId()); assertNotNull(result.getPushNotificationConfig()); assertEquals("http://example.com", result.getPushNotificationConfig().getUrl()); assertEquals("xyz", result.getPushNotificationConfig().getId()); assertEquals("AAAAAA", result.getPushNotificationConfig().getToken()); assertEquals(true, result.getPushNotificationConfig().hasAuthentication()); assertEquals("credentials", result.getPushNotificationConfig().getAuthentication().getCredentials()); - assertEquals(1, result.getPushNotificationConfig().getAuthentication().getSchemesCount()); - assertEquals("jwt", result.getPushNotificationConfig().getAuthentication().getSchemes(0)); + assertEquals("jwt", result.getPushNotificationConfig().getAuthentication().getScheme()); } @Test @@ -255,16 +257,20 @@ public void convertTaskArtifactUpdateEvent() { @Test public void convertTaskStatusUpdateEvent() { - TaskStatusUpdateEvent tsue = TaskStatusUpdateEvent.builder() - .taskId("1234") - .contextId("xyz") - .status(new TaskStatus(TaskState.COMPLETED)) - .isFinal(true) - .build(); + TaskStatus completedStatus = new TaskStatus(TaskState.COMPLETED); + // Use constructor since Builder doesn't have isFinal method + TaskStatusUpdateEvent tsue = new TaskStatusUpdateEvent( + "1234", + completedStatus, + "xyz", + completedStatus.state().isFinal(), // Derive from state + null + ); io.a2a.grpc.TaskStatusUpdateEvent result = ProtoUtils.ToProto.taskStatusUpdateEvent(tsue); assertEquals("1234", result.getTaskId()); assertEquals("xyz", result.getContextId()); - assertEquals(true, result.getFinal()); + // Note: isFinal field has been removed from the proto (field 4 is reserved) + // It is now derived from status.state().isFinal() assertEquals(io.a2a.grpc.TaskState.TASK_STATE_COMPLETED, result.getStatus().getState()); } @@ -307,7 +313,8 @@ public void convertDeleteTaskPushNotificationConfigRequest() { io.a2a.grpc.DeleteTaskPushNotificationConfigRequest result = ProtoUtils.ToProto.deleteTaskPushNotificationConfigRequest(params); - assertEquals("tasks/task-123/pushNotificationConfigs/config-456", result.getName()); + assertEquals("task-123", result.getTaskId()); + assertEquals("config-456", result.getId()); // Test round-trip conversion DeleteTaskPushNotificationConfigParams convertedBack = @@ -323,7 +330,7 @@ public void convertListTaskPushNotificationConfigRequest() { io.a2a.grpc.ListTaskPushNotificationConfigRequest result = ProtoUtils.ToProto.listTaskPushNotificationConfigRequest(params); - assertEquals("tasks/task-789", result.getParent()); + assertEquals("task-789", result.getTaskId()); // Test round-trip conversion ListTaskPushNotificationConfigParams convertedBack = diff --git a/spec/src/main/java/io/a2a/spec/A2AProtocolError.java b/spec/src/main/java/io/a2a/spec/A2AProtocolError.java index e8dfb3c47..e2655175d 100644 --- a/spec/src/main/java/io/a2a/spec/A2AProtocolError.java +++ b/spec/src/main/java/io/a2a/spec/A2AProtocolError.java @@ -1,14 +1,43 @@ package io.a2a.spec; +/** + * Represents a protocol-level error in the A2A Protocol with a reference URL. + *

    + * This error extends {@link A2AError} to include a URL field that provides a reference + * to documentation, specification details, or additional context about the protocol error. + * This is particularly useful for protocol version mismatches, unsupported features, or + * other situations where pointing to the protocol specification would help diagnose the issue. + * + * @see A2AError for the base error implementation + */ public class A2AProtocolError extends A2AError { + /** + * URL reference for additional information about this protocol error. + */ private final String url; + /** + * Constructs a protocol error with the specified code, message, data, and reference URL. + * + * @param code the numeric error code (required, see JSON-RPC 2.0 spec for standard codes) + * @param message the human-readable error message (required) + * @param data additional error information, structure defined by the error code (optional) + * @param url URL reference providing additional context about this protocol error (optional) + */ public A2AProtocolError(Integer code, String message, Object data, String url) { super(code, message, data); this.url = url; } + /** + * Gets the URL reference for additional information about this protocol error. + *

    + * This URL typically points to protocol specification documentation or other resources + * that provide context about the error condition. + * + * @return the reference URL, or null if not provided + */ public String getUrl() { return url; } diff --git a/spec/src/main/java/io/a2a/spec/AgentCard.java b/spec/src/main/java/io/a2a/spec/AgentCard.java index f5a642509..d49dcc862 100644 --- a/spec/src/main/java/io/a2a/spec/AgentCard.java +++ b/spec/src/main/java/io/a2a/spec/AgentCard.java @@ -33,10 +33,9 @@ * @param defaultOutputModes list of supported output modes, e.g., "text", "audio" (required) * @param skills list of skills that this agent can perform (required) * @param securitySchemes map of security scheme names to their definitions (optional) - * @param security list of security requirements for accessing the agent (optional) + * @param securityRequirements list of security requirements for accessing the agent (optional) * @param iconUrl URL to an icon representing the agent (optional) * @param supportedInterfaces ordered list of protocol+URL interface combinations; first entry is preferred (required) - * @param protocolVersions the versions of the A2A Protocol this agent implements (defaults to a singleton list of {@link #CURRENT_PROTOCOL_VERSION}) * @param signatures digital signatures verifying the authenticity of the agent card (optional) * @see AgentInterface * @see A2A Protocol Specification @@ -52,17 +51,13 @@ public record AgentCard( List defaultOutputModes, List skills, Map securitySchemes, - List>> security, + List>> securityRequirements, String iconUrl, List supportedInterfaces, - List protocolVersions, List signatures) { - /** The default A2A Protocol version used when not explicitly specified. */ - public static final String CURRENT_PROTOCOL_VERSION = "1.0"; - /** - * Compact constructor that validates required fields and sets defaults. + * Compact constructor that validates required fields. * * @param name the name parameter (see class-level JavaDoc) * @param description the description parameter (see class-level JavaDoc) @@ -74,10 +69,9 @@ public record AgentCard( * @param defaultOutputModes the defaultOutputModes parameter (see class-level JavaDoc) * @param skills the skills parameter (see class-level JavaDoc) * @param securitySchemes the securitySchemes parameter (see class-level JavaDoc) - * @param security the security parameter (see class-level JavaDoc) + * @param securityRequirements the security parameter (see class-level JavaDoc) * @param iconUrl the iconUrl parameter (see class-level JavaDoc) * @param supportedInterfaces the supportedInterfaces parameter (see class-level JavaDoc) - * @param protocolVersions the protocolVersions parameter (see class-level JavaDoc) * @param signatures the signatures parameter (see class-level JavaDoc) * @throws IllegalArgumentException if any required field is null */ @@ -90,10 +84,6 @@ public record AgentCard( Assert.checkNotNullParam("skills", skills); Assert.checkNotNullParam("supportedInterfaces", supportedInterfaces); Assert.checkNotNullParam("version", version); - - if (protocolVersions == null || protocolVersions.isEmpty()) { - protocolVersions = List.of(CURRENT_PROTOCOL_VERSION); - } } /** @@ -160,10 +150,9 @@ public static class Builder { private List defaultOutputModes; private List skills; private Map securitySchemes; - private List>> security; + private List>> securityRequirements; private String iconUrl; private List supportedInterfaces; - private List protocolVersions; private List signatures; /** @@ -192,10 +181,9 @@ private Builder(AgentCard card) { this.defaultOutputModes = card.defaultOutputModes != null ? new ArrayList<>(card.defaultOutputModes) : null; this.skills = card.skills != null ? new ArrayList<>(card.skills) : null; this.securitySchemes = card.securitySchemes != null ? Map.copyOf(card.securitySchemes) : null; - this.security = card.security != null ? new ArrayList<>(card.security) : null; + this.securityRequirements = card.securityRequirements != null ? new ArrayList<>(card.securityRequirements) : null; this.iconUrl = card.iconUrl; this.supportedInterfaces = card.supportedInterfaces != null ? new ArrayList<>(card.supportedInterfaces) : null; - this.protocolVersions = card.protocolVersions; this.signatures = card.signatures != null ? new ArrayList<>(card.signatures) : null; } @@ -332,11 +320,11 @@ public Builder securitySchemes(Map securitySchemes) { * Each entry in the list represents an alternative security requirement, * where each map contains scheme names and their required scopes. * - * @param security the list of security requirements (optional) + * @param securityRequirements the list of security requirements (optional) * @return this builder for method chaining */ - public Builder security(List>> security) { - this.security = security; + public Builder securityRequirements(List>> securityRequirements) { + this.securityRequirements = securityRequirements; return this; } @@ -375,19 +363,6 @@ public Builder supportedInterfaces(List supportedInterfaces) { return this; } - /** - * Sets the version of the A2A Protocol this agent implements. - *

    - * If not set, defaults to a single list of {@link AgentCard#CURRENT_PROTOCOL_VERSION}. - * - * @param protocolVersions the protocol versions - * @return this builder for method chaining - */ - public Builder protocolVersions(String... protocolVersions) { - this.protocolVersions = List.of(protocolVersions); - return this; - } - /** * Sets the digital signatures verifying the authenticity of the agent card. *

    @@ -414,8 +389,8 @@ public Builder signatures(List signatures) { public AgentCard build() { return new AgentCard(name, description, provider, version, documentationUrl, capabilities, defaultInputModes, defaultOutputModes, skills, - securitySchemes, security, iconUrl, - supportedInterfaces, protocolVersions, signatures); + securitySchemes, securityRequirements, iconUrl, + supportedInterfaces, signatures); } } } diff --git a/spec/src/main/java/io/a2a/spec/AgentInterface.java b/spec/src/main/java/io/a2a/spec/AgentInterface.java index 042d8b56a..dccf4cc75 100644 --- a/spec/src/main/java/io/a2a/spec/AgentInterface.java +++ b/spec/src/main/java/io/a2a/spec/AgentInterface.java @@ -20,11 +20,15 @@ * @param url the endpoint URL where this interface is available; must be a valid absolute HTTPS URL in production * (required) * @param tenant the tenant to be set in the request when calling the agent. + * @param protocolVersion the version of the A2A protocol this interface exposes (e.g., "1.0", "0.3") (required) * @see AgentCard * @see TransportProtocol * @see A2A Protocol Specification */ -public record AgentInterface(String protocolBinding, String url, String tenant) { +public record AgentInterface(String protocolBinding, String url, String tenant, String protocolVersion) { + + /** The default A2A Protocol version used when not explicitly specified. */ + public static final String CURRENT_PROTOCOL_VERSION = "1.0"; /** * Compact constructor that validates required fields. @@ -32,21 +36,37 @@ public record AgentInterface(String protocolBinding, String url, String tenant) * @param protocolBinding the protocolBinding parameter (see class-level JavaDoc) * @param url the url parameter (see class-level JavaDoc) * @param tenant the tenant parameter (see class-level JavaDoc) - * @throws IllegalArgumentException if protocolBinding or url is null + * @param protocolVersion the protocolVersion parameter (see class-level JavaDoc) + * @throws IllegalArgumentException if protocolBinding, url, or protocolVersion is null */ public AgentInterface { Assert.checkNotNullParam("protocolBinding", protocolBinding); Assert.checkNotNullParam("url", url); Assert.checkNotNullParam("tenant", tenant); + + if (protocolVersion == null || protocolVersion.isEmpty()) { + protocolVersion = CURRENT_PROTOCOL_VERSION; + } + } + + /** + * Convenience constructor for creating an AgentInterface with specified tenant and default protocol version. + * + * @param protocolBinding the protocol binding (see class-level JavaDoc) + * @param url the endpoint URL (see class-level JavaDoc) + * @param tenant the tenant (see class-level JavaDoc) + */ + public AgentInterface(String protocolBinding, String url, String tenant) { + this(protocolBinding, url, tenant, CURRENT_PROTOCOL_VERSION); } /** - * Convenience constructor for creating an AgentInterface without a tenant. + * Convenience constructor for creating an AgentInterface with default protocol version and no tenant. * * @param protocolBinding the protocol binding (see class-level JavaDoc) * @param url the endpoint URL (see class-level JavaDoc) */ public AgentInterface(String protocolBinding, String url) { - this(protocolBinding, url, ""); + this(protocolBinding, url, "", CURRENT_PROTOCOL_VERSION); } } diff --git a/spec/src/main/java/io/a2a/spec/AgentSkill.java b/spec/src/main/java/io/a2a/spec/AgentSkill.java index 5eb8e1755..2ff217f5d 100644 --- a/spec/src/main/java/io/a2a/spec/AgentSkill.java +++ b/spec/src/main/java/io/a2a/spec/AgentSkill.java @@ -35,13 +35,13 @@ * @param examples example queries or use cases demonstrating the skill (optional) * @param inputModes supported input formats for this skill (optional, inherits from AgentCard if not set) * @param outputModes supported output formats for this skill (optional, inherits from AgentCard if not set) - * @param security security requirements specific to this skill (optional) + * @param securityRequirements security requirements specific to this skill (optional) * @see AgentCard * @see A2A Protocol Specification */ public record AgentSkill(String id, String name, String description, List tags, List examples, List inputModes, List outputModes, - List>> security) { + List>> securityRequirements) { /** * Compact constructor that validates required fields. @@ -53,7 +53,7 @@ public record AgentSkill(String id, String name, String description, List examples; private List inputModes; private List outputModes; - private List>> security; + private List>> securityRequirements; /** * Creates a new Builder with all fields unset. @@ -216,11 +216,11 @@ public Builder outputModes(List outputModes) { * defined in the AgentCard. Each entry represents an alternative security * requirement, where each map contains scheme names and their required scopes. * - * @param security list of security requirements (optional) + * @param securityRequirements list of security requirements (optional) * @return this builder for method chaining */ - public Builder security(List>> security) { - this.security = security; + public Builder securityRequirements(List>> securityRequirements) { + this.securityRequirements = securityRequirements; return this; } @@ -231,7 +231,7 @@ public Builder security(List>> security) { * @throws IllegalArgumentException if any required field (id, name, description, tags) is null */ public AgentSkill build() { - return new AgentSkill(id, name, description, tags, examples, inputModes, outputModes, security); + return new AgentSkill(id, name, description, tags, examples, inputModes, outputModes, securityRequirements); } } } diff --git a/spec/src/main/java/io/a2a/spec/AuthenticationInfo.java b/spec/src/main/java/io/a2a/spec/AuthenticationInfo.java index 8bbe69092..29d1201d1 100644 --- a/spec/src/main/java/io/a2a/spec/AuthenticationInfo.java +++ b/spec/src/main/java/io/a2a/spec/AuthenticationInfo.java @@ -1,6 +1,5 @@ package io.a2a.spec; -import java.util.List; import io.a2a.util.Assert; @@ -10,28 +9,28 @@ * This record encapsulates authentication schemes and credentials for two primary use cases: *

      *
    • Agent Authentication: Clients authenticate to access protected agent resources. - * The {@code schemes} list references security schemes from {@link AgentCard#securitySchemes()}.
    • + * The {@code scheme} reference a security scheme from {@link AgentCard#securitySchemes()}. *
    • Push Notification Authentication: Agents authenticate when POSTing task updates to * client-provided push notification endpoints. Supports HTTP Basic, Bearer tokens, API keys, OAuth.
    • *
    * - * @param schemes list of security scheme names for authentication (required) + * @param scheme security scheme name for authentication (required) * @param credentials optional credentials string (format depends on scheme, e.g., base64-encoded for Basic auth) * @see AgentCard#securitySchemes() for available security schemes * @see PushNotificationConfig for push notification configuration * @see SecurityScheme for security scheme definitions * @see A2A Protocol Specification */ -public record AuthenticationInfo(List schemes, String credentials) { +public record AuthenticationInfo(String scheme, String credentials) { /** * Compact constructor that validates required fields. * - * @param schemes the schemes parameter (see class-level JavaDoc) + * @param scheme the schemes parameter (see class-level JavaDoc) * @param credentials the credentials parameter (see class-level JavaDoc) * @throws IllegalArgumentException if schemes is null */ public AuthenticationInfo { - Assert.checkNotNullParam("schemes", schemes); + Assert.checkNotNullParam("scheme", scheme); } } diff --git a/spec/src/main/java/io/a2a/spec/DataPart.java b/spec/src/main/java/io/a2a/spec/DataPart.java index 55157a205..b358d14d9 100644 --- a/spec/src/main/java/io/a2a/spec/DataPart.java +++ b/spec/src/main/java/io/a2a/spec/DataPart.java @@ -8,35 +8,40 @@ /** * Represents a structured data content part within a {@link Message} or {@link Artifact}. *

    - * DataPart contains structured data (typically JSON objects) for machine-to-machine communication. + * DataPart contains arbitrary JSON data for machine-to-machine communication. * It is used when content needs to be processed programmatically rather than displayed as text, * such as API responses, configuration data, analysis results, or structured metadata. *

    - * The data is represented as a Map of key-value pairs, which can contain nested structures - * including lists, maps, and primitive values. + * The data can be any valid JSON value: + *

      + *
    • JSON objects: {@code Map}
    • + *
    • JSON arrays: {@code List} + *
    • Primitives: {@code String}, {@code Number}, {@code Boolean}
    • + *
    • Null values: {@code null}
    • + * *

      * Example usage: *

      {@code
      - * // Simple structured data
      - * DataPart result = new DataPart(Map.of(
      + * // JSON object
      + * DataPart obj = new DataPart(Map.of(
        *     "status", "success",
        *     "count", 42,
        *     "items", List.of("item1", "item2")
        * ));
        *
      - * // With metadata
      - * DataPart withMeta = new DataPart(
      - *     Map.of("temperature", 72.5, "unit", "F"),
      - *     Map.of("source", "weather-api", "timestamp", "2024-01-20T12:00:00Z")
      - * );
      + * // JSON array
      + * DataPart array = new DataPart(List.of("item1", "item2", "item3"));
      + *
      + * // Primitive value
      + * DataPart primitive = new DataPart(42);
        * }
      * - * @param data the structured data map (required, defensively copied for immutability) + * @param data the structured data (required, supports JSON objects, arrays, primitives, and null) * @see Part * @see Message * @see Artifact */ -public record DataPart(Map data) implements Part> { +public record DataPart(Object data) implements Part { /** * The JSON member name discriminator for data parts: "data". @@ -47,14 +52,16 @@ public record DataPart(Map data) implements Part + * Note: For mutable data types (Map, List), callers should ensure immutability + * by using {@code Map.copyOf()} or {@code List.copyOf()} before passing to this constructor. * - * @param data the structured data map (required, defensively copied for immutability) + * @param data the structured data (supports JSON objects, arrays, primitives, and null) * @throws IllegalArgumentException if data is null */ public DataPart { Assert.checkNotNullParam("data", data); - data = Map.copyOf(data); } /** @@ -67,10 +74,10 @@ public static Builder builder() { } /** - * Builder for constructing immutable {@link DataPart} instances. + * Builder for constructing {@link DataPart} instances. */ public static class Builder { - private Map data; + private Object data; /** * Creates a new Builder with all fields unset. @@ -79,18 +86,18 @@ private Builder() { } /** - * Sets the structured data map. + * Sets the structured data. * - * @param data the structured data (required) + * @param data the structured data (required, supports JSON objects, arrays, primitives, and null) * @return this builder for method chaining */ - public Builder data(Map data) { + public Builder data(Object data) { this.data = data; return this; } /** - * Builds a new immutable {@link DataPart} from the current builder state. + * Builds a new {@link DataPart} from the current builder state. * * @return a new DataPart instance * @throws IllegalArgumentException if data is null diff --git a/spec/src/main/java/io/a2a/spec/GetTaskPushNotificationConfigParams.java b/spec/src/main/java/io/a2a/spec/GetTaskPushNotificationConfigParams.java index 36f2db3fb..81537ce97 100644 --- a/spec/src/main/java/io/a2a/spec/GetTaskPushNotificationConfigParams.java +++ b/spec/src/main/java/io/a2a/spec/GetTaskPushNotificationConfigParams.java @@ -3,7 +3,6 @@ import io.a2a.util.Assert; -import org.jspecify.annotations.Nullable; /** * Parameters for retrieving push notification configuration for a specific task. @@ -17,7 +16,7 @@ * @see TaskPushNotificationConfig for the returned configuration structure * @see A2A Protocol Specification */ -public record GetTaskPushNotificationConfigParams(String id, @Nullable String pushNotificationConfigId, String tenant) { +public record GetTaskPushNotificationConfigParams(String id, String pushNotificationConfigId, String tenant) { /** * Compact constructor that validates required fields. @@ -29,18 +28,10 @@ public record GetTaskPushNotificationConfigParams(String id, @Nullable String pu */ public GetTaskPushNotificationConfigParams { Assert.checkNotNullParam("id", id); + Assert.checkNotNullParam("pushNotificationConfigId", pushNotificationConfigId); Assert.checkNotNullParam("tenant", tenant); } - /** - * Convenience constructor for creating parameters with only task ID. - * - * @param id the task identifier (required) - */ - public GetTaskPushNotificationConfigParams(String id) { - this(id, null, ""); - } - /** * Convenience constructor for creating parameters without tenant. * diff --git a/spec/src/main/java/io/a2a/spec/ListTaskPushNotificationConfigParams.java b/spec/src/main/java/io/a2a/spec/ListTaskPushNotificationConfigParams.java index 644fed897..766945603 100644 --- a/spec/src/main/java/io/a2a/spec/ListTaskPushNotificationConfigParams.java +++ b/spec/src/main/java/io/a2a/spec/ListTaskPushNotificationConfigParams.java @@ -10,6 +10,8 @@ * * @param id the task identifier (required) * @param tenant optional tenant, provided as a path parameter. + * @param pageSize the maximum number of items to return per page + * @param pageToken the pagination token for the next page * @see TaskPushNotificationConfig for the configuration structure * @see A2A Protocol Specification */ diff --git a/spec/src/main/java/io/a2a/spec/SecurityScheme.java b/spec/src/main/java/io/a2a/spec/SecurityScheme.java index b481b4c4a..0fad71ed7 100644 --- a/spec/src/main/java/io/a2a/spec/SecurityScheme.java +++ b/spec/src/main/java/io/a2a/spec/SecurityScheme.java @@ -25,13 +25,13 @@ public sealed interface SecurityScheme permits APIKeySecurityScheme, HTTPAuthSec /** * Returns the human-readable description of this security scheme. - * * @return the description, or null if not provided */ String description(); /** * Returns the type of the security scheme. + * @return the type of the security scheme. */ String type(); } diff --git a/spec/src/main/java/io/a2a/spec/TaskStatusUpdateEvent.java b/spec/src/main/java/io/a2a/spec/TaskStatusUpdateEvent.java index 09e3bf39a..547a6e089 100644 --- a/spec/src/main/java/io/a2a/spec/TaskStatusUpdateEvent.java +++ b/spec/src/main/java/io/a2a/spec/TaskStatusUpdateEvent.java @@ -1,5 +1,11 @@ package io.a2a.spec; +import static io.a2a.spec.TaskState.CANCELED; +import static io.a2a.spec.TaskState.COMPLETED; +import static io.a2a.spec.TaskState.FAILED; +import static io.a2a.spec.TaskState.INPUT_REQUIRED; +import static io.a2a.spec.TaskState.REJECTED; + import java.util.Map; import com.google.gson.annotations.SerializedName; @@ -19,9 +25,10 @@ public record TaskStatusUpdateEvent( String taskId, TaskStatus status, String contextId, - @SerializedName("final") boolean isFinal, + @SerializedName("final") + boolean isFinal, Map metadata -) implements EventKind, StreamingEventKind, UpdateEvent { + ) implements EventKind, StreamingEventKind, UpdateEvent { /** * The identifier when used in streaming responses @@ -30,6 +37,7 @@ public record TaskStatusUpdateEvent( /** * Compact constructor with validation. + * * @param taskId the task identifier (required) * @param status the task status (required) * @param contextId the context identifier (required) @@ -41,6 +49,9 @@ public record TaskStatusUpdateEvent( Assert.checkNotNullParam("taskId", taskId); Assert.checkNotNullParam("status", status); Assert.checkNotNullParam("contextId", contextId); + if (isFinal != status.state().isFinal()) { + throw new IllegalArgumentException("isFinal must be the same as the Status state"); + } } @Override @@ -48,6 +59,14 @@ public String kind() { return STREAMING_EVENT_ID; } + /** + * Indicates if the task is fianl or waiting for some inputs from the client. + * @return true if the task is fianl or waiting for some inputs from the client - false otherwise. + */ + public boolean isFinalOrInterrupted() { + return status.state() == COMPLETED || status.state() == FAILED || status.state() == CANCELED || status.state() == REJECTED || status.state() == INPUT_REQUIRED; + } + /** * Create a new Builder * @@ -71,10 +90,10 @@ public static Builder builder(TaskStatusUpdateEvent event) { * Builder for constructing {@link TaskStatusUpdateEvent} instances. */ public static class Builder { + private String taskId; private TaskStatus status; private String contextId; - private boolean isFinal; private Map metadata; private Builder() { @@ -84,7 +103,6 @@ private Builder(TaskStatusUpdateEvent existingTaskStatusUpdateEvent) { this.taskId = existingTaskStatusUpdateEvent.taskId; this.status = existingTaskStatusUpdateEvent.status; this.contextId = existingTaskStatusUpdateEvent.contextId; - this.isFinal = existingTaskStatusUpdateEvent.isFinal; this.metadata = existingTaskStatusUpdateEvent.metadata; } @@ -121,17 +139,6 @@ public Builder contextId(String contextId) { return this; } - /** - * Sets whether this is a final status. - * - * @param isFinal true if this is a final status - * @return this builder for method chaining - */ - public Builder isFinal(boolean isFinal) { - this.isFinal = isFinal; - return this; - } - /** * Sets the metadata. * @@ -149,7 +156,7 @@ public Builder metadata(Map metadata) { * @return a new TaskStatusUpdateEvent instance */ public TaskStatusUpdateEvent build() { - return new TaskStatusUpdateEvent(taskId, status, contextId, isFinal, metadata); + return new TaskStatusUpdateEvent(taskId, status, contextId, status.state().isFinal(), metadata); } } } diff --git a/spec/src/main/java/io/a2a/spec/VersionNotSupportedError.java b/spec/src/main/java/io/a2a/spec/VersionNotSupportedError.java index 955709986..72a05bc74 100644 --- a/spec/src/main/java/io/a2a/spec/VersionNotSupportedError.java +++ b/spec/src/main/java/io/a2a/spec/VersionNotSupportedError.java @@ -23,7 +23,7 @@ * } * } * - * @see AgentCard#protocolVersions() for supported version declaration + * @see AgentInterface#protocolVersion() for supported version declaration * @see A2A Protocol Specification */ public class VersionNotSupportedError extends A2AProtocolError { diff --git a/tck/src/main/java/io/a2a/tck/server/AgentCardProducer.java b/tck/src/main/java/io/a2a/tck/server/AgentCardProducer.java index 599a0e12c..571e2bb1f 100644 --- a/tck/src/main/java/io/a2a/tck/server/AgentCardProducer.java +++ b/tck/src/main/java/io/a2a/tck/server/AgentCardProducer.java @@ -1,6 +1,5 @@ package io.a2a.tck.server; -import static io.a2a.spec.AgentCard.CURRENT_PROTOCOL_VERSION; import java.util.Collections; import java.util.List; @@ -49,7 +48,6 @@ public AgentCard agentCard() { .tags(Collections.singletonList("hello world")) .examples(List.of("hi", "hello world")) .build())) - .protocolVersions(CURRENT_PROTOCOL_VERSION) .build(); } diff --git a/tck/src/main/java/io/a2a/tck/server/AgentExecutorProducer.java b/tck/src/main/java/io/a2a/tck/server/AgentExecutorProducer.java index d1f5af5a6..848ced9ec 100644 --- a/tck/src/main/java/io/a2a/tck/server/AgentExecutorProducer.java +++ b/tck/src/main/java/io/a2a/tck/server/AgentExecutorProducer.java @@ -49,10 +49,10 @@ public void execute(RequestContext context, EventQueue eventQueue) throws A2AErr eventQueue.enqueueEvent(task); } - // Sleep to allow task state persistence before TCK resubscribe test - if (context.getMessage() != null && context.getMessage().messageId().startsWith("test-resubscribe-message-id")) { + // Sleep to allow task state persistence before TCK subscribe test + if (context.getMessage() != null && context.getMessage().messageId().startsWith("test-subscribe-message-id")) { int timeoutMs = Integer.parseInt(System.getenv().getOrDefault("RESUBSCRIBE_TIMEOUT_MS", "3000")); - System.out.println("====> task id starts with test-resubscribe-message-id, sleeping for " + timeoutMs + " ms"); + System.out.println("====> task id starts with test-subscribe-message-id, sleeping for " + timeoutMs + " ms"); try { Thread.sleep(timeoutMs); } catch (InterruptedException e) { @@ -89,12 +89,12 @@ public void cancel(RequestContext context, EventQueue eventQueue) throws A2AErro TaskUpdater updater = new TaskUpdater(context, eventQueue); updater.cancel(); - eventQueue.enqueueEvent(TaskStatusUpdateEvent.builder() - .taskId(task.id()) - .contextId(task.contextId()) - .status(new TaskStatus(TaskState.CANCELED)) - .isFinal(true) - .build()); + eventQueue.enqueueEvent(new TaskStatusUpdateEvent( + task.id(), + new TaskStatus(TaskState.CANCELED), + task.contextId(), + true, // isFinal - TaskState.CANCELED is a final state + null)); System.out.println("====> task canceled"); } diff --git a/tests/server-common/src/test/java/io/a2a/server/apps/common/AbstractA2AServerTest.java b/tests/server-common/src/test/java/io/a2a/server/apps/common/AbstractA2AServerTest.java index a15f2b087..5522e4dbf 100644 --- a/tests/server-common/src/test/java/io/a2a/server/apps/common/AbstractA2AServerTest.java +++ b/tests/server-common/src/test/java/io/a2a/server/apps/common/AbstractA2AServerTest.java @@ -1,7 +1,6 @@ package io.a2a.server.apps.common; import static io.a2a.spec.A2AMethods.SEND_STREAMING_MESSAGE_METHOD; -import static io.a2a.spec.AgentCard.CURRENT_PROTOCOL_VERSION; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertInstanceOf; @@ -577,7 +576,7 @@ public void testGetPushNotificationSuccess() throws Exception { assertNotNull(setResult); TaskPushNotificationConfig config = getClient().getTaskPushNotificationConfiguration( - new GetTaskPushNotificationConfigParams(MINIMAL_TASK.id())); + new GetTaskPushNotificationConfigParams(MINIMAL_TASK.id(), "c295ea44-7543-4f78-b524-7a38915ad6e4")); assertEquals(MINIMAL_TASK.id(), config.taskId()); assertEquals("http://example.com", config.pushNotificationConfig().url()); } catch (A2AClientException e) { @@ -640,7 +639,7 @@ public void testSendMessageStreamExistingTaskSuccess() throws Exception { @Test @Timeout(value = 3, unit = TimeUnit.MINUTES) - public void testResubscribeExistingTaskSuccess() throws Exception { + public void testSubscribeExistingTaskSuccess() throws Exception { saveTaskInTaskStore(MINIMAL_TASK); try { // attempting to send a streaming message instead of explicitly calling queueManager#createOrTap @@ -654,7 +653,7 @@ public void testResubscribeExistingTaskSuccess() throws Exception { AtomicBoolean wasUnexpectedEvent = new AtomicBoolean(false); AtomicReference errorRef = new AtomicReference<>(); - // Create consumer to handle resubscribed events + // Create consumer to handle subscribed events AtomicBoolean receivedInitialTask = new AtomicBoolean(false); BiConsumer consumer = (event, agentCard) -> { // Per A2A spec 3.1.6: ENFORCE that first event is TaskEvent @@ -664,7 +663,7 @@ public void testResubscribeExistingTaskSuccess() throws Exception { // Don't count down latch for initial Task return; } else { - fail("First event on resubscribe MUST be TaskEvent, but was: " + event.getClass().getSimpleName()); + fail("First event on subscribe MUST be TaskEvent, but was: " + event.getClass().getSimpleName()); } } @@ -697,8 +696,8 @@ public void testResubscribeExistingTaskSuccess() throws Exception { awaitStreamingSubscription() .whenComplete((unused, throwable) -> subscriptionLatch.countDown()); - // Resubscribe to the task with specific consumer and error handler - getClient().resubscribe(new TaskIdParams(MINIMAL_TASK.id()), List.of(consumer), errorHandler); + // subscribe to the task with specific consumer and error handler + getClient().subscribeToTask(new TaskIdParams(MINIMAL_TASK.id()), List.of(consumer), errorHandler); // Wait for subscription to be established assertTrue(subscriptionLatch.await(15, TimeUnit.SECONDS)); @@ -717,7 +716,6 @@ public void testResubscribeExistingTaskSuccess() throws Exception { .taskId(MINIMAL_TASK.id()) .contextId(MINIMAL_TASK.contextId()) .status(new TaskStatus(TaskState.COMPLETED)) - .isFinal(true) .build()); for (Event event : events) { @@ -752,7 +750,7 @@ public void testResubscribeExistingTaskSuccess() throws Exception { @Test @Timeout(value = 3, unit = TimeUnit.MINUTES) - public void testResubscribeExistingTaskSuccessWithClientConsumers() throws Exception { + public void testSubscribeExistingTaskSuccessWithClientConsumers() throws Exception { saveTaskInTaskStore(MINIMAL_TASK); try { // attempting to send a streaming message instead of explicitly calling queueManager#createOrTap @@ -766,7 +764,7 @@ public void testResubscribeExistingTaskSuccessWithClientConsumers() throws Excep AtomicBoolean wasUnexpectedEvent = new AtomicBoolean(false); AtomicReference errorRef = new AtomicReference<>(); - // Create consumer to handle resubscribed events + // Create consumer to handle subscribed events AtomicBoolean receivedInitialTask = new AtomicBoolean(false); AgentCard agentCard = createTestAgentCard(); @@ -781,7 +779,7 @@ public void testResubscribeExistingTaskSuccessWithClientConsumers() throws Excep // Don't count down latch for initial Task return; } else { - fail("First event on resubscribe MUST be TaskEvent, but was: " + evt.getClass().getSimpleName()); + fail("First event on subscribe MUST be TaskEvent, but was: " + evt.getClass().getSimpleName()); } } @@ -816,8 +814,8 @@ public void testResubscribeExistingTaskSuccessWithClientConsumers() throws Excep awaitStreamingSubscription() .whenComplete((unused, throwable) -> subscriptionLatch.countDown()); - // Resubscribe to the task with the client consumer and error handler - clientWithConsumer.resubscribe(new TaskIdParams(MINIMAL_TASK.id())); + // Subscribe to the task with the client consumer and error handler + clientWithConsumer.subscribeToTask(new TaskIdParams(MINIMAL_TASK.id())); // Wait for subscription to be established assertTrue(subscriptionLatch.await(15, TimeUnit.SECONDS)); @@ -836,7 +834,6 @@ public void testResubscribeExistingTaskSuccessWithClientConsumers() throws Excep .taskId(MINIMAL_TASK.id()) .contextId(MINIMAL_TASK.contextId()) .status(new TaskStatus(TaskState.COMPLETED)) - .isFinal(true) .build()); for (Event event : events) { @@ -870,7 +867,7 @@ public void testResubscribeExistingTaskSuccessWithClientConsumers() throws Excep } @Test - public void testResubscribeNoExistingTaskError() throws Exception { + public void testSubscribeNoExistingTaskError() throws Exception { CountDownLatch errorLatch = new CountDownLatch(1); AtomicReference errorRef = new AtomicReference<>(); @@ -887,7 +884,7 @@ public void testResubscribeNoExistingTaskError() throws Exception { }; try { - getClient().resubscribe(new TaskIdParams("non-existent-task"), List.of(), errorHandler); + getClient().subscribeToTask(new TaskIdParams("non-existent-task"), List.of(), errorHandler); // Wait for error to be captured (may come via error handler for streaming) boolean errorReceived = errorLatch.await(10, TimeUnit.SECONDS); @@ -952,7 +949,7 @@ public void testMainQueueReferenceCountingWithMultipleConsumers() throws Excepti firstReceivedInitialTask.set(true); return; } else { - fail("First event on resubscribe MUST be TaskEvent, but was: " + event.getClass().getSimpleName()); + fail("First event on subscribe MUST be TaskEvent, but was: " + event.getClass().getSimpleName()); } } @@ -977,7 +974,7 @@ public void testMainQueueReferenceCountingWithMultipleConsumers() throws Excepti awaitStreamingSubscription() .whenComplete((unused, throwable) -> firstSubscriptionLatch.countDown()); - getClient().resubscribe(new TaskIdParams(MINIMAL_TASK.id()), + getClient().subscribeToTask(new TaskIdParams(MINIMAL_TASK.id()), List.of(firstConsumer), firstErrorHandler); @@ -1000,11 +997,11 @@ public void testMainQueueReferenceCountingWithMultipleConsumers() throws Excepti assertNull(firstErrorRef.get()); assertNotNull(firstConsumerEvent.get()); - // Verify we have multiple child queues (ensureQueue + first resubscribe) + // Verify we have multiple child queues (ensureQueue + first subscribe) int childCountBeforeSecond = getChildQueueCount(MINIMAL_TASK.id()); assertTrue(childCountBeforeSecond >= 2, "Should have at least 2 child queues"); - // 3. Second consumer resubscribes while first is still active + // 3. Second consumer subscribes while first is still active // This simulates the Kafka replication race condition where resubscription happens // while other consumers are still active. Without reference counting, the MainQueue // might close when the ensureQueue ChildQueue closes, preventing this resubscription. @@ -1021,7 +1018,7 @@ public void testMainQueueReferenceCountingWithMultipleConsumers() throws Excepti secondReceivedInitialTask.set(true); return; } else { - fail("First event on resubscribe MUST be TaskEvent, but was: " + event.getClass().getSimpleName()); + fail("First event on subscribe MUST be TaskEvent, but was: " + event.getClass().getSimpleName()); } } @@ -1048,7 +1045,7 @@ public void testMainQueueReferenceCountingWithMultipleConsumers() throws Excepti // This should succeed with reference counting because MainQueue stays alive // while first consumer's ChildQueue exists - getClient().resubscribe(new TaskIdParams(MINIMAL_TASK.id()), + getClient().subscribeToTask(new TaskIdParams(MINIMAL_TASK.id()), List.of(secondConsumer), secondErrorHandler); @@ -1360,7 +1357,7 @@ public void testNonBlockingWithMultipleMessages() throws Exception { assertNotNull(taskId); assertEquals(multiEventTaskId, taskId); - // 2. Resubscribe to task (queue should still be open) + // 2. Subscribe to task (queue should still be open) CountDownLatch resubEventLatch = new CountDownLatch(2); // artifact-2 + completion List resubReceivedEvents = new CopyOnWriteArrayList<>(); AtomicBoolean resubUnexpectedEvent = new AtomicBoolean(false); @@ -1374,7 +1371,7 @@ public void testNonBlockingWithMultipleMessages() throws Exception { resubReceivedInitialTask.set(true); return; } else { - fail("First event on resubscribe MUST be TaskEvent, but was: " + event.getClass().getSimpleName()); + fail("First event on subscribe MUST be TaskEvent, but was: " + event.getClass().getSimpleName()); } } @@ -1398,7 +1395,7 @@ public void testNonBlockingWithMultipleMessages() throws Exception { awaitStreamingSubscription() .whenComplete((unused, throwable) -> subscriptionLatch.countDown()); - getClient().resubscribe(new TaskIdParams(taskId), + getClient().subscribeToTask(new TaskIdParams(taskId), List.of(resubConsumer), resubErrorHandler); @@ -1416,7 +1413,7 @@ public void testNonBlockingWithMultipleMessages() throws Exception { AtomicBoolean streamUnexpectedEvent = new AtomicBoolean(false); BiConsumer streamConsumer = (event, agentCard) -> { - // This consumer is for sendMessage() (not resubscribe), so it doesn't get initial TaskEvent + // This consumer is for sendMessage() (not subscribe), so it doesn't get initial TaskEvent if (event instanceof TaskUpdateEvent tue) { streamReceivedEvents.add(tue.getUpdateEvent()); streamEventLatch.countDown(); @@ -2148,7 +2145,6 @@ private AgentCard createTestAgentCard() { .defaultOutputModes(List.of("text")) .skills(List.of()) .supportedInterfaces(List.of(new AgentInterface(getTransportProtocol(), getTransportUrl()))) - .protocolVersions(CURRENT_PROTOCOL_VERSION) .build(); } @@ -2251,7 +2247,7 @@ public void testMainQueueStaysOpenForNonFinalTasks() throws Exception { // Give agent time to finish (task remains in WORKING state - non-final) Thread.sleep(2000); - // THE BIG IDEA TEST: Resubscribe to the task + // THE BIG IDEA TEST: Subscribe to the task // Even though the agent finished and original ChildQueue closed, // MainQueue should still be open because task is in non-final WORKING state CountDownLatch resubLatch = new CountDownLatch(1); @@ -2274,7 +2270,7 @@ public void testMainQueueStaysOpenForNonFinalTasks() throws Exception { awaitStreamingSubscription() .whenComplete((unused, throwable) -> resubSubscriptionLatch.countDown()); - getClient().resubscribe(new TaskIdParams(taskId), + getClient().subscribeToTask(new TaskIdParams(taskId), List.of(resubConsumer), resubErrorHandler); @@ -2353,7 +2349,7 @@ public void testMainQueueClosesForFinalizedTasks() throws Exception { // Give cleanup time to run after final event Thread.sleep(2000); - // Try to resubscribe to finalized task - should fail + // Try to subscribe to finalized task - should fail CountDownLatch errorLatch = new CountDownLatch(1); AtomicReference resubErrorRef = new AtomicReference<>(); @@ -2370,7 +2366,7 @@ public void testMainQueueClosesForFinalizedTasks() throws Exception { // Attempt resubscription try { - getClient().resubscribe(new TaskIdParams(taskId), + getClient().subscribeToTask(new TaskIdParams(taskId), List.of(), resubErrorHandler); diff --git a/tests/server-common/src/test/java/io/a2a/server/apps/common/AgentCardProducer.java b/tests/server-common/src/test/java/io/a2a/server/apps/common/AgentCardProducer.java index f9dae8d19..06cdb17f6 100644 --- a/tests/server-common/src/test/java/io/a2a/server/apps/common/AgentCardProducer.java +++ b/tests/server-common/src/test/java/io/a2a/server/apps/common/AgentCardProducer.java @@ -1,6 +1,5 @@ package io.a2a.server.apps.common; -import static io.a2a.spec.AgentCard.CURRENT_PROTOCOL_VERSION; import static io.a2a.spec.TransportProtocol.GRPC; import java.io.IOException; @@ -18,7 +17,6 @@ import io.a2a.spec.AgentCapabilities; import io.a2a.spec.AgentCard; import io.a2a.spec.AgentInterface; -import io.a2a.spec.TransportProtocol; import io.quarkus.arc.profile.IfBuildProfile; import org.junit.jupiter.api.Assertions; @@ -51,7 +49,6 @@ public AgentCard agentCard() { .defaultInputModes(Collections.singletonList("text")) .defaultOutputModes(Collections.singletonList("text")) .skills(new ArrayList<>()) - .protocolVersions(CURRENT_PROTOCOL_VERSION) .supportedInterfaces(Collections.singletonList(new AgentInterface(preferredTransport, transportUrl))); return builder.build(); } diff --git a/transport/grpc/src/main/java/io/a2a/transport/grpc/handler/GrpcHandler.java b/transport/grpc/src/main/java/io/a2a/transport/grpc/handler/GrpcHandler.java index 376d9b11d..979bb5ef4 100644 --- a/transport/grpc/src/main/java/io/a2a/transport/grpc/handler/GrpcHandler.java +++ b/transport/grpc/src/main/java/io/a2a/transport/grpc/handler/GrpcHandler.java @@ -263,7 +263,7 @@ public void subscribeToTask(io.a2a.grpc.SubscribeToTaskRequest request, try { ServerCallContext context = createCallContext(responseObserver); TaskIdParams params = FromProto.taskIdParams(request); - Flow.Publisher publisher = getRequestHandler().onResubscribeToTask(params, context); + Flow.Publisher publisher = getRequestHandler().onSubscribeToTask(params, context); convertToStreamResponse(publisher, responseObserver, context); } catch (A2AError e) { handleError(responseObserver, e); @@ -309,8 +309,17 @@ public void cancelled(Context ctx) { public void onNext(StreamingEventKind event) { StreamResponse response = ToProto.streamResponse(event); responseObserver.onNext(response); - if (response.hasStatusUpdate() && response.getStatusUpdate().getFinal()) { - responseObserver.onCompleted(); + if (response.hasStatusUpdate()) { + io.a2a.grpc.TaskState state = response.getStatusUpdate().getStatus().getState(); + boolean isFinal = state == io.a2a.grpc.TaskState.TASK_STATE_CANCELED + || state == io.a2a.grpc.TaskState.TASK_STATE_COMPLETED + || state == io.a2a.grpc.TaskState.TASK_STATE_FAILED + || state == io.a2a.grpc.TaskState.TASK_STATE_REJECTED; + if (isFinal) { + responseObserver.onCompleted(); + } else { + subscription.request(1); + } } else { subscription.request(1); } diff --git a/transport/grpc/src/test/java/io/a2a/transport/grpc/handler/GrpcHandlerTest.java b/transport/grpc/src/test/java/io/a2a/transport/grpc/handler/GrpcHandlerTest.java index c7cf79524..2bd8c8453 100644 --- a/transport/grpc/src/test/java/io/a2a/transport/grpc/handler/GrpcHandlerTest.java +++ b/transport/grpc/src/test/java/io/a2a/transport/grpc/handler/GrpcHandlerTest.java @@ -1,5 +1,6 @@ package io.a2a.transport.grpc.handler; +import static io.a2a.spec.AgentInterface.CURRENT_PROTOCOL_VERSION; import static org.junit.jupiter.api.Assertions.assertEquals; import java.util.ArrayList; @@ -60,13 +61,12 @@ public class GrpcHandlerTest extends AbstractA2ARequestHandlerTest { .setMetadata(Struct.newBuilder().build()) .build(); - @Test public void testOnGetTaskSuccess() throws Exception { GrpcHandler handler = new TestGrpcHandler(AbstractA2ARequestHandlerTest.CARD, requestHandler, internalExecutor); taskStore.save(AbstractA2ARequestHandlerTest.MINIMAL_TASK, false); GetTaskRequest request = GetTaskRequest.newBuilder() - .setName("tasks/" + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()) + .setId(AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()) .build(); StreamRecorder streamRecorder = StreamRecorder.create(); @@ -87,7 +87,7 @@ public void testOnGetTaskSuccess() throws Exception { public void testOnGetTaskNotFound() throws Exception { GrpcHandler handler = new TestGrpcHandler(AbstractA2ARequestHandlerTest.CARD, requestHandler, internalExecutor); GetTaskRequest request = GetTaskRequest.newBuilder() - .setName("tasks/" + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()) + .setId(AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()) .build(); StreamRecorder streamRecorder = StreamRecorder.create(); @@ -112,7 +112,7 @@ public void testOnCancelTaskSuccess() throws Exception { }; CancelTaskRequest request = CancelTaskRequest.newBuilder() - .setName("tasks/" + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()) + .setId(AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()) .build(); StreamRecorder streamRecorder = StreamRecorder.create(); handler.cancelTask(request, streamRecorder); @@ -125,7 +125,7 @@ public void testOnCancelTaskSuccess() throws Exception { Task task = result.get(0); assertEquals(AbstractA2ARequestHandlerTest.MINIMAL_TASK.id(), task.getId()); assertEquals(AbstractA2ARequestHandlerTest.MINIMAL_TASK.contextId(), task.getContextId()); - assertEquals(TaskState.TASK_STATE_CANCELLED, task.getStatus().getState()); + assertEquals(TaskState.TASK_STATE_CANCELED, task.getStatus().getState()); } @Test @@ -138,7 +138,7 @@ public void testOnCancelTaskNotSupported() throws Exception { }; CancelTaskRequest request = CancelTaskRequest.newBuilder() - .setName("tasks/" + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()) + .setId(AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()) .build(); StreamRecorder streamRecorder = StreamRecorder.create(); handler.cancelTask(request, streamRecorder); @@ -151,7 +151,7 @@ public void testOnCancelTaskNotSupported() throws Exception { public void testOnCancelTaskNotFound() throws Exception { GrpcHandler handler = new TestGrpcHandler(AbstractA2ARequestHandlerTest.CARD, requestHandler, internalExecutor); CancelTaskRequest request = CancelTaskRequest.newBuilder() - .setName("tasks/" + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()) + .setId(AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()) .build(); StreamRecorder streamRecorder = StreamRecorder.create(); handler.cancelTask(request, streamRecorder); @@ -205,17 +205,18 @@ public void testOnMessageError() throws Exception { @Test public void testSetPushNotificationConfigSuccess() throws Exception { GrpcHandler handler = new TestGrpcHandler(AbstractA2ARequestHandlerTest.CARD, requestHandler, internalExecutor); - String NAME = "tasks/" + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id() + "/pushNotificationConfigs/" + "config456"; - StreamRecorder streamRecorder = createTaskPushNotificationConfigRequest(handler, NAME); + StreamRecorder streamRecorder = createTaskPushNotificationConfigRequest(handler, + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id(), "config456"); Assertions.assertNull(streamRecorder.getError()); List result = streamRecorder.getValues(); Assertions.assertNotNull(result); Assertions.assertEquals(1, result.size()); TaskPushNotificationConfig response = result.get(0); - assertEquals(NAME, response.getName()); + assertEquals(AbstractA2ARequestHandlerTest.MINIMAL_TASK.id(), response.getTaskId()); PushNotificationConfig responseConfig = response.getPushNotificationConfig(); assertEquals("config456", responseConfig.getId()); + assertEquals("config456", response.getId()); assertEquals("http://example.com", responseConfig.getUrl()); assertEquals(AuthenticationInfo.getDefaultInstance(), responseConfig.getAuthentication()); Assertions.assertTrue(responseConfig.getToken().isEmpty()); @@ -228,20 +229,20 @@ public void testGetPushNotificationConfigSuccess() throws Exception { eventQueue.enqueueEvent(context.getTask() != null ? context.getTask() : context.getMessage()); }; - String NAME = "tasks/" + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id() + "/pushNotificationConfigs/" + "config456"; - // first set the task push notification config - StreamRecorder streamRecorder = createTaskPushNotificationConfigRequest(handler, NAME); + StreamRecorder streamRecorder = createTaskPushNotificationConfigRequest(handler, + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id(), "config456"); Assertions.assertNull(streamRecorder.getError()); // then get the task push notification config - streamRecorder = getTaskPushNotificationConfigRequest(handler, NAME); + streamRecorder = getTaskPushNotificationConfigRequest(handler, AbstractA2ARequestHandlerTest.MINIMAL_TASK.id(), "config456"); Assertions.assertNull(streamRecorder.getError()); List result = streamRecorder.getValues(); Assertions.assertNotNull(result); Assertions.assertEquals(1, result.size()); TaskPushNotificationConfig response = result.get(0); - assertEquals(NAME, response.getName()); + assertEquals(AbstractA2ARequestHandlerTest.MINIMAL_TASK.id(), response.getTaskId()); + assertEquals("config456", response.getId()); PushNotificationConfig responseConfig = response.getPushNotificationConfig(); assertEquals("config456", responseConfig.getId()); assertEquals("http://example.com", responseConfig.getUrl()); @@ -253,8 +254,8 @@ public void testGetPushNotificationConfigSuccess() throws Exception { public void testPushNotificationsNotSupportedError() throws Exception { AgentCard card = AbstractA2ARequestHandlerTest.createAgentCard(true, false); GrpcHandler handler = new TestGrpcHandler(card, requestHandler, internalExecutor); - String NAME = "tasks/" + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id() + "/pushNotificationConfigs/" + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id(); - StreamRecorder streamRecorder = createTaskPushNotificationConfigRequest(handler, NAME); + StreamRecorder streamRecorder = createTaskPushNotificationConfigRequest(handler, + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id(), AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()); assertGrpcError(streamRecorder, Status.Code.UNIMPLEMENTED); } @@ -264,8 +265,8 @@ public void testOnGetPushNotificationNoPushNotifierConfig() throws Exception { DefaultRequestHandler requestHandler = DefaultRequestHandler.create(executor, taskStore, queueManager, null, mainEventBusProcessor, internalExecutor, internalExecutor); AgentCard card = AbstractA2ARequestHandlerTest.createAgentCard(false, true); GrpcHandler handler = new TestGrpcHandler(card, requestHandler, internalExecutor); - String NAME = "tasks/" + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id() + "/pushNotificationConfigs/" + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id(); - StreamRecorder streamRecorder = getTaskPushNotificationConfigRequest(handler, NAME); + StreamRecorder streamRecorder = getTaskPushNotificationConfigRequest(handler, + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id(), AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()); assertGrpcError(streamRecorder, Status.Code.UNIMPLEMENTED); } @@ -275,8 +276,8 @@ public void testOnSetPushNotificationNoPushNotifierConfig() throws Exception { DefaultRequestHandler requestHandler = DefaultRequestHandler.create(executor, taskStore, queueManager, null, mainEventBusProcessor, internalExecutor, internalExecutor); AgentCard card = AbstractA2ARequestHandlerTest.createAgentCard(false, true); GrpcHandler handler = new TestGrpcHandler(card, requestHandler, internalExecutor); - String NAME = "tasks/" + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id() + "/pushNotificationConfigs/" + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id(); - StreamRecorder streamRecorder = createTaskPushNotificationConfigRequest(handler, NAME); + StreamRecorder streamRecorder = createTaskPushNotificationConfigRequest(handler, + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id(), AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()); assertGrpcError(streamRecorder, Status.Code.UNIMPLEMENTED); } @@ -379,7 +380,8 @@ public void testOnMessageStreamNewMessageExistingTaskSuccessMocks() throws Excep try (MockedConstruction mocked = Mockito.mockConstruction( EventConsumer.class, (mock, context) -> { - Mockito.doReturn(ZeroPublisher.fromIterable(events.stream().map(AbstractA2ARequestHandlerTest::wrapEvent).toList())).when(mock).consumeAll();})){ + Mockito.doReturn(ZeroPublisher.fromIterable(events.stream().map(AbstractA2ARequestHandlerTest::wrapEvent).toList())).when(mock).consumeAll(); + })) { streamRecorder = sendStreamingMessageRequest(handler); } Assertions.assertNull(streamRecorder.getError()); @@ -410,71 +412,70 @@ public void testOnMessageStreamNewMessageSendPushNotificationSuccess() throws Ex GrpcHandler handler = new TestGrpcHandler(AbstractA2ARequestHandlerTest.CARD, requestHandler, internalExecutor); List events = List.of( AbstractA2ARequestHandlerTest.MINIMAL_TASK, - TaskArtifactUpdateEvent.builder() - .taskId(AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()) - .contextId(AbstractA2ARequestHandlerTest.MINIMAL_TASK.contextId()) - .artifact(Artifact.builder() - .artifactId("11") - .parts(new TextPart("text")) - .build()) - .build(), - TaskStatusUpdateEvent.builder() - .taskId(AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()) - .contextId(AbstractA2ARequestHandlerTest.MINIMAL_TASK.contextId()) - .status(new io.a2a.spec.TaskStatus(io.a2a.spec.TaskState.COMPLETED)) - .build()); - - - agentExecutorExecute = (context, eventQueue) -> { - // Hardcode the events to send here - for (Event event : events) { - eventQueue.enqueueEvent(event); - } - }; - - String NAME = "tasks/" + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id() + "/pushNotificationConfigs/" + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id(); - StreamRecorder pushStreamRecorder = createTaskPushNotificationConfigRequest(handler, NAME); - Assertions.assertNull(pushStreamRecorder.getError()); - - List results = new ArrayList<>(); - List errors = new ArrayList<>(); - final CountDownLatch latch = new CountDownLatch(6); - httpClient.latch = latch; - StreamObserver streamObserver = new StreamObserver<>() { - @Override - public void onNext(StreamResponse streamResponse) { - results.add(streamResponse); - latch.countDown(); - } - - @Override - public void onError(Throwable throwable) { - errors.add(throwable); - } + TaskArtifactUpdateEvent.builder() + .taskId(AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()) + .contextId(AbstractA2ARequestHandlerTest.MINIMAL_TASK.contextId()) + .artifact(Artifact.builder() + .artifactId("11") + .parts(new TextPart("text")) + .build()) + .build(), + TaskStatusUpdateEvent.builder() + .taskId(AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()) + .contextId(AbstractA2ARequestHandlerTest.MINIMAL_TASK.contextId()) + .status(new io.a2a.spec.TaskStatus(io.a2a.spec.TaskState.COMPLETED)) + .build()); + + agentExecutorExecute = (context, eventQueue) -> { + // Hardcode the events to send here + for (Event event : events) { + eventQueue.enqueueEvent(event); + } + }; + + StreamRecorder pushStreamRecorder = createTaskPushNotificationConfigRequest( + handler, AbstractA2ARequestHandlerTest.MINIMAL_TASK.id(), AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()); + Assertions.assertNull(pushStreamRecorder.getError()); + + List results = new ArrayList<>(); + List errors = new ArrayList<>(); + final CountDownLatch latch = new CountDownLatch(6); + httpClient.latch = latch; + StreamObserver streamObserver = new StreamObserver<>() { + @Override + public void onNext(StreamResponse streamResponse) { + results.add(streamResponse); + latch.countDown(); + } + + @Override + public void onError(Throwable throwable) { + errors.add(throwable); + } + + @Override + public void onCompleted() { + } + }; + sendStreamingMessageRequest(handler, streamObserver); + Assertions.assertTrue(latch.await(5, TimeUnit.SECONDS)); + Assertions.assertTrue(errors.isEmpty()); + Assertions.assertEquals(3, results.size()); + Assertions.assertEquals(3, httpClient.tasks.size()); + + io.a2a.spec.Task curr = httpClient.tasks.get(0); + Assertions.assertEquals(AbstractA2ARequestHandlerTest.MINIMAL_TASK.id(), curr.id()); + Assertions.assertEquals(AbstractA2ARequestHandlerTest.MINIMAL_TASK.contextId(), curr.contextId()); + Assertions.assertEquals(AbstractA2ARequestHandlerTest.MINIMAL_TASK.status().state(), curr.status().state()); + Assertions.assertEquals(0, curr.artifacts() == null ? 0 : curr.artifacts().size()); - @Override - public void onCompleted() { - } - }; - sendStreamingMessageRequest(handler, streamObserver); - Assertions.assertTrue(latch.await(5, TimeUnit.SECONDS)); - Assertions.assertTrue(errors.isEmpty()); - Assertions.assertEquals(3, results.size()); - Assertions.assertEquals(3, httpClient.tasks.size()); - - io.a2a.spec.Task curr = httpClient.tasks.get(0); - Assertions.assertEquals(AbstractA2ARequestHandlerTest.MINIMAL_TASK.id(), curr.id()); - Assertions.assertEquals(AbstractA2ARequestHandlerTest.MINIMAL_TASK.contextId(), curr.contextId()); - Assertions.assertEquals(AbstractA2ARequestHandlerTest.MINIMAL_TASK.status().state(), curr.status().state()); - Assertions.assertEquals(0, curr.artifacts() == null ? 0 : curr.artifacts().size()); - - curr = httpClient.tasks.get(1); - Assertions.assertEquals(AbstractA2ARequestHandlerTest.MINIMAL_TASK.id(), curr.id()); - Assertions.assertEquals(AbstractA2ARequestHandlerTest.MINIMAL_TASK.contextId(), curr.contextId()); - Assertions.assertEquals(AbstractA2ARequestHandlerTest.MINIMAL_TASK.status().state(), curr.status().state()); - Assertions.assertEquals(1, curr.artifacts().size()); - Assertions.assertEquals(1, curr.artifacts().get(0).parts().size()); - Assertions.assertEquals("text", ((TextPart)curr.artifacts().get(0).parts().get(0)).text()); + curr = httpClient.tasks.get(1); + Assertions.assertEquals(AbstractA2ARequestHandlerTest.MINIMAL_TASK.id(), curr.id()); + Assertions.assertEquals(AbstractA2ARequestHandlerTest.MINIMAL_TASK.contextId(), curr.contextId()); + Assertions.assertEquals(AbstractA2ARequestHandlerTest.MINIMAL_TASK.status().state(), curr.status().state()); + Assertions.assertEquals(1, curr.artifacts().size()); + Assertions.assertEquals(1, curr.artifacts().get(0).parts().size()); + Assertions.assertEquals("text", ((TextPart) curr.artifacts().get(0).parts().get(0)).text()); curr = httpClient.tasks.get(2); Assertions.assertEquals(AbstractA2ARequestHandlerTest.MINIMAL_TASK.id(), curr.id()); @@ -482,17 +483,17 @@ public void onCompleted() { Assertions.assertEquals(io.a2a.spec.TaskState.COMPLETED, curr.status().state()); Assertions.assertEquals(1, curr.artifacts().size()); Assertions.assertEquals(1, curr.artifacts().get(0).parts().size()); - Assertions.assertEquals("text", ((TextPart)curr.artifacts().get(0).parts().get(0)).text()); + Assertions.assertEquals("text", ((TextPart) curr.artifacts().get(0).parts().get(0)).text()); } finally { mainEventBusProcessor.setPushNotificationExecutor(null); } } @Test - public void testOnResubscribeNoExistingTaskError() throws Exception { + public void testOnSubscribeNoExistingTaskError() throws Exception { GrpcHandler handler = new TestGrpcHandler(AbstractA2ARequestHandlerTest.CARD, requestHandler, internalExecutor); SubscribeToTaskRequest request = SubscribeToTaskRequest.newBuilder() - .setName("tasks/" + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()) + .setId(AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()) .build(); StreamRecorder streamRecorder = StreamRecorder.create(); handler.subscribeToTask(request, streamRecorder); @@ -501,7 +502,7 @@ public void testOnResubscribeNoExistingTaskError() throws Exception { } @Test - public void testOnResubscribeExistingTaskSuccess() throws Exception { + public void testOnSubscribeExistingTaskSuccess() throws Exception { GrpcHandler handler = new TestGrpcHandler(AbstractA2ARequestHandlerTest.CARD, requestHandler, internalExecutor); taskStore.save(AbstractA2ARequestHandlerTest.MINIMAL_TASK, false); queueManager.createOrTap(AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()); @@ -512,7 +513,7 @@ public void testOnResubscribeExistingTaskSuccess() throws Exception { StreamRecorder streamRecorder = StreamRecorder.create(); SubscribeToTaskRequest request = SubscribeToTaskRequest.newBuilder() - .setName("tasks/" + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()) + .setId(AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()) .build(); handler.subscribeToTask(request, streamRecorder); @@ -528,24 +529,24 @@ public void testOnResubscribeExistingTaskSuccess() throws Exception { streamRecorder.awaitCompletion(5, TimeUnit.SECONDS); List result = streamRecorder.getValues(); Assertions.assertNotNull(result); - // Per A2A Protocol Spec 3.1.6, resubscribe sends current Task as first event, + // Per A2A Protocol Spec 3.1.6, subscribe sends current Task as first event, // followed by the Message from the agent executor Assertions.assertEquals(2, result.size()); // ENFORCE that first event is Task Assertions.assertTrue(result.get(0).hasTask(), - "First event on resubscribe MUST be Task (current state)"); + "First event on subscribe MUST be Task (current state)"); // Second event should be Message from agent executor StreamResponse response = result.get(1); Assertions.assertTrue(response.hasMessage(), - "Expected Message after initial Task"); + "Expected Message after initial Task"); assertEquals(GRPC_MESSAGE, response.getMessage()); Assertions.assertNull(streamRecorder.getError()); } @Test - public void testOnResubscribeExistingTaskSuccessMocks() throws Exception { + public void testOnSubscribeExistingTaskSuccessMocks() throws Exception { GrpcHandler handler = new TestGrpcHandler(AbstractA2ARequestHandlerTest.CARD, requestHandler, internalExecutor); taskStore.save(AbstractA2ARequestHandlerTest.MINIMAL_TASK, false); queueManager.createOrTap(AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()); @@ -567,12 +568,13 @@ public void testOnResubscribeExistingTaskSuccessMocks() throws Exception { StreamRecorder streamRecorder = StreamRecorder.create(); SubscribeToTaskRequest request = SubscribeToTaskRequest.newBuilder() - .setName("tasks/" + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()) + .setId(AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()) .build(); try (MockedConstruction mocked = Mockito.mockConstruction( EventConsumer.class, (mock, context) -> { - Mockito.doReturn(ZeroPublisher.fromIterable(events.stream().map(AbstractA2ARequestHandlerTest::wrapEvent).toList())).when(mock).consumeAll();})){ + Mockito.doReturn(ZeroPublisher.fromIterable(events.stream().map(AbstractA2ARequestHandlerTest::wrapEvent).toList())).when(mock).consumeAll(); + })) { handler.subscribeToTask(request, streamRecorder); streamRecorder.awaitCompletion(5, TimeUnit.SECONDS); } @@ -597,12 +599,12 @@ public void testStreamingNotSupportedError() throws Exception { } @Test - public void testStreamingNotSupportedErrorOnResubscribeToTask() throws Exception { + public void testStreamingNotSupportedErrorOnSubscribeToTask() throws Exception { // This test does not exist in the Python implementation AgentCard card = AbstractA2ARequestHandlerTest.createAgentCard(false, true); GrpcHandler handler = new TestGrpcHandler(card, requestHandler, internalExecutor); SubscribeToTaskRequest request = SubscribeToTaskRequest.newBuilder() - .setName("tasks/" + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()) + .setId(AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()) .build(); StreamRecorder streamRecorder = StreamRecorder.create(); handler.subscribeToTask(request, streamRecorder); @@ -627,14 +629,14 @@ public void testListPushNotificationConfig() throws Exception { eventQueue.enqueueEvent(context.getTask() != null ? context.getTask() : context.getMessage()); }; - String NAME = "tasks/" + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id() + "/pushNotificationConfigs/" + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id(); - StreamRecorder pushRecorder = createTaskPushNotificationConfigRequest(handler, NAME); + StreamRecorder pushRecorder = createTaskPushNotificationConfigRequest(handler, + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id(), AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()); Assertions.assertNull(pushRecorder.getError()); ListTaskPushNotificationConfigRequest request = ListTaskPushNotificationConfigRequest.newBuilder() - .setParent("tasks/" + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()) + .setTaskId(AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()) .build(); - StreamRecorder streamRecorder = StreamRecorder.create(); + StreamRecorder streamRecorder = StreamRecorder.create(); handler.listTaskPushNotificationConfig(request, streamRecorder); Assertions.assertNull(streamRecorder.getError()); List result = streamRecorder.getValues(); @@ -654,9 +656,9 @@ public void testListPushNotificationConfigNotSupported() throws Exception { }; ListTaskPushNotificationConfigRequest request = ListTaskPushNotificationConfigRequest.newBuilder() - .setParent("tasks/" + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()) + .setTaskId(AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()) .build(); - StreamRecorder streamRecorder = StreamRecorder.create(); + StreamRecorder streamRecorder = StreamRecorder.create(); handler.listTaskPushNotificationConfig(request, streamRecorder); assertGrpcError(streamRecorder, Status.Code.UNIMPLEMENTED); } @@ -671,9 +673,9 @@ public void testListPushNotificationConfigNoPushConfigStore() { }; ListTaskPushNotificationConfigRequest request = ListTaskPushNotificationConfigRequest.newBuilder() - .setParent("tasks/" + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()) + .setTaskId(AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()) .build(); - StreamRecorder streamRecorder = StreamRecorder.create(); + StreamRecorder streamRecorder = StreamRecorder.create(); handler.listTaskPushNotificationConfig(request, streamRecorder); assertGrpcError(streamRecorder, Status.Code.UNIMPLEMENTED); } @@ -686,9 +688,9 @@ public void testListPushNotificationConfigTaskNotFound() { }; ListTaskPushNotificationConfigRequest request = ListTaskPushNotificationConfigRequest.newBuilder() - .setParent("tasks/" + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()) + .setTaskId(AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()) .build(); - StreamRecorder streamRecorder = StreamRecorder.create(); + StreamRecorder streamRecorder = StreamRecorder.create(); handler.listTaskPushNotificationConfig(request, streamRecorder); assertGrpcError(streamRecorder, Status.Code.NOT_FOUND); } @@ -700,13 +702,13 @@ public void testDeletePushNotificationConfig() throws Exception { agentExecutorExecute = (context, eventQueue) -> { eventQueue.enqueueEvent(context.getTask() != null ? context.getTask() : context.getMessage()); }; - - String NAME = "tasks/" + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id() + "/pushNotificationConfigs/" + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id(); - StreamRecorder pushRecorder = createTaskPushNotificationConfigRequest(handler, NAME); + StreamRecorder pushRecorder = createTaskPushNotificationConfigRequest(handler, AbstractA2ARequestHandlerTest.MINIMAL_TASK.id(), + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()); Assertions.assertNull(pushRecorder.getError()); DeleteTaskPushNotificationConfigRequest request = DeleteTaskPushNotificationConfigRequest.newBuilder() - .setName(NAME) + .setId(AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()) + .setTaskId(AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()) .build(); StreamRecorder streamRecorder = StreamRecorder.create(); handler.deleteTaskPushNotificationConfig(request, streamRecorder); @@ -723,10 +725,9 @@ public void testDeletePushNotificationConfigNotSupported() throws Exception { agentExecutorExecute = (context, eventQueue) -> { eventQueue.enqueueEvent(context.getTask() != null ? context.getTask() : context.getMessage()); }; - - String NAME = "tasks/" + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id() + "/pushNotificationConfigs/" + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id(); DeleteTaskPushNotificationConfigRequest request = DeleteTaskPushNotificationConfigRequest.newBuilder() - .setName(NAME) + .setId(AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()) + .setTaskId(AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()) .build(); StreamRecorder streamRecorder = StreamRecorder.create(); handler.deleteTaskPushNotificationConfig(request, streamRecorder); @@ -737,9 +738,9 @@ public void testDeletePushNotificationConfigNotSupported() throws Exception { public void testDeletePushNotificationConfigNoPushConfigStore() { DefaultRequestHandler requestHandler = DefaultRequestHandler.create(executor, taskStore, queueManager, null, mainEventBusProcessor, internalExecutor, internalExecutor); GrpcHandler handler = new TestGrpcHandler(AbstractA2ARequestHandlerTest.CARD, requestHandler, internalExecutor); - String NAME = "tasks/" + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id() + "/pushNotificationConfigs/" + AbstractA2ARequestHandlerTest.MINIMAL_TASK.id(); DeleteTaskPushNotificationConfigRequest request = DeleteTaskPushNotificationConfigRequest.newBuilder() - .setName(NAME) + .setId(AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()) + .setTaskId(AbstractA2ARequestHandlerTest.MINIMAL_TASK.id()) .build(); StreamRecorder streamRecorder = StreamRecorder.create(); handler.deleteTaskPushNotificationConfig(request, streamRecorder); @@ -754,13 +755,13 @@ public void testOnGetExtendedAgentCard() throws Exception { @Test public void testStreamingDoesNotBlockMainThread() throws Exception { GrpcHandler handler = new TestGrpcHandler(AbstractA2ARequestHandlerTest.CARD, requestHandler, internalExecutor); - + // Track if the main thread gets blocked during streaming AtomicBoolean eventReceived = new AtomicBoolean(false); CountDownLatch streamStarted = new CountDownLatch(1); GrpcHandler.setStreamingSubscribedRunnable(streamStarted::countDown); CountDownLatch eventProcessed = new CountDownLatch(1); - + agentExecutorExecute = (context, eventQueue) -> { // Wait a bit to ensure the main thread continues try { @@ -797,16 +798,16 @@ public void onCompleted() { sendStreamingMessageRequest(handler, streamObserver); // The main thread should not be blocked - we should be able to continue immediately - Assertions.assertTrue(streamStarted.await(100, TimeUnit.MILLISECONDS), - "Streaming subscription should start quickly without blocking main thread"); + Assertions.assertTrue(streamStarted.await(100, TimeUnit.MILLISECONDS), + "Streaming subscription should start quickly without blocking main thread"); // This proves the main thread is not blocked - we can do other work // Simulate main thread doing other work Thread.sleep(50); // Wait for the actual event processing to complete - Assertions.assertTrue(eventProcessed.await(2, TimeUnit.SECONDS), - "Event should be processed within reasonable time"); + Assertions.assertTrue(eventProcessed.await(2, TimeUnit.SECONDS), + "Event should be processed within reasonable time"); // Verify we received the event and no errors occurred Assertions.assertTrue(eventReceived.get(), "Should have received streaming event"); @@ -835,7 +836,6 @@ public void testExtensionSupportRequiredErrorOnSendMessage() throws Exception { .defaultInputModes(List.of("text")) .defaultOutputModes(List.of("text")) .skills(List.of()) - .protocolVersions(AgentCard.CURRENT_PROTOCOL_VERSION) .build(); GrpcHandler handler = new TestGrpcHandler(cardWithExtension, requestHandler, internalExecutor); @@ -871,7 +871,6 @@ public void testExtensionSupportRequiredErrorOnSendStreamingMessage() throws Exc .defaultInputModes(List.of("text")) .defaultOutputModes(List.of("text")) .skills(List.of()) - .protocolVersions(AgentCard.CURRENT_PROTOCOL_VERSION) .build(); GrpcHandler handler = new TestGrpcHandler(cardWithExtension, requestHandler, internalExecutor); @@ -907,7 +906,6 @@ public void testRequiredExtensionProvidedSuccess() throws Exception { .defaultInputModes(List.of("text")) .defaultOutputModes(List.of("text")) .skills(List.of()) - .protocolVersions(AgentCard.CURRENT_PROTOCOL_VERSION) .build(); // Create a TestGrpcHandler that provides the required extension in the context @@ -973,7 +971,7 @@ public ServerCallContext create(StreamObserver streamObserver) { UnauthenticatedUser.INSTANCE, Map.of("grpc_response_observer", streamObserver), new HashSet<>(), - "2.0" // Incompatible version + "2.0" // Incompatible version ); } }; @@ -1018,7 +1016,7 @@ public ServerCallContext create(StreamObserver streamObserver) { UnauthenticatedUser.INSTANCE, Map.of("grpc_response_observer", streamObserver), new HashSet<>(), - "2.0" // Incompatible version + "2.0" // Incompatible version ); } }; @@ -1063,7 +1061,7 @@ public ServerCallContext create(StreamObserver streamObserver) { UnauthenticatedUser.INSTANCE, Map.of("grpc_response_observer", streamObserver), new HashSet<>(), - "1.1" // Compatible version (same major version) + "1.1" // Compatible version (same major version) ); } }; @@ -1114,7 +1112,7 @@ public ServerCallContext create(StreamObserver streamObserver) { UnauthenticatedUser.INSTANCE, Map.of("grpc_response_observer", streamObserver), new HashSet<>(), - null // No version - should default to 1.0 + null // No version - should default to 1.0 ); } }; @@ -1147,20 +1145,16 @@ private StreamRecorder sendMessageRequest(GrpcHandler handl return streamRecorder; } - private StreamRecorder createTaskPushNotificationConfigRequest(GrpcHandler handler, String name) throws Exception { + private StreamRecorder createTaskPushNotificationConfigRequest(GrpcHandler handler, String taskId, String id) throws Exception { taskStore.save(AbstractA2ARequestHandlerTest.MINIMAL_TASK, false); PushNotificationConfig config = PushNotificationConfig.newBuilder() .setUrl("http://example.com") .setId("config456") .build(); - TaskPushNotificationConfig taskPushNotificationConfig = TaskPushNotificationConfig.newBuilder() - .setName(name) - .setPushNotificationConfig(config) - .build(); CreateTaskPushNotificationConfigRequest setRequest = CreateTaskPushNotificationConfigRequest.newBuilder() - .setConfig(taskPushNotificationConfig) + .setConfig(config) .setConfigId("config456") - .setParent("tasks/" + MINIMAL_TASK.id()) + .setTaskId(MINIMAL_TASK.id()) .build(); StreamRecorder streamRecorder = StreamRecorder.create(); @@ -1169,9 +1163,10 @@ private StreamRecorder createTaskPushNotificationCon return streamRecorder; } - private StreamRecorder getTaskPushNotificationConfigRequest(GrpcHandler handler, String name) throws Exception { + private StreamRecorder getTaskPushNotificationConfigRequest(GrpcHandler handler, String taskId, String id) throws Exception { GetTaskPushNotificationConfigRequest request = GetTaskPushNotificationConfigRequest.newBuilder() - .setName(name) + .setTaskId(taskId) + .setId(id) .build(); StreamRecorder streamRecorder = StreamRecorder.create(); handler.getTaskPushNotificationConfig(request, streamRecorder); @@ -1251,6 +1246,7 @@ public void testListTasksEmptyResultIncludesAllFields() throws Exception { } private static class TestGrpcHandler extends GrpcHandler { + private final AgentCard card; private final RequestHandler handler; private final java.util.concurrent.Executor executor; diff --git a/transport/jsonrpc/src/main/java/io/a2a/transport/jsonrpc/handler/JSONRPCHandler.java b/transport/jsonrpc/src/main/java/io/a2a/transport/jsonrpc/handler/JSONRPCHandler.java index a592bd55d..da22cf592 100644 --- a/transport/jsonrpc/src/main/java/io/a2a/transport/jsonrpc/handler/JSONRPCHandler.java +++ b/transport/jsonrpc/src/main/java/io/a2a/transport/jsonrpc/handler/JSONRPCHandler.java @@ -160,7 +160,7 @@ public Flow.Publisher onSubscribeToTask( try { Flow.Publisher publisher = - requestHandler.onResubscribeToTask(request.getParams(), context); + requestHandler.onSubscribeToTask(request.getParams(), context); // We can't use the convertingProcessor convenience method since that propagates any errors as an error handled // via Subscriber.onError() rather than as part of the SendStreamingResponse payload return convertToSendStreamingMessageResponse(request.getId(), publisher); diff --git a/transport/jsonrpc/src/test/java/io/a2a/transport/jsonrpc/handler/JSONRPCHandlerTest.java b/transport/jsonrpc/src/test/java/io/a2a/transport/jsonrpc/handler/JSONRPCHandlerTest.java index 8d2751627..3e925e266 100644 --- a/transport/jsonrpc/src/test/java/io/a2a/transport/jsonrpc/handler/JSONRPCHandlerTest.java +++ b/transport/jsonrpc/src/test/java/io/a2a/transport/jsonrpc/handler/JSONRPCHandlerTest.java @@ -677,7 +677,9 @@ public void testGetPushNotificationConfigSuccess() { handler.setPushNotificationConfig(request, callContext); GetTaskPushNotificationConfigRequest getRequest - = new GetTaskPushNotificationConfigRequest("111", new GetTaskPushNotificationConfigParams(MINIMAL_TASK.id())); + = new GetTaskPushNotificationConfigRequest("111", new GetTaskPushNotificationConfigParams( + MINIMAL_TASK.id(), + "c295ea44-7543-4f78-b524-7a38915ad6e4")); GetTaskPushNotificationConfigResponse getResponse = handler.getPushNotificationConfig(getRequest, callContext); TaskPushNotificationConfig expectedConfig = new TaskPushNotificationConfig(MINIMAL_TASK.id(), @@ -802,7 +804,7 @@ public void onComplete() { } @Test - public void testOnResubscribeExistingTaskSuccess() { + public void testOnSubscribeExistingTaskSuccess() { JSONRPCHandler handler = new JSONRPCHandler(CARD, requestHandler, internalExecutor); taskStore.save(MINIMAL_TASK, false); queueManager.createOrTap(MINIMAL_TASK.id()); @@ -850,7 +852,7 @@ public void onNext(SendStreamingMessageResponse item) { // Per A2A Protocol Spec 3.1.6: ENFORCE that first event is Task if (!receivedInitialTask.get()) { assertTrue(event instanceof Task, - "First event on resubscribe MUST be Task (current state), but was: " + event.getClass().getSimpleName()); + "First event on subscribe MUST be Task (current state), but was: " + event.getClass().getSimpleName()); receivedInitialTask.set(true); } else { // Subsequent events should be the expected type (Message in this case) @@ -882,7 +884,7 @@ public void onComplete() { } @Test - public void testOnResubscribeExistingTaskSuccessMocks() throws Exception { + public void testOnSubscribeExistingTaskSuccessMocks() throws Exception { JSONRPCHandler handler = new JSONRPCHandler(CARD, requestHandler, internalExecutor); taskStore.save(MINIMAL_TASK, false); queueManager.createOrTap(MINIMAL_TASK.id()); @@ -915,7 +917,7 @@ public void testOnResubscribeExistingTaskSuccessMocks() throws Exception { CompletableFuture future = new CompletableFuture<>(); List results = new ArrayList<>(); - // Unlike testOnResubscribeExistingTaskSuccess() the ZeroPublisher.fromIterable() + // Unlike testOnSubscribeExistingTaskSuccess() the ZeroPublisher.fromIterable() // used to mock the events completes once it has sent all the items. So no special thread // handling is needed. response.subscribe(new Flow.Subscriber<>() { @@ -955,7 +957,7 @@ public void onComplete() { } @Test - public void testOnResubscribeNoExistingTaskError() { + public void testOnSubscribeNoExistingTaskError() { JSONRPCHandler handler = new JSONRPCHandler(CARD, requestHandler, internalExecutor); SubscribeToTaskRequest request = new SubscribeToTaskRequest("1", new TaskIdParams(MINIMAL_TASK.id())); @@ -1048,7 +1050,7 @@ public void onComplete() { } @Test - public void testStreamingNotSupportedErrorOnResubscribeToTask() { + public void testStreamingNotSupportedErrorOnSubscribeToTask() { // This test does not exist in the Python implementation AgentCard card = createAgentCard(false, true); JSONRPCHandler handler = new JSONRPCHandler(card, requestHandler, internalExecutor); @@ -1125,7 +1127,8 @@ public void testOnGetPushNotificationNoPushNotifierConfig() { taskStore.save(MINIMAL_TASK, false); GetTaskPushNotificationConfigRequest request - = new GetTaskPushNotificationConfigRequest("id", new GetTaskPushNotificationConfigParams(MINIMAL_TASK.id())); + = new GetTaskPushNotificationConfigRequest("id", new GetTaskPushNotificationConfigParams( + MINIMAL_TASK.id(),"c295ea44-7543-4f78-b524-7a38915ad6e4")); GetTaskPushNotificationConfigResponse response = handler.getPushNotificationConfig(request, callContext); Assertions.assertNotNull(response.getError()); @@ -1612,7 +1615,6 @@ public void testExtensionSupportRequiredErrorOnMessageSend() { .defaultInputModes(List.of("text")) .defaultOutputModes(List.of("text")) .skills(List.of()) - .protocolVersions(AgentCard.CURRENT_PROTOCOL_VERSION) .build(); JSONRPCHandler handler = new JSONRPCHandler(cardWithExtension, requestHandler, internalExecutor); @@ -1651,7 +1653,6 @@ public void testExtensionSupportRequiredErrorOnMessageSendStream() { .defaultInputModes(List.of("text")) .defaultOutputModes(List.of("text")) .skills(List.of()) - .protocolVersions(AgentCard.CURRENT_PROTOCOL_VERSION) .build(); JSONRPCHandler handler = new JSONRPCHandler(cardWithExtension, requestHandler, internalExecutor); @@ -1720,7 +1721,6 @@ public void testRequiredExtensionProvidedSuccess() { .defaultInputModes(List.of("text")) .defaultOutputModes(List.of("text")) .skills(List.of()) - .protocolVersions(AgentCard.CURRENT_PROTOCOL_VERSION) .build(); JSONRPCHandler handler = new JSONRPCHandler(cardWithExtension, requestHandler, internalExecutor); diff --git a/transport/rest/src/main/java/io/a2a/transport/rest/handler/RestHandler.java b/transport/rest/src/main/java/io/a2a/transport/rest/handler/RestHandler.java index f4b594f6b..ada8e8170 100644 --- a/transport/rest/src/main/java/io/a2a/transport/rest/handler/RestHandler.java +++ b/transport/rest/src/main/java/io/a2a/transport/rest/handler/RestHandler.java @@ -184,7 +184,7 @@ public HTTPRestResponse subscribeToTask(String taskId, String tenant, ServerCall return createErrorResponse(new InvalidRequestError("Streaming is not supported by the agent")); } TaskIdParams params = new TaskIdParams(taskId, tenant); - Flow.Publisher publisher = requestHandler.onResubscribeToTask(params, context); + Flow.Publisher publisher = requestHandler.onSubscribeToTask(params, context); return createStreamingResponse(publisher); } catch (A2AError e) { return new HTTPRestStreamingResponse(ZeroPublisher.fromItems(new HTTPRestErrorResponse(e).toJson())); diff --git a/transport/rest/src/test/java/io/a2a/transport/rest/handler/RestHandlerTest.java b/transport/rest/src/test/java/io/a2a/transport/rest/handler/RestHandlerTest.java index 48eaae912..2d1c19b84 100644 --- a/transport/rest/src/test/java/io/a2a/transport/rest/handler/RestHandlerTest.java +++ b/transport/rest/src/test/java/io/a2a/transport/rest/handler/RestHandlerTest.java @@ -1,5 +1,6 @@ package io.a2a.transport.rest.handler; + import java.util.Collections; import java.util.HashSet; import java.util.List; @@ -252,18 +253,15 @@ public void testPushNotificationConfigSuccess() { String requestBody = """ { - "parent": "tasks/%s", + "taskId": "%s", + "configId": "default-config-id", "config": { - "name": "tasks/%s/pushNotificationConfigs/default-config-id", - "pushNotificationConfig": { - "id":"default-config-id", - "url": "https://example.com/callback", - "authentication": { - "schemes": ["jwt"] - } + "url": "https://example.com/callback", + "authentication": { + "scheme": "jwt" } } - }""".formatted(MINIMAL_TASK.id(), MINIMAL_TASK.id()); + }""".formatted(MINIMAL_TASK.id()); RestHandler.HTTPRestResponse response = handler.CreateTaskPushNotificationConfiguration( MINIMAL_TASK.id(), requestBody, "", callContext); @@ -300,18 +298,15 @@ public void testGetPushNotificationConfig() { // First, create a push notification config String createRequestBody = """ { - "parent": "tasks/%s", + "taskId": "%s", + "configId": "default-config-id", "config": { - "name": "tasks/%s/pushNotificationConfigs/default-config-id", - "pushNotificationConfig": { - "id":"default-config-id", - "url": "https://example.com/callback", - "authentication": { - "schemes": ["jwt"] - } + "url": "https://example.com/callback", + "authentication": { + "scheme": "jwt" } } - }""".formatted(MINIMAL_TASK.id(), MINIMAL_TASK.id()); + }""".formatted(MINIMAL_TASK.id()); RestHandler.HTTPRestResponse response = handler.CreateTaskPushNotificationConfiguration(MINIMAL_TASK.id(), createRequestBody, "", callContext); Assertions.assertEquals(201, response.getStatusCode(), response.toString()); Assertions.assertEquals("application/json", response.getContentType()); @@ -458,7 +453,6 @@ public void testExtensionSupportRequiredErrorOnSendMessage() { .defaultInputModes(List.of("text")) .defaultOutputModes(List.of("text")) .skills(List.of()) - .protocolVersions(AgentCard.CURRENT_PROTOCOL_VERSION) .build(); RestHandler handler = new RestHandler(cardWithExtension, requestHandler, internalExecutor); @@ -508,7 +502,6 @@ public void testExtensionSupportRequiredErrorOnSendStreamingMessage() { .defaultInputModes(List.of("text")) .defaultOutputModes(List.of("text")) .skills(List.of()) - .protocolVersions(AgentCard.CURRENT_PROTOCOL_VERSION) .build(); RestHandler handler = new RestHandler(cardWithExtension, requestHandler, internalExecutor); @@ -596,7 +589,6 @@ public void testRequiredExtensionProvidedSuccess() { .defaultInputModes(List.of("text")) .defaultOutputModes(List.of("text")) .skills(List.of()) - .protocolVersions(AgentCard.CURRENT_PROTOCOL_VERSION) .build(); RestHandler handler = new RestHandler(cardWithExtension, requestHandler, internalExecutor);