From 4b759c083bb4ce1de8a75d3831b3beab2176fa56 Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Thu, 18 Jun 2026 05:57:05 +0000 Subject: [PATCH 1/2] chore: update googleapis commitish to db88feb --- generation_config.yaml | 2 +- librarian.yaml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/generation_config.yaml b/generation_config.yaml index e5add8939823..0436082edd91 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,4 +1,4 @@ -googleapis_commitish: 7af3f2c7b8927cffb548fd2cf09b04c6371437ee +googleapis_commitish: db88feb4756963c6aa9b5996a880cfe5572d0320 libraries_bom_version: 26.83.0 is_monorepo: true libraries: diff --git a/librarian.yaml b/librarian.yaml index 387b65ef2ee4..312941d40bcf 100644 --- a/librarian.yaml +++ b/librarian.yaml @@ -16,8 +16,8 @@ version: v0.21.1-0.20260617000028-820646f3db93 repo: googleapis/google-cloud-java sources: googleapis: - commit: 7af3f2c7b8927cffb548fd2cf09b04c6371437ee - sha256: fb354b89774f4599bb3559d190fe54e51da76c6339c062900355c874b9defac5 + commit: db88feb4756963c6aa9b5996a880cfe5572d0320 + sha256: ba3f018c32dae09803b3c8759ef79c59fc9cc1200d097026ac52a1490bec3b3e showcase: commit: 328bec7ce4c1fb77c37fdf1868d0506bc02a70fc sha256: 8df187486e37edf5a78c1646c859c311bc452871b9ba4641d93149d3c53450a2 @@ -1848,6 +1848,7 @@ libraries: keep: - src/main/java/io/grafeas/v1/stub/Version.java java: + alternate_headers: license-header.txt api_description_override: n/a artifact_id: grafeas client_documentation_override: https://cloud.google.com/java/docs/reference/grafeas/latest/overview @@ -1856,7 +1857,6 @@ libraries: name_pretty_override: Grafeas product_documentation_override: https://grafeas.io skip_pom_updates: true - alternate_headers: license-header.txt - name: gsuite-addons version: 2.94.0-SNAPSHOT apis: From 35285a3c2a80e89f1086ecb768845cfe322ec480 Mon Sep 17 00:00:00 2001 From: cloud-java-bot Date: Thu, 18 Jun 2026 05:57:07 +0000 Subject: [PATCH 2/2] chore: generate libraries --- .../google/chat/v1/CreateMessageRequest.java | 14 +- .../v1/CreateMessageRequestOrBuilder.java | 4 +- .../java/com/google/chat/v1/MessageProto.java | 42 +- .../google/chat/v1/QuotedMessageMetadata.java | 47 +- .../main/proto/google/chat/v1/message.proto | 15 +- .../v1/ReferenceListServiceClient.java | 78 + .../v1/ReferenceListServiceSettings.java | 12 + .../v1/RuleExecutionErrorServiceClient.java | 498 +++++ .../v1/RuleExecutionErrorServiceSettings.java | 230 +++ .../cloud/chronicle/v1/RuleServiceClient.java | 143 ++ .../chronicle/v1/RuleServiceSettings.java | 11 + .../cloud/chronicle/v1/gapic_metadata.json | 18 + .../cloud/chronicle/v1/package-info.java | 23 + .../v1/stub/GrpcReferenceListServiceStub.java | 40 + ...eExecutionErrorServiceCallableFactory.java | 113 ++ .../GrpcRuleExecutionErrorServiceStub.java | 190 ++ .../v1/stub/GrpcRuleServiceStub.java | 35 + .../HttpJsonReferenceListServiceStub.java | 68 + ...eExecutionErrorServiceCallableFactory.java | 101 + ...HttpJsonRuleExecutionErrorServiceStub.java | 228 +++ .../v1/stub/HttpJsonRuleServiceStub.java | 62 + .../v1/stub/ReferenceListServiceStub.java | 7 + .../ReferenceListServiceStubSettings.java | 38 +- .../stub/RuleExecutionErrorServiceStub.java | 49 + ...RuleExecutionErrorServiceStubSettings.java | 457 +++++ .../chronicle/v1/stub/RuleServiceStub.java | 6 + .../v1/stub/RuleServiceStubSettings.java | 33 +- .../reflect-config.json | 144 ++ .../v1/MockReferenceListServiceImpl.java | 22 + .../v1/MockRuleExecutionErrorService.java | 59 + .../v1/MockRuleExecutionErrorServiceImpl.java | 83 + .../chronicle/v1/MockRuleServiceImpl.java | 21 + ...eferenceListServiceClientHttpJsonTest.java | 55 + .../v1/ReferenceListServiceClientTest.java | 51 + ...ecutionErrorServiceClientHttpJsonTest.java | 177 ++ .../RuleExecutionErrorServiceClientTest.java | 171 ++ .../v1/RuleServiceClientHttpJsonTest.java | 94 + .../chronicle/v1/RuleServiceClientTest.java | 84 + .../v1/ReferenceListServiceGrpc.java | 139 ++ .../v1/RuleExecutionErrorServiceGrpc.java | 445 ++++ .../cloud/chronicle/v1/RuleServiceGrpc.java | 149 +- .../v1/ListRuleExecutionErrorsRequest.java | 1277 ++++++++++++ ...stRuleExecutionErrorsRequestOrBuilder.java | 176 ++ .../v1/ListRuleExecutionErrorsResponse.java | 1158 +++++++++++ ...tRuleExecutionErrorsResponseOrBuilder.java | 113 ++ .../chronicle/v1/ReferenceListError.java | 697 +++++++ .../v1/ReferenceListErrorOrBuilder.java | 68 + .../chronicle/v1/ReferenceListProto.java | 227 ++- .../chronicle/v1/RuleExecutionError.java | 1803 +++++++++++++++++ .../chronicle/v1/RuleExecutionErrorName.java | 269 +++ .../v1/RuleExecutionErrorOrBuilder.java | 233 +++ .../chronicle/v1/RuleExecutionErrorProto.java | 166 ++ .../google/cloud/chronicle/v1/RuleProto.java | 190 +- .../v1/VerifyReferenceListRequest.java | 1392 +++++++++++++ .../VerifyReferenceListRequestOrBuilder.java | 163 ++ .../v1/VerifyReferenceListResponse.java | 1023 ++++++++++ .../VerifyReferenceListResponseOrBuilder.java | 97 + .../chronicle/v1/VerifyRuleTextRequest.java | 813 ++++++++ .../v1/VerifyRuleTextRequestOrBuilder.java | 88 + .../chronicle/v1/VerifyRuleTextResponse.java | 1088 ++++++++++ .../v1/VerifyRuleTextResponseOrBuilder.java | 109 + .../cloud/chronicle/v1/reference_list.proto | 54 +- .../google/cloud/chronicle/v1/rule.proto | 39 +- .../chronicle/v1/rule_execution_error.proto | 156 ++ .../AsyncVerifyReferenceList.java | 56 + .../SyncVerifyReferenceList.java | 53 + .../SyncCreateSetCredentialsProvider.java | 45 + .../create/SyncCreateSetEndpoint.java | 42 + .../SyncCreateUseHttpJsonTransport.java | 41 + .../AsyncListRuleExecutionErrors.java | 58 + .../AsyncListRuleExecutionErrorsPaged.java | 64 + .../SyncListRuleExecutionErrors.java | 53 + ...ncListRuleExecutionErrorsInstancename.java | 46 + .../SyncListRuleExecutionErrorsString.java | 46 + .../SyncListRuleExecutionErrors.java | 57 + .../verifyruletext/AsyncVerifyRuleText.java | 51 + .../verifyruletext/SyncVerifyRuleText.java | 47 + .../SyncVerifyRuleTextInstancenameString.java | 43 + .../SyncVerifyRuleTextStringString.java | 43 + .../SyncListRuleExecutionErrors.java | 57 + .../networkservices/v1/AgentGateway.java | 26 +- .../v1/AgentGatewayOrBuilder.java | 8 +- .../networkservices/v1/agent_gateway.proto | 2 +- 83 files changed, 16249 insertions(+), 244 deletions(-) create mode 100644 java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/RuleExecutionErrorServiceClient.java create mode 100644 java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/RuleExecutionErrorServiceSettings.java create mode 100644 java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/GrpcRuleExecutionErrorServiceCallableFactory.java create mode 100644 java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/GrpcRuleExecutionErrorServiceStub.java create mode 100644 java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/HttpJsonRuleExecutionErrorServiceCallableFactory.java create mode 100644 java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/HttpJsonRuleExecutionErrorServiceStub.java create mode 100644 java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/RuleExecutionErrorServiceStub.java create mode 100644 java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/RuleExecutionErrorServiceStubSettings.java create mode 100644 java-chronicle/google-cloud-chronicle/src/test/java/com/google/cloud/chronicle/v1/MockRuleExecutionErrorService.java create mode 100644 java-chronicle/google-cloud-chronicle/src/test/java/com/google/cloud/chronicle/v1/MockRuleExecutionErrorServiceImpl.java create mode 100644 java-chronicle/google-cloud-chronicle/src/test/java/com/google/cloud/chronicle/v1/RuleExecutionErrorServiceClientHttpJsonTest.java create mode 100644 java-chronicle/google-cloud-chronicle/src/test/java/com/google/cloud/chronicle/v1/RuleExecutionErrorServiceClientTest.java create mode 100644 java-chronicle/grpc-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/RuleExecutionErrorServiceGrpc.java create mode 100644 java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/ListRuleExecutionErrorsRequest.java create mode 100644 java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/ListRuleExecutionErrorsRequestOrBuilder.java create mode 100644 java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/ListRuleExecutionErrorsResponse.java create mode 100644 java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/ListRuleExecutionErrorsResponseOrBuilder.java create mode 100644 java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/ReferenceListError.java create mode 100644 java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/ReferenceListErrorOrBuilder.java create mode 100644 java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/RuleExecutionError.java create mode 100644 java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/RuleExecutionErrorName.java create mode 100644 java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/RuleExecutionErrorOrBuilder.java create mode 100644 java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/RuleExecutionErrorProto.java create mode 100644 java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/VerifyReferenceListRequest.java create mode 100644 java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/VerifyReferenceListRequestOrBuilder.java create mode 100644 java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/VerifyReferenceListResponse.java create mode 100644 java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/VerifyReferenceListResponseOrBuilder.java create mode 100644 java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/VerifyRuleTextRequest.java create mode 100644 java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/VerifyRuleTextRequestOrBuilder.java create mode 100644 java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/VerifyRuleTextResponse.java create mode 100644 java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/VerifyRuleTextResponseOrBuilder.java create mode 100644 java-chronicle/proto-google-cloud-chronicle-v1/src/main/proto/google/cloud/chronicle/v1/rule_execution_error.proto create mode 100644 java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/referencelistservice/verifyreferencelist/AsyncVerifyReferenceList.java create mode 100644 java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/referencelistservice/verifyreferencelist/SyncVerifyReferenceList.java create mode 100644 java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleexecutionerrorservice/create/SyncCreateSetCredentialsProvider.java create mode 100644 java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleexecutionerrorservice/create/SyncCreateSetEndpoint.java create mode 100644 java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleexecutionerrorservice/create/SyncCreateUseHttpJsonTransport.java create mode 100644 java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleexecutionerrorservice/listruleexecutionerrors/AsyncListRuleExecutionErrors.java create mode 100644 java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleexecutionerrorservice/listruleexecutionerrors/AsyncListRuleExecutionErrorsPaged.java create mode 100644 java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleexecutionerrorservice/listruleexecutionerrors/SyncListRuleExecutionErrors.java create mode 100644 java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleexecutionerrorservice/listruleexecutionerrors/SyncListRuleExecutionErrorsInstancename.java create mode 100644 java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleexecutionerrorservice/listruleexecutionerrors/SyncListRuleExecutionErrorsString.java create mode 100644 java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleexecutionerrorservicesettings/listruleexecutionerrors/SyncListRuleExecutionErrors.java create mode 100644 java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleservice/verifyruletext/AsyncVerifyRuleText.java create mode 100644 java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleservice/verifyruletext/SyncVerifyRuleText.java create mode 100644 java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleservice/verifyruletext/SyncVerifyRuleTextInstancenameString.java create mode 100644 java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleservice/verifyruletext/SyncVerifyRuleTextStringString.java create mode 100644 java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/stub/ruleexecutionerrorservicestubsettings/listruleexecutionerrors/SyncListRuleExecutionErrors.java diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateMessageRequest.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateMessageRequest.java index 02453f332248..1c2296ab5e68 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateMessageRequest.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateMessageRequest.java @@ -398,7 +398,7 @@ public com.google.chat.v1.MessageOrBuilder getMessageOrBuilder() { * * * @deprecated google.chat.v1.CreateMessageRequest.thread_key is deprecated. See - * google/chat/v1/message.proto;l=617 + * google/chat/v1/message.proto;l=618 * @return The threadKey. */ @java.lang.Override @@ -432,7 +432,7 @@ public java.lang.String getThreadKey() { * * * @deprecated google.chat.v1.CreateMessageRequest.thread_key is deprecated. See - * google/chat/v1/message.proto;l=617 + * google/chat/v1/message.proto;l=618 * @return The bytes for threadKey. */ @java.lang.Override @@ -1543,7 +1543,7 @@ public com.google.chat.v1.MessageOrBuilder getMessageOrBuilder() { * * * @deprecated google.chat.v1.CreateMessageRequest.thread_key is deprecated. See - * google/chat/v1/message.proto;l=617 + * google/chat/v1/message.proto;l=618 * @return The threadKey. */ @java.lang.Deprecated @@ -1576,7 +1576,7 @@ public java.lang.String getThreadKey() { * * * @deprecated google.chat.v1.CreateMessageRequest.thread_key is deprecated. See - * google/chat/v1/message.proto;l=617 + * google/chat/v1/message.proto;l=618 * @return The bytes for threadKey. */ @java.lang.Deprecated @@ -1609,7 +1609,7 @@ public com.google.protobuf.ByteString getThreadKeyBytes() { * * * @deprecated google.chat.v1.CreateMessageRequest.thread_key is deprecated. See - * google/chat/v1/message.proto;l=617 + * google/chat/v1/message.proto;l=618 * @param value The threadKey to set. * @return This builder for chaining. */ @@ -1641,7 +1641,7 @@ public Builder setThreadKey(java.lang.String value) { * * * @deprecated google.chat.v1.CreateMessageRequest.thread_key is deprecated. See - * google/chat/v1/message.proto;l=617 + * google/chat/v1/message.proto;l=618 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1669,7 +1669,7 @@ public Builder clearThreadKey() { * * * @deprecated google.chat.v1.CreateMessageRequest.thread_key is deprecated. See - * google/chat/v1/message.proto;l=617 + * google/chat/v1/message.proto;l=618 * @param value The bytes for threadKey to set. * @return This builder for chaining. */ diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateMessageRequestOrBuilder.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateMessageRequestOrBuilder.java index c55c22a111de..9c7ff66eb7e2 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateMessageRequestOrBuilder.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/CreateMessageRequestOrBuilder.java @@ -114,7 +114,7 @@ public interface CreateMessageRequestOrBuilder * * * @deprecated google.chat.v1.CreateMessageRequest.thread_key is deprecated. See - * google/chat/v1/message.proto;l=617 + * google/chat/v1/message.proto;l=618 * @return The threadKey. */ @java.lang.Deprecated @@ -137,7 +137,7 @@ public interface CreateMessageRequestOrBuilder * * * @deprecated google.chat.v1.CreateMessageRequest.thread_key is deprecated. See - * google/chat/v1/message.proto;l=617 + * google/chat/v1/message.proto;l=618 * @return The bytes for threadKey. */ @java.lang.Deprecated diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MessageProto.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MessageProto.java index 420790588d9d..56550ff3f86f 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MessageProto.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/MessageProto.java @@ -186,7 +186,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + " \003(\0132\037.google.chat.v1.AccessoryWidgetB\003\340A\001:C\352A@\n" + "\033chat.googleapis.com/Message\022!spaces/{space}/messages/{message}\"\037\n" + "\013AttachedGif\022\020\n" - + "\003uri\030\001 \001(\tB\003\340A\003\"\230\004\n" + + "\003uri\030\001 \001(\tB\003\340A\003\"\245\004\n" + "\025QuotedMessageMetadata\0221\n" + "\004name\030\001 \001(\tB#\340A\002\372A\035\n" + "\033chat.googleapis.com/Message\0229\n" @@ -197,12 +197,13 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\027quoted_message_snapshot\030\005" + " \001(\0132%.google.chat.v1.QuotedMessageSnapshotB\003\340A\003\022B\n" + "\022forwarded_metadata\030\006 \001(\0132!" - + ".google.chat.v1.ForwardedMetadataB\003\340A\003\"2\n" + + ".google.chat.v1.ForwardedMetadataB\003\340A\003\"?\n" + "\tQuoteType\022\032\n" + "\026QUOTE_TYPE_UNSPECIFIED\020\000\022\t\n" - + "\005REPLY\020\001:\201\001\352A~\n" - + ")chat.googleapis.com/QuotedMessageMetadata\022Qspaces/{space}/mess" - + "ages/{message}/quotedMessageMetadata/{quoted_message_metadata}\"\310\001\n" + + "\005REPLY\020\001\022\013\n" + + "\007FORWARD\020\002:\201\001\352A~\n" + + ")chat.googleapis.com/QuotedMessageMetadata\022Qspaces" + + "/{space}/messages/{message}/quotedMessageMetadata/{quoted_message_metadata}\"\310\001\n" + "\025QuotedMessageSnapshot\022\023\n" + "\006sender\030\001 \001(\tB\003\340A\003\022\021\n" + "\004text\030\002 \001(\tB\003\340A\003\022\033\n" @@ -218,15 +219,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "thread_key\030\003 \001(\tB\003\340A\001:@\352A=\n" + "\032chat.googleapis.com/Thread\022\037spaces/{space}/threads/{thread}\"\322\004\n" + "\016ActionResponse\022>\n" - + "\004type\030\001 \001" - + "(\0162+.google.chat.v1.ActionResponse.ResponseTypeB\003\340A\004\022\020\n" + + "\004type\030\001" + + " \001(\0162+.google.chat.v1.ActionResponse.ResponseTypeB\003\340A\004\022\020\n" + "\003url\030\002 \001(\tB\003\340A\004\0228\n\r" + "dialog_action\030\003 \001(\0132\034.google.chat.v1.DialogActionB\003\340A\004\022I\n" - + "\016updated_widget\030\004 \001(\0132,.googl" - + "e.chat.v1.ActionResponse.UpdatedWidgetB\003\340A\004\032R\n" + + "\016updated_widget\030\004" + + " \001(\0132,.google.chat.v1.ActionResponse.UpdatedWidgetB\003\340A\004\032R\n" + "\016SelectionItems\022@\n" - + "\005items\030\001 \003(\01321.g" - + "oogle.apps.card.v1.SelectionInput.SelectionItem\032w\n\r" + + "\005items\030\001" + + " \003(\01321.google.apps.card.v1.SelectionInput.SelectionItem\032w\n\r" + "UpdatedWidget\022D\n" + "\013suggestions\030\001" + " \001(\0132-.google.chat.v1.ActionResponse.SelectionItemsH\000\022\016\n" @@ -253,7 +254,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\024UpdateMessageRequest\022-\n" + "\007message\030\001 \001(\0132\027.google.chat.v1.MessageB\003\340A\002\0224\n" + "\013update_mask\030\002" - + " \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\022\032\n\r" + + " \001(\0132\032.google.protobuf.FieldMaskB\003\340A\002\022\032\n" + + "\r" + "allow_missing\030\004 \001(\010B\003\340A\001\"\210\004\n" + "\024CreateMessageRequest\0223\n" + "\006parent\030\001 \001(" @@ -261,8 +263,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\007message\030\004 \001(\0132\027.google.chat.v1.MessageB\003\340A\002\022\031\n\n" + "thread_key\030\006 \001(\tB\005\030\001\340A\001\022\027\n\n" + "request_id\030\007 \001(\tB\003\340A\001\022Z\n" - + "\024message_reply_option\030\010 \001(\01627.google.chat.v1.Cre" - + "ateMessageRequest.MessageReplyOptionB\003\340A\001\022\027\n\n" + + "\024message_reply_option\030\010 \001(\01627.googl" + + "e.chat.v1.CreateMessageRequest.MessageReplyOptionB\003\340A\001\022\027\n\n" + "message_id\030\t \001(\tB\003\340A\001\022b\n" + "#create_message_notification_options\030\n" + " \001(\01320.google.chat.v1.CreateMessageNotificationOptionsB\003\340A\001\"\177\n" @@ -271,8 +273,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "$REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD\020\001\022\031\n" + "\025REPLY_MESSAGE_OR_FAIL\020\002\"\362\001\n" + " CreateMessageNotificationOptions\022\\\n" - + "\021notification_type\030\001 \001(\0162" - + "A.google.chat.v1.CreateMessageNotificationOptions.NotificationType\"p\n" + + "\021notification_type\030\001 \001(\0162A.google.chat.v1.CreateMess" + + "ageNotificationOptions.NotificationType\"p\n" + "\020NotificationType\022\032\n" + "\026NOTIFICATION_TYPE_NONE\020\000\022\"\n" + "\036NOTIFICATION_TYPE_FORCE_NOTIFY\020\002\022\034\n" @@ -297,10 +299,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "CardWithId\022\017\n" + "\007card_id\030\001 \001(\t\022\'\n" + "\004card\030\002 \001(\0132\031.google.apps.card.v1.CardB\245\001\n" - + "\022com.google.chat.v1B\014MessageProtoP\001Z,cloud.google.com/go/chat/apiv1" - + "/chatpb;chatpb\242\002\013DYNAPIProto\252\002\023Google.Ap" - + "ps.Chat.V1\312\002\023Google\\Apps\\Chat\\V1\352\002\026Googl" - + "e::Apps::Chat::V1b\006proto3" + + "\022com.google.chat.v1B\014MessageProtoP\001Z,cloud.google.com/" + + "go/chat/apiv1/chatpb;chatpb\242\002\013DYNAPIProt" + + "o\252\002\023Google.Apps.Chat.V1\312\002\023Google\\Apps\\Ch" + + "at\\V1\352\002\026Google::Apps::Chat::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/QuotedMessageMetadata.java b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/QuotedMessageMetadata.java index 9377b036a1bc..245b7d32f8de 100644 --- a/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/QuotedMessageMetadata.java +++ b/java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/QuotedMessageMetadata.java @@ -26,10 +26,6 @@ *
  * Information about a message that another message quotes.
  *
- * When you create a message, you can quote messages within the same
- * thread, or quote a root message to create a new root message.
- * However, you can't quote a message reply from a different thread.
- *
  * When you update a message, you can't add or replace the
  * `quotedMessageMetadata` field, but you can remove it.
  *
@@ -105,20 +101,32 @@ public enum QuoteType implements com.google.protobuf.ProtocolMessageEnum {
      *
      *
      * 
-     * If quote_type is `REPLY`, you can do the following:
+     * When `quote_type` is `REPLY`, you can do the following:
      *
      * * If you're replying in a thread, you can quote another message in that
      * thread.
      *
      * * If you're creating a root message, you can quote another root message
      * in that space.
-     *
-     * You can't quote a message reply from a different thread.
      * 
* * REPLY = 1; */ REPLY(1), + /** + * + * + *
+     * When `quote_type` is `FORWARD`, you can quote a:
+     *
+     * * Message from a different space.
+     *
+     * * Message reply from a different thread in the same space.
+     * 
+ * + * FORWARD = 2; + */ + FORWARD(2), UNRECOGNIZED(-1), ; @@ -147,21 +155,34 @@ public enum QuoteType implements com.google.protobuf.ProtocolMessageEnum { * * *
-     * If quote_type is `REPLY`, you can do the following:
+     * When `quote_type` is `REPLY`, you can do the following:
      *
      * * If you're replying in a thread, you can quote another message in that
      * thread.
      *
      * * If you're creating a root message, you can quote another root message
      * in that space.
-     *
-     * You can't quote a message reply from a different thread.
      * 
* * REPLY = 1; */ public static final int REPLY_VALUE = 1; + /** + * + * + *
+     * When `quote_type` is `FORWARD`, you can quote a:
+     *
+     * * Message from a different space.
+     *
+     * * Message reply from a different thread in the same space.
+     * 
+ * + * FORWARD = 2; + */ + public static final int FORWARD_VALUE = 2; + public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( @@ -190,6 +211,8 @@ public static QuoteType forNumber(int value) { return QUOTE_TYPE_UNSPECIFIED; case 1: return REPLY; + case 2: + return FORWARD; default: return null; } @@ -770,10 +793,6 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.Builder *
    * Information about a message that another message quotes.
    *
-   * When you create a message, you can quote messages within the same
-   * thread, or quote a root message to create a new root message.
-   * However, you can't quote a message reply from a different thread.
-   *
    * When you update a message, you can't add or replace the
    * `quotedMessageMetadata` field, but you can remove it.
    *
diff --git a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/message.proto b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/message.proto
index 52a4d6f711a6..ed78f5e50c99 100644
--- a/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/message.proto
+++ b/java-chat/proto-google-cloud-chat-v1/src/main/proto/google/chat/v1/message.proto
@@ -281,10 +281,6 @@ message AttachedGif {
 
 // Information about a message that another message quotes.
 //
-// When you create a message, you can quote messages within the same
-// thread, or quote a root message to create a new root message.
-// However, you can't quote a message reply from a different thread.
-//
 // When you update a message, you can't add or replace the
 // `quotedMessageMetadata` field, but you can remove it.
 //
@@ -301,16 +297,21 @@ message QuotedMessageMetadata {
     // Reserved. This value is unused.
     QUOTE_TYPE_UNSPECIFIED = 0;
 
-    // If quote_type is `REPLY`, you can do the following:
+    // When `quote_type` is `REPLY`, you can do the following:
     //
     // * If you're replying in a thread, you can quote another message in that
     // thread.
     //
     // * If you're creating a root message, you can quote another root message
     // in that space.
-    //
-    // You can't quote a message reply from a different thread.
     REPLY = 1;
+
+    // When `quote_type` is `FORWARD`, you can quote a:
+    //
+    // * Message from a different space.
+    //
+    // * Message reply from a different thread in the same space.
+    FORWARD = 2;
   }
 
   // Required. Resource name of the message that is quoted.
diff --git a/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/ReferenceListServiceClient.java b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/ReferenceListServiceClient.java
index 44958a7c197f..a85a0bb8a1e5 100644
--- a/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/ReferenceListServiceClient.java
+++ b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/ReferenceListServiceClient.java
@@ -141,6 +141,20 @@
  *      
  *       
  *    
+ *    
+ *      

VerifyReferenceList + *

VerifyReferenceList validates list content and returns line errors, if any. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • verifyReferenceList(VerifyReferenceListRequest request) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • verifyReferenceListCallable() + *

+ * + * * * *

See the individual methods for example code. @@ -800,6 +814,70 @@ public final ReferenceList updateReferenceList(UpdateReferenceListRequest reques return stub.updateReferenceListCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * VerifyReferenceList validates list content and returns line errors, if any. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ReferenceListServiceClient referenceListServiceClient =
+   *     ReferenceListServiceClient.create()) {
+   *   VerifyReferenceListRequest request =
+   *       VerifyReferenceListRequest.newBuilder()
+   *           .setInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .setSyntaxType(ReferenceListSyntaxType.forNumber(0))
+   *           .addAllEntries(new ArrayList())
+   *           .build();
+   *   VerifyReferenceListResponse response =
+   *       referenceListServiceClient.verifyReferenceList(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final VerifyReferenceListResponse verifyReferenceList(VerifyReferenceListRequest request) { + return verifyReferenceListCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * VerifyReferenceList validates list content and returns line errors, if any. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ReferenceListServiceClient referenceListServiceClient =
+   *     ReferenceListServiceClient.create()) {
+   *   VerifyReferenceListRequest request =
+   *       VerifyReferenceListRequest.newBuilder()
+   *           .setInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .setSyntaxType(ReferenceListSyntaxType.forNumber(0))
+   *           .addAllEntries(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       referenceListServiceClient.verifyReferenceListCallable().futureCall(request);
+   *   // Do something.
+   *   VerifyReferenceListResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + verifyReferenceListCallable() { + return stub.verifyReferenceListCallable(); + } + @Override public final void close() { stub.close(); diff --git a/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/ReferenceListServiceSettings.java b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/ReferenceListServiceSettings.java index 7724d72087d5..900ef1b297ed 100644 --- a/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/ReferenceListServiceSettings.java +++ b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/ReferenceListServiceSettings.java @@ -113,6 +113,12 @@ public UnaryCallSettings getReferenceLis return ((ReferenceListServiceStubSettings) getStubSettings()).updateReferenceListSettings(); } + /** Returns the object with the settings used for calls to verifyReferenceList. */ + public UnaryCallSettings + verifyReferenceListSettings() { + return ((ReferenceListServiceStubSettings) getStubSettings()).verifyReferenceListSettings(); + } + public static final ReferenceListServiceSettings create(ReferenceListServiceStubSettings stub) throws IOException { return new ReferenceListServiceSettings.Builder(stub.toBuilder()).build(); @@ -251,6 +257,12 @@ public Builder applyToAllUnaryMethods( return getStubSettingsBuilder().updateReferenceListSettings(); } + /** Returns the builder for the settings used for calls to verifyReferenceList. */ + public UnaryCallSettings.Builder + verifyReferenceListSettings() { + return getStubSettingsBuilder().verifyReferenceListSettings(); + } + @Override public ReferenceListServiceSettings build() throws IOException { return new ReferenceListServiceSettings(this); diff --git a/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/RuleExecutionErrorServiceClient.java b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/RuleExecutionErrorServiceClient.java new file mode 100644 index 000000000000..5caed1c3ede5 --- /dev/null +++ b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/RuleExecutionErrorServiceClient.java @@ -0,0 +1,498 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.chronicle.v1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.chronicle.v1.stub.RuleExecutionErrorServiceStub; +import com.google.cloud.chronicle.v1.stub.RuleExecutionErrorServiceStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: RuleExecutionErrorService contains endpoints related to rule execution + * errors. + * + *

This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RuleExecutionErrorServiceClient ruleExecutionErrorServiceClient =
+ *     RuleExecutionErrorServiceClient.create()) {
+ *   InstanceName parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
+ *   for (RuleExecutionError element :
+ *       ruleExecutionErrorServiceClient.listRuleExecutionErrors(parent).iterateAll()) {
+ *     // doThingsWith(element);
+ *   }
+ * }
+ * }
+ * + *

Note: close() needs to be called on the RuleExecutionErrorServiceClient object to clean up + * resources such as threads. In the example above, try-with-resources is used, which automatically + * calls close(). + * + * + * + * + * + * + * + * + * + * + * + * + * + *
Methods
MethodDescriptionMethod Variants

ListRuleExecutionErrors

Lists rule execution errors.

+ *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • listRuleExecutionErrors(ListRuleExecutionErrorsRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • listRuleExecutionErrors(InstanceName parent) + *

  • listRuleExecutionErrors(String parent) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • listRuleExecutionErrorsPagedCallable() + *

  • listRuleExecutionErrorsCallable() + *

+ *
+ * + *

See the individual methods for example code. + * + *

Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *

This class can be customized by passing in a custom instance of + * RuleExecutionErrorServiceSettings to create(). For example: + * + *

To customize credentials: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * RuleExecutionErrorServiceSettings ruleExecutionErrorServiceSettings =
+ *     RuleExecutionErrorServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * RuleExecutionErrorServiceClient ruleExecutionErrorServiceClient =
+ *     RuleExecutionErrorServiceClient.create(ruleExecutionErrorServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * RuleExecutionErrorServiceSettings ruleExecutionErrorServiceSettings =
+ *     RuleExecutionErrorServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * RuleExecutionErrorServiceClient ruleExecutionErrorServiceClient =
+ *     RuleExecutionErrorServiceClient.create(ruleExecutionErrorServiceSettings);
+ * }
+ * + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * RuleExecutionErrorServiceSettings ruleExecutionErrorServiceSettings =
+ *     RuleExecutionErrorServiceSettings.newHttpJsonBuilder().build();
+ * RuleExecutionErrorServiceClient ruleExecutionErrorServiceClient =
+ *     RuleExecutionErrorServiceClient.create(ruleExecutionErrorServiceSettings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class RuleExecutionErrorServiceClient implements BackgroundResource { + private final RuleExecutionErrorServiceSettings settings; + private final RuleExecutionErrorServiceStub stub; + + /** Constructs an instance of RuleExecutionErrorServiceClient with default settings. */ + public static final RuleExecutionErrorServiceClient create() throws IOException { + return create(RuleExecutionErrorServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of RuleExecutionErrorServiceClient, using the given settings. The + * channels are created based on the settings passed in, or defaults for any settings that are not + * set. + */ + public static final RuleExecutionErrorServiceClient create( + RuleExecutionErrorServiceSettings settings) throws IOException { + return new RuleExecutionErrorServiceClient(settings); + } + + /** + * Constructs an instance of RuleExecutionErrorServiceClient, using the given stub for making + * calls. This is for advanced usage - prefer using create(RuleExecutionErrorServiceSettings). + */ + public static final RuleExecutionErrorServiceClient create(RuleExecutionErrorServiceStub stub) { + return new RuleExecutionErrorServiceClient(stub); + } + + /** + * Constructs an instance of RuleExecutionErrorServiceClient, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected RuleExecutionErrorServiceClient(RuleExecutionErrorServiceSettings settings) + throws IOException { + this.settings = settings; + this.stub = ((RuleExecutionErrorServiceStubSettings) settings.getStubSettings()).createStub(); + } + + protected RuleExecutionErrorServiceClient(RuleExecutionErrorServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final RuleExecutionErrorServiceSettings getSettings() { + return settings; + } + + public RuleExecutionErrorServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists rule execution errors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (RuleExecutionErrorServiceClient ruleExecutionErrorServiceClient =
+   *     RuleExecutionErrorServiceClient.create()) {
+   *   InstanceName parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
+   *   for (RuleExecutionError element :
+   *       ruleExecutionErrorServiceClient.listRuleExecutionErrors(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The instance to list rule execution errors from. Format: + * projects/{project}/locations/{location}/instances/{instance} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRuleExecutionErrorsPagedResponse listRuleExecutionErrors(InstanceName parent) { + ListRuleExecutionErrorsRequest request = + ListRuleExecutionErrorsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listRuleExecutionErrors(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists rule execution errors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (RuleExecutionErrorServiceClient ruleExecutionErrorServiceClient =
+   *     RuleExecutionErrorServiceClient.create()) {
+   *   String parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
+   *   for (RuleExecutionError element :
+   *       ruleExecutionErrorServiceClient.listRuleExecutionErrors(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The instance to list rule execution errors from. Format: + * projects/{project}/locations/{location}/instances/{instance} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRuleExecutionErrorsPagedResponse listRuleExecutionErrors(String parent) { + ListRuleExecutionErrorsRequest request = + ListRuleExecutionErrorsRequest.newBuilder().setParent(parent).build(); + return listRuleExecutionErrors(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists rule execution errors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (RuleExecutionErrorServiceClient ruleExecutionErrorServiceClient =
+   *     RuleExecutionErrorServiceClient.create()) {
+   *   ListRuleExecutionErrorsRequest request =
+   *       ListRuleExecutionErrorsRequest.newBuilder()
+   *           .setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   for (RuleExecutionError element :
+   *       ruleExecutionErrorServiceClient.listRuleExecutionErrors(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListRuleExecutionErrorsPagedResponse listRuleExecutionErrors( + ListRuleExecutionErrorsRequest request) { + return listRuleExecutionErrorsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists rule execution errors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (RuleExecutionErrorServiceClient ruleExecutionErrorServiceClient =
+   *     RuleExecutionErrorServiceClient.create()) {
+   *   ListRuleExecutionErrorsRequest request =
+   *       ListRuleExecutionErrorsRequest.newBuilder()
+   *           .setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   ApiFuture future =
+   *       ruleExecutionErrorServiceClient
+   *           .listRuleExecutionErrorsPagedCallable()
+   *           .futureCall(request);
+   *   // Do something.
+   *   for (RuleExecutionError element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listRuleExecutionErrorsPagedCallable() { + return stub.listRuleExecutionErrorsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists rule execution errors. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (RuleExecutionErrorServiceClient ruleExecutionErrorServiceClient =
+   *     RuleExecutionErrorServiceClient.create()) {
+   *   ListRuleExecutionErrorsRequest request =
+   *       ListRuleExecutionErrorsRequest.newBuilder()
+   *           .setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   while (true) {
+   *     ListRuleExecutionErrorsResponse response =
+   *         ruleExecutionErrorServiceClient.listRuleExecutionErrorsCallable().call(request);
+   *     for (RuleExecutionError element : response.getRuleExecutionErrorsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listRuleExecutionErrorsCallable() { + return stub.listRuleExecutionErrorsCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } + + public static class ListRuleExecutionErrorsPagedResponse + extends AbstractPagedListResponse< + ListRuleExecutionErrorsRequest, + ListRuleExecutionErrorsResponse, + RuleExecutionError, + ListRuleExecutionErrorsPage, + ListRuleExecutionErrorsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListRuleExecutionErrorsRequest, ListRuleExecutionErrorsResponse, RuleExecutionError> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListRuleExecutionErrorsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListRuleExecutionErrorsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListRuleExecutionErrorsPagedResponse(ListRuleExecutionErrorsPage page) { + super(page, ListRuleExecutionErrorsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListRuleExecutionErrorsPage + extends AbstractPage< + ListRuleExecutionErrorsRequest, + ListRuleExecutionErrorsResponse, + RuleExecutionError, + ListRuleExecutionErrorsPage> { + + private ListRuleExecutionErrorsPage( + PageContext< + ListRuleExecutionErrorsRequest, ListRuleExecutionErrorsResponse, RuleExecutionError> + context, + ListRuleExecutionErrorsResponse response) { + super(context, response); + } + + private static ListRuleExecutionErrorsPage createEmptyPage() { + return new ListRuleExecutionErrorsPage(null, null); + } + + @Override + protected ListRuleExecutionErrorsPage createPage( + PageContext< + ListRuleExecutionErrorsRequest, ListRuleExecutionErrorsResponse, RuleExecutionError> + context, + ListRuleExecutionErrorsResponse response) { + return new ListRuleExecutionErrorsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListRuleExecutionErrorsRequest, ListRuleExecutionErrorsResponse, RuleExecutionError> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListRuleExecutionErrorsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListRuleExecutionErrorsRequest, + ListRuleExecutionErrorsResponse, + RuleExecutionError, + ListRuleExecutionErrorsPage, + ListRuleExecutionErrorsFixedSizeCollection> { + + private ListRuleExecutionErrorsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListRuleExecutionErrorsFixedSizeCollection createEmptyCollection() { + return new ListRuleExecutionErrorsFixedSizeCollection(null, 0); + } + + @Override + protected ListRuleExecutionErrorsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListRuleExecutionErrorsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/RuleExecutionErrorServiceSettings.java b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/RuleExecutionErrorServiceSettings.java new file mode 100644 index 000000000000..43fab7ef825a --- /dev/null +++ b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/RuleExecutionErrorServiceSettings.java @@ -0,0 +1,230 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.chronicle.v1; + +import static com.google.cloud.chronicle.v1.RuleExecutionErrorServiceClient.ListRuleExecutionErrorsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.chronicle.v1.stub.RuleExecutionErrorServiceStubSettings; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link RuleExecutionErrorServiceClient}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (chronicle.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of listRuleExecutionErrors: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * RuleExecutionErrorServiceSettings.Builder ruleExecutionErrorServiceSettingsBuilder =
+ *     RuleExecutionErrorServiceSettings.newBuilder();
+ * ruleExecutionErrorServiceSettingsBuilder
+ *     .listRuleExecutionErrorsSettings()
+ *     .setRetrySettings(
+ *         ruleExecutionErrorServiceSettingsBuilder
+ *             .listRuleExecutionErrorsSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * RuleExecutionErrorServiceSettings ruleExecutionErrorServiceSettings =
+ *     ruleExecutionErrorServiceSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + */ +@Generated("by gapic-generator-java") +public class RuleExecutionErrorServiceSettings + extends ClientSettings { + + /** Returns the object with the settings used for calls to listRuleExecutionErrors. */ + public PagedCallSettings< + ListRuleExecutionErrorsRequest, + ListRuleExecutionErrorsResponse, + ListRuleExecutionErrorsPagedResponse> + listRuleExecutionErrorsSettings() { + return ((RuleExecutionErrorServiceStubSettings) getStubSettings()) + .listRuleExecutionErrorsSettings(); + } + + public static final RuleExecutionErrorServiceSettings create( + RuleExecutionErrorServiceStubSettings stub) throws IOException { + return new RuleExecutionErrorServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return RuleExecutionErrorServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return RuleExecutionErrorServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return RuleExecutionErrorServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return RuleExecutionErrorServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return RuleExecutionErrorServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return RuleExecutionErrorServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return RuleExecutionErrorServiceStubSettings.defaultTransportChannelProvider(); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return RuleExecutionErrorServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected RuleExecutionErrorServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for RuleExecutionErrorServiceSettings. */ + public static class Builder + extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(RuleExecutionErrorServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(RuleExecutionErrorServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(RuleExecutionErrorServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(RuleExecutionErrorServiceStubSettings.newBuilder()); + } + + private static Builder createHttpJsonDefault() { + return new Builder(RuleExecutionErrorServiceStubSettings.newHttpJsonBuilder()); + } + + public RuleExecutionErrorServiceStubSettings.Builder getStubSettingsBuilder() { + return ((RuleExecutionErrorServiceStubSettings.Builder) getStubSettings()); + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to listRuleExecutionErrors. */ + public PagedCallSettings.Builder< + ListRuleExecutionErrorsRequest, + ListRuleExecutionErrorsResponse, + ListRuleExecutionErrorsPagedResponse> + listRuleExecutionErrorsSettings() { + return getStubSettingsBuilder().listRuleExecutionErrorsSettings(); + } + + @Override + public RuleExecutionErrorServiceSettings build() throws IOException { + return new RuleExecutionErrorServiceSettings(this); + } + } +} diff --git a/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/RuleServiceClient.java b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/RuleServiceClient.java index 907f02e0393e..457c656ac7ea 100644 --- a/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/RuleServiceClient.java +++ b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/RuleServiceClient.java @@ -165,6 +165,25 @@ * * * + *

VerifyRuleText + *

Verifies the given rule text. + * + *

Request object method variants only take one parameter, a request object, which must be constructed before the call.

+ *
    + *
  • verifyRuleText(VerifyRuleTextRequest request) + *

+ *

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

+ *
    + *
  • verifyRuleText(InstanceName instance, String ruleText) + *

  • verifyRuleText(String instance, String ruleText) + *

+ *

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

+ *
    + *
  • verifyRuleTextCallable() + *

+ * + * + * *

ListRuleRevisions *

Lists all revisions of the rule. * @@ -1029,6 +1048,130 @@ public final UnaryCallable deleteRuleCallable() { return stub.deleteRuleCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Verifies the given rule text. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (RuleServiceClient ruleServiceClient = RuleServiceClient.create()) {
+   *   InstanceName instance = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
+   *   String ruleText = "ruleText763458121";
+   *   VerifyRuleTextResponse response = ruleServiceClient.verifyRuleText(instance, ruleText);
+   * }
+   * }
+ * + * @param instance Required. The name of the parent resource, which is the SecOps instance + * associated with the request. Format: + * `projects/{project}/locations/{location}/instances/{instance}` + * @param ruleText Required. The rule text to verify as a UTF-8 string. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final VerifyRuleTextResponse verifyRuleText(InstanceName instance, String ruleText) { + VerifyRuleTextRequest request = + VerifyRuleTextRequest.newBuilder() + .setInstance(instance == null ? null : instance.toString()) + .setRuleText(ruleText) + .build(); + return verifyRuleText(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Verifies the given rule text. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (RuleServiceClient ruleServiceClient = RuleServiceClient.create()) {
+   *   String instance = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString();
+   *   String ruleText = "ruleText763458121";
+   *   VerifyRuleTextResponse response = ruleServiceClient.verifyRuleText(instance, ruleText);
+   * }
+   * }
+ * + * @param instance Required. The name of the parent resource, which is the SecOps instance + * associated with the request. Format: + * `projects/{project}/locations/{location}/instances/{instance}` + * @param ruleText Required. The rule text to verify as a UTF-8 string. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final VerifyRuleTextResponse verifyRuleText(String instance, String ruleText) { + VerifyRuleTextRequest request = + VerifyRuleTextRequest.newBuilder().setInstance(instance).setRuleText(ruleText).build(); + return verifyRuleText(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Verifies the given rule text. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (RuleServiceClient ruleServiceClient = RuleServiceClient.create()) {
+   *   VerifyRuleTextRequest request =
+   *       VerifyRuleTextRequest.newBuilder()
+   *           .setInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .setRuleText("ruleText763458121")
+   *           .build();
+   *   VerifyRuleTextResponse response = ruleServiceClient.verifyRuleText(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final VerifyRuleTextResponse verifyRuleText(VerifyRuleTextRequest request) { + return verifyRuleTextCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Verifies the given rule text. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (RuleServiceClient ruleServiceClient = RuleServiceClient.create()) {
+   *   VerifyRuleTextRequest request =
+   *       VerifyRuleTextRequest.newBuilder()
+   *           .setInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString())
+   *           .setRuleText("ruleText763458121")
+   *           .build();
+   *   ApiFuture future =
+   *       ruleServiceClient.verifyRuleTextCallable().futureCall(request);
+   *   // Do something.
+   *   VerifyRuleTextResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + verifyRuleTextCallable() { + return stub.verifyRuleTextCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Lists all revisions of the rule. diff --git a/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/RuleServiceSettings.java b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/RuleServiceSettings.java index 1b3c90b53412..eeea68c78840 100644 --- a/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/RuleServiceSettings.java +++ b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/RuleServiceSettings.java @@ -144,6 +144,11 @@ public UnaryCallSettings deleteRuleSettings() { return ((RuleServiceStubSettings) getStubSettings()).deleteRuleSettings(); } + /** Returns the object with the settings used for calls to verifyRuleText. */ + public UnaryCallSettings verifyRuleTextSettings() { + return ((RuleServiceStubSettings) getStubSettings()).verifyRuleTextSettings(); + } + /** Returns the object with the settings used for calls to listRuleRevisions. */ public PagedCallSettings< ListRuleRevisionsRequest, ListRuleRevisionsResponse, ListRuleRevisionsPagedResponse> @@ -329,6 +334,12 @@ public UnaryCallSettings.Builder deleteRuleSettings() return getStubSettingsBuilder().deleteRuleSettings(); } + /** Returns the builder for the settings used for calls to verifyRuleText. */ + public UnaryCallSettings.Builder + verifyRuleTextSettings() { + return getStubSettingsBuilder().verifyRuleTextSettings(); + } + /** Returns the builder for the settings used for calls to listRuleRevisions. */ public PagedCallSettings.Builder< ListRuleRevisionsRequest, ListRuleRevisionsResponse, ListRuleRevisionsPagedResponse> diff --git a/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/gapic_metadata.json b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/gapic_metadata.json index 86e8723a51eb..e6b7c170b89b 100644 --- a/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/gapic_metadata.json +++ b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/gapic_metadata.json @@ -261,6 +261,9 @@ }, "UpdateReferenceList": { "methods": ["updateReferenceList", "updateReferenceList", "updateReferenceListCallable"] + }, + "VerifyReferenceList": { + "methods": ["verifyReferenceList", "verifyReferenceListCallable"] } } } @@ -306,6 +309,21 @@ }, "UpdateRuleDeployment": { "methods": ["updateRuleDeployment", "updateRuleDeployment", "updateRuleDeploymentCallable"] + }, + "VerifyRuleText": { + "methods": ["verifyRuleText", "verifyRuleText", "verifyRuleText", "verifyRuleTextCallable"] + } + } + } + } + }, + "RuleExecutionErrorService": { + "clients": { + "grpc": { + "libraryClient": "RuleExecutionErrorServiceClient", + "rpcs": { + "ListRuleExecutionErrors": { + "methods": ["listRuleExecutionErrors", "listRuleExecutionErrors", "listRuleExecutionErrors", "listRuleExecutionErrorsPagedCallable", "listRuleExecutionErrorsCallable"] } } } diff --git a/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/package-info.java b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/package-info.java index bbf0be59f2e0..0d902ffffd26 100644 --- a/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/package-info.java +++ b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/package-info.java @@ -241,6 +241,29 @@ * Rule response = ruleServiceClient.createRule(parent, rule); * } * }
+ * + *

======================= RuleExecutionErrorServiceClient ======================= + * + *

Service Description: RuleExecutionErrorService contains endpoints related to rule execution + * errors. + * + *

Sample for RuleExecutionErrorServiceClient: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (RuleExecutionErrorServiceClient ruleExecutionErrorServiceClient =
+ *     RuleExecutionErrorServiceClient.create()) {
+ *   InstanceName parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]");
+ *   for (RuleExecutionError element :
+ *       ruleExecutionErrorServiceClient.listRuleExecutionErrors(parent).iterateAll()) {
+ *     // doThingsWith(element);
+ *   }
+ * }
+ * }
*/ @Generated("by gapic-generator-java") package com.google.cloud.chronicle.v1; diff --git a/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/GrpcReferenceListServiceStub.java b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/GrpcReferenceListServiceStub.java index 3610b580164b..e74496e6dc55 100644 --- a/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/GrpcReferenceListServiceStub.java +++ b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/GrpcReferenceListServiceStub.java @@ -31,6 +31,8 @@ import com.google.cloud.chronicle.v1.ListReferenceListsResponse; import com.google.cloud.chronicle.v1.ReferenceList; import com.google.cloud.chronicle.v1.UpdateReferenceListRequest; +import com.google.cloud.chronicle.v1.VerifyReferenceListRequest; +import com.google.cloud.chronicle.v1.VerifyReferenceListResponse; import com.google.longrunning.stub.GrpcOperationsStub; import io.grpc.MethodDescriptor; import io.grpc.protobuf.ProtoUtils; @@ -94,6 +96,19 @@ public class GrpcReferenceListServiceStub extends ReferenceListServiceStub { .setSampledToLocalTracing(true) .build(); + private static final MethodDescriptor + verifyReferenceListMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.chronicle.v1.ReferenceListService/VerifyReferenceList") + .setRequestMarshaller( + ProtoUtils.marshaller(VerifyReferenceListRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(VerifyReferenceListResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + private final UnaryCallable getReferenceListCallable; private final UnaryCallable listReferenceListsCallable; @@ -103,6 +118,8 @@ public class GrpcReferenceListServiceStub extends ReferenceListServiceStub { createReferenceListCallable; private final UnaryCallable updateReferenceListCallable; + private final UnaryCallable + verifyReferenceListCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; @@ -196,6 +213,18 @@ protected GrpcReferenceListServiceStub( return builder.build(); }) .build(); + GrpcCallSettings + verifyReferenceListTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(verifyReferenceListMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("instance", String.valueOf(request.getInstance())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getInstance()) + .build(); this.getReferenceListCallable = callableFactory.createUnaryCallable( @@ -220,6 +249,11 @@ protected GrpcReferenceListServiceStub( updateReferenceListTransportSettings, settings.updateReferenceListSettings(), clientContext); + this.verifyReferenceListCallable = + callableFactory.createUnaryCallable( + verifyReferenceListTransportSettings, + settings.verifyReferenceListSettings(), + clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -256,6 +290,12 @@ public UnaryCallable updateReferenceL return updateReferenceListCallable; } + @Override + public UnaryCallable + verifyReferenceListCallable() { + return verifyReferenceListCallable; + } + @Override public final void close() { try { diff --git a/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/GrpcRuleExecutionErrorServiceCallableFactory.java b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/GrpcRuleExecutionErrorServiceCallableFactory.java new file mode 100644 index 000000000000..db758d5fc746 --- /dev/null +++ b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/GrpcRuleExecutionErrorServiceCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.chronicle.v1.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the RuleExecutionErrorService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcRuleExecutionErrorServiceCallableFactory implements GrpcStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + GrpcCallSettings grpcCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createUnaryCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + GrpcCallSettings grpcCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable(grpcCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, callSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings callSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, callSettings, clientContext); + } +} diff --git a/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/GrpcRuleExecutionErrorServiceStub.java b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/GrpcRuleExecutionErrorServiceStub.java new file mode 100644 index 000000000000..ccb6c509834c --- /dev/null +++ b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/GrpcRuleExecutionErrorServiceStub.java @@ -0,0 +1,190 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.chronicle.v1.stub; + +import static com.google.cloud.chronicle.v1.RuleExecutionErrorServiceClient.ListRuleExecutionErrorsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest; +import com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse; +import com.google.longrunning.stub.GrpcOperationsStub; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the RuleExecutionErrorService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcRuleExecutionErrorServiceStub extends RuleExecutionErrorServiceStub { + private static final MethodDescriptor< + ListRuleExecutionErrorsRequest, ListRuleExecutionErrorsResponse> + listRuleExecutionErrorsMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.chronicle.v1.RuleExecutionErrorService/ListRuleExecutionErrors") + .setRequestMarshaller( + ProtoUtils.marshaller(ListRuleExecutionErrorsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListRuleExecutionErrorsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + + private final UnaryCallable + listRuleExecutionErrorsCallable; + private final UnaryCallable + listRuleExecutionErrorsPagedCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcRuleExecutionErrorServiceStub create( + RuleExecutionErrorServiceStubSettings settings) throws IOException { + return new GrpcRuleExecutionErrorServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcRuleExecutionErrorServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcRuleExecutionErrorServiceStub( + RuleExecutionErrorServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcRuleExecutionErrorServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcRuleExecutionErrorServiceStub( + RuleExecutionErrorServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcRuleExecutionErrorServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcRuleExecutionErrorServiceStub( + RuleExecutionErrorServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcRuleExecutionErrorServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcRuleExecutionErrorServiceStub, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected GrpcRuleExecutionErrorServiceStub( + RuleExecutionErrorServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + listRuleExecutionErrorsTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listRuleExecutionErrorsMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + + this.listRuleExecutionErrorsCallable = + callableFactory.createUnaryCallable( + listRuleExecutionErrorsTransportSettings, + settings.listRuleExecutionErrorsSettings(), + clientContext); + this.listRuleExecutionErrorsPagedCallable = + callableFactory.createPagedCallable( + listRuleExecutionErrorsTransportSettings, + settings.listRuleExecutionErrorsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable + listRuleExecutionErrorsCallable() { + return listRuleExecutionErrorsCallable; + } + + @Override + public UnaryCallable + listRuleExecutionErrorsPagedCallable() { + return listRuleExecutionErrorsPagedCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/GrpcRuleServiceStub.java b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/GrpcRuleServiceStub.java index 275ac4466236..eea3a005f9af 100644 --- a/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/GrpcRuleServiceStub.java +++ b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/GrpcRuleServiceStub.java @@ -49,6 +49,8 @@ import com.google.cloud.chronicle.v1.RuleDeployment; import com.google.cloud.chronicle.v1.UpdateRuleDeploymentRequest; import com.google.cloud.chronicle.v1.UpdateRuleRequest; +import com.google.cloud.chronicle.v1.VerifyRuleTextRequest; +import com.google.cloud.chronicle.v1.VerifyRuleTextResponse; import com.google.longrunning.Operation; import com.google.longrunning.stub.GrpcOperationsStub; import com.google.protobuf.Empty; @@ -112,6 +114,18 @@ public class GrpcRuleServiceStub extends RuleServiceStub { .setSampledToLocalTracing(true) .build(); + private static final MethodDescriptor + verifyRuleTextMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.chronicle.v1.RuleService/VerifyRuleText") + .setRequestMarshaller( + ProtoUtils.marshaller(VerifyRuleTextRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(VerifyRuleTextResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) + .build(); + private static final MethodDescriptor listRuleRevisionsMethodDescriptor = MethodDescriptor.newBuilder() @@ -197,6 +211,7 @@ public class GrpcRuleServiceStub extends RuleServiceStub { private final UnaryCallable listRulesPagedCallable; private final UnaryCallable updateRuleCallable; private final UnaryCallable deleteRuleCallable; + private final UnaryCallable verifyRuleTextCallable; private final UnaryCallable listRuleRevisionsCallable; private final UnaryCallable @@ -312,6 +327,18 @@ protected GrpcRuleServiceStub( }) .setResourceNameExtractor(request -> request.getName()) .build(); + GrpcCallSettings + verifyRuleTextTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(verifyRuleTextMethodDescriptor) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("instance", String.valueOf(request.getInstance())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getInstance()) + .build(); GrpcCallSettings listRuleRevisionsTransportSettings = GrpcCallSettings.newBuilder() @@ -413,6 +440,9 @@ protected GrpcRuleServiceStub( this.deleteRuleCallable = callableFactory.createUnaryCallable( deleteRuleTransportSettings, settings.deleteRuleSettings(), clientContext); + this.verifyRuleTextCallable = + callableFactory.createUnaryCallable( + verifyRuleTextTransportSettings, settings.verifyRuleTextSettings(), clientContext); this.listRuleRevisionsCallable = callableFactory.createUnaryCallable( listRuleRevisionsTransportSettings, @@ -500,6 +530,11 @@ public UnaryCallable deleteRuleCallable() { return deleteRuleCallable; } + @Override + public UnaryCallable verifyRuleTextCallable() { + return verifyRuleTextCallable; + } + @Override public UnaryCallable listRuleRevisionsCallable() { diff --git a/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/HttpJsonReferenceListServiceStub.java b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/HttpJsonReferenceListServiceStub.java index 983b1ef13fb9..56b61ca1b1cf 100644 --- a/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/HttpJsonReferenceListServiceStub.java +++ b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/HttpJsonReferenceListServiceStub.java @@ -36,6 +36,8 @@ import com.google.cloud.chronicle.v1.ListReferenceListsResponse; import com.google.cloud.chronicle.v1.ReferenceList; import com.google.cloud.chronicle.v1.UpdateReferenceListRequest; +import com.google.cloud.chronicle.v1.VerifyReferenceListRequest; +import com.google.cloud.chronicle.v1.VerifyReferenceListResponse; import com.google.protobuf.TypeRegistry; import java.io.IOException; import java.util.ArrayList; @@ -208,6 +210,44 @@ public class HttpJsonReferenceListServiceStub extends ReferenceListServiceStub { .build()) .build(); + private static final ApiMethodDescriptor + verifyReferenceListMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.chronicle.v1.ReferenceListService/VerifyReferenceList") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{instance=projects/*/locations/*/instances/*}:verifyReferenceList", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "instance", request.getInstance()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearInstance().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(VerifyReferenceListResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private final UnaryCallable getReferenceListCallable; private final UnaryCallable listReferenceListsCallable; @@ -217,6 +257,8 @@ public class HttpJsonReferenceListServiceStub extends ReferenceListServiceStub { createReferenceListCallable; private final UnaryCallable updateReferenceListCallable; + private final UnaryCallable + verifyReferenceListCallable; private final BackgroundResource backgroundResources; private final HttpJsonStubCallableFactory callableFactory; @@ -314,6 +356,20 @@ protected HttpJsonReferenceListServiceStub( return builder.build(); }) .build(); + HttpJsonCallSettings + verifyReferenceListTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(verifyReferenceListMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("instance", String.valueOf(request.getInstance())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getInstance()) + .build(); this.getReferenceListCallable = callableFactory.createUnaryCallable( @@ -338,6 +394,11 @@ protected HttpJsonReferenceListServiceStub( updateReferenceListTransportSettings, settings.updateReferenceListSettings(), clientContext); + this.verifyReferenceListCallable = + callableFactory.createUnaryCallable( + verifyReferenceListTransportSettings, + settings.verifyReferenceListSettings(), + clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -350,6 +411,7 @@ public static List getMethodDescriptors() { methodDescriptors.add(listReferenceListsMethodDescriptor); methodDescriptors.add(createReferenceListMethodDescriptor); methodDescriptors.add(updateReferenceListMethodDescriptor); + methodDescriptors.add(verifyReferenceListMethodDescriptor); return methodDescriptors; } @@ -380,6 +442,12 @@ public UnaryCallable updateReferenceL return updateReferenceListCallable; } + @Override + public UnaryCallable + verifyReferenceListCallable() { + return verifyReferenceListCallable; + } + @Override public final void close() { try { diff --git a/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/HttpJsonRuleExecutionErrorServiceCallableFactory.java b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/HttpJsonRuleExecutionErrorServiceCallableFactory.java new file mode 100644 index 000000000000..2a5112dfbd15 --- /dev/null +++ b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/HttpJsonRuleExecutionErrorServiceCallableFactory.java @@ -0,0 +1,101 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.chronicle.v1.stub; + +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the RuleExecutionErrorService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class HttpJsonRuleExecutionErrorServiceCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/HttpJsonRuleExecutionErrorServiceStub.java b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/HttpJsonRuleExecutionErrorServiceStub.java new file mode 100644 index 000000000000..0af422521c42 --- /dev/null +++ b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/HttpJsonRuleExecutionErrorServiceStub.java @@ -0,0 +1,228 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.chronicle.v1.stub; + +import static com.google.cloud.chronicle.v1.RuleExecutionErrorServiceClient.ListRuleExecutionErrorsPagedResponse; + +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.RequestParamsBuilder; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest; +import com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the RuleExecutionErrorService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class HttpJsonRuleExecutionErrorServiceStub extends RuleExecutionErrorServiceStub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor< + ListRuleExecutionErrorsRequest, ListRuleExecutionErrorsResponse> + listRuleExecutionErrorsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.chronicle.v1.RuleExecutionErrorService/ListRuleExecutionErrors") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*/locations/*/instances/*}/ruleExecutionErrors", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "filter", request.getFilter()); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListRuleExecutionErrorsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable + listRuleExecutionErrorsCallable; + private final UnaryCallable + listRuleExecutionErrorsPagedCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonRuleExecutionErrorServiceStub create( + RuleExecutionErrorServiceStubSettings settings) throws IOException { + return new HttpJsonRuleExecutionErrorServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonRuleExecutionErrorServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonRuleExecutionErrorServiceStub( + RuleExecutionErrorServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonRuleExecutionErrorServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonRuleExecutionErrorServiceStub( + RuleExecutionErrorServiceStubSettings.newHttpJsonBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of HttpJsonRuleExecutionErrorServiceStub, using the given settings. This + * is protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonRuleExecutionErrorServiceStub( + RuleExecutionErrorServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonRuleExecutionErrorServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonRuleExecutionErrorServiceStub, using the given settings. This + * is protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected HttpJsonRuleExecutionErrorServiceStub( + RuleExecutionErrorServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings + listRuleExecutionErrorsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listRuleExecutionErrorsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("parent", String.valueOf(request.getParent())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getParent()) + .build(); + + this.listRuleExecutionErrorsCallable = + callableFactory.createUnaryCallable( + listRuleExecutionErrorsTransportSettings, + settings.listRuleExecutionErrorsSettings(), + clientContext); + this.listRuleExecutionErrorsPagedCallable = + callableFactory.createPagedCallable( + listRuleExecutionErrorsTransportSettings, + settings.listRuleExecutionErrorsSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(listRuleExecutionErrorsMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable + listRuleExecutionErrorsCallable() { + return listRuleExecutionErrorsCallable; + } + + @Override + public UnaryCallable + listRuleExecutionErrorsPagedCallable() { + return listRuleExecutionErrorsPagedCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/HttpJsonRuleServiceStub.java b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/HttpJsonRuleServiceStub.java index edc183843f74..8aa697ae16ff 100644 --- a/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/HttpJsonRuleServiceStub.java +++ b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/HttpJsonRuleServiceStub.java @@ -57,6 +57,8 @@ import com.google.cloud.chronicle.v1.RuleDeployment; import com.google.cloud.chronicle.v1.UpdateRuleDeploymentRequest; import com.google.cloud.chronicle.v1.UpdateRuleRequest; +import com.google.cloud.chronicle.v1.VerifyRuleTextRequest; +import com.google.cloud.chronicle.v1.VerifyRuleTextResponse; import com.google.common.collect.ImmutableMap; import com.google.longrunning.Operation; import com.google.protobuf.Empty; @@ -260,6 +262,43 @@ public class HttpJsonRuleServiceStub extends RuleServiceStub { .build()) .build(); + private static final ApiMethodDescriptor + verifyRuleTextMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.chronicle.v1.RuleService/VerifyRuleText") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{instance=projects/*/locations/*/instances/*}:verifyRuleText", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "instance", request.getInstance()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "$alt", "json;enum-encoding=int"); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearInstance().build(), true)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(VerifyRuleTextResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor listRuleRevisionsMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -526,6 +565,7 @@ public class HttpJsonRuleServiceStub extends RuleServiceStub { private final UnaryCallable listRulesPagedCallable; private final UnaryCallable updateRuleCallable; private final UnaryCallable deleteRuleCallable; + private final UnaryCallable verifyRuleTextCallable; private final UnaryCallable listRuleRevisionsCallable; private final UnaryCallable @@ -675,6 +715,19 @@ protected HttpJsonRuleServiceStub( }) .setResourceNameExtractor(request -> request.getName()) .build(); + HttpJsonCallSettings + verifyRuleTextTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(verifyRuleTextMethodDescriptor) + .setTypeRegistry(typeRegistry) + .setParamsExtractor( + request -> { + RequestParamsBuilder builder = RequestParamsBuilder.create(); + builder.add("instance", String.valueOf(request.getInstance())); + return builder.build(); + }) + .setResourceNameExtractor(request -> request.getInstance()) + .build(); HttpJsonCallSettings listRuleRevisionsTransportSettings = HttpJsonCallSettings.newBuilder() @@ -785,6 +838,9 @@ protected HttpJsonRuleServiceStub( this.deleteRuleCallable = callableFactory.createUnaryCallable( deleteRuleTransportSettings, settings.deleteRuleSettings(), clientContext); + this.verifyRuleTextCallable = + callableFactory.createUnaryCallable( + verifyRuleTextTransportSettings, settings.verifyRuleTextSettings(), clientContext); this.listRuleRevisionsCallable = callableFactory.createUnaryCallable( listRuleRevisionsTransportSettings, @@ -846,6 +902,7 @@ public static List getMethodDescriptors() { methodDescriptors.add(listRulesMethodDescriptor); methodDescriptors.add(updateRuleMethodDescriptor); methodDescriptors.add(deleteRuleMethodDescriptor); + methodDescriptors.add(verifyRuleTextMethodDescriptor); methodDescriptors.add(listRuleRevisionsMethodDescriptor); methodDescriptors.add(createRetrohuntMethodDescriptor); methodDescriptors.add(getRetrohuntMethodDescriptor); @@ -890,6 +947,11 @@ public UnaryCallable deleteRuleCallable() { return deleteRuleCallable; } + @Override + public UnaryCallable verifyRuleTextCallable() { + return verifyRuleTextCallable; + } + @Override public UnaryCallable listRuleRevisionsCallable() { diff --git a/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/ReferenceListServiceStub.java b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/ReferenceListServiceStub.java index 138aaaf7049b..4098ead0c319 100644 --- a/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/ReferenceListServiceStub.java +++ b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/ReferenceListServiceStub.java @@ -26,6 +26,8 @@ import com.google.cloud.chronicle.v1.ListReferenceListsResponse; import com.google.cloud.chronicle.v1.ReferenceList; import com.google.cloud.chronicle.v1.UpdateReferenceListRequest; +import com.google.cloud.chronicle.v1.VerifyReferenceListRequest; +import com.google.cloud.chronicle.v1.VerifyReferenceListResponse; import javax.annotation.Generated; // AUTO-GENERATED DOCUMENTATION AND CLASS. @@ -59,6 +61,11 @@ public UnaryCallable updateReferenceL throw new UnsupportedOperationException("Not implemented: updateReferenceListCallable()"); } + public UnaryCallable + verifyReferenceListCallable() { + throw new UnsupportedOperationException("Not implemented: verifyReferenceListCallable()"); + } + @Override public abstract void close(); } diff --git a/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/ReferenceListServiceStubSettings.java b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/ReferenceListServiceStubSettings.java index 3c766abbc5fc..3fb340d35c36 100644 --- a/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/ReferenceListServiceStubSettings.java +++ b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/ReferenceListServiceStubSettings.java @@ -51,6 +51,8 @@ import com.google.cloud.chronicle.v1.ListReferenceListsResponse; import com.google.cloud.chronicle.v1.ReferenceList; import com.google.cloud.chronicle.v1.UpdateReferenceListRequest; +import com.google.cloud.chronicle.v1.VerifyReferenceListRequest; +import com.google.cloud.chronicle.v1.VerifyReferenceListResponse; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; @@ -117,7 +119,11 @@ public class ReferenceListServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/chronicle") + .add("https://www.googleapis.com/auth/chronicle.readonly") + .add("https://www.googleapis.com/auth/cloud-platform") + .build(); private final UnaryCallSettings getReferenceListSettings; private final PagedCallSettings< @@ -127,6 +133,8 @@ public class ReferenceListServiceStubSettings createReferenceListSettings; private final UnaryCallSettings updateReferenceListSettings; + private final UnaryCallSettings + verifyReferenceListSettings; private static final PagedListDescriptor< ListReferenceListsRequest, ListReferenceListsResponse, ReferenceList> @@ -211,6 +219,12 @@ public UnaryCallSettings getReferenceLis return updateReferenceListSettings; } + /** Returns the object with the settings used for calls to verifyReferenceList. */ + public UnaryCallSettings + verifyReferenceListSettings() { + return verifyReferenceListSettings; + } + public ReferenceListServiceStub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() @@ -326,6 +340,7 @@ protected ReferenceListServiceStubSettings(Builder settingsBuilder) throws IOExc listReferenceListsSettings = settingsBuilder.listReferenceListsSettings().build(); createReferenceListSettings = settingsBuilder.createReferenceListSettings().build(); updateReferenceListSettings = settingsBuilder.updateReferenceListSettings().build(); + verifyReferenceListSettings = settingsBuilder.verifyReferenceListSettings().build(); } @Override @@ -350,6 +365,8 @@ public static class Builder createReferenceListSettings; private final UnaryCallSettings.Builder updateReferenceListSettings; + private final UnaryCallSettings.Builder + verifyReferenceListSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -402,13 +419,15 @@ protected Builder(ClientContext clientContext) { listReferenceListsSettings = PagedCallSettings.newBuilder(LIST_REFERENCE_LISTS_PAGE_STR_FACT); createReferenceListSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); updateReferenceListSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + verifyReferenceListSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( getReferenceListSettings, listReferenceListsSettings, createReferenceListSettings, - updateReferenceListSettings); + updateReferenceListSettings, + verifyReferenceListSettings); initDefaults(this); } @@ -419,13 +438,15 @@ protected Builder(ReferenceListServiceStubSettings settings) { listReferenceListsSettings = settings.listReferenceListsSettings.toBuilder(); createReferenceListSettings = settings.createReferenceListSettings.toBuilder(); updateReferenceListSettings = settings.updateReferenceListSettings.toBuilder(); + verifyReferenceListSettings = settings.verifyReferenceListSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( getReferenceListSettings, listReferenceListsSettings, createReferenceListSettings, - updateReferenceListSettings); + updateReferenceListSettings, + verifyReferenceListSettings); } private static Builder createDefault() { @@ -473,6 +494,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_5_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_5_params")); + builder + .verifyReferenceListSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + return builder; } @@ -516,6 +542,12 @@ public Builder applyToAllUnaryMethods( return updateReferenceListSettings; } + /** Returns the builder for the settings used for calls to verifyReferenceList. */ + public UnaryCallSettings.Builder + verifyReferenceListSettings() { + return verifyReferenceListSettings; + } + @Override public ReferenceListServiceStubSettings build() throws IOException { return new ReferenceListServiceStubSettings(this); diff --git a/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/RuleExecutionErrorServiceStub.java b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/RuleExecutionErrorServiceStub.java new file mode 100644 index 000000000000..2902adc5dc0b --- /dev/null +++ b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/RuleExecutionErrorServiceStub.java @@ -0,0 +1,49 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.chronicle.v1.stub; + +import static com.google.cloud.chronicle.v1.RuleExecutionErrorServiceClient.ListRuleExecutionErrorsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest; +import com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the RuleExecutionErrorService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class RuleExecutionErrorServiceStub implements BackgroundResource { + + public UnaryCallable + listRuleExecutionErrorsPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listRuleExecutionErrorsPagedCallable()"); + } + + public UnaryCallable + listRuleExecutionErrorsCallable() { + throw new UnsupportedOperationException("Not implemented: listRuleExecutionErrorsCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/RuleExecutionErrorServiceStubSettings.java b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/RuleExecutionErrorServiceStubSettings.java new file mode 100644 index 000000000000..5a2edabfc46a --- /dev/null +++ b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/RuleExecutionErrorServiceStubSettings.java @@ -0,0 +1,457 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.chronicle.v1.stub; + +import static com.google.cloud.chronicle.v1.RuleExecutionErrorServiceClient.ListRuleExecutionErrorsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.core.ObsoleteApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.LibraryMetadata; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest; +import com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse; +import com.google.cloud.chronicle.v1.RuleExecutionError; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import java.io.IOException; +import java.time.Duration; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link RuleExecutionErrorServiceStub}. + * + *

The default instance has everything set to sensible defaults: + * + *

    + *
  • The default service address (chronicle.googleapis.com) and default port (443) are used. + *
  • Credentials are acquired automatically through Application Default Credentials. + *
  • Retries are configured for idempotent methods but not for non-idempotent methods. + *
+ * + *

The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *

For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of listRuleExecutionErrors: + * + *

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * RuleExecutionErrorServiceStubSettings.Builder ruleExecutionErrorServiceSettingsBuilder =
+ *     RuleExecutionErrorServiceStubSettings.newBuilder();
+ * ruleExecutionErrorServiceSettingsBuilder
+ *     .listRuleExecutionErrorsSettings()
+ *     .setRetrySettings(
+ *         ruleExecutionErrorServiceSettingsBuilder
+ *             .listRuleExecutionErrorsSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ *             .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ *             .setMaxAttempts(5)
+ *             .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ *             .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ *             .setRetryDelayMultiplier(1.3)
+ *             .setRpcTimeoutMultiplier(1.5)
+ *             .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ *             .build());
+ * RuleExecutionErrorServiceStubSettings ruleExecutionErrorServiceSettings =
+ *     ruleExecutionErrorServiceSettingsBuilder.build();
+ * }
+ * + * Please refer to the [Client Side Retry + * Guide](https://docs.cloud.google.com/java/docs/client-retries) for additional support in setting + * retries. + */ +@Generated("by gapic-generator-java") +@SuppressWarnings("CanonicalDuration") +public class RuleExecutionErrorServiceStubSettings + extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder() + .add("https://www.googleapis.com/auth/chronicle") + .add("https://www.googleapis.com/auth/chronicle.readonly") + .add("https://www.googleapis.com/auth/cloud-platform") + .build(); + + private final PagedCallSettings< + ListRuleExecutionErrorsRequest, + ListRuleExecutionErrorsResponse, + ListRuleExecutionErrorsPagedResponse> + listRuleExecutionErrorsSettings; + + private static final PagedListDescriptor< + ListRuleExecutionErrorsRequest, ListRuleExecutionErrorsResponse, RuleExecutionError> + LIST_RULE_EXECUTION_ERRORS_PAGE_STR_DESC = + new PagedListDescriptor< + ListRuleExecutionErrorsRequest, + ListRuleExecutionErrorsResponse, + RuleExecutionError>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListRuleExecutionErrorsRequest injectToken( + ListRuleExecutionErrorsRequest payload, String token) { + return ListRuleExecutionErrorsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListRuleExecutionErrorsRequest injectPageSize( + ListRuleExecutionErrorsRequest payload, int pageSize) { + return ListRuleExecutionErrorsRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListRuleExecutionErrorsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListRuleExecutionErrorsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListRuleExecutionErrorsResponse payload) { + return payload.getRuleExecutionErrorsList(); + } + }; + + private static final PagedListResponseFactory< + ListRuleExecutionErrorsRequest, + ListRuleExecutionErrorsResponse, + ListRuleExecutionErrorsPagedResponse> + LIST_RULE_EXECUTION_ERRORS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListRuleExecutionErrorsRequest, + ListRuleExecutionErrorsResponse, + ListRuleExecutionErrorsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + ListRuleExecutionErrorsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListRuleExecutionErrorsRequest, + ListRuleExecutionErrorsResponse, + RuleExecutionError> + pageContext = + PageContext.create( + callable, LIST_RULE_EXECUTION_ERRORS_PAGE_STR_DESC, request, context); + return ListRuleExecutionErrorsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listRuleExecutionErrors. */ + public PagedCallSettings< + ListRuleExecutionErrorsRequest, + ListRuleExecutionErrorsResponse, + ListRuleExecutionErrorsPagedResponse> + listRuleExecutionErrorsSettings() { + return listRuleExecutionErrorsSettings; + } + + public RuleExecutionErrorServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcRuleExecutionErrorServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonRuleExecutionErrorServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns the default service name. */ + @Override + public String getServiceName() { + return "chronicle"; + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + @ObsoleteApi("Use getEndpoint() instead") + public static String getDefaultEndpoint() { + return "chronicle.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "chronicle.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(RuleExecutionErrorServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(RuleExecutionErrorServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return RuleExecutionErrorServiceStubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected RuleExecutionErrorServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listRuleExecutionErrorsSettings = settingsBuilder.listRuleExecutionErrorsSettings().build(); + } + + @Override + protected LibraryMetadata getLibraryMetadata() { + return LibraryMetadata.newBuilder() + .setArtifactName("com.google.cloud:google-cloud-chronicle") + .setRepository("googleapis/google-cloud-java") + .setVersion(Version.VERSION) + .build(); + } + + /** Builder for RuleExecutionErrorServiceStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListRuleExecutionErrorsRequest, + ListRuleExecutionErrorsResponse, + ListRuleExecutionErrorsPagedResponse> + listRuleExecutionErrorsSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_4_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelayDuration(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelayDuration(Duration.ofMillis(600000L)) + .setInitialRpcTimeoutDuration(Duration.ofMillis(600000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeoutDuration(Duration.ofMillis(600000L)) + .setTotalTimeoutDuration(Duration.ofMillis(600000L)) + .build(); + definitions.put("retry_policy_4_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listRuleExecutionErrorsSettings = + PagedCallSettings.newBuilder(LIST_RULE_EXECUTION_ERRORS_PAGE_STR_FACT); + + unaryMethodSettingsBuilders = + ImmutableList.>of(listRuleExecutionErrorsSettings); + initDefaults(this); + } + + protected Builder(RuleExecutionErrorServiceStubSettings settings) { + super(settings); + + listRuleExecutionErrorsSettings = settings.listRuleExecutionErrorsSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(listRuleExecutionErrorsSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listRuleExecutionErrorsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_4_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_4_params")); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listRuleExecutionErrors. */ + public PagedCallSettings.Builder< + ListRuleExecutionErrorsRequest, + ListRuleExecutionErrorsResponse, + ListRuleExecutionErrorsPagedResponse> + listRuleExecutionErrorsSettings() { + return listRuleExecutionErrorsSettings; + } + + @Override + public RuleExecutionErrorServiceStubSettings build() throws IOException { + return new RuleExecutionErrorServiceStubSettings(this); + } + } +} diff --git a/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/RuleServiceStub.java b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/RuleServiceStub.java index ae5392bac72c..9f16c84d7770 100644 --- a/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/RuleServiceStub.java +++ b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/RuleServiceStub.java @@ -44,6 +44,8 @@ import com.google.cloud.chronicle.v1.RuleDeployment; import com.google.cloud.chronicle.v1.UpdateRuleDeploymentRequest; import com.google.cloud.chronicle.v1.UpdateRuleRequest; +import com.google.cloud.chronicle.v1.VerifyRuleTextRequest; +import com.google.cloud.chronicle.v1.VerifyRuleTextResponse; import com.google.longrunning.Operation; import com.google.longrunning.stub.OperationsStub; import com.google.protobuf.Empty; @@ -90,6 +92,10 @@ public UnaryCallable deleteRuleCallable() { throw new UnsupportedOperationException("Not implemented: deleteRuleCallable()"); } + public UnaryCallable verifyRuleTextCallable() { + throw new UnsupportedOperationException("Not implemented: verifyRuleTextCallable()"); + } + public UnaryCallable listRuleRevisionsPagedCallable() { throw new UnsupportedOperationException("Not implemented: listRuleRevisionsPagedCallable()"); diff --git a/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/RuleServiceStubSettings.java b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/RuleServiceStubSettings.java index 710be4b739c3..882a026ab9a8 100644 --- a/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/RuleServiceStubSettings.java +++ b/java-chronicle/google-cloud-chronicle/src/main/java/com/google/cloud/chronicle/v1/stub/RuleServiceStubSettings.java @@ -72,6 +72,8 @@ import com.google.cloud.chronicle.v1.RuleDeployment; import com.google.cloud.chronicle.v1.UpdateRuleDeploymentRequest; import com.google.cloud.chronicle.v1.UpdateRuleRequest; +import com.google.cloud.chronicle.v1.VerifyRuleTextRequest; +import com.google.cloud.chronicle.v1.VerifyRuleTextResponse; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; @@ -164,7 +166,11 @@ public class RuleServiceStubSettings extends StubSettings { /** The default scopes of the service. */ private static final ImmutableList DEFAULT_SERVICE_SCOPES = - ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build(); + ImmutableList.builder() + .add("https://www.googleapis.com/auth/chronicle") + .add("https://www.googleapis.com/auth/chronicle.readonly") + .add("https://www.googleapis.com/auth/cloud-platform") + .build(); private final UnaryCallSettings createRuleSettings; private final UnaryCallSettings getRuleSettings; @@ -172,6 +178,8 @@ public class RuleServiceStubSettings extends StubSettings updateRuleSettings; private final UnaryCallSettings deleteRuleSettings; + private final UnaryCallSettings + verifyRuleTextSettings; private final PagedCallSettings< ListRuleRevisionsRequest, ListRuleRevisionsResponse, ListRuleRevisionsPagedResponse> listRuleRevisionsSettings; @@ -434,6 +442,11 @@ public UnaryCallSettings deleteRuleSettings() { return deleteRuleSettings; } + /** Returns the object with the settings used for calls to verifyRuleText. */ + public UnaryCallSettings verifyRuleTextSettings() { + return verifyRuleTextSettings; + } + /** Returns the object with the settings used for calls to listRuleRevisions. */ public PagedCallSettings< ListRuleRevisionsRequest, ListRuleRevisionsResponse, ListRuleRevisionsPagedResponse> @@ -598,6 +611,7 @@ protected RuleServiceStubSettings(Builder settingsBuilder) throws IOException { listRulesSettings = settingsBuilder.listRulesSettings().build(); updateRuleSettings = settingsBuilder.updateRuleSettings().build(); deleteRuleSettings = settingsBuilder.deleteRuleSettings().build(); + verifyRuleTextSettings = settingsBuilder.verifyRuleTextSettings().build(); listRuleRevisionsSettings = settingsBuilder.listRuleRevisionsSettings().build(); createRetrohuntSettings = settingsBuilder.createRetrohuntSettings().build(); createRetrohuntOperationSettings = settingsBuilder.createRetrohuntOperationSettings().build(); @@ -627,6 +641,8 @@ public static class Builder extends StubSettings.Builder updateRuleSettings; private final UnaryCallSettings.Builder deleteRuleSettings; + private final UnaryCallSettings.Builder + verifyRuleTextSettings; private final PagedCallSettings.Builder< ListRuleRevisionsRequest, ListRuleRevisionsResponse, ListRuleRevisionsPagedResponse> listRuleRevisionsSettings; @@ -725,6 +741,7 @@ protected Builder(ClientContext clientContext) { listRulesSettings = PagedCallSettings.newBuilder(LIST_RULES_PAGE_STR_FACT); updateRuleSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); deleteRuleSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + verifyRuleTextSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); listRuleRevisionsSettings = PagedCallSettings.newBuilder(LIST_RULE_REVISIONS_PAGE_STR_FACT); createRetrohuntSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); createRetrohuntOperationSettings = OperationCallSettings.newBuilder(); @@ -742,6 +759,7 @@ protected Builder(ClientContext clientContext) { listRulesSettings, updateRuleSettings, deleteRuleSettings, + verifyRuleTextSettings, listRuleRevisionsSettings, createRetrohuntSettings, getRetrohuntSettings, @@ -760,6 +778,7 @@ protected Builder(RuleServiceStubSettings settings) { listRulesSettings = settings.listRulesSettings.toBuilder(); updateRuleSettings = settings.updateRuleSettings.toBuilder(); deleteRuleSettings = settings.deleteRuleSettings.toBuilder(); + verifyRuleTextSettings = settings.verifyRuleTextSettings.toBuilder(); listRuleRevisionsSettings = settings.listRuleRevisionsSettings.toBuilder(); createRetrohuntSettings = settings.createRetrohuntSettings.toBuilder(); createRetrohuntOperationSettings = settings.createRetrohuntOperationSettings.toBuilder(); @@ -776,6 +795,7 @@ protected Builder(RuleServiceStubSettings settings) { listRulesSettings, updateRuleSettings, deleteRuleSettings, + verifyRuleTextSettings, listRuleRevisionsSettings, createRetrohuntSettings, getRetrohuntSettings, @@ -835,6 +855,11 @@ private static Builder initDefaults(Builder builder) { .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_5_codes")) .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_5_params")); + builder + .verifyRuleTextSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + builder .listRuleRevisionsSettings() .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_4_codes")) @@ -938,6 +963,12 @@ public UnaryCallSettings.Builder deleteRuleSettings() return deleteRuleSettings; } + /** Returns the builder for the settings used for calls to verifyRuleText. */ + public UnaryCallSettings.Builder + verifyRuleTextSettings() { + return verifyRuleTextSettings; + } + /** Returns the builder for the settings used for calls to listRuleRevisions. */ public PagedCallSettings.Builder< ListRuleRevisionsRequest, ListRuleRevisionsResponse, ListRuleRevisionsPagedResponse> diff --git a/java-chronicle/google-cloud-chronicle/src/main/resources/META-INF/native-image/com.google.cloud.chronicle.v1/reflect-config.json b/java-chronicle/google-cloud-chronicle/src/main/resources/META-INF/native-image/com.google.cloud.chronicle.v1/reflect-config.json index 05f4d474435d..e2501d49b07f 100644 --- a/java-chronicle/google-cloud-chronicle/src/main/resources/META-INF/native-image/com.google.cloud.chronicle.v1/reflect-config.json +++ b/java-chronicle/google-cloud-chronicle/src/main/resources/META-INF/native-image/com.google.cloud.chronicle.v1/reflect-config.json @@ -3347,6 +3347,42 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.chronicle.v1.ListRuleRevisionsRequest", "queryAllDeclaredConstructors": true, @@ -3698,6 +3734,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.chronicle.v1.ReferenceListError", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.chronicle.v1.ReferenceListError$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.chronicle.v1.ReferenceListScope", "queryAllDeclaredConstructors": true, @@ -3860,6 +3914,24 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.chronicle.v1.RuleExecutionError", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.chronicle.v1.RuleExecutionError$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.chronicle.v1.RuleType", "queryAllDeclaredConstructors": true, @@ -4166,6 +4238,78 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.cloud.chronicle.v1.VerifyReferenceListRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.chronicle.v1.VerifyReferenceListRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.chronicle.v1.VerifyReferenceListResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.chronicle.v1.VerifyReferenceListResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.chronicle.v1.VerifyRuleTextRequest", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.chronicle.v1.VerifyRuleTextRequest$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.chronicle.v1.VerifyRuleTextResponse", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.cloud.chronicle.v1.VerifyRuleTextResponse$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.cloud.chronicle.v1.VisualMapType", "queryAllDeclaredConstructors": true, diff --git a/java-chronicle/google-cloud-chronicle/src/test/java/com/google/cloud/chronicle/v1/MockReferenceListServiceImpl.java b/java-chronicle/google-cloud-chronicle/src/test/java/com/google/cloud/chronicle/v1/MockReferenceListServiceImpl.java index 2d41f2233bba..3cad3f627539 100644 --- a/java-chronicle/google-cloud-chronicle/src/test/java/com/google/cloud/chronicle/v1/MockReferenceListServiceImpl.java +++ b/java-chronicle/google-cloud-chronicle/src/test/java/com/google/cloud/chronicle/v1/MockReferenceListServiceImpl.java @@ -142,4 +142,26 @@ public void updateReferenceList( Exception.class.getName()))); } } + + @Override + public void verifyReferenceList( + VerifyReferenceListRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof VerifyReferenceListResponse) { + requests.add(request); + responseObserver.onNext(((VerifyReferenceListResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method VerifyReferenceList, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + VerifyReferenceListResponse.class.getName(), + Exception.class.getName()))); + } + } } diff --git a/java-chronicle/google-cloud-chronicle/src/test/java/com/google/cloud/chronicle/v1/MockRuleExecutionErrorService.java b/java-chronicle/google-cloud-chronicle/src/test/java/com/google/cloud/chronicle/v1/MockRuleExecutionErrorService.java new file mode 100644 index 000000000000..fc0fefad85ff --- /dev/null +++ b/java-chronicle/google-cloud-chronicle/src/test/java/com/google/cloud/chronicle/v1/MockRuleExecutionErrorService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.chronicle.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockRuleExecutionErrorService implements MockGrpcService { + private final MockRuleExecutionErrorServiceImpl serviceImpl; + + public MockRuleExecutionErrorService() { + serviceImpl = new MockRuleExecutionErrorServiceImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(AbstractMessage response) { + serviceImpl.addResponse(response); + } + + @Override + public void addException(Exception exception) { + serviceImpl.addException(exception); + } + + @Override + public ServerServiceDefinition getServiceDefinition() { + return serviceImpl.bindService(); + } + + @Override + public void reset() { + serviceImpl.reset(); + } +} diff --git a/java-chronicle/google-cloud-chronicle/src/test/java/com/google/cloud/chronicle/v1/MockRuleExecutionErrorServiceImpl.java b/java-chronicle/google-cloud-chronicle/src/test/java/com/google/cloud/chronicle/v1/MockRuleExecutionErrorServiceImpl.java new file mode 100644 index 000000000000..6567e8c2f482 --- /dev/null +++ b/java-chronicle/google-cloud-chronicle/src/test/java/com/google/cloud/chronicle/v1/MockRuleExecutionErrorServiceImpl.java @@ -0,0 +1,83 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.chronicle.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.chronicle.v1.RuleExecutionErrorServiceGrpc.RuleExecutionErrorServiceImplBase; +import com.google.protobuf.AbstractMessage; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockRuleExecutionErrorServiceImpl extends RuleExecutionErrorServiceImplBase { + private List requests; + private Queue responses; + + public MockRuleExecutionErrorServiceImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(AbstractMessage response) { + responses.add(response); + } + + public void setResponses(List responses) { + this.responses = new LinkedList(responses); + } + + public void addException(Exception exception) { + responses.add(exception); + } + + public void reset() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + @Override + public void listRuleExecutionErrors( + ListRuleExecutionErrorsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof ListRuleExecutionErrorsResponse) { + requests.add(request); + responseObserver.onNext(((ListRuleExecutionErrorsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method ListRuleExecutionErrors, expected %s or" + + " %s", + response == null ? "null" : response.getClass().getName(), + ListRuleExecutionErrorsResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/java-chronicle/google-cloud-chronicle/src/test/java/com/google/cloud/chronicle/v1/MockRuleServiceImpl.java b/java-chronicle/google-cloud-chronicle/src/test/java/com/google/cloud/chronicle/v1/MockRuleServiceImpl.java index 0e6d1f794b02..213780e70002 100644 --- a/java-chronicle/google-cloud-chronicle/src/test/java/com/google/cloud/chronicle/v1/MockRuleServiceImpl.java +++ b/java-chronicle/google-cloud-chronicle/src/test/java/com/google/cloud/chronicle/v1/MockRuleServiceImpl.java @@ -161,6 +161,27 @@ public void deleteRule(DeleteRuleRequest request, StreamObserver response } } + @Override + public void verifyRuleText( + VerifyRuleTextRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof VerifyRuleTextResponse) { + requests.add(request); + responseObserver.onNext(((VerifyRuleTextResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method VerifyRuleText, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + VerifyRuleTextResponse.class.getName(), + Exception.class.getName()))); + } + } + @Override public void listRuleRevisions( ListRuleRevisionsRequest request, diff --git a/java-chronicle/google-cloud-chronicle/src/test/java/com/google/cloud/chronicle/v1/ReferenceListServiceClientHttpJsonTest.java b/java-chronicle/google-cloud-chronicle/src/test/java/com/google/cloud/chronicle/v1/ReferenceListServiceClientHttpJsonTest.java index 055d3071dc0f..95b6e2b8fba1 100644 --- a/java-chronicle/google-cloud-chronicle/src/test/java/com/google/cloud/chronicle/v1/ReferenceListServiceClientHttpJsonTest.java +++ b/java-chronicle/google-cloud-chronicle/src/test/java/com/google/cloud/chronicle/v1/ReferenceListServiceClientHttpJsonTest.java @@ -489,4 +489,59 @@ public void updateReferenceListExceptionTest() throws Exception { // Expected exception. } } + + @Test + public void verifyReferenceListTest() throws Exception { + VerifyReferenceListResponse expectedResponse = + VerifyReferenceListResponse.newBuilder() + .setSuccess(true) + .addAllErrors(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + VerifyReferenceListRequest request = + VerifyReferenceListRequest.newBuilder() + .setInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setSyntaxType(ReferenceListSyntaxType.forNumber(0)) + .addAllEntries(new ArrayList()) + .build(); + + VerifyReferenceListResponse actualResponse = client.verifyReferenceList(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void verifyReferenceListExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + VerifyReferenceListRequest request = + VerifyReferenceListRequest.newBuilder() + .setInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setSyntaxType(ReferenceListSyntaxType.forNumber(0)) + .addAllEntries(new ArrayList()) + .build(); + client.verifyReferenceList(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } } diff --git a/java-chronicle/google-cloud-chronicle/src/test/java/com/google/cloud/chronicle/v1/ReferenceListServiceClientTest.java b/java-chronicle/google-cloud-chronicle/src/test/java/com/google/cloud/chronicle/v1/ReferenceListServiceClientTest.java index 0ec494188c24..b1303ecff49e 100644 --- a/java-chronicle/google-cloud-chronicle/src/test/java/com/google/cloud/chronicle/v1/ReferenceListServiceClientTest.java +++ b/java-chronicle/google-cloud-chronicle/src/test/java/com/google/cloud/chronicle/v1/ReferenceListServiceClientTest.java @@ -427,4 +427,55 @@ public void updateReferenceListExceptionTest() throws Exception { // Expected exception. } } + + @Test + public void verifyReferenceListTest() throws Exception { + VerifyReferenceListResponse expectedResponse = + VerifyReferenceListResponse.newBuilder() + .setSuccess(true) + .addAllErrors(new ArrayList()) + .build(); + mockReferenceListService.addResponse(expectedResponse); + + VerifyReferenceListRequest request = + VerifyReferenceListRequest.newBuilder() + .setInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setSyntaxType(ReferenceListSyntaxType.forNumber(0)) + .addAllEntries(new ArrayList()) + .build(); + + VerifyReferenceListResponse actualResponse = client.verifyReferenceList(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockReferenceListService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + VerifyReferenceListRequest actualRequest = ((VerifyReferenceListRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getInstance(), actualRequest.getInstance()); + Assert.assertEquals(request.getSyntaxType(), actualRequest.getSyntaxType()); + Assert.assertEquals(request.getEntriesList(), actualRequest.getEntriesList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void verifyReferenceListExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockReferenceListService.addException(exception); + + try { + VerifyReferenceListRequest request = + VerifyReferenceListRequest.newBuilder() + .setInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setSyntaxType(ReferenceListSyntaxType.forNumber(0)) + .addAllEntries(new ArrayList()) + .build(); + client.verifyReferenceList(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } } diff --git a/java-chronicle/google-cloud-chronicle/src/test/java/com/google/cloud/chronicle/v1/RuleExecutionErrorServiceClientHttpJsonTest.java b/java-chronicle/google-cloud-chronicle/src/test/java/com/google/cloud/chronicle/v1/RuleExecutionErrorServiceClientHttpJsonTest.java new file mode 100644 index 000000000000..dea8e5a1c667 --- /dev/null +++ b/java-chronicle/google-cloud-chronicle/src/test/java/com/google/cloud/chronicle/v1/RuleExecutionErrorServiceClientHttpJsonTest.java @@ -0,0 +1,177 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.chronicle.v1; + +import static com.google.cloud.chronicle.v1.RuleExecutionErrorServiceClient.ListRuleExecutionErrorsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.chronicle.v1.stub.HttpJsonRuleExecutionErrorServiceStub; +import com.google.common.collect.Lists; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class RuleExecutionErrorServiceClientHttpJsonTest { + private static MockHttpService mockService; + private static RuleExecutionErrorServiceClient client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonRuleExecutionErrorServiceStub.getMethodDescriptors(), + RuleExecutionErrorServiceSettings.getDefaultEndpoint()); + RuleExecutionErrorServiceSettings settings = + RuleExecutionErrorServiceSettings.newHttpJsonBuilder() + .setTransportChannelProvider( + RuleExecutionErrorServiceSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = RuleExecutionErrorServiceClient.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void listRuleExecutionErrorsTest() throws Exception { + RuleExecutionError responsesElement = RuleExecutionError.newBuilder().build(); + ListRuleExecutionErrorsResponse expectedResponse = + ListRuleExecutionErrorsResponse.newBuilder() + .setNextPageToken("") + .addAllRuleExecutionErrors(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + InstanceName parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + + ListRuleExecutionErrorsPagedResponse pagedListResponse = client.listRuleExecutionErrors(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRuleExecutionErrorsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listRuleExecutionErrorsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + InstanceName parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + client.listRuleExecutionErrors(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listRuleExecutionErrorsTest2() throws Exception { + RuleExecutionError responsesElement = RuleExecutionError.newBuilder().build(); + ListRuleExecutionErrorsResponse expectedResponse = + ListRuleExecutionErrorsResponse.newBuilder() + .setNextPageToken("") + .addAllRuleExecutionErrors(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-5197/locations/location-5197/instances/instance-5197"; + + ListRuleExecutionErrorsPagedResponse pagedListResponse = client.listRuleExecutionErrors(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRuleExecutionErrorsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listRuleExecutionErrorsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-5197/locations/location-5197/instances/instance-5197"; + client.listRuleExecutionErrors(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-chronicle/google-cloud-chronicle/src/test/java/com/google/cloud/chronicle/v1/RuleExecutionErrorServiceClientTest.java b/java-chronicle/google-cloud-chronicle/src/test/java/com/google/cloud/chronicle/v1/RuleExecutionErrorServiceClientTest.java new file mode 100644 index 000000000000..f2be1acc1b40 --- /dev/null +++ b/java-chronicle/google-cloud-chronicle/src/test/java/com/google/cloud/chronicle/v1/RuleExecutionErrorServiceClientTest.java @@ -0,0 +1,171 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.chronicle.v1; + +import static com.google.cloud.chronicle.v1.RuleExecutionErrorServiceClient.ListRuleExecutionErrorsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.common.collect.Lists; +import com.google.protobuf.AbstractMessage; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import java.util.UUID; +import javax.annotation.Generated; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@Generated("by gapic-generator-java") +public class RuleExecutionErrorServiceClientTest { + private static MockRuleExecutionErrorService mockRuleExecutionErrorService; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private RuleExecutionErrorServiceClient client; + + @BeforeClass + public static void startStaticServer() { + mockRuleExecutionErrorService = new MockRuleExecutionErrorService(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockRuleExecutionErrorService)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + RuleExecutionErrorServiceSettings settings = + RuleExecutionErrorServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = RuleExecutionErrorServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listRuleExecutionErrorsTest() throws Exception { + RuleExecutionError responsesElement = RuleExecutionError.newBuilder().build(); + ListRuleExecutionErrorsResponse expectedResponse = + ListRuleExecutionErrorsResponse.newBuilder() + .setNextPageToken("") + .addAllRuleExecutionErrors(Arrays.asList(responsesElement)) + .build(); + mockRuleExecutionErrorService.addResponse(expectedResponse); + + InstanceName parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + + ListRuleExecutionErrorsPagedResponse pagedListResponse = client.listRuleExecutionErrors(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRuleExecutionErrorsList().get(0), resources.get(0)); + + List actualRequests = mockRuleExecutionErrorService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListRuleExecutionErrorsRequest actualRequest = + ((ListRuleExecutionErrorsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listRuleExecutionErrorsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRuleExecutionErrorService.addException(exception); + + try { + InstanceName parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + client.listRuleExecutionErrors(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listRuleExecutionErrorsTest2() throws Exception { + RuleExecutionError responsesElement = RuleExecutionError.newBuilder().build(); + ListRuleExecutionErrorsResponse expectedResponse = + ListRuleExecutionErrorsResponse.newBuilder() + .setNextPageToken("") + .addAllRuleExecutionErrors(Arrays.asList(responsesElement)) + .build(); + mockRuleExecutionErrorService.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListRuleExecutionErrorsPagedResponse pagedListResponse = client.listRuleExecutionErrors(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRuleExecutionErrorsList().get(0), resources.get(0)); + + List actualRequests = mockRuleExecutionErrorService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListRuleExecutionErrorsRequest actualRequest = + ((ListRuleExecutionErrorsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listRuleExecutionErrorsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRuleExecutionErrorService.addException(exception); + + try { + String parent = "parent-995424086"; + client.listRuleExecutionErrors(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/java-chronicle/google-cloud-chronicle/src/test/java/com/google/cloud/chronicle/v1/RuleServiceClientHttpJsonTest.java b/java-chronicle/google-cloud-chronicle/src/test/java/com/google/cloud/chronicle/v1/RuleServiceClientHttpJsonTest.java index de80c1d2ef1f..9b89060a7882 100644 --- a/java-chronicle/google-cloud-chronicle/src/test/java/com/google/cloud/chronicle/v1/RuleServiceClientHttpJsonTest.java +++ b/java-chronicle/google-cloud-chronicle/src/test/java/com/google/cloud/chronicle/v1/RuleServiceClientHttpJsonTest.java @@ -636,6 +636,100 @@ public void deleteRuleExceptionTest2() throws Exception { } } + @Test + public void verifyRuleTextTest() throws Exception { + VerifyRuleTextResponse expectedResponse = + VerifyRuleTextResponse.newBuilder() + .setSuccess(true) + .addAllCompilationDiagnostics(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + InstanceName instance = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + String ruleText = "ruleText763458121"; + + VerifyRuleTextResponse actualResponse = client.verifyRuleText(instance, ruleText); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void verifyRuleTextExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + InstanceName instance = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + String ruleText = "ruleText763458121"; + client.verifyRuleText(instance, ruleText); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void verifyRuleTextTest2() throws Exception { + VerifyRuleTextResponse expectedResponse = + VerifyRuleTextResponse.newBuilder() + .setSuccess(true) + .addAllCompilationDiagnostics(new ArrayList()) + .build(); + mockService.addResponse(expectedResponse); + + String instance = "projects/project-2526/locations/location-2526/instances/instance-2526"; + String ruleText = "ruleText763458121"; + + VerifyRuleTextResponse actualResponse = client.verifyRuleText(instance, ruleText); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void verifyRuleTextExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String instance = "projects/project-2526/locations/location-2526/instances/instance-2526"; + String ruleText = "ruleText763458121"; + client.verifyRuleText(instance, ruleText); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void listRuleRevisionsTest() throws Exception { Rule responsesElement = Rule.newBuilder().build(); diff --git a/java-chronicle/google-cloud-chronicle/src/test/java/com/google/cloud/chronicle/v1/RuleServiceClientTest.java b/java-chronicle/google-cloud-chronicle/src/test/java/com/google/cloud/chronicle/v1/RuleServiceClientTest.java index 01f0742a3e80..8fa50d03a6dd 100644 --- a/java-chronicle/google-cloud-chronicle/src/test/java/com/google/cloud/chronicle/v1/RuleServiceClientTest.java +++ b/java-chronicle/google-cloud-chronicle/src/test/java/com/google/cloud/chronicle/v1/RuleServiceClientTest.java @@ -541,6 +541,90 @@ public void deleteRuleExceptionTest2() throws Exception { } } + @Test + public void verifyRuleTextTest() throws Exception { + VerifyRuleTextResponse expectedResponse = + VerifyRuleTextResponse.newBuilder() + .setSuccess(true) + .addAllCompilationDiagnostics(new ArrayList()) + .build(); + mockRuleService.addResponse(expectedResponse); + + InstanceName instance = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + String ruleText = "ruleText763458121"; + + VerifyRuleTextResponse actualResponse = client.verifyRuleText(instance, ruleText); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRuleService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + VerifyRuleTextRequest actualRequest = ((VerifyRuleTextRequest) actualRequests.get(0)); + + Assert.assertEquals(instance.toString(), actualRequest.getInstance()); + Assert.assertEquals(ruleText, actualRequest.getRuleText()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void verifyRuleTextExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRuleService.addException(exception); + + try { + InstanceName instance = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + String ruleText = "ruleText763458121"; + client.verifyRuleText(instance, ruleText); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void verifyRuleTextTest2() throws Exception { + VerifyRuleTextResponse expectedResponse = + VerifyRuleTextResponse.newBuilder() + .setSuccess(true) + .addAllCompilationDiagnostics(new ArrayList()) + .build(); + mockRuleService.addResponse(expectedResponse); + + String instance = "instance555127957"; + String ruleText = "ruleText763458121"; + + VerifyRuleTextResponse actualResponse = client.verifyRuleText(instance, ruleText); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockRuleService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + VerifyRuleTextRequest actualRequest = ((VerifyRuleTextRequest) actualRequests.get(0)); + + Assert.assertEquals(instance, actualRequest.getInstance()); + Assert.assertEquals(ruleText, actualRequest.getRuleText()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void verifyRuleTextExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockRuleService.addException(exception); + + try { + String instance = "instance555127957"; + String ruleText = "ruleText763458121"; + client.verifyRuleText(instance, ruleText); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + @Test public void listRuleRevisionsTest() throws Exception { Rule responsesElement = Rule.newBuilder().build(); diff --git a/java-chronicle/grpc-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/ReferenceListServiceGrpc.java b/java-chronicle/grpc-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/ReferenceListServiceGrpc.java index bdb3528f3a8f..5caa028461c1 100644 --- a/java-chronicle/grpc-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/ReferenceListServiceGrpc.java +++ b/java-chronicle/grpc-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/ReferenceListServiceGrpc.java @@ -227,6 +227,56 @@ private ReferenceListServiceGrpc() {} return getUpdateReferenceListMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.chronicle.v1.VerifyReferenceListRequest, + com.google.cloud.chronicle.v1.VerifyReferenceListResponse> + getVerifyReferenceListMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "VerifyReferenceList", + requestType = com.google.cloud.chronicle.v1.VerifyReferenceListRequest.class, + responseType = com.google.cloud.chronicle.v1.VerifyReferenceListResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.chronicle.v1.VerifyReferenceListRequest, + com.google.cloud.chronicle.v1.VerifyReferenceListResponse> + getVerifyReferenceListMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.chronicle.v1.VerifyReferenceListRequest, + com.google.cloud.chronicle.v1.VerifyReferenceListResponse> + getVerifyReferenceListMethod; + if ((getVerifyReferenceListMethod = ReferenceListServiceGrpc.getVerifyReferenceListMethod) + == null) { + synchronized (ReferenceListServiceGrpc.class) { + if ((getVerifyReferenceListMethod = ReferenceListServiceGrpc.getVerifyReferenceListMethod) + == null) { + ReferenceListServiceGrpc.getVerifyReferenceListMethod = + getVerifyReferenceListMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "VerifyReferenceList")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.chronicle.v1.VerifyReferenceListRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.chronicle.v1.VerifyReferenceListResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new ReferenceListServiceMethodDescriptorSupplier("VerifyReferenceList")) + .build(); + } + } + } + return getVerifyReferenceListMethod; + } + /** Creates a new async stub that supports all call types for the service */ public static ReferenceListServiceStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -346,6 +396,21 @@ default void updateReferenceList( io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( getUpdateReferenceListMethod(), responseObserver); } + + /** + * + * + *
+     * VerifyReferenceList validates list content and returns line errors, if any.
+     * 
+ */ + default void verifyReferenceList( + com.google.cloud.chronicle.v1.VerifyReferenceListRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getVerifyReferenceListMethod(), responseObserver); + } } /** @@ -447,6 +512,23 @@ public void updateReferenceList( request, responseObserver); } + + /** + * + * + *
+     * VerifyReferenceList validates list content and returns line errors, if any.
+     * 
+ */ + public void verifyReferenceList( + com.google.cloud.chronicle.v1.VerifyReferenceListRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getVerifyReferenceListMethod(), getCallOptions()), + request, + responseObserver); + } } /** @@ -524,6 +606,20 @@ public com.google.cloud.chronicle.v1.ReferenceList updateReferenceList( return io.grpc.stub.ClientCalls.blockingV2UnaryCall( getChannel(), getUpdateReferenceListMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * VerifyReferenceList validates list content and returns line errors, if any.
+     * 
+ */ + public com.google.cloud.chronicle.v1.VerifyReferenceListResponse verifyReferenceList( + com.google.cloud.chronicle.v1.VerifyReferenceListRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getVerifyReferenceListMethod(), getCallOptions(), request); + } } /** @@ -597,6 +693,19 @@ public com.google.cloud.chronicle.v1.ReferenceList updateReferenceList( return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getUpdateReferenceListMethod(), getCallOptions(), request); } + + /** + * + * + *
+     * VerifyReferenceList validates list content and returns line errors, if any.
+     * 
+ */ + public com.google.cloud.chronicle.v1.VerifyReferenceListResponse verifyReferenceList( + com.google.cloud.chronicle.v1.VerifyReferenceListRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getVerifyReferenceListMethod(), getCallOptions(), request); + } } /** @@ -674,12 +783,27 @@ protected ReferenceListServiceFutureStub build( return io.grpc.stub.ClientCalls.futureUnaryCall( getChannel().newCall(getUpdateReferenceListMethod(), getCallOptions()), request); } + + /** + * + * + *
+     * VerifyReferenceList validates list content and returns line errors, if any.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.chronicle.v1.VerifyReferenceListResponse> + verifyReferenceList(com.google.cloud.chronicle.v1.VerifyReferenceListRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getVerifyReferenceListMethod(), getCallOptions()), request); + } } private static final int METHODID_GET_REFERENCE_LIST = 0; private static final int METHODID_LIST_REFERENCE_LISTS = 1; private static final int METHODID_CREATE_REFERENCE_LIST = 2; private static final int METHODID_UPDATE_REFERENCE_LIST = 3; + private static final int METHODID_VERIFY_REFERENCE_LIST = 4; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -723,6 +847,13 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_VERIFY_REFERENCE_LIST: + serviceImpl.verifyReferenceList( + (com.google.cloud.chronicle.v1.VerifyReferenceListRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.chronicle.v1.VerifyReferenceListResponse>) + responseObserver); + break; default: throw new AssertionError(); } @@ -769,6 +900,13 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser com.google.cloud.chronicle.v1.UpdateReferenceListRequest, com.google.cloud.chronicle.v1.ReferenceList>( service, METHODID_UPDATE_REFERENCE_LIST))) + .addMethod( + getVerifyReferenceListMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.chronicle.v1.VerifyReferenceListRequest, + com.google.cloud.chronicle.v1.VerifyReferenceListResponse>( + service, METHODID_VERIFY_REFERENCE_LIST))) .build(); } @@ -824,6 +962,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getListReferenceListsMethod()) .addMethod(getCreateReferenceListMethod()) .addMethod(getUpdateReferenceListMethod()) + .addMethod(getVerifyReferenceListMethod()) .build(); } } diff --git a/java-chronicle/grpc-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/RuleExecutionErrorServiceGrpc.java b/java-chronicle/grpc-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/RuleExecutionErrorServiceGrpc.java new file mode 100644 index 000000000000..f4eb29aae3ba --- /dev/null +++ b/java-chronicle/grpc-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/RuleExecutionErrorServiceGrpc.java @@ -0,0 +1,445 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.chronicle.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * RuleExecutionErrorService contains endpoints related to rule execution
+ * errors.
+ * 
+ */ +@io.grpc.stub.annotations.GrpcGenerated +public final class RuleExecutionErrorServiceGrpc { + + private RuleExecutionErrorServiceGrpc() {} + + public static final java.lang.String SERVICE_NAME = + "google.cloud.chronicle.v1.RuleExecutionErrorService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest, + com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse> + getListRuleExecutionErrorsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListRuleExecutionErrors", + requestType = com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest.class, + responseType = com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest, + com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse> + getListRuleExecutionErrorsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest, + com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse> + getListRuleExecutionErrorsMethod; + if ((getListRuleExecutionErrorsMethod = + RuleExecutionErrorServiceGrpc.getListRuleExecutionErrorsMethod) + == null) { + synchronized (RuleExecutionErrorServiceGrpc.class) { + if ((getListRuleExecutionErrorsMethod = + RuleExecutionErrorServiceGrpc.getListRuleExecutionErrorsMethod) + == null) { + RuleExecutionErrorServiceGrpc.getListRuleExecutionErrorsMethod = + getListRuleExecutionErrorsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListRuleExecutionErrors")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new RuleExecutionErrorServiceMethodDescriptorSupplier( + "ListRuleExecutionErrors")) + .build(); + } + } + } + return getListRuleExecutionErrorsMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static RuleExecutionErrorServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public RuleExecutionErrorServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new RuleExecutionErrorServiceStub(channel, callOptions); + } + }; + return RuleExecutionErrorServiceStub.newStub(factory, channel); + } + + /** Creates a new blocking-style stub that supports all types of calls on the service */ + public static RuleExecutionErrorServiceBlockingV2Stub newBlockingV2Stub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public RuleExecutionErrorServiceBlockingV2Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new RuleExecutionErrorServiceBlockingV2Stub(channel, callOptions); + } + }; + return RuleExecutionErrorServiceBlockingV2Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static RuleExecutionErrorServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public RuleExecutionErrorServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new RuleExecutionErrorServiceBlockingStub(channel, callOptions); + } + }; + return RuleExecutionErrorServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static RuleExecutionErrorServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public RuleExecutionErrorServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new RuleExecutionErrorServiceFutureStub(channel, callOptions); + } + }; + return RuleExecutionErrorServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * RuleExecutionErrorService contains endpoints related to rule execution
+   * errors.
+   * 
+ */ + public interface AsyncService { + + /** + * + * + *
+     * Lists rule execution errors.
+     * 
+ */ + default void listRuleExecutionErrors( + com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListRuleExecutionErrorsMethod(), responseObserver); + } + } + + /** + * Base class for the server implementation of the service RuleExecutionErrorService. + * + *
+   * RuleExecutionErrorService contains endpoints related to rule execution
+   * errors.
+   * 
+ */ + public abstract static class RuleExecutionErrorServiceImplBase + implements io.grpc.BindableService, AsyncService { + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return RuleExecutionErrorServiceGrpc.bindService(this); + } + } + + /** + * A stub to allow clients to do asynchronous rpc calls to service RuleExecutionErrorService. + * + *
+   * RuleExecutionErrorService contains endpoints related to rule execution
+   * errors.
+   * 
+ */ + public static final class RuleExecutionErrorServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private RuleExecutionErrorServiceStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected RuleExecutionErrorServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new RuleExecutionErrorServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists rule execution errors.
+     * 
+ */ + public void listRuleExecutionErrors( + com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListRuleExecutionErrorsMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * A stub to allow clients to do synchronous rpc calls to service RuleExecutionErrorService. + * + *
+   * RuleExecutionErrorService contains endpoints related to rule execution
+   * errors.
+   * 
+ */ + public static final class RuleExecutionErrorServiceBlockingV2Stub + extends io.grpc.stub.AbstractBlockingStub { + private RuleExecutionErrorServiceBlockingV2Stub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected RuleExecutionErrorServiceBlockingV2Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new RuleExecutionErrorServiceBlockingV2Stub(channel, callOptions); + } + + /** + * + * + *
+     * Lists rule execution errors.
+     * 
+ */ + public com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse listRuleExecutionErrors( + com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getListRuleExecutionErrorsMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do limited synchronous rpc calls to service + * RuleExecutionErrorService. + * + *
+   * RuleExecutionErrorService contains endpoints related to rule execution
+   * errors.
+   * 
+ */ + public static final class RuleExecutionErrorServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private RuleExecutionErrorServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected RuleExecutionErrorServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new RuleExecutionErrorServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists rule execution errors.
+     * 
+ */ + public com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse listRuleExecutionErrors( + com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListRuleExecutionErrorsMethod(), getCallOptions(), request); + } + } + + /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service + * RuleExecutionErrorService. + * + *
+   * RuleExecutionErrorService contains endpoints related to rule execution
+   * errors.
+   * 
+ */ + public static final class RuleExecutionErrorServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private RuleExecutionErrorServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected RuleExecutionErrorServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new RuleExecutionErrorServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists rule execution errors.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse> + listRuleExecutionErrors( + com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListRuleExecutionErrorsMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_RULE_EXECUTION_ERRORS = 0; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final AsyncService serviceImpl; + private final int methodId; + + MethodHandlers(AsyncService serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_LIST_RULE_EXECUTION_ERRORS: + serviceImpl.listRuleExecutionErrors( + (com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse>) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListRuleExecutionErrorsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest, + com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse>( + service, METHODID_LIST_RULE_EXECUTION_ERRORS))) + .build(); + } + + private abstract static class RuleExecutionErrorServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + RuleExecutionErrorServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.chronicle.v1.RuleExecutionErrorProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("RuleExecutionErrorService"); + } + } + + private static final class RuleExecutionErrorServiceFileDescriptorSupplier + extends RuleExecutionErrorServiceBaseDescriptorSupplier { + RuleExecutionErrorServiceFileDescriptorSupplier() {} + } + + private static final class RuleExecutionErrorServiceMethodDescriptorSupplier + extends RuleExecutionErrorServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final java.lang.String methodName; + + RuleExecutionErrorServiceMethodDescriptorSupplier(java.lang.String methodName) { + this.methodName = methodName; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { + return getServiceDescriptor().findMethodByName(methodName); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (RuleExecutionErrorServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new RuleExecutionErrorServiceFileDescriptorSupplier()) + .addMethod(getListRuleExecutionErrorsMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java-chronicle/grpc-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/RuleServiceGrpc.java b/java-chronicle/grpc-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/RuleServiceGrpc.java index 2132e4942a50..39c23c4bc11e 100644 --- a/java-chronicle/grpc-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/RuleServiceGrpc.java +++ b/java-chronicle/grpc-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/RuleServiceGrpc.java @@ -239,6 +239,53 @@ private RuleServiceGrpc() {} return getDeleteRuleMethod; } + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.chronicle.v1.VerifyRuleTextRequest, + com.google.cloud.chronicle.v1.VerifyRuleTextResponse> + getVerifyRuleTextMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "VerifyRuleText", + requestType = com.google.cloud.chronicle.v1.VerifyRuleTextRequest.class, + responseType = com.google.cloud.chronicle.v1.VerifyRuleTextResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.chronicle.v1.VerifyRuleTextRequest, + com.google.cloud.chronicle.v1.VerifyRuleTextResponse> + getVerifyRuleTextMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.chronicle.v1.VerifyRuleTextRequest, + com.google.cloud.chronicle.v1.VerifyRuleTextResponse> + getVerifyRuleTextMethod; + if ((getVerifyRuleTextMethod = RuleServiceGrpc.getVerifyRuleTextMethod) == null) { + synchronized (RuleServiceGrpc.class) { + if ((getVerifyRuleTextMethod = RuleServiceGrpc.getVerifyRuleTextMethod) == null) { + RuleServiceGrpc.getVerifyRuleTextMethod = + getVerifyRuleTextMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "VerifyRuleText")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.chronicle.v1.VerifyRuleTextRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.chronicle.v1.VerifyRuleTextResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new RuleServiceMethodDescriptorSupplier("VerifyRuleText")) + .build(); + } + } + } + return getVerifyRuleTextMethod; + } + private static volatile io.grpc.MethodDescriptor< com.google.cloud.chronicle.v1.ListRuleRevisionsRequest, com.google.cloud.chronicle.v1.ListRuleRevisionsResponse> @@ -691,6 +738,21 @@ default void deleteRule( io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteRuleMethod(), responseObserver); } + /** + * + * + *
+     * Verifies the given rule text.
+     * 
+ */ + default void verifyRuleText( + com.google.cloud.chronicle.v1.VerifyRuleTextRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getVerifyRuleTextMethod(), responseObserver); + } + /** * * @@ -903,6 +965,23 @@ public void deleteRule( getChannel().newCall(getDeleteRuleMethod(), getCallOptions()), request, responseObserver); } + /** + * + * + *
+     * Verifies the given rule text.
+     * 
+ */ + public void verifyRuleText( + com.google.cloud.chronicle.v1.VerifyRuleTextRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getVerifyRuleTextMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -1108,6 +1187,20 @@ public com.google.protobuf.Empty deleteRule( getChannel(), getDeleteRuleMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Verifies the given rule text.
+     * 
+ */ + public com.google.cloud.chronicle.v1.VerifyRuleTextResponse verifyRuleText( + com.google.cloud.chronicle.v1.VerifyRuleTextRequest request) + throws io.grpc.StatusException { + return io.grpc.stub.ClientCalls.blockingV2UnaryCall( + getChannel(), getVerifyRuleTextMethod(), getCallOptions(), request); + } + /** * * @@ -1293,6 +1386,19 @@ public com.google.protobuf.Empty deleteRule( getChannel(), getDeleteRuleMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Verifies the given rule text.
+     * 
+ */ + public com.google.cloud.chronicle.v1.VerifyRuleTextResponse verifyRuleText( + com.google.cloud.chronicle.v1.VerifyRuleTextRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getVerifyRuleTextMethod(), getCallOptions(), request); + } + /** * * @@ -1473,6 +1579,20 @@ public com.google.common.util.concurrent.ListenableFuture + * Verifies the given rule text. + * + */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.chronicle.v1.VerifyRuleTextResponse> + verifyRuleText(com.google.cloud.chronicle.v1.VerifyRuleTextRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getVerifyRuleTextMethod(), getCallOptions()), request); + } + /** * * @@ -1579,13 +1699,14 @@ public com.google.common.util.concurrent.ListenableFuture implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1630,6 +1751,12 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.cloud.chronicle.v1.DeleteRuleRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_VERIFY_RULE_TEXT: + serviceImpl.verifyRuleText( + (com.google.cloud.chronicle.v1.VerifyRuleTextRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; case METHODID_LIST_RULE_REVISIONS: serviceImpl.listRuleRevisions( (com.google.cloud.chronicle.v1.ListRuleRevisionsRequest) request, @@ -1720,6 +1847,13 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser new MethodHandlers< com.google.cloud.chronicle.v1.DeleteRuleRequest, com.google.protobuf.Empty>( service, METHODID_DELETE_RULE))) + .addMethod( + getVerifyRuleTextMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.chronicle.v1.VerifyRuleTextRequest, + com.google.cloud.chronicle.v1.VerifyRuleTextResponse>( + service, METHODID_VERIFY_RULE_TEXT))) .addMethod( getListRuleRevisionsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -1823,6 +1957,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getListRulesMethod()) .addMethod(getUpdateRuleMethod()) .addMethod(getDeleteRuleMethod()) + .addMethod(getVerifyRuleTextMethod()) .addMethod(getListRuleRevisionsMethod()) .addMethod(getCreateRetrohuntMethod()) .addMethod(getGetRetrohuntMethod()) diff --git a/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/ListRuleExecutionErrorsRequest.java b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/ListRuleExecutionErrorsRequest.java new file mode 100644 index 000000000000..1d605285c7bf --- /dev/null +++ b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/ListRuleExecutionErrorsRequest.java @@ -0,0 +1,1277 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/chronicle/v1/rule_execution_error.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.chronicle.v1; + +/** + * + * + *
+ * Request message for ListRuleExecutionErrors.
+ * 
+ * + * Protobuf type {@code google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest} + */ +@com.google.protobuf.Generated +public final class ListRuleExecutionErrorsRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest) + ListRuleExecutionErrorsRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListRuleExecutionErrorsRequest"); + } + + // Use ListRuleExecutionErrorsRequest.newBuilder() to construct. + private ListRuleExecutionErrorsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListRuleExecutionErrorsRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.chronicle.v1.RuleExecutionErrorProto + .internal_static_google_cloud_chronicle_v1_ListRuleExecutionErrorsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.chronicle.v1.RuleExecutionErrorProto + .internal_static_google_cloud_chronicle_v1_ListRuleExecutionErrorsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest.class, + com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + + /** + * + * + *
+   * Required. The instance to list rule execution errors from.
+   * Format:
+   * projects/{project}/locations/{location}/instances/{instance}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + 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; + return s; + } + } + + /** + * + * + *
+   * Required. The instance to list rule execution errors from.
+   * Format:
+   * projects/{project}/locations/{location}/instances/{instance}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_ = 0; + + /** + * + * + *
+   * The maximum number of rule execution errors to return. The service may
+   * return fewer than this value. If unspecified, at most 1000 rule execution
+   * errors will be returned. The maximum value is 10000; values above 10000
+   * will be coerced to 10000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private volatile java.lang.Object pageToken_ = ""; + + /** + * + * + *
+   * A page token, received from a previous `ListRuleExecutionErrors` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListRuleExecutionErrors`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + 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(); + pageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * A page token, received from a previous `ListRuleExecutionErrors` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListRuleExecutionErrors`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + + @SuppressWarnings("serial") + private volatile java.lang.Object filter_ = ""; + + /** + * + * + *
+   * A filter that can be used to retrieve specific rule execution errors.
+   * Only the following filters are allowed:
+   * ```
+   * rule = "{Rule.name}"
+   * curated_rule = "{CuratedRule.name}"
+   * ```
+   * The value for rule or curated_rule must be a valid rule resource name or a
+   * valid curated rule resource name specified in quotes.
+   *
+   * For 'rule', an optional 'revision_id' can be specified which can be used to
+   * fetch errors for a given revision of the rule. A '-' is also allowed to
+   * fetch errors across all revisions of the rule. If unspecified, only errors
+   * corresponding to the most recent revision of the rule will be returned. So
+   * these variations are all allowed:
+   * ```
+   * rule = "{Rule.name}"
+   * rule = "{Rule.name}@{Rule.revision_id}"
+   * rule = "{Rule.name}@-"
+   * ```
+   * Revision IDs are not supported for curated rules.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + 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(); + filter_ = s; + return s; + } + } + + /** + * + * + *
+   * A filter that can be used to retrieve specific rule execution errors.
+   * Only the following filters are allowed:
+   * ```
+   * rule = "{Rule.name}"
+   * curated_rule = "{CuratedRule.name}"
+   * ```
+   * The value for rule or curated_rule must be a valid rule resource name or a
+   * valid curated rule resource name specified in quotes.
+   *
+   * For 'rule', an optional 'revision_id' can be specified which can be used to
+   * fetch errors for a given revision of the rule. A '-' is also allowed to
+   * fetch errors across all revisions of the rule. If unspecified, only errors
+   * corresponding to the most recent revision of the rule will be returned. So
+   * these variations are all allowed:
+   * ```
+   * rule = "{Rule.name}"
+   * rule = "{Rule.name}@{Rule.revision_id}"
+   * rule = "{Rule.name}@-"
+   * ```
+   * Revision IDs are not supported for curated rules.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, filter_); + } + 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(parent_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(3, pageToken_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(filter_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, filter_); + } + 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 com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest)) { + return super.equals(obj); + } + com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest other = + (com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) 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) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest 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 com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest 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 com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest 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( + com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest 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; + } + + /** + * + * + *
+   * Request message for ListRuleExecutionErrors.
+   * 
+ * + * Protobuf type {@code google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest) + com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.chronicle.v1.RuleExecutionErrorProto + .internal_static_google_cloud_chronicle_v1_ListRuleExecutionErrorsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.chronicle.v1.RuleExecutionErrorProto + .internal_static_google_cloud_chronicle_v1_ListRuleExecutionErrorsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest.class, + com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest.Builder.class); + } + + // Construct using com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + parent_ = ""; + pageSize_ = 0; + pageToken_ = ""; + filter_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.chronicle.v1.RuleExecutionErrorProto + .internal_static_google_cloud_chronicle_v1_ListRuleExecutionErrorsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest + getDefaultInstanceForType() { + return com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest build() { + com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest buildPartial() { + com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest result = + new com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0( + com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.parent_ = parent_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.pageSize_ = pageSize_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.pageToken_ = pageToken_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.filter_ = filter_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest) { + return mergeFrom((com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest other) { + if (other + == com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + bitField0_ |= 0x00000008; + onChanged(); + } + 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: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: + { + filter_ = 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 bitField0_; + + private java.lang.Object parent_ = ""; + + /** + * + * + *
+     * Required. The instance to list rule execution errors from.
+     * Format:
+     * projects/{project}/locations/{location}/instances/{instance}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The instance to list rule execution errors from.
+     * Format:
+     * projects/{project}/locations/{location}/instances/{instance}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The instance to list rule execution errors from.
+     * Format:
+     * projects/{project}/locations/{location}/instances/{instance}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The instance to list rule execution errors from.
+     * Format:
+     * projects/{project}/locations/{location}/instances/{instance}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The instance to list rule execution errors from.
+     * Format:
+     * projects/{project}/locations/{location}/instances/{instance}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + parent_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int pageSize_; + + /** + * + * + *
+     * The maximum number of rule execution errors to return. The service may
+     * return fewer than this value. If unspecified, at most 1000 rule execution
+     * errors will be returned. The maximum value is 10000; values above 10000
+     * will be coerced to 10000.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + /** + * + * + *
+     * The maximum number of rule execution errors to return. The service may
+     * return fewer than this value. If unspecified, at most 1000 rule execution
+     * errors will be returned. The maximum value is 10000; values above 10000
+     * will be coerced to 10000.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * The maximum number of rule execution errors to return. The service may
+     * return fewer than this value. If unspecified, at most 1000 rule execution
+     * errors will be returned. The maximum value is 10000; values above 10000
+     * will be coerced to 10000.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + bitField0_ = (bitField0_ & ~0x00000002); + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + + /** + * + * + *
+     * A page token, received from a previous `ListRuleExecutionErrors` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListRuleExecutionErrors`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * A page token, received from a previous `ListRuleExecutionErrors` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListRuleExecutionErrors`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * A page token, received from a previous `ListRuleExecutionErrors` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListRuleExecutionErrors`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * A page token, received from a previous `ListRuleExecutionErrors` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListRuleExecutionErrors`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + pageToken_ = getDefaultInstance().getPageToken(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * A page token, received from a previous `ListRuleExecutionErrors` call.
+     * Provide this to retrieve the subsequent page.
+     *
+     * When paginating, all other parameters provided to `ListRuleExecutionErrors`
+     * must match the call that provided the page token.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + pageToken_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + + /** + * + * + *
+     * A filter that can be used to retrieve specific rule execution errors.
+     * Only the following filters are allowed:
+     * ```
+     * rule = "{Rule.name}"
+     * curated_rule = "{CuratedRule.name}"
+     * ```
+     * The value for rule or curated_rule must be a valid rule resource name or a
+     * valid curated rule resource name specified in quotes.
+     *
+     * For 'rule', an optional 'revision_id' can be specified which can be used to
+     * fetch errors for a given revision of the rule. A '-' is also allowed to
+     * fetch errors across all revisions of the rule. If unspecified, only errors
+     * corresponding to the most recent revision of the rule will be returned. So
+     * these variations are all allowed:
+     * ```
+     * rule = "{Rule.name}"
+     * rule = "{Rule.name}@{Rule.revision_id}"
+     * rule = "{Rule.name}@-"
+     * ```
+     * Revision IDs are not supported for curated rules.
+     * 
+ * + * string filter = 4; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * A filter that can be used to retrieve specific rule execution errors.
+     * Only the following filters are allowed:
+     * ```
+     * rule = "{Rule.name}"
+     * curated_rule = "{CuratedRule.name}"
+     * ```
+     * The value for rule or curated_rule must be a valid rule resource name or a
+     * valid curated rule resource name specified in quotes.
+     *
+     * For 'rule', an optional 'revision_id' can be specified which can be used to
+     * fetch errors for a given revision of the rule. A '-' is also allowed to
+     * fetch errors across all revisions of the rule. If unspecified, only errors
+     * corresponding to the most recent revision of the rule will be returned. So
+     * these variations are all allowed:
+     * ```
+     * rule = "{Rule.name}"
+     * rule = "{Rule.name}@{Rule.revision_id}"
+     * rule = "{Rule.name}@-"
+     * ```
+     * Revision IDs are not supported for curated rules.
+     * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * A filter that can be used to retrieve specific rule execution errors.
+     * Only the following filters are allowed:
+     * ```
+     * rule = "{Rule.name}"
+     * curated_rule = "{CuratedRule.name}"
+     * ```
+     * The value for rule or curated_rule must be a valid rule resource name or a
+     * valid curated rule resource name specified in quotes.
+     *
+     * For 'rule', an optional 'revision_id' can be specified which can be used to
+     * fetch errors for a given revision of the rule. A '-' is also allowed to
+     * fetch errors across all revisions of the rule. If unspecified, only errors
+     * corresponding to the most recent revision of the rule will be returned. So
+     * these variations are all allowed:
+     * ```
+     * rule = "{Rule.name}"
+     * rule = "{Rule.name}@{Rule.revision_id}"
+     * rule = "{Rule.name}@-"
+     * ```
+     * Revision IDs are not supported for curated rules.
+     * 
+ * + * string filter = 4; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * A filter that can be used to retrieve specific rule execution errors.
+     * Only the following filters are allowed:
+     * ```
+     * rule = "{Rule.name}"
+     * curated_rule = "{CuratedRule.name}"
+     * ```
+     * The value for rule or curated_rule must be a valid rule resource name or a
+     * valid curated rule resource name specified in quotes.
+     *
+     * For 'rule', an optional 'revision_id' can be specified which can be used to
+     * fetch errors for a given revision of the rule. A '-' is also allowed to
+     * fetch errors across all revisions of the rule. If unspecified, only errors
+     * corresponding to the most recent revision of the rule will be returned. So
+     * these variations are all allowed:
+     * ```
+     * rule = "{Rule.name}"
+     * rule = "{Rule.name}@{Rule.revision_id}"
+     * rule = "{Rule.name}@-"
+     * ```
+     * Revision IDs are not supported for curated rules.
+     * 
+ * + * string filter = 4; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + filter_ = getDefaultInstance().getFilter(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + + /** + * + * + *
+     * A filter that can be used to retrieve specific rule execution errors.
+     * Only the following filters are allowed:
+     * ```
+     * rule = "{Rule.name}"
+     * curated_rule = "{CuratedRule.name}"
+     * ```
+     * The value for rule or curated_rule must be a valid rule resource name or a
+     * valid curated rule resource name specified in quotes.
+     *
+     * For 'rule', an optional 'revision_id' can be specified which can be used to
+     * fetch errors for a given revision of the rule. A '-' is also allowed to
+     * fetch errors across all revisions of the rule. If unspecified, only errors
+     * corresponding to the most recent revision of the rule will be returned. So
+     * these variations are all allowed:
+     * ```
+     * rule = "{Rule.name}"
+     * rule = "{Rule.name}@{Rule.revision_id}"
+     * rule = "{Rule.name}@-"
+     * ```
+     * Revision IDs are not supported for curated rules.
+     * 
+ * + * string filter = 4; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + filter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest) + private static final com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest(); + } + + public static com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListRuleExecutionErrorsRequest 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 com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/ListRuleExecutionErrorsRequestOrBuilder.java b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/ListRuleExecutionErrorsRequestOrBuilder.java new file mode 100644 index 000000000000..16749d4533ec --- /dev/null +++ b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/ListRuleExecutionErrorsRequestOrBuilder.java @@ -0,0 +1,176 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/chronicle/v1/rule_execution_error.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.chronicle.v1; + +@com.google.protobuf.Generated +public interface ListRuleExecutionErrorsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The instance to list rule execution errors from.
+   * Format:
+   * projects/{project}/locations/{location}/instances/{instance}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + + /** + * + * + *
+   * Required. The instance to list rule execution errors from.
+   * Format:
+   * projects/{project}/locations/{location}/instances/{instance}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * The maximum number of rule execution errors to return. The service may
+   * return fewer than this value. If unspecified, at most 1000 rule execution
+   * errors will be returned. The maximum value is 10000; values above 10000
+   * will be coerced to 10000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A page token, received from a previous `ListRuleExecutionErrors` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListRuleExecutionErrors`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + + /** + * + * + *
+   * A page token, received from a previous `ListRuleExecutionErrors` call.
+   * Provide this to retrieve the subsequent page.
+   *
+   * When paginating, all other parameters provided to `ListRuleExecutionErrors`
+   * must match the call that provided the page token.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * A filter that can be used to retrieve specific rule execution errors.
+   * Only the following filters are allowed:
+   * ```
+   * rule = "{Rule.name}"
+   * curated_rule = "{CuratedRule.name}"
+   * ```
+   * The value for rule or curated_rule must be a valid rule resource name or a
+   * valid curated rule resource name specified in quotes.
+   *
+   * For 'rule', an optional 'revision_id' can be specified which can be used to
+   * fetch errors for a given revision of the rule. A '-' is also allowed to
+   * fetch errors across all revisions of the rule. If unspecified, only errors
+   * corresponding to the most recent revision of the rule will be returned. So
+   * these variations are all allowed:
+   * ```
+   * rule = "{Rule.name}"
+   * rule = "{Rule.name}@{Rule.revision_id}"
+   * rule = "{Rule.name}@-"
+   * ```
+   * Revision IDs are not supported for curated rules.
+   * 
+ * + * string filter = 4; + * + * @return The filter. + */ + java.lang.String getFilter(); + + /** + * + * + *
+   * A filter that can be used to retrieve specific rule execution errors.
+   * Only the following filters are allowed:
+   * ```
+   * rule = "{Rule.name}"
+   * curated_rule = "{CuratedRule.name}"
+   * ```
+   * The value for rule or curated_rule must be a valid rule resource name or a
+   * valid curated rule resource name specified in quotes.
+   *
+   * For 'rule', an optional 'revision_id' can be specified which can be used to
+   * fetch errors for a given revision of the rule. A '-' is also allowed to
+   * fetch errors across all revisions of the rule. If unspecified, only errors
+   * corresponding to the most recent revision of the rule will be returned. So
+   * these variations are all allowed:
+   * ```
+   * rule = "{Rule.name}"
+   * rule = "{Rule.name}@{Rule.revision_id}"
+   * rule = "{Rule.name}@-"
+   * ```
+   * Revision IDs are not supported for curated rules.
+   * 
+ * + * string filter = 4; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); +} diff --git a/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/ListRuleExecutionErrorsResponse.java b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/ListRuleExecutionErrorsResponse.java new file mode 100644 index 000000000000..e7ebbd465030 --- /dev/null +++ b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/ListRuleExecutionErrorsResponse.java @@ -0,0 +1,1158 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/chronicle/v1/rule_execution_error.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.chronicle.v1; + +/** + * + * + *
+ * Response message for ListRuleExecutionErrors.
+ * 
+ * + * Protobuf type {@code google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse} + */ +@com.google.protobuf.Generated +public final class ListRuleExecutionErrorsResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse) + ListRuleExecutionErrorsResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ListRuleExecutionErrorsResponse"); + } + + // Use ListRuleExecutionErrorsResponse.newBuilder() to construct. + private ListRuleExecutionErrorsResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ListRuleExecutionErrorsResponse() { + ruleExecutionErrors_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.chronicle.v1.RuleExecutionErrorProto + .internal_static_google_cloud_chronicle_v1_ListRuleExecutionErrorsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.chronicle.v1.RuleExecutionErrorProto + .internal_static_google_cloud_chronicle_v1_ListRuleExecutionErrorsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse.class, + com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse.Builder.class); + } + + public static final int RULE_EXECUTION_ERRORS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List ruleExecutionErrors_; + + /** + * + * + *
+   * List of rule execution errors.
+   * 
+ * + * repeated .google.cloud.chronicle.v1.RuleExecutionError rule_execution_errors = 1; + */ + @java.lang.Override + public java.util.List + getRuleExecutionErrorsList() { + return ruleExecutionErrors_; + } + + /** + * + * + *
+   * List of rule execution errors.
+   * 
+ * + * repeated .google.cloud.chronicle.v1.RuleExecutionError rule_execution_errors = 1; + */ + @java.lang.Override + public java.util.List + getRuleExecutionErrorsOrBuilderList() { + return ruleExecutionErrors_; + } + + /** + * + * + *
+   * List of rule execution errors.
+   * 
+ * + * repeated .google.cloud.chronicle.v1.RuleExecutionError rule_execution_errors = 1; + */ + @java.lang.Override + public int getRuleExecutionErrorsCount() { + return ruleExecutionErrors_.size(); + } + + /** + * + * + *
+   * List of rule execution errors.
+   * 
+ * + * repeated .google.cloud.chronicle.v1.RuleExecutionError rule_execution_errors = 1; + */ + @java.lang.Override + public com.google.cloud.chronicle.v1.RuleExecutionError getRuleExecutionErrors(int index) { + return ruleExecutionErrors_.get(index); + } + + /** + * + * + *
+   * List of rule execution errors.
+   * 
+ * + * repeated .google.cloud.chronicle.v1.RuleExecutionError rule_execution_errors = 1; + */ + @java.lang.Override + public com.google.cloud.chronicle.v1.RuleExecutionErrorOrBuilder getRuleExecutionErrorsOrBuilder( + int index) { + return ruleExecutionErrors_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + 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(); + nextPageToken_ = s; + return s; + } + } + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = 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 { + for (int i = 0; i < ruleExecutionErrors_.size(); i++) { + output.writeMessage(1, ruleExecutionErrors_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < ruleExecutionErrors_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, ruleExecutionErrors_.get(i)); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, nextPageToken_); + } + 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 com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse)) { + return super.equals(obj); + } + com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse other = + (com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse) obj; + + if (!getRuleExecutionErrorsList().equals(other.getRuleExecutionErrorsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) 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 (getRuleExecutionErrorsCount() > 0) { + hash = (37 * hash) + RULE_EXECUTION_ERRORS_FIELD_NUMBER; + hash = (53 * hash) + getRuleExecutionErrorsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse 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 com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse 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 com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse 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( + com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse 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; + } + + /** + * + * + *
+   * Response message for ListRuleExecutionErrors.
+   * 
+ * + * Protobuf type {@code google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse) + com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.chronicle.v1.RuleExecutionErrorProto + .internal_static_google_cloud_chronicle_v1_ListRuleExecutionErrorsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.chronicle.v1.RuleExecutionErrorProto + .internal_static_google_cloud_chronicle_v1_ListRuleExecutionErrorsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse.class, + com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse.Builder.class); + } + + // Construct using com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (ruleExecutionErrorsBuilder_ == null) { + ruleExecutionErrors_ = java.util.Collections.emptyList(); + } else { + ruleExecutionErrors_ = null; + ruleExecutionErrorsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.chronicle.v1.RuleExecutionErrorProto + .internal_static_google_cloud_chronicle_v1_ListRuleExecutionErrorsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse + getDefaultInstanceForType() { + return com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse build() { + com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse buildPartial() { + com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse result = + new com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse result) { + if (ruleExecutionErrorsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + ruleExecutionErrors_ = java.util.Collections.unmodifiableList(ruleExecutionErrors_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.ruleExecutionErrors_ = ruleExecutionErrors_; + } else { + result.ruleExecutionErrors_ = ruleExecutionErrorsBuilder_.build(); + } + } + + private void buildPartial0( + com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.nextPageToken_ = nextPageToken_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse) { + return mergeFrom((com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse other) { + if (other + == com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse.getDefaultInstance()) + return this; + if (ruleExecutionErrorsBuilder_ == null) { + if (!other.ruleExecutionErrors_.isEmpty()) { + if (ruleExecutionErrors_.isEmpty()) { + ruleExecutionErrors_ = other.ruleExecutionErrors_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRuleExecutionErrorsIsMutable(); + ruleExecutionErrors_.addAll(other.ruleExecutionErrors_); + } + onChanged(); + } + } else { + if (!other.ruleExecutionErrors_.isEmpty()) { + if (ruleExecutionErrorsBuilder_.isEmpty()) { + ruleExecutionErrorsBuilder_.dispose(); + ruleExecutionErrorsBuilder_ = null; + ruleExecutionErrors_ = other.ruleExecutionErrors_; + bitField0_ = (bitField0_ & ~0x00000001); + ruleExecutionErrorsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetRuleExecutionErrorsFieldBuilder() + : null; + } else { + ruleExecutionErrorsBuilder_.addAllMessages(other.ruleExecutionErrors_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + bitField0_ |= 0x00000002; + onChanged(); + } + 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: + { + com.google.cloud.chronicle.v1.RuleExecutionError m = + input.readMessage( + com.google.cloud.chronicle.v1.RuleExecutionError.parser(), + extensionRegistry); + if (ruleExecutionErrorsBuilder_ == null) { + ensureRuleExecutionErrorsIsMutable(); + ruleExecutionErrors_.add(m); + } else { + ruleExecutionErrorsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + 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.util.List ruleExecutionErrors_ = + java.util.Collections.emptyList(); + + private void ensureRuleExecutionErrorsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + ruleExecutionErrors_ = + new java.util.ArrayList( + ruleExecutionErrors_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.chronicle.v1.RuleExecutionError, + com.google.cloud.chronicle.v1.RuleExecutionError.Builder, + com.google.cloud.chronicle.v1.RuleExecutionErrorOrBuilder> + ruleExecutionErrorsBuilder_; + + /** + * + * + *
+     * List of rule execution errors.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.RuleExecutionError rule_execution_errors = 1; + * + */ + public java.util.List + getRuleExecutionErrorsList() { + if (ruleExecutionErrorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(ruleExecutionErrors_); + } else { + return ruleExecutionErrorsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * List of rule execution errors.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.RuleExecutionError rule_execution_errors = 1; + * + */ + public int getRuleExecutionErrorsCount() { + if (ruleExecutionErrorsBuilder_ == null) { + return ruleExecutionErrors_.size(); + } else { + return ruleExecutionErrorsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * List of rule execution errors.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.RuleExecutionError rule_execution_errors = 1; + * + */ + public com.google.cloud.chronicle.v1.RuleExecutionError getRuleExecutionErrors(int index) { + if (ruleExecutionErrorsBuilder_ == null) { + return ruleExecutionErrors_.get(index); + } else { + return ruleExecutionErrorsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * List of rule execution errors.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.RuleExecutionError rule_execution_errors = 1; + * + */ + public Builder setRuleExecutionErrors( + int index, com.google.cloud.chronicle.v1.RuleExecutionError value) { + if (ruleExecutionErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRuleExecutionErrorsIsMutable(); + ruleExecutionErrors_.set(index, value); + onChanged(); + } else { + ruleExecutionErrorsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * List of rule execution errors.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.RuleExecutionError rule_execution_errors = 1; + * + */ + public Builder setRuleExecutionErrors( + int index, com.google.cloud.chronicle.v1.RuleExecutionError.Builder builderForValue) { + if (ruleExecutionErrorsBuilder_ == null) { + ensureRuleExecutionErrorsIsMutable(); + ruleExecutionErrors_.set(index, builderForValue.build()); + onChanged(); + } else { + ruleExecutionErrorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * List of rule execution errors.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.RuleExecutionError rule_execution_errors = 1; + * + */ + public Builder addRuleExecutionErrors(com.google.cloud.chronicle.v1.RuleExecutionError value) { + if (ruleExecutionErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRuleExecutionErrorsIsMutable(); + ruleExecutionErrors_.add(value); + onChanged(); + } else { + ruleExecutionErrorsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * List of rule execution errors.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.RuleExecutionError rule_execution_errors = 1; + * + */ + public Builder addRuleExecutionErrors( + int index, com.google.cloud.chronicle.v1.RuleExecutionError value) { + if (ruleExecutionErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRuleExecutionErrorsIsMutable(); + ruleExecutionErrors_.add(index, value); + onChanged(); + } else { + ruleExecutionErrorsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * List of rule execution errors.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.RuleExecutionError rule_execution_errors = 1; + * + */ + public Builder addRuleExecutionErrors( + com.google.cloud.chronicle.v1.RuleExecutionError.Builder builderForValue) { + if (ruleExecutionErrorsBuilder_ == null) { + ensureRuleExecutionErrorsIsMutable(); + ruleExecutionErrors_.add(builderForValue.build()); + onChanged(); + } else { + ruleExecutionErrorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * List of rule execution errors.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.RuleExecutionError rule_execution_errors = 1; + * + */ + public Builder addRuleExecutionErrors( + int index, com.google.cloud.chronicle.v1.RuleExecutionError.Builder builderForValue) { + if (ruleExecutionErrorsBuilder_ == null) { + ensureRuleExecutionErrorsIsMutable(); + ruleExecutionErrors_.add(index, builderForValue.build()); + onChanged(); + } else { + ruleExecutionErrorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * List of rule execution errors.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.RuleExecutionError rule_execution_errors = 1; + * + */ + public Builder addAllRuleExecutionErrors( + java.lang.Iterable values) { + if (ruleExecutionErrorsBuilder_ == null) { + ensureRuleExecutionErrorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, ruleExecutionErrors_); + onChanged(); + } else { + ruleExecutionErrorsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * List of rule execution errors.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.RuleExecutionError rule_execution_errors = 1; + * + */ + public Builder clearRuleExecutionErrors() { + if (ruleExecutionErrorsBuilder_ == null) { + ruleExecutionErrors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + ruleExecutionErrorsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * List of rule execution errors.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.RuleExecutionError rule_execution_errors = 1; + * + */ + public Builder removeRuleExecutionErrors(int index) { + if (ruleExecutionErrorsBuilder_ == null) { + ensureRuleExecutionErrorsIsMutable(); + ruleExecutionErrors_.remove(index); + onChanged(); + } else { + ruleExecutionErrorsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * List of rule execution errors.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.RuleExecutionError rule_execution_errors = 1; + * + */ + public com.google.cloud.chronicle.v1.RuleExecutionError.Builder getRuleExecutionErrorsBuilder( + int index) { + return internalGetRuleExecutionErrorsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * List of rule execution errors.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.RuleExecutionError rule_execution_errors = 1; + * + */ + public com.google.cloud.chronicle.v1.RuleExecutionErrorOrBuilder + getRuleExecutionErrorsOrBuilder(int index) { + if (ruleExecutionErrorsBuilder_ == null) { + return ruleExecutionErrors_.get(index); + } else { + return ruleExecutionErrorsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * List of rule execution errors.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.RuleExecutionError rule_execution_errors = 1; + * + */ + public java.util.List + getRuleExecutionErrorsOrBuilderList() { + if (ruleExecutionErrorsBuilder_ != null) { + return ruleExecutionErrorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(ruleExecutionErrors_); + } + } + + /** + * + * + *
+     * List of rule execution errors.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.RuleExecutionError rule_execution_errors = 1; + * + */ + public com.google.cloud.chronicle.v1.RuleExecutionError.Builder + addRuleExecutionErrorsBuilder() { + return internalGetRuleExecutionErrorsFieldBuilder() + .addBuilder(com.google.cloud.chronicle.v1.RuleExecutionError.getDefaultInstance()); + } + + /** + * + * + *
+     * List of rule execution errors.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.RuleExecutionError rule_execution_errors = 1; + * + */ + public com.google.cloud.chronicle.v1.RuleExecutionError.Builder addRuleExecutionErrorsBuilder( + int index) { + return internalGetRuleExecutionErrorsFieldBuilder() + .addBuilder(index, com.google.cloud.chronicle.v1.RuleExecutionError.getDefaultInstance()); + } + + /** + * + * + *
+     * List of rule execution errors.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.RuleExecutionError rule_execution_errors = 1; + * + */ + public java.util.List + getRuleExecutionErrorsBuilderList() { + return internalGetRuleExecutionErrorsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.chronicle.v1.RuleExecutionError, + com.google.cloud.chronicle.v1.RuleExecutionError.Builder, + com.google.cloud.chronicle.v1.RuleExecutionErrorOrBuilder> + internalGetRuleExecutionErrorsFieldBuilder() { + if (ruleExecutionErrorsBuilder_ == null) { + ruleExecutionErrorsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.chronicle.v1.RuleExecutionError, + com.google.cloud.chronicle.v1.RuleExecutionError.Builder, + com.google.cloud.chronicle.v1.RuleExecutionErrorOrBuilder>( + ruleExecutionErrors_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + ruleExecutionErrors_ = null; + } + return ruleExecutionErrorsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + nextPageToken_ = getDefaultInstance().getNextPageToken(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * A token, which can be sent as `page_token` to retrieve the next page.
+     * If this field is omitted, there are no subsequent pages.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + nextPageToken_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse) + private static final com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse(); + } + + public static com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListRuleExecutionErrorsResponse 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 com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/ListRuleExecutionErrorsResponseOrBuilder.java b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/ListRuleExecutionErrorsResponseOrBuilder.java new file mode 100644 index 000000000000..9483b333240c --- /dev/null +++ b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/ListRuleExecutionErrorsResponseOrBuilder.java @@ -0,0 +1,113 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/chronicle/v1/rule_execution_error.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.chronicle.v1; + +@com.google.protobuf.Generated +public interface ListRuleExecutionErrorsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of rule execution errors.
+   * 
+ * + * repeated .google.cloud.chronicle.v1.RuleExecutionError rule_execution_errors = 1; + */ + java.util.List getRuleExecutionErrorsList(); + + /** + * + * + *
+   * List of rule execution errors.
+   * 
+ * + * repeated .google.cloud.chronicle.v1.RuleExecutionError rule_execution_errors = 1; + */ + com.google.cloud.chronicle.v1.RuleExecutionError getRuleExecutionErrors(int index); + + /** + * + * + *
+   * List of rule execution errors.
+   * 
+ * + * repeated .google.cloud.chronicle.v1.RuleExecutionError rule_execution_errors = 1; + */ + int getRuleExecutionErrorsCount(); + + /** + * + * + *
+   * List of rule execution errors.
+   * 
+ * + * repeated .google.cloud.chronicle.v1.RuleExecutionError rule_execution_errors = 1; + */ + java.util.List + getRuleExecutionErrorsOrBuilderList(); + + /** + * + * + *
+   * List of rule execution errors.
+   * 
+ * + * repeated .google.cloud.chronicle.v1.RuleExecutionError rule_execution_errors = 1; + */ + com.google.cloud.chronicle.v1.RuleExecutionErrorOrBuilder getRuleExecutionErrorsOrBuilder( + int index); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + + /** + * + * + *
+   * A token, which can be sent as `page_token` to retrieve the next page.
+   * If this field is omitted, there are no subsequent pages.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/ReferenceListError.java b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/ReferenceListError.java new file mode 100644 index 000000000000..b16f68ea6b1a --- /dev/null +++ b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/ReferenceListError.java @@ -0,0 +1,697 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/chronicle/v1/reference_list.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.chronicle.v1; + +/** + * + * + *
+ * The error generated when verifying the reference list.
+ * 
+ * + * Protobuf type {@code google.cloud.chronicle.v1.ReferenceListError} + */ +@com.google.protobuf.Generated +public final class ReferenceListError extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.chronicle.v1.ReferenceListError) + ReferenceListErrorOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "ReferenceListError"); + } + + // Use ReferenceListError.newBuilder() to construct. + private ReferenceListError(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private ReferenceListError() { + errorMessage_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.chronicle.v1.ReferenceListProto + .internal_static_google_cloud_chronicle_v1_ReferenceListError_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.chronicle.v1.ReferenceListProto + .internal_static_google_cloud_chronicle_v1_ReferenceListError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.chronicle.v1.ReferenceListError.class, + com.google.cloud.chronicle.v1.ReferenceListError.Builder.class); + } + + public static final int LINE_NUMBER_FIELD_NUMBER = 1; + private int lineNumber_ = 0; + + /** + * + * + *
+   * 1-indexed line number where the error occurs.
+   * General list errors are indexed at -1.
+   * 
+ * + * int32 line_number = 1; + * + * @return The lineNumber. + */ + @java.lang.Override + public int getLineNumber() { + return lineNumber_; + } + + public static final int ERROR_MESSAGE_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object errorMessage_ = ""; + + /** + * + * + *
+   * Message explaining why the line is invalid.
+   * 
+ * + * string error_message = 2; + * + * @return The errorMessage. + */ + @java.lang.Override + public java.lang.String getErrorMessage() { + java.lang.Object ref = errorMessage_; + 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(); + errorMessage_ = s; + return s; + } + } + + /** + * + * + *
+   * Message explaining why the line is invalid.
+   * 
+ * + * string error_message = 2; + * + * @return The bytes for errorMessage. + */ + @java.lang.Override + public com.google.protobuf.ByteString getErrorMessageBytes() { + java.lang.Object ref = errorMessage_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + errorMessage_ = 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 (lineNumber_ != 0) { + output.writeInt32(1, lineNumber_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(errorMessage_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, errorMessage_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (lineNumber_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, lineNumber_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(errorMessage_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, errorMessage_); + } + 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 com.google.cloud.chronicle.v1.ReferenceListError)) { + return super.equals(obj); + } + com.google.cloud.chronicle.v1.ReferenceListError other = + (com.google.cloud.chronicle.v1.ReferenceListError) obj; + + if (getLineNumber() != other.getLineNumber()) return false; + if (!getErrorMessage().equals(other.getErrorMessage())) 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) + LINE_NUMBER_FIELD_NUMBER; + hash = (53 * hash) + getLineNumber(); + hash = (37 * hash) + ERROR_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getErrorMessage().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.chronicle.v1.ReferenceListError parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.chronicle.v1.ReferenceListError parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.chronicle.v1.ReferenceListError parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.chronicle.v1.ReferenceListError parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.chronicle.v1.ReferenceListError parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.chronicle.v1.ReferenceListError parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.chronicle.v1.ReferenceListError parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.chronicle.v1.ReferenceListError 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 com.google.cloud.chronicle.v1.ReferenceListError parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.chronicle.v1.ReferenceListError 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 com.google.cloud.chronicle.v1.ReferenceListError parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.chronicle.v1.ReferenceListError 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(com.google.cloud.chronicle.v1.ReferenceListError 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; + } + + /** + * + * + *
+   * The error generated when verifying the reference list.
+   * 
+ * + * Protobuf type {@code google.cloud.chronicle.v1.ReferenceListError} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.chronicle.v1.ReferenceListError) + com.google.cloud.chronicle.v1.ReferenceListErrorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.chronicle.v1.ReferenceListProto + .internal_static_google_cloud_chronicle_v1_ReferenceListError_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.chronicle.v1.ReferenceListProto + .internal_static_google_cloud_chronicle_v1_ReferenceListError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.chronicle.v1.ReferenceListError.class, + com.google.cloud.chronicle.v1.ReferenceListError.Builder.class); + } + + // Construct using com.google.cloud.chronicle.v1.ReferenceListError.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + lineNumber_ = 0; + errorMessage_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.chronicle.v1.ReferenceListProto + .internal_static_google_cloud_chronicle_v1_ReferenceListError_descriptor; + } + + @java.lang.Override + public com.google.cloud.chronicle.v1.ReferenceListError getDefaultInstanceForType() { + return com.google.cloud.chronicle.v1.ReferenceListError.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.chronicle.v1.ReferenceListError build() { + com.google.cloud.chronicle.v1.ReferenceListError result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.chronicle.v1.ReferenceListError buildPartial() { + com.google.cloud.chronicle.v1.ReferenceListError result = + new com.google.cloud.chronicle.v1.ReferenceListError(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.chronicle.v1.ReferenceListError result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.lineNumber_ = lineNumber_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.errorMessage_ = errorMessage_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.chronicle.v1.ReferenceListError) { + return mergeFrom((com.google.cloud.chronicle.v1.ReferenceListError) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.chronicle.v1.ReferenceListError other) { + if (other == com.google.cloud.chronicle.v1.ReferenceListError.getDefaultInstance()) + return this; + if (other.getLineNumber() != 0) { + setLineNumber(other.getLineNumber()); + } + if (!other.getErrorMessage().isEmpty()) { + errorMessage_ = other.errorMessage_; + bitField0_ |= 0x00000002; + onChanged(); + } + 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 8: + { + lineNumber_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + errorMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + 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 int lineNumber_; + + /** + * + * + *
+     * 1-indexed line number where the error occurs.
+     * General list errors are indexed at -1.
+     * 
+ * + * int32 line_number = 1; + * + * @return The lineNumber. + */ + @java.lang.Override + public int getLineNumber() { + return lineNumber_; + } + + /** + * + * + *
+     * 1-indexed line number where the error occurs.
+     * General list errors are indexed at -1.
+     * 
+ * + * int32 line_number = 1; + * + * @param value The lineNumber to set. + * @return This builder for chaining. + */ + public Builder setLineNumber(int value) { + + lineNumber_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * 1-indexed line number where the error occurs.
+     * General list errors are indexed at -1.
+     * 
+ * + * int32 line_number = 1; + * + * @return This builder for chaining. + */ + public Builder clearLineNumber() { + bitField0_ = (bitField0_ & ~0x00000001); + lineNumber_ = 0; + onChanged(); + return this; + } + + private java.lang.Object errorMessage_ = ""; + + /** + * + * + *
+     * Message explaining why the line is invalid.
+     * 
+ * + * string error_message = 2; + * + * @return The errorMessage. + */ + public java.lang.String getErrorMessage() { + java.lang.Object ref = errorMessage_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + errorMessage_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Message explaining why the line is invalid.
+     * 
+ * + * string error_message = 2; + * + * @return The bytes for errorMessage. + */ + public com.google.protobuf.ByteString getErrorMessageBytes() { + java.lang.Object ref = errorMessage_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + errorMessage_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Message explaining why the line is invalid.
+     * 
+ * + * string error_message = 2; + * + * @param value The errorMessage to set. + * @return This builder for chaining. + */ + public Builder setErrorMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + errorMessage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Message explaining why the line is invalid.
+     * 
+ * + * string error_message = 2; + * + * @return This builder for chaining. + */ + public Builder clearErrorMessage() { + errorMessage_ = getDefaultInstance().getErrorMessage(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Message explaining why the line is invalid.
+     * 
+ * + * string error_message = 2; + * + * @param value The bytes for errorMessage to set. + * @return This builder for chaining. + */ + public Builder setErrorMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + errorMessage_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.chronicle.v1.ReferenceListError) + } + + // @@protoc_insertion_point(class_scope:google.cloud.chronicle.v1.ReferenceListError) + private static final com.google.cloud.chronicle.v1.ReferenceListError DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.chronicle.v1.ReferenceListError(); + } + + public static com.google.cloud.chronicle.v1.ReferenceListError getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ReferenceListError 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 com.google.cloud.chronicle.v1.ReferenceListError getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/ReferenceListErrorOrBuilder.java b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/ReferenceListErrorOrBuilder.java new file mode 100644 index 000000000000..1a5bb3edfa7f --- /dev/null +++ b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/ReferenceListErrorOrBuilder.java @@ -0,0 +1,68 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/chronicle/v1/reference_list.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.chronicle.v1; + +@com.google.protobuf.Generated +public interface ReferenceListErrorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.chronicle.v1.ReferenceListError) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * 1-indexed line number where the error occurs.
+   * General list errors are indexed at -1.
+   * 
+ * + * int32 line_number = 1; + * + * @return The lineNumber. + */ + int getLineNumber(); + + /** + * + * + *
+   * Message explaining why the line is invalid.
+   * 
+ * + * string error_message = 2; + * + * @return The errorMessage. + */ + java.lang.String getErrorMessage(); + + /** + * + * + *
+   * Message explaining why the line is invalid.
+   * 
+ * + * string error_message = 2; + * + * @return The bytes for errorMessage. + */ + com.google.protobuf.ByteString getErrorMessageBytes(); +} diff --git a/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/ReferenceListProto.java b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/ReferenceListProto.java index 45d572bfc4a4..697dd5e5973b 100644 --- a/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/ReferenceListProto.java +++ b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/ReferenceListProto.java @@ -68,6 +68,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_chronicle_v1_UpdateReferenceListRequest_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_chronicle_v1_UpdateReferenceListRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_chronicle_v1_VerifyReferenceListRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_chronicle_v1_VerifyReferenceListRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_chronicle_v1_VerifyReferenceListResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_chronicle_v1_VerifyReferenceListResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_chronicle_v1_ReferenceList_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -76,6 +84,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_chronicle_v1_ReferenceListEntry_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_chronicle_v1_ReferenceListEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_chronicle_v1_ReferenceListError_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_chronicle_v1_ReferenceListError_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -85,94 +97,109 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { static { java.lang.String[] descriptorData = { - "\n" - + ".google/cloud/chronicle/v1/reference_li" + "\n.google/cloud/chronicle/v1/reference_li" + "st.proto\022\031google.cloud.chronicle.v1\032\034goo" + "gle/api/annotations.proto\032\027google/api/cl" - + "ient.proto\032\037google/api/field_behavior.proto\032\031google/api/resource.proto\032" - + " google/protobuf/field_mask.proto\032\037google/protobuf/timestamp.proto\"]\n" - + "\tScopeInfo\022P\n" - + "\024reference_list_scope\030\002" - + " \001(\0132-.google.cloud.chronicle.v1.ReferenceListScopeB\003\340A\002\".\n" - + "\022ReferenceListScope\022\030\n" - + "\013scope_names\030\001 \003(\tB\003\340A\001\"\223\001\n" - + "\027GetReferenceListRequest\022<\n" - + "\004name\030\001 \001(\tB.\340A\002\372A(\n" - + "&chronicle.googleapis.com/ReferenceList\022:\n" - + "\004view\030\002 \001(\0162,.google.cloud.chronicle.v1.ReferenceListView\"\276\001\n" - + "\031ListReferenceListsRequest\022>\n" - + "\006parent\030\001 \001(\tB.\340A" - + "\002\372A(\022&chronicle.googleapis.com/ReferenceList\022\021\n" - + "\tpage_size\030\002 \001(\005\022\022\n\n" - + "page_token\030\003 \001(\t\022:\n" - + "\004view\030\004 \001(\0162,.google.cloud.chronicle.v1.ReferenceListView\"x\n" - + "\032ListReferenceListsResponse\022A\n" - + "\017reference_lists\030\001 \003(\0132(" - + ".google.cloud.chronicle.v1.ReferenceList\022\027\n" - + "\017next_page_token\030\002 \001(\t\"\303\001\n" - + "\032CreateReferenceListRequest\022>\n" - + "\006parent\030\001 \001(\tB.\340A\002\372A(" - + "\022&chronicle.googleapis.com/ReferenceList\022E\n" - + "\016reference_list\030\002" - + " \001(\0132(.google.cloud.chronicle.v1.ReferenceListB\003\340A\002\022\036\n" - + "\021reference_list_id\030\003 \001(\tB\003\340A\002\"\224\001\n" - + "\032UpdateReferenceListRequest\022E\n" - + "\016reference_list\030\001 \001(\0132(" - + ".google.cloud.chronicle.v1.ReferenceListB\003\340A\002\022/\n" - + "\013update_mask\030\002 \001(\0132\032.google.protobuf.FieldMask\"\252\004\n\r" - + "ReferenceList\022\021\n" - + "\004name\030\001 \001(\tB\003\340A\010\022\031\n" - + "\014display_name\030\002 \001(\tB\003\340A\003\022=\n" - + "\024revision_create_time\030\003" - + " \001(\0132\032.google.protobuf.TimestampB\003\340A\003\022\030\n" - + "\013description\030\004 \001(\tB\003\340A\002\022C\n" - + "\007entries\030\005" - + " \003(\0132-.google.cloud.chronicle.v1.ReferenceListEntryB\003\340A\002\022\022\n" - + "\005rules\030\006 \003(\tB\003\340A\003\022L\n" - + "\013syntax_type\030\010 \001(\01622." - + "google.cloud.chronicle.v1.ReferenceListSyntaxTypeB\003\340A\002\022$\n" - + "\027rule_associations_count\030\t \001(\005B\003\340A\003\0228\n\n" - + "scope_info\030\013" - + " \001(\0132$.google.cloud.chronicle.v1.ScopeInfo:\212\001\352A\206\001\n" - + "&chronicle.googleapis.com/ReferenceList\022\\projects/{project}/locations/{location}/i" - + "nstances/{instance}/referenceLists/{reference_list}\"(\n" - + "\022ReferenceListEntry\022\022\n" - + "\005value\030\001 \001(\tB\003\340A\002*\302\001\n" - + "\027ReferenceListSyntaxType\022*\n" - + "&REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED\020\000\0220\n" - + ",REFERENCE_LIST_SYNTAX_TYPE_PLAIN_TEXT_STRING\020\001\022$\n" - + " REFERENCE_LIST_SYNTAX_TYPE_REGEX\020\002\022#\n" - + "\037REFERENCE_LIST_SYNTAX_TYPE_CIDR\020\003*u\n" - + "\021ReferenceListView\022#\n" - + "\037REFERENCE_LIST_VIEW_UNSPECIFIED\020\000\022\035\n" - + "\031REFERENCE_LIST_VIEW_BASIC\020\001\022\034\n" - + "\030REFERENCE_LIST_VIEW_FULL\020\0022\365\007\n" - + "\024ReferenceListService\022\277\001\n" - + "\020GetReferenceList\0222.google.cloud.chronicle" - + ".v1.GetReferenceListRequest\032(.google.clo" - + "ud.chronicle.v1.ReferenceList\"M\332A\004name\202\323" - + "\344\223\002@\022>/v1/{name=projects/*/locations/*/instances/*/referenceLists/*}\022\322\001\n" - + "\022ListReferenceLists\0224.google.cloud.chronicle.v1." - + "ListReferenceListsRequest\0325.google.cloud.chronicle.v1.ListReferenceListsResponse" - + "\"O\332A\006parent\202\323\344\223\002@\022>/v1/{parent=projects/" - + "*/locations/*/instances/*}/referenceLists\022\371\001\n" - + "\023CreateReferenceList\0225.google.cloud.chronicle.v1.CreateReferenceListRequest" - + "\032(.google.cloud.chronicle.v1.ReferenceLi" - + "st\"\200\001\332A\'parent,reference_list,reference_" - + "list_id\202\323\344\223\002P\">/v1/{parent=projects/*/lo" - + "cations/*/instances/*}/referenceLists:\016reference_list\022\373\001\n" - + "\023UpdateReferenceList\0225.google.cloud.chronicle.v1.UpdateReferenc" - + "eListRequest\032(.google.cloud.chronicle.v1" - + ".ReferenceList\"\202\001\332A\032reference_list,updat" - + "e_mask\202\323\344\223\002_2M/v1/{reference_list.name=p" - + "rojects/*/locations/*/instances/*/refere" - + "nceLists/*}:\016reference_list\032L\312A\030chronicl" - + "e.googleapis.com\322A.https://www.googleapis.com/auth/cloud-platformB\311\001\n" - + "\035com.google.cloud.chronicle.v1B\022ReferenceListProtoP" - + "\001Z;cloud.google.com/go/chronicle/apiv1/c" - + "hroniclepb;chroniclepb\252\002\031Google.Cloud.Ch" - + "ronicle.V1\312\002\031Google\\Cloud\\Chronicle\\V1\352\002" - + "\034Google::Cloud::Chronicle::V1b\006proto3" + + "ient.proto\032\037google/api/field_behavior.pr" + + "oto\032\031google/api/resource.proto\032 google/p" + + "rotobuf/field_mask.proto\032\037google/protobu" + + "f/timestamp.proto\"]\n\tScopeInfo\022P\n\024refere" + + "nce_list_scope\030\002 \001(\0132-.google.cloud.chro" + + "nicle.v1.ReferenceListScopeB\003\340A\002\".\n\022Refe" + + "renceListScope\022\030\n\013scope_names\030\001 \003(\tB\003\340A\001" + + "\"\223\001\n\027GetReferenceListRequest\022<\n\004name\030\001 \001" + + "(\tB.\340A\002\372A(\n&chronicle.googleapis.com/Ref" + + "erenceList\022:\n\004view\030\002 \001(\0162,.google.cloud." + + "chronicle.v1.ReferenceListView\"\276\001\n\031ListR" + + "eferenceListsRequest\022>\n\006parent\030\001 \001(\tB.\340A" + + "\002\372A(\022&chronicle.googleapis.com/Reference" + + "List\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 " + + "\001(\t\022:\n\004view\030\004 \001(\0162,.google.cloud.chronic" + + "le.v1.ReferenceListView\"x\n\032ListReference" + + "ListsResponse\022A\n\017reference_lists\030\001 \003(\0132(" + + ".google.cloud.chronicle.v1.ReferenceList" + + "\022\027\n\017next_page_token\030\002 \001(\t\"\303\001\n\032CreateRefe" + + "renceListRequest\022>\n\006parent\030\001 \001(\tB.\340A\002\372A(" + + "\022&chronicle.googleapis.com/ReferenceList" + + "\022E\n\016reference_list\030\002 \001(\0132(.google.cloud." + + "chronicle.v1.ReferenceListB\003\340A\002\022\036\n\021refer" + + "ence_list_id\030\003 \001(\tB\003\340A\002\"\224\001\n\032UpdateRefere" + + "nceListRequest\022E\n\016reference_list\030\001 \001(\0132(" + + ".google.cloud.chronicle.v1.ReferenceList" + + "B\003\340A\002\022/\n\013update_mask\030\002 \001(\0132\032.google.prot" + + "obuf.FieldMask\"\354\001\n\032VerifyReferenceListRe" + + "quest\022;\n\010instance\030\001 \001(\tB)\340A\002\372A#\n!chronic" + + "le.googleapis.com/Instance\022L\n\013syntax_typ" + + "e\030\002 \001(\01622.google.cloud.chronicle.v1.Refe" + + "renceListSyntaxTypeB\003\340A\002\022C\n\007entries\030\003 \003(" + + "\0132-.google.cloud.chronicle.v1.ReferenceL" + + "istEntryB\003\340A\002\"m\n\033VerifyReferenceListResp" + + "onse\022\017\n\007success\030\001 \001(\010\022=\n\006errors\030\002 \003(\0132-." + + "google.cloud.chronicle.v1.ReferenceListE" + + "rror\"\252\004\n\rReferenceList\022\021\n\004name\030\001 \001(\tB\003\340A" + + "\010\022\031\n\014display_name\030\002 \001(\tB\003\340A\003\022=\n\024revision" + + "_create_time\030\003 \001(\0132\032.google.protobuf.Tim" + + "estampB\003\340A\003\022\030\n\013description\030\004 \001(\tB\003\340A\002\022C\n" + + "\007entries\030\005 \003(\0132-.google.cloud.chronicle." + + "v1.ReferenceListEntryB\003\340A\002\022\022\n\005rules\030\006 \003(" + + "\tB\003\340A\003\022L\n\013syntax_type\030\010 \001(\01622.google.clo" + + "ud.chronicle.v1.ReferenceListSyntaxTypeB" + + "\003\340A\002\022$\n\027rule_associations_count\030\t \001(\005B\003\340" + + "A\003\0228\n\nscope_info\030\013 \001(\0132$.google.cloud.ch" + + "ronicle.v1.ScopeInfo:\212\001\352A\206\001\n&chronicle.g" + + "oogleapis.com/ReferenceList\022\\projects/{p" + + "roject}/locations/{location}/instances/{" + + "instance}/referenceLists/{reference_list" + + "}\"(\n\022ReferenceListEntry\022\022\n\005value\030\001 \001(\tB\003" + + "\340A\002\"@\n\022ReferenceListError\022\023\n\013line_number" + + "\030\001 \001(\005\022\025\n\rerror_message\030\002 \001(\t*\302\001\n\027Refere" + + "nceListSyntaxType\022*\n&REFERENCE_LIST_SYNT" + + "AX_TYPE_UNSPECIFIED\020\000\0220\n,REFERENCE_LIST_" + + "SYNTAX_TYPE_PLAIN_TEXT_STRING\020\001\022$\n REFER" + + "ENCE_LIST_SYNTAX_TYPE_REGEX\020\002\022#\n\037REFEREN" + + "CE_LIST_SYNTAX_TYPE_CIDR\020\003*u\n\021ReferenceL" + + "istView\022#\n\037REFERENCE_LIST_VIEW_UNSPECIFI" + + "ED\020\000\022\035\n\031REFERENCE_LIST_VIEW_BASIC\020\001\022\034\n\030R" + + "EFERENCE_LIST_VIEW_FULL\020\0022\255\n\n\024ReferenceL" + + "istService\022\277\001\n\020GetReferenceList\0222.google" + + ".cloud.chronicle.v1.GetReferenceListRequ" + + "est\032(.google.cloud.chronicle.v1.Referenc" + + "eList\"M\332A\004name\202\323\344\223\002@\022>/v1/{name=projects" + + "/*/locations/*/instances/*/referenceList" + + "s/*}\022\322\001\n\022ListReferenceLists\0224.google.clo" + + "ud.chronicle.v1.ListReferenceListsReques" + + "t\0325.google.cloud.chronicle.v1.ListRefere" + + "nceListsResponse\"O\332A\006parent\202\323\344\223\002@\022>/v1/{" + + "parent=projects/*/locations/*/instances/" + + "*}/referenceLists\022\371\001\n\023CreateReferenceLis" + + "t\0225.google.cloud.chronicle.v1.CreateRefe" + + "renceListRequest\032(.google.cloud.chronicl" + + "e.v1.ReferenceList\"\200\001\332A\'parent,reference" + + "_list,reference_list_id\202\323\344\223\002P\">/v1/{pare" + + "nt=projects/*/locations/*/instances/*}/r" + + "eferenceLists:\016reference_list\022\373\001\n\023Update" + + "ReferenceList\0225.google.cloud.chronicle.v" + + "1.UpdateReferenceListRequest\032(.google.cl" + + "oud.chronicle.v1.ReferenceList\"\202\001\332A\032refe" + + "rence_list,update_mask\202\323\344\223\002_2M/v1/{refer" + + "ence_list.name=projects/*/locations/*/in" + + "stances/*/referenceLists/*}:\016reference_l" + + "ist\022\326\001\n\023VerifyReferenceList\0225.google.clo" + + "ud.chronicle.v1.VerifyReferenceListReque" + + "st\0326.google.cloud.chronicle.v1.VerifyRef" + + "erenceListResponse\"P\202\323\344\223\002J\"E/v1/{instanc" + + "e=projects/*/locations/*/instances/*}:ve" + + "rifyReferenceList:\001*\032\252\001\312A\030chronicle.goog" + + "leapis.com\322A\213\001https://www.googleapis.com" + + "/auth/chronicle,https://www.googleapis.c" + + "om/auth/chronicle.readonly,https://www.g" + + "oogleapis.com/auth/cloud-platformB\311\001\n\035co" + + "m.google.cloud.chronicle.v1B\022ReferenceLi" + + "stProtoP\001Z;cloud.google.com/go/chronicle" + + "/apiv1/chroniclepb;chroniclepb\252\002\031Google." + + "Cloud.Chronicle.V1\312\002\031Google\\Cloud\\Chroni" + + "cle\\V1\352\002\034Google::Cloud::Chronicle::V1b\006p" + + "roto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -241,8 +268,24 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "ReferenceList", "UpdateMask", }); - internal_static_google_cloud_chronicle_v1_ReferenceList_descriptor = + internal_static_google_cloud_chronicle_v1_VerifyReferenceListRequest_descriptor = getDescriptor().getMessageType(7); + internal_static_google_cloud_chronicle_v1_VerifyReferenceListRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_chronicle_v1_VerifyReferenceListRequest_descriptor, + new java.lang.String[] { + "Instance", "SyntaxType", "Entries", + }); + internal_static_google_cloud_chronicle_v1_VerifyReferenceListResponse_descriptor = + getDescriptor().getMessageType(8); + internal_static_google_cloud_chronicle_v1_VerifyReferenceListResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_chronicle_v1_VerifyReferenceListResponse_descriptor, + new java.lang.String[] { + "Success", "Errors", + }); + internal_static_google_cloud_chronicle_v1_ReferenceList_descriptor = + getDescriptor().getMessageType(9); internal_static_google_cloud_chronicle_v1_ReferenceList_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_chronicle_v1_ReferenceList_descriptor, @@ -258,13 +301,21 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ScopeInfo", }); internal_static_google_cloud_chronicle_v1_ReferenceListEntry_descriptor = - getDescriptor().getMessageType(8); + getDescriptor().getMessageType(10); internal_static_google_cloud_chronicle_v1_ReferenceListEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_chronicle_v1_ReferenceListEntry_descriptor, new java.lang.String[] { "Value", }); + internal_static_google_cloud_chronicle_v1_ReferenceListError_descriptor = + getDescriptor().getMessageType(11); + internal_static_google_cloud_chronicle_v1_ReferenceListError_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_chronicle_v1_ReferenceListError_descriptor, + new java.lang.String[] { + "LineNumber", "ErrorMessage", + }); descriptor.resolveAllFeaturesImmutable(); com.google.api.AnnotationsProto.getDescriptor(); com.google.api.ClientProto.getDescriptor(); diff --git a/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/RuleExecutionError.java b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/RuleExecutionError.java new file mode 100644 index 000000000000..bc83c4a70fa3 --- /dev/null +++ b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/RuleExecutionError.java @@ -0,0 +1,1803 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/chronicle/v1/rule_execution_error.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.chronicle.v1; + +/** + * + * + *
+ * The RuleExecutionError resource represents an error generated from
+ * running/deploying a rule.
+ * 
+ * + * Protobuf type {@code google.cloud.chronicle.v1.RuleExecutionError} + */ +@com.google.protobuf.Generated +public final class RuleExecutionError extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.chronicle.v1.RuleExecutionError) + RuleExecutionErrorOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RuleExecutionError"); + } + + // Use RuleExecutionError.newBuilder() to construct. + private RuleExecutionError(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private RuleExecutionError() { + name_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.chronicle.v1.RuleExecutionErrorProto + .internal_static_google_cloud_chronicle_v1_RuleExecutionError_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.chronicle.v1.RuleExecutionErrorProto + .internal_static_google_cloud_chronicle_v1_RuleExecutionError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.chronicle.v1.RuleExecutionError.class, + com.google.cloud.chronicle.v1.RuleExecutionError.Builder.class); + } + + private int bitField0_; + private int sourceCase_ = 0; + + @SuppressWarnings("serial") + private java.lang.Object source_; + + public enum SourceCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + RULE(4), + CURATED_RULE(5), + SOURCE_NOT_SET(0); + private final int value; + + private SourceCase(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 SourceCase valueOf(int value) { + return forNumber(value); + } + + public static SourceCase forNumber(int value) { + switch (value) { + case 4: + return RULE; + case 5: + return CURATED_RULE; + case 0: + return SOURCE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public static final int RULE_FIELD_NUMBER = 4; + + /** + * + * + *
+   * Output only. The resource name of the rule that generated the rule
+   * execution error.
+   * 
+ * + * + * string rule = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return Whether the rule field is set. + */ + public boolean hasRule() { + return sourceCase_ == 4; + } + + /** + * + * + *
+   * Output only. The resource name of the rule that generated the rule
+   * execution error.
+   * 
+ * + * + * string rule = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The rule. + */ + public java.lang.String getRule() { + java.lang.Object ref = ""; + if (sourceCase_ == 4) { + ref = source_; + } + 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 (sourceCase_ == 4) { + source_ = s; + } + return s; + } + } + + /** + * + * + *
+   * Output only. The resource name of the rule that generated the rule
+   * execution error.
+   * 
+ * + * + * string rule = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for rule. + */ + public com.google.protobuf.ByteString getRuleBytes() { + java.lang.Object ref = ""; + if (sourceCase_ == 4) { + ref = source_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (sourceCase_ == 4) { + source_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CURATED_RULE_FIELD_NUMBER = 5; + + /** + * + * + *
+   * Output only. The resource name of the curated rule that generated the
+   * rule execution error.
+   * 
+ * + * + * string curated_rule = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return Whether the curatedRule field is set. + */ + public boolean hasCuratedRule() { + return sourceCase_ == 5; + } + + /** + * + * + *
+   * Output only. The resource name of the curated rule that generated the
+   * rule execution error.
+   * 
+ * + * + * string curated_rule = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The curatedRule. + */ + public java.lang.String getCuratedRule() { + java.lang.Object ref = ""; + if (sourceCase_ == 5) { + ref = source_; + } + 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 (sourceCase_ == 5) { + source_ = s; + } + return s; + } + } + + /** + * + * + *
+   * Output only. The resource name of the curated rule that generated the
+   * rule execution error.
+   * 
+ * + * + * string curated_rule = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for curatedRule. + */ + public com.google.protobuf.ByteString getCuratedRuleBytes() { + java.lang.Object ref = ""; + if (sourceCase_ == 5) { + ref = source_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (sourceCase_ == 5) { + source_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+   * Output only. The resource name of the rule execution error.
+   * Format:
+   * projects/{project}/locations/{location}/instances/{instance}/ruleExecutionErrors/{rule_execution_error}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + + /** + * + * + *
+   * Output only. The resource name of the rule execution error.
+   * Format:
+   * projects/{project}/locations/{location}/instances/{instance}/ruleExecutionErrors/{rule_execution_error}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + + public static final int ERROR_FIELD_NUMBER = 2; + private com.google.rpc.Status error_; + + /** + * + * + *
+   * Output only. The error status corresponding with the rule execution error.
+   * 
+ * + * .google.rpc.Status error = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the error field is set. + */ + @java.lang.Override + public boolean hasError() { + return ((bitField0_ & 0x00000001) != 0); + } + + /** + * + * + *
+   * Output only. The error status corresponding with the rule execution error.
+   * 
+ * + * .google.rpc.Status error = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The error. + */ + @java.lang.Override + public com.google.rpc.Status getError() { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + + /** + * + * + *
+   * Output only. The error status corresponding with the rule execution error.
+   * 
+ * + * .google.rpc.Status error = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + + public static final int TIME_RANGE_FIELD_NUMBER = 3; + private com.google.type.Interval timeRange_; + + /** + * + * + *
+   * Output only. The event time range that the rule execution error corresponds
+   * with.
+   * 
+ * + * .google.type.Interval time_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the timeRange field is set. + */ + @java.lang.Override + public boolean hasTimeRange() { + return ((bitField0_ & 0x00000002) != 0); + } + + /** + * + * + *
+   * Output only. The event time range that the rule execution error corresponds
+   * with.
+   * 
+ * + * .google.type.Interval time_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The timeRange. + */ + @java.lang.Override + public com.google.type.Interval getTimeRange() { + return timeRange_ == null ? com.google.type.Interval.getDefaultInstance() : timeRange_; + } + + /** + * + * + *
+   * Output only. The event time range that the rule execution error corresponds
+   * with.
+   * 
+ * + * .google.type.Interval time_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + @java.lang.Override + public com.google.type.IntervalOrBuilder getTimeRangeOrBuilder() { + return timeRange_ == null ? com.google.type.Interval.getDefaultInstance() : timeRange_; + } + + 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(name_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(2, getError()); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(3, getTimeRange()); + } + if (sourceCase_ == 4) { + com.google.protobuf.GeneratedMessage.writeString(output, 4, source_); + } + if (sourceCase_ == 5) { + com.google.protobuf.GeneratedMessage.writeString(output, 5, source_); + } + 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(name_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getError()); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getTimeRange()); + } + if (sourceCase_ == 4) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(4, source_); + } + if (sourceCase_ == 5) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, source_); + } + 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 com.google.cloud.chronicle.v1.RuleExecutionError)) { + return super.equals(obj); + } + com.google.cloud.chronicle.v1.RuleExecutionError other = + (com.google.cloud.chronicle.v1.RuleExecutionError) obj; + + if (!getName().equals(other.getName())) return false; + if (hasError() != other.hasError()) return false; + if (hasError()) { + if (!getError().equals(other.getError())) return false; + } + if (hasTimeRange() != other.hasTimeRange()) return false; + if (hasTimeRange()) { + if (!getTimeRange().equals(other.getTimeRange())) return false; + } + if (!getSourceCase().equals(other.getSourceCase())) return false; + switch (sourceCase_) { + case 4: + if (!getRule().equals(other.getRule())) return false; + break; + case 5: + if (!getCuratedRule().equals(other.getCuratedRule())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasError()) { + hash = (37 * hash) + ERROR_FIELD_NUMBER; + hash = (53 * hash) + getError().hashCode(); + } + if (hasTimeRange()) { + hash = (37 * hash) + TIME_RANGE_FIELD_NUMBER; + hash = (53 * hash) + getTimeRange().hashCode(); + } + switch (sourceCase_) { + case 4: + hash = (37 * hash) + RULE_FIELD_NUMBER; + hash = (53 * hash) + getRule().hashCode(); + break; + case 5: + hash = (37 * hash) + CURATED_RULE_FIELD_NUMBER; + hash = (53 * hash) + getCuratedRule().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.chronicle.v1.RuleExecutionError parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.chronicle.v1.RuleExecutionError parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.chronicle.v1.RuleExecutionError parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.chronicle.v1.RuleExecutionError parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.chronicle.v1.RuleExecutionError parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.chronicle.v1.RuleExecutionError parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.chronicle.v1.RuleExecutionError parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.chronicle.v1.RuleExecutionError 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 com.google.cloud.chronicle.v1.RuleExecutionError parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.chronicle.v1.RuleExecutionError 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 com.google.cloud.chronicle.v1.RuleExecutionError parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.chronicle.v1.RuleExecutionError 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(com.google.cloud.chronicle.v1.RuleExecutionError 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; + } + + /** + * + * + *
+   * The RuleExecutionError resource represents an error generated from
+   * running/deploying a rule.
+   * 
+ * + * Protobuf type {@code google.cloud.chronicle.v1.RuleExecutionError} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.chronicle.v1.RuleExecutionError) + com.google.cloud.chronicle.v1.RuleExecutionErrorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.chronicle.v1.RuleExecutionErrorProto + .internal_static_google_cloud_chronicle_v1_RuleExecutionError_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.chronicle.v1.RuleExecutionErrorProto + .internal_static_google_cloud_chronicle_v1_RuleExecutionError_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.chronicle.v1.RuleExecutionError.class, + com.google.cloud.chronicle.v1.RuleExecutionError.Builder.class); + } + + // Construct using com.google.cloud.chronicle.v1.RuleExecutionError.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + internalGetErrorFieldBuilder(); + internalGetTimeRangeFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + name_ = ""; + error_ = null; + if (errorBuilder_ != null) { + errorBuilder_.dispose(); + errorBuilder_ = null; + } + timeRange_ = null; + if (timeRangeBuilder_ != null) { + timeRangeBuilder_.dispose(); + timeRangeBuilder_ = null; + } + sourceCase_ = 0; + source_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.chronicle.v1.RuleExecutionErrorProto + .internal_static_google_cloud_chronicle_v1_RuleExecutionError_descriptor; + } + + @java.lang.Override + public com.google.cloud.chronicle.v1.RuleExecutionError getDefaultInstanceForType() { + return com.google.cloud.chronicle.v1.RuleExecutionError.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.chronicle.v1.RuleExecutionError build() { + com.google.cloud.chronicle.v1.RuleExecutionError result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.chronicle.v1.RuleExecutionError buildPartial() { + com.google.cloud.chronicle.v1.RuleExecutionError result = + new com.google.cloud.chronicle.v1.RuleExecutionError(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.chronicle.v1.RuleExecutionError result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.error_ = errorBuilder_ == null ? error_ : errorBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.timeRange_ = timeRangeBuilder_ == null ? timeRange_ : timeRangeBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartialOneofs(com.google.cloud.chronicle.v1.RuleExecutionError result) { + result.sourceCase_ = sourceCase_; + result.source_ = this.source_; + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.chronicle.v1.RuleExecutionError) { + return mergeFrom((com.google.cloud.chronicle.v1.RuleExecutionError) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.chronicle.v1.RuleExecutionError other) { + if (other == com.google.cloud.chronicle.v1.RuleExecutionError.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasError()) { + mergeError(other.getError()); + } + if (other.hasTimeRange()) { + mergeTimeRange(other.getTimeRange()); + } + switch (other.getSourceCase()) { + case RULE: + { + sourceCase_ = 4; + source_ = other.source_; + onChanged(); + break; + } + case CURATED_RULE: + { + sourceCase_ = 5; + source_ = other.source_; + onChanged(); + break; + } + case SOURCE_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: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 10 + case 18: + { + input.readMessage(internalGetErrorFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 18 + case 26: + { + input.readMessage( + internalGetTimeRangeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + sourceCase_ = 4; + source_ = s; + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + sourceCase_ = 5; + source_ = s; + break; + } // case 42 + 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 sourceCase_ = 0; + private java.lang.Object source_; + + public SourceCase getSourceCase() { + return SourceCase.forNumber(sourceCase_); + } + + public Builder clearSource() { + sourceCase_ = 0; + source_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + /** + * + * + *
+     * Output only. The resource name of the rule that generated the rule
+     * execution error.
+     * 
+ * + * + * string rule = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return Whether the rule field is set. + */ + @java.lang.Override + public boolean hasRule() { + return sourceCase_ == 4; + } + + /** + * + * + *
+     * Output only. The resource name of the rule that generated the rule
+     * execution error.
+     * 
+ * + * + * string rule = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The rule. + */ + @java.lang.Override + public java.lang.String getRule() { + java.lang.Object ref = ""; + if (sourceCase_ == 4) { + ref = source_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (sourceCase_ == 4) { + source_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The resource name of the rule that generated the rule
+     * execution error.
+     * 
+ * + * + * string rule = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for rule. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRuleBytes() { + java.lang.Object ref = ""; + if (sourceCase_ == 4) { + ref = source_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (sourceCase_ == 4) { + source_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The resource name of the rule that generated the rule
+     * execution error.
+     * 
+ * + * + * string rule = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The rule to set. + * @return This builder for chaining. + */ + public Builder setRule(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceCase_ = 4; + source_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resource name of the rule that generated the rule
+     * execution error.
+     * 
+ * + * + * string rule = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearRule() { + if (sourceCase_ == 4) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The resource name of the rule that generated the rule
+     * execution error.
+     * 
+ * + * + * string rule = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for rule to set. + * @return This builder for chaining. + */ + public Builder setRuleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceCase_ = 4; + source_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resource name of the curated rule that generated the
+     * rule execution error.
+     * 
+ * + * + * string curated_rule = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return Whether the curatedRule field is set. + */ + @java.lang.Override + public boolean hasCuratedRule() { + return sourceCase_ == 5; + } + + /** + * + * + *
+     * Output only. The resource name of the curated rule that generated the
+     * rule execution error.
+     * 
+ * + * + * string curated_rule = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The curatedRule. + */ + @java.lang.Override + public java.lang.String getCuratedRule() { + java.lang.Object ref = ""; + if (sourceCase_ == 5) { + ref = source_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (sourceCase_ == 5) { + source_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Output only. The resource name of the curated rule that generated the
+     * rule execution error.
+     * 
+ * + * + * string curated_rule = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for curatedRule. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCuratedRuleBytes() { + java.lang.Object ref = ""; + if (sourceCase_ == 5) { + ref = source_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (sourceCase_ == 5) { + source_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Output only. The resource name of the curated rule that generated the
+     * rule execution error.
+     * 
+ * + * + * string curated_rule = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The curatedRule to set. + * @return This builder for chaining. + */ + public Builder setCuratedRule(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + sourceCase_ = 5; + source_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resource name of the curated rule that generated the
+     * rule execution error.
+     * 
+ * + * + * string curated_rule = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearCuratedRule() { + if (sourceCase_ == 5) { + sourceCase_ = 0; + source_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The resource name of the curated rule that generated the
+     * rule execution error.
+     * 
+ * + * + * string curated_rule = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for curatedRule to set. + * @return This builder for chaining. + */ + public Builder setCuratedRuleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + sourceCase_ = 5; + source_ = value; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + + /** + * + * + *
+     * Output only. The resource name of the rule execution error.
+     * Format:
+     * projects/{project}/locations/{location}/instances/{instance}/ruleExecutionErrors/{rule_execution_error}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + + /** + * + * + *
+     * Output only. The resource name of the rule execution error.
+     * Format:
+     * projects/{project}/locations/{location}/instances/{instance}/ruleExecutionErrors/{rule_execution_error}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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; + } + } + + /** + * + * + *
+     * Output only. The resource name of the rule execution error.
+     * Format:
+     * projects/{project}/locations/{location}/instances/{instance}/ruleExecutionErrors/{rule_execution_error}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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_ |= 0x00000004; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resource name of the rule execution error.
+     * Format:
+     * projects/{project}/locations/{location}/instances/{instance}/ruleExecutionErrors/{rule_execution_error}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The resource name of the rule execution error.
+     * Format:
+     * projects/{project}/locations/{location}/instances/{instance}/ruleExecutionErrors/{rule_execution_error}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @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_ |= 0x00000004; + onChanged(); + return this; + } + + private com.google.rpc.Status error_; + private com.google.protobuf.SingleFieldBuilder< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + errorBuilder_; + + /** + * + * + *
+     * Output only. The error status corresponding with the rule execution error.
+     * 
+ * + * .google.rpc.Status error = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the error field is set. + */ + public boolean hasError() { + return ((bitField0_ & 0x00000008) != 0); + } + + /** + * + * + *
+     * Output only. The error status corresponding with the rule execution error.
+     * 
+ * + * .google.rpc.Status error = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The error. + */ + public com.google.rpc.Status getError() { + if (errorBuilder_ == null) { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } else { + return errorBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The error status corresponding with the rule execution error.
+     * 
+ * + * .google.rpc.Status error = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + error_ = value; + } else { + errorBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The error status corresponding with the rule execution error.
+     * 
+ * + * .google.rpc.Status error = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder setError(com.google.rpc.Status.Builder builderForValue) { + if (errorBuilder_ == null) { + error_ = builderForValue.build(); + } else { + errorBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The error status corresponding with the rule execution error.
+     * 
+ * + * .google.rpc.Status error = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder mergeError(com.google.rpc.Status value) { + if (errorBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) + && error_ != null + && error_ != com.google.rpc.Status.getDefaultInstance()) { + getErrorBuilder().mergeFrom(value); + } else { + error_ = value; + } + } else { + errorBuilder_.mergeFrom(value); + } + if (error_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The error status corresponding with the rule execution error.
+     * 
+ * + * .google.rpc.Status error = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public Builder clearError() { + bitField0_ = (bitField0_ & ~0x00000008); + error_ = null; + if (errorBuilder_ != null) { + errorBuilder_.dispose(); + errorBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The error status corresponding with the rule execution error.
+     * 
+ * + * .google.rpc.Status error = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.rpc.Status.Builder getErrorBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return internalGetErrorFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The error status corresponding with the rule execution error.
+     * 
+ * + * .google.rpc.Status error = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { + if (errorBuilder_ != null) { + return errorBuilder_.getMessageOrBuilder(); + } else { + return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; + } + } + + /** + * + * + *
+     * Output only. The error status corresponding with the rule execution error.
+     * 
+ * + * .google.rpc.Status error = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + internalGetErrorFieldBuilder() { + if (errorBuilder_ == null) { + errorBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.rpc.Status, + com.google.rpc.Status.Builder, + com.google.rpc.StatusOrBuilder>(getError(), getParentForChildren(), isClean()); + error_ = null; + } + return errorBuilder_; + } + + private com.google.type.Interval timeRange_; + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Interval, + com.google.type.Interval.Builder, + com.google.type.IntervalOrBuilder> + timeRangeBuilder_; + + /** + * + * + *
+     * Output only. The event time range that the rule execution error corresponds
+     * with.
+     * 
+ * + * .google.type.Interval time_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the timeRange field is set. + */ + public boolean hasTimeRange() { + return ((bitField0_ & 0x00000010) != 0); + } + + /** + * + * + *
+     * Output only. The event time range that the rule execution error corresponds
+     * with.
+     * 
+ * + * .google.type.Interval time_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The timeRange. + */ + public com.google.type.Interval getTimeRange() { + if (timeRangeBuilder_ == null) { + return timeRange_ == null ? com.google.type.Interval.getDefaultInstance() : timeRange_; + } else { + return timeRangeBuilder_.getMessage(); + } + } + + /** + * + * + *
+     * Output only. The event time range that the rule execution error corresponds
+     * with.
+     * 
+ * + * .google.type.Interval time_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTimeRange(com.google.type.Interval value) { + if (timeRangeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + timeRange_ = value; + } else { + timeRangeBuilder_.setMessage(value); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The event time range that the rule execution error corresponds
+     * with.
+     * 
+ * + * .google.type.Interval time_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTimeRange(com.google.type.Interval.Builder builderForValue) { + if (timeRangeBuilder_ == null) { + timeRange_ = builderForValue.build(); + } else { + timeRangeBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The event time range that the rule execution error corresponds
+     * with.
+     * 
+ * + * .google.type.Interval time_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeTimeRange(com.google.type.Interval value) { + if (timeRangeBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) + && timeRange_ != null + && timeRange_ != com.google.type.Interval.getDefaultInstance()) { + getTimeRangeBuilder().mergeFrom(value); + } else { + timeRange_ = value; + } + } else { + timeRangeBuilder_.mergeFrom(value); + } + if (timeRange_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Output only. The event time range that the rule execution error corresponds
+     * with.
+     * 
+ * + * .google.type.Interval time_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearTimeRange() { + bitField0_ = (bitField0_ & ~0x00000010); + timeRange_ = null; + if (timeRangeBuilder_ != null) { + timeRangeBuilder_.dispose(); + timeRangeBuilder_ = null; + } + onChanged(); + return this; + } + + /** + * + * + *
+     * Output only. The event time range that the rule execution error corresponds
+     * with.
+     * 
+ * + * .google.type.Interval time_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.type.Interval.Builder getTimeRangeBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return internalGetTimeRangeFieldBuilder().getBuilder(); + } + + /** + * + * + *
+     * Output only. The event time range that the rule execution error corresponds
+     * with.
+     * 
+ * + * .google.type.Interval time_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.type.IntervalOrBuilder getTimeRangeOrBuilder() { + if (timeRangeBuilder_ != null) { + return timeRangeBuilder_.getMessageOrBuilder(); + } else { + return timeRange_ == null ? com.google.type.Interval.getDefaultInstance() : timeRange_; + } + } + + /** + * + * + *
+     * Output only. The event time range that the rule execution error corresponds
+     * with.
+     * 
+ * + * .google.type.Interval time_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilder< + com.google.type.Interval, + com.google.type.Interval.Builder, + com.google.type.IntervalOrBuilder> + internalGetTimeRangeFieldBuilder() { + if (timeRangeBuilder_ == null) { + timeRangeBuilder_ = + new com.google.protobuf.SingleFieldBuilder< + com.google.type.Interval, + com.google.type.Interval.Builder, + com.google.type.IntervalOrBuilder>( + getTimeRange(), getParentForChildren(), isClean()); + timeRange_ = null; + } + return timeRangeBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.chronicle.v1.RuleExecutionError) + } + + // @@protoc_insertion_point(class_scope:google.cloud.chronicle.v1.RuleExecutionError) + private static final com.google.cloud.chronicle.v1.RuleExecutionError DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.chronicle.v1.RuleExecutionError(); + } + + public static com.google.cloud.chronicle.v1.RuleExecutionError getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RuleExecutionError 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 com.google.cloud.chronicle.v1.RuleExecutionError getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/RuleExecutionErrorName.java b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/RuleExecutionErrorName.java new file mode 100644 index 000000000000..f0c1336e521e --- /dev/null +++ b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/RuleExecutionErrorName.java @@ -0,0 +1,269 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.chronicle.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class RuleExecutionErrorName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_INSTANCE_RULE_EXECUTION_ERROR = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/instances/{instance}/ruleExecutionErrors/{rule_execution_error}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String instance; + private final String ruleExecutionError; + + @Deprecated + protected RuleExecutionErrorName() { + project = null; + location = null; + instance = null; + ruleExecutionError = null; + } + + private RuleExecutionErrorName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + instance = Preconditions.checkNotNull(builder.getInstance()); + ruleExecutionError = Preconditions.checkNotNull(builder.getRuleExecutionError()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getInstance() { + return instance; + } + + public String getRuleExecutionError() { + return ruleExecutionError; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static RuleExecutionErrorName of( + String project, String location, String instance, String ruleExecutionError) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setInstance(instance) + .setRuleExecutionError(ruleExecutionError) + .build(); + } + + public static String format( + String project, String location, String instance, String ruleExecutionError) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setInstance(instance) + .setRuleExecutionError(ruleExecutionError) + .build() + .toString(); + } + + public static RuleExecutionErrorName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_INSTANCE_RULE_EXECUTION_ERROR.validatedMatch( + formattedString, "RuleExecutionErrorName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("instance"), + matchMap.get("rule_execution_error")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (RuleExecutionErrorName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_INSTANCE_RULE_EXECUTION_ERROR.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (project != null) { + fieldMapBuilder.put("project", project); + } + if (location != null) { + fieldMapBuilder.put("location", location); + } + if (instance != null) { + fieldMapBuilder.put("instance", instance); + } + if (ruleExecutionError != null) { + fieldMapBuilder.put("rule_execution_error", ruleExecutionError); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_LOCATION_INSTANCE_RULE_EXECUTION_ERROR.instantiate( + "project", + project, + "location", + location, + "instance", + instance, + "rule_execution_error", + ruleExecutionError); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null && getClass() == o.getClass()) { + RuleExecutionErrorName that = ((RuleExecutionErrorName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.instance, that.instance) + && Objects.equals(this.ruleExecutionError, that.ruleExecutionError); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + h *= 1000003; + h ^= Objects.hashCode(instance); + h *= 1000003; + h ^= Objects.hashCode(ruleExecutionError); + return h; + } + + /** + * Builder for + * projects/{project}/locations/{location}/instances/{instance}/ruleExecutionErrors/{rule_execution_error}. + */ + public static class Builder { + private String project; + private String location; + private String instance; + private String ruleExecutionError; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getInstance() { + return instance; + } + + public String getRuleExecutionError() { + return ruleExecutionError; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setInstance(String instance) { + this.instance = instance; + return this; + } + + public Builder setRuleExecutionError(String ruleExecutionError) { + this.ruleExecutionError = ruleExecutionError; + return this; + } + + private Builder(RuleExecutionErrorName ruleExecutionErrorName) { + this.project = ruleExecutionErrorName.project; + this.location = ruleExecutionErrorName.location; + this.instance = ruleExecutionErrorName.instance; + this.ruleExecutionError = ruleExecutionErrorName.ruleExecutionError; + } + + public RuleExecutionErrorName build() { + return new RuleExecutionErrorName(this); + } + } +} diff --git a/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/RuleExecutionErrorOrBuilder.java b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/RuleExecutionErrorOrBuilder.java new file mode 100644 index 000000000000..bd598ca3eca6 --- /dev/null +++ b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/RuleExecutionErrorOrBuilder.java @@ -0,0 +1,233 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/chronicle/v1/rule_execution_error.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.chronicle.v1; + +@com.google.protobuf.Generated +public interface RuleExecutionErrorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.chronicle.v1.RuleExecutionError) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. The resource name of the rule that generated the rule
+   * execution error.
+   * 
+ * + * + * string rule = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return Whether the rule field is set. + */ + boolean hasRule(); + + /** + * + * + *
+   * Output only. The resource name of the rule that generated the rule
+   * execution error.
+   * 
+ * + * + * string rule = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The rule. + */ + java.lang.String getRule(); + + /** + * + * + *
+   * Output only. The resource name of the rule that generated the rule
+   * execution error.
+   * 
+ * + * + * string rule = 4 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for rule. + */ + com.google.protobuf.ByteString getRuleBytes(); + + /** + * + * + *
+   * Output only. The resource name of the curated rule that generated the
+   * rule execution error.
+   * 
+ * + * + * string curated_rule = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return Whether the curatedRule field is set. + */ + boolean hasCuratedRule(); + + /** + * + * + *
+   * Output only. The resource name of the curated rule that generated the
+   * rule execution error.
+   * 
+ * + * + * string curated_rule = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The curatedRule. + */ + java.lang.String getCuratedRule(); + + /** + * + * + *
+   * Output only. The resource name of the curated rule that generated the
+   * rule execution error.
+   * 
+ * + * + * string curated_rule = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for curatedRule. + */ + com.google.protobuf.ByteString getCuratedRuleBytes(); + + /** + * + * + *
+   * Output only. The resource name of the rule execution error.
+   * Format:
+   * projects/{project}/locations/{location}/instances/{instance}/ruleExecutionErrors/{rule_execution_error}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + + /** + * + * + *
+   * Output only. The resource name of the rule execution error.
+   * Format:
+   * projects/{project}/locations/{location}/instances/{instance}/ruleExecutionErrors/{rule_execution_error}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The error status corresponding with the rule execution error.
+   * 
+ * + * .google.rpc.Status error = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the error field is set. + */ + boolean hasError(); + + /** + * + * + *
+   * Output only. The error status corresponding with the rule execution error.
+   * 
+ * + * .google.rpc.Status error = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The error. + */ + com.google.rpc.Status getError(); + + /** + * + * + *
+   * Output only. The error status corresponding with the rule execution error.
+   * 
+ * + * .google.rpc.Status error = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.rpc.StatusOrBuilder getErrorOrBuilder(); + + /** + * + * + *
+   * Output only. The event time range that the rule execution error corresponds
+   * with.
+   * 
+ * + * .google.type.Interval time_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return Whether the timeRange field is set. + */ + boolean hasTimeRange(); + + /** + * + * + *
+   * Output only. The event time range that the rule execution error corresponds
+   * with.
+   * 
+ * + * .google.type.Interval time_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The timeRange. + */ + com.google.type.Interval getTimeRange(); + + /** + * + * + *
+   * Output only. The event time range that the rule execution error corresponds
+   * with.
+   * 
+ * + * .google.type.Interval time_range = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + com.google.type.IntervalOrBuilder getTimeRangeOrBuilder(); + + com.google.cloud.chronicle.v1.RuleExecutionError.SourceCase getSourceCase(); +} diff --git a/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/RuleExecutionErrorProto.java b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/RuleExecutionErrorProto.java new file mode 100644 index 000000000000..c4024580c259 --- /dev/null +++ b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/RuleExecutionErrorProto.java @@ -0,0 +1,166 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/chronicle/v1/rule_execution_error.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.chronicle.v1; + +@com.google.protobuf.Generated +public final class RuleExecutionErrorProto extends com.google.protobuf.GeneratedFile { + private RuleExecutionErrorProto() {} + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "RuleExecutionErrorProto"); + } + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_chronicle_v1_ListRuleExecutionErrorsRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_chronicle_v1_ListRuleExecutionErrorsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_chronicle_v1_ListRuleExecutionErrorsResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_chronicle_v1_ListRuleExecutionErrorsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_chronicle_v1_RuleExecutionError_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_chronicle_v1_RuleExecutionError_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n4google/cloud/chronicle/v1/rule_executi" + + "on_error.proto\022\031google.cloud.chronicle.v" + + "1\032\034google/api/annotations.proto\032\027google/" + + "api/client.proto\032\037google/api/field_behav" + + "ior.proto\032\031google/api/resource.proto\032\027go" + + "ogle/rpc/status.proto\032\032google/type/inter" + + "val.proto\"\234\001\n\036ListRuleExecutionErrorsReq" + + "uest\022C\n\006parent\030\001 \001(\tB3\340A\002\372A-\022+chronicle." + + "googleapis.com/RuleExecutionError\022\021\n\tpag" + + "e_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\016\n\006filt" + + "er\030\004 \001(\t\"\210\001\n\037ListRuleExecutionErrorsResp" + + "onse\022L\n\025rule_execution_errors\030\001 \003(\0132-.go" + + "ogle.cloud.chronicle.v1.RuleExecutionErr" + + "or\022\027\n\017next_page_token\030\002 \001(\t\"\243\003\n\022RuleExec" + + "utionError\0225\n\004rule\030\004 \001(\tB%\340A\003\372A\037\n\035chroni" + + "cle.googleapis.com/RuleH\000\022D\n\014curated_rul" + + "e\030\005 \001(\tB,\340A\003\372A&\n$chronicle.googleapis.co" + + "m/CuratedRuleH\000\022\021\n\004name\030\001 \001(\tB\003\340A\003\022&\n\005er" + + "ror\030\002 \001(\0132\022.google.rpc.StatusB\003\340A\003\022.\n\nti" + + "me_range\030\003 \001(\0132\025.google.type.IntervalB\003\340" + + "A\003:\232\001\352A\226\001\n+chronicle.googleapis.com/Rule" + + "ExecutionError\022gprojects/{project}/locat" + + "ions/{location}/instances/{instance}/rul" + + "eExecutionErrors/{rule_execution_error}B" + + "\010\n\006source2\261\003\n\031RuleExecutionErrorService\022" + + "\346\001\n\027ListRuleExecutionErrors\0229.google.clo" + + "ud.chronicle.v1.ListRuleExecutionErrorsR" + + "equest\032:.google.cloud.chronicle.v1.ListR" + + "uleExecutionErrorsResponse\"T\332A\006parent\202\323\344" + + "\223\002E\022C/v1/{parent=projects/*/locations/*/" + + "instances/*}/ruleExecutionErrors\032\252\001\312A\030ch" + + "ronicle.googleapis.com\322A\213\001https://www.go" + + "ogleapis.com/auth/chronicle,https://www." + + "googleapis.com/auth/chronicle.readonly,h" + + "ttps://www.googleapis.com/auth/cloud-pla" + + "tformB\320\002\n\035com.google.cloud.chronicle.v1B" + + "\027RuleExecutionErrorProtoP\001Z;cloud.google" + + ".com/go/chronicle/apiv1/chroniclepb;chro" + + "niclepb\252\002\031Google.Cloud.Chronicle.V1\312\002\031Go" + + "ogle\\Cloud\\Chronicle\\V1\352\002\034Google::Cloud:" + + ":Chronicle::V1\352A\177\n$chronicle.googleapis." + + "com/CuratedRule\022Wprojects/{project}/loca" + + "tions/{location}/instances/{instance}/cu" + + "ratedRules/{curatedRule}b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + com.google.type.IntervalProto.getDescriptor(), + }); + internal_static_google_cloud_chronicle_v1_ListRuleExecutionErrorsRequest_descriptor = + getDescriptor().getMessageType(0); + internal_static_google_cloud_chronicle_v1_ListRuleExecutionErrorsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_chronicle_v1_ListRuleExecutionErrorsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", + }); + internal_static_google_cloud_chronicle_v1_ListRuleExecutionErrorsResponse_descriptor = + getDescriptor().getMessageType(1); + internal_static_google_cloud_chronicle_v1_ListRuleExecutionErrorsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_chronicle_v1_ListRuleExecutionErrorsResponse_descriptor, + new java.lang.String[] { + "RuleExecutionErrors", "NextPageToken", + }); + internal_static_google_cloud_chronicle_v1_RuleExecutionError_descriptor = + getDescriptor().getMessageType(2); + internal_static_google_cloud_chronicle_v1_RuleExecutionError_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_chronicle_v1_RuleExecutionError_descriptor, + new java.lang.String[] { + "Rule", "CuratedRule", "Name", "Error", "TimeRange", "Source", + }); + descriptor.resolveAllFeaturesImmutable(); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + com.google.type.IntervalProto.getDescriptor(); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceDefinition); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/RuleProto.java b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/RuleProto.java index 270e0d3d4139..b7f2f1d83f72 100644 --- a/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/RuleProto.java +++ b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/RuleProto.java @@ -80,6 +80,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_chronicle_v1_DeleteRuleRequest_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_google_cloud_chronicle_v1_DeleteRuleRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_chronicle_v1_VerifyRuleTextRequest_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_chronicle_v1_VerifyRuleTextRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_chronicle_v1_VerifyRuleTextResponse_descriptor; + static final com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_google_cloud_chronicle_v1_VerifyRuleTextResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_chronicle_v1_ListRuleRevisionsRequest_descriptor; static final com.google.protobuf.GeneratedMessage.FieldAccessorTable @@ -260,7 +268,15 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\021DeleteRuleRequest\0223\n" + "\004name\030\001 \001(\tB%\340A\002\372A\037\n" + "\035chronicle.googleapis.com/Rule\022\022\n" - + "\005force\030\002 \001(\010B\003\340A\001\"\251\001\n" + + "\005force\030\002 \001(\010B\003\340A\001\"l\n" + + "\025VerifyRuleTextRequest\022;\n" + + "\010instance\030\001 \001(\tB)\340A\002\372A#\n" + + "!chronicle.googleapis.com/Instance\022\026\n" + + "\trule_text\030\002 \001(\tB\003\340A\002\"|\n" + + "\026VerifyRuleTextResponse\022\017\n" + + "\007success\030\001 \001(\010\022Q\n" + + "\027compilation_diagnostics\030\003" + + " \003(\01320.google.cloud.chronicle.v1.CompilationDiagnostic\"\251\001\n" + "\030ListRuleRevisionsRequest\0223\n" + "\004name\030\001 \001(\tB%\340A\002\372A\037\n" + "\035chronicle.googleapis.com/Rule\022\021\n" @@ -280,7 +296,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\025ListRetrohuntsRequest\022:\n" + "\006parent\030\001 \001(" + "\tB*\340A\002\372A$\022\"chronicle.googleapis.com/Retrohunt\022\021\n" - + "\tpage_size\030\002 \001(\005\022\022\n\n" + + "\tpage_size\030\002 \001(\005\022\022\n" + + "\n" + "page_token\030\003 \001(\t\022\016\n" + "\006filter\030\004 \001(\t\"k\n" + "\026ListRetrohuntsResponse\0228\n\n" @@ -290,14 +307,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\004name\030\001 \001(\tB/\340A\002\372A)\n" + "\'chronicle.googleapis.com/RuleDeployment\"\224\001\n" + "\032ListRuleDeploymentsRequest\022?\n" - + "\006parent\030\001 \001(" - + "\tB/\340A\002\372A)\022\'chronicle.googleapis.com/RuleDeployment\022\021\n" + + "\006parent\030\001 \001(\t" + + "B/\340A\002\372A)\022\'chronicle.googleapis.com/RuleDeployment\022\021\n" + "\tpage_size\030\002 \001(\005\022\022\n\n" + "page_token\030\003 \001(\t\022\016\n" + "\006filter\030\004 \001(\t\"{\n" + "\033ListRuleDeploymentsResponse\022C\n" - + "\020rule_deployments\030\001" - + " \003(\0132).google.cloud.chronicle.v1.RuleDeployment\022\027\n" + + "\020rule_deployments\030\001 \003(" + + "\0132).google.cloud.chronicle.v1.RuleDeployment\022\027\n" + "\017next_page_token\030\002 \001(\t\"\234\001\n" + "\033UpdateRuleDeploymentRequest\022G\n" + "\017rule_deployment\030\001" @@ -343,61 +360,68 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\025RULE_VIEW_UNSPECIFIED\020\000\022\t\n" + "\005BASIC\020\001\022\010\n" + "\004FULL\020\002\022\032\n" - + "\026REVISION_METADATA_ONLY\020\0032\251\023\n" + + "\026REVISION_METADATA_ONLY\020\0032\342\025\n" + "\013RuleService\022\256\001\n\n" - + "CreateRule\022,.google.cloud.chronicle.v1.CreateRuleRequest\032\037" - + ".google.cloud.chronicle.v1.Rule\"Q\332A\013pare" - + "nt,rule\202\323\344\223\002=\"5/v1/{parent=projects/*/locations/*/instances/*}/rules:\004rule\022\233\001\n" - + "\007GetRule\022).google.cloud.chronicle.v1.GetRu" - + "leRequest\032\037.google.cloud.chronicle.v1.Ru" - + "le\"D\332A\004name\202\323\344\223\0027\0225/v1/{name=projects/*/locations/*/instances/*/rules/*}\022\256\001\n" - + "\tListRules\022+.google.cloud.chronicle.v1.ListR" - + "ulesRequest\032,.google.cloud.chronicle.v1." - + "ListRulesResponse\"F\332A\006parent\202\323\344\223\0027\0225/v1/" - + "{parent=projects/*/locations/*/instances/*}/rules\022\270\001\n\n" - + "UpdateRule\022,.google.cloud.chronicle.v1.UpdateRuleRequest\032\037.google." - + "cloud.chronicle.v1.Rule\"[\332A\020rule,update_" - + "mask\202\323\344\223\002B2:/v1/{rule.name=projects/*/locations/*/instances/*/rules/*}:\004rule\022\230\001\n" - + "\n" - + "DeleteRule\022,.google.cloud.chronicle.v1." - + "DeleteRuleRequest\032\026.google.protobuf.Empt" - + "y\"D\332A\004name\202\323\344\223\0027*5/v1/{name=projects/*/locations/*/instances/*/rules/*}\022\322\001\n" - + "\021ListRuleRevisions\0223.google.cloud.chronicle.v" - + "1.ListRuleRevisionsRequest\0324.google.cloud.chronicle.v1.ListRuleRevisionsResponse" - + "\"R\332A\004name\202\323\344\223\002E\022C/v1/{name=projects/*/lo" - + "cations/*/instances/*/rules/*}:listRevisions\022\357\001\n" - + "\017CreateRetrohunt\0221.google.cloud." - + "chronicle.v1.CreateRetrohuntRequest\032\035.google.longrunning.Operation\"\211\001\312A\036\n" - + "\tRetrohunt\022\021RetrohuntMetadata\332A\020parent,retrohun" - + "t\202\323\344\223\002O\"B/v1/{parent=projects/*/locations/*/instances/*/rules/*}/retrohunts:" - + "\tretrohunt\022\267\001\n" - + "\014GetRetrohunt\022..google.cloud.chronicle.v1.GetRetrohuntRequest\032$.google" - + ".cloud.chronicle.v1.Retrohunt\"Q\332A\004name\202\323" - + "\344\223\002D\022B/v1/{name=projects/*/locations/*/instances/*/rules/*/retrohunts/*}\022\312\001\n" - + "\016ListRetrohunts\0220.google.cloud.chronicle.v1." - + "ListRetrohuntsRequest\0321.google.cloud.chr" - + "onicle.v1.ListRetrohuntsResponse\"S\332A\006par" - + "ent\202\323\344\223\002D\022B/v1/{parent=projects/*/locati" - + "ons/*/instances/*/rules/*}/retrohunts\022\304\001\n" - + "\021GetRuleDeployment\0223.google.cloud.chron" - + "icle.v1.GetRuleDeploymentRequest\032).googl" - + "e.cloud.chronicle.v1.RuleDeployment\"O\332A\004" - + "name\202\323\344\223\002B\022@/v1/{name=projects/*/locations/*/instances/*/rules/*/deployment}\022\332\001\n" - + "\023ListRuleDeployments\0225.google.cloud.chro" - + "nicle.v1.ListRuleDeploymentsRequest\0326.google.cloud.chronicle.v1.ListRuleDeployme" - + "ntsResponse\"T\332A\006parent\202\323\344\223\002E\022C/v1/{paren" - + "t=projects/*/locations/*/instances/*/rules/*}/deployments\022\203\002\n" - + "\024UpdateRuleDeployment\0226.google.cloud.chronicle.v1.UpdateRul" - + "eDeploymentRequest\032).google.cloud.chroni" - + "cle.v1.RuleDeployment\"\207\001\332A\033rule_deployme" - + "nt,update_mask\202\323\344\223\002c2P/v1/{rule_deployme" - + "nt.name=projects/*/locations/*/instances/*/rules/*/deployment}:\017rule_deployment\032" - + "L\312A\030chronicle.googleapis.com\322A.https://w" - + "ww.googleapis.com/auth/cloud-platformB\300\001\n" - + "\035com.google.cloud.chronicle.v1B\tRuleProtoP\001Z;cloud.google.com/go/chronicle/apiv" - + "1/chroniclepb;chroniclepb\252\002\031Google.Cloud" - + ".Chronicle.V1\312\002\031Google\\Cloud\\Chronicle\\V" - + "1\352\002\034Google::Cloud::Chronicle::V1b\006proto3" + + "CreateRule\022,.google.cloud.chronicle.v1.CreateRuleRequest\032\037.goo" + + "gle.cloud.chronicle.v1.Rule\"Q\332A\013parent,r" + + "ule\202\323\344\223\002=\"5/v1/{parent=projects/*/locations/*/instances/*}/rules:\004rule\022\233\001\n" + + "\007GetRule\022).google.cloud.chronicle.v1.GetRuleRe" + + "quest\032\037.google.cloud.chronicle.v1.Rule\"D" + + "\332A\004name\202\323\344\223\0027\0225/v1/{name=projects/*/locations/*/instances/*/rules/*}\022\256\001\n" + + "\tListRules\022+.google.cloud.chronicle.v1.ListRules" + + "Request\032,.google.cloud.chronicle.v1.List" + + "RulesResponse\"F\332A\006parent\202\323\344\223\0027\0225/v1/{par" + + "ent=projects/*/locations/*/instances/*}/rules\022\270\001\n\n" + + "UpdateRule\022,.google.cloud.chronicle.v1.UpdateRuleRequest\032\037.google.clou" + + "d.chronicle.v1.Rule\"[\332A\020rule,update_mask" + + "\202\323\344\223\002B2:/v1/{rule.name=projects/*/locations/*/instances/*/rules/*}:\004rule\022\230\001\n\n" + + "DeleteRule\022,.google.cloud.chronicle.v1.Dele" + + "teRuleRequest\032\026.google.protobuf.Empty\"D\332" + + "A\004name\202\323\344\223\0027*5/v1/{name=projects/*/locations/*/instances/*/rules/*}\022\327\001\n" + + "\016VerifyRuleText\0220.google.cloud.chronicle.v1.Verif" + + "yRuleTextRequest\0321.google.cloud.chronicl" + + "e.v1.VerifyRuleTextResponse\"`\332A\022instance" + + ",rule_text\202\323\344\223\002E\"@/v1/{instance=projects" + + "/*/locations/*/instances/*}:verifyRuleText:\001*\022\322\001\n" + + "\021ListRuleRevisions\0223.google.cloud.chronicle.v1.ListRuleRevisionsRequest" + + "\0324.google.cloud.chronicle.v1.ListRuleRev" + + "isionsResponse\"R\332A\004name\202\323\344\223\002E\022C/v1/{name" + + "=projects/*/locations/*/instances/*/rules/*}:listRevisions\022\357\001\n" + + "\017CreateRetrohunt\0221.google.cloud.chronicle.v1.CreateRetrohu" + + "ntRequest\032\035.google.longrunning.Operation\"\211\001\312A\036\n" + + "\tRetrohunt\022\021RetrohuntMetadata\332A\020p" + + "arent,retrohunt\202\323\344\223\002O\"B/v1/{parent=proje" + + "cts/*/locations/*/instances/*/rules/*}/retrohunts:\tretrohunt\022\267\001\n" + + "\014GetRetrohunt\022..google.cloud.chronicle.v1.GetRetrohuntRe" + + "quest\032$.google.cloud.chronicle.v1.Retroh" + + "unt\"Q\332A\004name\202\323\344\223\002D\022B/v1/{name=projects/*" + + "/locations/*/instances/*/rules/*/retrohunts/*}\022\312\001\n" + + "\016ListRetrohunts\0220.google.cloud.chronicle.v1.ListRetrohuntsRequest\0321.go" + + "ogle.cloud.chronicle.v1.ListRetrohuntsRe" + + "sponse\"S\332A\006parent\202\323\344\223\002D\022B/v1/{parent=pro" + + "jects/*/locations/*/instances/*/rules/*}/retrohunts\022\304\001\n" + + "\021GetRuleDeployment\0223.google.cloud.chronicle.v1.GetRuleDeploymentR" + + "equest\032).google.cloud.chronicle.v1.RuleD" + + "eployment\"O\332A\004name\202\323\344\223\002B\022@/v1/{name=proj" + + "ects/*/locations/*/instances/*/rules/*/deployment}\022\332\001\n" + + "\023ListRuleDeployments\0225.google.cloud.chronicle.v1.ListRuleDeploymen" + + "tsRequest\0326.google.cloud.chronicle.v1.Li" + + "stRuleDeploymentsResponse\"T\332A\006parent\202\323\344\223" + + "\002E\022C/v1/{parent=projects/*/locations/*/instances/*/rules/*}/deployments\022\203\002\n" + + "\024UpdateRuleDeployment\0226.google.cloud.chronicl" + + "e.v1.UpdateRuleDeploymentRequest\032).googl" + + "e.cloud.chronicle.v1.RuleDeployment\"\207\001\332A" + + "\033rule_deployment,update_mask\202\323\344\223\002c2P/v1/" + + "{rule_deployment.name=projects/*/locations/*/instances/*/rules/*/deployment}:\017ru" + + "le_deployment\032\252\001\312A\030chronicle.googleapis." + + "com\322A\213\001https://www.googleapis.com/auth/c" + + "hronicle,https://www.googleapis.com/auth" + + "/chronicle.readonly,https://www.googleapis.com/auth/cloud-platformB\300\001\n" + + "\035com.google.cloud.chronicle.v1B\tRuleProtoP\001Z;cloud" + + ".google.com/go/chronicle/apiv1/chronicle" + + "pb;chroniclepb\252\002\031Google.Cloud.Chronicle." + + "V1\312\002\031Google\\Cloud\\Chronicle\\V1\352\002\034Google:" + + ":Cloud::Chronicle::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -518,8 +542,24 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", "Force", }); - internal_static_google_cloud_chronicle_v1_ListRuleRevisionsRequest_descriptor = + internal_static_google_cloud_chronicle_v1_VerifyRuleTextRequest_descriptor = getDescriptor().getMessageType(9); + internal_static_google_cloud_chronicle_v1_VerifyRuleTextRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_chronicle_v1_VerifyRuleTextRequest_descriptor, + new java.lang.String[] { + "Instance", "RuleText", + }); + internal_static_google_cloud_chronicle_v1_VerifyRuleTextResponse_descriptor = + getDescriptor().getMessageType(10); + internal_static_google_cloud_chronicle_v1_VerifyRuleTextResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_google_cloud_chronicle_v1_VerifyRuleTextResponse_descriptor, + new java.lang.String[] { + "Success", "CompilationDiagnostics", + }); + internal_static_google_cloud_chronicle_v1_ListRuleRevisionsRequest_descriptor = + getDescriptor().getMessageType(11); internal_static_google_cloud_chronicle_v1_ListRuleRevisionsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_chronicle_v1_ListRuleRevisionsRequest_descriptor, @@ -527,7 +567,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", "PageSize", "PageToken", "View", }); internal_static_google_cloud_chronicle_v1_ListRuleRevisionsResponse_descriptor = - getDescriptor().getMessageType(10); + getDescriptor().getMessageType(12); internal_static_google_cloud_chronicle_v1_ListRuleRevisionsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_chronicle_v1_ListRuleRevisionsResponse_descriptor, @@ -535,7 +575,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Rules", "NextPageToken", }); internal_static_google_cloud_chronicle_v1_CreateRetrohuntRequest_descriptor = - getDescriptor().getMessageType(11); + getDescriptor().getMessageType(13); internal_static_google_cloud_chronicle_v1_CreateRetrohuntRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_chronicle_v1_CreateRetrohuntRequest_descriptor, @@ -543,7 +583,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "Retrohunt", }); internal_static_google_cloud_chronicle_v1_GetRetrohuntRequest_descriptor = - getDescriptor().getMessageType(12); + getDescriptor().getMessageType(14); internal_static_google_cloud_chronicle_v1_GetRetrohuntRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_chronicle_v1_GetRetrohuntRequest_descriptor, @@ -551,7 +591,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_chronicle_v1_ListRetrohuntsRequest_descriptor = - getDescriptor().getMessageType(13); + getDescriptor().getMessageType(15); internal_static_google_cloud_chronicle_v1_ListRetrohuntsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_chronicle_v1_ListRetrohuntsRequest_descriptor, @@ -559,7 +599,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", "Filter", }); internal_static_google_cloud_chronicle_v1_ListRetrohuntsResponse_descriptor = - getDescriptor().getMessageType(14); + getDescriptor().getMessageType(16); internal_static_google_cloud_chronicle_v1_ListRetrohuntsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_chronicle_v1_ListRetrohuntsResponse_descriptor, @@ -567,7 +607,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Retrohunts", "NextPageToken", }); internal_static_google_cloud_chronicle_v1_GetRuleDeploymentRequest_descriptor = - getDescriptor().getMessageType(15); + getDescriptor().getMessageType(17); internal_static_google_cloud_chronicle_v1_GetRuleDeploymentRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_chronicle_v1_GetRuleDeploymentRequest_descriptor, @@ -575,7 +615,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Name", }); internal_static_google_cloud_chronicle_v1_ListRuleDeploymentsRequest_descriptor = - getDescriptor().getMessageType(16); + getDescriptor().getMessageType(18); internal_static_google_cloud_chronicle_v1_ListRuleDeploymentsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_chronicle_v1_ListRuleDeploymentsRequest_descriptor, @@ -583,7 +623,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Parent", "PageSize", "PageToken", "Filter", }); internal_static_google_cloud_chronicle_v1_ListRuleDeploymentsResponse_descriptor = - getDescriptor().getMessageType(17); + getDescriptor().getMessageType(19); internal_static_google_cloud_chronicle_v1_ListRuleDeploymentsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_chronicle_v1_ListRuleDeploymentsResponse_descriptor, @@ -591,7 +631,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "RuleDeployments", "NextPageToken", }); internal_static_google_cloud_chronicle_v1_UpdateRuleDeploymentRequest_descriptor = - getDescriptor().getMessageType(18); + getDescriptor().getMessageType(20); internal_static_google_cloud_chronicle_v1_UpdateRuleDeploymentRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_chronicle_v1_UpdateRuleDeploymentRequest_descriptor, @@ -599,7 +639,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "RuleDeployment", "UpdateMask", }); internal_static_google_cloud_chronicle_v1_CompilationPosition_descriptor = - getDescriptor().getMessageType(19); + getDescriptor().getMessageType(21); internal_static_google_cloud_chronicle_v1_CompilationPosition_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_chronicle_v1_CompilationPosition_descriptor, @@ -607,7 +647,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "StartLine", "StartColumn", "EndLine", "EndColumn", }); internal_static_google_cloud_chronicle_v1_CompilationDiagnostic_descriptor = - getDescriptor().getMessageType(20); + getDescriptor().getMessageType(22); internal_static_google_cloud_chronicle_v1_CompilationDiagnostic_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_chronicle_v1_CompilationDiagnostic_descriptor, @@ -615,7 +655,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Message", "Position", "Severity", "Uri", }); internal_static_google_cloud_chronicle_v1_Severity_descriptor = - getDescriptor().getMessageType(21); + getDescriptor().getMessageType(23); internal_static_google_cloud_chronicle_v1_Severity_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_chronicle_v1_Severity_descriptor, @@ -623,7 +663,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DisplayName", }); internal_static_google_cloud_chronicle_v1_RetrohuntMetadata_descriptor = - getDescriptor().getMessageType(22); + getDescriptor().getMessageType(24); internal_static_google_cloud_chronicle_v1_RetrohuntMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_chronicle_v1_RetrohuntMetadata_descriptor, @@ -631,7 +671,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "Retrohunt", "ExecutionInterval", "ProgressPercentage", }); internal_static_google_cloud_chronicle_v1_InputsUsed_descriptor = - getDescriptor().getMessageType(23); + getDescriptor().getMessageType(25); internal_static_google_cloud_chronicle_v1_InputsUsed_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_google_cloud_chronicle_v1_InputsUsed_descriptor, diff --git a/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/VerifyReferenceListRequest.java b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/VerifyReferenceListRequest.java new file mode 100644 index 000000000000..7994af21544c --- /dev/null +++ b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/VerifyReferenceListRequest.java @@ -0,0 +1,1392 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/chronicle/v1/reference_list.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.chronicle.v1; + +/** + * + * + *
+ * VerifyReferenceList request message.
+ * 
+ * + * Protobuf type {@code google.cloud.chronicle.v1.VerifyReferenceListRequest} + */ +@com.google.protobuf.Generated +public final class VerifyReferenceListRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.chronicle.v1.VerifyReferenceListRequest) + VerifyReferenceListRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "VerifyReferenceListRequest"); + } + + // Use VerifyReferenceListRequest.newBuilder() to construct. + private VerifyReferenceListRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private VerifyReferenceListRequest() { + instance_ = ""; + syntaxType_ = 0; + entries_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.chronicle.v1.ReferenceListProto + .internal_static_google_cloud_chronicle_v1_VerifyReferenceListRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.chronicle.v1.ReferenceListProto + .internal_static_google_cloud_chronicle_v1_VerifyReferenceListRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.chronicle.v1.VerifyReferenceListRequest.class, + com.google.cloud.chronicle.v1.VerifyReferenceListRequest.Builder.class); + } + + public static final int INSTANCE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object instance_ = ""; + + /** + * + * + *
+   * Required. The name of the parent resource, which is the SecOps instance
+   * associated with the request. Format:
+   * `projects/{project}/locations/{location}/instances/{instance}`
+   * 
+ * + * + * string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The instance. + */ + @java.lang.Override + public java.lang.String getInstance() { + java.lang.Object ref = instance_; + 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(); + instance_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the parent resource, which is the SecOps instance
+   * associated with the request. Format:
+   * `projects/{project}/locations/{location}/instances/{instance}`
+   * 
+ * + * + * string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for instance. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceBytes() { + java.lang.Object ref = instance_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SYNTAX_TYPE_FIELD_NUMBER = 2; + private int syntaxType_ = 0; + + /** + * + * + *
+   * Required. Type (format) of list lines.
+   * 
+ * + * + * .google.cloud.chronicle.v1.ReferenceListSyntaxType syntax_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for syntaxType. + */ + @java.lang.Override + public int getSyntaxTypeValue() { + return syntaxType_; + } + + /** + * + * + *
+   * Required. Type (format) of list lines.
+   * 
+ * + * + * .google.cloud.chronicle.v1.ReferenceListSyntaxType syntax_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The syntaxType. + */ + @java.lang.Override + public com.google.cloud.chronicle.v1.ReferenceListSyntaxType getSyntaxType() { + com.google.cloud.chronicle.v1.ReferenceListSyntaxType result = + com.google.cloud.chronicle.v1.ReferenceListSyntaxType.forNumber(syntaxType_); + return result == null + ? com.google.cloud.chronicle.v1.ReferenceListSyntaxType.UNRECOGNIZED + : result; + } + + public static final int ENTRIES_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List entries_; + + /** + * + * + *
+   * Required. The entries of the reference list.
+   * Each line may be either an item in the list or a comment.
+   * 
+ * + * + * repeated .google.cloud.chronicle.v1.ReferenceListEntry entries = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getEntriesList() { + return entries_; + } + + /** + * + * + *
+   * Required. The entries of the reference list.
+   * Each line may be either an item in the list or a comment.
+   * 
+ * + * + * repeated .google.cloud.chronicle.v1.ReferenceListEntry entries = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getEntriesOrBuilderList() { + return entries_; + } + + /** + * + * + *
+   * Required. The entries of the reference list.
+   * Each line may be either an item in the list or a comment.
+   * 
+ * + * + * repeated .google.cloud.chronicle.v1.ReferenceListEntry entries = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getEntriesCount() { + return entries_.size(); + } + + /** + * + * + *
+   * Required. The entries of the reference list.
+   * Each line may be either an item in the list or a comment.
+   * 
+ * + * + * repeated .google.cloud.chronicle.v1.ReferenceListEntry entries = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.chronicle.v1.ReferenceListEntry getEntries(int index) { + return entries_.get(index); + } + + /** + * + * + *
+   * Required. The entries of the reference list.
+   * Each line may be either an item in the list or a comment.
+   * 
+ * + * + * repeated .google.cloud.chronicle.v1.ReferenceListEntry entries = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.chronicle.v1.ReferenceListEntryOrBuilder getEntriesOrBuilder(int index) { + return entries_.get(index); + } + + 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(instance_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, instance_); + } + if (syntaxType_ + != com.google.cloud.chronicle.v1.ReferenceListSyntaxType + .REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, syntaxType_); + } + for (int i = 0; i < entries_.size(); i++) { + output.writeMessage(3, entries_.get(i)); + } + 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(instance_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, instance_); + } + if (syntaxType_ + != com.google.cloud.chronicle.v1.ReferenceListSyntaxType + .REFERENCE_LIST_SYNTAX_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, syntaxType_); + } + for (int i = 0; i < entries_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, entries_.get(i)); + } + 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 com.google.cloud.chronicle.v1.VerifyReferenceListRequest)) { + return super.equals(obj); + } + com.google.cloud.chronicle.v1.VerifyReferenceListRequest other = + (com.google.cloud.chronicle.v1.VerifyReferenceListRequest) obj; + + if (!getInstance().equals(other.getInstance())) return false; + if (syntaxType_ != other.syntaxType_) return false; + if (!getEntriesList().equals(other.getEntriesList())) 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) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + hash = (37 * hash) + SYNTAX_TYPE_FIELD_NUMBER; + hash = (53 * hash) + syntaxType_; + if (getEntriesCount() > 0) { + hash = (37 * hash) + ENTRIES_FIELD_NUMBER; + hash = (53 * hash) + getEntriesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.chronicle.v1.VerifyReferenceListRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.chronicle.v1.VerifyReferenceListRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.chronicle.v1.VerifyReferenceListRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.chronicle.v1.VerifyReferenceListRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.chronicle.v1.VerifyReferenceListRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.chronicle.v1.VerifyReferenceListRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.chronicle.v1.VerifyReferenceListRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.chronicle.v1.VerifyReferenceListRequest 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 com.google.cloud.chronicle.v1.VerifyReferenceListRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.chronicle.v1.VerifyReferenceListRequest 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 com.google.cloud.chronicle.v1.VerifyReferenceListRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.chronicle.v1.VerifyReferenceListRequest 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( + com.google.cloud.chronicle.v1.VerifyReferenceListRequest 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; + } + + /** + * + * + *
+   * VerifyReferenceList request message.
+   * 
+ * + * Protobuf type {@code google.cloud.chronicle.v1.VerifyReferenceListRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.chronicle.v1.VerifyReferenceListRequest) + com.google.cloud.chronicle.v1.VerifyReferenceListRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.chronicle.v1.ReferenceListProto + .internal_static_google_cloud_chronicle_v1_VerifyReferenceListRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.chronicle.v1.ReferenceListProto + .internal_static_google_cloud_chronicle_v1_VerifyReferenceListRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.chronicle.v1.VerifyReferenceListRequest.class, + com.google.cloud.chronicle.v1.VerifyReferenceListRequest.Builder.class); + } + + // Construct using com.google.cloud.chronicle.v1.VerifyReferenceListRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + instance_ = ""; + syntaxType_ = 0; + if (entriesBuilder_ == null) { + entries_ = java.util.Collections.emptyList(); + } else { + entries_ = null; + entriesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.chronicle.v1.ReferenceListProto + .internal_static_google_cloud_chronicle_v1_VerifyReferenceListRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.chronicle.v1.VerifyReferenceListRequest getDefaultInstanceForType() { + return com.google.cloud.chronicle.v1.VerifyReferenceListRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.chronicle.v1.VerifyReferenceListRequest build() { + com.google.cloud.chronicle.v1.VerifyReferenceListRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.chronicle.v1.VerifyReferenceListRequest buildPartial() { + com.google.cloud.chronicle.v1.VerifyReferenceListRequest result = + new com.google.cloud.chronicle.v1.VerifyReferenceListRequest(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.chronicle.v1.VerifyReferenceListRequest result) { + if (entriesBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + entries_ = java.util.Collections.unmodifiableList(entries_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.entries_ = entries_; + } else { + result.entries_ = entriesBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.chronicle.v1.VerifyReferenceListRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.instance_ = instance_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.syntaxType_ = syntaxType_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.chronicle.v1.VerifyReferenceListRequest) { + return mergeFrom((com.google.cloud.chronicle.v1.VerifyReferenceListRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.chronicle.v1.VerifyReferenceListRequest other) { + if (other == com.google.cloud.chronicle.v1.VerifyReferenceListRequest.getDefaultInstance()) + return this; + if (!other.getInstance().isEmpty()) { + instance_ = other.instance_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.syntaxType_ != 0) { + setSyntaxTypeValue(other.getSyntaxTypeValue()); + } + if (entriesBuilder_ == null) { + if (!other.entries_.isEmpty()) { + if (entries_.isEmpty()) { + entries_ = other.entries_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureEntriesIsMutable(); + entries_.addAll(other.entries_); + } + onChanged(); + } + } else { + if (!other.entries_.isEmpty()) { + if (entriesBuilder_.isEmpty()) { + entriesBuilder_.dispose(); + entriesBuilder_ = null; + entries_ = other.entries_; + bitField0_ = (bitField0_ & ~0x00000004); + entriesBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetEntriesFieldBuilder() + : null; + } else { + entriesBuilder_.addAllMessages(other.entries_); + } + } + } + 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: + { + instance_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: + { + syntaxType_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: + { + com.google.cloud.chronicle.v1.ReferenceListEntry m = + input.readMessage( + com.google.cloud.chronicle.v1.ReferenceListEntry.parser(), + extensionRegistry); + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(m); + } else { + entriesBuilder_.addMessage(m); + } + 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 instance_ = ""; + + /** + * + * + *
+     * Required. The name of the parent resource, which is the SecOps instance
+     * associated with the request. Format:
+     * `projects/{project}/locations/{location}/instances/{instance}`
+     * 
+ * + * + * string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The instance. + */ + public java.lang.String getInstance() { + java.lang.Object ref = instance_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instance_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the parent resource, which is the SecOps instance
+     * associated with the request. Format:
+     * `projects/{project}/locations/{location}/instances/{instance}`
+     * 
+ * + * + * string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for instance. + */ + public com.google.protobuf.ByteString getInstanceBytes() { + java.lang.Object ref = instance_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the parent resource, which is the SecOps instance
+     * associated with the request. Format:
+     * `projects/{project}/locations/{location}/instances/{instance}`
+     * 
+ * + * + * string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The instance to set. + * @return This builder for chaining. + */ + public Builder setInstance(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the parent resource, which is the SecOps instance
+     * associated with the request. Format:
+     * `projects/{project}/locations/{location}/instances/{instance}`
+     * 
+ * + * + * string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearInstance() { + instance_ = getDefaultInstance().getInstance(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the parent resource, which is the SecOps instance
+     * associated with the request. Format:
+     * `projects/{project}/locations/{location}/instances/{instance}`
+     * 
+ * + * + * string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for instance to set. + * @return This builder for chaining. + */ + public Builder setInstanceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instance_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int syntaxType_ = 0; + + /** + * + * + *
+     * Required. Type (format) of list lines.
+     * 
+ * + * + * .google.cloud.chronicle.v1.ReferenceListSyntaxType syntax_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for syntaxType. + */ + @java.lang.Override + public int getSyntaxTypeValue() { + return syntaxType_; + } + + /** + * + * + *
+     * Required. Type (format) of list lines.
+     * 
+ * + * + * .google.cloud.chronicle.v1.ReferenceListSyntaxType syntax_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for syntaxType to set. + * @return This builder for chaining. + */ + public Builder setSyntaxTypeValue(int value) { + syntaxType_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Type (format) of list lines.
+     * 
+ * + * + * .google.cloud.chronicle.v1.ReferenceListSyntaxType syntax_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The syntaxType. + */ + @java.lang.Override + public com.google.cloud.chronicle.v1.ReferenceListSyntaxType getSyntaxType() { + com.google.cloud.chronicle.v1.ReferenceListSyntaxType result = + com.google.cloud.chronicle.v1.ReferenceListSyntaxType.forNumber(syntaxType_); + return result == null + ? com.google.cloud.chronicle.v1.ReferenceListSyntaxType.UNRECOGNIZED + : result; + } + + /** + * + * + *
+     * Required. Type (format) of list lines.
+     * 
+ * + * + * .google.cloud.chronicle.v1.ReferenceListSyntaxType syntax_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The syntaxType to set. + * @return This builder for chaining. + */ + public Builder setSyntaxType(com.google.cloud.chronicle.v1.ReferenceListSyntaxType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + syntaxType_ = value.getNumber(); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. Type (format) of list lines.
+     * 
+ * + * + * .google.cloud.chronicle.v1.ReferenceListSyntaxType syntax_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearSyntaxType() { + bitField0_ = (bitField0_ & ~0x00000002); + syntaxType_ = 0; + onChanged(); + return this; + } + + private java.util.List entries_ = + java.util.Collections.emptyList(); + + private void ensureEntriesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + entries_ = + new java.util.ArrayList(entries_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.chronicle.v1.ReferenceListEntry, + com.google.cloud.chronicle.v1.ReferenceListEntry.Builder, + com.google.cloud.chronicle.v1.ReferenceListEntryOrBuilder> + entriesBuilder_; + + /** + * + * + *
+     * Required. The entries of the reference list.
+     * Each line may be either an item in the list or a comment.
+     * 
+ * + * + * repeated .google.cloud.chronicle.v1.ReferenceListEntry entries = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getEntriesList() { + if (entriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(entries_); + } else { + return entriesBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Required. The entries of the reference list.
+     * Each line may be either an item in the list or a comment.
+     * 
+ * + * + * repeated .google.cloud.chronicle.v1.ReferenceListEntry entries = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getEntriesCount() { + if (entriesBuilder_ == null) { + return entries_.size(); + } else { + return entriesBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Required. The entries of the reference list.
+     * Each line may be either an item in the list or a comment.
+     * 
+ * + * + * repeated .google.cloud.chronicle.v1.ReferenceListEntry entries = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.chronicle.v1.ReferenceListEntry getEntries(int index) { + if (entriesBuilder_ == null) { + return entries_.get(index); + } else { + return entriesBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Required. The entries of the reference list.
+     * Each line may be either an item in the list or a comment.
+     * 
+ * + * + * repeated .google.cloud.chronicle.v1.ReferenceListEntry entries = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEntries(int index, com.google.cloud.chronicle.v1.ReferenceListEntry value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.set(index, value); + onChanged(); + } else { + entriesBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Required. The entries of the reference list.
+     * Each line may be either an item in the list or a comment.
+     * 
+ * + * + * repeated .google.cloud.chronicle.v1.ReferenceListEntry entries = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEntries( + int index, com.google.cloud.chronicle.v1.ReferenceListEntry.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.set(index, builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. The entries of the reference list.
+     * Each line may be either an item in the list or a comment.
+     * 
+ * + * + * repeated .google.cloud.chronicle.v1.ReferenceListEntry entries = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addEntries(com.google.cloud.chronicle.v1.ReferenceListEntry value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.add(value); + onChanged(); + } else { + entriesBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Required. The entries of the reference list.
+     * Each line may be either an item in the list or a comment.
+     * 
+ * + * + * repeated .google.cloud.chronicle.v1.ReferenceListEntry entries = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addEntries(int index, com.google.cloud.chronicle.v1.ReferenceListEntry value) { + if (entriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntriesIsMutable(); + entries_.add(index, value); + onChanged(); + } else { + entriesBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Required. The entries of the reference list.
+     * Each line may be either an item in the list or a comment.
+     * 
+ * + * + * repeated .google.cloud.chronicle.v1.ReferenceListEntry entries = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addEntries( + com.google.cloud.chronicle.v1.ReferenceListEntry.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. The entries of the reference list.
+     * Each line may be either an item in the list or a comment.
+     * 
+ * + * + * repeated .google.cloud.chronicle.v1.ReferenceListEntry entries = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addEntries( + int index, com.google.cloud.chronicle.v1.ReferenceListEntry.Builder builderForValue) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(index, builderForValue.build()); + onChanged(); + } else { + entriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Required. The entries of the reference list.
+     * Each line may be either an item in the list or a comment.
+     * 
+ * + * + * repeated .google.cloud.chronicle.v1.ReferenceListEntry entries = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllEntries( + java.lang.Iterable values) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, entries_); + onChanged(); + } else { + entriesBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Required. The entries of the reference list.
+     * Each line may be either an item in the list or a comment.
+     * 
+ * + * + * repeated .google.cloud.chronicle.v1.ReferenceListEntry entries = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearEntries() { + if (entriesBuilder_ == null) { + entries_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + entriesBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Required. The entries of the reference list.
+     * Each line may be either an item in the list or a comment.
+     * 
+ * + * + * repeated .google.cloud.chronicle.v1.ReferenceListEntry entries = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeEntries(int index) { + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.remove(index); + onChanged(); + } else { + entriesBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Required. The entries of the reference list.
+     * Each line may be either an item in the list or a comment.
+     * 
+ * + * + * repeated .google.cloud.chronicle.v1.ReferenceListEntry entries = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.chronicle.v1.ReferenceListEntry.Builder getEntriesBuilder(int index) { + return internalGetEntriesFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Required. The entries of the reference list.
+     * Each line may be either an item in the list or a comment.
+     * 
+ * + * + * repeated .google.cloud.chronicle.v1.ReferenceListEntry entries = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.chronicle.v1.ReferenceListEntryOrBuilder getEntriesOrBuilder( + int index) { + if (entriesBuilder_ == null) { + return entries_.get(index); + } else { + return entriesBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Required. The entries of the reference list.
+     * Each line may be either an item in the list or a comment.
+     * 
+ * + * + * repeated .google.cloud.chronicle.v1.ReferenceListEntry entries = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getEntriesOrBuilderList() { + if (entriesBuilder_ != null) { + return entriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(entries_); + } + } + + /** + * + * + *
+     * Required. The entries of the reference list.
+     * Each line may be either an item in the list or a comment.
+     * 
+ * + * + * repeated .google.cloud.chronicle.v1.ReferenceListEntry entries = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.chronicle.v1.ReferenceListEntry.Builder addEntriesBuilder() { + return internalGetEntriesFieldBuilder() + .addBuilder(com.google.cloud.chronicle.v1.ReferenceListEntry.getDefaultInstance()); + } + + /** + * + * + *
+     * Required. The entries of the reference list.
+     * Each line may be either an item in the list or a comment.
+     * 
+ * + * + * repeated .google.cloud.chronicle.v1.ReferenceListEntry entries = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.chronicle.v1.ReferenceListEntry.Builder addEntriesBuilder(int index) { + return internalGetEntriesFieldBuilder() + .addBuilder(index, com.google.cloud.chronicle.v1.ReferenceListEntry.getDefaultInstance()); + } + + /** + * + * + *
+     * Required. The entries of the reference list.
+     * Each line may be either an item in the list or a comment.
+     * 
+ * + * + * repeated .google.cloud.chronicle.v1.ReferenceListEntry entries = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getEntriesBuilderList() { + return internalGetEntriesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.chronicle.v1.ReferenceListEntry, + com.google.cloud.chronicle.v1.ReferenceListEntry.Builder, + com.google.cloud.chronicle.v1.ReferenceListEntryOrBuilder> + internalGetEntriesFieldBuilder() { + if (entriesBuilder_ == null) { + entriesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.chronicle.v1.ReferenceListEntry, + com.google.cloud.chronicle.v1.ReferenceListEntry.Builder, + com.google.cloud.chronicle.v1.ReferenceListEntryOrBuilder>( + entries_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + entries_ = null; + } + return entriesBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.chronicle.v1.VerifyReferenceListRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.chronicle.v1.VerifyReferenceListRequest) + private static final com.google.cloud.chronicle.v1.VerifyReferenceListRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.chronicle.v1.VerifyReferenceListRequest(); + } + + public static com.google.cloud.chronicle.v1.VerifyReferenceListRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VerifyReferenceListRequest 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 com.google.cloud.chronicle.v1.VerifyReferenceListRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/VerifyReferenceListRequestOrBuilder.java b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/VerifyReferenceListRequestOrBuilder.java new file mode 100644 index 000000000000..dc79e96b7ae5 --- /dev/null +++ b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/VerifyReferenceListRequestOrBuilder.java @@ -0,0 +1,163 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/chronicle/v1/reference_list.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.chronicle.v1; + +@com.google.protobuf.Generated +public interface VerifyReferenceListRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.chronicle.v1.VerifyReferenceListRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the parent resource, which is the SecOps instance
+   * associated with the request. Format:
+   * `projects/{project}/locations/{location}/instances/{instance}`
+   * 
+ * + * + * string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The instance. + */ + java.lang.String getInstance(); + + /** + * + * + *
+   * Required. The name of the parent resource, which is the SecOps instance
+   * associated with the request. Format:
+   * `projects/{project}/locations/{location}/instances/{instance}`
+   * 
+ * + * + * string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for instance. + */ + com.google.protobuf.ByteString getInstanceBytes(); + + /** + * + * + *
+   * Required. Type (format) of list lines.
+   * 
+ * + * + * .google.cloud.chronicle.v1.ReferenceListSyntaxType syntax_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for syntaxType. + */ + int getSyntaxTypeValue(); + + /** + * + * + *
+   * Required. Type (format) of list lines.
+   * 
+ * + * + * .google.cloud.chronicle.v1.ReferenceListSyntaxType syntax_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The syntaxType. + */ + com.google.cloud.chronicle.v1.ReferenceListSyntaxType getSyntaxType(); + + /** + * + * + *
+   * Required. The entries of the reference list.
+   * Each line may be either an item in the list or a comment.
+   * 
+ * + * + * repeated .google.cloud.chronicle.v1.ReferenceListEntry entries = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getEntriesList(); + + /** + * + * + *
+   * Required. The entries of the reference list.
+   * Each line may be either an item in the list or a comment.
+   * 
+ * + * + * repeated .google.cloud.chronicle.v1.ReferenceListEntry entries = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.chronicle.v1.ReferenceListEntry getEntries(int index); + + /** + * + * + *
+   * Required. The entries of the reference list.
+   * Each line may be either an item in the list or a comment.
+   * 
+ * + * + * repeated .google.cloud.chronicle.v1.ReferenceListEntry entries = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getEntriesCount(); + + /** + * + * + *
+   * Required. The entries of the reference list.
+   * Each line may be either an item in the list or a comment.
+   * 
+ * + * + * repeated .google.cloud.chronicle.v1.ReferenceListEntry entries = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getEntriesOrBuilderList(); + + /** + * + * + *
+   * Required. The entries of the reference list.
+   * Each line may be either an item in the list or a comment.
+   * 
+ * + * + * repeated .google.cloud.chronicle.v1.ReferenceListEntry entries = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.chronicle.v1.ReferenceListEntryOrBuilder getEntriesOrBuilder(int index); +} diff --git a/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/VerifyReferenceListResponse.java b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/VerifyReferenceListResponse.java new file mode 100644 index 000000000000..c465800aec35 --- /dev/null +++ b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/VerifyReferenceListResponse.java @@ -0,0 +1,1023 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/chronicle/v1/reference_list.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.chronicle.v1; + +/** + * + * + *
+ * VerifyListResponse response message.
+ * 
+ * + * Protobuf type {@code google.cloud.chronicle.v1.VerifyReferenceListResponse} + */ +@com.google.protobuf.Generated +public final class VerifyReferenceListResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.chronicle.v1.VerifyReferenceListResponse) + VerifyReferenceListResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "VerifyReferenceListResponse"); + } + + // Use VerifyReferenceListResponse.newBuilder() to construct. + private VerifyReferenceListResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private VerifyReferenceListResponse() { + errors_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.chronicle.v1.ReferenceListProto + .internal_static_google_cloud_chronicle_v1_VerifyReferenceListResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.chronicle.v1.ReferenceListProto + .internal_static_google_cloud_chronicle_v1_VerifyReferenceListResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.chronicle.v1.VerifyReferenceListResponse.class, + com.google.cloud.chronicle.v1.VerifyReferenceListResponse.Builder.class); + } + + public static final int SUCCESS_FIELD_NUMBER = 1; + private boolean success_ = false; + + /** + * + * + *
+   * Validity of list - true if no errors found.
+   * 
+ * + * bool success = 1; + * + * @return The success. + */ + @java.lang.Override + public boolean getSuccess() { + return success_; + } + + public static final int ERRORS_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private java.util.List errors_; + + /** + * + * + *
+   * Line-level errors causing the list to be invalid.
+   * 
+ * + * repeated .google.cloud.chronicle.v1.ReferenceListError errors = 2; + */ + @java.lang.Override + public java.util.List getErrorsList() { + return errors_; + } + + /** + * + * + *
+   * Line-level errors causing the list to be invalid.
+   * 
+ * + * repeated .google.cloud.chronicle.v1.ReferenceListError errors = 2; + */ + @java.lang.Override + public java.util.List + getErrorsOrBuilderList() { + return errors_; + } + + /** + * + * + *
+   * Line-level errors causing the list to be invalid.
+   * 
+ * + * repeated .google.cloud.chronicle.v1.ReferenceListError errors = 2; + */ + @java.lang.Override + public int getErrorsCount() { + return errors_.size(); + } + + /** + * + * + *
+   * Line-level errors causing the list to be invalid.
+   * 
+ * + * repeated .google.cloud.chronicle.v1.ReferenceListError errors = 2; + */ + @java.lang.Override + public com.google.cloud.chronicle.v1.ReferenceListError getErrors(int index) { + return errors_.get(index); + } + + /** + * + * + *
+   * Line-level errors causing the list to be invalid.
+   * 
+ * + * repeated .google.cloud.chronicle.v1.ReferenceListError errors = 2; + */ + @java.lang.Override + public com.google.cloud.chronicle.v1.ReferenceListErrorOrBuilder getErrorsOrBuilder(int index) { + return errors_.get(index); + } + + 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 (success_ != false) { + output.writeBool(1, success_); + } + for (int i = 0; i < errors_.size(); i++) { + output.writeMessage(2, errors_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (success_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, success_); + } + for (int i = 0; i < errors_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, errors_.get(i)); + } + 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 com.google.cloud.chronicle.v1.VerifyReferenceListResponse)) { + return super.equals(obj); + } + com.google.cloud.chronicle.v1.VerifyReferenceListResponse other = + (com.google.cloud.chronicle.v1.VerifyReferenceListResponse) obj; + + if (getSuccess() != other.getSuccess()) return false; + if (!getErrorsList().equals(other.getErrorsList())) 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) + SUCCESS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSuccess()); + if (getErrorsCount() > 0) { + hash = (37 * hash) + ERRORS_FIELD_NUMBER; + hash = (53 * hash) + getErrorsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.chronicle.v1.VerifyReferenceListResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.chronicle.v1.VerifyReferenceListResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.chronicle.v1.VerifyReferenceListResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.chronicle.v1.VerifyReferenceListResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.chronicle.v1.VerifyReferenceListResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.chronicle.v1.VerifyReferenceListResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.chronicle.v1.VerifyReferenceListResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.chronicle.v1.VerifyReferenceListResponse 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 com.google.cloud.chronicle.v1.VerifyReferenceListResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.chronicle.v1.VerifyReferenceListResponse 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 com.google.cloud.chronicle.v1.VerifyReferenceListResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.chronicle.v1.VerifyReferenceListResponse 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( + com.google.cloud.chronicle.v1.VerifyReferenceListResponse 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; + } + + /** + * + * + *
+   * VerifyListResponse response message.
+   * 
+ * + * Protobuf type {@code google.cloud.chronicle.v1.VerifyReferenceListResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.chronicle.v1.VerifyReferenceListResponse) + com.google.cloud.chronicle.v1.VerifyReferenceListResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.chronicle.v1.ReferenceListProto + .internal_static_google_cloud_chronicle_v1_VerifyReferenceListResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.chronicle.v1.ReferenceListProto + .internal_static_google_cloud_chronicle_v1_VerifyReferenceListResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.chronicle.v1.VerifyReferenceListResponse.class, + com.google.cloud.chronicle.v1.VerifyReferenceListResponse.Builder.class); + } + + // Construct using com.google.cloud.chronicle.v1.VerifyReferenceListResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + success_ = false; + if (errorsBuilder_ == null) { + errors_ = java.util.Collections.emptyList(); + } else { + errors_ = null; + errorsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.chronicle.v1.ReferenceListProto + .internal_static_google_cloud_chronicle_v1_VerifyReferenceListResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.chronicle.v1.VerifyReferenceListResponse getDefaultInstanceForType() { + return com.google.cloud.chronicle.v1.VerifyReferenceListResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.chronicle.v1.VerifyReferenceListResponse build() { + com.google.cloud.chronicle.v1.VerifyReferenceListResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.chronicle.v1.VerifyReferenceListResponse buildPartial() { + com.google.cloud.chronicle.v1.VerifyReferenceListResponse result = + new com.google.cloud.chronicle.v1.VerifyReferenceListResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.chronicle.v1.VerifyReferenceListResponse result) { + if (errorsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + errors_ = java.util.Collections.unmodifiableList(errors_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.errors_ = errors_; + } else { + result.errors_ = errorsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.chronicle.v1.VerifyReferenceListResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.success_ = success_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.chronicle.v1.VerifyReferenceListResponse) { + return mergeFrom((com.google.cloud.chronicle.v1.VerifyReferenceListResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.chronicle.v1.VerifyReferenceListResponse other) { + if (other == com.google.cloud.chronicle.v1.VerifyReferenceListResponse.getDefaultInstance()) + return this; + if (other.getSuccess() != false) { + setSuccess(other.getSuccess()); + } + if (errorsBuilder_ == null) { + if (!other.errors_.isEmpty()) { + if (errors_.isEmpty()) { + errors_ = other.errors_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureErrorsIsMutable(); + errors_.addAll(other.errors_); + } + onChanged(); + } + } else { + if (!other.errors_.isEmpty()) { + if (errorsBuilder_.isEmpty()) { + errorsBuilder_.dispose(); + errorsBuilder_ = null; + errors_ = other.errors_; + bitField0_ = (bitField0_ & ~0x00000002); + errorsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetErrorsFieldBuilder() + : null; + } else { + errorsBuilder_.addAllMessages(other.errors_); + } + } + } + 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 8: + { + success_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: + { + com.google.cloud.chronicle.v1.ReferenceListError m = + input.readMessage( + com.google.cloud.chronicle.v1.ReferenceListError.parser(), + extensionRegistry); + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.add(m); + } else { + errorsBuilder_.addMessage(m); + } + break; + } // case 18 + 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 boolean success_; + + /** + * + * + *
+     * Validity of list - true if no errors found.
+     * 
+ * + * bool success = 1; + * + * @return The success. + */ + @java.lang.Override + public boolean getSuccess() { + return success_; + } + + /** + * + * + *
+     * Validity of list - true if no errors found.
+     * 
+ * + * bool success = 1; + * + * @param value The success to set. + * @return This builder for chaining. + */ + public Builder setSuccess(boolean value) { + + success_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Validity of list - true if no errors found.
+     * 
+ * + * bool success = 1; + * + * @return This builder for chaining. + */ + public Builder clearSuccess() { + bitField0_ = (bitField0_ & ~0x00000001); + success_ = false; + onChanged(); + return this; + } + + private java.util.List errors_ = + java.util.Collections.emptyList(); + + private void ensureErrorsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + errors_ = + new java.util.ArrayList(errors_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.chronicle.v1.ReferenceListError, + com.google.cloud.chronicle.v1.ReferenceListError.Builder, + com.google.cloud.chronicle.v1.ReferenceListErrorOrBuilder> + errorsBuilder_; + + /** + * + * + *
+     * Line-level errors causing the list to be invalid.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.ReferenceListError errors = 2; + */ + public java.util.List getErrorsList() { + if (errorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(errors_); + } else { + return errorsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * Line-level errors causing the list to be invalid.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.ReferenceListError errors = 2; + */ + public int getErrorsCount() { + if (errorsBuilder_ == null) { + return errors_.size(); + } else { + return errorsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * Line-level errors causing the list to be invalid.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.ReferenceListError errors = 2; + */ + public com.google.cloud.chronicle.v1.ReferenceListError getErrors(int index) { + if (errorsBuilder_ == null) { + return errors_.get(index); + } else { + return errorsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * Line-level errors causing the list to be invalid.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.ReferenceListError errors = 2; + */ + public Builder setErrors(int index, com.google.cloud.chronicle.v1.ReferenceListError value) { + if (errorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorsIsMutable(); + errors_.set(index, value); + onChanged(); + } else { + errorsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Line-level errors causing the list to be invalid.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.ReferenceListError errors = 2; + */ + public Builder setErrors( + int index, com.google.cloud.chronicle.v1.ReferenceListError.Builder builderForValue) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.set(index, builderForValue.build()); + onChanged(); + } else { + errorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Line-level errors causing the list to be invalid.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.ReferenceListError errors = 2; + */ + public Builder addErrors(com.google.cloud.chronicle.v1.ReferenceListError value) { + if (errorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorsIsMutable(); + errors_.add(value); + onChanged(); + } else { + errorsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * Line-level errors causing the list to be invalid.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.ReferenceListError errors = 2; + */ + public Builder addErrors(int index, com.google.cloud.chronicle.v1.ReferenceListError value) { + if (errorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureErrorsIsMutable(); + errors_.add(index, value); + onChanged(); + } else { + errorsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * Line-level errors causing the list to be invalid.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.ReferenceListError errors = 2; + */ + public Builder addErrors( + com.google.cloud.chronicle.v1.ReferenceListError.Builder builderForValue) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.add(builderForValue.build()); + onChanged(); + } else { + errorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Line-level errors causing the list to be invalid.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.ReferenceListError errors = 2; + */ + public Builder addErrors( + int index, com.google.cloud.chronicle.v1.ReferenceListError.Builder builderForValue) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.add(index, builderForValue.build()); + onChanged(); + } else { + errorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * Line-level errors causing the list to be invalid.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.ReferenceListError errors = 2; + */ + public Builder addAllErrors( + java.lang.Iterable values) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, errors_); + onChanged(); + } else { + errorsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * Line-level errors causing the list to be invalid.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.ReferenceListError errors = 2; + */ + public Builder clearErrors() { + if (errorsBuilder_ == null) { + errors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + errorsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * Line-level errors causing the list to be invalid.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.ReferenceListError errors = 2; + */ + public Builder removeErrors(int index) { + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.remove(index); + onChanged(); + } else { + errorsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * Line-level errors causing the list to be invalid.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.ReferenceListError errors = 2; + */ + public com.google.cloud.chronicle.v1.ReferenceListError.Builder getErrorsBuilder(int index) { + return internalGetErrorsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * Line-level errors causing the list to be invalid.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.ReferenceListError errors = 2; + */ + public com.google.cloud.chronicle.v1.ReferenceListErrorOrBuilder getErrorsOrBuilder(int index) { + if (errorsBuilder_ == null) { + return errors_.get(index); + } else { + return errorsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * Line-level errors causing the list to be invalid.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.ReferenceListError errors = 2; + */ + public java.util.List + getErrorsOrBuilderList() { + if (errorsBuilder_ != null) { + return errorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(errors_); + } + } + + /** + * + * + *
+     * Line-level errors causing the list to be invalid.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.ReferenceListError errors = 2; + */ + public com.google.cloud.chronicle.v1.ReferenceListError.Builder addErrorsBuilder() { + return internalGetErrorsFieldBuilder() + .addBuilder(com.google.cloud.chronicle.v1.ReferenceListError.getDefaultInstance()); + } + + /** + * + * + *
+     * Line-level errors causing the list to be invalid.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.ReferenceListError errors = 2; + */ + public com.google.cloud.chronicle.v1.ReferenceListError.Builder addErrorsBuilder(int index) { + return internalGetErrorsFieldBuilder() + .addBuilder(index, com.google.cloud.chronicle.v1.ReferenceListError.getDefaultInstance()); + } + + /** + * + * + *
+     * Line-level errors causing the list to be invalid.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.ReferenceListError errors = 2; + */ + public java.util.List + getErrorsBuilderList() { + return internalGetErrorsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.chronicle.v1.ReferenceListError, + com.google.cloud.chronicle.v1.ReferenceListError.Builder, + com.google.cloud.chronicle.v1.ReferenceListErrorOrBuilder> + internalGetErrorsFieldBuilder() { + if (errorsBuilder_ == null) { + errorsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.chronicle.v1.ReferenceListError, + com.google.cloud.chronicle.v1.ReferenceListError.Builder, + com.google.cloud.chronicle.v1.ReferenceListErrorOrBuilder>( + errors_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + errors_ = null; + } + return errorsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.chronicle.v1.VerifyReferenceListResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.chronicle.v1.VerifyReferenceListResponse) + private static final com.google.cloud.chronicle.v1.VerifyReferenceListResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.chronicle.v1.VerifyReferenceListResponse(); + } + + public static com.google.cloud.chronicle.v1.VerifyReferenceListResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VerifyReferenceListResponse 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 com.google.cloud.chronicle.v1.VerifyReferenceListResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/VerifyReferenceListResponseOrBuilder.java b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/VerifyReferenceListResponseOrBuilder.java new file mode 100644 index 000000000000..43a8f4de4028 --- /dev/null +++ b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/VerifyReferenceListResponseOrBuilder.java @@ -0,0 +1,97 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/chronicle/v1/reference_list.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.chronicle.v1; + +@com.google.protobuf.Generated +public interface VerifyReferenceListResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.chronicle.v1.VerifyReferenceListResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Validity of list - true if no errors found.
+   * 
+ * + * bool success = 1; + * + * @return The success. + */ + boolean getSuccess(); + + /** + * + * + *
+   * Line-level errors causing the list to be invalid.
+   * 
+ * + * repeated .google.cloud.chronicle.v1.ReferenceListError errors = 2; + */ + java.util.List getErrorsList(); + + /** + * + * + *
+   * Line-level errors causing the list to be invalid.
+   * 
+ * + * repeated .google.cloud.chronicle.v1.ReferenceListError errors = 2; + */ + com.google.cloud.chronicle.v1.ReferenceListError getErrors(int index); + + /** + * + * + *
+   * Line-level errors causing the list to be invalid.
+   * 
+ * + * repeated .google.cloud.chronicle.v1.ReferenceListError errors = 2; + */ + int getErrorsCount(); + + /** + * + * + *
+   * Line-level errors causing the list to be invalid.
+   * 
+ * + * repeated .google.cloud.chronicle.v1.ReferenceListError errors = 2; + */ + java.util.List + getErrorsOrBuilderList(); + + /** + * + * + *
+   * Line-level errors causing the list to be invalid.
+   * 
+ * + * repeated .google.cloud.chronicle.v1.ReferenceListError errors = 2; + */ + com.google.cloud.chronicle.v1.ReferenceListErrorOrBuilder getErrorsOrBuilder(int index); +} diff --git a/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/VerifyRuleTextRequest.java b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/VerifyRuleTextRequest.java new file mode 100644 index 000000000000..2eb46d5259b1 --- /dev/null +++ b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/VerifyRuleTextRequest.java @@ -0,0 +1,813 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/chronicle/v1/rule.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.chronicle.v1; + +/** + * + * + *
+ * Request message for VerifyRuleText method.
+ * 
+ * + * Protobuf type {@code google.cloud.chronicle.v1.VerifyRuleTextRequest} + */ +@com.google.protobuf.Generated +public final class VerifyRuleTextRequest extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.chronicle.v1.VerifyRuleTextRequest) + VerifyRuleTextRequestOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "VerifyRuleTextRequest"); + } + + // Use VerifyRuleTextRequest.newBuilder() to construct. + private VerifyRuleTextRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private VerifyRuleTextRequest() { + instance_ = ""; + ruleText_ = ""; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.chronicle.v1.RuleProto + .internal_static_google_cloud_chronicle_v1_VerifyRuleTextRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.chronicle.v1.RuleProto + .internal_static_google_cloud_chronicle_v1_VerifyRuleTextRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.chronicle.v1.VerifyRuleTextRequest.class, + com.google.cloud.chronicle.v1.VerifyRuleTextRequest.Builder.class); + } + + public static final int INSTANCE_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object instance_ = ""; + + /** + * + * + *
+   * Required. The name of the parent resource, which is the SecOps instance
+   * associated with the request. Format:
+   * `projects/{project}/locations/{location}/instances/{instance}`
+   * 
+ * + * + * string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The instance. + */ + @java.lang.Override + public java.lang.String getInstance() { + java.lang.Object ref = instance_; + 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(); + instance_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The name of the parent resource, which is the SecOps instance
+   * associated with the request. Format:
+   * `projects/{project}/locations/{location}/instances/{instance}`
+   * 
+ * + * + * string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for instance. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInstanceBytes() { + java.lang.Object ref = instance_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RULE_TEXT_FIELD_NUMBER = 2; + + @SuppressWarnings("serial") + private volatile java.lang.Object ruleText_ = ""; + + /** + * + * + *
+   * Required. The rule text to verify as a UTF-8 string.
+   * 
+ * + * string rule_text = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The ruleText. + */ + @java.lang.Override + public java.lang.String getRuleText() { + java.lang.Object ref = ruleText_; + 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(); + ruleText_ = s; + return s; + } + } + + /** + * + * + *
+   * Required. The rule text to verify as a UTF-8 string.
+   * 
+ * + * string rule_text = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for ruleText. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRuleTextBytes() { + java.lang.Object ref = ruleText_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ruleText_ = 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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(instance_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 1, instance_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ruleText_)) { + com.google.protobuf.GeneratedMessage.writeString(output, 2, ruleText_); + } + 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(instance_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, instance_); + } + if (!com.google.protobuf.GeneratedMessage.isStringEmpty(ruleText_)) { + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, ruleText_); + } + 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 com.google.cloud.chronicle.v1.VerifyRuleTextRequest)) { + return super.equals(obj); + } + com.google.cloud.chronicle.v1.VerifyRuleTextRequest other = + (com.google.cloud.chronicle.v1.VerifyRuleTextRequest) obj; + + if (!getInstance().equals(other.getInstance())) return false; + if (!getRuleText().equals(other.getRuleText())) 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) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + hash = (37 * hash) + RULE_TEXT_FIELD_NUMBER; + hash = (53 * hash) + getRuleText().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.chronicle.v1.VerifyRuleTextRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.chronicle.v1.VerifyRuleTextRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.chronicle.v1.VerifyRuleTextRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.chronicle.v1.VerifyRuleTextRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.chronicle.v1.VerifyRuleTextRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.chronicle.v1.VerifyRuleTextRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.chronicle.v1.VerifyRuleTextRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.chronicle.v1.VerifyRuleTextRequest 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 com.google.cloud.chronicle.v1.VerifyRuleTextRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.chronicle.v1.VerifyRuleTextRequest 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 com.google.cloud.chronicle.v1.VerifyRuleTextRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.chronicle.v1.VerifyRuleTextRequest 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(com.google.cloud.chronicle.v1.VerifyRuleTextRequest 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; + } + + /** + * + * + *
+   * Request message for VerifyRuleText method.
+   * 
+ * + * Protobuf type {@code google.cloud.chronicle.v1.VerifyRuleTextRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.chronicle.v1.VerifyRuleTextRequest) + com.google.cloud.chronicle.v1.VerifyRuleTextRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.chronicle.v1.RuleProto + .internal_static_google_cloud_chronicle_v1_VerifyRuleTextRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.chronicle.v1.RuleProto + .internal_static_google_cloud_chronicle_v1_VerifyRuleTextRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.chronicle.v1.VerifyRuleTextRequest.class, + com.google.cloud.chronicle.v1.VerifyRuleTextRequest.Builder.class); + } + + // Construct using com.google.cloud.chronicle.v1.VerifyRuleTextRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + instance_ = ""; + ruleText_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.chronicle.v1.RuleProto + .internal_static_google_cloud_chronicle_v1_VerifyRuleTextRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.chronicle.v1.VerifyRuleTextRequest getDefaultInstanceForType() { + return com.google.cloud.chronicle.v1.VerifyRuleTextRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.chronicle.v1.VerifyRuleTextRequest build() { + com.google.cloud.chronicle.v1.VerifyRuleTextRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.chronicle.v1.VerifyRuleTextRequest buildPartial() { + com.google.cloud.chronicle.v1.VerifyRuleTextRequest result = + new com.google.cloud.chronicle.v1.VerifyRuleTextRequest(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartial0(com.google.cloud.chronicle.v1.VerifyRuleTextRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.instance_ = instance_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.ruleText_ = ruleText_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.chronicle.v1.VerifyRuleTextRequest) { + return mergeFrom((com.google.cloud.chronicle.v1.VerifyRuleTextRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.chronicle.v1.VerifyRuleTextRequest other) { + if (other == com.google.cloud.chronicle.v1.VerifyRuleTextRequest.getDefaultInstance()) + return this; + if (!other.getInstance().isEmpty()) { + instance_ = other.instance_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getRuleText().isEmpty()) { + ruleText_ = other.ruleText_; + bitField0_ |= 0x00000002; + onChanged(); + } + 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: + { + instance_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: + { + ruleText_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + 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 instance_ = ""; + + /** + * + * + *
+     * Required. The name of the parent resource, which is the SecOps instance
+     * associated with the request. Format:
+     * `projects/{project}/locations/{location}/instances/{instance}`
+     * 
+ * + * + * string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The instance. + */ + public java.lang.String getInstance() { + java.lang.Object ref = instance_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instance_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The name of the parent resource, which is the SecOps instance
+     * associated with the request. Format:
+     * `projects/{project}/locations/{location}/instances/{instance}`
+     * 
+ * + * + * string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for instance. + */ + public com.google.protobuf.ByteString getInstanceBytes() { + java.lang.Object ref = instance_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + instance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The name of the parent resource, which is the SecOps instance
+     * associated with the request. Format:
+     * `projects/{project}/locations/{location}/instances/{instance}`
+     * 
+ * + * + * string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The instance to set. + * @return This builder for chaining. + */ + public Builder setInstance(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + instance_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the parent resource, which is the SecOps instance
+     * associated with the request. Format:
+     * `projects/{project}/locations/{location}/instances/{instance}`
+     * 
+ * + * + * string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearInstance() { + instance_ = getDefaultInstance().getInstance(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The name of the parent resource, which is the SecOps instance
+     * associated with the request. Format:
+     * `projects/{project}/locations/{location}/instances/{instance}`
+     * 
+ * + * + * string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for instance to set. + * @return This builder for chaining. + */ + public Builder setInstanceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + instance_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object ruleText_ = ""; + + /** + * + * + *
+     * Required. The rule text to verify as a UTF-8 string.
+     * 
+ * + * string rule_text = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The ruleText. + */ + public java.lang.String getRuleText() { + java.lang.Object ref = ruleText_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + ruleText_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * + * + *
+     * Required. The rule text to verify as a UTF-8 string.
+     * 
+ * + * string rule_text = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for ruleText. + */ + public com.google.protobuf.ByteString getRuleTextBytes() { + java.lang.Object ref = ruleText_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + ruleText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * + * + *
+     * Required. The rule text to verify as a UTF-8 string.
+     * 
+ * + * string rule_text = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The ruleText to set. + * @return This builder for chaining. + */ + public Builder setRuleText(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ruleText_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The rule text to verify as a UTF-8 string.
+     * 
+ * + * string rule_text = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearRuleText() { + ruleText_ = getDefaultInstance().getRuleText(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + + /** + * + * + *
+     * Required. The rule text to verify as a UTF-8 string.
+     * 
+ * + * string rule_text = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for ruleText to set. + * @return This builder for chaining. + */ + public Builder setRuleTextBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ruleText_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.chronicle.v1.VerifyRuleTextRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.chronicle.v1.VerifyRuleTextRequest) + private static final com.google.cloud.chronicle.v1.VerifyRuleTextRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.chronicle.v1.VerifyRuleTextRequest(); + } + + public static com.google.cloud.chronicle.v1.VerifyRuleTextRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VerifyRuleTextRequest 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 com.google.cloud.chronicle.v1.VerifyRuleTextRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/VerifyRuleTextRequestOrBuilder.java b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/VerifyRuleTextRequestOrBuilder.java new file mode 100644 index 000000000000..4c5bad825a3f --- /dev/null +++ b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/VerifyRuleTextRequestOrBuilder.java @@ -0,0 +1,88 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/chronicle/v1/rule.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.chronicle.v1; + +@com.google.protobuf.Generated +public interface VerifyRuleTextRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.chronicle.v1.VerifyRuleTextRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the parent resource, which is the SecOps instance
+   * associated with the request. Format:
+   * `projects/{project}/locations/{location}/instances/{instance}`
+   * 
+ * + * + * string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The instance. + */ + java.lang.String getInstance(); + + /** + * + * + *
+   * Required. The name of the parent resource, which is the SecOps instance
+   * associated with the request. Format:
+   * `projects/{project}/locations/{location}/instances/{instance}`
+   * 
+ * + * + * string instance = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for instance. + */ + com.google.protobuf.ByteString getInstanceBytes(); + + /** + * + * + *
+   * Required. The rule text to verify as a UTF-8 string.
+   * 
+ * + * string rule_text = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The ruleText. + */ + java.lang.String getRuleText(); + + /** + * + * + *
+   * Required. The rule text to verify as a UTF-8 string.
+   * 
+ * + * string rule_text = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for ruleText. + */ + com.google.protobuf.ByteString getRuleTextBytes(); +} diff --git a/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/VerifyRuleTextResponse.java b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/VerifyRuleTextResponse.java new file mode 100644 index 000000000000..b72ad174916f --- /dev/null +++ b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/VerifyRuleTextResponse.java @@ -0,0 +1,1088 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/chronicle/v1/rule.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.chronicle.v1; + +/** + * + * + *
+ * Response message for VerifyRuleText method.
+ * 
+ * + * Protobuf type {@code google.cloud.chronicle.v1.VerifyRuleTextResponse} + */ +@com.google.protobuf.Generated +public final class VerifyRuleTextResponse extends com.google.protobuf.GeneratedMessage + implements + // @@protoc_insertion_point(message_implements:google.cloud.chronicle.v1.VerifyRuleTextResponse) + VerifyRuleTextResponseOrBuilder { + private static final long serialVersionUID = 0L; + + static { + com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion( + com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC, + /* major= */ 4, + /* minor= */ 33, + /* patch= */ 2, + /* suffix= */ "", + "VerifyRuleTextResponse"); + } + + // Use VerifyRuleTextResponse.newBuilder() to construct. + private VerifyRuleTextResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + + private VerifyRuleTextResponse() { + compilationDiagnostics_ = java.util.Collections.emptyList(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.chronicle.v1.RuleProto + .internal_static_google_cloud_chronicle_v1_VerifyRuleTextResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.chronicle.v1.RuleProto + .internal_static_google_cloud_chronicle_v1_VerifyRuleTextResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.chronicle.v1.VerifyRuleTextResponse.class, + com.google.cloud.chronicle.v1.VerifyRuleTextResponse.Builder.class); + } + + public static final int SUCCESS_FIELD_NUMBER = 1; + private boolean success_ = false; + + /** + * + * + *
+   * Whether or not the rule text was successfully verified.
+   * 
+ * + * bool success = 1; + * + * @return The success. + */ + @java.lang.Override + public boolean getSuccess() { + return success_; + } + + public static final int COMPILATION_DIAGNOSTICS_FIELD_NUMBER = 3; + + @SuppressWarnings("serial") + private java.util.List + compilationDiagnostics_; + + /** + * + * + *
+   * A list of a rule's corresponding compilation diagnostic messages
+   * such as compilation errors and compilation warnings.
+   * 
+ * + * repeated .google.cloud.chronicle.v1.CompilationDiagnostic compilation_diagnostics = 3; + * + */ + @java.lang.Override + public java.util.List + getCompilationDiagnosticsList() { + return compilationDiagnostics_; + } + + /** + * + * + *
+   * A list of a rule's corresponding compilation diagnostic messages
+   * such as compilation errors and compilation warnings.
+   * 
+ * + * repeated .google.cloud.chronicle.v1.CompilationDiagnostic compilation_diagnostics = 3; + * + */ + @java.lang.Override + public java.util.List + getCompilationDiagnosticsOrBuilderList() { + return compilationDiagnostics_; + } + + /** + * + * + *
+   * A list of a rule's corresponding compilation diagnostic messages
+   * such as compilation errors and compilation warnings.
+   * 
+ * + * repeated .google.cloud.chronicle.v1.CompilationDiagnostic compilation_diagnostics = 3; + * + */ + @java.lang.Override + public int getCompilationDiagnosticsCount() { + return compilationDiagnostics_.size(); + } + + /** + * + * + *
+   * A list of a rule's corresponding compilation diagnostic messages
+   * such as compilation errors and compilation warnings.
+   * 
+ * + * repeated .google.cloud.chronicle.v1.CompilationDiagnostic compilation_diagnostics = 3; + * + */ + @java.lang.Override + public com.google.cloud.chronicle.v1.CompilationDiagnostic getCompilationDiagnostics(int index) { + return compilationDiagnostics_.get(index); + } + + /** + * + * + *
+   * A list of a rule's corresponding compilation diagnostic messages
+   * such as compilation errors and compilation warnings.
+   * 
+ * + * repeated .google.cloud.chronicle.v1.CompilationDiagnostic compilation_diagnostics = 3; + * + */ + @java.lang.Override + public com.google.cloud.chronicle.v1.CompilationDiagnosticOrBuilder + getCompilationDiagnosticsOrBuilder(int index) { + return compilationDiagnostics_.get(index); + } + + 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 (success_ != false) { + output.writeBool(1, success_); + } + for (int i = 0; i < compilationDiagnostics_.size(); i++) { + output.writeMessage(3, compilationDiagnostics_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (success_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, success_); + } + for (int i = 0; i < compilationDiagnostics_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, compilationDiagnostics_.get(i)); + } + 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 com.google.cloud.chronicle.v1.VerifyRuleTextResponse)) { + return super.equals(obj); + } + com.google.cloud.chronicle.v1.VerifyRuleTextResponse other = + (com.google.cloud.chronicle.v1.VerifyRuleTextResponse) obj; + + if (getSuccess() != other.getSuccess()) return false; + if (!getCompilationDiagnosticsList().equals(other.getCompilationDiagnosticsList())) + 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) + SUCCESS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSuccess()); + if (getCompilationDiagnosticsCount() > 0) { + hash = (37 * hash) + COMPILATION_DIAGNOSTICS_FIELD_NUMBER; + hash = (53 * hash) + getCompilationDiagnosticsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.chronicle.v1.VerifyRuleTextResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.chronicle.v1.VerifyRuleTextResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.chronicle.v1.VerifyRuleTextResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.chronicle.v1.VerifyRuleTextResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.chronicle.v1.VerifyRuleTextResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.chronicle.v1.VerifyRuleTextResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.chronicle.v1.VerifyRuleTextResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.chronicle.v1.VerifyRuleTextResponse 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 com.google.cloud.chronicle.v1.VerifyRuleTextResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.chronicle.v1.VerifyRuleTextResponse 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 com.google.cloud.chronicle.v1.VerifyRuleTextResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.chronicle.v1.VerifyRuleTextResponse 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(com.google.cloud.chronicle.v1.VerifyRuleTextResponse 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; + } + + /** + * + * + *
+   * Response message for VerifyRuleText method.
+   * 
+ * + * Protobuf type {@code google.cloud.chronicle.v1.VerifyRuleTextResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.chronicle.v1.VerifyRuleTextResponse) + com.google.cloud.chronicle.v1.VerifyRuleTextResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.chronicle.v1.RuleProto + .internal_static_google_cloud_chronicle_v1_VerifyRuleTextResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.chronicle.v1.RuleProto + .internal_static_google_cloud_chronicle_v1_VerifyRuleTextResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.chronicle.v1.VerifyRuleTextResponse.class, + com.google.cloud.chronicle.v1.VerifyRuleTextResponse.Builder.class); + } + + // Construct using com.google.cloud.chronicle.v1.VerifyRuleTextResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + success_ = false; + if (compilationDiagnosticsBuilder_ == null) { + compilationDiagnostics_ = java.util.Collections.emptyList(); + } else { + compilationDiagnostics_ = null; + compilationDiagnosticsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.chronicle.v1.RuleProto + .internal_static_google_cloud_chronicle_v1_VerifyRuleTextResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.chronicle.v1.VerifyRuleTextResponse getDefaultInstanceForType() { + return com.google.cloud.chronicle.v1.VerifyRuleTextResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.chronicle.v1.VerifyRuleTextResponse build() { + com.google.cloud.chronicle.v1.VerifyRuleTextResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.chronicle.v1.VerifyRuleTextResponse buildPartial() { + com.google.cloud.chronicle.v1.VerifyRuleTextResponse result = + new com.google.cloud.chronicle.v1.VerifyRuleTextResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields( + com.google.cloud.chronicle.v1.VerifyRuleTextResponse result) { + if (compilationDiagnosticsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + compilationDiagnostics_ = java.util.Collections.unmodifiableList(compilationDiagnostics_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.compilationDiagnostics_ = compilationDiagnostics_; + } else { + result.compilationDiagnostics_ = compilationDiagnosticsBuilder_.build(); + } + } + + private void buildPartial0(com.google.cloud.chronicle.v1.VerifyRuleTextResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.success_ = success_; + } + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.chronicle.v1.VerifyRuleTextResponse) { + return mergeFrom((com.google.cloud.chronicle.v1.VerifyRuleTextResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.chronicle.v1.VerifyRuleTextResponse other) { + if (other == com.google.cloud.chronicle.v1.VerifyRuleTextResponse.getDefaultInstance()) + return this; + if (other.getSuccess() != false) { + setSuccess(other.getSuccess()); + } + if (compilationDiagnosticsBuilder_ == null) { + if (!other.compilationDiagnostics_.isEmpty()) { + if (compilationDiagnostics_.isEmpty()) { + compilationDiagnostics_ = other.compilationDiagnostics_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureCompilationDiagnosticsIsMutable(); + compilationDiagnostics_.addAll(other.compilationDiagnostics_); + } + onChanged(); + } + } else { + if (!other.compilationDiagnostics_.isEmpty()) { + if (compilationDiagnosticsBuilder_.isEmpty()) { + compilationDiagnosticsBuilder_.dispose(); + compilationDiagnosticsBuilder_ = null; + compilationDiagnostics_ = other.compilationDiagnostics_; + bitField0_ = (bitField0_ & ~0x00000002); + compilationDiagnosticsBuilder_ = + com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders + ? internalGetCompilationDiagnosticsFieldBuilder() + : null; + } else { + compilationDiagnosticsBuilder_.addAllMessages(other.compilationDiagnostics_); + } + } + } + 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 8: + { + success_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 26: + { + com.google.cloud.chronicle.v1.CompilationDiagnostic m = + input.readMessage( + com.google.cloud.chronicle.v1.CompilationDiagnostic.parser(), + extensionRegistry); + if (compilationDiagnosticsBuilder_ == null) { + ensureCompilationDiagnosticsIsMutable(); + compilationDiagnostics_.add(m); + } else { + compilationDiagnosticsBuilder_.addMessage(m); + } + 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 boolean success_; + + /** + * + * + *
+     * Whether or not the rule text was successfully verified.
+     * 
+ * + * bool success = 1; + * + * @return The success. + */ + @java.lang.Override + public boolean getSuccess() { + return success_; + } + + /** + * + * + *
+     * Whether or not the rule text was successfully verified.
+     * 
+ * + * bool success = 1; + * + * @param value The success to set. + * @return This builder for chaining. + */ + public Builder setSuccess(boolean value) { + + success_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + /** + * + * + *
+     * Whether or not the rule text was successfully verified.
+     * 
+ * + * bool success = 1; + * + * @return This builder for chaining. + */ + public Builder clearSuccess() { + bitField0_ = (bitField0_ & ~0x00000001); + success_ = false; + onChanged(); + return this; + } + + private java.util.List + compilationDiagnostics_ = java.util.Collections.emptyList(); + + private void ensureCompilationDiagnosticsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + compilationDiagnostics_ = + new java.util.ArrayList( + compilationDiagnostics_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.chronicle.v1.CompilationDiagnostic, + com.google.cloud.chronicle.v1.CompilationDiagnostic.Builder, + com.google.cloud.chronicle.v1.CompilationDiagnosticOrBuilder> + compilationDiagnosticsBuilder_; + + /** + * + * + *
+     * A list of a rule's corresponding compilation diagnostic messages
+     * such as compilation errors and compilation warnings.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.CompilationDiagnostic compilation_diagnostics = 3; + * + */ + public java.util.List + getCompilationDiagnosticsList() { + if (compilationDiagnosticsBuilder_ == null) { + return java.util.Collections.unmodifiableList(compilationDiagnostics_); + } else { + return compilationDiagnosticsBuilder_.getMessageList(); + } + } + + /** + * + * + *
+     * A list of a rule's corresponding compilation diagnostic messages
+     * such as compilation errors and compilation warnings.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.CompilationDiagnostic compilation_diagnostics = 3; + * + */ + public int getCompilationDiagnosticsCount() { + if (compilationDiagnosticsBuilder_ == null) { + return compilationDiagnostics_.size(); + } else { + return compilationDiagnosticsBuilder_.getCount(); + } + } + + /** + * + * + *
+     * A list of a rule's corresponding compilation diagnostic messages
+     * such as compilation errors and compilation warnings.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.CompilationDiagnostic compilation_diagnostics = 3; + * + */ + public com.google.cloud.chronicle.v1.CompilationDiagnostic getCompilationDiagnostics( + int index) { + if (compilationDiagnosticsBuilder_ == null) { + return compilationDiagnostics_.get(index); + } else { + return compilationDiagnosticsBuilder_.getMessage(index); + } + } + + /** + * + * + *
+     * A list of a rule's corresponding compilation diagnostic messages
+     * such as compilation errors and compilation warnings.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.CompilationDiagnostic compilation_diagnostics = 3; + * + */ + public Builder setCompilationDiagnostics( + int index, com.google.cloud.chronicle.v1.CompilationDiagnostic value) { + if (compilationDiagnosticsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCompilationDiagnosticsIsMutable(); + compilationDiagnostics_.set(index, value); + onChanged(); + } else { + compilationDiagnosticsBuilder_.setMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * A list of a rule's corresponding compilation diagnostic messages
+     * such as compilation errors and compilation warnings.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.CompilationDiagnostic compilation_diagnostics = 3; + * + */ + public Builder setCompilationDiagnostics( + int index, com.google.cloud.chronicle.v1.CompilationDiagnostic.Builder builderForValue) { + if (compilationDiagnosticsBuilder_ == null) { + ensureCompilationDiagnosticsIsMutable(); + compilationDiagnostics_.set(index, builderForValue.build()); + onChanged(); + } else { + compilationDiagnosticsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of a rule's corresponding compilation diagnostic messages
+     * such as compilation errors and compilation warnings.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.CompilationDiagnostic compilation_diagnostics = 3; + * + */ + public Builder addCompilationDiagnostics( + com.google.cloud.chronicle.v1.CompilationDiagnostic value) { + if (compilationDiagnosticsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCompilationDiagnosticsIsMutable(); + compilationDiagnostics_.add(value); + onChanged(); + } else { + compilationDiagnosticsBuilder_.addMessage(value); + } + return this; + } + + /** + * + * + *
+     * A list of a rule's corresponding compilation diagnostic messages
+     * such as compilation errors and compilation warnings.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.CompilationDiagnostic compilation_diagnostics = 3; + * + */ + public Builder addCompilationDiagnostics( + int index, com.google.cloud.chronicle.v1.CompilationDiagnostic value) { + if (compilationDiagnosticsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCompilationDiagnosticsIsMutable(); + compilationDiagnostics_.add(index, value); + onChanged(); + } else { + compilationDiagnosticsBuilder_.addMessage(index, value); + } + return this; + } + + /** + * + * + *
+     * A list of a rule's corresponding compilation diagnostic messages
+     * such as compilation errors and compilation warnings.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.CompilationDiagnostic compilation_diagnostics = 3; + * + */ + public Builder addCompilationDiagnostics( + com.google.cloud.chronicle.v1.CompilationDiagnostic.Builder builderForValue) { + if (compilationDiagnosticsBuilder_ == null) { + ensureCompilationDiagnosticsIsMutable(); + compilationDiagnostics_.add(builderForValue.build()); + onChanged(); + } else { + compilationDiagnosticsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of a rule's corresponding compilation diagnostic messages
+     * such as compilation errors and compilation warnings.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.CompilationDiagnostic compilation_diagnostics = 3; + * + */ + public Builder addCompilationDiagnostics( + int index, com.google.cloud.chronicle.v1.CompilationDiagnostic.Builder builderForValue) { + if (compilationDiagnosticsBuilder_ == null) { + ensureCompilationDiagnosticsIsMutable(); + compilationDiagnostics_.add(index, builderForValue.build()); + onChanged(); + } else { + compilationDiagnosticsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + + /** + * + * + *
+     * A list of a rule's corresponding compilation diagnostic messages
+     * such as compilation errors and compilation warnings.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.CompilationDiagnostic compilation_diagnostics = 3; + * + */ + public Builder addAllCompilationDiagnostics( + java.lang.Iterable values) { + if (compilationDiagnosticsBuilder_ == null) { + ensureCompilationDiagnosticsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, compilationDiagnostics_); + onChanged(); + } else { + compilationDiagnosticsBuilder_.addAllMessages(values); + } + return this; + } + + /** + * + * + *
+     * A list of a rule's corresponding compilation diagnostic messages
+     * such as compilation errors and compilation warnings.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.CompilationDiagnostic compilation_diagnostics = 3; + * + */ + public Builder clearCompilationDiagnostics() { + if (compilationDiagnosticsBuilder_ == null) { + compilationDiagnostics_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + compilationDiagnosticsBuilder_.clear(); + } + return this; + } + + /** + * + * + *
+     * A list of a rule's corresponding compilation diagnostic messages
+     * such as compilation errors and compilation warnings.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.CompilationDiagnostic compilation_diagnostics = 3; + * + */ + public Builder removeCompilationDiagnostics(int index) { + if (compilationDiagnosticsBuilder_ == null) { + ensureCompilationDiagnosticsIsMutable(); + compilationDiagnostics_.remove(index); + onChanged(); + } else { + compilationDiagnosticsBuilder_.remove(index); + } + return this; + } + + /** + * + * + *
+     * A list of a rule's corresponding compilation diagnostic messages
+     * such as compilation errors and compilation warnings.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.CompilationDiagnostic compilation_diagnostics = 3; + * + */ + public com.google.cloud.chronicle.v1.CompilationDiagnostic.Builder + getCompilationDiagnosticsBuilder(int index) { + return internalGetCompilationDiagnosticsFieldBuilder().getBuilder(index); + } + + /** + * + * + *
+     * A list of a rule's corresponding compilation diagnostic messages
+     * such as compilation errors and compilation warnings.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.CompilationDiagnostic compilation_diagnostics = 3; + * + */ + public com.google.cloud.chronicle.v1.CompilationDiagnosticOrBuilder + getCompilationDiagnosticsOrBuilder(int index) { + if (compilationDiagnosticsBuilder_ == null) { + return compilationDiagnostics_.get(index); + } else { + return compilationDiagnosticsBuilder_.getMessageOrBuilder(index); + } + } + + /** + * + * + *
+     * A list of a rule's corresponding compilation diagnostic messages
+     * such as compilation errors and compilation warnings.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.CompilationDiagnostic compilation_diagnostics = 3; + * + */ + public java.util.List + getCompilationDiagnosticsOrBuilderList() { + if (compilationDiagnosticsBuilder_ != null) { + return compilationDiagnosticsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(compilationDiagnostics_); + } + } + + /** + * + * + *
+     * A list of a rule's corresponding compilation diagnostic messages
+     * such as compilation errors and compilation warnings.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.CompilationDiagnostic compilation_diagnostics = 3; + * + */ + public com.google.cloud.chronicle.v1.CompilationDiagnostic.Builder + addCompilationDiagnosticsBuilder() { + return internalGetCompilationDiagnosticsFieldBuilder() + .addBuilder(com.google.cloud.chronicle.v1.CompilationDiagnostic.getDefaultInstance()); + } + + /** + * + * + *
+     * A list of a rule's corresponding compilation diagnostic messages
+     * such as compilation errors and compilation warnings.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.CompilationDiagnostic compilation_diagnostics = 3; + * + */ + public com.google.cloud.chronicle.v1.CompilationDiagnostic.Builder + addCompilationDiagnosticsBuilder(int index) { + return internalGetCompilationDiagnosticsFieldBuilder() + .addBuilder( + index, com.google.cloud.chronicle.v1.CompilationDiagnostic.getDefaultInstance()); + } + + /** + * + * + *
+     * A list of a rule's corresponding compilation diagnostic messages
+     * such as compilation errors and compilation warnings.
+     * 
+ * + * repeated .google.cloud.chronicle.v1.CompilationDiagnostic compilation_diagnostics = 3; + * + */ + public java.util.List + getCompilationDiagnosticsBuilderList() { + return internalGetCompilationDiagnosticsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.chronicle.v1.CompilationDiagnostic, + com.google.cloud.chronicle.v1.CompilationDiagnostic.Builder, + com.google.cloud.chronicle.v1.CompilationDiagnosticOrBuilder> + internalGetCompilationDiagnosticsFieldBuilder() { + if (compilationDiagnosticsBuilder_ == null) { + compilationDiagnosticsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilder< + com.google.cloud.chronicle.v1.CompilationDiagnostic, + com.google.cloud.chronicle.v1.CompilationDiagnostic.Builder, + com.google.cloud.chronicle.v1.CompilationDiagnosticOrBuilder>( + compilationDiagnostics_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + compilationDiagnostics_ = null; + } + return compilationDiagnosticsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:google.cloud.chronicle.v1.VerifyRuleTextResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.chronicle.v1.VerifyRuleTextResponse) + private static final com.google.cloud.chronicle.v1.VerifyRuleTextResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.chronicle.v1.VerifyRuleTextResponse(); + } + + public static com.google.cloud.chronicle.v1.VerifyRuleTextResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public VerifyRuleTextResponse 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 com.google.cloud.chronicle.v1.VerifyRuleTextResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/VerifyRuleTextResponseOrBuilder.java b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/VerifyRuleTextResponseOrBuilder.java new file mode 100644 index 000000000000..b1969635e766 --- /dev/null +++ b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/java/com/google/cloud/chronicle/v1/VerifyRuleTextResponseOrBuilder.java @@ -0,0 +1,109 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// NO CHECKED-IN PROTOBUF GENCODE +// source: google/cloud/chronicle/v1/rule.proto +// Protobuf Java Version: 4.33.2 + +package com.google.cloud.chronicle.v1; + +@com.google.protobuf.Generated +public interface VerifyRuleTextResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.chronicle.v1.VerifyRuleTextResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Whether or not the rule text was successfully verified.
+   * 
+ * + * bool success = 1; + * + * @return The success. + */ + boolean getSuccess(); + + /** + * + * + *
+   * A list of a rule's corresponding compilation diagnostic messages
+   * such as compilation errors and compilation warnings.
+   * 
+ * + * repeated .google.cloud.chronicle.v1.CompilationDiagnostic compilation_diagnostics = 3; + * + */ + java.util.List + getCompilationDiagnosticsList(); + + /** + * + * + *
+   * A list of a rule's corresponding compilation diagnostic messages
+   * such as compilation errors and compilation warnings.
+   * 
+ * + * repeated .google.cloud.chronicle.v1.CompilationDiagnostic compilation_diagnostics = 3; + * + */ + com.google.cloud.chronicle.v1.CompilationDiagnostic getCompilationDiagnostics(int index); + + /** + * + * + *
+   * A list of a rule's corresponding compilation diagnostic messages
+   * such as compilation errors and compilation warnings.
+   * 
+ * + * repeated .google.cloud.chronicle.v1.CompilationDiagnostic compilation_diagnostics = 3; + * + */ + int getCompilationDiagnosticsCount(); + + /** + * + * + *
+   * A list of a rule's corresponding compilation diagnostic messages
+   * such as compilation errors and compilation warnings.
+   * 
+ * + * repeated .google.cloud.chronicle.v1.CompilationDiagnostic compilation_diagnostics = 3; + * + */ + java.util.List + getCompilationDiagnosticsOrBuilderList(); + + /** + * + * + *
+   * A list of a rule's corresponding compilation diagnostic messages
+   * such as compilation errors and compilation warnings.
+   * 
+ * + * repeated .google.cloud.chronicle.v1.CompilationDiagnostic compilation_diagnostics = 3; + * + */ + com.google.cloud.chronicle.v1.CompilationDiagnosticOrBuilder getCompilationDiagnosticsOrBuilder( + int index); +} diff --git a/java-chronicle/proto-google-cloud-chronicle-v1/src/main/proto/google/cloud/chronicle/v1/reference_list.proto b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/proto/google/cloud/chronicle/v1/reference_list.proto index 9c18e6726efc..57837fd98228 100644 --- a/java-chronicle/proto-google-cloud-chronicle-v1/src/main/proto/google/cloud/chronicle/v1/reference_list.proto +++ b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/proto/google/cloud/chronicle/v1/reference_list.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -35,6 +35,8 @@ option ruby_package = "Google::Cloud::Chronicle::V1"; service ReferenceListService { option (google.api.default_host) = "chronicle.googleapis.com"; option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/chronicle," + "https://www.googleapis.com/auth/chronicle.readonly," "https://www.googleapis.com/auth/cloud-platform"; // Gets a single reference list. @@ -72,6 +74,15 @@ service ReferenceListService { }; option (google.api.method_signature) = "reference_list,update_mask"; } + + // VerifyReferenceList validates list content and returns line errors, if any. + rpc VerifyReferenceList(VerifyReferenceListRequest) + returns (VerifyReferenceListResponse) { + option (google.api.http) = { + post: "/v1/{instance=projects/*/locations/*/instances/*}:verifyReferenceList" + body: "*" + }; + } } // The syntax type indicating how list entries should be validated. @@ -219,6 +230,37 @@ message UpdateReferenceListRequest { google.protobuf.FieldMask update_mask = 2; } +// VerifyReferenceList request message. +message VerifyReferenceListRequest { + // Required. The name of the parent resource, which is the SecOps instance + // associated with the request. Format: + // `projects/{project}/locations/{location}/instances/{instance}` + string instance = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "chronicle.googleapis.com/Instance" + } + ]; + + // Required. Type (format) of list lines. + ReferenceListSyntaxType syntax_type = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The entries of the reference list. + // Each line may be either an item in the list or a comment. + repeated ReferenceListEntry entries = 3 + [(google.api.field_behavior) = REQUIRED]; +} + +// VerifyListResponse response message. +message VerifyReferenceListResponse { + // Validity of list - true if no errors found. + bool success = 1; + + // Line-level errors causing the list to be invalid. + repeated ReferenceListError errors = 2; +} + // A reference list. // Reference lists are user-defined lists of values which users can // use in multiple Rules. @@ -276,3 +318,13 @@ message ReferenceListEntry { // Required. The value of the entry. Maximum length is 512 characters. string value = 1 [(google.api.field_behavior) = REQUIRED]; } + +// The error generated when verifying the reference list. +message ReferenceListError { + // 1-indexed line number where the error occurs. + // General list errors are indexed at -1. + int32 line_number = 1; + + // Message explaining why the line is invalid. + string error_message = 2; +} diff --git a/java-chronicle/proto-google-cloud-chronicle-v1/src/main/proto/google/cloud/chronicle/v1/rule.proto b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/proto/google/cloud/chronicle/v1/rule.proto index ba8b1cd7d328..8847a2c51152 100644 --- a/java-chronicle/proto-google-cloud-chronicle-v1/src/main/proto/google/cloud/chronicle/v1/rule.proto +++ b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/proto/google/cloud/chronicle/v1/rule.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -38,6 +38,8 @@ option ruby_package = "Google::Cloud::Chronicle::V1"; service RuleService { option (google.api.default_host) = "chronicle.googleapis.com"; option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/chronicle," + "https://www.googleapis.com/auth/chronicle.readonly," "https://www.googleapis.com/auth/cloud-platform"; // Creates a new Rule. @@ -82,6 +84,15 @@ service RuleService { option (google.api.method_signature) = "name"; } + // Verifies the given rule text. + rpc VerifyRuleText(VerifyRuleTextRequest) returns (VerifyRuleTextResponse) { + option (google.api.http) = { + post: "/v1/{instance=projects/*/locations/*/instances/*}:verifyRuleText" + body: "*" + }; + option (google.api.method_signature) = "instance,rule_text"; + } + // Lists all revisions of the rule. rpc ListRuleRevisions(ListRuleRevisionsRequest) returns (ListRuleRevisionsResponse) { @@ -573,6 +584,32 @@ message DeleteRuleRequest { bool force = 2 [(google.api.field_behavior) = OPTIONAL]; } +// Request message for VerifyRuleText method. +message VerifyRuleTextRequest { + // Required. The name of the parent resource, which is the SecOps instance + // associated with the request. Format: + // `projects/{project}/locations/{location}/instances/{instance}` + string instance = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "chronicle.googleapis.com/Instance" + } + ]; + + // Required. The rule text to verify as a UTF-8 string. + string rule_text = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for VerifyRuleText method. +message VerifyRuleTextResponse { + // Whether or not the rule text was successfully verified. + bool success = 1; + + // A list of a rule's corresponding compilation diagnostic messages + // such as compilation errors and compilation warnings. + repeated CompilationDiagnostic compilation_diagnostics = 3; +} + // Request message for ListRuleRevisions method. message ListRuleRevisionsRequest { // Required. The name of the rule to list revisions for. diff --git a/java-chronicle/proto-google-cloud-chronicle-v1/src/main/proto/google/cloud/chronicle/v1/rule_execution_error.proto b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/proto/google/cloud/chronicle/v1/rule_execution_error.proto new file mode 100644 index 000000000000..452f5ca4f28b --- /dev/null +++ b/java-chronicle/proto-google-cloud-chronicle-v1/src/main/proto/google/cloud/chronicle/v1/rule_execution_error.proto @@ -0,0 +1,156 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.chronicle.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/rpc/status.proto"; +import "google/type/interval.proto"; + +option csharp_namespace = "Google.Cloud.Chronicle.V1"; +option go_package = "cloud.google.com/go/chronicle/apiv1/chroniclepb;chroniclepb"; +option java_multiple_files = true; +option java_outer_classname = "RuleExecutionErrorProto"; +option java_package = "com.google.cloud.chronicle.v1"; +option php_namespace = "Google\\Cloud\\Chronicle\\V1"; +option ruby_package = "Google::Cloud::Chronicle::V1"; +option (google.api.resource_definition) = { + type: "chronicle.googleapis.com/CuratedRule" + pattern: "projects/{project}/locations/{location}/instances/{instance}/curatedRules/{curatedRule}" +}; + +// RuleExecutionErrorService contains endpoints related to rule execution +// errors. +service RuleExecutionErrorService { + option (google.api.default_host) = "chronicle.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/chronicle," + "https://www.googleapis.com/auth/chronicle.readonly," + "https://www.googleapis.com/auth/cloud-platform"; + + // Lists rule execution errors. + rpc ListRuleExecutionErrors(ListRuleExecutionErrorsRequest) + returns (ListRuleExecutionErrorsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/instances/*}/ruleExecutionErrors" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Request message for ListRuleExecutionErrors. +message ListRuleExecutionErrorsRequest { + // Required. The instance to list rule execution errors from. + // Format: + // projects/{project}/locations/{location}/instances/{instance} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "chronicle.googleapis.com/RuleExecutionError" + } + ]; + + // The maximum number of rule execution errors to return. The service may + // return fewer than this value. If unspecified, at most 1000 rule execution + // errors will be returned. The maximum value is 10000; values above 10000 + // will be coerced to 10000. + int32 page_size = 2; + + // A page token, received from a previous `ListRuleExecutionErrors` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListRuleExecutionErrors` + // must match the call that provided the page token. + string page_token = 3; + + // A filter that can be used to retrieve specific rule execution errors. + // Only the following filters are allowed: + // ``` + // rule = "{Rule.name}" + // curated_rule = "{CuratedRule.name}" + // ``` + // The value for rule or curated_rule must be a valid rule resource name or a + // valid curated rule resource name specified in quotes. + // + // For 'rule', an optional 'revision_id' can be specified which can be used to + // fetch errors for a given revision of the rule. A '-' is also allowed to + // fetch errors across all revisions of the rule. If unspecified, only errors + // corresponding to the most recent revision of the rule will be returned. So + // these variations are all allowed: + // ``` + // rule = "{Rule.name}" + // rule = "{Rule.name}@{Rule.revision_id}" + // rule = "{Rule.name}@-" + // ``` + // Revision IDs are not supported for curated rules. + string filter = 4; +} + +// Response message for ListRuleExecutionErrors. +message ListRuleExecutionErrorsResponse { + // List of rule execution errors. + repeated RuleExecutionError rule_execution_errors = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// The RuleExecutionError resource represents an error generated from +// running/deploying a rule. +message RuleExecutionError { + option (google.api.resource) = { + type: "chronicle.googleapis.com/RuleExecutionError" + pattern: "projects/{project}/locations/{location}/instances/{instance}/ruleExecutionErrors/{rule_execution_error}" + }; + + // The resource name of the source that generated the rule execution error. + oneof source { + // Output only. The resource name of the rule that generated the rule + // execution error. + string rule = 4 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "chronicle.googleapis.com/Rule" + } + ]; + + // Output only. The resource name of the curated rule that generated the + // rule execution error. + string curated_rule = 5 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.resource_reference) = { + type: "chronicle.googleapis.com/CuratedRule" + } + ]; + } + + // Output only. The resource name of the rule execution error. + // Format: + // projects/{project}/locations/{location}/instances/{instance}/ruleExecutionErrors/{rule_execution_error} + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The error status corresponding with the rule execution error. + google.rpc.Status error = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The event time range that the rule execution error corresponds + // with. + google.type.Interval time_range = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/referencelistservice/verifyreferencelist/AsyncVerifyReferenceList.java b/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/referencelistservice/verifyreferencelist/AsyncVerifyReferenceList.java new file mode 100644 index 000000000000..bf03122216b1 --- /dev/null +++ b/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/referencelistservice/verifyreferencelist/AsyncVerifyReferenceList.java @@ -0,0 +1,56 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.chronicle.v1.samples; + +// [START chronicle_v1_generated_ReferenceListService_VerifyReferenceList_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.chronicle.v1.InstanceName; +import com.google.cloud.chronicle.v1.ReferenceListEntry; +import com.google.cloud.chronicle.v1.ReferenceListServiceClient; +import com.google.cloud.chronicle.v1.ReferenceListSyntaxType; +import com.google.cloud.chronicle.v1.VerifyReferenceListRequest; +import com.google.cloud.chronicle.v1.VerifyReferenceListResponse; +import java.util.ArrayList; + +public class AsyncVerifyReferenceList { + + public static void main(String[] args) throws Exception { + asyncVerifyReferenceList(); + } + + public static void asyncVerifyReferenceList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ReferenceListServiceClient referenceListServiceClient = + ReferenceListServiceClient.create()) { + VerifyReferenceListRequest request = + VerifyReferenceListRequest.newBuilder() + .setInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setSyntaxType(ReferenceListSyntaxType.forNumber(0)) + .addAllEntries(new ArrayList()) + .build(); + ApiFuture future = + referenceListServiceClient.verifyReferenceListCallable().futureCall(request); + // Do something. + VerifyReferenceListResponse response = future.get(); + } + } +} +// [END chronicle_v1_generated_ReferenceListService_VerifyReferenceList_async] diff --git a/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/referencelistservice/verifyreferencelist/SyncVerifyReferenceList.java b/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/referencelistservice/verifyreferencelist/SyncVerifyReferenceList.java new file mode 100644 index 000000000000..9e7b98deaba9 --- /dev/null +++ b/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/referencelistservice/verifyreferencelist/SyncVerifyReferenceList.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.chronicle.v1.samples; + +// [START chronicle_v1_generated_ReferenceListService_VerifyReferenceList_sync] +import com.google.cloud.chronicle.v1.InstanceName; +import com.google.cloud.chronicle.v1.ReferenceListEntry; +import com.google.cloud.chronicle.v1.ReferenceListServiceClient; +import com.google.cloud.chronicle.v1.ReferenceListSyntaxType; +import com.google.cloud.chronicle.v1.VerifyReferenceListRequest; +import com.google.cloud.chronicle.v1.VerifyReferenceListResponse; +import java.util.ArrayList; + +public class SyncVerifyReferenceList { + + public static void main(String[] args) throws Exception { + syncVerifyReferenceList(); + } + + public static void syncVerifyReferenceList() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (ReferenceListServiceClient referenceListServiceClient = + ReferenceListServiceClient.create()) { + VerifyReferenceListRequest request = + VerifyReferenceListRequest.newBuilder() + .setInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setSyntaxType(ReferenceListSyntaxType.forNumber(0)) + .addAllEntries(new ArrayList()) + .build(); + VerifyReferenceListResponse response = + referenceListServiceClient.verifyReferenceList(request); + } + } +} +// [END chronicle_v1_generated_ReferenceListService_VerifyReferenceList_sync] diff --git a/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleexecutionerrorservice/create/SyncCreateSetCredentialsProvider.java b/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleexecutionerrorservice/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 000000000000..730df1688d20 --- /dev/null +++ b/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleexecutionerrorservice/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,45 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.chronicle.v1.samples; + +// [START chronicle_v1_generated_RuleExecutionErrorService_Create_SetCredentialsProvider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.chronicle.v1.RuleExecutionErrorServiceClient; +import com.google.cloud.chronicle.v1.RuleExecutionErrorServiceSettings; +import com.google.cloud.chronicle.v1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RuleExecutionErrorServiceSettings ruleExecutionErrorServiceSettings = + RuleExecutionErrorServiceSettings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + RuleExecutionErrorServiceClient ruleExecutionErrorServiceClient = + RuleExecutionErrorServiceClient.create(ruleExecutionErrorServiceSettings); + } +} +// [END chronicle_v1_generated_RuleExecutionErrorService_Create_SetCredentialsProvider_sync] diff --git a/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleexecutionerrorservice/create/SyncCreateSetEndpoint.java b/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleexecutionerrorservice/create/SyncCreateSetEndpoint.java new file mode 100644 index 000000000000..6ee09e48b42d --- /dev/null +++ b/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleexecutionerrorservice/create/SyncCreateSetEndpoint.java @@ -0,0 +1,42 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.chronicle.v1.samples; + +// [START chronicle_v1_generated_RuleExecutionErrorService_Create_SetEndpoint_sync] +import com.google.cloud.chronicle.v1.RuleExecutionErrorServiceClient; +import com.google.cloud.chronicle.v1.RuleExecutionErrorServiceSettings; +import com.google.cloud.chronicle.v1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RuleExecutionErrorServiceSettings ruleExecutionErrorServiceSettings = + RuleExecutionErrorServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + RuleExecutionErrorServiceClient ruleExecutionErrorServiceClient = + RuleExecutionErrorServiceClient.create(ruleExecutionErrorServiceSettings); + } +} +// [END chronicle_v1_generated_RuleExecutionErrorService_Create_SetEndpoint_sync] diff --git a/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleexecutionerrorservice/create/SyncCreateUseHttpJsonTransport.java b/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleexecutionerrorservice/create/SyncCreateUseHttpJsonTransport.java new file mode 100644 index 000000000000..3661d1ddd7db --- /dev/null +++ b/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleexecutionerrorservice/create/SyncCreateUseHttpJsonTransport.java @@ -0,0 +1,41 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.chronicle.v1.samples; + +// [START chronicle_v1_generated_RuleExecutionErrorService_Create_UseHttpJsonTransport_sync] +import com.google.cloud.chronicle.v1.RuleExecutionErrorServiceClient; +import com.google.cloud.chronicle.v1.RuleExecutionErrorServiceSettings; + +public class SyncCreateUseHttpJsonTransport { + + public static void main(String[] args) throws Exception { + syncCreateUseHttpJsonTransport(); + } + + public static void syncCreateUseHttpJsonTransport() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RuleExecutionErrorServiceSettings ruleExecutionErrorServiceSettings = + RuleExecutionErrorServiceSettings.newHttpJsonBuilder().build(); + RuleExecutionErrorServiceClient ruleExecutionErrorServiceClient = + RuleExecutionErrorServiceClient.create(ruleExecutionErrorServiceSettings); + } +} +// [END chronicle_v1_generated_RuleExecutionErrorService_Create_UseHttpJsonTransport_sync] diff --git a/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleexecutionerrorservice/listruleexecutionerrors/AsyncListRuleExecutionErrors.java b/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleexecutionerrorservice/listruleexecutionerrors/AsyncListRuleExecutionErrors.java new file mode 100644 index 000000000000..1525d4043a3a --- /dev/null +++ b/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleexecutionerrorservice/listruleexecutionerrors/AsyncListRuleExecutionErrors.java @@ -0,0 +1,58 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.chronicle.v1.samples; + +// [START chronicle_v1_generated_RuleExecutionErrorService_ListRuleExecutionErrors_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.chronicle.v1.InstanceName; +import com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest; +import com.google.cloud.chronicle.v1.RuleExecutionError; +import com.google.cloud.chronicle.v1.RuleExecutionErrorServiceClient; + +public class AsyncListRuleExecutionErrors { + + public static void main(String[] args) throws Exception { + asyncListRuleExecutionErrors(); + } + + public static void asyncListRuleExecutionErrors() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RuleExecutionErrorServiceClient ruleExecutionErrorServiceClient = + RuleExecutionErrorServiceClient.create()) { + ListRuleExecutionErrorsRequest request = + ListRuleExecutionErrorsRequest.newBuilder() + .setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + ApiFuture future = + ruleExecutionErrorServiceClient + .listRuleExecutionErrorsPagedCallable() + .futureCall(request); + // Do something. + for (RuleExecutionError element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END chronicle_v1_generated_RuleExecutionErrorService_ListRuleExecutionErrors_async] diff --git a/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleexecutionerrorservice/listruleexecutionerrors/AsyncListRuleExecutionErrorsPaged.java b/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleexecutionerrorservice/listruleexecutionerrors/AsyncListRuleExecutionErrorsPaged.java new file mode 100644 index 000000000000..8c4008a7d7cd --- /dev/null +++ b/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleexecutionerrorservice/listruleexecutionerrors/AsyncListRuleExecutionErrorsPaged.java @@ -0,0 +1,64 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.chronicle.v1.samples; + +// [START chronicle_v1_generated_RuleExecutionErrorService_ListRuleExecutionErrors_Paged_async] +import com.google.cloud.chronicle.v1.InstanceName; +import com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest; +import com.google.cloud.chronicle.v1.ListRuleExecutionErrorsResponse; +import com.google.cloud.chronicle.v1.RuleExecutionError; +import com.google.cloud.chronicle.v1.RuleExecutionErrorServiceClient; +import com.google.common.base.Strings; + +public class AsyncListRuleExecutionErrorsPaged { + + public static void main(String[] args) throws Exception { + asyncListRuleExecutionErrorsPaged(); + } + + public static void asyncListRuleExecutionErrorsPaged() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RuleExecutionErrorServiceClient ruleExecutionErrorServiceClient = + RuleExecutionErrorServiceClient.create()) { + ListRuleExecutionErrorsRequest request = + ListRuleExecutionErrorsRequest.newBuilder() + .setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + while (true) { + ListRuleExecutionErrorsResponse response = + ruleExecutionErrorServiceClient.listRuleExecutionErrorsCallable().call(request); + for (RuleExecutionError element : response.getRuleExecutionErrorsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END chronicle_v1_generated_RuleExecutionErrorService_ListRuleExecutionErrors_Paged_async] diff --git a/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleexecutionerrorservice/listruleexecutionerrors/SyncListRuleExecutionErrors.java b/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleexecutionerrorservice/listruleexecutionerrors/SyncListRuleExecutionErrors.java new file mode 100644 index 000000000000..16ac356f61e2 --- /dev/null +++ b/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleexecutionerrorservice/listruleexecutionerrors/SyncListRuleExecutionErrors.java @@ -0,0 +1,53 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.chronicle.v1.samples; + +// [START chronicle_v1_generated_RuleExecutionErrorService_ListRuleExecutionErrors_sync] +import com.google.cloud.chronicle.v1.InstanceName; +import com.google.cloud.chronicle.v1.ListRuleExecutionErrorsRequest; +import com.google.cloud.chronicle.v1.RuleExecutionError; +import com.google.cloud.chronicle.v1.RuleExecutionErrorServiceClient; + +public class SyncListRuleExecutionErrors { + + public static void main(String[] args) throws Exception { + syncListRuleExecutionErrors(); + } + + public static void syncListRuleExecutionErrors() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RuleExecutionErrorServiceClient ruleExecutionErrorServiceClient = + RuleExecutionErrorServiceClient.create()) { + ListRuleExecutionErrorsRequest request = + ListRuleExecutionErrorsRequest.newBuilder() + .setParent(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .build(); + for (RuleExecutionError element : + ruleExecutionErrorServiceClient.listRuleExecutionErrors(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END chronicle_v1_generated_RuleExecutionErrorService_ListRuleExecutionErrors_sync] diff --git a/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleexecutionerrorservice/listruleexecutionerrors/SyncListRuleExecutionErrorsInstancename.java b/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleexecutionerrorservice/listruleexecutionerrors/SyncListRuleExecutionErrorsInstancename.java new file mode 100644 index 000000000000..1db98893c7ee --- /dev/null +++ b/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleexecutionerrorservice/listruleexecutionerrors/SyncListRuleExecutionErrorsInstancename.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.chronicle.v1.samples; + +// [START chronicle_v1_generated_RuleExecutionErrorService_ListRuleExecutionErrors_Instancename_sync] +import com.google.cloud.chronicle.v1.InstanceName; +import com.google.cloud.chronicle.v1.RuleExecutionError; +import com.google.cloud.chronicle.v1.RuleExecutionErrorServiceClient; + +public class SyncListRuleExecutionErrorsInstancename { + + public static void main(String[] args) throws Exception { + syncListRuleExecutionErrorsInstancename(); + } + + public static void syncListRuleExecutionErrorsInstancename() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RuleExecutionErrorServiceClient ruleExecutionErrorServiceClient = + RuleExecutionErrorServiceClient.create()) { + InstanceName parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + for (RuleExecutionError element : + ruleExecutionErrorServiceClient.listRuleExecutionErrors(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END chronicle_v1_generated_RuleExecutionErrorService_ListRuleExecutionErrors_Instancename_sync] diff --git a/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleexecutionerrorservice/listruleexecutionerrors/SyncListRuleExecutionErrorsString.java b/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleexecutionerrorservice/listruleexecutionerrors/SyncListRuleExecutionErrorsString.java new file mode 100644 index 000000000000..462827d7c881 --- /dev/null +++ b/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleexecutionerrorservice/listruleexecutionerrors/SyncListRuleExecutionErrorsString.java @@ -0,0 +1,46 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.chronicle.v1.samples; + +// [START chronicle_v1_generated_RuleExecutionErrorService_ListRuleExecutionErrors_String_sync] +import com.google.cloud.chronicle.v1.InstanceName; +import com.google.cloud.chronicle.v1.RuleExecutionError; +import com.google.cloud.chronicle.v1.RuleExecutionErrorServiceClient; + +public class SyncListRuleExecutionErrorsString { + + public static void main(String[] args) throws Exception { + syncListRuleExecutionErrorsString(); + } + + public static void syncListRuleExecutionErrorsString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RuleExecutionErrorServiceClient ruleExecutionErrorServiceClient = + RuleExecutionErrorServiceClient.create()) { + String parent = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString(); + for (RuleExecutionError element : + ruleExecutionErrorServiceClient.listRuleExecutionErrors(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END chronicle_v1_generated_RuleExecutionErrorService_ListRuleExecutionErrors_String_sync] diff --git a/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleexecutionerrorservicesettings/listruleexecutionerrors/SyncListRuleExecutionErrors.java b/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleexecutionerrorservicesettings/listruleexecutionerrors/SyncListRuleExecutionErrors.java new file mode 100644 index 000000000000..4258fc2b693e --- /dev/null +++ b/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleexecutionerrorservicesettings/listruleexecutionerrors/SyncListRuleExecutionErrors.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.chronicle.v1.samples; + +// [START chronicle_v1_generated_RuleExecutionErrorServiceSettings_ListRuleExecutionErrors_sync] +import com.google.cloud.chronicle.v1.RuleExecutionErrorServiceSettings; +import java.time.Duration; + +public class SyncListRuleExecutionErrors { + + public static void main(String[] args) throws Exception { + syncListRuleExecutionErrors(); + } + + public static void syncListRuleExecutionErrors() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RuleExecutionErrorServiceSettings.Builder ruleExecutionErrorServiceSettingsBuilder = + RuleExecutionErrorServiceSettings.newBuilder(); + ruleExecutionErrorServiceSettingsBuilder + .listRuleExecutionErrorsSettings() + .setRetrySettings( + ruleExecutionErrorServiceSettingsBuilder + .listRuleExecutionErrorsSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + RuleExecutionErrorServiceSettings ruleExecutionErrorServiceSettings = + ruleExecutionErrorServiceSettingsBuilder.build(); + } +} +// [END chronicle_v1_generated_RuleExecutionErrorServiceSettings_ListRuleExecutionErrors_sync] diff --git a/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleservice/verifyruletext/AsyncVerifyRuleText.java b/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleservice/verifyruletext/AsyncVerifyRuleText.java new file mode 100644 index 000000000000..e9ef2680aca0 --- /dev/null +++ b/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleservice/verifyruletext/AsyncVerifyRuleText.java @@ -0,0 +1,51 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.chronicle.v1.samples; + +// [START chronicle_v1_generated_RuleService_VerifyRuleText_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.chronicle.v1.InstanceName; +import com.google.cloud.chronicle.v1.RuleServiceClient; +import com.google.cloud.chronicle.v1.VerifyRuleTextRequest; +import com.google.cloud.chronicle.v1.VerifyRuleTextResponse; + +public class AsyncVerifyRuleText { + + public static void main(String[] args) throws Exception { + asyncVerifyRuleText(); + } + + public static void asyncVerifyRuleText() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RuleServiceClient ruleServiceClient = RuleServiceClient.create()) { + VerifyRuleTextRequest request = + VerifyRuleTextRequest.newBuilder() + .setInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setRuleText("ruleText763458121") + .build(); + ApiFuture future = + ruleServiceClient.verifyRuleTextCallable().futureCall(request); + // Do something. + VerifyRuleTextResponse response = future.get(); + } + } +} +// [END chronicle_v1_generated_RuleService_VerifyRuleText_async] diff --git a/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleservice/verifyruletext/SyncVerifyRuleText.java b/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleservice/verifyruletext/SyncVerifyRuleText.java new file mode 100644 index 000000000000..259f03d55234 --- /dev/null +++ b/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleservice/verifyruletext/SyncVerifyRuleText.java @@ -0,0 +1,47 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.chronicle.v1.samples; + +// [START chronicle_v1_generated_RuleService_VerifyRuleText_sync] +import com.google.cloud.chronicle.v1.InstanceName; +import com.google.cloud.chronicle.v1.RuleServiceClient; +import com.google.cloud.chronicle.v1.VerifyRuleTextRequest; +import com.google.cloud.chronicle.v1.VerifyRuleTextResponse; + +public class SyncVerifyRuleText { + + public static void main(String[] args) throws Exception { + syncVerifyRuleText(); + } + + public static void syncVerifyRuleText() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RuleServiceClient ruleServiceClient = RuleServiceClient.create()) { + VerifyRuleTextRequest request = + VerifyRuleTextRequest.newBuilder() + .setInstance(InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString()) + .setRuleText("ruleText763458121") + .build(); + VerifyRuleTextResponse response = ruleServiceClient.verifyRuleText(request); + } + } +} +// [END chronicle_v1_generated_RuleService_VerifyRuleText_sync] diff --git a/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleservice/verifyruletext/SyncVerifyRuleTextInstancenameString.java b/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleservice/verifyruletext/SyncVerifyRuleTextInstancenameString.java new file mode 100644 index 000000000000..d2623cc7d5ea --- /dev/null +++ b/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleservice/verifyruletext/SyncVerifyRuleTextInstancenameString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.chronicle.v1.samples; + +// [START chronicle_v1_generated_RuleService_VerifyRuleText_InstancenameString_sync] +import com.google.cloud.chronicle.v1.InstanceName; +import com.google.cloud.chronicle.v1.RuleServiceClient; +import com.google.cloud.chronicle.v1.VerifyRuleTextResponse; + +public class SyncVerifyRuleTextInstancenameString { + + public static void main(String[] args) throws Exception { + syncVerifyRuleTextInstancenameString(); + } + + public static void syncVerifyRuleTextInstancenameString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RuleServiceClient ruleServiceClient = RuleServiceClient.create()) { + InstanceName instance = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]"); + String ruleText = "ruleText763458121"; + VerifyRuleTextResponse response = ruleServiceClient.verifyRuleText(instance, ruleText); + } + } +} +// [END chronicle_v1_generated_RuleService_VerifyRuleText_InstancenameString_sync] diff --git a/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleservice/verifyruletext/SyncVerifyRuleTextStringString.java b/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleservice/verifyruletext/SyncVerifyRuleTextStringString.java new file mode 100644 index 000000000000..d5b05aedec69 --- /dev/null +++ b/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/ruleservice/verifyruletext/SyncVerifyRuleTextStringString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.chronicle.v1.samples; + +// [START chronicle_v1_generated_RuleService_VerifyRuleText_StringString_sync] +import com.google.cloud.chronicle.v1.InstanceName; +import com.google.cloud.chronicle.v1.RuleServiceClient; +import com.google.cloud.chronicle.v1.VerifyRuleTextResponse; + +public class SyncVerifyRuleTextStringString { + + public static void main(String[] args) throws Exception { + syncVerifyRuleTextStringString(); + } + + public static void syncVerifyRuleTextStringString() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + try (RuleServiceClient ruleServiceClient = RuleServiceClient.create()) { + String instance = InstanceName.of("[PROJECT]", "[LOCATION]", "[INSTANCE]").toString(); + String ruleText = "ruleText763458121"; + VerifyRuleTextResponse response = ruleServiceClient.verifyRuleText(instance, ruleText); + } + } +} +// [END chronicle_v1_generated_RuleService_VerifyRuleText_StringString_sync] diff --git a/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/stub/ruleexecutionerrorservicestubsettings/listruleexecutionerrors/SyncListRuleExecutionErrors.java b/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/stub/ruleexecutionerrorservicestubsettings/listruleexecutionerrors/SyncListRuleExecutionErrors.java new file mode 100644 index 000000000000..85e195ffaa72 --- /dev/null +++ b/java-chronicle/samples/snippets/generated/com/google/cloud/chronicle/v1/stub/ruleexecutionerrorservicestubsettings/listruleexecutionerrors/SyncListRuleExecutionErrors.java @@ -0,0 +1,57 @@ +/* + * Copyright 2026 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.chronicle.v1.stub.samples; + +// [START chronicle_v1_generated_RuleExecutionErrorServiceStubSettings_ListRuleExecutionErrors_sync] +import com.google.cloud.chronicle.v1.stub.RuleExecutionErrorServiceStubSettings; +import java.time.Duration; + +public class SyncListRuleExecutionErrors { + + public static void main(String[] args) throws Exception { + syncListRuleExecutionErrors(); + } + + public static void syncListRuleExecutionErrors() throws Exception { + // This snippet has been automatically generated and should be regarded as a code template only. + // It will require modifications to work: + // - It may require correct/in-range values for request initialization. + // - It may require specifying regional endpoints when creating the service client as shown in + // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + RuleExecutionErrorServiceStubSettings.Builder ruleExecutionErrorServiceSettingsBuilder = + RuleExecutionErrorServiceStubSettings.newBuilder(); + ruleExecutionErrorServiceSettingsBuilder + .listRuleExecutionErrorsSettings() + .setRetrySettings( + ruleExecutionErrorServiceSettingsBuilder + .listRuleExecutionErrorsSettings() + .getRetrySettings() + .toBuilder() + .setInitialRetryDelayDuration(Duration.ofSeconds(1)) + .setInitialRpcTimeoutDuration(Duration.ofSeconds(5)) + .setMaxAttempts(5) + .setMaxRetryDelayDuration(Duration.ofSeconds(30)) + .setMaxRpcTimeoutDuration(Duration.ofSeconds(60)) + .setRetryDelayMultiplier(1.3) + .setRpcTimeoutMultiplier(1.5) + .setTotalTimeoutDuration(Duration.ofSeconds(300)) + .build()); + RuleExecutionErrorServiceStubSettings ruleExecutionErrorServiceSettings = + ruleExecutionErrorServiceSettingsBuilder.build(); + } +} +// [END chronicle_v1_generated_RuleExecutionErrorServiceStubSettings_ListRuleExecutionErrors_sync] diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/AgentGateway.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/AgentGateway.java index 2d4aec8070b5..372a462b29be 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/AgentGateway.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/AgentGateway.java @@ -7904,7 +7904,7 @@ public int getProtocolsValue(int index) { * Optional. A list of Agent registries containing the agents, MCP servers and * tools governed by the Agent Gateway. Note: Currently limited to * project-scoped registries Must be of format - * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/ + * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/` * * * repeated string registries = 13 [(.google.api.field_behavior) = OPTIONAL]; @@ -7922,7 +7922,7 @@ public com.google.protobuf.ProtocolStringList getRegistriesList() { * Optional. A list of Agent registries containing the agents, MCP servers and * tools governed by the Agent Gateway. Note: Currently limited to * project-scoped registries Must be of format - * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/ + * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/` * * * repeated string registries = 13 [(.google.api.field_behavior) = OPTIONAL]; @@ -7940,7 +7940,7 @@ public int getRegistriesCount() { * Optional. A list of Agent registries containing the agents, MCP servers and * tools governed by the Agent Gateway. Note: Currently limited to * project-scoped registries Must be of format - * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/ + * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/` * * * repeated string registries = 13 [(.google.api.field_behavior) = OPTIONAL]; @@ -7959,7 +7959,7 @@ public java.lang.String getRegistries(int index) { * Optional. A list of Agent registries containing the agents, MCP servers and * tools governed by the Agent Gateway. Note: Currently limited to * project-scoped registries Must be of format - * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/ + * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/` * * * repeated string registries = 13 [(.google.api.field_behavior) = OPTIONAL]; @@ -10635,7 +10635,7 @@ private void ensureRegistriesIsMutable() { * Optional. A list of Agent registries containing the agents, MCP servers and * tools governed by the Agent Gateway. Note: Currently limited to * project-scoped registries Must be of format - * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/ + * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/` * * * repeated string registries = 13 [(.google.api.field_behavior) = OPTIONAL]; @@ -10654,7 +10654,7 @@ public com.google.protobuf.ProtocolStringList getRegistriesList() { * Optional. A list of Agent registries containing the agents, MCP servers and * tools governed by the Agent Gateway. Note: Currently limited to * project-scoped registries Must be of format - * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/ + * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/` * * * repeated string registries = 13 [(.google.api.field_behavior) = OPTIONAL]; @@ -10672,7 +10672,7 @@ public int getRegistriesCount() { * Optional. A list of Agent registries containing the agents, MCP servers and * tools governed by the Agent Gateway. Note: Currently limited to * project-scoped registries Must be of format - * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/ + * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/` * * * repeated string registries = 13 [(.google.api.field_behavior) = OPTIONAL]; @@ -10691,7 +10691,7 @@ public java.lang.String getRegistries(int index) { * Optional. A list of Agent registries containing the agents, MCP servers and * tools governed by the Agent Gateway. Note: Currently limited to * project-scoped registries Must be of format - * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/ + * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/` * * * repeated string registries = 13 [(.google.api.field_behavior) = OPTIONAL]; @@ -10710,7 +10710,7 @@ public com.google.protobuf.ByteString getRegistriesBytes(int index) { * Optional. A list of Agent registries containing the agents, MCP servers and * tools governed by the Agent Gateway. Note: Currently limited to * project-scoped registries Must be of format - * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/ + * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/` * * * repeated string registries = 13 [(.google.api.field_behavior) = OPTIONAL]; @@ -10737,7 +10737,7 @@ public Builder setRegistries(int index, java.lang.String value) { * Optional. A list of Agent registries containing the agents, MCP servers and * tools governed by the Agent Gateway. Note: Currently limited to * project-scoped registries Must be of format - * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/ + * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/` * * * repeated string registries = 13 [(.google.api.field_behavior) = OPTIONAL]; @@ -10763,7 +10763,7 @@ public Builder addRegistries(java.lang.String value) { * Optional. A list of Agent registries containing the agents, MCP servers and * tools governed by the Agent Gateway. Note: Currently limited to * project-scoped registries Must be of format - * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/ + * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/` * * * repeated string registries = 13 [(.google.api.field_behavior) = OPTIONAL]; @@ -10786,7 +10786,7 @@ public Builder addAllRegistries(java.lang.Iterable values) { * Optional. A list of Agent registries containing the agents, MCP servers and * tools governed by the Agent Gateway. Note: Currently limited to * project-scoped registries Must be of format - * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/ + * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/` * * * repeated string registries = 13 [(.google.api.field_behavior) = OPTIONAL]; @@ -10808,7 +10808,7 @@ public Builder clearRegistries() { * Optional. A list of Agent registries containing the agents, MCP servers and * tools governed by the Agent Gateway. Note: Currently limited to * project-scoped registries Must be of format - * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/ + * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/` * * * repeated string registries = 13 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/AgentGatewayOrBuilder.java b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/AgentGatewayOrBuilder.java index cad10ef1832a..27ef5e14828b 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/AgentGatewayOrBuilder.java +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/java/com/google/cloud/networkservices/v1/AgentGatewayOrBuilder.java @@ -449,7 +449,7 @@ java.lang.String getLabelsOrDefault( * Optional. A list of Agent registries containing the agents, MCP servers and * tools governed by the Agent Gateway. Note: Currently limited to * project-scoped registries Must be of format - * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/ + * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/` * * * repeated string registries = 13 [(.google.api.field_behavior) = OPTIONAL]; @@ -465,7 +465,7 @@ java.lang.String getLabelsOrDefault( * Optional. A list of Agent registries containing the agents, MCP servers and * tools governed by the Agent Gateway. Note: Currently limited to * project-scoped registries Must be of format - * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/ + * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/` * * * repeated string registries = 13 [(.google.api.field_behavior) = OPTIONAL]; @@ -481,7 +481,7 @@ java.lang.String getLabelsOrDefault( * Optional. A list of Agent registries containing the agents, MCP servers and * tools governed by the Agent Gateway. Note: Currently limited to * project-scoped registries Must be of format - * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/ + * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/` * * * repeated string registries = 13 [(.google.api.field_behavior) = OPTIONAL]; @@ -498,7 +498,7 @@ java.lang.String getLabelsOrDefault( * Optional. A list of Agent registries containing the agents, MCP servers and * tools governed by the Agent Gateway. Note: Currently limited to * project-scoped registries Must be of format - * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/ + * `//agentregistry.googleapis.com/projects/{project}/locations/{location}/` * * * repeated string registries = 13 [(.google.api.field_behavior) = OPTIONAL]; diff --git a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/agent_gateway.proto b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/agent_gateway.proto index 1ecb015e6553..1b0120409ca0 100644 --- a/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/agent_gateway.proto +++ b/java-networkservices/proto-google-cloud-networkservices-v1/src/main/proto/google/cloud/networkservices/v1/agent_gateway.proto @@ -187,7 +187,7 @@ message AgentGateway { // Optional. A list of Agent registries containing the agents, MCP servers and // tools governed by the Agent Gateway. Note: Currently limited to // project-scoped registries Must be of format - // `//agentregistry.googleapis.com/projects/{project}/locations/{location}/ + // `//agentregistry.googleapis.com/projects/{project}/locations/{location}/` repeated string registries = 13 [(google.api.field_behavior) = OPTIONAL]; // Optional. Network configuration for the AgentGateway.