@devvit/protos 0.11.4 → 0.11.5-next-2024-12-09-1c29dd3cd.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/meta.min.json +7814 -0
- package/package.json +4 -4
- package/protos.min.js +2 -0
- package/protos.min.js.map +7 -0
- package/schema/.snootobuf/deps/buf/validate/expression.proto +92 -0
- package/schema/.snootobuf/deps/buf/validate/priv/private.proto +41 -0
- package/schema/.snootobuf/deps/buf/validate/validate.proto +4130 -0
- package/schema/.snootobuf/deps/devvit/data/api/admin/v1alpha/audit.proto +72 -0
- package/schema/.snootobuf/deps/devvit/data/api/admin/v1alpha/auth.proto +49 -0
- package/schema/.snootobuf/deps/devvit/data/api/admin/v1alpha/organization.proto +54 -0
- package/schema/.snootobuf/deps/devvit/data/api/admin/v1alpha/service.proto +46 -0
- package/schema/.snootobuf/deps/devvit/data/api/admin/v1alpha/subscription.proto +72 -0
- package/schema/.snootobuf/deps/devvit/data/api/admin/v1alpha/ui.proto +20 -0
- package/schema/.snootobuf/deps/devvit/data/api/admin/v1alpha/user.proto +45 -0
- package/schema/.snootobuf/deps/devvit/data/api/v1alpha/admin.proto +54 -0
- package/schema/.snootobuf/deps/devvit/data/api/v1alpha/delivery.proto +773 -0
- package/schema/.snootobuf/deps/devvit/data/api/v1alpha/filter.proto +66 -0
- package/schema/.snootobuf/deps/devvit/data/api/v1alpha/firehose.proto +100 -0
- package/schema/.snootobuf/deps/devvit/data/api/v1alpha/intake.proto +19 -0
- package/schema/.snootobuf/deps/devvit/events/v1alpha/events.proto +446 -0
- package/schema/.snootobuf/deps/devvit/gateway/v1alpha/payments.proto +24 -0
- package/schema/.snootobuf/deps/devvit/options/options.proto +98 -0
- package/schema/.snootobuf/deps/devvit/reddit/v2alpha/commentv2.proto +29 -0
- package/schema/.snootobuf/deps/devvit/reddit/v2alpha/flair.proto +25 -0
- package/schema/.snootobuf/deps/devvit/reddit/v2alpha/modaction.proto +53 -0
- package/schema/.snootobuf/deps/devvit/reddit/v2alpha/modmail.proto +56 -0
- package/schema/.snootobuf/deps/devvit/reddit/v2alpha/postv2.proto +107 -0
- package/schema/.snootobuf/deps/devvit/reddit/v2alpha/subredditv2.proto +41 -0
- package/schema/.snootobuf/deps/devvit/reddit/v2alpha/userv2.proto +23 -0
- package/schema/.snootobuf/deps/devvit/triggers/v1alpha/triggers.proto +162 -0
- package/schema/.snootobuf/deps/enum/account_gender_category.proto +14 -0
- package/schema/.snootobuf/deps/enum/approval_status.proto +15 -0
- package/schema/.snootobuf/deps/enum/automated_reporting_level.proto +12 -0
- package/schema/.snootobuf/deps/enum/ban_evasion_threshold.proto +13 -0
- package/schema/.snootobuf/deps/enum/ban_info_action.proto +12 -0
- package/schema/.snootobuf/deps/enum/block_relation_type.proto +11 -0
- package/schema/.snootobuf/deps/enum/comment_sort.proto +18 -0
- package/schema/.snootobuf/deps/enum/comment_type.proto +11 -0
- package/schema/.snootobuf/deps/enum/crowd_control_level.proto +12 -0
- package/schema/.snootobuf/deps/enum/discussion_type.proto +10 -0
- package/schema/.snootobuf/deps/enum/distinguish_type.proto +14 -0
- package/schema/.snootobuf/deps/enum/flair_position.proto +11 -0
- package/schema/.snootobuf/deps/enum/hateful_content_threshold.proto +12 -0
- package/schema/.snootobuf/deps/enum/link_content_type.proto +11 -0
- package/schema/.snootobuf/deps/enum/link_type.proto +11 -0
- package/schema/.snootobuf/deps/enum/link_visibility.proto +11 -0
- package/schema/.snootobuf/deps/enum/prediction_leaderboard_entry_type.proto +11 -0
- package/schema/.snootobuf/deps/enum/promo_layout.proto +11 -0
- package/schema/.snootobuf/deps/enum/removed_by_type.proto +18 -0
- package/schema/.snootobuf/deps/enum/spam_level.proto +11 -0
- package/schema/.snootobuf/deps/enum/subreddit_type.proto +16 -0
- package/schema/.snootobuf/deps/enum/verdict.proto +14 -0
- package/schema/.snootobuf/deps/enum/vote.proto +12 -0
- package/schema/.snootobuf/deps/enum/whitelist_status.proto +17 -0
- package/schema/.snootobuf/deps/enum/wiki_edit_mode.proto +12 -0
- package/schema/.snootobuf/deps/evaluator/evaluator.proto +203 -0
- package/schema/.snootobuf/deps/google/api/annotations.proto +31 -0
- package/schema/.snootobuf/deps/google/api/apikeys/v2/apikeys.proto +288 -0
- package/schema/.snootobuf/deps/google/api/apikeys/v2/resources.proto +175 -0
- package/schema/.snootobuf/deps/google/api/auth.proto +237 -0
- package/schema/.snootobuf/deps/google/api/backend.proto +185 -0
- package/schema/.snootobuf/deps/google/api/billing.proto +77 -0
- package/schema/.snootobuf/deps/google/api/client.proto +431 -0
- package/schema/.snootobuf/deps/google/api/cloudquotas/v1/cloudquotas.proto +322 -0
- package/schema/.snootobuf/deps/google/api/cloudquotas/v1/resources.proto +315 -0
- package/schema/.snootobuf/deps/google/api/config_change.proto +84 -0
- package/schema/.snootobuf/deps/google/api/consumer.proto +82 -0
- package/schema/.snootobuf/deps/google/api/context.proto +92 -0
- package/schema/.snootobuf/deps/google/api/control.proto +41 -0
- package/schema/.snootobuf/deps/google/api/distribution.proto +213 -0
- package/schema/.snootobuf/deps/google/api/documentation.proto +168 -0
- package/schema/.snootobuf/deps/google/api/endpoint.proto +69 -0
- package/schema/.snootobuf/deps/google/api/error_reason.proto +589 -0
- package/schema/.snootobuf/deps/google/api/expr/conformance/v1alpha1/conformance_service.proto +183 -0
- package/schema/.snootobuf/deps/google/api/expr/v1alpha1/checked.proto +343 -0
- package/schema/.snootobuf/deps/google/api/expr/v1alpha1/eval.proto +118 -0
- package/schema/.snootobuf/deps/google/api/expr/v1alpha1/explain.proto +53 -0
- package/schema/.snootobuf/deps/google/api/expr/v1alpha1/syntax.proto +438 -0
- package/schema/.snootobuf/deps/google/api/expr/v1alpha1/value.proto +115 -0
- package/schema/.snootobuf/deps/google/api/expr/v1beta1/decl.proto +84 -0
- package/schema/.snootobuf/deps/google/api/expr/v1beta1/eval.proto +125 -0
- package/schema/.snootobuf/deps/google/api/expr/v1beta1/expr.proto +265 -0
- package/schema/.snootobuf/deps/google/api/expr/v1beta1/source.proto +62 -0
- package/schema/.snootobuf/deps/google/api/expr/v1beta1/value.proto +114 -0
- package/schema/.snootobuf/deps/google/api/field_behavior.proto +104 -0
- package/schema/.snootobuf/deps/google/api/field_info.proto +106 -0
- package/schema/.snootobuf/deps/google/api/http.proto +371 -0
- package/schema/.snootobuf/deps/google/api/httpbody.proto +81 -0
- package/schema/.snootobuf/deps/google/api/label.proto +48 -0
- package/schema/.snootobuf/deps/google/api/launch_stage.proto +72 -0
- package/schema/.snootobuf/deps/google/api/log.proto +54 -0
- package/schema/.snootobuf/deps/google/api/logging.proto +81 -0
- package/schema/.snootobuf/deps/google/api/metric.proto +268 -0
- package/schema/.snootobuf/deps/google/api/monitored_resource.proto +130 -0
- package/schema/.snootobuf/deps/google/api/monitoring.proto +107 -0
- package/schema/.snootobuf/deps/google/api/policy.proto +85 -0
- package/schema/.snootobuf/deps/google/api/quota.proto +184 -0
- package/schema/.snootobuf/deps/google/api/resource.proto +243 -0
- package/schema/.snootobuf/deps/google/api/routing.proto +461 -0
- package/schema/.snootobuf/deps/google/api/service.proto +191 -0
- package/schema/.snootobuf/deps/google/api/servicecontrol/v1/check_error.proto +124 -0
- package/schema/.snootobuf/deps/google/api/servicecontrol/v1/distribution.proto +166 -0
- package/schema/.snootobuf/deps/google/api/servicecontrol/v1/http_request.proto +93 -0
- package/schema/.snootobuf/deps/google/api/servicecontrol/v1/log_entry.proto +126 -0
- package/schema/.snootobuf/deps/google/api/servicecontrol/v1/metric_value.proto +81 -0
- package/schema/.snootobuf/deps/google/api/servicecontrol/v1/operation.proto +123 -0
- package/schema/.snootobuf/deps/google/api/servicecontrol/v1/quota_controller.proto +245 -0
- package/schema/.snootobuf/deps/google/api/servicecontrol/v1/service_controller.proto +260 -0
- package/schema/.snootobuf/deps/google/api/servicecontrol/v2/service_controller.proto +196 -0
- package/schema/.snootobuf/deps/google/api/servicemanagement/v1/resources.proto +295 -0
- package/schema/.snootobuf/deps/google/api/servicemanagement/v1/servicemanager.proto +508 -0
- package/schema/.snootobuf/deps/google/api/serviceusage/v1/resources.proto +130 -0
- package/schema/.snootobuf/deps/google/api/serviceusage/v1/serviceusage.proto +305 -0
- package/schema/.snootobuf/deps/google/api/serviceusage/v1beta1/resources.proto +458 -0
- package/schema/.snootobuf/deps/google/api/serviceusage/v1beta1/serviceusage.proto +793 -0
- package/schema/.snootobuf/deps/google/api/source_info.proto +31 -0
- package/schema/.snootobuf/deps/google/api/system_parameter.proto +96 -0
- package/schema/.snootobuf/deps/google/api/usage.proto +96 -0
- package/schema/.snootobuf/deps/google/api/visibility.proto +113 -0
- package/schema/.snootobuf/deps/google/cloud/extended_operations.proto +150 -0
- package/schema/.snootobuf/deps/google/iam/admin/v1/iam.proto +1087 -0
- package/schema/.snootobuf/deps/google/iam/v1/iam_policy.proto +145 -0
- package/schema/.snootobuf/deps/google/iam/v1/logging/audit_data.proto +34 -0
- package/schema/.snootobuf/deps/google/iam/v1/options.proto +41 -0
- package/schema/.snootobuf/deps/google/iam/v1/policy.proto +240 -0
- package/schema/.snootobuf/deps/google/logging/type/http_request.proto +92 -0
- package/schema/.snootobuf/deps/google/logging/type/log_severity.proto +72 -0
- package/schema/.snootobuf/deps/google/longrunning/operations.proto +247 -0
- package/schema/.snootobuf/deps/google/protobuf/any.proto +158 -0
- package/schema/.snootobuf/deps/google/protobuf/api.proto +208 -0
- package/schema/.snootobuf/deps/google/protobuf/compiler/plugin.proto +183 -0
- package/schema/.snootobuf/deps/google/protobuf/descriptor.proto +921 -0
- package/schema/.snootobuf/deps/google/protobuf/duration.proto +116 -0
- package/schema/.snootobuf/deps/google/protobuf/empty.proto +51 -0
- package/schema/.snootobuf/deps/google/protobuf/field_mask.proto +245 -0
- package/schema/.snootobuf/deps/google/protobuf/source_context.proto +48 -0
- package/schema/.snootobuf/deps/google/protobuf/struct.proto +95 -0
- package/schema/.snootobuf/deps/google/protobuf/timestamp.proto +147 -0
- package/schema/.snootobuf/deps/google/protobuf/type.proto +187 -0
- package/schema/.snootobuf/deps/google/protobuf/wrappers.proto +123 -0
- package/schema/.snootobuf/deps/google/rpc/code.proto +186 -0
- package/schema/.snootobuf/deps/google/rpc/context/attribute_context.proto +287 -0
- package/schema/.snootobuf/deps/google/rpc/error_details.proto +246 -0
- package/schema/.snootobuf/deps/google/rpc/status.proto +47 -0
- package/schema/.snootobuf/deps/google/type/calendar_period.proto +57 -0
- package/schema/.snootobuf/deps/google/type/color.proto +170 -0
- package/schema/.snootobuf/deps/google/type/date.proto +50 -0
- package/schema/.snootobuf/deps/google/type/datetime.proto +97 -0
- package/schema/.snootobuf/deps/google/type/dayofweek.proto +51 -0
- package/schema/.snootobuf/deps/google/type/expr.proto +51 -0
- package/schema/.snootobuf/deps/google/type/fraction.proto +34 -0
- package/schema/.snootobuf/deps/google/type/latlng.proto +37 -0
- package/schema/.snootobuf/deps/google/type/money.proto +43 -0
- package/schema/.snootobuf/deps/google/type/month.proto +66 -0
- package/schema/.snootobuf/deps/google/type/postal_address.proto +135 -0
- package/schema/.snootobuf/deps/google/type/quaternion.proto +95 -0
- package/schema/.snootobuf/deps/google/type/timeofday.proto +44 -0
- package/schema/.snootobuf/deps/openapi/helper.proto +20 -0
- package/schema/.snootobuf/deps/products-api/protos/reddit/xpaymentsplatform/payproducts/v1/currencies.proto +189 -0
- package/schema/.snootobuf/deps/products-api/protos/reddit/xpaymentsplatform/payproducts/v1/payproducts.proto +118 -0
- package/schema/.snootobuf/deps/reddit/api/metadata/v1/metadata.proto +55 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/account/v1/account.proto +579 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/account/v1/account_relations.proto +43 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/api/metadata/v1/metadata.proto +82 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/blocking/v1/user_blocking_service.proto +221 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/comments/v1/comment_tree.proto +78 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/comments/v1/comment_tree_service.proto +189 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/comments/v1/comment_tree_structure.proto +29 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/comments/v1/comments.proto +417 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/comments/v1/comments_service.proto +72 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/common/v1/auth.proto +25 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/common/v1/features.proto +52 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/common/v1/lang.proto +16 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/common/v1/legal.proto +20 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/common/v1/media.proto +149 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/common/v1/moderation.proto +197 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/common/v1/safety.proto +116 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/common/v1/time.proto +25 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/domains/v1/domains_metadata_service.proto +101 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/grpc_thrift/v1/grpc_thrift_options.proto +34 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/links/v1/links.proto +798 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/links/v1/links_service.proto +186 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/messages/v1/messages.proto +110 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/sensitive/v1/wrappers.proto +51 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/subreddit/v1/subreddit.proto +1202 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/subreddit/v1/subreddit_member_relations.proto +85 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/subreddit/v1/subreddit_moderator_service.proto +363 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/subreddit/v1/subreddit_service.proto +301 -0
- package/schema/.snootobuf/deps/reddit/coreplatform/thing/v0/thing.proto +2869 -0
- package/schema/.snootobuf/deps/reddit/devvit/custom_post/v1/custom_post.proto +15 -0
- package/schema/.snootobuf/deps/reddit/devvit/custom_post/v1/service.proto +11 -0
- package/schema/.snootobuf/deps/reddit/devvit/subreddit/v1/context_action.proto +48 -0
- package/schema/.snootobuf/deps/reddit/devvit/subreddit/v1/manifest.proto +70 -0
- package/schema/.snootobuf/deps/reddit/devvit/subreddit/v1/service.proto +11 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/acknowledge_order_delivery.proto +17 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/checkout.proto +89 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/common.proto +322 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/delete_products.proto +17 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/events.proto +14 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/get_batch_products.proto +15 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/get_gold_balances.proto +48 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/get_order.proto +31 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/get_orders.proto +26 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/get_orders_by_user.proto +15 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/get_payout_info_batch.proto +52 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/get_products.proto +23 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/get_user_profiles.proto +28 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/refund_order.proto +17 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/service.proto +49 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/service_data_compliance.proto +20 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payapi/v1/upsert_products.proto +17 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/paygatewaypsps/v1/paygatewaypsps.proto +158 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payorders/v1/payments_data_compliance.proto +18 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payorders/v1/payorders.proto +195 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/paypayments/v1/admin.proto +44 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/paypayments/v1/ledger.proto +200 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/paypayments/v1/payments_data_compliance.proto +18 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/paypayments/v1/paypayments.proto +210 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payproducts/v1/currencies.proto +189 -0
- package/schema/.snootobuf/deps/reddit/xpaymentsplatform/payproducts/v1/payproducts.proto +135 -0
- package/schema/.snootobuf/deps/snooron_sources/text_classification/text_classification.proto +29 -0
- package/schema/.snootobuf/deps/snooron_sources/v2_event/v2_event.proto +3292 -0
- package/schema/.snootobuf/deps/validate/validate.proto +862 -0
- package/schema/devvit/dev_portal/app/app.proto +3 -0
- package/schema/devvit/dev_portal/app/info/app_info.proto +13 -1
- package/schema/devvit/ui/block_kit/v1beta/ui.proto +1 -1
- package/schema/devvit/ui/effects/web_view/v1alpha/fullscreen.proto +7 -1
- package/schema/snootobuf.devenv.lock +459 -292
- package/schema/snootobuf.lock +459 -292
- package/schema/snootobuf.redditapi.lock +459 -292
- package/schema/snootobuf.ts.lock +459 -293
- package/types/devvit/dev_portal/app/app.d.ts +2 -0
- package/types/devvit/dev_portal/app/app.d.ts.map +1 -1
- package/types/devvit/dev_portal/app/app.js +17 -0
- package/types/devvit/dev_portal/app/info/app_info.d.ts +13 -0
- package/types/devvit/dev_portal/app/info/app_info.d.ts.map +1 -1
- package/types/devvit/dev_portal/app/info/app_info.js +17 -0
- package/types/devvit/dev_portal/dev_portal.d.ts +42 -0
- package/types/devvit/dev_portal/dev_portal.d.ts.map +1 -1
- package/types/devvit/reddit/custom_post/v1alpha/custom_post.d.ts +4 -0
- package/types/devvit/reddit/custom_post/v1alpha/custom_post.d.ts.map +1 -1
- package/types/devvit/ui/effects/web_view/v1alpha/fullscreen.d.ts +8 -1
- package/types/devvit/ui/effects/web_view/v1alpha/fullscreen.d.ts.map +1 -1
- package/types/devvit/ui/effects/web_view/v1alpha/fullscreen.js +15 -1
@@ -0,0 +1,862 @@
|
|
1
|
+
syntax = "proto2";
|
2
|
+
package validate;
|
3
|
+
|
4
|
+
option go_package = "github.com/envoyproxy/protoc-gen-validate/validate";
|
5
|
+
option java_package = "io.envoyproxy.pgv.validate";
|
6
|
+
|
7
|
+
import "google/protobuf/descriptor.proto";
|
8
|
+
import "google/protobuf/duration.proto";
|
9
|
+
import "google/protobuf/timestamp.proto";
|
10
|
+
|
11
|
+
// Validation rules applied at the message level
|
12
|
+
extend google.protobuf.MessageOptions {
|
13
|
+
// Disabled nullifies any validation rules for this message, including any
|
14
|
+
// message fields associated with it that do support validation.
|
15
|
+
optional bool disabled = 1071;
|
16
|
+
// Ignore skips generation of validation methods for this message.
|
17
|
+
optional bool ignored = 1072;
|
18
|
+
}
|
19
|
+
|
20
|
+
// Validation rules applied at the oneof level
|
21
|
+
extend google.protobuf.OneofOptions {
|
22
|
+
// Required ensures that exactly one the field options in a oneof is set;
|
23
|
+
// validation fails if no fields in the oneof are set.
|
24
|
+
optional bool required = 1071;
|
25
|
+
}
|
26
|
+
|
27
|
+
// Validation rules applied at the field level
|
28
|
+
extend google.protobuf.FieldOptions {
|
29
|
+
// Rules specify the validations to be performed on this field. By default,
|
30
|
+
// no validation is performed against a field.
|
31
|
+
optional FieldRules rules = 1071;
|
32
|
+
}
|
33
|
+
|
34
|
+
// FieldRules encapsulates the rules for each type of field. Depending on the
|
35
|
+
// field, the correct set should be used to ensure proper validations.
|
36
|
+
message FieldRules {
|
37
|
+
optional MessageRules message = 17;
|
38
|
+
oneof type {
|
39
|
+
// Scalar Field Types
|
40
|
+
FloatRules float = 1;
|
41
|
+
DoubleRules double = 2;
|
42
|
+
Int32Rules int32 = 3;
|
43
|
+
Int64Rules int64 = 4;
|
44
|
+
UInt32Rules uint32 = 5;
|
45
|
+
UInt64Rules uint64 = 6;
|
46
|
+
SInt32Rules sint32 = 7;
|
47
|
+
SInt64Rules sint64 = 8;
|
48
|
+
Fixed32Rules fixed32 = 9;
|
49
|
+
Fixed64Rules fixed64 = 10;
|
50
|
+
SFixed32Rules sfixed32 = 11;
|
51
|
+
SFixed64Rules sfixed64 = 12;
|
52
|
+
BoolRules bool = 13;
|
53
|
+
StringRules string = 14;
|
54
|
+
BytesRules bytes = 15;
|
55
|
+
|
56
|
+
// Complex Field Types
|
57
|
+
EnumRules enum = 16;
|
58
|
+
RepeatedRules repeated = 18;
|
59
|
+
MapRules map = 19;
|
60
|
+
|
61
|
+
// Well-Known Field Types
|
62
|
+
AnyRules any = 20;
|
63
|
+
DurationRules duration = 21;
|
64
|
+
TimestampRules timestamp = 22;
|
65
|
+
}
|
66
|
+
}
|
67
|
+
|
68
|
+
// FloatRules describes the constraints applied to `float` values
|
69
|
+
message FloatRules {
|
70
|
+
// Const specifies that this field must be exactly the specified value
|
71
|
+
optional float const = 1;
|
72
|
+
|
73
|
+
// Lt specifies that this field must be less than the specified value,
|
74
|
+
// exclusive
|
75
|
+
optional float lt = 2;
|
76
|
+
|
77
|
+
// Lte specifies that this field must be less than or equal to the
|
78
|
+
// specified value, inclusive
|
79
|
+
optional float lte = 3;
|
80
|
+
|
81
|
+
// Gt specifies that this field must be greater than the specified value,
|
82
|
+
// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
|
83
|
+
// range is reversed.
|
84
|
+
optional float gt = 4;
|
85
|
+
|
86
|
+
// Gte specifies that this field must be greater than or equal to the
|
87
|
+
// specified value, inclusive. If the value of Gte is larger than a
|
88
|
+
// specified Lt or Lte, the range is reversed.
|
89
|
+
optional float gte = 5;
|
90
|
+
|
91
|
+
// In specifies that this field must be equal to one of the specified
|
92
|
+
// values
|
93
|
+
repeated float in = 6;
|
94
|
+
|
95
|
+
// NotIn specifies that this field cannot be equal to one of the specified
|
96
|
+
// values
|
97
|
+
repeated float not_in = 7;
|
98
|
+
|
99
|
+
// IgnoreEmpty specifies that the validation rules of this field should be
|
100
|
+
// evaluated only if the field is not empty
|
101
|
+
optional bool ignore_empty = 8;
|
102
|
+
}
|
103
|
+
|
104
|
+
// DoubleRules describes the constraints applied to `double` values
|
105
|
+
message DoubleRules {
|
106
|
+
// Const specifies that this field must be exactly the specified value
|
107
|
+
optional double const = 1;
|
108
|
+
|
109
|
+
// Lt specifies that this field must be less than the specified value,
|
110
|
+
// exclusive
|
111
|
+
optional double lt = 2;
|
112
|
+
|
113
|
+
// Lte specifies that this field must be less than or equal to the
|
114
|
+
// specified value, inclusive
|
115
|
+
optional double lte = 3;
|
116
|
+
|
117
|
+
// Gt specifies that this field must be greater than the specified value,
|
118
|
+
// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
|
119
|
+
// range is reversed.
|
120
|
+
optional double gt = 4;
|
121
|
+
|
122
|
+
// Gte specifies that this field must be greater than or equal to the
|
123
|
+
// specified value, inclusive. If the value of Gte is larger than a
|
124
|
+
// specified Lt or Lte, the range is reversed.
|
125
|
+
optional double gte = 5;
|
126
|
+
|
127
|
+
// In specifies that this field must be equal to one of the specified
|
128
|
+
// values
|
129
|
+
repeated double in = 6;
|
130
|
+
|
131
|
+
// NotIn specifies that this field cannot be equal to one of the specified
|
132
|
+
// values
|
133
|
+
repeated double not_in = 7;
|
134
|
+
|
135
|
+
// IgnoreEmpty specifies that the validation rules of this field should be
|
136
|
+
// evaluated only if the field is not empty
|
137
|
+
optional bool ignore_empty = 8;
|
138
|
+
}
|
139
|
+
|
140
|
+
// Int32Rules describes the constraints applied to `int32` values
|
141
|
+
message Int32Rules {
|
142
|
+
// Const specifies that this field must be exactly the specified value
|
143
|
+
optional int32 const = 1;
|
144
|
+
|
145
|
+
// Lt specifies that this field must be less than the specified value,
|
146
|
+
// exclusive
|
147
|
+
optional int32 lt = 2;
|
148
|
+
|
149
|
+
// Lte specifies that this field must be less than or equal to the
|
150
|
+
// specified value, inclusive
|
151
|
+
optional int32 lte = 3;
|
152
|
+
|
153
|
+
// Gt specifies that this field must be greater than the specified value,
|
154
|
+
// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
|
155
|
+
// range is reversed.
|
156
|
+
optional int32 gt = 4;
|
157
|
+
|
158
|
+
// Gte specifies that this field must be greater than or equal to the
|
159
|
+
// specified value, inclusive. If the value of Gte is larger than a
|
160
|
+
// specified Lt or Lte, the range is reversed.
|
161
|
+
optional int32 gte = 5;
|
162
|
+
|
163
|
+
// In specifies that this field must be equal to one of the specified
|
164
|
+
// values
|
165
|
+
repeated int32 in = 6;
|
166
|
+
|
167
|
+
// NotIn specifies that this field cannot be equal to one of the specified
|
168
|
+
// values
|
169
|
+
repeated int32 not_in = 7;
|
170
|
+
|
171
|
+
// IgnoreEmpty specifies that the validation rules of this field should be
|
172
|
+
// evaluated only if the field is not empty
|
173
|
+
optional bool ignore_empty = 8;
|
174
|
+
}
|
175
|
+
|
176
|
+
// Int64Rules describes the constraints applied to `int64` values
|
177
|
+
message Int64Rules {
|
178
|
+
// Const specifies that this field must be exactly the specified value
|
179
|
+
optional int64 const = 1;
|
180
|
+
|
181
|
+
// Lt specifies that this field must be less than the specified value,
|
182
|
+
// exclusive
|
183
|
+
optional int64 lt = 2;
|
184
|
+
|
185
|
+
// Lte specifies that this field must be less than or equal to the
|
186
|
+
// specified value, inclusive
|
187
|
+
optional int64 lte = 3;
|
188
|
+
|
189
|
+
// Gt specifies that this field must be greater than the specified value,
|
190
|
+
// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
|
191
|
+
// range is reversed.
|
192
|
+
optional int64 gt = 4;
|
193
|
+
|
194
|
+
// Gte specifies that this field must be greater than or equal to the
|
195
|
+
// specified value, inclusive. If the value of Gte is larger than a
|
196
|
+
// specified Lt or Lte, the range is reversed.
|
197
|
+
optional int64 gte = 5;
|
198
|
+
|
199
|
+
// In specifies that this field must be equal to one of the specified
|
200
|
+
// values
|
201
|
+
repeated int64 in = 6;
|
202
|
+
|
203
|
+
// NotIn specifies that this field cannot be equal to one of the specified
|
204
|
+
// values
|
205
|
+
repeated int64 not_in = 7;
|
206
|
+
|
207
|
+
// IgnoreEmpty specifies that the validation rules of this field should be
|
208
|
+
// evaluated only if the field is not empty
|
209
|
+
optional bool ignore_empty = 8;
|
210
|
+
}
|
211
|
+
|
212
|
+
// UInt32Rules describes the constraints applied to `uint32` values
|
213
|
+
message UInt32Rules {
|
214
|
+
// Const specifies that this field must be exactly the specified value
|
215
|
+
optional uint32 const = 1;
|
216
|
+
|
217
|
+
// Lt specifies that this field must be less than the specified value,
|
218
|
+
// exclusive
|
219
|
+
optional uint32 lt = 2;
|
220
|
+
|
221
|
+
// Lte specifies that this field must be less than or equal to the
|
222
|
+
// specified value, inclusive
|
223
|
+
optional uint32 lte = 3;
|
224
|
+
|
225
|
+
// Gt specifies that this field must be greater than the specified value,
|
226
|
+
// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
|
227
|
+
// range is reversed.
|
228
|
+
optional uint32 gt = 4;
|
229
|
+
|
230
|
+
// Gte specifies that this field must be greater than or equal to the
|
231
|
+
// specified value, inclusive. If the value of Gte is larger than a
|
232
|
+
// specified Lt or Lte, the range is reversed.
|
233
|
+
optional uint32 gte = 5;
|
234
|
+
|
235
|
+
// In specifies that this field must be equal to one of the specified
|
236
|
+
// values
|
237
|
+
repeated uint32 in = 6;
|
238
|
+
|
239
|
+
// NotIn specifies that this field cannot be equal to one of the specified
|
240
|
+
// values
|
241
|
+
repeated uint32 not_in = 7;
|
242
|
+
|
243
|
+
// IgnoreEmpty specifies that the validation rules of this field should be
|
244
|
+
// evaluated only if the field is not empty
|
245
|
+
optional bool ignore_empty = 8;
|
246
|
+
}
|
247
|
+
|
248
|
+
// UInt64Rules describes the constraints applied to `uint64` values
|
249
|
+
message UInt64Rules {
|
250
|
+
// Const specifies that this field must be exactly the specified value
|
251
|
+
optional uint64 const = 1;
|
252
|
+
|
253
|
+
// Lt specifies that this field must be less than the specified value,
|
254
|
+
// exclusive
|
255
|
+
optional uint64 lt = 2;
|
256
|
+
|
257
|
+
// Lte specifies that this field must be less than or equal to the
|
258
|
+
// specified value, inclusive
|
259
|
+
optional uint64 lte = 3;
|
260
|
+
|
261
|
+
// Gt specifies that this field must be greater than the specified value,
|
262
|
+
// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
|
263
|
+
// range is reversed.
|
264
|
+
optional uint64 gt = 4;
|
265
|
+
|
266
|
+
// Gte specifies that this field must be greater than or equal to the
|
267
|
+
// specified value, inclusive. If the value of Gte is larger than a
|
268
|
+
// specified Lt or Lte, the range is reversed.
|
269
|
+
optional uint64 gte = 5;
|
270
|
+
|
271
|
+
// In specifies that this field must be equal to one of the specified
|
272
|
+
// values
|
273
|
+
repeated uint64 in = 6;
|
274
|
+
|
275
|
+
// NotIn specifies that this field cannot be equal to one of the specified
|
276
|
+
// values
|
277
|
+
repeated uint64 not_in = 7;
|
278
|
+
|
279
|
+
// IgnoreEmpty specifies that the validation rules of this field should be
|
280
|
+
// evaluated only if the field is not empty
|
281
|
+
optional bool ignore_empty = 8;
|
282
|
+
}
|
283
|
+
|
284
|
+
// SInt32Rules describes the constraints applied to `sint32` values
|
285
|
+
message SInt32Rules {
|
286
|
+
// Const specifies that this field must be exactly the specified value
|
287
|
+
optional sint32 const = 1;
|
288
|
+
|
289
|
+
// Lt specifies that this field must be less than the specified value,
|
290
|
+
// exclusive
|
291
|
+
optional sint32 lt = 2;
|
292
|
+
|
293
|
+
// Lte specifies that this field must be less than or equal to the
|
294
|
+
// specified value, inclusive
|
295
|
+
optional sint32 lte = 3;
|
296
|
+
|
297
|
+
// Gt specifies that this field must be greater than the specified value,
|
298
|
+
// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
|
299
|
+
// range is reversed.
|
300
|
+
optional sint32 gt = 4;
|
301
|
+
|
302
|
+
// Gte specifies that this field must be greater than or equal to the
|
303
|
+
// specified value, inclusive. If the value of Gte is larger than a
|
304
|
+
// specified Lt or Lte, the range is reversed.
|
305
|
+
optional sint32 gte = 5;
|
306
|
+
|
307
|
+
// In specifies that this field must be equal to one of the specified
|
308
|
+
// values
|
309
|
+
repeated sint32 in = 6;
|
310
|
+
|
311
|
+
// NotIn specifies that this field cannot be equal to one of the specified
|
312
|
+
// values
|
313
|
+
repeated sint32 not_in = 7;
|
314
|
+
|
315
|
+
// IgnoreEmpty specifies that the validation rules of this field should be
|
316
|
+
// evaluated only if the field is not empty
|
317
|
+
optional bool ignore_empty = 8;
|
318
|
+
}
|
319
|
+
|
320
|
+
// SInt64Rules describes the constraints applied to `sint64` values
|
321
|
+
message SInt64Rules {
|
322
|
+
// Const specifies that this field must be exactly the specified value
|
323
|
+
optional sint64 const = 1;
|
324
|
+
|
325
|
+
// Lt specifies that this field must be less than the specified value,
|
326
|
+
// exclusive
|
327
|
+
optional sint64 lt = 2;
|
328
|
+
|
329
|
+
// Lte specifies that this field must be less than or equal to the
|
330
|
+
// specified value, inclusive
|
331
|
+
optional sint64 lte = 3;
|
332
|
+
|
333
|
+
// Gt specifies that this field must be greater than the specified value,
|
334
|
+
// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
|
335
|
+
// range is reversed.
|
336
|
+
optional sint64 gt = 4;
|
337
|
+
|
338
|
+
// Gte specifies that this field must be greater than or equal to the
|
339
|
+
// specified value, inclusive. If the value of Gte is larger than a
|
340
|
+
// specified Lt or Lte, the range is reversed.
|
341
|
+
optional sint64 gte = 5;
|
342
|
+
|
343
|
+
// In specifies that this field must be equal to one of the specified
|
344
|
+
// values
|
345
|
+
repeated sint64 in = 6;
|
346
|
+
|
347
|
+
// NotIn specifies that this field cannot be equal to one of the specified
|
348
|
+
// values
|
349
|
+
repeated sint64 not_in = 7;
|
350
|
+
|
351
|
+
// IgnoreEmpty specifies that the validation rules of this field should be
|
352
|
+
// evaluated only if the field is not empty
|
353
|
+
optional bool ignore_empty = 8;
|
354
|
+
}
|
355
|
+
|
356
|
+
// Fixed32Rules describes the constraints applied to `fixed32` values
|
357
|
+
message Fixed32Rules {
|
358
|
+
// Const specifies that this field must be exactly the specified value
|
359
|
+
optional fixed32 const = 1;
|
360
|
+
|
361
|
+
// Lt specifies that this field must be less than the specified value,
|
362
|
+
// exclusive
|
363
|
+
optional fixed32 lt = 2;
|
364
|
+
|
365
|
+
// Lte specifies that this field must be less than or equal to the
|
366
|
+
// specified value, inclusive
|
367
|
+
optional fixed32 lte = 3;
|
368
|
+
|
369
|
+
// Gt specifies that this field must be greater than the specified value,
|
370
|
+
// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
|
371
|
+
// range is reversed.
|
372
|
+
optional fixed32 gt = 4;
|
373
|
+
|
374
|
+
// Gte specifies that this field must be greater than or equal to the
|
375
|
+
// specified value, inclusive. If the value of Gte is larger than a
|
376
|
+
// specified Lt or Lte, the range is reversed.
|
377
|
+
optional fixed32 gte = 5;
|
378
|
+
|
379
|
+
// In specifies that this field must be equal to one of the specified
|
380
|
+
// values
|
381
|
+
repeated fixed32 in = 6;
|
382
|
+
|
383
|
+
// NotIn specifies that this field cannot be equal to one of the specified
|
384
|
+
// values
|
385
|
+
repeated fixed32 not_in = 7;
|
386
|
+
|
387
|
+
// IgnoreEmpty specifies that the validation rules of this field should be
|
388
|
+
// evaluated only if the field is not empty
|
389
|
+
optional bool ignore_empty = 8;
|
390
|
+
}
|
391
|
+
|
392
|
+
// Fixed64Rules describes the constraints applied to `fixed64` values
|
393
|
+
message Fixed64Rules {
|
394
|
+
// Const specifies that this field must be exactly the specified value
|
395
|
+
optional fixed64 const = 1;
|
396
|
+
|
397
|
+
// Lt specifies that this field must be less than the specified value,
|
398
|
+
// exclusive
|
399
|
+
optional fixed64 lt = 2;
|
400
|
+
|
401
|
+
// Lte specifies that this field must be less than or equal to the
|
402
|
+
// specified value, inclusive
|
403
|
+
optional fixed64 lte = 3;
|
404
|
+
|
405
|
+
// Gt specifies that this field must be greater than the specified value,
|
406
|
+
// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
|
407
|
+
// range is reversed.
|
408
|
+
optional fixed64 gt = 4;
|
409
|
+
|
410
|
+
// Gte specifies that this field must be greater than or equal to the
|
411
|
+
// specified value, inclusive. If the value of Gte is larger than a
|
412
|
+
// specified Lt or Lte, the range is reversed.
|
413
|
+
optional fixed64 gte = 5;
|
414
|
+
|
415
|
+
// In specifies that this field must be equal to one of the specified
|
416
|
+
// values
|
417
|
+
repeated fixed64 in = 6;
|
418
|
+
|
419
|
+
// NotIn specifies that this field cannot be equal to one of the specified
|
420
|
+
// values
|
421
|
+
repeated fixed64 not_in = 7;
|
422
|
+
|
423
|
+
// IgnoreEmpty specifies that the validation rules of this field should be
|
424
|
+
// evaluated only if the field is not empty
|
425
|
+
optional bool ignore_empty = 8;
|
426
|
+
}
|
427
|
+
|
428
|
+
// SFixed32Rules describes the constraints applied to `sfixed32` values
|
429
|
+
message SFixed32Rules {
|
430
|
+
// Const specifies that this field must be exactly the specified value
|
431
|
+
optional sfixed32 const = 1;
|
432
|
+
|
433
|
+
// Lt specifies that this field must be less than the specified value,
|
434
|
+
// exclusive
|
435
|
+
optional sfixed32 lt = 2;
|
436
|
+
|
437
|
+
// Lte specifies that this field must be less than or equal to the
|
438
|
+
// specified value, inclusive
|
439
|
+
optional sfixed32 lte = 3;
|
440
|
+
|
441
|
+
// Gt specifies that this field must be greater than the specified value,
|
442
|
+
// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
|
443
|
+
// range is reversed.
|
444
|
+
optional sfixed32 gt = 4;
|
445
|
+
|
446
|
+
// Gte specifies that this field must be greater than or equal to the
|
447
|
+
// specified value, inclusive. If the value of Gte is larger than a
|
448
|
+
// specified Lt or Lte, the range is reversed.
|
449
|
+
optional sfixed32 gte = 5;
|
450
|
+
|
451
|
+
// In specifies that this field must be equal to one of the specified
|
452
|
+
// values
|
453
|
+
repeated sfixed32 in = 6;
|
454
|
+
|
455
|
+
// NotIn specifies that this field cannot be equal to one of the specified
|
456
|
+
// values
|
457
|
+
repeated sfixed32 not_in = 7;
|
458
|
+
|
459
|
+
// IgnoreEmpty specifies that the validation rules of this field should be
|
460
|
+
// evaluated only if the field is not empty
|
461
|
+
optional bool ignore_empty = 8;
|
462
|
+
}
|
463
|
+
|
464
|
+
// SFixed64Rules describes the constraints applied to `sfixed64` values
|
465
|
+
message SFixed64Rules {
|
466
|
+
// Const specifies that this field must be exactly the specified value
|
467
|
+
optional sfixed64 const = 1;
|
468
|
+
|
469
|
+
// Lt specifies that this field must be less than the specified value,
|
470
|
+
// exclusive
|
471
|
+
optional sfixed64 lt = 2;
|
472
|
+
|
473
|
+
// Lte specifies that this field must be less than or equal to the
|
474
|
+
// specified value, inclusive
|
475
|
+
optional sfixed64 lte = 3;
|
476
|
+
|
477
|
+
// Gt specifies that this field must be greater than the specified value,
|
478
|
+
// exclusive. If the value of Gt is larger than a specified Lt or Lte, the
|
479
|
+
// range is reversed.
|
480
|
+
optional sfixed64 gt = 4;
|
481
|
+
|
482
|
+
// Gte specifies that this field must be greater than or equal to the
|
483
|
+
// specified value, inclusive. If the value of Gte is larger than a
|
484
|
+
// specified Lt or Lte, the range is reversed.
|
485
|
+
optional sfixed64 gte = 5;
|
486
|
+
|
487
|
+
// In specifies that this field must be equal to one of the specified
|
488
|
+
// values
|
489
|
+
repeated sfixed64 in = 6;
|
490
|
+
|
491
|
+
// NotIn specifies that this field cannot be equal to one of the specified
|
492
|
+
// values
|
493
|
+
repeated sfixed64 not_in = 7;
|
494
|
+
|
495
|
+
// IgnoreEmpty specifies that the validation rules of this field should be
|
496
|
+
// evaluated only if the field is not empty
|
497
|
+
optional bool ignore_empty = 8;
|
498
|
+
}
|
499
|
+
|
500
|
+
// BoolRules describes the constraints applied to `bool` values
|
501
|
+
message BoolRules {
|
502
|
+
// Const specifies that this field must be exactly the specified value
|
503
|
+
optional bool const = 1;
|
504
|
+
}
|
505
|
+
|
506
|
+
// StringRules describe the constraints applied to `string` values
|
507
|
+
message StringRules {
|
508
|
+
// Const specifies that this field must be exactly the specified value
|
509
|
+
optional string const = 1;
|
510
|
+
|
511
|
+
// Len specifies that this field must be the specified number of
|
512
|
+
// characters (Unicode code points). Note that the number of
|
513
|
+
// characters may differ from the number of bytes in the string.
|
514
|
+
optional uint64 len = 19;
|
515
|
+
|
516
|
+
// MinLen specifies that this field must be the specified number of
|
517
|
+
// characters (Unicode code points) at a minimum. Note that the number of
|
518
|
+
// characters may differ from the number of bytes in the string.
|
519
|
+
optional uint64 min_len = 2;
|
520
|
+
|
521
|
+
// MaxLen specifies that this field must be the specified number of
|
522
|
+
// characters (Unicode code points) at a maximum. Note that the number of
|
523
|
+
// characters may differ from the number of bytes in the string.
|
524
|
+
optional uint64 max_len = 3;
|
525
|
+
|
526
|
+
// LenBytes specifies that this field must be the specified number of bytes
|
527
|
+
optional uint64 len_bytes = 20;
|
528
|
+
|
529
|
+
// MinBytes specifies that this field must be the specified number of bytes
|
530
|
+
// at a minimum
|
531
|
+
optional uint64 min_bytes = 4;
|
532
|
+
|
533
|
+
// MaxBytes specifies that this field must be the specified number of bytes
|
534
|
+
// at a maximum
|
535
|
+
optional uint64 max_bytes = 5;
|
536
|
+
|
537
|
+
// Pattern specifes that this field must match against the specified
|
538
|
+
// regular expression (RE2 syntax). The included expression should elide
|
539
|
+
// any delimiters.
|
540
|
+
optional string pattern = 6;
|
541
|
+
|
542
|
+
// Prefix specifies that this field must have the specified substring at
|
543
|
+
// the beginning of the string.
|
544
|
+
optional string prefix = 7;
|
545
|
+
|
546
|
+
// Suffix specifies that this field must have the specified substring at
|
547
|
+
// the end of the string.
|
548
|
+
optional string suffix = 8;
|
549
|
+
|
550
|
+
// Contains specifies that this field must have the specified substring
|
551
|
+
// anywhere in the string.
|
552
|
+
optional string contains = 9;
|
553
|
+
|
554
|
+
// NotContains specifies that this field cannot have the specified substring
|
555
|
+
// anywhere in the string.
|
556
|
+
optional string not_contains = 23;
|
557
|
+
|
558
|
+
// In specifies that this field must be equal to one of the specified
|
559
|
+
// values
|
560
|
+
repeated string in = 10;
|
561
|
+
|
562
|
+
// NotIn specifies that this field cannot be equal to one of the specified
|
563
|
+
// values
|
564
|
+
repeated string not_in = 11;
|
565
|
+
|
566
|
+
// WellKnown rules provide advanced constraints against common string
|
567
|
+
// patterns
|
568
|
+
oneof well_known {
|
569
|
+
// Email specifies that the field must be a valid email address as
|
570
|
+
// defined by RFC 5322
|
571
|
+
bool email = 12;
|
572
|
+
|
573
|
+
// Hostname specifies that the field must be a valid hostname as
|
574
|
+
// defined by RFC 1034. This constraint does not support
|
575
|
+
// internationalized domain names (IDNs).
|
576
|
+
bool hostname = 13;
|
577
|
+
|
578
|
+
// Ip specifies that the field must be a valid IP (v4 or v6) address.
|
579
|
+
// Valid IPv6 addresses should not include surrounding square brackets.
|
580
|
+
bool ip = 14;
|
581
|
+
|
582
|
+
// Ipv4 specifies that the field must be a valid IPv4 address.
|
583
|
+
bool ipv4 = 15;
|
584
|
+
|
585
|
+
// Ipv6 specifies that the field must be a valid IPv6 address. Valid
|
586
|
+
// IPv6 addresses should not include surrounding square brackets.
|
587
|
+
bool ipv6 = 16;
|
588
|
+
|
589
|
+
// Uri specifies that the field must be a valid, absolute URI as defined
|
590
|
+
// by RFC 3986
|
591
|
+
bool uri = 17;
|
592
|
+
|
593
|
+
// UriRef specifies that the field must be a valid URI as defined by RFC
|
594
|
+
// 3986 and may be relative or absolute.
|
595
|
+
bool uri_ref = 18;
|
596
|
+
|
597
|
+
// Address specifies that the field must be either a valid hostname as
|
598
|
+
// defined by RFC 1034 (which does not support internationalized domain
|
599
|
+
// names or IDNs), or it can be a valid IP (v4 or v6).
|
600
|
+
bool address = 21;
|
601
|
+
|
602
|
+
// Uuid specifies that the field must be a valid UUID as defined by
|
603
|
+
// RFC 4122
|
604
|
+
bool uuid = 22;
|
605
|
+
|
606
|
+
// WellKnownRegex specifies a common well known pattern defined as a regex.
|
607
|
+
KnownRegex well_known_regex = 24;
|
608
|
+
}
|
609
|
+
|
610
|
+
// This applies to regexes HTTP_HEADER_NAME and HTTP_HEADER_VALUE to enable
|
611
|
+
// strict header validation.
|
612
|
+
// By default, this is true, and HTTP header validations are RFC-compliant.
|
613
|
+
// Setting to false will enable a looser validations that only disallows
|
614
|
+
// \r\n\0 characters, which can be used to bypass header matching rules.
|
615
|
+
optional bool strict = 25 [default = true];
|
616
|
+
|
617
|
+
// IgnoreEmpty specifies that the validation rules of this field should be
|
618
|
+
// evaluated only if the field is not empty
|
619
|
+
optional bool ignore_empty = 26;
|
620
|
+
}
|
621
|
+
|
622
|
+
// WellKnownRegex contain some well-known patterns.
|
623
|
+
enum KnownRegex {
|
624
|
+
UNKNOWN = 0;
|
625
|
+
|
626
|
+
// HTTP header name as defined by RFC 7230.
|
627
|
+
HTTP_HEADER_NAME = 1;
|
628
|
+
|
629
|
+
// HTTP header value as defined by RFC 7230.
|
630
|
+
HTTP_HEADER_VALUE = 2;
|
631
|
+
}
|
632
|
+
|
633
|
+
// BytesRules describe the constraints applied to `bytes` values
|
634
|
+
message BytesRules {
|
635
|
+
// Const specifies that this field must be exactly the specified value
|
636
|
+
optional bytes const = 1;
|
637
|
+
|
638
|
+
// Len specifies that this field must be the specified number of bytes
|
639
|
+
optional uint64 len = 13;
|
640
|
+
|
641
|
+
// MinLen specifies that this field must be the specified number of bytes
|
642
|
+
// at a minimum
|
643
|
+
optional uint64 min_len = 2;
|
644
|
+
|
645
|
+
// MaxLen specifies that this field must be the specified number of bytes
|
646
|
+
// at a maximum
|
647
|
+
optional uint64 max_len = 3;
|
648
|
+
|
649
|
+
// Pattern specifes that this field must match against the specified
|
650
|
+
// regular expression (RE2 syntax). The included expression should elide
|
651
|
+
// any delimiters.
|
652
|
+
optional string pattern = 4;
|
653
|
+
|
654
|
+
// Prefix specifies that this field must have the specified bytes at the
|
655
|
+
// beginning of the string.
|
656
|
+
optional bytes prefix = 5;
|
657
|
+
|
658
|
+
// Suffix specifies that this field must have the specified bytes at the
|
659
|
+
// end of the string.
|
660
|
+
optional bytes suffix = 6;
|
661
|
+
|
662
|
+
// Contains specifies that this field must have the specified bytes
|
663
|
+
// anywhere in the string.
|
664
|
+
optional bytes contains = 7;
|
665
|
+
|
666
|
+
// In specifies that this field must be equal to one of the specified
|
667
|
+
// values
|
668
|
+
repeated bytes in = 8;
|
669
|
+
|
670
|
+
// NotIn specifies that this field cannot be equal to one of the specified
|
671
|
+
// values
|
672
|
+
repeated bytes not_in = 9;
|
673
|
+
|
674
|
+
// WellKnown rules provide advanced constraints against common byte
|
675
|
+
// patterns
|
676
|
+
oneof well_known {
|
677
|
+
// Ip specifies that the field must be a valid IP (v4 or v6) address in
|
678
|
+
// byte format
|
679
|
+
bool ip = 10;
|
680
|
+
|
681
|
+
// Ipv4 specifies that the field must be a valid IPv4 address in byte
|
682
|
+
// format
|
683
|
+
bool ipv4 = 11;
|
684
|
+
|
685
|
+
// Ipv6 specifies that the field must be a valid IPv6 address in byte
|
686
|
+
// format
|
687
|
+
bool ipv6 = 12;
|
688
|
+
}
|
689
|
+
|
690
|
+
// IgnoreEmpty specifies that the validation rules of this field should be
|
691
|
+
// evaluated only if the field is not empty
|
692
|
+
optional bool ignore_empty = 14;
|
693
|
+
}
|
694
|
+
|
695
|
+
// EnumRules describe the constraints applied to enum values
|
696
|
+
message EnumRules {
|
697
|
+
// Const specifies that this field must be exactly the specified value
|
698
|
+
optional int32 const = 1;
|
699
|
+
|
700
|
+
// DefinedOnly specifies that this field must be only one of the defined
|
701
|
+
// values for this enum, failing on any undefined value.
|
702
|
+
optional bool defined_only = 2;
|
703
|
+
|
704
|
+
// In specifies that this field must be equal to one of the specified
|
705
|
+
// values
|
706
|
+
repeated int32 in = 3;
|
707
|
+
|
708
|
+
// NotIn specifies that this field cannot be equal to one of the specified
|
709
|
+
// values
|
710
|
+
repeated int32 not_in = 4;
|
711
|
+
}
|
712
|
+
|
713
|
+
// MessageRules describe the constraints applied to embedded message values.
|
714
|
+
// For message-type fields, validation is performed recursively.
|
715
|
+
message MessageRules {
|
716
|
+
// Skip specifies that the validation rules of this field should not be
|
717
|
+
// evaluated
|
718
|
+
optional bool skip = 1;
|
719
|
+
|
720
|
+
// Required specifies that this field must be set
|
721
|
+
optional bool required = 2;
|
722
|
+
}
|
723
|
+
|
724
|
+
// RepeatedRules describe the constraints applied to `repeated` values
|
725
|
+
message RepeatedRules {
|
726
|
+
// MinItems specifies that this field must have the specified number of
|
727
|
+
// items at a minimum
|
728
|
+
optional uint64 min_items = 1;
|
729
|
+
|
730
|
+
// MaxItems specifies that this field must have the specified number of
|
731
|
+
// items at a maximum
|
732
|
+
optional uint64 max_items = 2;
|
733
|
+
|
734
|
+
// Unique specifies that all elements in this field must be unique. This
|
735
|
+
// contraint is only applicable to scalar and enum types (messages are not
|
736
|
+
// supported).
|
737
|
+
optional bool unique = 3;
|
738
|
+
|
739
|
+
// Items specifies the contraints to be applied to each item in the field.
|
740
|
+
// Repeated message fields will still execute validation against each item
|
741
|
+
// unless skip is specified here.
|
742
|
+
optional FieldRules items = 4;
|
743
|
+
|
744
|
+
// IgnoreEmpty specifies that the validation rules of this field should be
|
745
|
+
// evaluated only if the field is not empty
|
746
|
+
optional bool ignore_empty = 5;
|
747
|
+
}
|
748
|
+
|
749
|
+
// MapRules describe the constraints applied to `map` values
|
750
|
+
message MapRules {
|
751
|
+
// MinPairs specifies that this field must have the specified number of
|
752
|
+
// KVs at a minimum
|
753
|
+
optional uint64 min_pairs = 1;
|
754
|
+
|
755
|
+
// MaxPairs specifies that this field must have the specified number of
|
756
|
+
// KVs at a maximum
|
757
|
+
optional uint64 max_pairs = 2;
|
758
|
+
|
759
|
+
// NoSparse specifies values in this field cannot be unset. This only
|
760
|
+
// applies to map's with message value types.
|
761
|
+
optional bool no_sparse = 3;
|
762
|
+
|
763
|
+
// Keys specifies the constraints to be applied to each key in the field.
|
764
|
+
optional FieldRules keys = 4;
|
765
|
+
|
766
|
+
// Values specifies the constraints to be applied to the value of each key
|
767
|
+
// in the field. Message values will still have their validations evaluated
|
768
|
+
// unless skip is specified here.
|
769
|
+
optional FieldRules values = 5;
|
770
|
+
|
771
|
+
// IgnoreEmpty specifies that the validation rules of this field should be
|
772
|
+
// evaluated only if the field is not empty
|
773
|
+
optional bool ignore_empty = 6;
|
774
|
+
}
|
775
|
+
|
776
|
+
// AnyRules describe constraints applied exclusively to the
|
777
|
+
// `google.protobuf.Any` well-known type
|
778
|
+
message AnyRules {
|
779
|
+
// Required specifies that this field must be set
|
780
|
+
optional bool required = 1;
|
781
|
+
|
782
|
+
// In specifies that this field's `type_url` must be equal to one of the
|
783
|
+
// specified values.
|
784
|
+
repeated string in = 2;
|
785
|
+
|
786
|
+
// NotIn specifies that this field's `type_url` must not be equal to any of
|
787
|
+
// the specified values.
|
788
|
+
repeated string not_in = 3;
|
789
|
+
}
|
790
|
+
|
791
|
+
// DurationRules describe the constraints applied exclusively to the
|
792
|
+
// `google.protobuf.Duration` well-known type
|
793
|
+
message DurationRules {
|
794
|
+
// Required specifies that this field must be set
|
795
|
+
optional bool required = 1;
|
796
|
+
|
797
|
+
// Const specifies that this field must be exactly the specified value
|
798
|
+
optional google.protobuf.Duration const = 2;
|
799
|
+
|
800
|
+
// Lt specifies that this field must be less than the specified value,
|
801
|
+
// exclusive
|
802
|
+
optional google.protobuf.Duration lt = 3;
|
803
|
+
|
804
|
+
// Lt specifies that this field must be less than the specified value,
|
805
|
+
// inclusive
|
806
|
+
optional google.protobuf.Duration lte = 4;
|
807
|
+
|
808
|
+
// Gt specifies that this field must be greater than the specified value,
|
809
|
+
// exclusive
|
810
|
+
optional google.protobuf.Duration gt = 5;
|
811
|
+
|
812
|
+
// Gte specifies that this field must be greater than the specified value,
|
813
|
+
// inclusive
|
814
|
+
optional google.protobuf.Duration gte = 6;
|
815
|
+
|
816
|
+
// In specifies that this field must be equal to one of the specified
|
817
|
+
// values
|
818
|
+
repeated google.protobuf.Duration in = 7;
|
819
|
+
|
820
|
+
// NotIn specifies that this field cannot be equal to one of the specified
|
821
|
+
// values
|
822
|
+
repeated google.protobuf.Duration not_in = 8;
|
823
|
+
}
|
824
|
+
|
825
|
+
// TimestampRules describe the constraints applied exclusively to the
|
826
|
+
// `google.protobuf.Timestamp` well-known type
|
827
|
+
message TimestampRules {
|
828
|
+
// Required specifies that this field must be set
|
829
|
+
optional bool required = 1;
|
830
|
+
|
831
|
+
// Const specifies that this field must be exactly the specified value
|
832
|
+
optional google.protobuf.Timestamp const = 2;
|
833
|
+
|
834
|
+
// Lt specifies that this field must be less than the specified value,
|
835
|
+
// exclusive
|
836
|
+
optional google.protobuf.Timestamp lt = 3;
|
837
|
+
|
838
|
+
// Lte specifies that this field must be less than the specified value,
|
839
|
+
// inclusive
|
840
|
+
optional google.protobuf.Timestamp lte = 4;
|
841
|
+
|
842
|
+
// Gt specifies that this field must be greater than the specified value,
|
843
|
+
// exclusive
|
844
|
+
optional google.protobuf.Timestamp gt = 5;
|
845
|
+
|
846
|
+
// Gte specifies that this field must be greater than the specified value,
|
847
|
+
// inclusive
|
848
|
+
optional google.protobuf.Timestamp gte = 6;
|
849
|
+
|
850
|
+
// LtNow specifies that this must be less than the current time. LtNow
|
851
|
+
// can only be used with the Within rule.
|
852
|
+
optional bool lt_now = 7;
|
853
|
+
|
854
|
+
// GtNow specifies that this must be greater than the current time. GtNow
|
855
|
+
// can only be used with the Within rule.
|
856
|
+
optional bool gt_now = 8;
|
857
|
+
|
858
|
+
// Within specifies that this field must be within this duration of the
|
859
|
+
// current time. This constraint can be used alone or with the LtNow and
|
860
|
+
// GtNow rules.
|
861
|
+
optional google.protobuf.Duration within = 9;
|
862
|
+
}
|