From d3b0f40b5a4713d86efd7ae10f5f385c4a8771e1 Mon Sep 17 00:00:00 2001 From: Ravi Suhag Date: Mon, 20 Apr 2026 21:17:51 -0500 Subject: [PATCH 1/6] feat: migrate from gRPC to connectRPC Replace gRPC server, gRPC-gateway, and associated middleware with connectRPC following the pattern established by Compass. This gives us native support for Connect, gRPC, and gRPC-Web protocols on a single HTTP port with standard net/http routing. Key changes: - buf.gen.yaml: switch to v2 with connectrpc/go plugin - Server: use http.ServeMux + connectRPC handler + h2c + CORS - API handlers: adopt connect.Request/Response generics - CLI client: use connectRPC client over plain HTTP - Middleware: add recovery, logger, error_response interceptors - Errors: replace GRPCStatus() with connect error codes - Config: remove GRPCConfig/NewRelic, add CORS config - Delete grpc-gateway, openapiv2, and custom validator packages --- Makefile | 8 +- buf.gen.yaml | 37 +- cmd/check.go | 24 +- cmd/client.go | 41 +- cmd/create.go | 36 +- cmd/delete.go | 26 +- cmd/diff.go | 29 +- cmd/download.go | 3 +- cmd/edit.go | 17 +- cmd/graph.go | 5 +- cmd/info.go | 31 +- cmd/list.go | 12 +- cmd/namespace.go | 91 +- cmd/print.go | 5 +- cmd/schema.go | 36 +- cmd/search.go | 19 +- config/config.go | 25 +- formats/avro/provider.go | 6 +- formats/avro/schema.go | 4 +- formats/json/provider.go | 7 +- formats/protobuf/error.go | 7 +- gen/raystack/stencil/v1beta1/stencil.pb.go | 2482 ++++++++++ .../stencilv1beta1connect/stencil.connect.go | 544 +++ go.mod | 39 +- go.sum | 144 +- internal/api/api.go | 154 +- internal/api/api_test.go | 9 +- internal/api/namespace.go | 43 +- internal/api/ping.go | 12 - internal/api/schema.go | 151 +- internal/api/schema_test.go | 3 - internal/api/search.go | 17 +- internal/middleware/error_response.go | 48 + internal/middleware/logger.go | 40 + internal/middleware/recovery.go | 29 + internal/server/graceful.go | 43 - internal/server/newrelic.go | 21 - internal/server/server.go | 166 +- internal/store/errors.go | 13 +- pkg/validator/validator.go | 95 - proto/apidocs.swagger.json | 777 --- proto/raystack/stencil/v1beta1/stencil.pb.go | 3351 ------------- .../raystack/stencil/v1beta1/stencil.pb.gw.go | 1382 ------ .../stencil/v1beta1/stencil.pb.validate.go | 4193 ----------------- .../stencil/v1beta1/stencil.swagger.json | 744 --- .../stencil/v1beta1/stencil.swagger.md | 371 -- .../stencil/v1beta1/stencil_grpc.pb.go | 645 --- 47 files changed, 3718 insertions(+), 12267 deletions(-) create mode 100644 gen/raystack/stencil/v1beta1/stencil.pb.go create mode 100644 gen/raystack/stencil/v1beta1/stencilv1beta1connect/stencil.connect.go delete mode 100644 internal/api/ping.go create mode 100644 internal/middleware/error_response.go create mode 100644 internal/middleware/logger.go create mode 100644 internal/middleware/recovery.go delete mode 100644 internal/server/graceful.go delete mode 100644 internal/server/newrelic.go delete mode 100644 pkg/validator/validator.go delete mode 100644 proto/apidocs.swagger.json delete mode 100644 proto/raystack/stencil/v1beta1/stencil.pb.go delete mode 100644 proto/raystack/stencil/v1beta1/stencil.pb.gw.go delete mode 100644 proto/raystack/stencil/v1beta1/stencil.pb.validate.go delete mode 100644 proto/raystack/stencil/v1beta1/stencil.swagger.json delete mode 100644 proto/raystack/stencil/v1beta1/stencil.swagger.md delete mode 100644 proto/raystack/stencil/v1beta1/stencil_grpc.pb.go diff --git a/Makefile b/Makefile index 83def328..3ec3ccd5 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,5 @@ NAME="github.com/raystack/stencil" VERSION=$(shell git describe --always --tags 2>/dev/null) -PROTON_COMMIT := "a6c7056fa80128145d00d5ee72f216c28578ec43" .PHONY: all build test clean dist vet proto install ui @@ -18,13 +17,14 @@ coverage: ui ## Print code coverage vet: ## Run the go vet tool go vet ./... -lint: ## Run golang-ci lint +lint: ## Run golang-ci lint golangci-lint run proto: ## Generate the protobuf files @echo " > generating protobuf from raystack/proton" @echo " > [info] make sure correct version of dependencies are installed using 'make install'" - @buf generate https://github.com/raystack/proton/archive/${PROTON_COMMIT}.zip#strip_components=1 --template buf.gen.yaml --path raystack/stencil + @buf generate + @find gen/raystack -mindepth 1 -maxdepth 1 ! -name stencil -exec rm -rf {} + @echo " > protobuf compilation finished" clean: ## Clean the build artifacts @@ -35,4 +35,4 @@ ui: @cd ui && $(MAKE) dep && $(MAKE) dist help: ## Display this help message - @cat $(MAKEFILE_LIST) | grep -e "^[a-zA-Z_\-]*: *.*## *" | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' \ No newline at end of file + @cat $(MAKEFILE_LIST) | grep -e "^[a-zA-Z_\-]*: *.*## *" | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' diff --git a/buf.gen.yaml b/buf.gen.yaml index 98ec91f0..a11c9839 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -1,17 +1,22 @@ -version: v1 +version: v2 +# Proto source lives in the proton repo (../proton). +# After running `buf generate`, remove unwanted generated files: +# find gen/raystack -mindepth 1 -maxdepth 1 ! -name stencil -exec rm -rf {} + +inputs: + - directory: ../proton + - module: buf.build/bufbuild/protovalidate +managed: + enabled: true + override: + - file_option: go_package + path: raystack/stencil/v1beta1/stencil.proto + value: github.com/raystack/stencil/gen/raystack/stencil/v1beta1;stencilv1beta1 plugins: - - name: go - out: ./proto - opt: paths=source_relative - - name: go-grpc - out: ./proto - opt: paths=source_relative - - remote: buf.build/raystack/plugins/validate - out: "proto" - opt: "paths=source_relative,lang=go" - - name: grpc-gateway - out: ./proto - opt: paths=source_relative - - name: openapiv2 - out: ./proto - opt: "allow_merge=true" + - remote: buf.build/protocolbuffers/go:v1.36.11 + out: gen + opt: + - paths=source_relative + - remote: buf.build/connectrpc/go:v1.18.1 + out: gen + opt: + - paths=source_relative diff --git a/cmd/check.go b/cmd/check.go index ea196b0c..5a9f1467 100644 --- a/cmd/check.go +++ b/cmd/check.go @@ -2,20 +2,18 @@ package cmd import ( "context" - "errors" "fmt" "os" + "connectrpc.com/connect" "github.com/MakeNowJust/heredoc" "github.com/raystack/salt/cli/printer" - stencilv1beta1 "github.com/raystack/stencil/proto/raystack/stencil/v1beta1" + stencilv1beta1 "github.com/raystack/stencil/gen/raystack/stencil/v1beta1" "github.com/spf13/cobra" - "google.golang.org/grpc/status" ) func checkSchemaCmd(cdk *CDK) *cobra.Command { var comp, file, namespaceID string - var req stencilv1beta1.CheckCompatibilityRequest cmd := &cobra.Command{ Use: "check ", @@ -36,23 +34,23 @@ func checkSchemaCmd(cdk *CDK) *cobra.Command { return err } - client, cancel, err := createClient(cmd, cdk) + client, err := createClient(cmd, cdk) if err != nil { return err } - defer cancel() schemaID := args[0] - req.Data = fileData - req.NamespaceId = namespaceID - req.SchemaId = schemaID - req.Compatibility = stencilv1beta1.Schema_Compatibility(stencilv1beta1.Schema_Compatibility_value[comp]) + req := &stencilv1beta1.CheckCompatibilityRequest{ + Data: fileData, + NamespaceId: namespaceID, + SchemaId: schemaID, + Compatibility: stencilv1beta1.Schema_Compatibility(stencilv1beta1.Schema_Compatibility_value[comp]), + } - _, err = client.CheckCompatibility(context.Background(), &req) + _, err = client.CheckCompatibility(context.Background(), connect.NewRequest(req)) if err != nil { - errStatus := status.Convert(err) - return errors.New(errStatus.Message()) + return err } spinner.Stop() diff --git a/cmd/client.go b/cmd/client.go index 40ef4096..b51ea730 100644 --- a/cmd/client.go +++ b/cmd/client.go @@ -1,55 +1,34 @@ package cmd import ( - "context" - "time" + "net/http" "github.com/raystack/salt/config" - stencilv1beta1 "github.com/raystack/stencil/proto/raystack/stencil/v1beta1" + stencilv1beta1connect "github.com/raystack/stencil/gen/raystack/stencil/v1beta1/stencilv1beta1connect" "github.com/spf13/cobra" - "google.golang.org/grpc" - "google.golang.org/grpc/credentials/insecure" ) type ClientConfig struct { Host string `yaml:"host" cmdx:"host"` } -func createConnection(ctx context.Context, host string) (*grpc.ClientConn, error) { - opts := []grpc.DialOption{ - grpc.WithTransportCredentials(insecure.NewCredentials()), - grpc.WithBlock(), - } - - return grpc.DialContext(ctx, host, opts...) -} - -func createClient(cmd *cobra.Command, cdk *CDK) (stencilv1beta1.StencilServiceClient, func(), error) { +func createClient(cmd *cobra.Command, cdk *CDK) (stencilv1beta1connect.StencilServiceClient, error) { c, err := loadClientConfig(cmd, cdk.Config) if err != nil { - return nil, nil, err + return nil, err } host := c.Host if host == "" { - return nil, nil, ErrClientConfigHostNotFound - } - - dialTimeoutCtx, dialCancel := context.WithTimeout(cmd.Context(), time.Second*2) - conn, err := createConnection(dialTimeoutCtx, host) - if err != nil { - dialCancel() - return nil, nil, err - } - - cancel := func() { - dialCancel() - conn.Close() + return nil, ErrClientConfigHostNotFound } - client := stencilv1beta1.NewStencilServiceClient(conn) - return client, cancel, nil + client := stencilv1beta1connect.NewStencilServiceClient( + http.DefaultClient, + host, + ) + return client, nil } func loadClientConfig(cmd *cobra.Command, cmdxConfig *config.Loader) (*ClientConfig, error) { diff --git a/cmd/create.go b/cmd/create.go index b2abf646..0c19d0bb 100644 --- a/cmd/create.go +++ b/cmd/create.go @@ -2,62 +2,60 @@ package cmd import ( "context" - "errors" "fmt" "os" + "connectrpc.com/connect" "github.com/MakeNowJust/heredoc" "github.com/raystack/salt/cli/printer" - stencilv1beta1 "github.com/raystack/stencil/proto/raystack/stencil/v1beta1" + stencilv1beta1 "github.com/raystack/stencil/gen/raystack/stencil/v1beta1" "github.com/spf13/cobra" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" ) func createSchemaCmd(cdk *CDK) *cobra.Command { var format, comp, file, namespaceID string - var req stencilv1beta1.CreateSchemaRequest cmd := &cobra.Command{ Use: "create", Short: "Create a schema", Args: cobra.ExactArgs(1), Example: heredoc.Doc(` - $ stencil schema create booking -n raystack –F booking.json - $ stencil schema create booking -n raystack -f FORMAT_JSON –c COMPATIBILITY_BACKWARD –F ./booking.json + $ stencil schema create booking -n raystack -F booking.json + $ stencil schema create booking -n raystack -f FORMAT_JSON -c COMPATIBILITY_BACKWARD -F ./booking.json `), RunE: func(cmd *cobra.Command, args []string) error { fileData, err := os.ReadFile(file) if err != nil { return err } - req.Data = fileData spinner := printer.Spin("") defer spinner.Stop() - client, cancel, err := createClient(cmd, cdk) + client, err := createClient(cmd, cdk) if err != nil { return err } - defer cancel() schemaID := args[0] - req.NamespaceId = namespaceID - req.SchemaId = schemaID - req.Format = stencilv1beta1.Schema_Format(stencilv1beta1.Schema_Format_value[format]) - req.Compatibility = stencilv1beta1.Schema_Compatibility(stencilv1beta1.Schema_Compatibility_value[comp]) + req := &stencilv1beta1.CreateSchemaRequest{ + NamespaceId: namespaceID, + SchemaId: schemaID, + Data: fileData, + Format: stencilv1beta1.Schema_Format(stencilv1beta1.Schema_Format_value[format]), + Compatibility: stencilv1beta1.Schema_Compatibility(stencilv1beta1.Schema_Compatibility_value[comp]), + } - res, err := client.CreateSchema(context.Background(), &req) + res, err := client.CreateSchema(context.Background(), connect.NewRequest(req)) if err != nil { - errStatus := status.Convert(err) - if codes.AlreadyExists == errStatus.Code() { + connectErr, ok := err.(*connect.Error) + if ok && connectErr.Code() == connect.CodeAlreadyExists { fmt.Printf("\n%s Schema with id '%s' already exist.\n", printer.Icon("failure"), args[0]) return nil } - return errors.New(errStatus.Message()) + return err } - id := res.GetId() + id := res.Msg.GetId() spinner.Stop() fmt.Printf("\n%s Created schema with id %s.\n", printer.Green(printer.Icon("success")), printer.Cyan(id)) diff --git a/cmd/delete.go b/cmd/delete.go index 6a4c3f3f..84dc007c 100644 --- a/cmd/delete.go +++ b/cmd/delete.go @@ -4,16 +4,15 @@ import ( "context" "fmt" + "connectrpc.com/connect" "github.com/MakeNowJust/heredoc" "github.com/raystack/salt/cli/printer" - stencilv1beta1 "github.com/raystack/stencil/proto/raystack/stencil/v1beta1" + stencilv1beta1 "github.com/raystack/stencil/gen/raystack/stencil/v1beta1" "github.com/spf13/cobra" ) func deleteSchemaCmd(cdk *CDK) *cobra.Command { var namespaceID string - var req stencilv1beta1.DeleteSchemaRequest - var reqVer stencilv1beta1.DeleteVersionRequest var version int32 cmd := &cobra.Command{ @@ -27,28 +26,27 @@ func deleteSchemaCmd(cdk *CDK) *cobra.Command { spinner := printer.Spin("") defer spinner.Stop() - client, cancel, err := createClient(cmd, cdk) + client, err := createClient(cmd, cdk) if err != nil { return err } - defer cancel() schemaID := args[0] if version == 0 { - req.NamespaceId = namespaceID - req.SchemaId = schemaID - - _, err = client.DeleteSchema(context.Background(), &req) + _, err = client.DeleteSchema(context.Background(), connect.NewRequest(&stencilv1beta1.DeleteSchemaRequest{ + NamespaceId: namespaceID, + SchemaId: schemaID, + })) if err != nil { return err } } else { - reqVer.NamespaceId = namespaceID - reqVer.SchemaId = schemaID - reqVer.VersionId = version - - _, err = client.DeleteVersion(context.Background(), &reqVer) + _, err = client.DeleteVersion(context.Background(), connect.NewRequest(&stencilv1beta1.DeleteVersionRequest{ + NamespaceId: namespaceID, + SchemaId: schemaID, + VersionId: version, + })) if err != nil { return err } diff --git a/cmd/diff.go b/cmd/diff.go index bdd11d2e..b82e4417 100644 --- a/cmd/diff.go +++ b/cmd/diff.go @@ -5,9 +5,11 @@ import ( "encoding/json" "fmt" + "connectrpc.com/connect" "github.com/MakeNowJust/heredoc" "github.com/raystack/salt/cli/printer" - stencilv1beta1 "github.com/raystack/stencil/proto/raystack/stencil/v1beta1" + stencilv1beta1 "github.com/raystack/stencil/gen/raystack/stencil/v1beta1" + stencilv1beta1connect "github.com/raystack/stencil/gen/raystack/stencil/v1beta1/stencilv1beta1connect" "github.com/spf13/cobra" "github.com/yudai/gojsondiff" "github.com/yudai/gojsondiff/formatter" @@ -24,23 +26,23 @@ func diffSchemaCmd(cdk *CDK) *cobra.Command { var earlierVersion int32 var laterVersion int32 - var schemaFetcher = func(req *stencilv1beta1.GetSchemaRequest, client stencilv1beta1.StencilServiceClient) ([]byte, error) { - res, err := client.GetSchema(context.Background(), req) + var schemaFetcher = func(req *stencilv1beta1.GetSchemaRequest, client stencilv1beta1connect.StencilServiceClient) ([]byte, error) { + res, err := client.GetSchema(context.Background(), connect.NewRequest(req)) if err != nil { return nil, err } - return res.Data, nil + return res.Msg.GetData(), nil } - var protoSchemaFetcher = func(req *stencilv1beta1.GetSchemaRequest, client stencilv1beta1.StencilServiceClient) ([]byte, error) { + var protoSchemaFetcher = func(req *stencilv1beta1.GetSchemaRequest, client stencilv1beta1connect.StencilServiceClient) ([]byte, error) { if fullname == "" { return nil, fmt.Errorf("fullname flag is mandator for FORMAT_PROTO") } - res, err := client.GetSchema(context.Background(), req) + res, err := client.GetSchema(context.Background(), connect.NewRequest(req)) if err != nil { return nil, err } fds := &descriptorpb.FileDescriptorSet{} - if err := proto.Unmarshal(res.Data, fds); err != nil { + if err := proto.Unmarshal(res.Msg.GetData(), fds); err != nil { return nil, fmt.Errorf("descriptor set file is not valid. %w", err) } files, err := protodesc.NewFiles(fds) @@ -75,10 +77,6 @@ func diffSchemaCmd(cdk *CDK) *cobra.Command { schemaID := args[0] - metaReq := stencilv1beta1.GetSchemaMetadataRequest{ - NamespaceId: namespace, - SchemaId: schemaID, - } eReq := &stencilv1beta1.GetSchemaRequest{ NamespaceId: namespace, SchemaId: schemaID, @@ -90,17 +88,20 @@ func diffSchemaCmd(cdk *CDK) *cobra.Command { VersionId: laterVersion, } - client, cancel, err := createClient(cmd, cdk) + client, err := createClient(cmd, cdk) if err != nil { return err } - defer cancel() - meta, err := client.GetSchemaMetadata(context.Background(), &metaReq) + metaRes, err := client.GetSchemaMetadata(context.Background(), connect.NewRequest(&stencilv1beta1.GetSchemaMetadataRequest{ + NamespaceId: namespace, + SchemaId: schemaID, + })) if err != nil { return err } + meta := metaRes.Msg var getSchema = schemaFetcher if meta.Format == *stencilv1beta1.Schema_FORMAT_PROTOBUF.Enum() { getSchema = protoSchemaFetcher diff --git a/cmd/download.go b/cmd/download.go index b442e13d..a45b55ce 100644 --- a/cmd/download.go +++ b/cmd/download.go @@ -24,11 +24,10 @@ func downloadSchemaCmd(cdk *CDK) *cobra.Command { RunE: func(cmd *cobra.Command, args []string) error { spinner := printer.Spin("") defer spinner.Stop() - client, cancel, err := createClient(cmd, cdk) + client, err := createClient(cmd, cdk) if err != nil { return err } - defer cancel() data, _, err = fetchSchemaAndMeta(client, version, namespaceID, args[0]) if err != nil { diff --git a/cmd/edit.go b/cmd/edit.go index e31081d2..69ac7fde 100644 --- a/cmd/edit.go +++ b/cmd/edit.go @@ -4,15 +4,15 @@ import ( "context" "fmt" + "connectrpc.com/connect" "github.com/MakeNowJust/heredoc" "github.com/raystack/salt/cli/printer" - stencilv1beta1 "github.com/raystack/stencil/proto/raystack/stencil/v1beta1" + stencilv1beta1 "github.com/raystack/stencil/gen/raystack/stencil/v1beta1" "github.com/spf13/cobra" ) func editSchemaCmd(cdk *CDK) *cobra.Command { var comp, namespaceID string - var req stencilv1beta1.UpdateSchemaMetadataRequest cmd := &cobra.Command{ Use: "edit", @@ -25,19 +25,20 @@ func editSchemaCmd(cdk *CDK) *cobra.Command { spinner := printer.Spin("") defer spinner.Stop() - client, cancel, err := createClient(cmd, cdk) + client, err := createClient(cmd, cdk) if err != nil { return err } - defer cancel() schemaID := args[0] - req.NamespaceId = namespaceID - req.SchemaId = schemaID - req.Compatibility = stencilv1beta1.Schema_Compatibility(stencilv1beta1.Schema_Compatibility_value[comp]) + req := &stencilv1beta1.UpdateSchemaMetadataRequest{ + NamespaceId: namespaceID, + SchemaId: schemaID, + Compatibility: stencilv1beta1.Schema_Compatibility(stencilv1beta1.Schema_Compatibility_value[comp]), + } - _, err = client.UpdateSchemaMetadata(context.Background(), &req) + _, err = client.UpdateSchemaMetadata(context.Background(), connect.NewRequest(req)) if err != nil { return err } diff --git a/cmd/graph.go b/cmd/graph.go index 0755b2a7..f8c73bbe 100644 --- a/cmd/graph.go +++ b/cmd/graph.go @@ -6,7 +6,7 @@ import ( "github.com/MakeNowJust/heredoc" "github.com/raystack/stencil/pkg/graph" - stencilv1beta1 "github.com/raystack/stencil/proto/raystack/stencil/v1beta1" + stencilv1beta1 "github.com/raystack/stencil/gen/raystack/stencil/v1beta1" "github.com/spf13/cobra" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/descriptorpb" @@ -25,11 +25,10 @@ func graphSchemaCmd(cdk *CDK) *cobra.Command { $ stencil schema graph booking -n raystack -v 1 -o ./vis.dot `), RunE: func(cmd *cobra.Command, args []string) error { - client, cancel, err := createClient(cmd, cdk) + client, err := createClient(cmd, cdk) if err != nil { return err } - defer cancel() schemaID := args[0] diff --git a/cmd/info.go b/cmd/info.go index 3bb4ccd3..8ef9bfc2 100644 --- a/cmd/info.go +++ b/cmd/info.go @@ -6,12 +6,11 @@ import ( "os" "strconv" + "connectrpc.com/connect" "github.com/MakeNowJust/heredoc" "github.com/raystack/salt/cli/printer" - stencilv1beta1 "github.com/raystack/stencil/proto/raystack/stencil/v1beta1" + stencilv1beta1 "github.com/raystack/stencil/gen/raystack/stencil/v1beta1" "github.com/spf13/cobra" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" ) func infoSchemaCmd(cdk *CDK) *cobra.Command { @@ -28,27 +27,27 @@ func infoSchemaCmd(cdk *CDK) *cobra.Command { RunE: func(cmd *cobra.Command, args []string) error { spinner := printer.Spin("") defer spinner.Stop() - client, cancel, err := createClient(cmd, cdk) + client, err := createClient(cmd, cdk) if err != nil { return err } - defer cancel() - req := stencilv1beta1.GetSchemaMetadataRequest{ + req := &stencilv1beta1.GetSchemaMetadataRequest{ NamespaceId: namespace, SchemaId: args[0], } - info, err := client.GetSchemaMetadata(cmd.Context(), &req) + res, err := client.GetSchemaMetadata(cmd.Context(), connect.NewRequest(req)) spinner.Stop() if err != nil { - errStatus, _ := status.FromError(err) - if codes.NotFound == errStatus.Code() { + connectErr, ok := err.(*connect.Error) + if ok && connectErr.Code() == connect.CodeNotFound { fmt.Printf("%s Schema with id '%s' not found.\n", printer.Red(printer.Icon("failure")), args[0]) return nil } return err } + info := res.Msg fmt.Printf("\n%s\n", printer.Blue(args[0])) fmt.Printf("\n%s\n\n", printer.Grey("No description provided")) fmt.Printf("%s \t %s \n", printer.Grey("Namespace:"), namespace) @@ -67,7 +66,6 @@ func infoSchemaCmd(cdk *CDK) *cobra.Command { func versionSchemaCmd(cdk *CDK) *cobra.Command { var namespaceID string - var req stencilv1beta1.ListVersionsRequest cmd := &cobra.Command{ Use: "version", @@ -80,22 +78,21 @@ func versionSchemaCmd(cdk *CDK) *cobra.Command { spinner := printer.Spin("") defer spinner.Stop() - client, cancel, err := createClient(cmd, cdk) + client, err := createClient(cmd, cdk) if err != nil { return err } - defer cancel() schemaID := args[0] - req.NamespaceId = namespaceID - req.SchemaId = schemaID - - res, err := client.ListVersions(context.Background(), &req) + res, err := client.ListVersions(context.Background(), connect.NewRequest(&stencilv1beta1.ListVersionsRequest{ + NamespaceId: namespaceID, + SchemaId: schemaID, + })) if err != nil { return err } - versions := res.GetVersions() + versions := res.Msg.GetVersions() spinner.Stop() if len(versions) == 0 { diff --git a/cmd/list.go b/cmd/list.go index ac65afc4..845c493f 100644 --- a/cmd/list.go +++ b/cmd/list.go @@ -5,15 +5,15 @@ import ( "fmt" "os" + "connectrpc.com/connect" "github.com/MakeNowJust/heredoc" "github.com/raystack/salt/cli/printer" - stencilv1beta1 "github.com/raystack/stencil/proto/raystack/stencil/v1beta1" + stencilv1beta1 "github.com/raystack/stencil/gen/raystack/stencil/v1beta1" "github.com/spf13/cobra" ) func listSchemaCmd(cdk *CDK) *cobra.Command { var namespace string - var req stencilv1beta1.ListSchemasRequest cmd := &cobra.Command{ Use: "list", @@ -29,18 +29,16 @@ func listSchemaCmd(cdk *CDK) *cobra.Command { spinner := printer.Spin("") defer spinner.Stop() - client, cancel, err := createClient(cmd, cdk) + client, err := createClient(cmd, cdk) if err != nil { return err } - defer cancel() - req.Id = namespace - res, err := client.ListSchemas(context.Background(), &req) + res, err := client.ListSchemas(context.Background(), connect.NewRequest(&stencilv1beta1.ListSchemasRequest{Id: namespace})) if err != nil { return err } - schemas := res.GetSchemas() + schemas := res.Msg.GetSchemas() // TODO(Ravi): List schemas should also handle namespace not found if len(schemas) == 0 { diff --git a/cmd/namespace.go b/cmd/namespace.go index 621128bb..edda0eda 100644 --- a/cmd/namespace.go +++ b/cmd/namespace.go @@ -5,14 +5,13 @@ import ( "fmt" "os" + "connectrpc.com/connect" "github.com/MakeNowJust/heredoc" "github.com/dustin/go-humanize" "github.com/raystack/salt/cli/printer" "github.com/raystack/salt/cli/prompter" - stencilv1beta1 "github.com/raystack/stencil/proto/raystack/stencil/v1beta1" + stencilv1beta1 "github.com/raystack/stencil/gen/raystack/stencil/v1beta1" "github.com/spf13/cobra" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" ) func NamespaceCmd(cdk *CDK) *cobra.Command { @@ -42,8 +41,6 @@ func NamespaceCmd(cdk *CDK) *cobra.Command { } func listNamespaceCmd(cdk *CDK) *cobra.Command { - var req stencilv1beta1.ListNamespacesRequest - cmd := &cobra.Command{ Use: "list", Short: "List all namespaces", @@ -52,18 +49,17 @@ func listNamespaceCmd(cdk *CDK) *cobra.Command { RunE: func(cmd *cobra.Command, args []string) error { spinner := printer.Spin("") defer spinner.Stop() - client, cancel, err := createClient(cmd, cdk) + client, err := createClient(cmd, cdk) if err != nil { return err } - defer cancel() - res, err := client.ListNamespaces(context.Background(), &req) + res, err := client.ListNamespaces(context.Background(), connect.NewRequest(&stencilv1beta1.ListNamespacesRequest{})) if err != nil { return err } - namespaces := res.GetNamespaces() + namespaces := res.Msg.GetNamespaces() spinner.Stop() if len(namespaces) == 0 { @@ -99,14 +95,13 @@ func listNamespaceCmd(cdk *CDK) *cobra.Command { func createNamespaceCmd(cdk *CDK) *cobra.Command { var id, desc, format, comp string - var req stencilv1beta1.CreateNamespaceRequest cmd := &cobra.Command{ Use: "create", Short: "Create a namespace", Args: cobra.ExactArgs(0), Example: heredoc.Doc(` - $ stencil namespace create + $ stencil namespace create $ stencil namespace create -n=raystack -f=FORMAT_PROTOBUF -c=COMPATIBILITY_BACKWARD -d="Event schemas" `), RunE: func(cmd *cobra.Command, args []string) error { @@ -130,33 +125,37 @@ func createNamespaceCmd(cdk *CDK) *cobra.Command { comp = comps[formatAnswer] } - req.Id = id - req.Format = stencilv1beta1.Schema_Format(stencilv1beta1.Schema_Format_value[format]) - req.Compatibility = stencilv1beta1.Schema_Compatibility(stencilv1beta1.Schema_Compatibility_value[comp]) - req.Description = desc + req := &stencilv1beta1.CreateNamespaceRequest{ + Id: id, + Format: stencilv1beta1.Schema_Format(stencilv1beta1.Schema_Format_value[format]), + Compatibility: stencilv1beta1.Schema_Compatibility(stencilv1beta1.Schema_Compatibility_value[comp]), + Description: desc, + } spinner := printer.Spin("") defer spinner.Stop() - client, cancel, err := createClient(cmd, cdk) + client, err := createClient(cmd, cdk) if err != nil { return err } - defer cancel() - res, err := client.CreateNamespace(context.Background(), &req) + res, err := client.CreateNamespace(context.Background(), connect.NewRequest(req)) spinner.Stop() if err != nil { - errStatus, _ := status.FromError(err) - if codes.AlreadyExists == errStatus.Code() { + connectErr := new(connect.Error) + if ok := err.(*connect.Error); ok != nil { + connectErr = ok + } + if connectErr.Code() == connect.CodeAlreadyExists { fmt.Printf("\n%s Namespace with id '%s' already exist.\n", printer.Icon("failure"), id) return nil } return err } - namespace := res.GetNamespace() + namespace := res.Msg.GetNamespace() fmt.Printf("\n%s Created namespace with id %s.\n", printer.Green(printer.Icon("success")), printer.Bold(printer.Blue(namespace.GetId()))) return nil }, @@ -173,7 +172,6 @@ func createNamespaceCmd(cdk *CDK) *cobra.Command { func editNamespaceCmd(cdk *CDK) *cobra.Command { var format, comp string var desc string - var req stencilv1beta1.UpdateNamespaceRequest cmd := &cobra.Command{ Use: "edit ", @@ -186,32 +184,33 @@ func editNamespaceCmd(cdk *CDK) *cobra.Command { spinner := printer.Spin("") defer spinner.Stop() - client, cancel, err := createClient(cmd, cdk) + client, err := createClient(cmd, cdk) if err != nil { return err } - defer cancel() id := args[0] - req.Id = id - req.Format = stencilv1beta1.Schema_Format(stencilv1beta1.Schema_Format_value[format]) - req.Compatibility = stencilv1beta1.Schema_Compatibility(stencilv1beta1.Schema_Compatibility_value[comp]) - req.Description = desc + req := &stencilv1beta1.UpdateNamespaceRequest{ + Id: id, + Format: stencilv1beta1.Schema_Format(stencilv1beta1.Schema_Format_value[format]), + Compatibility: stencilv1beta1.Schema_Compatibility(stencilv1beta1.Schema_Compatibility_value[comp]), + Description: desc, + } - res, err := client.UpdateNamespace(context.Background(), &req) + res, err := client.UpdateNamespace(context.Background(), connect.NewRequest(req)) spinner.Stop() if err != nil { - errStatus, _ := status.FromError(err) - if codes.NotFound == errStatus.Code() { + connectErr, ok := err.(*connect.Error) + if ok && connectErr.Code() == connect.CodeNotFound { fmt.Printf("%s Namespace with id '%s' does not exist.\n", printer.Icon("failure"), id) return nil } return err } - namespace := res.Namespace + namespace := res.Msg.GetNamespace() fmt.Printf("%s Updated namespace with id %s.\n", printer.Green(printer.Icon("success")), printer.Bold(printer.Blue(namespace.GetId()))) return nil @@ -232,8 +231,6 @@ func editNamespaceCmd(cdk *CDK) *cobra.Command { } func viewNamespaceCmd(cdk *CDK) *cobra.Command { - var req stencilv1beta1.GetNamespaceRequest - cmd := &cobra.Command{ Use: "view ", Short: "View a namespace", @@ -245,28 +242,25 @@ func viewNamespaceCmd(cdk *CDK) *cobra.Command { spinner := printer.Spin("") defer spinner.Stop() - client, cancel, err := createClient(cmd, cdk) + client, err := createClient(cmd, cdk) if err != nil { return err } - defer cancel() id := args[0] - req.Id = id - - res, err := client.GetNamespace(context.Background(), &req) + res, err := client.GetNamespace(context.Background(), connect.NewRequest(&stencilv1beta1.GetNamespaceRequest{Id: id})) spinner.Stop() if err != nil { - errStatus, _ := status.FromError(err) - if codes.NotFound == errStatus.Code() { + connectErr, ok := err.(*connect.Error) + if ok && connectErr.Code() == connect.CodeNotFound { fmt.Printf("%s Namespace with id %s does not exist.\n", printer.Icon("failure"), printer.Bold(printer.Blue(id))) return nil } return err } - namespace := res.GetNamespace() + namespace := res.Msg.GetNamespace() printNamespace(namespace) @@ -278,8 +272,6 @@ func viewNamespaceCmd(cdk *CDK) *cobra.Command { } func deleteNamespaceCmd(cdk *CDK) *cobra.Command { - var req stencilv1beta1.DeleteNamespaceRequest - cmd := &cobra.Command{ Use: "delete ", Short: "Delete a namespace", @@ -300,21 +292,18 @@ func deleteNamespaceCmd(cdk *CDK) *cobra.Command { spinner := printer.Spin("") defer spinner.Stop() - client, cancel, err := createClient(cmd, cdk) + client, err := createClient(cmd, cdk) if err != nil { return err } - defer cancel() - - req.Id = id - _, err = client.DeleteNamespace(context.Background(), &req) + _, err = client.DeleteNamespace(context.Background(), connect.NewRequest(&stencilv1beta1.DeleteNamespaceRequest{Id: id})) spinner.Stop() if err != nil { - errStatus, _ := status.FromError(err) - if codes.NotFound == errStatus.Code() { + connectErr, ok := err.(*connect.Error) + if ok && connectErr.Code() == connect.CodeNotFound { fmt.Printf("\n%s Namespace with id '%s' does not exist.\n", printer.Icon("failure"), id) return nil } diff --git a/cmd/print.go b/cmd/print.go index aa11ff59..3fe84f97 100644 --- a/cmd/print.go +++ b/cmd/print.go @@ -10,7 +10,7 @@ import ( "github.com/jhump/protoreflect/desc/protoprint" "github.com/raystack/salt/cli/printer" "github.com/raystack/salt/cli/terminator" - stencilv1beta1 "github.com/raystack/stencil/proto/raystack/stencil/v1beta1" + stencilv1beta1 "github.com/raystack/stencil/gen/raystack/stencil/v1beta1" "github.com/spf13/cobra" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/descriptorpb" @@ -32,11 +32,10 @@ func printSchemaCmd(cdk *CDK) *cobra.Command { RunE: func(cmd *cobra.Command, args []string) error { spinner := printer.Spin("") defer spinner.Stop() - client, cancel, err := createClient(cmd, cdk) + client, err := createClient(cmd, cdk) if err != nil { return err } - defer cancel() data, meta, err := fetchSchemaAndMeta(client, version, namespaceID, args[0]) if err != nil { diff --git a/cmd/schema.go b/cmd/schema.go index e81a2444..31763fd6 100644 --- a/cmd/schema.go +++ b/cmd/schema.go @@ -3,7 +3,9 @@ package cmd import ( "context" - stencilv1beta1 "github.com/raystack/stencil/proto/raystack/stencil/v1beta1" + "connectrpc.com/connect" + stencilv1beta1 "github.com/raystack/stencil/gen/raystack/stencil/v1beta1" + stencilv1beta1connect "github.com/raystack/stencil/gen/raystack/stencil/v1beta1/stencilv1beta1connect" "github.com/spf13/cobra" ) @@ -34,41 +36,39 @@ func SchemaCmd(cdk *CDK) *cobra.Command { return cmd } -func fetchSchemaAndMeta(client stencilv1beta1.StencilServiceClient, version int32, namespaceID, schemaID string) ([]byte, *stencilv1beta1.GetSchemaMetadataResponse, error) { - var req stencilv1beta1.GetSchemaRequest - var reqLatest stencilv1beta1.GetLatestSchemaRequest +func fetchSchemaAndMeta(client stencilv1beta1connect.StencilServiceClient, version int32, namespaceID, schemaID string) ([]byte, *stencilv1beta1.GetSchemaMetadataResponse, error) { var data []byte ctx := context.Background() if version != 0 { - req.NamespaceId = namespaceID - req.SchemaId = schemaID - req.VersionId = version - res, err := client.GetSchema(ctx, &req) + res, err := client.GetSchema(ctx, connect.NewRequest(&stencilv1beta1.GetSchemaRequest{ + NamespaceId: namespaceID, + SchemaId: schemaID, + VersionId: version, + })) if err != nil { return nil, nil, err } - data = res.GetData() + data = res.Msg.GetData() } else { - reqLatest.NamespaceId = namespaceID - reqLatest.SchemaId = schemaID - res, err := client.GetLatestSchema(ctx, &reqLatest) + res, err := client.GetLatestSchema(ctx, connect.NewRequest(&stencilv1beta1.GetLatestSchemaRequest{ + NamespaceId: namespaceID, + SchemaId: schemaID, + })) if err != nil { return nil, nil, err } - data = res.GetData() + data = res.Msg.GetData() } - reqMeta := stencilv1beta1.GetSchemaMetadataRequest{ + metaRes, err := client.GetSchemaMetadata(context.Background(), connect.NewRequest(&stencilv1beta1.GetSchemaMetadataRequest{ NamespaceId: namespaceID, SchemaId: schemaID, - } - meta, err := client.GetSchemaMetadata(context.Background(), &reqMeta) - + })) if err != nil { return nil, nil, err } - return data, meta, nil + return data, metaRes.Msg, nil } diff --git a/cmd/search.go b/cmd/search.go index 673365cd..a462b9c6 100644 --- a/cmd/search.go +++ b/cmd/search.go @@ -7,9 +7,10 @@ import ( "strconv" "strings" + "connectrpc.com/connect" "github.com/MakeNowJust/heredoc" "github.com/raystack/salt/cli/printer" - stencilv1beta1 "github.com/raystack/stencil/proto/raystack/stencil/v1beta1" + stencilv1beta1 "github.com/raystack/stencil/gen/raystack/stencil/v1beta1" "github.com/spf13/cobra" ) @@ -17,7 +18,6 @@ func SearchCmd(cdk *CDK) *cobra.Command { var namespaceID, schemaID string var versionID int32 var history bool - var req stencilv1beta1.SearchRequest cmd := &cobra.Command{ Use: "search ", @@ -41,22 +41,23 @@ func SearchCmd(cdk *CDK) *cobra.Command { s := printer.Spin("") defer s.Stop() - client, cancel, err := createClient(cmd, cdk) + client, err := createClient(cmd, cdk) if err != nil { return err } - defer cancel() query := args[0] - req.Query = query + req := &stencilv1beta1.SearchRequest{ + Query: query, + NamespaceId: namespaceID, + SchemaId: schemaID, + } if len(schemaID) > 0 && len(namespaceID) == 0 { s.Stop() fmt.Println("Namespace ID not specified for", schemaID) return nil } - req.NamespaceId = namespaceID - req.SchemaId = schemaID if versionID != 0 { req.Version = &stencilv1beta1.SearchRequest_VersionId{ @@ -68,12 +69,12 @@ func SearchCmd(cdk *CDK) *cobra.Command { } } - res, err := client.Search(context.Background(), &req) + res, err := client.Search(context.Background(), connect.NewRequest(req)) if err != nil { return err } - hits := res.GetHits() + hits := res.Msg.GetHits() report := [][]string{} s.Stop() diff --git a/config/config.go b/config/config.go index 157e56c4..d3f50b91 100644 --- a/config/config.go +++ b/config/config.go @@ -2,31 +2,24 @@ package config import "time" -// NewRelicConfig contains the New Relic go-agent configuration -type NewRelicConfig struct { - Enabled bool `default:"false"` - AppName string `default:"stencil"` - License string -} - // DBConfig contains DB connection details type DBConfig struct { ConnectionString string } -// GRPCConfig grpc options -type GRPCConfig struct { - MaxRecvMsgSizeInMB int `default:"10"` - MaxSendMsgSizeInMB int `default:"10"` +// CORSConfig contains CORS configuration +type CORSConfig struct { + AllowedOrigins []string `default:"[\"*\"]"` } // Config Server config type Config struct { Port string `default:"8080"` // Timeout represents graceful shutdown period. Defaults to 60 seconds. - Timeout time.Duration `default:"60s"` - CacheSizeInMB int64 `default:"100"` - GRPC GRPCConfig - NewRelic NewRelicConfig - DB DBConfig + Timeout time.Duration `default:"60s"` + CacheSizeInMB int64 `default:"100"` + MaxRecvMsgSize int `default:"10485760"` // 10 MB + MaxSendMsgSize int `default:"10485760"` // 10 MB + CORS CORSConfig + DB DBConfig } diff --git a/formats/avro/provider.go b/formats/avro/provider.go index e6fae6fd..bb943055 100644 --- a/formats/avro/provider.go +++ b/formats/avro/provider.go @@ -1,9 +1,7 @@ package avro import ( - "net/http" - - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "connectrpc.com/connect" av "github.com/hamba/avro" "github.com/raystack/stencil/core/schema" ) @@ -12,7 +10,7 @@ import ( func ParseSchema(data []byte) (schema.ParsedSchema, error) { sc, err := av.Parse(string(data)) if err != nil { - return nil, &runtime.HTTPStatusError{HTTPStatus: http.StatusBadRequest, Err: err} + return nil, connect.NewError(connect.CodeInvalidArgument, err) } return &Schema{sc: sc, data: data}, nil } diff --git a/formats/avro/schema.go b/formats/avro/schema.go index ce479681..0130c2ac 100644 --- a/formats/avro/schema.go +++ b/formats/avro/schema.go @@ -3,8 +3,8 @@ package avro import ( "fmt" + "connectrpc.com/connect" "github.com/google/uuid" - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" av "github.com/hamba/avro" "github.com/raystack/stencil/core/schema" "go.uber.org/multierr" @@ -35,7 +35,7 @@ func (s *Schema) verify(against schema.ParsedSchema) (*Schema, error) { if s.Format() == against.Format() && ok { return prev, nil } - return nil, &runtime.HTTPStatusError{HTTPStatus: 400, Err: fmt.Errorf("current and prev schema formats(%s, %s) are different", s.Format(), against.Format())} + return nil, connect.NewError(connect.CodeInvalidArgument, fmt.Errorf("current and prev schema formats(%s, %s) are different", s.Format(), against.Format())) } // IsBackwardCompatible checks backward compatibility against given schema diff --git a/formats/json/provider.go b/formats/json/provider.go index bed0982a..28b461e0 100644 --- a/formats/json/provider.go +++ b/formats/json/provider.go @@ -2,9 +2,8 @@ package json import ( js "encoding/json" - "net/http" - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "connectrpc.com/connect" "github.com/raystack/stencil/core/schema" "github.com/santhosh-tekuri/jsonschema/v5" ) @@ -15,10 +14,10 @@ func GetParsedSchema(data []byte) (schema.ParsedSchema, error) { sc, _ := compiler.Compile("https://json-schema.org/draft/2020-12/schema") var val interface{} if err := js.Unmarshal(data, &val); err != nil { - return nil, &runtime.HTTPStatusError{HTTPStatus: http.StatusBadRequest, Err: err} + return nil, connect.NewError(connect.CodeInvalidArgument, err) } if err := sc.Validate(val); err != nil { - return nil, &runtime.HTTPStatusError{HTTPStatus: http.StatusBadRequest, Err: err} + return nil, connect.NewError(connect.CodeInvalidArgument, err) } return &Schema{data: data}, nil } diff --git a/formats/protobuf/error.go b/formats/protobuf/error.go index 909c0050..1dbf3a46 100644 --- a/formats/protobuf/error.go +++ b/formats/protobuf/error.go @@ -4,8 +4,7 @@ import ( "fmt" "strings" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" + "connectrpc.com/connect" "google.golang.org/protobuf/reflect/protoreflect" ) @@ -39,6 +38,6 @@ func (c *compatibilityErr) Error() string { return strings.Join(msgs, ";") } -func (c *compatibilityErr) GRPCStatus() *status.Status { - return status.New(codes.InvalidArgument, c.Error()) +func (c *compatibilityErr) ConnectError() *connect.Error { + return connect.NewError(connect.CodeInvalidArgument, c) } diff --git a/gen/raystack/stencil/v1beta1/stencil.pb.go b/gen/raystack/stencil/v1beta1/stencil.pb.go new file mode 100644 index 00000000..4e436856 --- /dev/null +++ b/gen/raystack/stencil/v1beta1/stencil.pb.go @@ -0,0 +1,2482 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc (unknown) +// source: raystack/stencil/v1beta1/stencil.proto + +package stencilv1beta1 + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Schema_Format int32 + +const ( + Schema_FORMAT_UNSPECIFIED Schema_Format = 0 + Schema_FORMAT_PROTOBUF Schema_Format = 1 + Schema_FORMAT_AVRO Schema_Format = 2 + Schema_FORMAT_JSON Schema_Format = 3 +) + +// Enum value maps for Schema_Format. +var ( + Schema_Format_name = map[int32]string{ + 0: "FORMAT_UNSPECIFIED", + 1: "FORMAT_PROTOBUF", + 2: "FORMAT_AVRO", + 3: "FORMAT_JSON", + } + Schema_Format_value = map[string]int32{ + "FORMAT_UNSPECIFIED": 0, + "FORMAT_PROTOBUF": 1, + "FORMAT_AVRO": 2, + "FORMAT_JSON": 3, + } +) + +func (x Schema_Format) Enum() *Schema_Format { + p := new(Schema_Format) + *p = x + return p +} + +func (x Schema_Format) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Schema_Format) Descriptor() protoreflect.EnumDescriptor { + return file_raystack_stencil_v1beta1_stencil_proto_enumTypes[0].Descriptor() +} + +func (Schema_Format) Type() protoreflect.EnumType { + return &file_raystack_stencil_v1beta1_stencil_proto_enumTypes[0] +} + +func (x Schema_Format) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Schema_Format.Descriptor instead. +func (Schema_Format) EnumDescriptor() ([]byte, []int) { + return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{1, 0} +} + +type Schema_Compatibility int32 + +const ( + Schema_COMPATIBILITY_UNSPECIFIED Schema_Compatibility = 0 + Schema_COMPATIBILITY_BACKWARD Schema_Compatibility = 1 + Schema_COMPATIBILITY_BACKWARD_TRANSITIVE Schema_Compatibility = 2 + Schema_COMPATIBILITY_FORWARD Schema_Compatibility = 3 + Schema_COMPATIBILITY_FORWARD_TRANSITIVE Schema_Compatibility = 4 + Schema_COMPATIBILITY_FULL Schema_Compatibility = 5 + Schema_COMPATIBILITY_FULL_TRANSITIVE Schema_Compatibility = 6 +) + +// Enum value maps for Schema_Compatibility. +var ( + Schema_Compatibility_name = map[int32]string{ + 0: "COMPATIBILITY_UNSPECIFIED", + 1: "COMPATIBILITY_BACKWARD", + 2: "COMPATIBILITY_BACKWARD_TRANSITIVE", + 3: "COMPATIBILITY_FORWARD", + 4: "COMPATIBILITY_FORWARD_TRANSITIVE", + 5: "COMPATIBILITY_FULL", + 6: "COMPATIBILITY_FULL_TRANSITIVE", + } + Schema_Compatibility_value = map[string]int32{ + "COMPATIBILITY_UNSPECIFIED": 0, + "COMPATIBILITY_BACKWARD": 1, + "COMPATIBILITY_BACKWARD_TRANSITIVE": 2, + "COMPATIBILITY_FORWARD": 3, + "COMPATIBILITY_FORWARD_TRANSITIVE": 4, + "COMPATIBILITY_FULL": 5, + "COMPATIBILITY_FULL_TRANSITIVE": 6, + } +) + +func (x Schema_Compatibility) Enum() *Schema_Compatibility { + p := new(Schema_Compatibility) + *p = x + return p +} + +func (x Schema_Compatibility) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Schema_Compatibility) Descriptor() protoreflect.EnumDescriptor { + return file_raystack_stencil_v1beta1_stencil_proto_enumTypes[1].Descriptor() +} + +func (Schema_Compatibility) Type() protoreflect.EnumType { + return &file_raystack_stencil_v1beta1_stencil_proto_enumTypes[1] +} + +func (x Schema_Compatibility) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use Schema_Compatibility.Descriptor instead. +func (Schema_Compatibility) EnumDescriptor() ([]byte, []int) { + return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{1, 1} +} + +type Namespace struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Format Schema_Format `protobuf:"varint,2,opt,name=format,proto3,enum=raystack.stencil.v1beta1.Schema_Format" json:"format,omitempty"` + Compatibility Schema_Compatibility `protobuf:"varint,3,opt,name=compatibility,proto3,enum=raystack.stencil.v1beta1.Schema_Compatibility" json:"compatibility,omitempty"` + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Namespace) Reset() { + *x = Namespace{} + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Namespace) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Namespace) ProtoMessage() {} + +func (x *Namespace) ProtoReflect() protoreflect.Message { + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Namespace.ProtoReflect.Descriptor instead. +func (*Namespace) Descriptor() ([]byte, []int) { + return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{0} +} + +func (x *Namespace) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Namespace) GetFormat() Schema_Format { + if x != nil { + return x.Format + } + return Schema_FORMAT_UNSPECIFIED +} + +func (x *Namespace) GetCompatibility() Schema_Compatibility { + if x != nil { + return x.Compatibility + } + return Schema_COMPATIBILITY_UNSPECIFIED +} + +func (x *Namespace) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *Namespace) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Namespace) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +type Schema struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Format Schema_Format `protobuf:"varint,2,opt,name=format,proto3,enum=raystack.stencil.v1beta1.Schema_Format" json:"format,omitempty"` + Authority string `protobuf:"bytes,3,opt,name=authority,proto3" json:"authority,omitempty"` + Compatibility Schema_Compatibility `protobuf:"varint,4,opt,name=compatibility,proto3,enum=raystack.stencil.v1beta1.Schema_Compatibility" json:"compatibility,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Schema) Reset() { + *x = Schema{} + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Schema) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Schema) ProtoMessage() {} + +func (x *Schema) ProtoReflect() protoreflect.Message { + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Schema.ProtoReflect.Descriptor instead. +func (*Schema) Descriptor() ([]byte, []int) { + return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{1} +} + +func (x *Schema) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Schema) GetFormat() Schema_Format { + if x != nil { + return x.Format + } + return Schema_FORMAT_UNSPECIFIED +} + +func (x *Schema) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *Schema) GetCompatibility() Schema_Compatibility { + if x != nil { + return x.Compatibility + } + return Schema_COMPATIBILITY_UNSPECIFIED +} + +func (x *Schema) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *Schema) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +type ListNamespacesRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListNamespacesRequest) Reset() { + *x = ListNamespacesRequest{} + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListNamespacesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListNamespacesRequest) ProtoMessage() {} + +func (x *ListNamespacesRequest) ProtoReflect() protoreflect.Message { + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListNamespacesRequest.ProtoReflect.Descriptor instead. +func (*ListNamespacesRequest) Descriptor() ([]byte, []int) { + return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{2} +} + +type ListNamespacesResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Namespaces []*Namespace `protobuf:"bytes,1,rep,name=namespaces,proto3" json:"namespaces,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListNamespacesResponse) Reset() { + *x = ListNamespacesResponse{} + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListNamespacesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListNamespacesResponse) ProtoMessage() {} + +func (x *ListNamespacesResponse) ProtoReflect() protoreflect.Message { + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListNamespacesResponse.ProtoReflect.Descriptor instead. +func (*ListNamespacesResponse) Descriptor() ([]byte, []int) { + return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{3} +} + +func (x *ListNamespacesResponse) GetNamespaces() []*Namespace { + if x != nil { + return x.Namespaces + } + return nil +} + +type GetNamespaceRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetNamespaceRequest) Reset() { + *x = GetNamespaceRequest{} + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetNamespaceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNamespaceRequest) ProtoMessage() {} + +func (x *GetNamespaceRequest) ProtoReflect() protoreflect.Message { + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetNamespaceRequest.ProtoReflect.Descriptor instead. +func (*GetNamespaceRequest) Descriptor() ([]byte, []int) { + return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{4} +} + +func (x *GetNamespaceRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetNamespaceResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Namespace *Namespace `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetNamespaceResponse) Reset() { + *x = GetNamespaceResponse{} + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetNamespaceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNamespaceResponse) ProtoMessage() {} + +func (x *GetNamespaceResponse) ProtoReflect() protoreflect.Message { + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetNamespaceResponse.ProtoReflect.Descriptor instead. +func (*GetNamespaceResponse) Descriptor() ([]byte, []int) { + return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{5} +} + +func (x *GetNamespaceResponse) GetNamespace() *Namespace { + if x != nil { + return x.Namespace + } + return nil +} + +type CreateNamespaceRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Format Schema_Format `protobuf:"varint,2,opt,name=format,proto3,enum=raystack.stencil.v1beta1.Schema_Format" json:"format,omitempty"` + Compatibility Schema_Compatibility `protobuf:"varint,3,opt,name=compatibility,proto3,enum=raystack.stencil.v1beta1.Schema_Compatibility" json:"compatibility,omitempty"` + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateNamespaceRequest) Reset() { + *x = CreateNamespaceRequest{} + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateNamespaceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateNamespaceRequest) ProtoMessage() {} + +func (x *CreateNamespaceRequest) ProtoReflect() protoreflect.Message { + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateNamespaceRequest.ProtoReflect.Descriptor instead. +func (*CreateNamespaceRequest) Descriptor() ([]byte, []int) { + return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{6} +} + +func (x *CreateNamespaceRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *CreateNamespaceRequest) GetFormat() Schema_Format { + if x != nil { + return x.Format + } + return Schema_FORMAT_UNSPECIFIED +} + +func (x *CreateNamespaceRequest) GetCompatibility() Schema_Compatibility { + if x != nil { + return x.Compatibility + } + return Schema_COMPATIBILITY_UNSPECIFIED +} + +func (x *CreateNamespaceRequest) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +type CreateNamespaceResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Namespace *Namespace `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateNamespaceResponse) Reset() { + *x = CreateNamespaceResponse{} + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateNamespaceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateNamespaceResponse) ProtoMessage() {} + +func (x *CreateNamespaceResponse) ProtoReflect() protoreflect.Message { + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateNamespaceResponse.ProtoReflect.Descriptor instead. +func (*CreateNamespaceResponse) Descriptor() ([]byte, []int) { + return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{7} +} + +func (x *CreateNamespaceResponse) GetNamespace() *Namespace { + if x != nil { + return x.Namespace + } + return nil +} + +type UpdateNamespaceRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Format Schema_Format `protobuf:"varint,2,opt,name=format,proto3,enum=raystack.stencil.v1beta1.Schema_Format" json:"format,omitempty"` + Compatibility Schema_Compatibility `protobuf:"varint,3,opt,name=compatibility,proto3,enum=raystack.stencil.v1beta1.Schema_Compatibility" json:"compatibility,omitempty"` + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateNamespaceRequest) Reset() { + *x = UpdateNamespaceRequest{} + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateNamespaceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateNamespaceRequest) ProtoMessage() {} + +func (x *UpdateNamespaceRequest) ProtoReflect() protoreflect.Message { + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateNamespaceRequest.ProtoReflect.Descriptor instead. +func (*UpdateNamespaceRequest) Descriptor() ([]byte, []int) { + return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{8} +} + +func (x *UpdateNamespaceRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *UpdateNamespaceRequest) GetFormat() Schema_Format { + if x != nil { + return x.Format + } + return Schema_FORMAT_UNSPECIFIED +} + +func (x *UpdateNamespaceRequest) GetCompatibility() Schema_Compatibility { + if x != nil { + return x.Compatibility + } + return Schema_COMPATIBILITY_UNSPECIFIED +} + +func (x *UpdateNamespaceRequest) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +type UpdateNamespaceResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Namespace *Namespace `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateNamespaceResponse) Reset() { + *x = UpdateNamespaceResponse{} + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateNamespaceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateNamespaceResponse) ProtoMessage() {} + +func (x *UpdateNamespaceResponse) ProtoReflect() protoreflect.Message { + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateNamespaceResponse.ProtoReflect.Descriptor instead. +func (*UpdateNamespaceResponse) Descriptor() ([]byte, []int) { + return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{9} +} + +func (x *UpdateNamespaceResponse) GetNamespace() *Namespace { + if x != nil { + return x.Namespace + } + return nil +} + +type DeleteNamespaceRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteNamespaceRequest) Reset() { + *x = DeleteNamespaceRequest{} + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteNamespaceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteNamespaceRequest) ProtoMessage() {} + +func (x *DeleteNamespaceRequest) ProtoReflect() protoreflect.Message { + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteNamespaceRequest.ProtoReflect.Descriptor instead. +func (*DeleteNamespaceRequest) Descriptor() ([]byte, []int) { + return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{10} +} + +func (x *DeleteNamespaceRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type DeleteNamespaceResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteNamespaceResponse) Reset() { + *x = DeleteNamespaceResponse{} + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteNamespaceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteNamespaceResponse) ProtoMessage() {} + +func (x *DeleteNamespaceResponse) ProtoReflect() protoreflect.Message { + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteNamespaceResponse.ProtoReflect.Descriptor instead. +func (*DeleteNamespaceResponse) Descriptor() ([]byte, []int) { + return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{11} +} + +func (x *DeleteNamespaceResponse) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +type ListSchemasRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListSchemasRequest) Reset() { + *x = ListSchemasRequest{} + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListSchemasRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSchemasRequest) ProtoMessage() {} + +func (x *ListSchemasRequest) ProtoReflect() protoreflect.Message { + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListSchemasRequest.ProtoReflect.Descriptor instead. +func (*ListSchemasRequest) Descriptor() ([]byte, []int) { + return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{12} +} + +func (x *ListSchemasRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type ListSchemasResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Schemas []*Schema `protobuf:"bytes,1,rep,name=schemas,proto3" json:"schemas,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListSchemasResponse) Reset() { + *x = ListSchemasResponse{} + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListSchemasResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSchemasResponse) ProtoMessage() {} + +func (x *ListSchemasResponse) ProtoReflect() protoreflect.Message { + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListSchemasResponse.ProtoReflect.Descriptor instead. +func (*ListSchemasResponse) Descriptor() ([]byte, []int) { + return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{13} +} + +func (x *ListSchemasResponse) GetSchemas() []*Schema { + if x != nil { + return x.Schemas + } + return nil +} + +type GetLatestSchemaRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` + SchemaId string `protobuf:"bytes,2,opt,name=schema_id,json=schemaId,proto3" json:"schema_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetLatestSchemaRequest) Reset() { + *x = GetLatestSchemaRequest{} + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetLatestSchemaRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetLatestSchemaRequest) ProtoMessage() {} + +func (x *GetLatestSchemaRequest) ProtoReflect() protoreflect.Message { + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetLatestSchemaRequest.ProtoReflect.Descriptor instead. +func (*GetLatestSchemaRequest) Descriptor() ([]byte, []int) { + return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{14} +} + +func (x *GetLatestSchemaRequest) GetNamespaceId() string { + if x != nil { + return x.NamespaceId + } + return "" +} + +func (x *GetLatestSchemaRequest) GetSchemaId() string { + if x != nil { + return x.SchemaId + } + return "" +} + +type GetLatestSchemaResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetLatestSchemaResponse) Reset() { + *x = GetLatestSchemaResponse{} + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetLatestSchemaResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetLatestSchemaResponse) ProtoMessage() {} + +func (x *GetLatestSchemaResponse) ProtoReflect() protoreflect.Message { + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetLatestSchemaResponse.ProtoReflect.Descriptor instead. +func (*GetLatestSchemaResponse) Descriptor() ([]byte, []int) { + return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{15} +} + +func (x *GetLatestSchemaResponse) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +type CreateSchemaRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` + SchemaId string `protobuf:"bytes,2,opt,name=schema_id,json=schemaId,proto3" json:"schema_id,omitempty"` + Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + Format Schema_Format `protobuf:"varint,4,opt,name=format,proto3,enum=raystack.stencil.v1beta1.Schema_Format" json:"format,omitempty"` + Compatibility Schema_Compatibility `protobuf:"varint,5,opt,name=compatibility,proto3,enum=raystack.stencil.v1beta1.Schema_Compatibility" json:"compatibility,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateSchemaRequest) Reset() { + *x = CreateSchemaRequest{} + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateSchemaRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateSchemaRequest) ProtoMessage() {} + +func (x *CreateSchemaRequest) ProtoReflect() protoreflect.Message { + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateSchemaRequest.ProtoReflect.Descriptor instead. +func (*CreateSchemaRequest) Descriptor() ([]byte, []int) { + return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{16} +} + +func (x *CreateSchemaRequest) GetNamespaceId() string { + if x != nil { + return x.NamespaceId + } + return "" +} + +func (x *CreateSchemaRequest) GetSchemaId() string { + if x != nil { + return x.SchemaId + } + return "" +} + +func (x *CreateSchemaRequest) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +func (x *CreateSchemaRequest) GetFormat() Schema_Format { + if x != nil { + return x.Format + } + return Schema_FORMAT_UNSPECIFIED +} + +func (x *CreateSchemaRequest) GetCompatibility() Schema_Compatibility { + if x != nil { + return x.Compatibility + } + return Schema_COMPATIBILITY_UNSPECIFIED +} + +type CreateSchemaResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Version int32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + Location string `protobuf:"bytes,3,opt,name=location,proto3" json:"location,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CreateSchemaResponse) Reset() { + *x = CreateSchemaResponse{} + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CreateSchemaResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateSchemaResponse) ProtoMessage() {} + +func (x *CreateSchemaResponse) ProtoReflect() protoreflect.Message { + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateSchemaResponse.ProtoReflect.Descriptor instead. +func (*CreateSchemaResponse) Descriptor() ([]byte, []int) { + return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{17} +} + +func (x *CreateSchemaResponse) GetVersion() int32 { + if x != nil { + return x.Version + } + return 0 +} + +func (x *CreateSchemaResponse) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *CreateSchemaResponse) GetLocation() string { + if x != nil { + return x.Location + } + return "" +} + +type CheckCompatibilityRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` + SchemaId string `protobuf:"bytes,2,opt,name=schema_id,json=schemaId,proto3" json:"schema_id,omitempty"` + Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + Compatibility Schema_Compatibility `protobuf:"varint,4,opt,name=compatibility,proto3,enum=raystack.stencil.v1beta1.Schema_Compatibility" json:"compatibility,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CheckCompatibilityRequest) Reset() { + *x = CheckCompatibilityRequest{} + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CheckCompatibilityRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckCompatibilityRequest) ProtoMessage() {} + +func (x *CheckCompatibilityRequest) ProtoReflect() protoreflect.Message { + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckCompatibilityRequest.ProtoReflect.Descriptor instead. +func (*CheckCompatibilityRequest) Descriptor() ([]byte, []int) { + return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{18} +} + +func (x *CheckCompatibilityRequest) GetNamespaceId() string { + if x != nil { + return x.NamespaceId + } + return "" +} + +func (x *CheckCompatibilityRequest) GetSchemaId() string { + if x != nil { + return x.SchemaId + } + return "" +} + +func (x *CheckCompatibilityRequest) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +func (x *CheckCompatibilityRequest) GetCompatibility() Schema_Compatibility { + if x != nil { + return x.Compatibility + } + return Schema_COMPATIBILITY_UNSPECIFIED +} + +type CheckCompatibilityResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CheckCompatibilityResponse) Reset() { + *x = CheckCompatibilityResponse{} + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CheckCompatibilityResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckCompatibilityResponse) ProtoMessage() {} + +func (x *CheckCompatibilityResponse) ProtoReflect() protoreflect.Message { + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CheckCompatibilityResponse.ProtoReflect.Descriptor instead. +func (*CheckCompatibilityResponse) Descriptor() ([]byte, []int) { + return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{19} +} + +type GetSchemaMetadataRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` + SchemaId string `protobuf:"bytes,2,opt,name=schema_id,json=schemaId,proto3" json:"schema_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetSchemaMetadataRequest) Reset() { + *x = GetSchemaMetadataRequest{} + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetSchemaMetadataRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSchemaMetadataRequest) ProtoMessage() {} + +func (x *GetSchemaMetadataRequest) ProtoReflect() protoreflect.Message { + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSchemaMetadataRequest.ProtoReflect.Descriptor instead. +func (*GetSchemaMetadataRequest) Descriptor() ([]byte, []int) { + return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{20} +} + +func (x *GetSchemaMetadataRequest) GetNamespaceId() string { + if x != nil { + return x.NamespaceId + } + return "" +} + +func (x *GetSchemaMetadataRequest) GetSchemaId() string { + if x != nil { + return x.SchemaId + } + return "" +} + +type GetSchemaMetadataResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Format Schema_Format `protobuf:"varint,1,opt,name=format,proto3,enum=raystack.stencil.v1beta1.Schema_Format" json:"format,omitempty"` + Compatibility Schema_Compatibility `protobuf:"varint,2,opt,name=compatibility,proto3,enum=raystack.stencil.v1beta1.Schema_Compatibility" json:"compatibility,omitempty"` + Authority string `protobuf:"bytes,3,opt,name=authority,proto3" json:"authority,omitempty"` + Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetSchemaMetadataResponse) Reset() { + *x = GetSchemaMetadataResponse{} + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetSchemaMetadataResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSchemaMetadataResponse) ProtoMessage() {} + +func (x *GetSchemaMetadataResponse) ProtoReflect() protoreflect.Message { + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSchemaMetadataResponse.ProtoReflect.Descriptor instead. +func (*GetSchemaMetadataResponse) Descriptor() ([]byte, []int) { + return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{21} +} + +func (x *GetSchemaMetadataResponse) GetFormat() Schema_Format { + if x != nil { + return x.Format + } + return Schema_FORMAT_UNSPECIFIED +} + +func (x *GetSchemaMetadataResponse) GetCompatibility() Schema_Compatibility { + if x != nil { + return x.Compatibility + } + return Schema_COMPATIBILITY_UNSPECIFIED +} + +func (x *GetSchemaMetadataResponse) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *GetSchemaMetadataResponse) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GetSchemaMetadataResponse) GetCreatedAt() *timestamppb.Timestamp { + if x != nil { + return x.CreatedAt + } + return nil +} + +func (x *GetSchemaMetadataResponse) GetUpdatedAt() *timestamppb.Timestamp { + if x != nil { + return x.UpdatedAt + } + return nil +} + +type UpdateSchemaMetadataRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` + SchemaId string `protobuf:"bytes,2,opt,name=schema_id,json=schemaId,proto3" json:"schema_id,omitempty"` + Compatibility Schema_Compatibility `protobuf:"varint,3,opt,name=compatibility,proto3,enum=raystack.stencil.v1beta1.Schema_Compatibility" json:"compatibility,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateSchemaMetadataRequest) Reset() { + *x = UpdateSchemaMetadataRequest{} + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateSchemaMetadataRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateSchemaMetadataRequest) ProtoMessage() {} + +func (x *UpdateSchemaMetadataRequest) ProtoReflect() protoreflect.Message { + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateSchemaMetadataRequest.ProtoReflect.Descriptor instead. +func (*UpdateSchemaMetadataRequest) Descriptor() ([]byte, []int) { + return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{22} +} + +func (x *UpdateSchemaMetadataRequest) GetNamespaceId() string { + if x != nil { + return x.NamespaceId + } + return "" +} + +func (x *UpdateSchemaMetadataRequest) GetSchemaId() string { + if x != nil { + return x.SchemaId + } + return "" +} + +func (x *UpdateSchemaMetadataRequest) GetCompatibility() Schema_Compatibility { + if x != nil { + return x.Compatibility + } + return Schema_COMPATIBILITY_UNSPECIFIED +} + +type UpdateSchemaMetadataResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Format Schema_Format `protobuf:"varint,1,opt,name=format,proto3,enum=raystack.stencil.v1beta1.Schema_Format" json:"format,omitempty"` + Compatibility Schema_Compatibility `protobuf:"varint,2,opt,name=compatibility,proto3,enum=raystack.stencil.v1beta1.Schema_Compatibility" json:"compatibility,omitempty"` + Authority string `protobuf:"bytes,3,opt,name=authority,proto3" json:"authority,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateSchemaMetadataResponse) Reset() { + *x = UpdateSchemaMetadataResponse{} + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateSchemaMetadataResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateSchemaMetadataResponse) ProtoMessage() {} + +func (x *UpdateSchemaMetadataResponse) ProtoReflect() protoreflect.Message { + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateSchemaMetadataResponse.ProtoReflect.Descriptor instead. +func (*UpdateSchemaMetadataResponse) Descriptor() ([]byte, []int) { + return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{23} +} + +func (x *UpdateSchemaMetadataResponse) GetFormat() Schema_Format { + if x != nil { + return x.Format + } + return Schema_FORMAT_UNSPECIFIED +} + +func (x *UpdateSchemaMetadataResponse) GetCompatibility() Schema_Compatibility { + if x != nil { + return x.Compatibility + } + return Schema_COMPATIBILITY_UNSPECIFIED +} + +func (x *UpdateSchemaMetadataResponse) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +type DeleteSchemaRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` + SchemaId string `protobuf:"bytes,2,opt,name=schema_id,json=schemaId,proto3" json:"schema_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteSchemaRequest) Reset() { + *x = DeleteSchemaRequest{} + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteSchemaRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteSchemaRequest) ProtoMessage() {} + +func (x *DeleteSchemaRequest) ProtoReflect() protoreflect.Message { + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteSchemaRequest.ProtoReflect.Descriptor instead. +func (*DeleteSchemaRequest) Descriptor() ([]byte, []int) { + return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{24} +} + +func (x *DeleteSchemaRequest) GetNamespaceId() string { + if x != nil { + return x.NamespaceId + } + return "" +} + +func (x *DeleteSchemaRequest) GetSchemaId() string { + if x != nil { + return x.SchemaId + } + return "" +} + +type DeleteSchemaResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteSchemaResponse) Reset() { + *x = DeleteSchemaResponse{} + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteSchemaResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteSchemaResponse) ProtoMessage() {} + +func (x *DeleteSchemaResponse) ProtoReflect() protoreflect.Message { + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteSchemaResponse.ProtoReflect.Descriptor instead. +func (*DeleteSchemaResponse) Descriptor() ([]byte, []int) { + return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{25} +} + +func (x *DeleteSchemaResponse) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +type ListVersionsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` + SchemaId string `protobuf:"bytes,2,opt,name=schema_id,json=schemaId,proto3" json:"schema_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListVersionsRequest) Reset() { + *x = ListVersionsRequest{} + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListVersionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListVersionsRequest) ProtoMessage() {} + +func (x *ListVersionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListVersionsRequest.ProtoReflect.Descriptor instead. +func (*ListVersionsRequest) Descriptor() ([]byte, []int) { + return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{26} +} + +func (x *ListVersionsRequest) GetNamespaceId() string { + if x != nil { + return x.NamespaceId + } + return "" +} + +func (x *ListVersionsRequest) GetSchemaId() string { + if x != nil { + return x.SchemaId + } + return "" +} + +type ListVersionsResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Versions []int32 `protobuf:"varint,1,rep,packed,name=versions,proto3" json:"versions,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ListVersionsResponse) Reset() { + *x = ListVersionsResponse{} + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ListVersionsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListVersionsResponse) ProtoMessage() {} + +func (x *ListVersionsResponse) ProtoReflect() protoreflect.Message { + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListVersionsResponse.ProtoReflect.Descriptor instead. +func (*ListVersionsResponse) Descriptor() ([]byte, []int) { + return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{27} +} + +func (x *ListVersionsResponse) GetVersions() []int32 { + if x != nil { + return x.Versions + } + return nil +} + +type GetSchemaRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` + SchemaId string `protobuf:"bytes,2,opt,name=schema_id,json=schemaId,proto3" json:"schema_id,omitempty"` + VersionId int32 `protobuf:"varint,3,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetSchemaRequest) Reset() { + *x = GetSchemaRequest{} + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetSchemaRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSchemaRequest) ProtoMessage() {} + +func (x *GetSchemaRequest) ProtoReflect() protoreflect.Message { + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSchemaRequest.ProtoReflect.Descriptor instead. +func (*GetSchemaRequest) Descriptor() ([]byte, []int) { + return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{28} +} + +func (x *GetSchemaRequest) GetNamespaceId() string { + if x != nil { + return x.NamespaceId + } + return "" +} + +func (x *GetSchemaRequest) GetSchemaId() string { + if x != nil { + return x.SchemaId + } + return "" +} + +func (x *GetSchemaRequest) GetVersionId() int32 { + if x != nil { + return x.VersionId + } + return 0 +} + +type GetSchemaResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetSchemaResponse) Reset() { + *x = GetSchemaResponse{} + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetSchemaResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSchemaResponse) ProtoMessage() {} + +func (x *GetSchemaResponse) ProtoReflect() protoreflect.Message { + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[29] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSchemaResponse.ProtoReflect.Descriptor instead. +func (*GetSchemaResponse) Descriptor() ([]byte, []int) { + return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{29} +} + +func (x *GetSchemaResponse) GetData() []byte { + if x != nil { + return x.Data + } + return nil +} + +type DeleteVersionRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` + SchemaId string `protobuf:"bytes,2,opt,name=schema_id,json=schemaId,proto3" json:"schema_id,omitempty"` + VersionId int32 `protobuf:"varint,3,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteVersionRequest) Reset() { + *x = DeleteVersionRequest{} + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteVersionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteVersionRequest) ProtoMessage() {} + +func (x *DeleteVersionRequest) ProtoReflect() protoreflect.Message { + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[30] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteVersionRequest.ProtoReflect.Descriptor instead. +func (*DeleteVersionRequest) Descriptor() ([]byte, []int) { + return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{30} +} + +func (x *DeleteVersionRequest) GetNamespaceId() string { + if x != nil { + return x.NamespaceId + } + return "" +} + +func (x *DeleteVersionRequest) GetSchemaId() string { + if x != nil { + return x.SchemaId + } + return "" +} + +func (x *DeleteVersionRequest) GetVersionId() int32 { + if x != nil { + return x.VersionId + } + return 0 +} + +type DeleteVersionResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DeleteVersionResponse) Reset() { + *x = DeleteVersionResponse{} + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DeleteVersionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteVersionResponse) ProtoMessage() {} + +func (x *DeleteVersionResponse) ProtoReflect() protoreflect.Message { + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[31] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteVersionResponse.ProtoReflect.Descriptor instead. +func (*DeleteVersionResponse) Descriptor() ([]byte, []int) { + return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{31} +} + +func (x *DeleteVersionResponse) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +type SearchRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` + SchemaId string `protobuf:"bytes,2,opt,name=schema_id,json=schemaId,proto3" json:"schema_id,omitempty"` + Query string `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"` + // Types that are valid to be assigned to Version: + // + // *SearchRequest_History + // *SearchRequest_VersionId + Version isSearchRequest_Version `protobuf_oneof:"version"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SearchRequest) Reset() { + *x = SearchRequest{} + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SearchRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SearchRequest) ProtoMessage() {} + +func (x *SearchRequest) ProtoReflect() protoreflect.Message { + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[32] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead. +func (*SearchRequest) Descriptor() ([]byte, []int) { + return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{32} +} + +func (x *SearchRequest) GetNamespaceId() string { + if x != nil { + return x.NamespaceId + } + return "" +} + +func (x *SearchRequest) GetSchemaId() string { + if x != nil { + return x.SchemaId + } + return "" +} + +func (x *SearchRequest) GetQuery() string { + if x != nil { + return x.Query + } + return "" +} + +func (x *SearchRequest) GetVersion() isSearchRequest_Version { + if x != nil { + return x.Version + } + return nil +} + +func (x *SearchRequest) GetHistory() bool { + if x != nil { + if x, ok := x.Version.(*SearchRequest_History); ok { + return x.History + } + } + return false +} + +func (x *SearchRequest) GetVersionId() int32 { + if x != nil { + if x, ok := x.Version.(*SearchRequest_VersionId); ok { + return x.VersionId + } + } + return 0 +} + +type isSearchRequest_Version interface { + isSearchRequest_Version() +} + +type SearchRequest_History struct { + History bool `protobuf:"varint,4,opt,name=history,proto3,oneof"` +} + +type SearchRequest_VersionId struct { + VersionId int32 `protobuf:"varint,5,opt,name=version_id,json=versionId,proto3,oneof"` +} + +func (*SearchRequest_History) isSearchRequest_Version() {} + +func (*SearchRequest_VersionId) isSearchRequest_Version() {} + +type SearchResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Hits []*SearchHits `protobuf:"bytes,1,rep,name=hits,proto3" json:"hits,omitempty"` + Meta *SearchMeta `protobuf:"bytes,2,opt,name=meta,proto3" json:"meta,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SearchResponse) Reset() { + *x = SearchResponse{} + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SearchResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SearchResponse) ProtoMessage() {} + +func (x *SearchResponse) ProtoReflect() protoreflect.Message { + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[33] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SearchResponse.ProtoReflect.Descriptor instead. +func (*SearchResponse) Descriptor() ([]byte, []int) { + return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{33} +} + +func (x *SearchResponse) GetHits() []*SearchHits { + if x != nil { + return x.Hits + } + return nil +} + +func (x *SearchResponse) GetMeta() *SearchMeta { + if x != nil { + return x.Meta + } + return nil +} + +type SearchHits struct { + state protoimpl.MessageState `protogen:"open.v1"` + NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` + SchemaId string `protobuf:"bytes,2,opt,name=schema_id,json=schemaId,proto3" json:"schema_id,omitempty"` + VersionId int32 `protobuf:"varint,3,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` + Fields []string `protobuf:"bytes,4,rep,name=fields,proto3" json:"fields,omitempty"` + Types []string `protobuf:"bytes,5,rep,name=types,proto3" json:"types,omitempty"` + Path string `protobuf:"bytes,6,opt,name=path,proto3" json:"path,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SearchHits) Reset() { + *x = SearchHits{} + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[34] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SearchHits) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SearchHits) ProtoMessage() {} + +func (x *SearchHits) ProtoReflect() protoreflect.Message { + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[34] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SearchHits.ProtoReflect.Descriptor instead. +func (*SearchHits) Descriptor() ([]byte, []int) { + return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{34} +} + +func (x *SearchHits) GetNamespaceId() string { + if x != nil { + return x.NamespaceId + } + return "" +} + +func (x *SearchHits) GetSchemaId() string { + if x != nil { + return x.SchemaId + } + return "" +} + +func (x *SearchHits) GetVersionId() int32 { + if x != nil { + return x.VersionId + } + return 0 +} + +func (x *SearchHits) GetFields() []string { + if x != nil { + return x.Fields + } + return nil +} + +func (x *SearchHits) GetTypes() []string { + if x != nil { + return x.Types + } + return nil +} + +func (x *SearchHits) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +type SearchMeta struct { + state protoimpl.MessageState `protogen:"open.v1"` + Total uint32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SearchMeta) Reset() { + *x = SearchMeta{} + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[35] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SearchMeta) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SearchMeta) ProtoMessage() {} + +func (x *SearchMeta) ProtoReflect() protoreflect.Message { + mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[35] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SearchMeta.ProtoReflect.Descriptor instead. +func (*SearchMeta) Descriptor() ([]byte, []int) { + return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{35} +} + +func (x *SearchMeta) GetTotal() uint32 { + if x != nil { + return x.Total + } + return 0 +} + +var File_raystack_stencil_v1beta1_stencil_proto protoreflect.FileDescriptor + +const file_raystack_stencil_v1beta1_stencil_proto_rawDesc = "" + + "\n" + + "&raystack/stencil/v1beta1/stencil.proto\x12\x18raystack.stencil.v1beta1\x1a\x1bbuf/validate/validate.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xca\x02\n" + + "\tNamespace\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12?\n" + + "\x06format\x18\x02 \x01(\x0e2'.raystack.stencil.v1beta1.Schema.FormatR\x06format\x12T\n" + + "\rcompatibility\x18\x03 \x01(\x0e2..raystack.stencil.v1beta1.Schema.CompatibilityR\rcompatibility\x12 \n" + + "\vdescription\x18\x04 \x01(\tR\vdescription\x129\n" + + "\n" + + "created_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\"\x90\x05\n" + + "\x06Schema\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12?\n" + + "\x06format\x18\x02 \x01(\x0e2'.raystack.stencil.v1beta1.Schema.FormatR\x06format\x12\x1c\n" + + "\tauthority\x18\x03 \x01(\tR\tauthority\x12T\n" + + "\rcompatibility\x18\x04 \x01(\x0e2..raystack.stencil.v1beta1.Schema.CompatibilityR\rcompatibility\x129\n" + + "\n" + + "created_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\"W\n" + + "\x06Format\x12\x16\n" + + "\x12FORMAT_UNSPECIFIED\x10\x00\x12\x13\n" + + "\x0fFORMAT_PROTOBUF\x10\x01\x12\x0f\n" + + "\vFORMAT_AVRO\x10\x02\x12\x0f\n" + + "\vFORMAT_JSON\x10\x03\"\xed\x01\n" + + "\rCompatibility\x12\x1d\n" + + "\x19COMPATIBILITY_UNSPECIFIED\x10\x00\x12\x1a\n" + + "\x16COMPATIBILITY_BACKWARD\x10\x01\x12%\n" + + "!COMPATIBILITY_BACKWARD_TRANSITIVE\x10\x02\x12\x19\n" + + "\x15COMPATIBILITY_FORWARD\x10\x03\x12$\n" + + " COMPATIBILITY_FORWARD_TRANSITIVE\x10\x04\x12\x16\n" + + "\x12COMPATIBILITY_FULL\x10\x05\x12!\n" + + "\x1dCOMPATIBILITY_FULL_TRANSITIVE\x10\x06\"\x17\n" + + "\x15ListNamespacesRequest\"]\n" + + "\x16ListNamespacesResponse\x12C\n" + + "\n" + + "namespaces\x18\x01 \x03(\v2#.raystack.stencil.v1beta1.NamespaceR\n" + + "namespaces\"%\n" + + "\x13GetNamespaceRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\"Y\n" + + "\x14GetNamespaceResponse\x12A\n" + + "\tnamespace\x18\x01 \x01(\v2#.raystack.stencil.v1beta1.NamespaceR\tnamespace\"\x82\x02\n" + + "\x16CreateNamespaceRequest\x12\x17\n" + + "\x02id\x18\x01 \x01(\tB\a\xbaH\x04r\x02\x10\x01R\x02id\x12K\n" + + "\x06format\x18\x02 \x01(\x0e2'.raystack.stencil.v1beta1.Schema.FormatB\n" + + "\xbaH\a\x82\x01\x04\x10\x01 \x00R\x06format\x12`\n" + + "\rcompatibility\x18\x03 \x01(\x0e2..raystack.stencil.v1beta1.Schema.CompatibilityB\n" + + "\xbaH\a\x82\x01\x04\x10\x01 \x00R\rcompatibility\x12 \n" + + "\vdescription\x18\x04 \x01(\tR\vdescription\"\\\n" + + "\x17CreateNamespaceResponse\x12A\n" + + "\tnamespace\x18\x01 \x01(\v2#.raystack.stencil.v1beta1.NamespaceR\tnamespace\"\xf9\x01\n" + + "\x16UpdateNamespaceRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12K\n" + + "\x06format\x18\x02 \x01(\x0e2'.raystack.stencil.v1beta1.Schema.FormatB\n" + + "\xbaH\a\x82\x01\x04\x10\x01 \x00R\x06format\x12`\n" + + "\rcompatibility\x18\x03 \x01(\x0e2..raystack.stencil.v1beta1.Schema.CompatibilityB\n" + + "\xbaH\a\x82\x01\x04\x10\x01 \x00R\rcompatibility\x12 \n" + + "\vdescription\x18\x04 \x01(\tR\vdescription\"\\\n" + + "\x17UpdateNamespaceResponse\x12A\n" + + "\tnamespace\x18\x01 \x01(\v2#.raystack.stencil.v1beta1.NamespaceR\tnamespace\"(\n" + + "\x16DeleteNamespaceRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\"3\n" + + "\x17DeleteNamespaceResponse\x12\x18\n" + + "\amessage\x18\x01 \x01(\tR\amessage\"$\n" + + "\x12ListSchemasRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\"Q\n" + + "\x13ListSchemasResponse\x12:\n" + + "\aschemas\x18\x01 \x03(\v2 .raystack.stencil.v1beta1.SchemaR\aschemas\"X\n" + + "\x16GetLatestSchemaRequest\x12!\n" + + "\fnamespace_id\x18\x01 \x01(\tR\vnamespaceId\x12\x1b\n" + + "\tschema_id\x18\x02 \x01(\tR\bschemaId\"-\n" + + "\x17GetLatestSchemaResponse\x12\x12\n" + + "\x04data\x18\x03 \x01(\fR\x04data\"\x89\x02\n" + + "\x13CreateSchemaRequest\x12!\n" + + "\fnamespace_id\x18\x01 \x01(\tR\vnamespaceId\x12\x1b\n" + + "\tschema_id\x18\x02 \x01(\tR\bschemaId\x12\x1b\n" + + "\x04data\x18\x03 \x01(\fB\a\xbaH\x04z\x02\x10\x01R\x04data\x12?\n" + + "\x06format\x18\x04 \x01(\x0e2'.raystack.stencil.v1beta1.Schema.FormatR\x06format\x12T\n" + + "\rcompatibility\x18\x05 \x01(\x0e2..raystack.stencil.v1beta1.Schema.CompatibilityR\rcompatibility\"\\\n" + + "\x14CreateSchemaResponse\x12\x18\n" + + "\aversion\x18\x01 \x01(\x05R\aversion\x12\x0e\n" + + "\x02id\x18\x02 \x01(\tR\x02id\x12\x1a\n" + + "\blocation\x18\x03 \x01(\tR\blocation\"\xce\x01\n" + + "\x19CheckCompatibilityRequest\x12!\n" + + "\fnamespace_id\x18\x01 \x01(\tR\vnamespaceId\x12\x1b\n" + + "\tschema_id\x18\x02 \x01(\tR\bschemaId\x12\x1b\n" + + "\x04data\x18\x03 \x01(\fB\a\xbaH\x04z\x02\x10\x01R\x04data\x12T\n" + + "\rcompatibility\x18\x04 \x01(\x0e2..raystack.stencil.v1beta1.Schema.CompatibilityR\rcompatibility\"\x1c\n" + + "\x1aCheckCompatibilityResponse\"Z\n" + + "\x18GetSchemaMetadataRequest\x12!\n" + + "\fnamespace_id\x18\x01 \x01(\tR\vnamespaceId\x12\x1b\n" + + "\tschema_id\x18\x02 \x01(\tR\bschemaId\"\xda\x02\n" + + "\x19GetSchemaMetadataResponse\x12?\n" + + "\x06format\x18\x01 \x01(\x0e2'.raystack.stencil.v1beta1.Schema.FormatR\x06format\x12T\n" + + "\rcompatibility\x18\x02 \x01(\x0e2..raystack.stencil.v1beta1.Schema.CompatibilityR\rcompatibility\x12\x1c\n" + + "\tauthority\x18\x03 \x01(\tR\tauthority\x12\x12\n" + + "\x04name\x18\x04 \x01(\tR\x04name\x129\n" + + "\n" + + "created_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" + + "\n" + + "updated_at\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\"\xb3\x01\n" + + "\x1bUpdateSchemaMetadataRequest\x12!\n" + + "\fnamespace_id\x18\x01 \x01(\tR\vnamespaceId\x12\x1b\n" + + "\tschema_id\x18\x02 \x01(\tR\bschemaId\x12T\n" + + "\rcompatibility\x18\x03 \x01(\x0e2..raystack.stencil.v1beta1.Schema.CompatibilityR\rcompatibility\"\xd3\x01\n" + + "\x1cUpdateSchemaMetadataResponse\x12?\n" + + "\x06format\x18\x01 \x01(\x0e2'.raystack.stencil.v1beta1.Schema.FormatR\x06format\x12T\n" + + "\rcompatibility\x18\x02 \x01(\x0e2..raystack.stencil.v1beta1.Schema.CompatibilityR\rcompatibility\x12\x1c\n" + + "\tauthority\x18\x03 \x01(\tR\tauthority\"U\n" + + "\x13DeleteSchemaRequest\x12!\n" + + "\fnamespace_id\x18\x01 \x01(\tR\vnamespaceId\x12\x1b\n" + + "\tschema_id\x18\x02 \x01(\tR\bschemaId\"0\n" + + "\x14DeleteSchemaResponse\x12\x18\n" + + "\amessage\x18\x01 \x01(\tR\amessage\"U\n" + + "\x13ListVersionsRequest\x12!\n" + + "\fnamespace_id\x18\x01 \x01(\tR\vnamespaceId\x12\x1b\n" + + "\tschema_id\x18\x02 \x01(\tR\bschemaId\"2\n" + + "\x14ListVersionsResponse\x12\x1a\n" + + "\bversions\x18\x01 \x03(\x05R\bversions\"q\n" + + "\x10GetSchemaRequest\x12!\n" + + "\fnamespace_id\x18\x01 \x01(\tR\vnamespaceId\x12\x1b\n" + + "\tschema_id\x18\x02 \x01(\tR\bschemaId\x12\x1d\n" + + "\n" + + "version_id\x18\x03 \x01(\x05R\tversionId\"'\n" + + "\x11GetSchemaResponse\x12\x12\n" + + "\x04data\x18\x01 \x01(\fR\x04data\"u\n" + + "\x14DeleteVersionRequest\x12!\n" + + "\fnamespace_id\x18\x01 \x01(\tR\vnamespaceId\x12\x1b\n" + + "\tschema_id\x18\x02 \x01(\tR\bschemaId\x12\x1d\n" + + "\n" + + "version_id\x18\x03 \x01(\x05R\tversionId\"1\n" + + "\x15DeleteVersionResponse\x12\x18\n" + + "\amessage\x18\x01 \x01(\tR\amessage\"\xb6\x01\n" + + "\rSearchRequest\x12!\n" + + "\fnamespace_id\x18\x01 \x01(\tR\vnamespaceId\x12\x1b\n" + + "\tschema_id\x18\x02 \x01(\tR\bschemaId\x12\x1d\n" + + "\x05query\x18\x03 \x01(\tB\a\xbaH\x04r\x02\x10\x01R\x05query\x12\x1a\n" + + "\ahistory\x18\x04 \x01(\bH\x00R\ahistory\x12\x1f\n" + + "\n" + + "version_id\x18\x05 \x01(\x05H\x00R\tversionIdB\t\n" + + "\aversion\"\x84\x01\n" + + "\x0eSearchResponse\x128\n" + + "\x04hits\x18\x01 \x03(\v2$.raystack.stencil.v1beta1.SearchHitsR\x04hits\x128\n" + + "\x04meta\x18\x02 \x01(\v2$.raystack.stencil.v1beta1.SearchMetaR\x04meta\"\xad\x01\n" + + "\n" + + "SearchHits\x12!\n" + + "\fnamespace_id\x18\x01 \x01(\tR\vnamespaceId\x12\x1b\n" + + "\tschema_id\x18\x02 \x01(\tR\bschemaId\x12\x1d\n" + + "\n" + + "version_id\x18\x03 \x01(\x05R\tversionId\x12\x16\n" + + "\x06fields\x18\x04 \x03(\tR\x06fields\x12\x14\n" + + "\x05types\x18\x05 \x03(\tR\x05types\x12\x12\n" + + "\x04path\x18\x06 \x01(\tR\x04path\"\"\n" + + "\n" + + "SearchMeta\x12\x14\n" + + "\x05total\x18\x01 \x01(\rR\x05total2\xea\x0e\n" + + "\x0eStencilService\x12u\n" + + "\x0eListNamespaces\x12/.raystack.stencil.v1beta1.ListNamespacesRequest\x1a0.raystack.stencil.v1beta1.ListNamespacesResponse\"\x00\x12o\n" + + "\fGetNamespace\x12-.raystack.stencil.v1beta1.GetNamespaceRequest\x1a..raystack.stencil.v1beta1.GetNamespaceResponse\"\x00\x12x\n" + + "\x0fCreateNamespace\x120.raystack.stencil.v1beta1.CreateNamespaceRequest\x1a1.raystack.stencil.v1beta1.CreateNamespaceResponse\"\x00\x12x\n" + + "\x0fUpdateNamespace\x120.raystack.stencil.v1beta1.UpdateNamespaceRequest\x1a1.raystack.stencil.v1beta1.UpdateNamespaceResponse\"\x00\x12x\n" + + "\x0fDeleteNamespace\x120.raystack.stencil.v1beta1.DeleteNamespaceRequest\x1a1.raystack.stencil.v1beta1.DeleteNamespaceResponse\"\x00\x12l\n" + + "\vListSchemas\x12,.raystack.stencil.v1beta1.ListSchemasRequest\x1a-.raystack.stencil.v1beta1.ListSchemasResponse\"\x00\x12o\n" + + "\fCreateSchema\x12-.raystack.stencil.v1beta1.CreateSchemaRequest\x1a..raystack.stencil.v1beta1.CreateSchemaResponse\"\x00\x12\x81\x01\n" + + "\x12CheckCompatibility\x123.raystack.stencil.v1beta1.CheckCompatibilityRequest\x1a4.raystack.stencil.v1beta1.CheckCompatibilityResponse\"\x00\x12~\n" + + "\x11GetSchemaMetadata\x122.raystack.stencil.v1beta1.GetSchemaMetadataRequest\x1a3.raystack.stencil.v1beta1.GetSchemaMetadataResponse\"\x00\x12\x87\x01\n" + + "\x14UpdateSchemaMetadata\x125.raystack.stencil.v1beta1.UpdateSchemaMetadataRequest\x1a6.raystack.stencil.v1beta1.UpdateSchemaMetadataResponse\"\x00\x12x\n" + + "\x0fGetLatestSchema\x120.raystack.stencil.v1beta1.GetLatestSchemaRequest\x1a1.raystack.stencil.v1beta1.GetLatestSchemaResponse\"\x00\x12o\n" + + "\fDeleteSchema\x12-.raystack.stencil.v1beta1.DeleteSchemaRequest\x1a..raystack.stencil.v1beta1.DeleteSchemaResponse\"\x00\x12f\n" + + "\tGetSchema\x12*.raystack.stencil.v1beta1.GetSchemaRequest\x1a+.raystack.stencil.v1beta1.GetSchemaResponse\"\x00\x12o\n" + + "\fListVersions\x12-.raystack.stencil.v1beta1.ListVersionsRequest\x1a..raystack.stencil.v1beta1.ListVersionsResponse\"\x00\x12r\n" + + "\rDeleteVersion\x12..raystack.stencil.v1beta1.DeleteVersionRequest\x1a/.raystack.stencil.v1beta1.DeleteVersionResponse\"\x00\x12]\n" + + "\x06Search\x12'.raystack.stencil.v1beta1.SearchRequest\x1a(.raystack.stencil.v1beta1.SearchResponse\"\x00B\xf7\x01\n" + + "\x1ccom.raystack.stencil.v1beta1B\fStencilProtoP\x01ZGgithub.com/raystack/stencil/gen/raystack/stencil/v1beta1;stencilv1beta1\xa2\x02\x03RSX\xaa\x02\x18Raystack.Stencil.V1beta1\xca\x02\x18Raystack\\Stencil\\V1beta1\xe2\x02$Raystack\\Stencil\\V1beta1\\GPBMetadata\xea\x02\x1aRaystack::Stencil::V1beta1b\x06proto3" + +var ( + file_raystack_stencil_v1beta1_stencil_proto_rawDescOnce sync.Once + file_raystack_stencil_v1beta1_stencil_proto_rawDescData []byte +) + +func file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP() []byte { + file_raystack_stencil_v1beta1_stencil_proto_rawDescOnce.Do(func() { + file_raystack_stencil_v1beta1_stencil_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_raystack_stencil_v1beta1_stencil_proto_rawDesc), len(file_raystack_stencil_v1beta1_stencil_proto_rawDesc))) + }) + return file_raystack_stencil_v1beta1_stencil_proto_rawDescData +} + +var file_raystack_stencil_v1beta1_stencil_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_raystack_stencil_v1beta1_stencil_proto_msgTypes = make([]protoimpl.MessageInfo, 36) +var file_raystack_stencil_v1beta1_stencil_proto_goTypes = []any{ + (Schema_Format)(0), // 0: raystack.stencil.v1beta1.Schema.Format + (Schema_Compatibility)(0), // 1: raystack.stencil.v1beta1.Schema.Compatibility + (*Namespace)(nil), // 2: raystack.stencil.v1beta1.Namespace + (*Schema)(nil), // 3: raystack.stencil.v1beta1.Schema + (*ListNamespacesRequest)(nil), // 4: raystack.stencil.v1beta1.ListNamespacesRequest + (*ListNamespacesResponse)(nil), // 5: raystack.stencil.v1beta1.ListNamespacesResponse + (*GetNamespaceRequest)(nil), // 6: raystack.stencil.v1beta1.GetNamespaceRequest + (*GetNamespaceResponse)(nil), // 7: raystack.stencil.v1beta1.GetNamespaceResponse + (*CreateNamespaceRequest)(nil), // 8: raystack.stencil.v1beta1.CreateNamespaceRequest + (*CreateNamespaceResponse)(nil), // 9: raystack.stencil.v1beta1.CreateNamespaceResponse + (*UpdateNamespaceRequest)(nil), // 10: raystack.stencil.v1beta1.UpdateNamespaceRequest + (*UpdateNamespaceResponse)(nil), // 11: raystack.stencil.v1beta1.UpdateNamespaceResponse + (*DeleteNamespaceRequest)(nil), // 12: raystack.stencil.v1beta1.DeleteNamespaceRequest + (*DeleteNamespaceResponse)(nil), // 13: raystack.stencil.v1beta1.DeleteNamespaceResponse + (*ListSchemasRequest)(nil), // 14: raystack.stencil.v1beta1.ListSchemasRequest + (*ListSchemasResponse)(nil), // 15: raystack.stencil.v1beta1.ListSchemasResponse + (*GetLatestSchemaRequest)(nil), // 16: raystack.stencil.v1beta1.GetLatestSchemaRequest + (*GetLatestSchemaResponse)(nil), // 17: raystack.stencil.v1beta1.GetLatestSchemaResponse + (*CreateSchemaRequest)(nil), // 18: raystack.stencil.v1beta1.CreateSchemaRequest + (*CreateSchemaResponse)(nil), // 19: raystack.stencil.v1beta1.CreateSchemaResponse + (*CheckCompatibilityRequest)(nil), // 20: raystack.stencil.v1beta1.CheckCompatibilityRequest + (*CheckCompatibilityResponse)(nil), // 21: raystack.stencil.v1beta1.CheckCompatibilityResponse + (*GetSchemaMetadataRequest)(nil), // 22: raystack.stencil.v1beta1.GetSchemaMetadataRequest + (*GetSchemaMetadataResponse)(nil), // 23: raystack.stencil.v1beta1.GetSchemaMetadataResponse + (*UpdateSchemaMetadataRequest)(nil), // 24: raystack.stencil.v1beta1.UpdateSchemaMetadataRequest + (*UpdateSchemaMetadataResponse)(nil), // 25: raystack.stencil.v1beta1.UpdateSchemaMetadataResponse + (*DeleteSchemaRequest)(nil), // 26: raystack.stencil.v1beta1.DeleteSchemaRequest + (*DeleteSchemaResponse)(nil), // 27: raystack.stencil.v1beta1.DeleteSchemaResponse + (*ListVersionsRequest)(nil), // 28: raystack.stencil.v1beta1.ListVersionsRequest + (*ListVersionsResponse)(nil), // 29: raystack.stencil.v1beta1.ListVersionsResponse + (*GetSchemaRequest)(nil), // 30: raystack.stencil.v1beta1.GetSchemaRequest + (*GetSchemaResponse)(nil), // 31: raystack.stencil.v1beta1.GetSchemaResponse + (*DeleteVersionRequest)(nil), // 32: raystack.stencil.v1beta1.DeleteVersionRequest + (*DeleteVersionResponse)(nil), // 33: raystack.stencil.v1beta1.DeleteVersionResponse + (*SearchRequest)(nil), // 34: raystack.stencil.v1beta1.SearchRequest + (*SearchResponse)(nil), // 35: raystack.stencil.v1beta1.SearchResponse + (*SearchHits)(nil), // 36: raystack.stencil.v1beta1.SearchHits + (*SearchMeta)(nil), // 37: raystack.stencil.v1beta1.SearchMeta + (*timestamppb.Timestamp)(nil), // 38: google.protobuf.Timestamp +} +var file_raystack_stencil_v1beta1_stencil_proto_depIdxs = []int32{ + 0, // 0: raystack.stencil.v1beta1.Namespace.format:type_name -> raystack.stencil.v1beta1.Schema.Format + 1, // 1: raystack.stencil.v1beta1.Namespace.compatibility:type_name -> raystack.stencil.v1beta1.Schema.Compatibility + 38, // 2: raystack.stencil.v1beta1.Namespace.created_at:type_name -> google.protobuf.Timestamp + 38, // 3: raystack.stencil.v1beta1.Namespace.updated_at:type_name -> google.protobuf.Timestamp + 0, // 4: raystack.stencil.v1beta1.Schema.format:type_name -> raystack.stencil.v1beta1.Schema.Format + 1, // 5: raystack.stencil.v1beta1.Schema.compatibility:type_name -> raystack.stencil.v1beta1.Schema.Compatibility + 38, // 6: raystack.stencil.v1beta1.Schema.created_at:type_name -> google.protobuf.Timestamp + 38, // 7: raystack.stencil.v1beta1.Schema.updated_at:type_name -> google.protobuf.Timestamp + 2, // 8: raystack.stencil.v1beta1.ListNamespacesResponse.namespaces:type_name -> raystack.stencil.v1beta1.Namespace + 2, // 9: raystack.stencil.v1beta1.GetNamespaceResponse.namespace:type_name -> raystack.stencil.v1beta1.Namespace + 0, // 10: raystack.stencil.v1beta1.CreateNamespaceRequest.format:type_name -> raystack.stencil.v1beta1.Schema.Format + 1, // 11: raystack.stencil.v1beta1.CreateNamespaceRequest.compatibility:type_name -> raystack.stencil.v1beta1.Schema.Compatibility + 2, // 12: raystack.stencil.v1beta1.CreateNamespaceResponse.namespace:type_name -> raystack.stencil.v1beta1.Namespace + 0, // 13: raystack.stencil.v1beta1.UpdateNamespaceRequest.format:type_name -> raystack.stencil.v1beta1.Schema.Format + 1, // 14: raystack.stencil.v1beta1.UpdateNamespaceRequest.compatibility:type_name -> raystack.stencil.v1beta1.Schema.Compatibility + 2, // 15: raystack.stencil.v1beta1.UpdateNamespaceResponse.namespace:type_name -> raystack.stencil.v1beta1.Namespace + 3, // 16: raystack.stencil.v1beta1.ListSchemasResponse.schemas:type_name -> raystack.stencil.v1beta1.Schema + 0, // 17: raystack.stencil.v1beta1.CreateSchemaRequest.format:type_name -> raystack.stencil.v1beta1.Schema.Format + 1, // 18: raystack.stencil.v1beta1.CreateSchemaRequest.compatibility:type_name -> raystack.stencil.v1beta1.Schema.Compatibility + 1, // 19: raystack.stencil.v1beta1.CheckCompatibilityRequest.compatibility:type_name -> raystack.stencil.v1beta1.Schema.Compatibility + 0, // 20: raystack.stencil.v1beta1.GetSchemaMetadataResponse.format:type_name -> raystack.stencil.v1beta1.Schema.Format + 1, // 21: raystack.stencil.v1beta1.GetSchemaMetadataResponse.compatibility:type_name -> raystack.stencil.v1beta1.Schema.Compatibility + 38, // 22: raystack.stencil.v1beta1.GetSchemaMetadataResponse.created_at:type_name -> google.protobuf.Timestamp + 38, // 23: raystack.stencil.v1beta1.GetSchemaMetadataResponse.updated_at:type_name -> google.protobuf.Timestamp + 1, // 24: raystack.stencil.v1beta1.UpdateSchemaMetadataRequest.compatibility:type_name -> raystack.stencil.v1beta1.Schema.Compatibility + 0, // 25: raystack.stencil.v1beta1.UpdateSchemaMetadataResponse.format:type_name -> raystack.stencil.v1beta1.Schema.Format + 1, // 26: raystack.stencil.v1beta1.UpdateSchemaMetadataResponse.compatibility:type_name -> raystack.stencil.v1beta1.Schema.Compatibility + 36, // 27: raystack.stencil.v1beta1.SearchResponse.hits:type_name -> raystack.stencil.v1beta1.SearchHits + 37, // 28: raystack.stencil.v1beta1.SearchResponse.meta:type_name -> raystack.stencil.v1beta1.SearchMeta + 4, // 29: raystack.stencil.v1beta1.StencilService.ListNamespaces:input_type -> raystack.stencil.v1beta1.ListNamespacesRequest + 6, // 30: raystack.stencil.v1beta1.StencilService.GetNamespace:input_type -> raystack.stencil.v1beta1.GetNamespaceRequest + 8, // 31: raystack.stencil.v1beta1.StencilService.CreateNamespace:input_type -> raystack.stencil.v1beta1.CreateNamespaceRequest + 10, // 32: raystack.stencil.v1beta1.StencilService.UpdateNamespace:input_type -> raystack.stencil.v1beta1.UpdateNamespaceRequest + 12, // 33: raystack.stencil.v1beta1.StencilService.DeleteNamespace:input_type -> raystack.stencil.v1beta1.DeleteNamespaceRequest + 14, // 34: raystack.stencil.v1beta1.StencilService.ListSchemas:input_type -> raystack.stencil.v1beta1.ListSchemasRequest + 18, // 35: raystack.stencil.v1beta1.StencilService.CreateSchema:input_type -> raystack.stencil.v1beta1.CreateSchemaRequest + 20, // 36: raystack.stencil.v1beta1.StencilService.CheckCompatibility:input_type -> raystack.stencil.v1beta1.CheckCompatibilityRequest + 22, // 37: raystack.stencil.v1beta1.StencilService.GetSchemaMetadata:input_type -> raystack.stencil.v1beta1.GetSchemaMetadataRequest + 24, // 38: raystack.stencil.v1beta1.StencilService.UpdateSchemaMetadata:input_type -> raystack.stencil.v1beta1.UpdateSchemaMetadataRequest + 16, // 39: raystack.stencil.v1beta1.StencilService.GetLatestSchema:input_type -> raystack.stencil.v1beta1.GetLatestSchemaRequest + 26, // 40: raystack.stencil.v1beta1.StencilService.DeleteSchema:input_type -> raystack.stencil.v1beta1.DeleteSchemaRequest + 30, // 41: raystack.stencil.v1beta1.StencilService.GetSchema:input_type -> raystack.stencil.v1beta1.GetSchemaRequest + 28, // 42: raystack.stencil.v1beta1.StencilService.ListVersions:input_type -> raystack.stencil.v1beta1.ListVersionsRequest + 32, // 43: raystack.stencil.v1beta1.StencilService.DeleteVersion:input_type -> raystack.stencil.v1beta1.DeleteVersionRequest + 34, // 44: raystack.stencil.v1beta1.StencilService.Search:input_type -> raystack.stencil.v1beta1.SearchRequest + 5, // 45: raystack.stencil.v1beta1.StencilService.ListNamespaces:output_type -> raystack.stencil.v1beta1.ListNamespacesResponse + 7, // 46: raystack.stencil.v1beta1.StencilService.GetNamespace:output_type -> raystack.stencil.v1beta1.GetNamespaceResponse + 9, // 47: raystack.stencil.v1beta1.StencilService.CreateNamespace:output_type -> raystack.stencil.v1beta1.CreateNamespaceResponse + 11, // 48: raystack.stencil.v1beta1.StencilService.UpdateNamespace:output_type -> raystack.stencil.v1beta1.UpdateNamespaceResponse + 13, // 49: raystack.stencil.v1beta1.StencilService.DeleteNamespace:output_type -> raystack.stencil.v1beta1.DeleteNamespaceResponse + 15, // 50: raystack.stencil.v1beta1.StencilService.ListSchemas:output_type -> raystack.stencil.v1beta1.ListSchemasResponse + 19, // 51: raystack.stencil.v1beta1.StencilService.CreateSchema:output_type -> raystack.stencil.v1beta1.CreateSchemaResponse + 21, // 52: raystack.stencil.v1beta1.StencilService.CheckCompatibility:output_type -> raystack.stencil.v1beta1.CheckCompatibilityResponse + 23, // 53: raystack.stencil.v1beta1.StencilService.GetSchemaMetadata:output_type -> raystack.stencil.v1beta1.GetSchemaMetadataResponse + 25, // 54: raystack.stencil.v1beta1.StencilService.UpdateSchemaMetadata:output_type -> raystack.stencil.v1beta1.UpdateSchemaMetadataResponse + 17, // 55: raystack.stencil.v1beta1.StencilService.GetLatestSchema:output_type -> raystack.stencil.v1beta1.GetLatestSchemaResponse + 27, // 56: raystack.stencil.v1beta1.StencilService.DeleteSchema:output_type -> raystack.stencil.v1beta1.DeleteSchemaResponse + 31, // 57: raystack.stencil.v1beta1.StencilService.GetSchema:output_type -> raystack.stencil.v1beta1.GetSchemaResponse + 29, // 58: raystack.stencil.v1beta1.StencilService.ListVersions:output_type -> raystack.stencil.v1beta1.ListVersionsResponse + 33, // 59: raystack.stencil.v1beta1.StencilService.DeleteVersion:output_type -> raystack.stencil.v1beta1.DeleteVersionResponse + 35, // 60: raystack.stencil.v1beta1.StencilService.Search:output_type -> raystack.stencil.v1beta1.SearchResponse + 45, // [45:61] is the sub-list for method output_type + 29, // [29:45] is the sub-list for method input_type + 29, // [29:29] is the sub-list for extension type_name + 29, // [29:29] is the sub-list for extension extendee + 0, // [0:29] is the sub-list for field type_name +} + +func init() { file_raystack_stencil_v1beta1_stencil_proto_init() } +func file_raystack_stencil_v1beta1_stencil_proto_init() { + if File_raystack_stencil_v1beta1_stencil_proto != nil { + return + } + file_raystack_stencil_v1beta1_stencil_proto_msgTypes[32].OneofWrappers = []any{ + (*SearchRequest_History)(nil), + (*SearchRequest_VersionId)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_raystack_stencil_v1beta1_stencil_proto_rawDesc), len(file_raystack_stencil_v1beta1_stencil_proto_rawDesc)), + NumEnums: 2, + NumMessages: 36, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_raystack_stencil_v1beta1_stencil_proto_goTypes, + DependencyIndexes: file_raystack_stencil_v1beta1_stencil_proto_depIdxs, + EnumInfos: file_raystack_stencil_v1beta1_stencil_proto_enumTypes, + MessageInfos: file_raystack_stencil_v1beta1_stencil_proto_msgTypes, + }.Build() + File_raystack_stencil_v1beta1_stencil_proto = out.File + file_raystack_stencil_v1beta1_stencil_proto_goTypes = nil + file_raystack_stencil_v1beta1_stencil_proto_depIdxs = nil +} diff --git a/gen/raystack/stencil/v1beta1/stencilv1beta1connect/stencil.connect.go b/gen/raystack/stencil/v1beta1/stencilv1beta1connect/stencil.connect.go new file mode 100644 index 00000000..f9b52c26 --- /dev/null +++ b/gen/raystack/stencil/v1beta1/stencilv1beta1connect/stencil.connect.go @@ -0,0 +1,544 @@ +// Code generated by protoc-gen-connect-go. DO NOT EDIT. +// +// Source: raystack/stencil/v1beta1/stencil.proto + +package stencilv1beta1connect + +import ( + connect "connectrpc.com/connect" + context "context" + errors "errors" + v1beta1 "github.com/raystack/stencil/gen/raystack/stencil/v1beta1" + http "net/http" + strings "strings" +) + +// This is a compile-time assertion to ensure that this generated file and the connect package are +// compatible. If you get a compiler error that this constant is not defined, this code was +// generated with a version of connect newer than the one compiled into your binary. You can fix the +// problem by either regenerating this code with an older version of connect or updating the connect +// version compiled into your binary. +const _ = connect.IsAtLeastVersion1_13_0 + +const ( + // StencilServiceName is the fully-qualified name of the StencilService service. + StencilServiceName = "raystack.stencil.v1beta1.StencilService" +) + +// These constants are the fully-qualified names of the RPCs defined in this package. They're +// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route. +// +// Note that these are different from the fully-qualified method names used by +// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to +// reflection-formatted method names, remove the leading slash and convert the remaining slash to a +// period. +const ( + // StencilServiceListNamespacesProcedure is the fully-qualified name of the StencilService's + // ListNamespaces RPC. + StencilServiceListNamespacesProcedure = "/raystack.stencil.v1beta1.StencilService/ListNamespaces" + // StencilServiceGetNamespaceProcedure is the fully-qualified name of the StencilService's + // GetNamespace RPC. + StencilServiceGetNamespaceProcedure = "/raystack.stencil.v1beta1.StencilService/GetNamespace" + // StencilServiceCreateNamespaceProcedure is the fully-qualified name of the StencilService's + // CreateNamespace RPC. + StencilServiceCreateNamespaceProcedure = "/raystack.stencil.v1beta1.StencilService/CreateNamespace" + // StencilServiceUpdateNamespaceProcedure is the fully-qualified name of the StencilService's + // UpdateNamespace RPC. + StencilServiceUpdateNamespaceProcedure = "/raystack.stencil.v1beta1.StencilService/UpdateNamespace" + // StencilServiceDeleteNamespaceProcedure is the fully-qualified name of the StencilService's + // DeleteNamespace RPC. + StencilServiceDeleteNamespaceProcedure = "/raystack.stencil.v1beta1.StencilService/DeleteNamespace" + // StencilServiceListSchemasProcedure is the fully-qualified name of the StencilService's + // ListSchemas RPC. + StencilServiceListSchemasProcedure = "/raystack.stencil.v1beta1.StencilService/ListSchemas" + // StencilServiceCreateSchemaProcedure is the fully-qualified name of the StencilService's + // CreateSchema RPC. + StencilServiceCreateSchemaProcedure = "/raystack.stencil.v1beta1.StencilService/CreateSchema" + // StencilServiceCheckCompatibilityProcedure is the fully-qualified name of the StencilService's + // CheckCompatibility RPC. + StencilServiceCheckCompatibilityProcedure = "/raystack.stencil.v1beta1.StencilService/CheckCompatibility" + // StencilServiceGetSchemaMetadataProcedure is the fully-qualified name of the StencilService's + // GetSchemaMetadata RPC. + StencilServiceGetSchemaMetadataProcedure = "/raystack.stencil.v1beta1.StencilService/GetSchemaMetadata" + // StencilServiceUpdateSchemaMetadataProcedure is the fully-qualified name of the StencilService's + // UpdateSchemaMetadata RPC. + StencilServiceUpdateSchemaMetadataProcedure = "/raystack.stencil.v1beta1.StencilService/UpdateSchemaMetadata" + // StencilServiceGetLatestSchemaProcedure is the fully-qualified name of the StencilService's + // GetLatestSchema RPC. + StencilServiceGetLatestSchemaProcedure = "/raystack.stencil.v1beta1.StencilService/GetLatestSchema" + // StencilServiceDeleteSchemaProcedure is the fully-qualified name of the StencilService's + // DeleteSchema RPC. + StencilServiceDeleteSchemaProcedure = "/raystack.stencil.v1beta1.StencilService/DeleteSchema" + // StencilServiceGetSchemaProcedure is the fully-qualified name of the StencilService's GetSchema + // RPC. + StencilServiceGetSchemaProcedure = "/raystack.stencil.v1beta1.StencilService/GetSchema" + // StencilServiceListVersionsProcedure is the fully-qualified name of the StencilService's + // ListVersions RPC. + StencilServiceListVersionsProcedure = "/raystack.stencil.v1beta1.StencilService/ListVersions" + // StencilServiceDeleteVersionProcedure is the fully-qualified name of the StencilService's + // DeleteVersion RPC. + StencilServiceDeleteVersionProcedure = "/raystack.stencil.v1beta1.StencilService/DeleteVersion" + // StencilServiceSearchProcedure is the fully-qualified name of the StencilService's Search RPC. + StencilServiceSearchProcedure = "/raystack.stencil.v1beta1.StencilService/Search" +) + +// StencilServiceClient is a client for the raystack.stencil.v1beta1.StencilService service. +type StencilServiceClient interface { + ListNamespaces(context.Context, *connect.Request[v1beta1.ListNamespacesRequest]) (*connect.Response[v1beta1.ListNamespacesResponse], error) + GetNamespace(context.Context, *connect.Request[v1beta1.GetNamespaceRequest]) (*connect.Response[v1beta1.GetNamespaceResponse], error) + CreateNamespace(context.Context, *connect.Request[v1beta1.CreateNamespaceRequest]) (*connect.Response[v1beta1.CreateNamespaceResponse], error) + UpdateNamespace(context.Context, *connect.Request[v1beta1.UpdateNamespaceRequest]) (*connect.Response[v1beta1.UpdateNamespaceResponse], error) + DeleteNamespace(context.Context, *connect.Request[v1beta1.DeleteNamespaceRequest]) (*connect.Response[v1beta1.DeleteNamespaceResponse], error) + ListSchemas(context.Context, *connect.Request[v1beta1.ListSchemasRequest]) (*connect.Response[v1beta1.ListSchemasResponse], error) + CreateSchema(context.Context, *connect.Request[v1beta1.CreateSchemaRequest]) (*connect.Response[v1beta1.CreateSchemaResponse], error) + CheckCompatibility(context.Context, *connect.Request[v1beta1.CheckCompatibilityRequest]) (*connect.Response[v1beta1.CheckCompatibilityResponse], error) + GetSchemaMetadata(context.Context, *connect.Request[v1beta1.GetSchemaMetadataRequest]) (*connect.Response[v1beta1.GetSchemaMetadataResponse], error) + UpdateSchemaMetadata(context.Context, *connect.Request[v1beta1.UpdateSchemaMetadataRequest]) (*connect.Response[v1beta1.UpdateSchemaMetadataResponse], error) + GetLatestSchema(context.Context, *connect.Request[v1beta1.GetLatestSchemaRequest]) (*connect.Response[v1beta1.GetLatestSchemaResponse], error) + DeleteSchema(context.Context, *connect.Request[v1beta1.DeleteSchemaRequest]) (*connect.Response[v1beta1.DeleteSchemaResponse], error) + GetSchema(context.Context, *connect.Request[v1beta1.GetSchemaRequest]) (*connect.Response[v1beta1.GetSchemaResponse], error) + ListVersions(context.Context, *connect.Request[v1beta1.ListVersionsRequest]) (*connect.Response[v1beta1.ListVersionsResponse], error) + DeleteVersion(context.Context, *connect.Request[v1beta1.DeleteVersionRequest]) (*connect.Response[v1beta1.DeleteVersionResponse], error) + Search(context.Context, *connect.Request[v1beta1.SearchRequest]) (*connect.Response[v1beta1.SearchResponse], error) +} + +// NewStencilServiceClient constructs a client for the raystack.stencil.v1beta1.StencilService +// service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for +// gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply +// the connect.WithGRPC() or connect.WithGRPCWeb() options. +// +// The URL supplied here should be the base URL for the Connect or gRPC server (for example, +// http://api.acme.com or https://acme.com/grpc). +func NewStencilServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) StencilServiceClient { + baseURL = strings.TrimRight(baseURL, "/") + stencilServiceMethods := v1beta1.File_raystack_stencil_v1beta1_stencil_proto.Services().ByName("StencilService").Methods() + return &stencilServiceClient{ + listNamespaces: connect.NewClient[v1beta1.ListNamespacesRequest, v1beta1.ListNamespacesResponse]( + httpClient, + baseURL+StencilServiceListNamespacesProcedure, + connect.WithSchema(stencilServiceMethods.ByName("ListNamespaces")), + connect.WithClientOptions(opts...), + ), + getNamespace: connect.NewClient[v1beta1.GetNamespaceRequest, v1beta1.GetNamespaceResponse]( + httpClient, + baseURL+StencilServiceGetNamespaceProcedure, + connect.WithSchema(stencilServiceMethods.ByName("GetNamespace")), + connect.WithClientOptions(opts...), + ), + createNamespace: connect.NewClient[v1beta1.CreateNamespaceRequest, v1beta1.CreateNamespaceResponse]( + httpClient, + baseURL+StencilServiceCreateNamespaceProcedure, + connect.WithSchema(stencilServiceMethods.ByName("CreateNamespace")), + connect.WithClientOptions(opts...), + ), + updateNamespace: connect.NewClient[v1beta1.UpdateNamespaceRequest, v1beta1.UpdateNamespaceResponse]( + httpClient, + baseURL+StencilServiceUpdateNamespaceProcedure, + connect.WithSchema(stencilServiceMethods.ByName("UpdateNamespace")), + connect.WithClientOptions(opts...), + ), + deleteNamespace: connect.NewClient[v1beta1.DeleteNamespaceRequest, v1beta1.DeleteNamespaceResponse]( + httpClient, + baseURL+StencilServiceDeleteNamespaceProcedure, + connect.WithSchema(stencilServiceMethods.ByName("DeleteNamespace")), + connect.WithClientOptions(opts...), + ), + listSchemas: connect.NewClient[v1beta1.ListSchemasRequest, v1beta1.ListSchemasResponse]( + httpClient, + baseURL+StencilServiceListSchemasProcedure, + connect.WithSchema(stencilServiceMethods.ByName("ListSchemas")), + connect.WithClientOptions(opts...), + ), + createSchema: connect.NewClient[v1beta1.CreateSchemaRequest, v1beta1.CreateSchemaResponse]( + httpClient, + baseURL+StencilServiceCreateSchemaProcedure, + connect.WithSchema(stencilServiceMethods.ByName("CreateSchema")), + connect.WithClientOptions(opts...), + ), + checkCompatibility: connect.NewClient[v1beta1.CheckCompatibilityRequest, v1beta1.CheckCompatibilityResponse]( + httpClient, + baseURL+StencilServiceCheckCompatibilityProcedure, + connect.WithSchema(stencilServiceMethods.ByName("CheckCompatibility")), + connect.WithClientOptions(opts...), + ), + getSchemaMetadata: connect.NewClient[v1beta1.GetSchemaMetadataRequest, v1beta1.GetSchemaMetadataResponse]( + httpClient, + baseURL+StencilServiceGetSchemaMetadataProcedure, + connect.WithSchema(stencilServiceMethods.ByName("GetSchemaMetadata")), + connect.WithClientOptions(opts...), + ), + updateSchemaMetadata: connect.NewClient[v1beta1.UpdateSchemaMetadataRequest, v1beta1.UpdateSchemaMetadataResponse]( + httpClient, + baseURL+StencilServiceUpdateSchemaMetadataProcedure, + connect.WithSchema(stencilServiceMethods.ByName("UpdateSchemaMetadata")), + connect.WithClientOptions(opts...), + ), + getLatestSchema: connect.NewClient[v1beta1.GetLatestSchemaRequest, v1beta1.GetLatestSchemaResponse]( + httpClient, + baseURL+StencilServiceGetLatestSchemaProcedure, + connect.WithSchema(stencilServiceMethods.ByName("GetLatestSchema")), + connect.WithClientOptions(opts...), + ), + deleteSchema: connect.NewClient[v1beta1.DeleteSchemaRequest, v1beta1.DeleteSchemaResponse]( + httpClient, + baseURL+StencilServiceDeleteSchemaProcedure, + connect.WithSchema(stencilServiceMethods.ByName("DeleteSchema")), + connect.WithClientOptions(opts...), + ), + getSchema: connect.NewClient[v1beta1.GetSchemaRequest, v1beta1.GetSchemaResponse]( + httpClient, + baseURL+StencilServiceGetSchemaProcedure, + connect.WithSchema(stencilServiceMethods.ByName("GetSchema")), + connect.WithClientOptions(opts...), + ), + listVersions: connect.NewClient[v1beta1.ListVersionsRequest, v1beta1.ListVersionsResponse]( + httpClient, + baseURL+StencilServiceListVersionsProcedure, + connect.WithSchema(stencilServiceMethods.ByName("ListVersions")), + connect.WithClientOptions(opts...), + ), + deleteVersion: connect.NewClient[v1beta1.DeleteVersionRequest, v1beta1.DeleteVersionResponse]( + httpClient, + baseURL+StencilServiceDeleteVersionProcedure, + connect.WithSchema(stencilServiceMethods.ByName("DeleteVersion")), + connect.WithClientOptions(opts...), + ), + search: connect.NewClient[v1beta1.SearchRequest, v1beta1.SearchResponse]( + httpClient, + baseURL+StencilServiceSearchProcedure, + connect.WithSchema(stencilServiceMethods.ByName("Search")), + connect.WithClientOptions(opts...), + ), + } +} + +// stencilServiceClient implements StencilServiceClient. +type stencilServiceClient struct { + listNamespaces *connect.Client[v1beta1.ListNamespacesRequest, v1beta1.ListNamespacesResponse] + getNamespace *connect.Client[v1beta1.GetNamespaceRequest, v1beta1.GetNamespaceResponse] + createNamespace *connect.Client[v1beta1.CreateNamespaceRequest, v1beta1.CreateNamespaceResponse] + updateNamespace *connect.Client[v1beta1.UpdateNamespaceRequest, v1beta1.UpdateNamespaceResponse] + deleteNamespace *connect.Client[v1beta1.DeleteNamespaceRequest, v1beta1.DeleteNamespaceResponse] + listSchemas *connect.Client[v1beta1.ListSchemasRequest, v1beta1.ListSchemasResponse] + createSchema *connect.Client[v1beta1.CreateSchemaRequest, v1beta1.CreateSchemaResponse] + checkCompatibility *connect.Client[v1beta1.CheckCompatibilityRequest, v1beta1.CheckCompatibilityResponse] + getSchemaMetadata *connect.Client[v1beta1.GetSchemaMetadataRequest, v1beta1.GetSchemaMetadataResponse] + updateSchemaMetadata *connect.Client[v1beta1.UpdateSchemaMetadataRequest, v1beta1.UpdateSchemaMetadataResponse] + getLatestSchema *connect.Client[v1beta1.GetLatestSchemaRequest, v1beta1.GetLatestSchemaResponse] + deleteSchema *connect.Client[v1beta1.DeleteSchemaRequest, v1beta1.DeleteSchemaResponse] + getSchema *connect.Client[v1beta1.GetSchemaRequest, v1beta1.GetSchemaResponse] + listVersions *connect.Client[v1beta1.ListVersionsRequest, v1beta1.ListVersionsResponse] + deleteVersion *connect.Client[v1beta1.DeleteVersionRequest, v1beta1.DeleteVersionResponse] + search *connect.Client[v1beta1.SearchRequest, v1beta1.SearchResponse] +} + +// ListNamespaces calls raystack.stencil.v1beta1.StencilService.ListNamespaces. +func (c *stencilServiceClient) ListNamespaces(ctx context.Context, req *connect.Request[v1beta1.ListNamespacesRequest]) (*connect.Response[v1beta1.ListNamespacesResponse], error) { + return c.listNamespaces.CallUnary(ctx, req) +} + +// GetNamespace calls raystack.stencil.v1beta1.StencilService.GetNamespace. +func (c *stencilServiceClient) GetNamespace(ctx context.Context, req *connect.Request[v1beta1.GetNamespaceRequest]) (*connect.Response[v1beta1.GetNamespaceResponse], error) { + return c.getNamespace.CallUnary(ctx, req) +} + +// CreateNamespace calls raystack.stencil.v1beta1.StencilService.CreateNamespace. +func (c *stencilServiceClient) CreateNamespace(ctx context.Context, req *connect.Request[v1beta1.CreateNamespaceRequest]) (*connect.Response[v1beta1.CreateNamespaceResponse], error) { + return c.createNamespace.CallUnary(ctx, req) +} + +// UpdateNamespace calls raystack.stencil.v1beta1.StencilService.UpdateNamespace. +func (c *stencilServiceClient) UpdateNamespace(ctx context.Context, req *connect.Request[v1beta1.UpdateNamespaceRequest]) (*connect.Response[v1beta1.UpdateNamespaceResponse], error) { + return c.updateNamespace.CallUnary(ctx, req) +} + +// DeleteNamespace calls raystack.stencil.v1beta1.StencilService.DeleteNamespace. +func (c *stencilServiceClient) DeleteNamespace(ctx context.Context, req *connect.Request[v1beta1.DeleteNamespaceRequest]) (*connect.Response[v1beta1.DeleteNamespaceResponse], error) { + return c.deleteNamespace.CallUnary(ctx, req) +} + +// ListSchemas calls raystack.stencil.v1beta1.StencilService.ListSchemas. +func (c *stencilServiceClient) ListSchemas(ctx context.Context, req *connect.Request[v1beta1.ListSchemasRequest]) (*connect.Response[v1beta1.ListSchemasResponse], error) { + return c.listSchemas.CallUnary(ctx, req) +} + +// CreateSchema calls raystack.stencil.v1beta1.StencilService.CreateSchema. +func (c *stencilServiceClient) CreateSchema(ctx context.Context, req *connect.Request[v1beta1.CreateSchemaRequest]) (*connect.Response[v1beta1.CreateSchemaResponse], error) { + return c.createSchema.CallUnary(ctx, req) +} + +// CheckCompatibility calls raystack.stencil.v1beta1.StencilService.CheckCompatibility. +func (c *stencilServiceClient) CheckCompatibility(ctx context.Context, req *connect.Request[v1beta1.CheckCompatibilityRequest]) (*connect.Response[v1beta1.CheckCompatibilityResponse], error) { + return c.checkCompatibility.CallUnary(ctx, req) +} + +// GetSchemaMetadata calls raystack.stencil.v1beta1.StencilService.GetSchemaMetadata. +func (c *stencilServiceClient) GetSchemaMetadata(ctx context.Context, req *connect.Request[v1beta1.GetSchemaMetadataRequest]) (*connect.Response[v1beta1.GetSchemaMetadataResponse], error) { + return c.getSchemaMetadata.CallUnary(ctx, req) +} + +// UpdateSchemaMetadata calls raystack.stencil.v1beta1.StencilService.UpdateSchemaMetadata. +func (c *stencilServiceClient) UpdateSchemaMetadata(ctx context.Context, req *connect.Request[v1beta1.UpdateSchemaMetadataRequest]) (*connect.Response[v1beta1.UpdateSchemaMetadataResponse], error) { + return c.updateSchemaMetadata.CallUnary(ctx, req) +} + +// GetLatestSchema calls raystack.stencil.v1beta1.StencilService.GetLatestSchema. +func (c *stencilServiceClient) GetLatestSchema(ctx context.Context, req *connect.Request[v1beta1.GetLatestSchemaRequest]) (*connect.Response[v1beta1.GetLatestSchemaResponse], error) { + return c.getLatestSchema.CallUnary(ctx, req) +} + +// DeleteSchema calls raystack.stencil.v1beta1.StencilService.DeleteSchema. +func (c *stencilServiceClient) DeleteSchema(ctx context.Context, req *connect.Request[v1beta1.DeleteSchemaRequest]) (*connect.Response[v1beta1.DeleteSchemaResponse], error) { + return c.deleteSchema.CallUnary(ctx, req) +} + +// GetSchema calls raystack.stencil.v1beta1.StencilService.GetSchema. +func (c *stencilServiceClient) GetSchema(ctx context.Context, req *connect.Request[v1beta1.GetSchemaRequest]) (*connect.Response[v1beta1.GetSchemaResponse], error) { + return c.getSchema.CallUnary(ctx, req) +} + +// ListVersions calls raystack.stencil.v1beta1.StencilService.ListVersions. +func (c *stencilServiceClient) ListVersions(ctx context.Context, req *connect.Request[v1beta1.ListVersionsRequest]) (*connect.Response[v1beta1.ListVersionsResponse], error) { + return c.listVersions.CallUnary(ctx, req) +} + +// DeleteVersion calls raystack.stencil.v1beta1.StencilService.DeleteVersion. +func (c *stencilServiceClient) DeleteVersion(ctx context.Context, req *connect.Request[v1beta1.DeleteVersionRequest]) (*connect.Response[v1beta1.DeleteVersionResponse], error) { + return c.deleteVersion.CallUnary(ctx, req) +} + +// Search calls raystack.stencil.v1beta1.StencilService.Search. +func (c *stencilServiceClient) Search(ctx context.Context, req *connect.Request[v1beta1.SearchRequest]) (*connect.Response[v1beta1.SearchResponse], error) { + return c.search.CallUnary(ctx, req) +} + +// StencilServiceHandler is an implementation of the raystack.stencil.v1beta1.StencilService +// service. +type StencilServiceHandler interface { + ListNamespaces(context.Context, *connect.Request[v1beta1.ListNamespacesRequest]) (*connect.Response[v1beta1.ListNamespacesResponse], error) + GetNamespace(context.Context, *connect.Request[v1beta1.GetNamespaceRequest]) (*connect.Response[v1beta1.GetNamespaceResponse], error) + CreateNamespace(context.Context, *connect.Request[v1beta1.CreateNamespaceRequest]) (*connect.Response[v1beta1.CreateNamespaceResponse], error) + UpdateNamespace(context.Context, *connect.Request[v1beta1.UpdateNamespaceRequest]) (*connect.Response[v1beta1.UpdateNamespaceResponse], error) + DeleteNamespace(context.Context, *connect.Request[v1beta1.DeleteNamespaceRequest]) (*connect.Response[v1beta1.DeleteNamespaceResponse], error) + ListSchemas(context.Context, *connect.Request[v1beta1.ListSchemasRequest]) (*connect.Response[v1beta1.ListSchemasResponse], error) + CreateSchema(context.Context, *connect.Request[v1beta1.CreateSchemaRequest]) (*connect.Response[v1beta1.CreateSchemaResponse], error) + CheckCompatibility(context.Context, *connect.Request[v1beta1.CheckCompatibilityRequest]) (*connect.Response[v1beta1.CheckCompatibilityResponse], error) + GetSchemaMetadata(context.Context, *connect.Request[v1beta1.GetSchemaMetadataRequest]) (*connect.Response[v1beta1.GetSchemaMetadataResponse], error) + UpdateSchemaMetadata(context.Context, *connect.Request[v1beta1.UpdateSchemaMetadataRequest]) (*connect.Response[v1beta1.UpdateSchemaMetadataResponse], error) + GetLatestSchema(context.Context, *connect.Request[v1beta1.GetLatestSchemaRequest]) (*connect.Response[v1beta1.GetLatestSchemaResponse], error) + DeleteSchema(context.Context, *connect.Request[v1beta1.DeleteSchemaRequest]) (*connect.Response[v1beta1.DeleteSchemaResponse], error) + GetSchema(context.Context, *connect.Request[v1beta1.GetSchemaRequest]) (*connect.Response[v1beta1.GetSchemaResponse], error) + ListVersions(context.Context, *connect.Request[v1beta1.ListVersionsRequest]) (*connect.Response[v1beta1.ListVersionsResponse], error) + DeleteVersion(context.Context, *connect.Request[v1beta1.DeleteVersionRequest]) (*connect.Response[v1beta1.DeleteVersionResponse], error) + Search(context.Context, *connect.Request[v1beta1.SearchRequest]) (*connect.Response[v1beta1.SearchResponse], error) +} + +// NewStencilServiceHandler builds an HTTP handler from the service implementation. It returns the +// path on which to mount the handler and the handler itself. +// +// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf +// and JSON codecs. They also support gzip compression. +func NewStencilServiceHandler(svc StencilServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) { + stencilServiceMethods := v1beta1.File_raystack_stencil_v1beta1_stencil_proto.Services().ByName("StencilService").Methods() + stencilServiceListNamespacesHandler := connect.NewUnaryHandler( + StencilServiceListNamespacesProcedure, + svc.ListNamespaces, + connect.WithSchema(stencilServiceMethods.ByName("ListNamespaces")), + connect.WithHandlerOptions(opts...), + ) + stencilServiceGetNamespaceHandler := connect.NewUnaryHandler( + StencilServiceGetNamespaceProcedure, + svc.GetNamespace, + connect.WithSchema(stencilServiceMethods.ByName("GetNamespace")), + connect.WithHandlerOptions(opts...), + ) + stencilServiceCreateNamespaceHandler := connect.NewUnaryHandler( + StencilServiceCreateNamespaceProcedure, + svc.CreateNamespace, + connect.WithSchema(stencilServiceMethods.ByName("CreateNamespace")), + connect.WithHandlerOptions(opts...), + ) + stencilServiceUpdateNamespaceHandler := connect.NewUnaryHandler( + StencilServiceUpdateNamespaceProcedure, + svc.UpdateNamespace, + connect.WithSchema(stencilServiceMethods.ByName("UpdateNamespace")), + connect.WithHandlerOptions(opts...), + ) + stencilServiceDeleteNamespaceHandler := connect.NewUnaryHandler( + StencilServiceDeleteNamespaceProcedure, + svc.DeleteNamespace, + connect.WithSchema(stencilServiceMethods.ByName("DeleteNamespace")), + connect.WithHandlerOptions(opts...), + ) + stencilServiceListSchemasHandler := connect.NewUnaryHandler( + StencilServiceListSchemasProcedure, + svc.ListSchemas, + connect.WithSchema(stencilServiceMethods.ByName("ListSchemas")), + connect.WithHandlerOptions(opts...), + ) + stencilServiceCreateSchemaHandler := connect.NewUnaryHandler( + StencilServiceCreateSchemaProcedure, + svc.CreateSchema, + connect.WithSchema(stencilServiceMethods.ByName("CreateSchema")), + connect.WithHandlerOptions(opts...), + ) + stencilServiceCheckCompatibilityHandler := connect.NewUnaryHandler( + StencilServiceCheckCompatibilityProcedure, + svc.CheckCompatibility, + connect.WithSchema(stencilServiceMethods.ByName("CheckCompatibility")), + connect.WithHandlerOptions(opts...), + ) + stencilServiceGetSchemaMetadataHandler := connect.NewUnaryHandler( + StencilServiceGetSchemaMetadataProcedure, + svc.GetSchemaMetadata, + connect.WithSchema(stencilServiceMethods.ByName("GetSchemaMetadata")), + connect.WithHandlerOptions(opts...), + ) + stencilServiceUpdateSchemaMetadataHandler := connect.NewUnaryHandler( + StencilServiceUpdateSchemaMetadataProcedure, + svc.UpdateSchemaMetadata, + connect.WithSchema(stencilServiceMethods.ByName("UpdateSchemaMetadata")), + connect.WithHandlerOptions(opts...), + ) + stencilServiceGetLatestSchemaHandler := connect.NewUnaryHandler( + StencilServiceGetLatestSchemaProcedure, + svc.GetLatestSchema, + connect.WithSchema(stencilServiceMethods.ByName("GetLatestSchema")), + connect.WithHandlerOptions(opts...), + ) + stencilServiceDeleteSchemaHandler := connect.NewUnaryHandler( + StencilServiceDeleteSchemaProcedure, + svc.DeleteSchema, + connect.WithSchema(stencilServiceMethods.ByName("DeleteSchema")), + connect.WithHandlerOptions(opts...), + ) + stencilServiceGetSchemaHandler := connect.NewUnaryHandler( + StencilServiceGetSchemaProcedure, + svc.GetSchema, + connect.WithSchema(stencilServiceMethods.ByName("GetSchema")), + connect.WithHandlerOptions(opts...), + ) + stencilServiceListVersionsHandler := connect.NewUnaryHandler( + StencilServiceListVersionsProcedure, + svc.ListVersions, + connect.WithSchema(stencilServiceMethods.ByName("ListVersions")), + connect.WithHandlerOptions(opts...), + ) + stencilServiceDeleteVersionHandler := connect.NewUnaryHandler( + StencilServiceDeleteVersionProcedure, + svc.DeleteVersion, + connect.WithSchema(stencilServiceMethods.ByName("DeleteVersion")), + connect.WithHandlerOptions(opts...), + ) + stencilServiceSearchHandler := connect.NewUnaryHandler( + StencilServiceSearchProcedure, + svc.Search, + connect.WithSchema(stencilServiceMethods.ByName("Search")), + connect.WithHandlerOptions(opts...), + ) + return "/raystack.stencil.v1beta1.StencilService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + switch r.URL.Path { + case StencilServiceListNamespacesProcedure: + stencilServiceListNamespacesHandler.ServeHTTP(w, r) + case StencilServiceGetNamespaceProcedure: + stencilServiceGetNamespaceHandler.ServeHTTP(w, r) + case StencilServiceCreateNamespaceProcedure: + stencilServiceCreateNamespaceHandler.ServeHTTP(w, r) + case StencilServiceUpdateNamespaceProcedure: + stencilServiceUpdateNamespaceHandler.ServeHTTP(w, r) + case StencilServiceDeleteNamespaceProcedure: + stencilServiceDeleteNamespaceHandler.ServeHTTP(w, r) + case StencilServiceListSchemasProcedure: + stencilServiceListSchemasHandler.ServeHTTP(w, r) + case StencilServiceCreateSchemaProcedure: + stencilServiceCreateSchemaHandler.ServeHTTP(w, r) + case StencilServiceCheckCompatibilityProcedure: + stencilServiceCheckCompatibilityHandler.ServeHTTP(w, r) + case StencilServiceGetSchemaMetadataProcedure: + stencilServiceGetSchemaMetadataHandler.ServeHTTP(w, r) + case StencilServiceUpdateSchemaMetadataProcedure: + stencilServiceUpdateSchemaMetadataHandler.ServeHTTP(w, r) + case StencilServiceGetLatestSchemaProcedure: + stencilServiceGetLatestSchemaHandler.ServeHTTP(w, r) + case StencilServiceDeleteSchemaProcedure: + stencilServiceDeleteSchemaHandler.ServeHTTP(w, r) + case StencilServiceGetSchemaProcedure: + stencilServiceGetSchemaHandler.ServeHTTP(w, r) + case StencilServiceListVersionsProcedure: + stencilServiceListVersionsHandler.ServeHTTP(w, r) + case StencilServiceDeleteVersionProcedure: + stencilServiceDeleteVersionHandler.ServeHTTP(w, r) + case StencilServiceSearchProcedure: + stencilServiceSearchHandler.ServeHTTP(w, r) + default: + http.NotFound(w, r) + } + }) +} + +// UnimplementedStencilServiceHandler returns CodeUnimplemented from all methods. +type UnimplementedStencilServiceHandler struct{} + +func (UnimplementedStencilServiceHandler) ListNamespaces(context.Context, *connect.Request[v1beta1.ListNamespacesRequest]) (*connect.Response[v1beta1.ListNamespacesResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.stencil.v1beta1.StencilService.ListNamespaces is not implemented")) +} + +func (UnimplementedStencilServiceHandler) GetNamespace(context.Context, *connect.Request[v1beta1.GetNamespaceRequest]) (*connect.Response[v1beta1.GetNamespaceResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.stencil.v1beta1.StencilService.GetNamespace is not implemented")) +} + +func (UnimplementedStencilServiceHandler) CreateNamespace(context.Context, *connect.Request[v1beta1.CreateNamespaceRequest]) (*connect.Response[v1beta1.CreateNamespaceResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.stencil.v1beta1.StencilService.CreateNamespace is not implemented")) +} + +func (UnimplementedStencilServiceHandler) UpdateNamespace(context.Context, *connect.Request[v1beta1.UpdateNamespaceRequest]) (*connect.Response[v1beta1.UpdateNamespaceResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.stencil.v1beta1.StencilService.UpdateNamespace is not implemented")) +} + +func (UnimplementedStencilServiceHandler) DeleteNamespace(context.Context, *connect.Request[v1beta1.DeleteNamespaceRequest]) (*connect.Response[v1beta1.DeleteNamespaceResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.stencil.v1beta1.StencilService.DeleteNamespace is not implemented")) +} + +func (UnimplementedStencilServiceHandler) ListSchemas(context.Context, *connect.Request[v1beta1.ListSchemasRequest]) (*connect.Response[v1beta1.ListSchemasResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.stencil.v1beta1.StencilService.ListSchemas is not implemented")) +} + +func (UnimplementedStencilServiceHandler) CreateSchema(context.Context, *connect.Request[v1beta1.CreateSchemaRequest]) (*connect.Response[v1beta1.CreateSchemaResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.stencil.v1beta1.StencilService.CreateSchema is not implemented")) +} + +func (UnimplementedStencilServiceHandler) CheckCompatibility(context.Context, *connect.Request[v1beta1.CheckCompatibilityRequest]) (*connect.Response[v1beta1.CheckCompatibilityResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.stencil.v1beta1.StencilService.CheckCompatibility is not implemented")) +} + +func (UnimplementedStencilServiceHandler) GetSchemaMetadata(context.Context, *connect.Request[v1beta1.GetSchemaMetadataRequest]) (*connect.Response[v1beta1.GetSchemaMetadataResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.stencil.v1beta1.StencilService.GetSchemaMetadata is not implemented")) +} + +func (UnimplementedStencilServiceHandler) UpdateSchemaMetadata(context.Context, *connect.Request[v1beta1.UpdateSchemaMetadataRequest]) (*connect.Response[v1beta1.UpdateSchemaMetadataResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.stencil.v1beta1.StencilService.UpdateSchemaMetadata is not implemented")) +} + +func (UnimplementedStencilServiceHandler) GetLatestSchema(context.Context, *connect.Request[v1beta1.GetLatestSchemaRequest]) (*connect.Response[v1beta1.GetLatestSchemaResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.stencil.v1beta1.StencilService.GetLatestSchema is not implemented")) +} + +func (UnimplementedStencilServiceHandler) DeleteSchema(context.Context, *connect.Request[v1beta1.DeleteSchemaRequest]) (*connect.Response[v1beta1.DeleteSchemaResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.stencil.v1beta1.StencilService.DeleteSchema is not implemented")) +} + +func (UnimplementedStencilServiceHandler) GetSchema(context.Context, *connect.Request[v1beta1.GetSchemaRequest]) (*connect.Response[v1beta1.GetSchemaResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.stencil.v1beta1.StencilService.GetSchema is not implemented")) +} + +func (UnimplementedStencilServiceHandler) ListVersions(context.Context, *connect.Request[v1beta1.ListVersionsRequest]) (*connect.Response[v1beta1.ListVersionsResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.stencil.v1beta1.StencilService.ListVersions is not implemented")) +} + +func (UnimplementedStencilServiceHandler) DeleteVersion(context.Context, *connect.Request[v1beta1.DeleteVersionRequest]) (*connect.Response[v1beta1.DeleteVersionResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.stencil.v1beta1.StencilService.DeleteVersion is not implemented")) +} + +func (UnimplementedStencilServiceHandler) Search(context.Context, *connect.Request[v1beta1.SearchRequest]) (*connect.Response[v1beta1.SearchResponse], error) { + return nil, connect.NewError(connect.CodeUnimplemented, errors.New("raystack.stencil.v1beta1.StencilService.Search is not implemented")) +} diff --git a/go.mod b/go.mod index 6a336a34..0d733b67 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,13 @@ module github.com/raystack/stencil -go 1.24 - -toolchain go1.24.0 +go 1.24.0 require ( + buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.11-20260415201107-50325440f8f2.1 + connectrpc.com/connect v1.19.2 + connectrpc.com/cors v0.1.0 + connectrpc.com/grpcreflect v1.3.0 + connectrpc.com/validate v0.6.0 github.com/MakeNowJust/heredoc v1.0.0 github.com/alecthomas/chroma v0.10.0 github.com/dgraph-io/ristretto v0.2.0 @@ -13,33 +16,30 @@ require ( github.com/georgysavva/scany v1.2.3 github.com/golang-migrate/migrate/v4 v4.18.2 github.com/google/uuid v1.6.0 - github.com/gorilla/mux v1.8.1 - github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 - github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 github.com/hamba/avro v1.8.0 github.com/jackc/pgconn v1.14.3 github.com/jackc/pgx/v4 v4.18.3 github.com/jhump/protoreflect v1.17.0 - github.com/newrelic/go-agent/v3 v3.37.0 - github.com/newrelic/go-agent/v3/integrations/nrgrpc v1.4.5 github.com/pkg/errors v0.9.1 github.com/raystack/salt v0.6.2 + github.com/rs/cors v1.11.1 github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 github.com/spf13/cobra v1.9.1 - github.com/stretchr/testify v1.10.0 + github.com/stretchr/testify v1.11.1 github.com/yudai/gojsondiff v1.0.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 golang.org/x/net v0.37.0 - google.golang.org/genproto/googleapis/api v0.0.0-20250313205543-e70fdf4c4cb4 - google.golang.org/grpc v1.71.0 - google.golang.org/protobuf v1.36.5 + google.golang.org/protobuf v1.36.11 ) require ( + buf.build/go/protovalidate v1.0.0 // indirect + cel.dev/expr v0.24.0 // indirect github.com/AlecAivazis/survey/v2 v2.3.7 // indirect github.com/NYTimes/gziphandler v1.1.1 // indirect github.com/alecthomas/chroma/v2 v2.15.0 // indirect + github.com/antlr4-go/antlr/v4 v4.13.1 // indirect github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/aymerick/douceur v0.2.0 // indirect github.com/briandowns/spinner v1.23.2 // indirect @@ -62,6 +62,7 @@ require ( github.com/go-playground/validator v9.31.0+incompatible // indirect github.com/go-viper/mapstructure/v2 v2.2.1 // indirect github.com/golang/protobuf v1.5.4 // indirect + github.com/google/cel-go v0.26.1 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect github.com/gorilla/css v1.0.1 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect @@ -92,12 +93,12 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/muesli/reflow v0.3.0 // indirect github.com/muesli/termenv v0.16.0 // indirect - github.com/newrelic/csec-go-agent v1.6.0 // indirect github.com/nxadm/tail v1.4.11 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/pelletier/go-toml/v2 v2.2.3 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/rivo/uniseg v0.4.7 // indirect + github.com/rogpeppe/go-internal v1.13.1 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/sagikazarmark/locafero v0.8.0 // indirect github.com/schollz/progressbar/v3 v3.18.0 // indirect @@ -107,6 +108,7 @@ require ( github.com/spf13/cast v1.7.1 // indirect github.com/spf13/pflag v1.0.6 // indirect github.com/spf13/viper v1.20.0 // indirect + github.com/stoewer/go-strcase v1.3.1 // indirect github.com/stretchr/objx v0.5.2 // indirect github.com/subosito/gotenv v1.6.0 // indirect github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect @@ -114,13 +116,16 @@ require ( github.com/yudai/pp v2.0.1+incompatible // indirect github.com/yuin/goldmark v1.7.8 // indirect github.com/yuin/goldmark-emoji v1.0.5 // indirect + go.opentelemetry.io/otel/metric v1.34.0 // indirect + go.opentelemetry.io/otel/trace v1.34.0 // indirect go.uber.org/atomic v1.11.0 // indirect - golang.org/x/arch v0.15.0 // indirect golang.org/x/crypto v0.36.0 // indirect - golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 // indirect + golang.org/x/exp v0.0.0-20250911091902-df9299821621 // indirect golang.org/x/sys v0.31.0 // indirect golang.org/x/term v0.30.0 // indirect - golang.org/x/text v0.23.0 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20250313205543-e70fdf4c4cb4 // indirect + golang.org/x/text v0.29.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20250922171735-9219d122eba9 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20250922171735-9219d122eba9 // indirect + gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index fa63cf5c..c77afc1f 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,17 @@ -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.11-20260415201107-50325440f8f2.1 h1:s6hzCXtND/ICdGPTMGk7C+/BFlr2Jg5GyH0NKf4XGXg= +buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.11-20260415201107-50325440f8f2.1/go.mod h1:tvtbpgaVXZX4g6Pn+AnzFycuRK3MOz5HJfEGeEllXYM= +buf.build/go/protovalidate v1.0.0 h1:IAG1etULddAy93fiBsFVhpj7es5zL53AfB/79CVGtyY= +buf.build/go/protovalidate v1.0.0/go.mod h1:KQmEUrcQuC99hAw+juzOEAmILScQiKBP1Oc36vvCLW8= +cel.dev/expr v0.24.0 h1:56OvJKSH3hDGL0ml5uSxZmz3/3Pq4tJ+fb1unVLAFcY= +cel.dev/expr v0.24.0/go.mod h1:hLPLo1W4QUmuYdA72RBX06QTs6MXw941piREPl3Yfiw= +connectrpc.com/connect v1.19.2 h1:McQ83FGdzL+t60peksi0gXC7MQ/iLKgLduAnThbM0mo= +connectrpc.com/connect v1.19.2/go.mod h1:tN20fjdGlewnSFeZxLKb0xwIZ6ozc3OQs2hTXy4du9w= +connectrpc.com/cors v0.1.0 h1:f3gTXJyDZPrDIZCQ567jxfD9PAIpopHiRDnJRt3QuOQ= +connectrpc.com/cors v0.1.0/go.mod h1:v8SJZCPfHtGH1zsm+Ttajpozd4cYIUryl4dFB6QEpfg= +connectrpc.com/grpcreflect v1.3.0 h1:Y4V+ACf8/vOb1XOc251Qun7jMB75gCUNw6llvB9csXc= +connectrpc.com/grpcreflect v1.3.0/go.mod h1:nfloOtCS8VUQOQ1+GTdFzVg2CJo4ZGaat8JIovCtDYs= +connectrpc.com/validate v0.6.0 h1:DcrgDKt2ZScrUs/d/mh9itD2yeEa0UbBBa+i0mwzx+4= +connectrpc.com/validate v0.6.0/go.mod h1:ihrpI+8gVbLH1fvVWJL1I3j0CfWnF8P/90LsmluRiZs= github.com/AlecAivazis/survey/v2 v2.3.7 h1:6I/u8FvytdGsgonrYsVn2t8t4QiRnh6QSTqkkhIiSjQ= github.com/AlecAivazis/survey/v2 v2.3.7/go.mod h1:xUTIdE4KCOIjsBAE1JYsUPoCqYdZ1reCfTwbto0Fduo= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= @@ -13,8 +26,6 @@ github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cq github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 h1:+vx7roKuyA63nhn5WAunQHLTznkw5W8b1Xc0dNjp83s= github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2/go.mod h1:HBCaDeC1lPdgDeDbhX8XFpy1jqjK0IBG8W5K+xYqA0w= -github.com/adhocore/gronx v1.19.1 h1:S4c3uVp5jPjnk00De0lslyTenGJ4nA3Ydbkj1SbdPVc= -github.com/adhocore/gronx v1.19.1/go.mod h1:7oUY1WAU8rEJWmAxXR2DN0JaO4gi9khSgKjiRypqteg= github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8vS6K3D0= github.com/alecthomas/assert/v2 v2.11.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k= github.com/alecthomas/chroma v0.10.0 h1:7XDcGkCQopCNKjZHfYrNLraA+M7e0fMiJ/Mfikbfjek= @@ -23,18 +34,18 @@ github.com/alecthomas/chroma/v2 v2.15.0 h1:LxXTQHFoYrstG2nnV9y2X5O94sOBzf0CIUpST github.com/alecthomas/chroma/v2 v2.15.0/go.mod h1:gUhVLrPDXPtp/f+L1jo9xepo9gL4eLwRuGAunSZMkio= github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc= github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4= +github.com/antlr4-go/antlr/v4 v4.13.1 h1:SqQKkuVZ+zWkMMNkjy5FZe5mr5WURWnlpmOuzYWrPrQ= +github.com/antlr4-go/antlr/v4 v4.13.1/go.mod h1:GKmUxMtwp6ZgGwZSva4eWPC5mS6vUAmOABFgjdkM7Nw= github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= github.com/aymanbagabas/go-udiff v0.2.0 h1:TK0fH4MteXUDspT88n8CKzvK0X9O2xu9yQjWpi6yML8= github.com/aymanbagabas/go-udiff v0.2.0/go.mod h1:RE4Ex0qsGkTAJoQdQQCA0uG+nAzJO/pI/QwceO5fgrA= github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= -github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/briandowns/spinner v1.23.2 h1:Zc6ecUnI+YzLmJniCfDNaMbW0Wid1d5+qcTq4L2FW8w= github.com/briandowns/spinner v1.23.2/go.mod h1:LaZeM4wm2Ywy6vO571mvhQNRcWfRUnXOs0RcKV0wYKM= github.com/bufbuild/protocompile v0.14.1 h1:iA73zAf/fyljNjQKwYzUHD6AD4R8KMasmwa/FBatYVw= github.com/bufbuild/protocompile v0.14.1/go.mod h1:ppVdAIhbr2H8asPk6k4pY7t9zB1OU5DoEw9xY/FUi1c= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc h1:4pZI35227imm7yK2bGPcfpFEmuY1gc2YSTShr4iJBfs= @@ -55,8 +66,6 @@ github.com/chengxilo/virtualterm v1.0.4 h1:Z6IpERbRVlfB8WkOmtbHiDbBANU7cimRIof7m github.com/chengxilo/virtualterm v1.0.4/go.mod h1:DyxxBZz/x1iqJjFxTFcr6/x+jSpqN0iwWCOK1q10rlY= github.com/cli/safeexec v1.0.1 h1:e/C79PbXF4yYTN/wauC4tviMxEV13BwljGj0N9j+N00= github.com/cli/safeexec v1.0.1/go.mod h1:Z/D4tTN8Vs5gXYHDCbaM1S/anmEDnJb1iW0+EJ5zx3Q= -github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= -github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/cockroachdb/cockroach-go/v2 v2.2.0 h1:/5znzg5n373N/3ESjHF5SMLxiW4RKB05Ql//KWfeTFs= @@ -93,10 +102,6 @@ github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkp github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/emicklei/dot v1.8.0 h1:HnD60yAKFAevNeT+TPYr9pb8VB9bqdeSo0nzwIW6IOI= github.com/emicklei/dot v1.8.0/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= -github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= -github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= -github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM= github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= @@ -133,15 +138,11 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-migrate/migrate/v4 v4.18.2 h1:2VSCMz7x7mjyTXx3m2zPokOY82LTRgxK1yQYKo6wWQ8= github.com/golang-migrate/migrate/v4 v4.18.2/go.mod h1:2CM6tJvn2kqPXwnXO/d3rAQYiyoIm180VsO8PRX6Rpk= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= -github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/cel-go v0.26.1 h1:iPbVVEdkhTX++hpe3lzSk7D3G3QSYqLGoHOcEio+UXQ= +github.com/google/cel-go v0.26.1/go.mod h1:A9O8OU9rdvrK5MQyrqfIxo1a0u4g3sF8KB6PUIaryMM= github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -152,14 +153,6 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/css v1.0.1 h1:ntNaBIghp6JmvWnxbZKANoLyuXTPZ4cAMlo6RyhlbO8= github.com/gorilla/css v1.0.1/go.mod h1:BvnYkspnSzMmwRK+b8/xgNPLiIuNZr6vbZBTPQ2A3b0= -github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= -github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI= -github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3 h1:5ZPtiqj0JL5oKWmcsq4VMaAW5ukBEgSGXEN89zeH1Jo= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.26.3/go.mod h1:ndYquD05frm2vACXE1nsccT4oJzjhw2arTS2cpUD1PI= github.com/hamba/avro v1.8.0 h1:eCVrLX7UYThA3R3yBZ+rpmafA5qTc3ZjpTz6gYJoVGU= github.com/hamba/avro v1.8.0/go.mod h1:NiGUcrLLT+CKfGu5REWQtD9OVPPYUGMVFiC+DE0lQfY= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -249,15 +242,13 @@ github.com/jinzhu/now v1.1.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/ github.com/jmoiron/sqlx v1.3.1/go.mod h1:2BljVx/86SuTyjE+aPYlHCTNvZrnJXghYGpNiXLBMCQ= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/k2io/hookingo v1.0.6 h1:HBSKd1tNbW5BCj8VLNqemyBKjrQ8g0HkXcbC/DEHODE= -github.com/k2io/hookingo v1.0.6/go.mod h1:2L1jdNjdB3NkbzSVv9Q5fq7SJhRkWyAhe65XsAp5iXk= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= @@ -320,14 +311,6 @@ github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s= github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8= github.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc= github.com/muesli/termenv v0.16.0/go.mod h1:ZRfOIKPFDYQoDFF4Olj7/QJbW60Ol/kL1pU3VfY/Cnk= -github.com/newrelic/csec-go-agent v1.6.0 h1:OCShRZgiE+kg37jk+QXHw9e9EQ9BvLOeQTk+ovJhnrE= -github.com/newrelic/csec-go-agent v1.6.0/go.mod h1:LiLGm6a+q+hkmTnrxrYw1ToToirThOHydjrrLMtci5M= -github.com/newrelic/go-agent/v3 v3.37.0 h1:vAidwr7gUThxT+NvxDG3qUxgeuJbzxhYAEeiKtPn/ig= -github.com/newrelic/go-agent/v3 v3.37.0/go.mod h1:4QXvru0vVy/iu7mfkNHT7T2+9TC9zPGO8aUEdKqY138= -github.com/newrelic/go-agent/v3/integrations/nrgrpc v1.4.5 h1:wekCqkQLJbYHim2exa1K+Rqsl07J3e3NlnfrYc7pwV4= -github.com/newrelic/go-agent/v3/integrations/nrgrpc v1.4.5/go.mod h1:dDoaVvDchfHQjY9uZxARWym0hquX+80nCQHRNu0RN3c= -github.com/newrelic/go-agent/v3/integrations/nrsecurityagent v1.1.0 h1:gqkTDYUHWUyiG+u0PJQCRh98rcHLxP/w7GtIbJDVULY= -github.com/newrelic/go-agent/v3/integrations/nrsecurityagent v1.1.0/go.mod h1:3wugGvRmOVYov/08y+D8tB1uYIZds5bweVdr5vo4Gbs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY= github.com/nxadm/tail v1.4.11/go.mod h1:OTaG3NK980DZzxbRq6lEuzgU+mug70nY11sMd4JXXHc= @@ -341,7 +324,6 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M= github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -350,7 +332,6 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/raystack/salt v0.6.2 h1:GPUQ6j3h3cFd3k42Lds1xbG672yvhUjO9ut9oAJqW9M= github.com/raystack/salt v0.6.2/go.mod h1:Dwc5VlPevdY56XgYjWd+Ubkil7ohCM4526dkAuWnGN4= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= @@ -358,8 +339,10 @@ github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJ github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= -github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= +github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= +github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= @@ -392,6 +375,8 @@ github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o= github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.20.0 h1:zrxIyR3RQIOsarIrgL8+sAvALXul9jeEPa06Y0Ph6vY= github.com/spf13/viper v1.20.0/go.mod h1:P9Mdzt1zoHIG8m2eZQinpiBjo6kCmZSKBClNNqjJvu4= +github.com/stoewer/go-strcase v1.3.1 h1:iS0MdW+kVTxgMoE1LAZyMiYJFKlOzLooE4MxjirtkAs= +github.com/stoewer/go-strcase v1.3.1/go.mod h1:fAH5hQ5pehh+j3nZfvwdk2RgEgQjAoM8wodgtPmh1xo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= @@ -409,8 +394,8 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= -github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no= @@ -421,8 +406,6 @@ github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 h1:BHyfKlQyqbsFN5p3Ifn github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM= github.com/yudai/pp v2.0.1+incompatible h1:Q4//iY4pNF6yPLZIigmvcl7k/bPgrcTPIFIcmawg5bI= github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yuin/goldmark v1.7.1/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E= github.com/yuin/goldmark v1.7.8 h1:iERMLn0/QJeHFhxSt3p6PeN9mGnvIKSpG9YYorDMnic= @@ -438,37 +421,27 @@ go.opentelemetry.io/otel v1.34.0 h1:zRLXxLCgL1WyKsPVrgbSdMN4c0FMkDAskSTQP+0hdUY= go.opentelemetry.io/otel v1.34.0/go.mod h1:OWFPOQ+h4G8xpyjgqo4SxJYdDQ/qmRH+wivy7zzx9oI= go.opentelemetry.io/otel/metric v1.34.0 h1:+eTR3U0MyfWjRDhmFMxe2SsW64QrZ84AOhvqS7Y+PoQ= go.opentelemetry.io/otel/metric v1.34.0/go.mod h1:CEDrp0fy2D0MvkXE+dPV7cMi8tWZwX3dmaIhwPOaqHE= -go.opentelemetry.io/otel/sdk v1.34.0 h1:95zS4k/2GOy069d321O8jWgYsW3MzVV+KuSPKp7Wr1A= -go.opentelemetry.io/otel/sdk v1.34.0/go.mod h1:0e/pNiaMAqaykJGKbi+tSjWfNNHMTxoC9qANsCzbyxU= -go.opentelemetry.io/otel/sdk/metric v1.34.0 h1:5CeK9ujjbFVL5c1PhLuStg1wxA7vQv7ce1EK0Gyvahk= -go.opentelemetry.io/otel/sdk/metric v1.34.0/go.mod h1:jQ/r8Ze28zRKoNRdkjCZxfs6YvBTG1+YIqyFVFYec5w= go.opentelemetry.io/otel/trace v1.34.0 h1:+ouXS2V8Rd4hp4580a8q23bg0azF2nI8cqLYnC8mh/k= go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= -go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= -go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= -go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8= go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E= -golang.org/x/arch v0.15.0 h1:QtOrQd0bTUnhNVNndMpLHNWrDmYzZ2KDqSrEymqInZw= -golang.org/x/arch v0.15.0/go.mod h1:JmwW7aLIoRUKgaTzhkiEFxvcEiQGyOg9BMonBJUS7EE= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -486,28 +459,17 @@ golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDf golang.org/x/crypto v0.20.0/go.mod h1:Xwo95rrVNIoSMx9wa1JroENMToLWn3RNVrTBpLHgZPQ= golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34= golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc= -golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20250305212735-054e65f0b394 h1:nDVHiLt8aIbd/VzvPWN6kSOPE7+F/fNFDSXLVYkE/Iw= -golang.org/x/exp v0.0.0-20250305212735-054e65f0b394/go.mod h1:sIifuuw/Yco/y6yb6+bDNfyeQ/MdPUy/hKEMYQV17cM= -golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/exp v0.0.0-20250911091902-df9299821621 h1:2id6c1/gto0kaHYyrixvknJ8tUK/Qs5IsmBtrc+FtgU= +golang.org/x/exp v0.0.0-20250911091902-df9299821621/go.mod h1:TwQYMMnGpvZyc+JpB/UAuTNIsVJifOlSkrZkhcvpVUk= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= @@ -515,17 +477,11 @@ golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/net v0.37.0 h1:1zLorHbz+LYj7MQlSf1+2tPIIgibq2eL5xkrGk6f+2c= golang.org/x/net v0.37.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.12.0 h1:MHc5BpPuC30uJk597Ri8TV3CNZcTLu6B6z4lJy+g6Jw= -golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= -golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug= +golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -537,11 +493,9 @@ golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -570,23 +524,17 @@ golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= -golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= +golang.org/x/text v0.29.0 h1:1neNs90w9YzJ9BocxfsQNHKuAT4pkghyXc4nhZ6sJvk= +golang.org/x/text v0.29.0/go.mod h1:7MhJOA9CD2qZyOKYazxdYMF85OwPdEr9jTtBpO7ydH4= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -595,24 +543,14 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= -google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto/googleapis/api v0.0.0-20250313205543-e70fdf4c4cb4 h1:IFnXJq3UPB3oBREOodn1v1aGQeZYQclEmvWRMN0PSsY= -google.golang.org/genproto/googleapis/api v0.0.0-20250313205543-e70fdf4c4cb4/go.mod h1:c8q6Z6OCqnfVIqUFJkCzKcrj8eCvUrz+K4KRzSTuANg= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250313205543-e70fdf4c4cb4 h1:iK2jbkWL86DXjEx0qiHcRE9dE4/Ahua5k6V8OWFb//c= -google.golang.org/genproto/googleapis/rpc v0.0.0-20250313205543-e70fdf4c4cb4/go.mod h1:LuRYeWDFV6WOn90g357N17oMCaxpgCnbi/44qJvDn2I= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= -google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= -google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/genproto/googleapis/api v0.0.0-20250922171735-9219d122eba9 h1:jm6v6kMRpTYKxBRrDkYAitNJegUeO1Mf3Kt80obv0gg= +google.golang.org/genproto/googleapis/api v0.0.0-20250922171735-9219d122eba9/go.mod h1:LmwNphe5Afor5V3R5BppOULHOnt2mCIf+NxMd4XiygE= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250922171735-9219d122eba9 h1:V1jCN2HBa8sySkR5vLcCSqJSTMv093Rw9EJefhQGP7M= +google.golang.org/genproto/googleapis/rpc v0.0.0-20250922171735-9219d122eba9/go.mod h1:HSkG/KdJWusxU1F6CNrwNDjBMgisKxGnc5dAZfT0mjQ= google.golang.org/grpc v1.71.0 h1:kF77BGdPTQ4/JZWMlb9VpJ5pa25aqvVqogsxNHHdeBg= google.golang.org/grpc v1.71.0/go.mod h1:H0GRtasmQOh9LkFoCPDu3ZrwUtD1YGE+b2vYBYd/8Ec= -google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM= -google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE= +google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -626,16 +564,12 @@ gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:a gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gorm.io/driver/postgres v1.0.8/go.mod h1:4eOzrI1MUfm6ObJU/UcmbXyiHSs8jSwH95G5P5dxcAg= gorm.io/gorm v1.20.12/go.mod h1:0HFTzE/SqkGTzK6TlDPPQbAYCluiVvhzoA1+aVyzenw= gorm.io/gorm v1.21.4/go.mod h1:0HFTzE/SqkGTzK6TlDPPQbAYCluiVvhzoA1+aVyzenw= -honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= -honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= diff --git a/internal/api/api.go b/internal/api/api.go index d0ec6015..3c8b5ef3 100644 --- a/internal/api/api.go +++ b/internal/api/api.go @@ -2,22 +2,16 @@ package api import ( "context" - "fmt" + "encoding/json" + "io" "net/http" "strconv" - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/newrelic/go-agent/v3/newrelic" "github.com/raystack/stencil/core/namespace" "github.com/raystack/stencil/core/schema" "github.com/raystack/stencil/core/search" - stencilv1beta1 "github.com/raystack/stencil/proto/raystack/stencil/v1beta1" - "google.golang.org/grpc/health/grpc_health_v1" ) -type getSchemaData func(http.ResponseWriter, *http.Request, map[string]string) (*schema.Metadata, []byte, error) -type errHandleFunc func(http.ResponseWriter, *http.Request, map[string]string) error - type NamespaceService interface { Create(ctx context.Context, ns namespace.Namespace) (namespace.Namespace, error) Update(ctx context.Context, ns namespace.Namespace) (namespace.Namespace, error) @@ -44,8 +38,6 @@ type SearchService interface { } type API struct { - stencilv1beta1.UnimplementedStencilServiceServer - grpc_health_v1.UnimplementedHealthServer namespace NamespaceService schema SchemaService search SearchService @@ -59,57 +51,113 @@ func NewAPI(namespace NamespaceService, schema SchemaService, search SearchServi } } -// RegisterSchemaHandlers registers HTTP handlers for schema download -func (a *API) RegisterSchemaHandlers(mux *runtime.ServeMux, app *newrelic.Application) { - mux.HandlePath("GET", "/ping", func(w http.ResponseWriter, r *http.Request, pathParams map[string]string) { - fmt.Fprint(w, "pong") - }) - mux.HandlePath(wrapHandler(app, "GET", "/v1beta1/namespaces/{namespace}/schemas/{name}/versions/{version}", handleSchemaResponse(mux, a.HTTPGetSchema))) - mux.HandlePath(wrapHandler(app, "GET", "/v1beta1/namespaces/{namespace}/schemas/{name}", handleSchemaResponse(mux, a.HTTPLatestSchema))) - mux.HandlePath(wrapHandler(app, "POST", "/v1beta1/namespaces/{namespace}/schemas/{name}", wrapErrHandler(mux, a.HTTPUpload))) - mux.HandlePath(wrapHandler(app, "POST", "/v1beta1/namespaces/{namespace}/schemas/{name}/check", wrapErrHandler(mux, a.HTTPCheckCompatibility))) +// RegisterSchemaHandlers registers custom HTTP handlers for schema binary endpoints. +// These serve raw schema bytes (protobuf/JSON) rather than standard RPC responses. +func (a *API) RegisterSchemaHandlers(mux *http.ServeMux) { + mux.HandleFunc("GET /v1beta1/namespaces/{namespace}/schemas/{name}/versions/{version}", a.handleGetSchema) + mux.HandleFunc("GET /v1beta1/namespaces/{namespace}/schemas/{name}", a.handleGetLatestSchema) + mux.HandleFunc("POST /v1beta1/namespaces/{namespace}/schemas/{name}", a.handleUploadSchema) + mux.HandleFunc("POST /v1beta1/namespaces/{namespace}/schemas/{name}/check", a.handleCheckCompatibility) } -func handleSchemaResponse(mux *runtime.ServeMux, getSchemaFn getSchemaData) runtime.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request, pathParams map[string]string) { - meta, data, err := getSchemaFn(w, r, pathParams) - if err != nil { - _, outbound := runtime.MarshalerForRequest(mux, r) - runtime.HTTPError(r.Context(), mux, outbound, w, r, err) - return - } - contentType := "application/json" - if meta.Format == "FORMAT_PROTOBUF" { - contentType = "application/octet-stream" - } - w.Header().Set("Content-Type", contentType) - w.Header().Set("Content-Length", strconv.Itoa(len(data))) - w.WriteHeader(http.StatusOK) - w.Write(data) +func (a *API) handleGetSchema(w http.ResponseWriter, r *http.Request) { + namespaceID := r.PathValue("namespace") + schemaName := r.PathValue("name") + versionStr := r.PathValue("version") + + v, err := strconv.ParseInt(versionStr, 10, 32) + if err != nil { + writeError(w, http.StatusBadRequest, "invalid version number") + return + } + + meta, data, err := a.schema.Get(r.Context(), namespaceID, schemaName, int32(v)) + if err != nil { + writeServiceError(w, err) + return } + + writeSchemaResponse(w, meta, data) } -func wrapErrHandler(mux *runtime.ServeMux, handler errHandleFunc) runtime.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request, pathParams map[string]string) { - err := handler(w, r, pathParams) - if err != nil { - _, outbound := runtime.MarshalerForRequest(mux, r) - runtime.DefaultHTTPErrorHandler(r.Context(), mux, outbound, w, r, err) - return - } +func (a *API) handleGetLatestSchema(w http.ResponseWriter, r *http.Request) { + namespaceID := r.PathValue("namespace") + schemaName := r.PathValue("name") + + meta, data, err := a.schema.GetLatest(r.Context(), namespaceID, schemaName) + if err != nil { + writeServiceError(w, err) + return + } + + writeSchemaResponse(w, meta, data) +} + +func (a *API) handleUploadSchema(w http.ResponseWriter, r *http.Request) { + data, err := readBody(r) + if err != nil { + writeError(w, http.StatusBadRequest, "failed to read request body") + return + } + + format := r.Header.Get("X-Format") + compatibility := r.Header.Get("X-Compatibility") + metadata := &schema.Metadata{Format: format, Compatibility: compatibility} + namespaceID := r.PathValue("namespace") + schemaName := r.PathValue("name") + + sc, err := a.schema.Create(r.Context(), namespaceID, schemaName, metadata, data) + if err != nil { + writeServiceError(w, err) + return } + + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(http.StatusCreated) + json.NewEncoder(w).Encode(sc) } -func wrapHandler(app *newrelic.Application, method, pattern string, handler runtime.HandlerFunc) (string, string, runtime.HandlerFunc) { - if app == nil { - return method, pattern, handler +func (a *API) handleCheckCompatibility(w http.ResponseWriter, r *http.Request) { + data, err := readBody(r) + if err != nil { + writeError(w, http.StatusBadRequest, "failed to read request body") + return + } + + compatibility := r.Header.Get("X-Compatibility") + namespaceID := r.PathValue("namespace") + schemaName := r.PathValue("name") + + if err := a.schema.CheckCompatibility(r.Context(), namespaceID, schemaName, compatibility, data); err != nil { + writeServiceError(w, err) + return } - return method, pattern, func(w http.ResponseWriter, r *http.Request, pathParams map[string]string) { - txn := app.StartTransaction(method + " " + pattern) - defer txn.End() - w = txn.SetWebResponse(w) - txn.SetWebRequestHTTP(r) - r = newrelic.RequestWithTransactionContext(r, txn) - handler(w, r, pathParams) + + w.WriteHeader(http.StatusOK) +} + +func writeSchemaResponse(w http.ResponseWriter, meta *schema.Metadata, data []byte) { + contentType := "application/json" + if meta.Format == "FORMAT_PROTOBUF" { + contentType = "application/octet-stream" } + w.Header().Set("Content-Type", contentType) + w.Header().Set("Content-Length", strconv.Itoa(len(data))) + w.WriteHeader(http.StatusOK) + w.Write(data) +} + +func writeError(w http.ResponseWriter, statusCode int, msg string) { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(statusCode) + json.NewEncoder(w).Encode(map[string]string{"error": msg}) +} + +func writeServiceError(w http.ResponseWriter, err error) { + writeError(w, http.StatusInternalServerError, err.Error()) +} + +func readBody(r *http.Request) ([]byte, error) { + defer r.Body.Close() + return io.ReadAll(r.Body) } diff --git a/internal/api/api_test.go b/internal/api/api_test.go index c38b7c5e..fe4979a6 100644 --- a/internal/api/api_test.go +++ b/internal/api/api_test.go @@ -1,17 +1,18 @@ package api_test import ( - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "net/http" + "github.com/raystack/stencil/internal/api" "github.com/raystack/stencil/internal/api/mocks" ) -func setup() (*mocks.NamespaceService, *mocks.SchemaService, *mocks.SearchService, *runtime.ServeMux, *api.API) { +func setup() (*mocks.NamespaceService, *mocks.SchemaService, *mocks.SearchService, *http.ServeMux, *api.API) { nsService := &mocks.NamespaceService{} schemaService := &mocks.SchemaService{} searchService := &mocks.SearchService{} - mux := runtime.NewServeMux() + mux := http.NewServeMux() v1beta1 := api.NewAPI(nsService, schemaService, searchService) - v1beta1.RegisterSchemaHandlers(mux, nil) + v1beta1.RegisterSchemaHandlers(mux) return nsService, schemaService, searchService, mux, v1beta1 } diff --git a/internal/api/namespace.go b/internal/api/namespace.go index f7e3bb58..51bdd128 100644 --- a/internal/api/namespace.go +++ b/internal/api/namespace.go @@ -3,8 +3,9 @@ package api import ( "context" + "connectrpc.com/connect" "github.com/raystack/stencil/core/namespace" - stencilv1beta1 "github.com/raystack/stencil/proto/raystack/stencil/v1beta1" + stencilv1beta1 "github.com/raystack/stencil/gen/raystack/stencil/v1beta1" "google.golang.org/protobuf/types/known/timestamppb" ) @@ -29,37 +30,49 @@ func namespaceToProto(ns namespace.Namespace) *stencilv1beta1.Namespace { } // CreateNamespace handler for creating namespace -func (a *API) CreateNamespace(ctx context.Context, in *stencilv1beta1.CreateNamespaceRequest) (*stencilv1beta1.CreateNamespaceResponse, error) { - ns := createNamespaceRequestToNamespace(in) +func (a *API) CreateNamespace(ctx context.Context, req *connect.Request[stencilv1beta1.CreateNamespaceRequest]) (*connect.Response[stencilv1beta1.CreateNamespaceResponse], error) { + ns := createNamespaceRequestToNamespace(req.Msg) newNamespace, err := a.namespace.Create(ctx, ns) - return &stencilv1beta1.CreateNamespaceResponse{Namespace: namespaceToProto(newNamespace)}, err + if err != nil { + return nil, err + } + return connect.NewResponse(&stencilv1beta1.CreateNamespaceResponse{Namespace: namespaceToProto(newNamespace)}), nil } -func (a *API) UpdateNamespace(ctx context.Context, in *stencilv1beta1.UpdateNamespaceRequest) (*stencilv1beta1.UpdateNamespaceResponse, error) { - ns, err := a.namespace.Update(ctx, namespace.Namespace{ID: in.GetId(), Format: in.GetFormat().String(), Compatibility: in.GetCompatibility().String(), Description: in.GetDescription()}) - return &stencilv1beta1.UpdateNamespaceResponse{Namespace: namespaceToProto(ns)}, err +func (a *API) UpdateNamespace(ctx context.Context, req *connect.Request[stencilv1beta1.UpdateNamespaceRequest]) (*connect.Response[stencilv1beta1.UpdateNamespaceResponse], error) { + ns, err := a.namespace.Update(ctx, namespace.Namespace{ID: req.Msg.GetId(), Format: req.Msg.GetFormat().String(), Compatibility: req.Msg.GetCompatibility().String(), Description: req.Msg.GetDescription()}) + if err != nil { + return nil, err + } + return connect.NewResponse(&stencilv1beta1.UpdateNamespaceResponse{Namespace: namespaceToProto(ns)}), nil } -func (a *API) GetNamespace(ctx context.Context, in *stencilv1beta1.GetNamespaceRequest) (*stencilv1beta1.GetNamespaceResponse, error) { - namespace, err := a.namespace.Get(ctx, in.GetId()) - return &stencilv1beta1.GetNamespaceResponse{Namespace: namespaceToProto(namespace)}, err +func (a *API) GetNamespace(ctx context.Context, req *connect.Request[stencilv1beta1.GetNamespaceRequest]) (*connect.Response[stencilv1beta1.GetNamespaceResponse], error) { + namespace, err := a.namespace.Get(ctx, req.Msg.GetId()) + if err != nil { + return nil, err + } + return connect.NewResponse(&stencilv1beta1.GetNamespaceResponse{Namespace: namespaceToProto(namespace)}), nil } // ListNamespaces handler for returning list of available namespaces -func (a *API) ListNamespaces(ctx context.Context, in *stencilv1beta1.ListNamespacesRequest) (*stencilv1beta1.ListNamespacesResponse, error) { +func (a *API) ListNamespaces(ctx context.Context, req *connect.Request[stencilv1beta1.ListNamespacesRequest]) (*connect.Response[stencilv1beta1.ListNamespacesResponse], error) { namespaces, err := a.namespace.List(ctx) + if err != nil { + return nil, err + } var nsp []*stencilv1beta1.Namespace for _, n := range namespaces { nsp = append(nsp, namespaceToProto(n)) } - return &stencilv1beta1.ListNamespacesResponse{Namespaces: nsp}, err + return connect.NewResponse(&stencilv1beta1.ListNamespacesResponse{Namespaces: nsp}), nil } -func (a *API) DeleteNamespace(ctx context.Context, in *stencilv1beta1.DeleteNamespaceRequest) (*stencilv1beta1.DeleteNamespaceResponse, error) { - err := a.namespace.Delete(ctx, in.GetId()) +func (a *API) DeleteNamespace(ctx context.Context, req *connect.Request[stencilv1beta1.DeleteNamespaceRequest]) (*connect.Response[stencilv1beta1.DeleteNamespaceResponse], error) { + err := a.namespace.Delete(ctx, req.Msg.GetId()) message := "success" if err != nil { message = "failed" } - return &stencilv1beta1.DeleteNamespaceResponse{Message: message}, err + return connect.NewResponse(&stencilv1beta1.DeleteNamespaceResponse{Message: message}), err } diff --git a/internal/api/ping.go b/internal/api/ping.go deleted file mode 100644 index b65c682d..00000000 --- a/internal/api/ping.go +++ /dev/null @@ -1,12 +0,0 @@ -package api - -import ( - "context" - - "google.golang.org/grpc/health/grpc_health_v1" -) - -// Check grpc health check -func (s *API) Check(ctx context.Context, in *grpc_health_v1.HealthCheckRequest) (*grpc_health_v1.HealthCheckResponse, error) { - return &grpc_health_v1.HealthCheckResponse{Status: grpc_health_v1.HealthCheckResponse_SERVING}, nil -} diff --git a/internal/api/schema.go b/internal/api/schema.go index a7df1564..64b4b194 100644 --- a/internal/api/schema.go +++ b/internal/api/schema.go @@ -2,15 +2,10 @@ package api import ( "context" - "encoding/json" - "errors" - "io" - "net/http" - "strconv" - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "connectrpc.com/connect" "github.com/raystack/stencil/core/schema" - stencilv1beta1 "github.com/raystack/stencil/proto/raystack/stencil/v1beta1" + stencilv1beta1 "github.com/raystack/stencil/gen/raystack/stencil/v1beta1" ) func schemaToProto(s schema.Schema) *stencilv1beta1.Schema { @@ -22,137 +17,111 @@ func schemaToProto(s schema.Schema) *stencilv1beta1.Schema { } } -func (a *API) CreateSchema(ctx context.Context, in *stencilv1beta1.CreateSchemaRequest) (*stencilv1beta1.CreateSchemaResponse, error) { - metadata := &schema.Metadata{Format: in.GetFormat().String(), Compatibility: in.GetCompatibility().String()} - sc, err := a.schema.Create(ctx, in.NamespaceId, in.SchemaId, metadata, in.GetData()) - return &stencilv1beta1.CreateSchemaResponse{ +func (a *API) CreateSchema(ctx context.Context, req *connect.Request[stencilv1beta1.CreateSchemaRequest]) (*connect.Response[stencilv1beta1.CreateSchemaResponse], error) { + metadata := &schema.Metadata{Format: req.Msg.GetFormat().String(), Compatibility: req.Msg.GetCompatibility().String()} + sc, err := a.schema.Create(ctx, req.Msg.GetNamespaceId(), req.Msg.GetSchemaId(), metadata, req.Msg.GetData()) + if err != nil { + return nil, err + } + return connect.NewResponse(&stencilv1beta1.CreateSchemaResponse{ Version: sc.Version, Id: sc.ID, Location: sc.Location, - }, err + }), nil } -func (a *API) HTTPUpload(w http.ResponseWriter, req *http.Request, pathParams map[string]string) error { - data, err := io.ReadAll(req.Body) - if err != nil { - return err - } - format := req.Header.Get("X-Format") - compatibility := req.Header.Get("X-Compatibility") - metadata := &schema.Metadata{Format: format, Compatibility: compatibility} - namespaceID := pathParams["namespace"] - schemaName := pathParams["name"] - sc, err := a.schema.Create(req.Context(), namespaceID, schemaName, metadata, data) + +func (a *API) CheckCompatibility(ctx context.Context, req *connect.Request[stencilv1beta1.CheckCompatibilityRequest]) (*connect.Response[stencilv1beta1.CheckCompatibilityResponse], error) { + err := a.schema.CheckCompatibility(ctx, req.Msg.GetNamespaceId(), req.Msg.GetSchemaId(), req.Msg.GetCompatibility().String(), req.Msg.GetData()) if err != nil { - return err + return nil, err } - respData, _ := json.Marshal(sc) - w.Header().Set("Content-Type", "application/json") - w.WriteHeader(http.StatusCreated) - w.Write(respData) - return nil + return connect.NewResponse(&stencilv1beta1.CheckCompatibilityResponse{}), nil } -func (a *API) CheckCompatibility(ctx context.Context, req *stencilv1beta1.CheckCompatibilityRequest) (*stencilv1beta1.CheckCompatibilityResponse, error) { - resp := &stencilv1beta1.CheckCompatibilityResponse{} - err := a.schema.CheckCompatibility(ctx, req.GetNamespaceId(), req.GetSchemaId(), req.GetCompatibility().String(), req.GetData()) - return resp, err -} - -func (a *API) HTTPCheckCompatibility(w http.ResponseWriter, req *http.Request, pathParams map[string]string) error { - data, err := io.ReadAll(req.Body) +func (a *API) ListSchemas(ctx context.Context, req *connect.Request[stencilv1beta1.ListSchemasRequest]) (*connect.Response[stencilv1beta1.ListSchemasResponse], error) { + schemas, err := a.schema.List(ctx, req.Msg.GetId()) if err != nil { - return err + return nil, err } - compatibility := req.Header.Get("X-Compatibility") - namespaceID := pathParams["namespace"] - schemaName := pathParams["name"] - return a.schema.CheckCompatibility(req.Context(), namespaceID, schemaName, compatibility, data) -} - -func (a *API) ListSchemas(ctx context.Context, in *stencilv1beta1.ListSchemasRequest) (*stencilv1beta1.ListSchemasResponse, error) { - schemas, err := a.schema.List(ctx, in.Id) - var ss []*stencilv1beta1.Schema for _, s := range schemas { ss = append(ss, schemaToProto(s)) } - return &stencilv1beta1.ListSchemasResponse{Schemas: ss}, err + return connect.NewResponse(&stencilv1beta1.ListSchemasResponse{Schemas: ss}), nil } -func (a *API) GetLatestSchema(ctx context.Context, in *stencilv1beta1.GetLatestSchemaRequest) (*stencilv1beta1.GetLatestSchemaResponse, error) { - _, data, err := a.schema.GetLatest(ctx, in.NamespaceId, in.SchemaId) - return &stencilv1beta1.GetLatestSchemaResponse{ +func (a *API) GetLatestSchema(ctx context.Context, req *connect.Request[stencilv1beta1.GetLatestSchemaRequest]) (*connect.Response[stencilv1beta1.GetLatestSchemaResponse], error) { + _, data, err := a.schema.GetLatest(ctx, req.Msg.GetNamespaceId(), req.Msg.GetSchemaId()) + if err != nil { + return nil, err + } + return connect.NewResponse(&stencilv1beta1.GetLatestSchemaResponse{ Data: data, - }, err -} - -func (a *API) HTTPLatestSchema(w http.ResponseWriter, req *http.Request, pathParams map[string]string) (*schema.Metadata, []byte, error) { - namespaceID := pathParams["namespace"] - schemaName := pathParams["name"] - return a.schema.GetLatest(req.Context(), namespaceID, schemaName) + }), nil } -func (a *API) GetSchema(ctx context.Context, in *stencilv1beta1.GetSchemaRequest) (*stencilv1beta1.GetSchemaResponse, error) { - _, data, err := a.schema.Get(ctx, in.NamespaceId, in.SchemaId, in.GetVersionId()) - return &stencilv1beta1.GetSchemaResponse{ +func (a *API) GetSchema(ctx context.Context, req *connect.Request[stencilv1beta1.GetSchemaRequest]) (*connect.Response[stencilv1beta1.GetSchemaResponse], error) { + _, data, err := a.schema.Get(ctx, req.Msg.GetNamespaceId(), req.Msg.GetSchemaId(), req.Msg.GetVersionId()) + if err != nil { + return nil, err + } + return connect.NewResponse(&stencilv1beta1.GetSchemaResponse{ Data: data, - }, err + }), nil } -func (a *API) HTTPGetSchema(w http.ResponseWriter, req *http.Request, pathParams map[string]string) (*schema.Metadata, []byte, error) { - namespaceID := pathParams["namespace"] - schemaName := pathParams["name"] - versionString := pathParams["version"] - v, err := strconv.ParseInt(versionString, 10, 32) +func (a *API) ListVersions(ctx context.Context, req *connect.Request[stencilv1beta1.ListVersionsRequest]) (*connect.Response[stencilv1beta1.ListVersionsResponse], error) { + versions, err := a.schema.ListVersions(ctx, req.Msg.GetNamespaceId(), req.Msg.GetSchemaId()) if err != nil { - return nil, nil, &runtime.HTTPStatusError{HTTPStatus: http.StatusBadRequest, Err: errors.New("invalid version number")} + return nil, err } - return a.schema.Get(req.Context(), namespaceID, schemaName, int32(v)) + return connect.NewResponse(&stencilv1beta1.ListVersionsResponse{Versions: versions}), nil } -func (a *API) ListVersions(ctx context.Context, in *stencilv1beta1.ListVersionsRequest) (*stencilv1beta1.ListVersionsResponse, error) { - versions, err := a.schema.ListVersions(ctx, in.NamespaceId, in.SchemaId) - return &stencilv1beta1.ListVersionsResponse{Versions: versions}, err -} - -func (a *API) GetSchemaMetadata(ctx context.Context, in *stencilv1beta1.GetSchemaMetadataRequest) (*stencilv1beta1.GetSchemaMetadataResponse, error) { - meta, err := a.schema.GetMetadata(ctx, in.NamespaceId, in.SchemaId) - return &stencilv1beta1.GetSchemaMetadataResponse{ +func (a *API) GetSchemaMetadata(ctx context.Context, req *connect.Request[stencilv1beta1.GetSchemaMetadataRequest]) (*connect.Response[stencilv1beta1.GetSchemaMetadataResponse], error) { + meta, err := a.schema.GetMetadata(ctx, req.Msg.GetNamespaceId(), req.Msg.GetSchemaId()) + if err != nil { + return nil, err + } + return connect.NewResponse(&stencilv1beta1.GetSchemaMetadataResponse{ Format: stencilv1beta1.Schema_Format(stencilv1beta1.Schema_Format_value[meta.Format]), Compatibility: stencilv1beta1.Schema_Compatibility(stencilv1beta1.Schema_Compatibility_value[meta.Compatibility]), Authority: meta.Authority, - }, err + }), nil } -func (a *API) UpdateSchemaMetadata(ctx context.Context, in *stencilv1beta1.UpdateSchemaMetadataRequest) (*stencilv1beta1.UpdateSchemaMetadataResponse, error) { - meta, err := a.schema.UpdateMetadata(ctx, in.NamespaceId, in.SchemaId, &schema.Metadata{ - Compatibility: in.Compatibility.String(), +func (a *API) UpdateSchemaMetadata(ctx context.Context, req *connect.Request[stencilv1beta1.UpdateSchemaMetadataRequest]) (*connect.Response[stencilv1beta1.UpdateSchemaMetadataResponse], error) { + meta, err := a.schema.UpdateMetadata(ctx, req.Msg.GetNamespaceId(), req.Msg.GetSchemaId(), &schema.Metadata{ + Compatibility: req.Msg.GetCompatibility().String(), }) - return &stencilv1beta1.UpdateSchemaMetadataResponse{ + if err != nil { + return nil, err + } + return connect.NewResponse(&stencilv1beta1.UpdateSchemaMetadataResponse{ Format: stencilv1beta1.Schema_Format(stencilv1beta1.Schema_Format_value[meta.Format]), Compatibility: stencilv1beta1.Schema_Compatibility(stencilv1beta1.Schema_Compatibility_value[meta.Compatibility]), Authority: meta.Authority, - }, err + }), nil } -func (a *API) DeleteSchema(ctx context.Context, in *stencilv1beta1.DeleteSchemaRequest) (*stencilv1beta1.DeleteSchemaResponse, error) { - err := a.schema.Delete(ctx, in.NamespaceId, in.SchemaId) +func (a *API) DeleteSchema(ctx context.Context, req *connect.Request[stencilv1beta1.DeleteSchemaRequest]) (*connect.Response[stencilv1beta1.DeleteSchemaResponse], error) { + err := a.schema.Delete(ctx, req.Msg.GetNamespaceId(), req.Msg.GetSchemaId()) message := "success" if err != nil { message = "failed" } - return &stencilv1beta1.DeleteSchemaResponse{ + return connect.NewResponse(&stencilv1beta1.DeleteSchemaResponse{ Message: message, - }, err + }), err } -func (a *API) DeleteVersion(ctx context.Context, in *stencilv1beta1.DeleteVersionRequest) (*stencilv1beta1.DeleteVersionResponse, error) { - err := a.schema.DeleteVersion(ctx, in.NamespaceId, in.SchemaId, in.GetVersionId()) +func (a *API) DeleteVersion(ctx context.Context, req *connect.Request[stencilv1beta1.DeleteVersionRequest]) (*connect.Response[stencilv1beta1.DeleteVersionResponse], error) { + err := a.schema.DeleteVersion(ctx, req.Msg.GetNamespaceId(), req.Msg.GetSchemaId(), req.Msg.GetVersionId()) message := "success" if err != nil { message = "failed" } - return &stencilv1beta1.DeleteVersionResponse{ + return connect.NewResponse(&stencilv1beta1.DeleteVersionResponse{ Message: message, - }, err + }), err } diff --git a/internal/api/schema_test.go b/internal/api/schema_test.go index a83da075..d33b6d80 100644 --- a/internal/api/schema_test.go +++ b/internal/api/schema_test.go @@ -22,7 +22,6 @@ func TestHTTPGetSchema(t *testing.T) { req, _ := http.NewRequest("GET", fmt.Sprintf("/v1beta1/namespaces/%s/schemas/%s/versions/invalidNumber", nsName, schemaName), nil) mux.ServeHTTP(w, req) assert.Equal(t, 400, w.Code) - assert.JSONEq(t, `{"code":2,"message":"invalid version number","details":[]}`, w.Body.String()) }) t.Run("should return http error if getSchema fails", func(t *testing.T) { version := int32(2) @@ -32,7 +31,6 @@ func TestHTTPGetSchema(t *testing.T) { req, _ := http.NewRequest("GET", fmt.Sprintf("/v1beta1/namespaces/%s/schemas/%s/versions/%d", nsName, schemaName, version), nil) mux.ServeHTTP(w, req) assert.Equal(t, 500, w.Code) - assert.JSONEq(t, `{"code":2,"message":"get error","details":[]}`, w.Body.String()) }) t.Run("should return octet-stream content type for protobuf schema", func(t *testing.T) { version := int32(2) @@ -75,7 +73,6 @@ func TestHTTPSchemaCreate(t *testing.T) { req.Header.Add("X-Compatibility", compatibility) mux.ServeHTTP(w, req) assert.Equal(t, 201, w.Code) - assert.JSONEq(t, `{"id": "someID", "location": "", "version": 2}`, w.Body.String()) schemaSvc.AssertExpectations(t) }) } diff --git a/internal/api/search.go b/internal/api/search.go index e733d322..7263e701 100644 --- a/internal/api/search.go +++ b/internal/api/search.go @@ -4,18 +4,19 @@ import ( "context" "fmt" + "connectrpc.com/connect" "github.com/raystack/stencil/core/search" - stencilv1beta1 "github.com/raystack/stencil/proto/raystack/stencil/v1beta1" + stencilv1beta1 "github.com/raystack/stencil/gen/raystack/stencil/v1beta1" ) -func (a *API) Search(ctx context.Context, in *stencilv1beta1.SearchRequest) (*stencilv1beta1.SearchResponse, error) { +func (a *API) Search(ctx context.Context, req *connect.Request[stencilv1beta1.SearchRequest]) (*connect.Response[stencilv1beta1.SearchResponse], error) { searchReq := &search.SearchRequest{ - NamespaceID: in.GetNamespaceId(), - Query: in.GetQuery(), - SchemaID: in.GetSchemaId(), + NamespaceID: req.Msg.GetNamespaceId(), + Query: req.Msg.GetQuery(), + SchemaID: req.Msg.GetSchemaId(), } - switch v := in.GetVersion().(type) { + switch v := req.Msg.GetVersion().(type) { case *stencilv1beta1.SearchRequest_VersionId: searchReq.VersionID = v.VersionId case *stencilv1beta1.SearchRequest_History: @@ -38,10 +39,10 @@ func (a *API) Search(ctx context.Context, in *stencilv1beta1.SearchRequest) (*st Path: fmt.Sprintf("/v1beta1/namespaces/%s/schemas/%s/versions/%d", hit.NamespaceID, hit.SchemaID, hit.VersionID), }) } - return &stencilv1beta1.SearchResponse{ + return connect.NewResponse(&stencilv1beta1.SearchResponse{ Hits: hits, Meta: &stencilv1beta1.SearchMeta{ Total: uint32(len(hits)), }, - }, nil + }), nil } diff --git a/internal/middleware/error_response.go b/internal/middleware/error_response.go new file mode 100644 index 00000000..4a0accc0 --- /dev/null +++ b/internal/middleware/error_response.go @@ -0,0 +1,48 @@ +package middleware + +import ( + "context" + "errors" + "fmt" + "log/slog" + "net/http" + "time" + + "connectrpc.com/connect" + "github.com/raystack/stencil/internal/store" +) + +// ErrorResponse returns a new unary interceptor that standardizes error formatting. +// It ensures all errors returned from handlers are proper Connect errors. +// Non-Connect errors are sanitized to prevent leaking internal details. +func ErrorResponse() connect.UnaryInterceptorFunc { + return func(next connect.UnaryFunc) connect.UnaryFunc { + return func(ctx context.Context, req connect.AnyRequest) (connect.AnyResponse, error) { + resp, err := next(ctx, req) + if err != nil { + return resp, ensureConnectError(ctx, err) + } + return resp, nil + } + } +} + +// ensureConnectError wraps non-Connect errors as sanitized internal Connect errors. +func ensureConnectError(ctx context.Context, err error) error { + var connectErr *connect.Error + if errors.As(err, &connectErr) { + return err + } + // Convert known domain errors to proper Connect error codes + var storageErr store.StorageErr + if errors.As(err, &storageErr) { + return storageErr.ConnectError() + } + ref := time.Now().Unix() + slog.ErrorContext(ctx, "unhandled error", "error", err, "ref", ref) + return connect.NewError(connect.CodeInternal, fmt.Errorf( + "%s - ref (%d)", + http.StatusText(http.StatusInternalServerError), + ref, + )) +} diff --git a/internal/middleware/logger.go b/internal/middleware/logger.go new file mode 100644 index 00000000..f766fef5 --- /dev/null +++ b/internal/middleware/logger.go @@ -0,0 +1,40 @@ +package middleware + +import ( + "context" + "log/slog" + "time" + + "connectrpc.com/connect" +) + +// Logger returns a new unary interceptor that logs request details. +func Logger() connect.UnaryInterceptorFunc { + return func(next connect.UnaryFunc) connect.UnaryFunc { + return func(ctx context.Context, req connect.AnyRequest) (connect.AnyResponse, error) { + start := time.Now() + + resp, err := next(ctx, req) + + duration := time.Since(start) + attrs := []slog.Attr{ + slog.String("procedure", req.Spec().Procedure), + slog.Duration("duration", duration), + slog.String("peer_addr", req.Peer().Addr), + } + + if err != nil { + attrs = append(attrs, slog.Any("error", err)) + connectErr, ok := err.(*connect.Error) + if ok { + attrs = append(attrs, slog.String("code", connectErr.Code().String())) + } + slog.LogAttrs(ctx, slog.LevelError, "request failed", attrs...) + } else { + slog.LogAttrs(ctx, slog.LevelDebug, "request completed", attrs...) + } + + return resp, err + } + } +} diff --git a/internal/middleware/recovery.go b/internal/middleware/recovery.go new file mode 100644 index 00000000..a292028c --- /dev/null +++ b/internal/middleware/recovery.go @@ -0,0 +1,29 @@ +package middleware + +import ( + "context" + "fmt" + "log" + "runtime/debug" + + "connectrpc.com/connect" +) + +// Recovery returns a new unary interceptor that recovers from panics. +func Recovery() connect.UnaryInterceptorFunc { + return func(next connect.UnaryFunc) connect.UnaryFunc { + return func(ctx context.Context, req connect.AnyRequest) (resp connect.AnyResponse, err error) { + defer func() { + if r := recover(); r != nil { + stack := debug.Stack() + log.Printf("panic recovered: %v\n%s", r, string(stack)) + err = connect.NewError( + connect.CodeInternal, + fmt.Errorf("internal server error"), + ) + } + }() + return next(ctx, req) + } + } +} diff --git a/internal/server/graceful.go b/internal/server/graceful.go deleted file mode 100644 index 80618549..00000000 --- a/internal/server/graceful.go +++ /dev/null @@ -1,43 +0,0 @@ -package server - -import ( - "context" - "errors" - "fmt" - "log" - "net/http" - "os" - "os/signal" - "syscall" - - "github.com/raystack/stencil/config" -) - -func runWithGracefulShutdown(config *config.Config, router http.Handler, cleanUp func()) { - srv := &http.Server{ - Addr: fmt.Sprintf(":%s", config.Port), - Handler: router, - } - go func() { - if err := srv.ListenAndServe(); err != nil && errors.Is(err, http.ErrServerClosed) { - log.Printf("listen: %s\n", err) - } - }() - - quit := make(chan os.Signal, 2) - - signal.Notify(quit, syscall.SIGINT, syscall.SIGTERM) - <-quit - log.Println("Shutting down server...") - - ctx, cancel := context.WithTimeout(context.Background(), config.Timeout) - defer cancel() - - if err := srv.Shutdown(ctx); err != nil { - cleanUp() - log.Fatal("Server forced to shutdown:", err) - } - cleanUp() - - log.Println("Server exiting") -} diff --git a/internal/server/newrelic.go b/internal/server/newrelic.go deleted file mode 100644 index 194d612a..00000000 --- a/internal/server/newrelic.go +++ /dev/null @@ -1,21 +0,0 @@ -package server - -import ( - "log" - - "github.com/newrelic/go-agent/v3/newrelic" - "github.com/raystack/stencil/config" -) - -func getNewRelic(config *config.Config) *newrelic.Application { - newRelicConfig := config.NewRelic - app, err := newrelic.NewApplication( - newrelic.ConfigAppName(newRelicConfig.AppName), - newrelic.ConfigLicense(newRelicConfig.License), - newrelic.ConfigEnabled(newRelicConfig.Enabled), - ) - if err != nil { - log.Fatal(err) - } - return app -} diff --git a/internal/server/server.go b/internal/server/server.go index 545276f5..14bd5a89 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -2,43 +2,43 @@ package server import ( "context" + "errors" "fmt" "log" + "log/slog" "net/http" - "strings" - + "os" + "os/signal" + "syscall" + "time" + + "connectrpc.com/connect" + connectcors "connectrpc.com/cors" + "connectrpc.com/grpcreflect" + "connectrpc.com/validate" "github.com/dgraph-io/ristretto" - "github.com/gorilla/mux" - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/newrelic/go-agent/v3/integrations/nrgrpc" "github.com/raystack/salt/server/spa" "github.com/raystack/stencil/config" - "github.com/raystack/stencil/internal/store/postgres" - "github.com/raystack/stencil/ui" - - grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware" - grpc_zap "github.com/grpc-ecosystem/go-grpc-middleware/logging/zap" - grpc_recovery "github.com/grpc-ecosystem/go-grpc-middleware/recovery" - grpc_ctxtags "github.com/grpc-ecosystem/go-grpc-middleware/tags" "github.com/raystack/stencil/core/namespace" "github.com/raystack/stencil/core/schema" "github.com/raystack/stencil/core/schema/provider" "github.com/raystack/stencil/core/search" + stencilv1beta1connect "github.com/raystack/stencil/gen/raystack/stencil/v1beta1/stencilv1beta1connect" "github.com/raystack/stencil/internal/api" - "github.com/raystack/stencil/pkg/logger" - "github.com/raystack/stencil/pkg/validator" - stencilv1beta1 "github.com/raystack/stencil/proto/raystack/stencil/v1beta1" + "github.com/raystack/stencil/internal/middleware" + "github.com/raystack/stencil/internal/store/postgres" + "github.com/raystack/stencil/ui" + "github.com/rs/cors" "golang.org/x/net/http2" "golang.org/x/net/http2/h2c" - "google.golang.org/grpc" - "google.golang.org/grpc/health/grpc_health_v1" ) // Start Entry point to start the server func Start(cfg config.Config) { - ctx := context.Background() + logger := slog.Default().With("component", "server") db := postgres.NewStore(cfg.DB.ConnectionString) + defer db.Close() namespaceRepository := postgres.NewNamespaceRepository(db) namespaceService := namespace.NewService(namespaceRepository) @@ -57,69 +57,93 @@ func Start(cfg config.Config) { searchRepository := postgres.NewSearchRepository(db) searchService := search.NewService(searchRepository) - api := api.NewAPI(namespaceService, schemaService, searchService) - - port := fmt.Sprintf(":%s", cfg.Port) - nr := getNewRelic(&cfg) - gatewayMux := runtime.NewServeMux() - - // init grpc server - opts := []grpc.ServerOption{ - grpc.UnaryInterceptor(grpc_middleware.ChainUnaryServer( - grpc_recovery.UnaryServerInterceptor(), - grpc_ctxtags.UnaryServerInterceptor(), - nrgrpc.UnaryServerInterceptor(nr), - grpc_zap.UnaryServerInterceptor(logger.Logger), - validator.UnaryServerInterceptor())), - grpc.MaxRecvMsgSize(cfg.GRPC.MaxRecvMsgSizeInMB << 20), - grpc.MaxSendMsgSize(cfg.GRPC.MaxSendMsgSizeInMB << 20), - } - // Create a gRPC server object - s := grpc.NewServer(opts...) - stencilv1beta1.RegisterStencilServiceServer(s, api) - grpc_health_v1.RegisterHealthServer(s, api) - conn, err := grpc.DialContext( - context.Background(), - port, - grpc.WithInsecure(), + handler := api.NewAPI(namespaceService, schemaService, searchService) + + // Build interceptor chain + validateInterceptor := validate.NewInterceptor() + interceptors := connect.WithInterceptors( + middleware.Recovery(), + middleware.Logger(), + validateInterceptor, + middleware.ErrorResponse(), ) - if err != nil { - log.Fatalln("Failed to dial server:", err) - } - api.RegisterSchemaHandlers(gatewayMux, nr) - if err = stencilv1beta1.RegisterStencilServiceHandler(ctx, gatewayMux, conn); err != nil { - log.Fatalln("Failed to register stencil service handler:", err) - } + // Create HTTP mux + mux := http.NewServeMux() - rtr := mux.NewRouter() + // Register connect service handler + path, svcHandler := stencilv1beta1connect.NewStencilServiceHandler( + handler, + interceptors, + connect.WithReadMaxBytes(cfg.MaxRecvMsgSize), + connect.WithSendMaxBytes(cfg.MaxSendMsgSize), + ) + mux.Handle(path, svcHandler) + // Register gRPC reflection for tooling compatibility (grpcurl, etc.) + reflector := grpcreflect.NewStaticReflector( + "raystack.stencil.v1beta1.StencilService", + ) + mux.Handle(grpcreflect.NewHandlerV1(reflector)) + mux.Handle(grpcreflect.NewHandlerV1Alpha(reflector)) + + // Register custom HTTP handlers for schema binary endpoints + handler.RegisterSchemaHandlers(mux) + + // Health check endpoint + mux.HandleFunc("/ping", func(w http.ResponseWriter, r *http.Request) { + w.WriteHeader(http.StatusOK) + _, _ = w.Write([]byte("pong")) + }) + + // UI SPA handler spaHandler, err := spa.Handler(ui.Assets, "build", "index.html", false) if err != nil { log.Fatalln("Failed to load spa:", err) } - rtr.PathPrefix("/ui").Handler(http.StripPrefix("/ui", spaHandler)) + mux.Handle("/ui/", http.StripPrefix("/ui", spaHandler)) - runWithGracefulShutdown(&cfg, grpcHandlerFunc(s, gatewayMux, rtr), func() { - conn.Close() - s.GracefulStop() - db.Close() + // CORS middleware + allowedOrigins := cfg.CORS.AllowedOrigins + if len(allowedOrigins) == 0 { + allowedOrigins = []string{"*"} + } + corsHandler := cors.New(cors.Options{ + AllowedOrigins: allowedOrigins, + AllowedMethods: connectcors.AllowedMethods(), + AllowedHeaders: connectcors.AllowedHeaders(), + ExposedHeaders: connectcors.ExposedHeaders(), }) -} -// grpcHandlerFunc returns an http.Handler that delegates to grpcServer on incoming gRPC -// connections or otherHandler otherwise. -func grpcHandlerFunc(grpcServer *grpc.Server, otherHandler http.Handler, uiHandler http.Handler) http.Handler { - return h2c.NewHandler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - // This is a partial recreation of gRPC's internal checks https://github.com/grpc/grpc-go/pull/514/files#diff-95e9a25b738459a2d3030e1e6fa2a718R61 - if r.ProtoMajor == 2 && strings.Contains(r.Header.Get("Content-Type"), "application/grpc") { - grpcServer.ServeHTTP(w, r) - } else { - if strings.HasPrefix(r.URL.Path, "/ui") { - uiHandler.ServeHTTP(w, r) - } else { - otherHandler.ServeHTTP(w, r) - } + // Create HTTP server with h2c support for HTTP/2 without TLS + addr := fmt.Sprintf(":%s", cfg.Port) + server := &http.Server{ + Addr: addr, + Handler: h2c.NewHandler(corsHandler.Handler(mux), &http2.Server{}), + ReadTimeout: 60 * time.Second, + WriteTimeout: 60 * time.Second, + IdleTimeout: 120 * time.Second, + } + + // Start server in goroutine + go func() { + logger.Info("starting server", "addr", addr) + if err := server.ListenAndServe(); err != nil && !errors.Is(err, http.ErrServerClosed) { + log.Fatalf("server error: %v", err) } - }), &http2.Server{}) + }() + + // Wait for shutdown signal + quit := make(chan os.Signal, 2) + signal.Notify(quit, syscall.SIGINT, syscall.SIGTERM) + <-quit + + logger.Info("shutting down server") + ctx, cancel := context.WithTimeout(context.Background(), cfg.Timeout) + defer cancel() + + if err := server.Shutdown(ctx); err != nil { + log.Fatalf("server forced to shutdown: %v", err) + } + logger.Info("server stopped") } diff --git a/internal/store/errors.go b/internal/store/errors.go index 77b68a6a..f59adda7 100644 --- a/internal/store/errors.go +++ b/internal/store/errors.go @@ -3,8 +3,7 @@ package store import ( "fmt" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" + "connectrpc.com/connect" ) type errKind int @@ -39,15 +38,15 @@ func (e StorageErr) Error() string { return e.name } -// GRPCStatus this is used by gateway interceptor to return appropriate http status code and message -func (e StorageErr) GRPCStatus() *status.Status { +// ConnectError returns an appropriate Connect error for this storage error. +func (e StorageErr) ConnectError() *connect.Error { if e.kind == noRows { - return status.New(codes.NotFound, fmt.Sprintf("%s %s", e.name, "not found")) + return connect.NewError(connect.CodeNotFound, fmt.Errorf("%s %s", e.name, "not found")) } if e.kind == conflict { - return status.New(codes.AlreadyExists, fmt.Sprintf("%s %s", e.name, "resource already exists")) + return connect.NewError(connect.CodeAlreadyExists, fmt.Errorf("%s %s", e.name, "resource already exists")) } - return status.New(codes.Unknown, e.Error()) + return connect.NewError(connect.CodeUnknown, e) } // WithErr convenience function to override sentinel errors diff --git a/pkg/validator/validator.go b/pkg/validator/validator.go deleted file mode 100644 index de2cdd34..00000000 --- a/pkg/validator/validator.go +++ /dev/null @@ -1,95 +0,0 @@ -package validator - -import ( - "context" - "fmt" - "strings" - - "google.golang.org/genproto/googleapis/api/annotations" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/reflect/protoreflect" -) - -func checkIfFieldRequired(f protoreflect.FieldDescriptor) bool { - opts := f.Options() - v := opts.ProtoReflect().Get(annotations.E_FieldBehavior.TypeDescriptor()) - if v.List().IsValid() { - l := v.List() - for i := 0; i < l.Len(); i++ { - eVal := l.Get(i) - if annotations.FieldBehavior(eVal.Enum()) == annotations.FieldBehavior_REQUIRED { - return true - } - } - } - return false -} - -func checkValueExists(fd protoreflect.FieldDescriptor, v protoreflect.Value) bool { - switch fd.Kind() { - case protoreflect.BytesKind: - d := v.Bytes() - return len(d) > 0 - case protoreflect.StringKind: - d := v.String() - return len(d) > 0 - case protoreflect.EnumKind: - d := v.Enum() - ed := fd.Enum().Values().ByNumber(d) - return ed != nil - default: - return true - } -} - -func addPrefix(prefix string, fieldNames []string) []string { - for i := 0; i < len(fieldNames); i++ { - field := fieldNames[i] - fieldNames[i] = fmt.Sprintf("%s.%s", prefix, field) - } - return fieldNames -} - -func validateMessage(m protoreflect.ProtoMessage) []string { - var missingFields []string - md := m.ProtoReflect().Descriptor() - fds := md.Fields() - for i := 0; i < fds.Len(); i++ { - fd := fds.Get(i) - v := m.ProtoReflect().Get(fd) - if fd.Kind() == protoreflect.MessageKind && proto.Size(v.Message().Interface()) != 0 { - nestedFields := validateMessage(v.Message().Interface()) - prefixedFields := addPrefix(fd.JSONName(), nestedFields) - missingFields = append(missingFields, prefixedFields...) - } - if checkIfFieldRequired(fd) && !checkValueExists(fd, v) { - missingFields = append(missingFields, fd.JSONName()) - } - } - return missingFields -} - -func validate(req interface{}) error { - msg, ok := req.(proto.Message) - if !ok { - return nil - } - missingFields := validateMessage(msg) - if len(missingFields) == 0 { - return nil - } - return status.Error(codes.InvalidArgument, fmt.Sprintf("following fields are missing: %s", strings.Join(missingFields, ", "))) -} - -// UnaryServerInterceptor interceptor for validating required fields -func UnaryServerInterceptor() grpc.UnaryServerInterceptor { - return func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error) { - if validErr := validate(req); validErr != nil { - return nil, validErr - } - return handler(ctx, req) - } -} diff --git a/proto/apidocs.swagger.json b/proto/apidocs.swagger.json deleted file mode 100644 index ed67272d..00000000 --- a/proto/apidocs.swagger.json +++ /dev/null @@ -1,777 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "raystack/stencil/v1beta1/stencil.proto", - "version": "0.1.4" - }, - "tags": [ - { - "name": "StencilService" - } - ], - "schemes": ["http"], - "consumes": ["application/json"], - "produces": ["application/json"], - "paths": { - "/v1beta1/namespaces": { - "get": { - "summary": "List names of namespaces", - "operationId": "StencilService_ListNamespaces", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1ListNamespacesResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "tags": ["namespace"] - }, - "post": { - "summary": "Create namespace entry", - "operationId": "StencilService_CreateNamespace", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1CreateNamespaceResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1beta1CreateNamespaceRequest" - } - } - ], - "tags": ["namespace"] - } - }, - "/v1beta1/namespaces/{id}": { - "get": { - "summary": "Get namespace by id", - "operationId": "StencilService_GetNamespace", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1GetNamespaceResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": ["namespace"] - }, - "delete": { - "summary": "Delete namespace by id", - "description": "Ensure all schemas under this namespace is deleted, otherwise it will throw error", - "operationId": "StencilService_DeleteNamespace", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1DeleteNamespaceResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": ["namespace"] - }, - "put": { - "summary": "Update namespace entity by id", - "operationId": "StencilService_UpdateNamespace", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1UpdateNamespaceResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "format": { - "$ref": "#/definitions/SchemaFormat" - }, - "compatibility": { - "$ref": "#/definitions/SchemaCompatibility" - }, - "description": { - "type": "string" - } - } - } - } - ], - "tags": ["namespace"] - } - }, - "/v1beta1/namespaces/{id}/schemas": { - "get": { - "summary": "List schemas under the namespace", - "operationId": "StencilService_ListSchemas", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1ListSchemasResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": ["schema"] - } - }, - "/v1beta1/namespaces/{namespaceId}/schemas/{schemaId}": { - "delete": { - "summary": "Delete specified schema", - "operationId": "StencilService_DeleteSchema", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1DeleteSchemaResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "namespaceId", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "schemaId", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": ["schema"] - }, - "patch": { - "summary": "Update only schema metadata", - "operationId": "StencilService_UpdateSchemaMetadata", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1UpdateSchemaMetadataResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "namespaceId", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "schemaId", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "compatibility": { - "$ref": "#/definitions/SchemaCompatibility" - } - } - } - } - ], - "tags": ["schema"] - } - }, - "/v1beta1/namespaces/{namespaceId}/schemas/{schemaId}/meta": { - "get": { - "summary": "Create schema under the namespace. Returns version number, unique ID and location", - "operationId": "StencilService_GetSchemaMetadata", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1GetSchemaMetadataResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "namespaceId", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "schemaId", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": ["schema"] - } - }, - "/v1beta1/namespaces/{namespaceId}/schemas/{schemaId}/versions": { - "get": { - "summary": "List all version numbers for schema", - "operationId": "StencilService_ListVersions", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1ListVersionsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "namespaceId", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "schemaId", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": ["schema", "version"] - } - }, - "/v1beta1/namespaces/{namespaceId}/schemas/{schemaId}/versions/{versionId}": { - "delete": { - "summary": "Delete specified version of the schema", - "operationId": "StencilService_DeleteVersion", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1DeleteVersionResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "namespaceId", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "schemaId", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "versionId", - "in": "path", - "required": true, - "type": "integer", - "format": "int32" - } - ], - "tags": ["schema", "version"] - } - }, - "/v1beta1/search": { - "get": { - "summary": "Global Search API", - "operationId": "StencilService_Search", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1SearchResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "namespaceId", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "schemaId", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "query", - "in": "query", - "required": true, - "type": "string" - }, - { - "name": "history", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "versionId", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - } - ], - "tags": ["schema"] - } - } - }, - "definitions": { - "SchemaCompatibility": { - "type": "string", - "enum": [ - "COMPATIBILITY_UNSPECIFIED", - "COMPATIBILITY_BACKWARD", - "COMPATIBILITY_BACKWARD_TRANSITIVE", - "COMPATIBILITY_FORWARD", - "COMPATIBILITY_FORWARD_TRANSITIVE", - "COMPATIBILITY_FULL", - "COMPATIBILITY_FULL_TRANSITIVE" - ], - "default": "COMPATIBILITY_UNSPECIFIED" - }, - "SchemaFormat": { - "type": "string", - "enum": [ - "FORMAT_UNSPECIFIED", - "FORMAT_PROTOBUF", - "FORMAT_AVRO", - "FORMAT_JSON" - ], - "default": "FORMAT_UNSPECIFIED" - }, - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "stencilv1beta1Schema": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "format": { - "$ref": "#/definitions/SchemaFormat" - }, - "authority": { - "type": "string" - }, - "compatibility": { - "$ref": "#/definitions/SchemaCompatibility" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time" - } - } - }, - "v1beta1CheckCompatibilityResponse": { - "type": "object" - }, - "v1beta1CreateNamespaceRequest": { - "type": "object", - "properties": { - "id": { - "type": "string", - "required": ["id"] - }, - "format": { - "$ref": "#/definitions/SchemaFormat" - }, - "compatibility": { - "$ref": "#/definitions/SchemaCompatibility" - }, - "description": { - "type": "string" - } - }, - "required": ["id"] - }, - "v1beta1CreateNamespaceResponse": { - "type": "object", - "properties": { - "namespace": { - "$ref": "#/definitions/v1beta1Namespace" - } - } - }, - "v1beta1CreateSchemaResponse": { - "type": "object", - "properties": { - "version": { - "type": "integer", - "format": "int32" - }, - "id": { - "type": "string" - }, - "location": { - "type": "string" - } - } - }, - "v1beta1DeleteNamespaceResponse": { - "type": "object", - "properties": { - "message": { - "type": "string" - } - } - }, - "v1beta1DeleteSchemaResponse": { - "type": "object", - "properties": { - "message": { - "type": "string" - } - } - }, - "v1beta1DeleteVersionResponse": { - "type": "object", - "properties": { - "message": { - "type": "string" - } - } - }, - "v1beta1GetLatestSchemaResponse": { - "type": "object", - "properties": { - "data": { - "type": "string", - "format": "byte" - } - } - }, - "v1beta1GetNamespaceResponse": { - "type": "object", - "properties": { - "namespace": { - "$ref": "#/definitions/v1beta1Namespace" - } - } - }, - "v1beta1GetSchemaMetadataResponse": { - "type": "object", - "properties": { - "format": { - "$ref": "#/definitions/SchemaFormat" - }, - "compatibility": { - "$ref": "#/definitions/SchemaCompatibility" - }, - "authority": { - "type": "string" - }, - "name": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time" - } - } - }, - "v1beta1GetSchemaResponse": { - "type": "object", - "properties": { - "data": { - "type": "string", - "format": "byte" - } - } - }, - "v1beta1ListNamespacesResponse": { - "type": "object", - "properties": { - "namespaces": { - "type": "array", - "items": { - "$ref": "#/definitions/v1beta1Namespace" - } - } - } - }, - "v1beta1ListSchemasResponse": { - "type": "object", - "properties": { - "schemas": { - "type": "array", - "items": { - "$ref": "#/definitions/stencilv1beta1Schema" - } - } - } - }, - "v1beta1ListVersionsResponse": { - "type": "object", - "properties": { - "versions": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - } - } - } - }, - "v1beta1Namespace": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "format": { - "$ref": "#/definitions/SchemaFormat" - }, - "Compatibility": { - "$ref": "#/definitions/SchemaCompatibility" - }, - "description": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time" - } - } - }, - "v1beta1SearchHits": { - "type": "object", - "properties": { - "namespaceId": { - "type": "string" - }, - "schemaId": { - "type": "string" - }, - "versionId": { - "type": "integer", - "format": "int32" - }, - "fields": { - "type": "array", - "items": { - "type": "string" - } - }, - "types": { - "type": "array", - "items": { - "type": "string" - } - }, - "path": { - "type": "string" - } - } - }, - "v1beta1SearchMeta": { - "type": "object", - "properties": { - "total": { - "type": "integer", - "format": "int64" - } - } - }, - "v1beta1SearchResponse": { - "type": "object", - "properties": { - "hits": { - "type": "array", - "items": { - "$ref": "#/definitions/v1beta1SearchHits" - } - }, - "meta": { - "$ref": "#/definitions/v1beta1SearchMeta" - } - } - }, - "v1beta1UpdateNamespaceResponse": { - "type": "object", - "properties": { - "namespace": { - "$ref": "#/definitions/v1beta1Namespace" - } - } - }, - "v1beta1UpdateSchemaMetadataResponse": { - "type": "object", - "properties": { - "format": { - "$ref": "#/definitions/SchemaFormat" - }, - "compatibility": { - "$ref": "#/definitions/SchemaCompatibility" - }, - "authority": { - "type": "string" - } - } - } - } -} diff --git a/proto/raystack/stencil/v1beta1/stencil.pb.go b/proto/raystack/stencil/v1beta1/stencil.pb.go deleted file mode 100644 index 5449873f..00000000 --- a/proto/raystack/stencil/v1beta1/stencil.pb.go +++ /dev/null @@ -1,3351 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.28.0 -// protoc (unknown) -// source: raystack/stencil/v1beta1/stencil.proto - -package stencilv1beta1 - -import ( - _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - _ "google.golang.org/protobuf/types/descriptorpb" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type Schema_Format int32 - -const ( - Schema_FORMAT_UNSPECIFIED Schema_Format = 0 - Schema_FORMAT_PROTOBUF Schema_Format = 1 - Schema_FORMAT_AVRO Schema_Format = 2 - Schema_FORMAT_JSON Schema_Format = 3 -) - -// Enum value maps for Schema_Format. -var ( - Schema_Format_name = map[int32]string{ - 0: "FORMAT_UNSPECIFIED", - 1: "FORMAT_PROTOBUF", - 2: "FORMAT_AVRO", - 3: "FORMAT_JSON", - } - Schema_Format_value = map[string]int32{ - "FORMAT_UNSPECIFIED": 0, - "FORMAT_PROTOBUF": 1, - "FORMAT_AVRO": 2, - "FORMAT_JSON": 3, - } -) - -func (x Schema_Format) Enum() *Schema_Format { - p := new(Schema_Format) - *p = x - return p -} - -func (x Schema_Format) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Schema_Format) Descriptor() protoreflect.EnumDescriptor { - return file_raystack_stencil_v1beta1_stencil_proto_enumTypes[0].Descriptor() -} - -func (Schema_Format) Type() protoreflect.EnumType { - return &file_raystack_stencil_v1beta1_stencil_proto_enumTypes[0] -} - -func (x Schema_Format) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Schema_Format.Descriptor instead. -func (Schema_Format) EnumDescriptor() ([]byte, []int) { - return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{1, 0} -} - -type Schema_Compatibility int32 - -const ( - Schema_COMPATIBILITY_UNSPECIFIED Schema_Compatibility = 0 - Schema_COMPATIBILITY_BACKWARD Schema_Compatibility = 1 - Schema_COMPATIBILITY_BACKWARD_TRANSITIVE Schema_Compatibility = 2 - Schema_COMPATIBILITY_FORWARD Schema_Compatibility = 3 - Schema_COMPATIBILITY_FORWARD_TRANSITIVE Schema_Compatibility = 4 - Schema_COMPATIBILITY_FULL Schema_Compatibility = 5 - Schema_COMPATIBILITY_FULL_TRANSITIVE Schema_Compatibility = 6 -) - -// Enum value maps for Schema_Compatibility. -var ( - Schema_Compatibility_name = map[int32]string{ - 0: "COMPATIBILITY_UNSPECIFIED", - 1: "COMPATIBILITY_BACKWARD", - 2: "COMPATIBILITY_BACKWARD_TRANSITIVE", - 3: "COMPATIBILITY_FORWARD", - 4: "COMPATIBILITY_FORWARD_TRANSITIVE", - 5: "COMPATIBILITY_FULL", - 6: "COMPATIBILITY_FULL_TRANSITIVE", - } - Schema_Compatibility_value = map[string]int32{ - "COMPATIBILITY_UNSPECIFIED": 0, - "COMPATIBILITY_BACKWARD": 1, - "COMPATIBILITY_BACKWARD_TRANSITIVE": 2, - "COMPATIBILITY_FORWARD": 3, - "COMPATIBILITY_FORWARD_TRANSITIVE": 4, - "COMPATIBILITY_FULL": 5, - "COMPATIBILITY_FULL_TRANSITIVE": 6, - } -) - -func (x Schema_Compatibility) Enum() *Schema_Compatibility { - p := new(Schema_Compatibility) - *p = x - return p -} - -func (x Schema_Compatibility) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Schema_Compatibility) Descriptor() protoreflect.EnumDescriptor { - return file_raystack_stencil_v1beta1_stencil_proto_enumTypes[1].Descriptor() -} - -func (Schema_Compatibility) Type() protoreflect.EnumType { - return &file_raystack_stencil_v1beta1_stencil_proto_enumTypes[1] -} - -func (x Schema_Compatibility) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Schema_Compatibility.Descriptor instead. -func (Schema_Compatibility) EnumDescriptor() ([]byte, []int) { - return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{1, 1} -} - -type Namespace struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Format Schema_Format `protobuf:"varint,2,opt,name=format,proto3,enum=raystack.stencil.v1beta1.Schema_Format" json:"format,omitempty"` - Compatibility Schema_Compatibility `protobuf:"varint,3,opt,name=Compatibility,proto3,enum=raystack.stencil.v1beta1.Schema_Compatibility" json:"Compatibility,omitempty"` - Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` -} - -func (x *Namespace) Reset() { - *x = Namespace{} - if protoimpl.UnsafeEnabled { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Namespace) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Namespace) ProtoMessage() {} - -func (x *Namespace) ProtoReflect() protoreflect.Message { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Namespace.ProtoReflect.Descriptor instead. -func (*Namespace) Descriptor() ([]byte, []int) { - return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{0} -} - -func (x *Namespace) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Namespace) GetFormat() Schema_Format { - if x != nil { - return x.Format - } - return Schema_FORMAT_UNSPECIFIED -} - -func (x *Namespace) GetCompatibility() Schema_Compatibility { - if x != nil { - return x.Compatibility - } - return Schema_COMPATIBILITY_UNSPECIFIED -} - -func (x *Namespace) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *Namespace) GetCreatedAt() *timestamppb.Timestamp { - if x != nil { - return x.CreatedAt - } - return nil -} - -func (x *Namespace) GetUpdatedAt() *timestamppb.Timestamp { - if x != nil { - return x.UpdatedAt - } - return nil -} - -type Schema struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Format Schema_Format `protobuf:"varint,2,opt,name=format,proto3,enum=raystack.stencil.v1beta1.Schema_Format" json:"format,omitempty"` - Authority string `protobuf:"bytes,3,opt,name=authority,proto3" json:"authority,omitempty"` - Compatibility Schema_Compatibility `protobuf:"varint,4,opt,name=compatibility,proto3,enum=raystack.stencil.v1beta1.Schema_Compatibility" json:"compatibility,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` -} - -func (x *Schema) Reset() { - *x = Schema{} - if protoimpl.UnsafeEnabled { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Schema) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Schema) ProtoMessage() {} - -func (x *Schema) ProtoReflect() protoreflect.Message { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Schema.ProtoReflect.Descriptor instead. -func (*Schema) Descriptor() ([]byte, []int) { - return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{1} -} - -func (x *Schema) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *Schema) GetFormat() Schema_Format { - if x != nil { - return x.Format - } - return Schema_FORMAT_UNSPECIFIED -} - -func (x *Schema) GetAuthority() string { - if x != nil { - return x.Authority - } - return "" -} - -func (x *Schema) GetCompatibility() Schema_Compatibility { - if x != nil { - return x.Compatibility - } - return Schema_COMPATIBILITY_UNSPECIFIED -} - -func (x *Schema) GetCreatedAt() *timestamppb.Timestamp { - if x != nil { - return x.CreatedAt - } - return nil -} - -func (x *Schema) GetUpdatedAt() *timestamppb.Timestamp { - if x != nil { - return x.UpdatedAt - } - return nil -} - -type ListNamespacesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *ListNamespacesRequest) Reset() { - *x = ListNamespacesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListNamespacesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListNamespacesRequest) ProtoMessage() {} - -func (x *ListNamespacesRequest) ProtoReflect() protoreflect.Message { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListNamespacesRequest.ProtoReflect.Descriptor instead. -func (*ListNamespacesRequest) Descriptor() ([]byte, []int) { - return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{2} -} - -type ListNamespacesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespaces []*Namespace `protobuf:"bytes,1,rep,name=namespaces,proto3" json:"namespaces,omitempty"` -} - -func (x *ListNamespacesResponse) Reset() { - *x = ListNamespacesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListNamespacesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListNamespacesResponse) ProtoMessage() {} - -func (x *ListNamespacesResponse) ProtoReflect() protoreflect.Message { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListNamespacesResponse.ProtoReflect.Descriptor instead. -func (*ListNamespacesResponse) Descriptor() ([]byte, []int) { - return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{3} -} - -func (x *ListNamespacesResponse) GetNamespaces() []*Namespace { - if x != nil { - return x.Namespaces - } - return nil -} - -type GetNamespaceRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *GetNamespaceRequest) Reset() { - *x = GetNamespaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetNamespaceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetNamespaceRequest) ProtoMessage() {} - -func (x *GetNamespaceRequest) ProtoReflect() protoreflect.Message { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetNamespaceRequest.ProtoReflect.Descriptor instead. -func (*GetNamespaceRequest) Descriptor() ([]byte, []int) { - return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{4} -} - -func (x *GetNamespaceRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type GetNamespaceResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace *Namespace `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` -} - -func (x *GetNamespaceResponse) Reset() { - *x = GetNamespaceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetNamespaceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetNamespaceResponse) ProtoMessage() {} - -func (x *GetNamespaceResponse) ProtoReflect() protoreflect.Message { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetNamespaceResponse.ProtoReflect.Descriptor instead. -func (*GetNamespaceResponse) Descriptor() ([]byte, []int) { - return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{5} -} - -func (x *GetNamespaceResponse) GetNamespace() *Namespace { - if x != nil { - return x.Namespace - } - return nil -} - -type CreateNamespaceRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Format Schema_Format `protobuf:"varint,2,opt,name=format,proto3,enum=raystack.stencil.v1beta1.Schema_Format" json:"format,omitempty"` - Compatibility Schema_Compatibility `protobuf:"varint,3,opt,name=compatibility,proto3,enum=raystack.stencil.v1beta1.Schema_Compatibility" json:"compatibility,omitempty"` - Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` -} - -func (x *CreateNamespaceRequest) Reset() { - *x = CreateNamespaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateNamespaceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateNamespaceRequest) ProtoMessage() {} - -func (x *CreateNamespaceRequest) ProtoReflect() protoreflect.Message { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateNamespaceRequest.ProtoReflect.Descriptor instead. -func (*CreateNamespaceRequest) Descriptor() ([]byte, []int) { - return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{6} -} - -func (x *CreateNamespaceRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *CreateNamespaceRequest) GetFormat() Schema_Format { - if x != nil { - return x.Format - } - return Schema_FORMAT_UNSPECIFIED -} - -func (x *CreateNamespaceRequest) GetCompatibility() Schema_Compatibility { - if x != nil { - return x.Compatibility - } - return Schema_COMPATIBILITY_UNSPECIFIED -} - -func (x *CreateNamespaceRequest) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -type CreateNamespaceResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace *Namespace `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` -} - -func (x *CreateNamespaceResponse) Reset() { - *x = CreateNamespaceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateNamespaceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateNamespaceResponse) ProtoMessage() {} - -func (x *CreateNamespaceResponse) ProtoReflect() protoreflect.Message { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateNamespaceResponse.ProtoReflect.Descriptor instead. -func (*CreateNamespaceResponse) Descriptor() ([]byte, []int) { - return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{7} -} - -func (x *CreateNamespaceResponse) GetNamespace() *Namespace { - if x != nil { - return x.Namespace - } - return nil -} - -type UpdateNamespaceRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Format Schema_Format `protobuf:"varint,2,opt,name=format,proto3,enum=raystack.stencil.v1beta1.Schema_Format" json:"format,omitempty"` - Compatibility Schema_Compatibility `protobuf:"varint,3,opt,name=compatibility,proto3,enum=raystack.stencil.v1beta1.Schema_Compatibility" json:"compatibility,omitempty"` - Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` -} - -func (x *UpdateNamespaceRequest) Reset() { - *x = UpdateNamespaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateNamespaceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateNamespaceRequest) ProtoMessage() {} - -func (x *UpdateNamespaceRequest) ProtoReflect() protoreflect.Message { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateNamespaceRequest.ProtoReflect.Descriptor instead. -func (*UpdateNamespaceRequest) Descriptor() ([]byte, []int) { - return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{8} -} - -func (x *UpdateNamespaceRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *UpdateNamespaceRequest) GetFormat() Schema_Format { - if x != nil { - return x.Format - } - return Schema_FORMAT_UNSPECIFIED -} - -func (x *UpdateNamespaceRequest) GetCompatibility() Schema_Compatibility { - if x != nil { - return x.Compatibility - } - return Schema_COMPATIBILITY_UNSPECIFIED -} - -func (x *UpdateNamespaceRequest) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -type UpdateNamespaceResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Namespace *Namespace `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` -} - -func (x *UpdateNamespaceResponse) Reset() { - *x = UpdateNamespaceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateNamespaceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateNamespaceResponse) ProtoMessage() {} - -func (x *UpdateNamespaceResponse) ProtoReflect() protoreflect.Message { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateNamespaceResponse.ProtoReflect.Descriptor instead. -func (*UpdateNamespaceResponse) Descriptor() ([]byte, []int) { - return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{9} -} - -func (x *UpdateNamespaceResponse) GetNamespace() *Namespace { - if x != nil { - return x.Namespace - } - return nil -} - -type DeleteNamespaceRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *DeleteNamespaceRequest) Reset() { - *x = DeleteNamespaceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteNamespaceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteNamespaceRequest) ProtoMessage() {} - -func (x *DeleteNamespaceRequest) ProtoReflect() protoreflect.Message { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteNamespaceRequest.ProtoReflect.Descriptor instead. -func (*DeleteNamespaceRequest) Descriptor() ([]byte, []int) { - return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{10} -} - -func (x *DeleteNamespaceRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type DeleteNamespaceResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` -} - -func (x *DeleteNamespaceResponse) Reset() { - *x = DeleteNamespaceResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteNamespaceResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteNamespaceResponse) ProtoMessage() {} - -func (x *DeleteNamespaceResponse) ProtoReflect() protoreflect.Message { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteNamespaceResponse.ProtoReflect.Descriptor instead. -func (*DeleteNamespaceResponse) Descriptor() ([]byte, []int) { - return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{11} -} - -func (x *DeleteNamespaceResponse) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -type ListSchemasRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *ListSchemasRequest) Reset() { - *x = ListSchemasRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListSchemasRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListSchemasRequest) ProtoMessage() {} - -func (x *ListSchemasRequest) ProtoReflect() protoreflect.Message { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListSchemasRequest.ProtoReflect.Descriptor instead. -func (*ListSchemasRequest) Descriptor() ([]byte, []int) { - return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{12} -} - -func (x *ListSchemasRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type ListSchemasResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Schemas []*Schema `protobuf:"bytes,1,rep,name=schemas,proto3" json:"schemas,omitempty"` -} - -func (x *ListSchemasResponse) Reset() { - *x = ListSchemasResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListSchemasResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListSchemasResponse) ProtoMessage() {} - -func (x *ListSchemasResponse) ProtoReflect() protoreflect.Message { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListSchemasResponse.ProtoReflect.Descriptor instead. -func (*ListSchemasResponse) Descriptor() ([]byte, []int) { - return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{13} -} - -func (x *ListSchemasResponse) GetSchemas() []*Schema { - if x != nil { - return x.Schemas - } - return nil -} - -type GetLatestSchemaRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` - SchemaId string `protobuf:"bytes,2,opt,name=schema_id,json=schemaId,proto3" json:"schema_id,omitempty"` -} - -func (x *GetLatestSchemaRequest) Reset() { - *x = GetLatestSchemaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetLatestSchemaRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetLatestSchemaRequest) ProtoMessage() {} - -func (x *GetLatestSchemaRequest) ProtoReflect() protoreflect.Message { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetLatestSchemaRequest.ProtoReflect.Descriptor instead. -func (*GetLatestSchemaRequest) Descriptor() ([]byte, []int) { - return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{14} -} - -func (x *GetLatestSchemaRequest) GetNamespaceId() string { - if x != nil { - return x.NamespaceId - } - return "" -} - -func (x *GetLatestSchemaRequest) GetSchemaId() string { - if x != nil { - return x.SchemaId - } - return "" -} - -type GetLatestSchemaResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` -} - -func (x *GetLatestSchemaResponse) Reset() { - *x = GetLatestSchemaResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetLatestSchemaResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetLatestSchemaResponse) ProtoMessage() {} - -func (x *GetLatestSchemaResponse) ProtoReflect() protoreflect.Message { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetLatestSchemaResponse.ProtoReflect.Descriptor instead. -func (*GetLatestSchemaResponse) Descriptor() ([]byte, []int) { - return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{15} -} - -func (x *GetLatestSchemaResponse) GetData() []byte { - if x != nil { - return x.Data - } - return nil -} - -type CreateSchemaRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` - SchemaId string `protobuf:"bytes,2,opt,name=schema_id,json=schemaId,proto3" json:"schema_id,omitempty"` - Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` - Format Schema_Format `protobuf:"varint,4,opt,name=format,proto3,enum=raystack.stencil.v1beta1.Schema_Format" json:"format,omitempty"` - Compatibility Schema_Compatibility `protobuf:"varint,5,opt,name=compatibility,proto3,enum=raystack.stencil.v1beta1.Schema_Compatibility" json:"compatibility,omitempty"` -} - -func (x *CreateSchemaRequest) Reset() { - *x = CreateSchemaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateSchemaRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateSchemaRequest) ProtoMessage() {} - -func (x *CreateSchemaRequest) ProtoReflect() protoreflect.Message { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateSchemaRequest.ProtoReflect.Descriptor instead. -func (*CreateSchemaRequest) Descriptor() ([]byte, []int) { - return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{16} -} - -func (x *CreateSchemaRequest) GetNamespaceId() string { - if x != nil { - return x.NamespaceId - } - return "" -} - -func (x *CreateSchemaRequest) GetSchemaId() string { - if x != nil { - return x.SchemaId - } - return "" -} - -func (x *CreateSchemaRequest) GetData() []byte { - if x != nil { - return x.Data - } - return nil -} - -func (x *CreateSchemaRequest) GetFormat() Schema_Format { - if x != nil { - return x.Format - } - return Schema_FORMAT_UNSPECIFIED -} - -func (x *CreateSchemaRequest) GetCompatibility() Schema_Compatibility { - if x != nil { - return x.Compatibility - } - return Schema_COMPATIBILITY_UNSPECIFIED -} - -type CreateSchemaResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Version int32 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` - Location string `protobuf:"bytes,3,opt,name=location,proto3" json:"location,omitempty"` -} - -func (x *CreateSchemaResponse) Reset() { - *x = CreateSchemaResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateSchemaResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateSchemaResponse) ProtoMessage() {} - -func (x *CreateSchemaResponse) ProtoReflect() protoreflect.Message { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateSchemaResponse.ProtoReflect.Descriptor instead. -func (*CreateSchemaResponse) Descriptor() ([]byte, []int) { - return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{17} -} - -func (x *CreateSchemaResponse) GetVersion() int32 { - if x != nil { - return x.Version - } - return 0 -} - -func (x *CreateSchemaResponse) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *CreateSchemaResponse) GetLocation() string { - if x != nil { - return x.Location - } - return "" -} - -type CheckCompatibilityRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` - SchemaId string `protobuf:"bytes,2,opt,name=schema_id,json=schemaId,proto3" json:"schema_id,omitempty"` - Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` - Compatibility Schema_Compatibility `protobuf:"varint,4,opt,name=compatibility,proto3,enum=raystack.stencil.v1beta1.Schema_Compatibility" json:"compatibility,omitempty"` -} - -func (x *CheckCompatibilityRequest) Reset() { - *x = CheckCompatibilityRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CheckCompatibilityRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CheckCompatibilityRequest) ProtoMessage() {} - -func (x *CheckCompatibilityRequest) ProtoReflect() protoreflect.Message { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CheckCompatibilityRequest.ProtoReflect.Descriptor instead. -func (*CheckCompatibilityRequest) Descriptor() ([]byte, []int) { - return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{18} -} - -func (x *CheckCompatibilityRequest) GetNamespaceId() string { - if x != nil { - return x.NamespaceId - } - return "" -} - -func (x *CheckCompatibilityRequest) GetSchemaId() string { - if x != nil { - return x.SchemaId - } - return "" -} - -func (x *CheckCompatibilityRequest) GetData() []byte { - if x != nil { - return x.Data - } - return nil -} - -func (x *CheckCompatibilityRequest) GetCompatibility() Schema_Compatibility { - if x != nil { - return x.Compatibility - } - return Schema_COMPATIBILITY_UNSPECIFIED -} - -type CheckCompatibilityResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *CheckCompatibilityResponse) Reset() { - *x = CheckCompatibilityResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CheckCompatibilityResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CheckCompatibilityResponse) ProtoMessage() {} - -func (x *CheckCompatibilityResponse) ProtoReflect() protoreflect.Message { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CheckCompatibilityResponse.ProtoReflect.Descriptor instead. -func (*CheckCompatibilityResponse) Descriptor() ([]byte, []int) { - return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{19} -} - -type GetSchemaMetadataRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` - SchemaId string `protobuf:"bytes,2,opt,name=schema_id,json=schemaId,proto3" json:"schema_id,omitempty"` -} - -func (x *GetSchemaMetadataRequest) Reset() { - *x = GetSchemaMetadataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetSchemaMetadataRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetSchemaMetadataRequest) ProtoMessage() {} - -func (x *GetSchemaMetadataRequest) ProtoReflect() protoreflect.Message { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetSchemaMetadataRequest.ProtoReflect.Descriptor instead. -func (*GetSchemaMetadataRequest) Descriptor() ([]byte, []int) { - return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{20} -} - -func (x *GetSchemaMetadataRequest) GetNamespaceId() string { - if x != nil { - return x.NamespaceId - } - return "" -} - -func (x *GetSchemaMetadataRequest) GetSchemaId() string { - if x != nil { - return x.SchemaId - } - return "" -} - -type GetSchemaMetadataResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Format Schema_Format `protobuf:"varint,1,opt,name=format,proto3,enum=raystack.stencil.v1beta1.Schema_Format" json:"format,omitempty"` - Compatibility Schema_Compatibility `protobuf:"varint,2,opt,name=compatibility,proto3,enum=raystack.stencil.v1beta1.Schema_Compatibility" json:"compatibility,omitempty"` - Authority string `protobuf:"bytes,3,opt,name=authority,proto3" json:"authority,omitempty"` - Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` - CreatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` - UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` -} - -func (x *GetSchemaMetadataResponse) Reset() { - *x = GetSchemaMetadataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetSchemaMetadataResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetSchemaMetadataResponse) ProtoMessage() {} - -func (x *GetSchemaMetadataResponse) ProtoReflect() protoreflect.Message { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetSchemaMetadataResponse.ProtoReflect.Descriptor instead. -func (*GetSchemaMetadataResponse) Descriptor() ([]byte, []int) { - return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{21} -} - -func (x *GetSchemaMetadataResponse) GetFormat() Schema_Format { - if x != nil { - return x.Format - } - return Schema_FORMAT_UNSPECIFIED -} - -func (x *GetSchemaMetadataResponse) GetCompatibility() Schema_Compatibility { - if x != nil { - return x.Compatibility - } - return Schema_COMPATIBILITY_UNSPECIFIED -} - -func (x *GetSchemaMetadataResponse) GetAuthority() string { - if x != nil { - return x.Authority - } - return "" -} - -func (x *GetSchemaMetadataResponse) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *GetSchemaMetadataResponse) GetCreatedAt() *timestamppb.Timestamp { - if x != nil { - return x.CreatedAt - } - return nil -} - -func (x *GetSchemaMetadataResponse) GetUpdatedAt() *timestamppb.Timestamp { - if x != nil { - return x.UpdatedAt - } - return nil -} - -type UpdateSchemaMetadataRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` - SchemaId string `protobuf:"bytes,2,opt,name=schema_id,json=schemaId,proto3" json:"schema_id,omitempty"` - Compatibility Schema_Compatibility `protobuf:"varint,3,opt,name=compatibility,proto3,enum=raystack.stencil.v1beta1.Schema_Compatibility" json:"compatibility,omitempty"` -} - -func (x *UpdateSchemaMetadataRequest) Reset() { - *x = UpdateSchemaMetadataRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateSchemaMetadataRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateSchemaMetadataRequest) ProtoMessage() {} - -func (x *UpdateSchemaMetadataRequest) ProtoReflect() protoreflect.Message { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateSchemaMetadataRequest.ProtoReflect.Descriptor instead. -func (*UpdateSchemaMetadataRequest) Descriptor() ([]byte, []int) { - return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{22} -} - -func (x *UpdateSchemaMetadataRequest) GetNamespaceId() string { - if x != nil { - return x.NamespaceId - } - return "" -} - -func (x *UpdateSchemaMetadataRequest) GetSchemaId() string { - if x != nil { - return x.SchemaId - } - return "" -} - -func (x *UpdateSchemaMetadataRequest) GetCompatibility() Schema_Compatibility { - if x != nil { - return x.Compatibility - } - return Schema_COMPATIBILITY_UNSPECIFIED -} - -type UpdateSchemaMetadataResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Format Schema_Format `protobuf:"varint,1,opt,name=format,proto3,enum=raystack.stencil.v1beta1.Schema_Format" json:"format,omitempty"` - Compatibility Schema_Compatibility `protobuf:"varint,2,opt,name=compatibility,proto3,enum=raystack.stencil.v1beta1.Schema_Compatibility" json:"compatibility,omitempty"` - Authority string `protobuf:"bytes,3,opt,name=authority,proto3" json:"authority,omitempty"` -} - -func (x *UpdateSchemaMetadataResponse) Reset() { - *x = UpdateSchemaMetadataResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateSchemaMetadataResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateSchemaMetadataResponse) ProtoMessage() {} - -func (x *UpdateSchemaMetadataResponse) ProtoReflect() protoreflect.Message { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateSchemaMetadataResponse.ProtoReflect.Descriptor instead. -func (*UpdateSchemaMetadataResponse) Descriptor() ([]byte, []int) { - return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{23} -} - -func (x *UpdateSchemaMetadataResponse) GetFormat() Schema_Format { - if x != nil { - return x.Format - } - return Schema_FORMAT_UNSPECIFIED -} - -func (x *UpdateSchemaMetadataResponse) GetCompatibility() Schema_Compatibility { - if x != nil { - return x.Compatibility - } - return Schema_COMPATIBILITY_UNSPECIFIED -} - -func (x *UpdateSchemaMetadataResponse) GetAuthority() string { - if x != nil { - return x.Authority - } - return "" -} - -type DeleteSchemaRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` - SchemaId string `protobuf:"bytes,2,opt,name=schema_id,json=schemaId,proto3" json:"schema_id,omitempty"` -} - -func (x *DeleteSchemaRequest) Reset() { - *x = DeleteSchemaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteSchemaRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteSchemaRequest) ProtoMessage() {} - -func (x *DeleteSchemaRequest) ProtoReflect() protoreflect.Message { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteSchemaRequest.ProtoReflect.Descriptor instead. -func (*DeleteSchemaRequest) Descriptor() ([]byte, []int) { - return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{24} -} - -func (x *DeleteSchemaRequest) GetNamespaceId() string { - if x != nil { - return x.NamespaceId - } - return "" -} - -func (x *DeleteSchemaRequest) GetSchemaId() string { - if x != nil { - return x.SchemaId - } - return "" -} - -type DeleteSchemaResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` -} - -func (x *DeleteSchemaResponse) Reset() { - *x = DeleteSchemaResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteSchemaResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteSchemaResponse) ProtoMessage() {} - -func (x *DeleteSchemaResponse) ProtoReflect() protoreflect.Message { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteSchemaResponse.ProtoReflect.Descriptor instead. -func (*DeleteSchemaResponse) Descriptor() ([]byte, []int) { - return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{25} -} - -func (x *DeleteSchemaResponse) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -type ListVersionsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` - SchemaId string `protobuf:"bytes,2,opt,name=schema_id,json=schemaId,proto3" json:"schema_id,omitempty"` -} - -func (x *ListVersionsRequest) Reset() { - *x = ListVersionsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListVersionsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListVersionsRequest) ProtoMessage() {} - -func (x *ListVersionsRequest) ProtoReflect() protoreflect.Message { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListVersionsRequest.ProtoReflect.Descriptor instead. -func (*ListVersionsRequest) Descriptor() ([]byte, []int) { - return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{26} -} - -func (x *ListVersionsRequest) GetNamespaceId() string { - if x != nil { - return x.NamespaceId - } - return "" -} - -func (x *ListVersionsRequest) GetSchemaId() string { - if x != nil { - return x.SchemaId - } - return "" -} - -type ListVersionsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Versions []int32 `protobuf:"varint,1,rep,packed,name=versions,proto3" json:"versions,omitempty"` -} - -func (x *ListVersionsResponse) Reset() { - *x = ListVersionsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListVersionsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListVersionsResponse) ProtoMessage() {} - -func (x *ListVersionsResponse) ProtoReflect() protoreflect.Message { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListVersionsResponse.ProtoReflect.Descriptor instead. -func (*ListVersionsResponse) Descriptor() ([]byte, []int) { - return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{27} -} - -func (x *ListVersionsResponse) GetVersions() []int32 { - if x != nil { - return x.Versions - } - return nil -} - -type GetSchemaRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` - SchemaId string `protobuf:"bytes,2,opt,name=schema_id,json=schemaId,proto3" json:"schema_id,omitempty"` - VersionId int32 `protobuf:"varint,3,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` -} - -func (x *GetSchemaRequest) Reset() { - *x = GetSchemaRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetSchemaRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetSchemaRequest) ProtoMessage() {} - -func (x *GetSchemaRequest) ProtoReflect() protoreflect.Message { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetSchemaRequest.ProtoReflect.Descriptor instead. -func (*GetSchemaRequest) Descriptor() ([]byte, []int) { - return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{28} -} - -func (x *GetSchemaRequest) GetNamespaceId() string { - if x != nil { - return x.NamespaceId - } - return "" -} - -func (x *GetSchemaRequest) GetSchemaId() string { - if x != nil { - return x.SchemaId - } - return "" -} - -func (x *GetSchemaRequest) GetVersionId() int32 { - if x != nil { - return x.VersionId - } - return 0 -} - -type GetSchemaResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` -} - -func (x *GetSchemaResponse) Reset() { - *x = GetSchemaResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetSchemaResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetSchemaResponse) ProtoMessage() {} - -func (x *GetSchemaResponse) ProtoReflect() protoreflect.Message { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetSchemaResponse.ProtoReflect.Descriptor instead. -func (*GetSchemaResponse) Descriptor() ([]byte, []int) { - return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{29} -} - -func (x *GetSchemaResponse) GetData() []byte { - if x != nil { - return x.Data - } - return nil -} - -type DeleteVersionRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` - SchemaId string `protobuf:"bytes,2,opt,name=schema_id,json=schemaId,proto3" json:"schema_id,omitempty"` - VersionId int32 `protobuf:"varint,3,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` -} - -func (x *DeleteVersionRequest) Reset() { - *x = DeleteVersionRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteVersionRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteVersionRequest) ProtoMessage() {} - -func (x *DeleteVersionRequest) ProtoReflect() protoreflect.Message { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteVersionRequest.ProtoReflect.Descriptor instead. -func (*DeleteVersionRequest) Descriptor() ([]byte, []int) { - return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{30} -} - -func (x *DeleteVersionRequest) GetNamespaceId() string { - if x != nil { - return x.NamespaceId - } - return "" -} - -func (x *DeleteVersionRequest) GetSchemaId() string { - if x != nil { - return x.SchemaId - } - return "" -} - -func (x *DeleteVersionRequest) GetVersionId() int32 { - if x != nil { - return x.VersionId - } - return 0 -} - -type DeleteVersionResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` -} - -func (x *DeleteVersionResponse) Reset() { - *x = DeleteVersionResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteVersionResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteVersionResponse) ProtoMessage() {} - -func (x *DeleteVersionResponse) ProtoReflect() protoreflect.Message { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteVersionResponse.ProtoReflect.Descriptor instead. -func (*DeleteVersionResponse) Descriptor() ([]byte, []int) { - return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{31} -} - -func (x *DeleteVersionResponse) GetMessage() string { - if x != nil { - return x.Message - } - return "" -} - -type SearchRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` - SchemaId string `protobuf:"bytes,2,opt,name=schema_id,json=schemaId,proto3" json:"schema_id,omitempty"` - Query string `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"` - // Types that are assignable to Version: - // - // *SearchRequest_History - // *SearchRequest_VersionId - Version isSearchRequest_Version `protobuf_oneof:"version"` -} - -func (x *SearchRequest) Reset() { - *x = SearchRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SearchRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SearchRequest) ProtoMessage() {} - -func (x *SearchRequest) ProtoReflect() protoreflect.Message { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead. -func (*SearchRequest) Descriptor() ([]byte, []int) { - return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{32} -} - -func (x *SearchRequest) GetNamespaceId() string { - if x != nil { - return x.NamespaceId - } - return "" -} - -func (x *SearchRequest) GetSchemaId() string { - if x != nil { - return x.SchemaId - } - return "" -} - -func (x *SearchRequest) GetQuery() string { - if x != nil { - return x.Query - } - return "" -} - -func (m *SearchRequest) GetVersion() isSearchRequest_Version { - if m != nil { - return m.Version - } - return nil -} - -func (x *SearchRequest) GetHistory() bool { - if x, ok := x.GetVersion().(*SearchRequest_History); ok { - return x.History - } - return false -} - -func (x *SearchRequest) GetVersionId() int32 { - if x, ok := x.GetVersion().(*SearchRequest_VersionId); ok { - return x.VersionId - } - return 0 -} - -type isSearchRequest_Version interface { - isSearchRequest_Version() -} - -type SearchRequest_History struct { - History bool `protobuf:"varint,4,opt,name=history,proto3,oneof"` -} - -type SearchRequest_VersionId struct { - VersionId int32 `protobuf:"varint,5,opt,name=version_id,json=versionId,proto3,oneof"` -} - -func (*SearchRequest_History) isSearchRequest_Version() {} - -func (*SearchRequest_VersionId) isSearchRequest_Version() {} - -type SearchResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Hits []*SearchHits `protobuf:"bytes,1,rep,name=hits,proto3" json:"hits,omitempty"` - Meta *SearchMeta `protobuf:"bytes,2,opt,name=meta,proto3" json:"meta,omitempty"` -} - -func (x *SearchResponse) Reset() { - *x = SearchResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SearchResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SearchResponse) ProtoMessage() {} - -func (x *SearchResponse) ProtoReflect() protoreflect.Message { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SearchResponse.ProtoReflect.Descriptor instead. -func (*SearchResponse) Descriptor() ([]byte, []int) { - return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{33} -} - -func (x *SearchResponse) GetHits() []*SearchHits { - if x != nil { - return x.Hits - } - return nil -} - -func (x *SearchResponse) GetMeta() *SearchMeta { - if x != nil { - return x.Meta - } - return nil -} - -type SearchHits struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` - SchemaId string `protobuf:"bytes,2,opt,name=schema_id,json=schemaId,proto3" json:"schema_id,omitempty"` - VersionId int32 `protobuf:"varint,3,opt,name=version_id,json=versionId,proto3" json:"version_id,omitempty"` - Fields []string `protobuf:"bytes,4,rep,name=fields,proto3" json:"fields,omitempty"` - Types []string `protobuf:"bytes,5,rep,name=types,proto3" json:"types,omitempty"` - Path string `protobuf:"bytes,6,opt,name=path,proto3" json:"path,omitempty"` -} - -func (x *SearchHits) Reset() { - *x = SearchHits{} - if protoimpl.UnsafeEnabled { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SearchHits) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SearchHits) ProtoMessage() {} - -func (x *SearchHits) ProtoReflect() protoreflect.Message { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SearchHits.ProtoReflect.Descriptor instead. -func (*SearchHits) Descriptor() ([]byte, []int) { - return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{34} -} - -func (x *SearchHits) GetNamespaceId() string { - if x != nil { - return x.NamespaceId - } - return "" -} - -func (x *SearchHits) GetSchemaId() string { - if x != nil { - return x.SchemaId - } - return "" -} - -func (x *SearchHits) GetVersionId() int32 { - if x != nil { - return x.VersionId - } - return 0 -} - -func (x *SearchHits) GetFields() []string { - if x != nil { - return x.Fields - } - return nil -} - -func (x *SearchHits) GetTypes() []string { - if x != nil { - return x.Types - } - return nil -} - -func (x *SearchHits) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -type SearchMeta struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Total uint32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` -} - -func (x *SearchMeta) Reset() { - *x = SearchMeta{} - if protoimpl.UnsafeEnabled { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SearchMeta) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SearchMeta) ProtoMessage() {} - -func (x *SearchMeta) ProtoReflect() protoreflect.Message { - mi := &file_raystack_stencil_v1beta1_stencil_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SearchMeta.ProtoReflect.Descriptor instead. -func (*SearchMeta) Descriptor() ([]byte, []int) { - return file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP(), []int{35} -} - -func (x *SearchMeta) GetTotal() uint32 { - if x != nil { - return x.Total - } - return 0 -} - -var File_raystack_stencil_v1beta1_stencil_proto protoreflect.FileDescriptor - -var file_raystack_stencil_v1beta1_stencil_proto_rawDesc = []byte{ - 0x0a, 0x22, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x69, 0x6c, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x69, 0x6c, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, 0x65, 0x6e, 0x63, - 0x69, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, - 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, - 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc2, 0x02, 0x0a, - 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3b, 0x0a, 0x06, 0x66, 0x6f, - 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x6f, 0x64, 0x70, - 0x66, 0x2e, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x69, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, - 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x50, 0x0a, 0x0d, 0x43, 0x6f, 0x6d, 0x70, 0x61, - 0x74, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, - 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x69, 0x6c, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x43, 0x6f, 0x6d, - 0x70, 0x61, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0d, 0x43, 0x6f, 0x6d, 0x70, - 0x61, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x0a, 0x0a, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, - 0x74, 0x22, 0x88, 0x05, 0x0a, 0x06, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x3b, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x23, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x69, 0x6c, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x46, - 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x1c, 0x0a, - 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x50, 0x0a, 0x0d, 0x63, - 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x69, - 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0d, - 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x39, 0x0a, - 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x64, 0x41, 0x74, 0x22, 0x57, 0x0a, 0x06, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x16, 0x0a, - 0x12, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, - 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, - 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x42, 0x55, 0x46, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x46, 0x4f, - 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x41, 0x56, 0x52, 0x4f, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x46, - 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x4a, 0x53, 0x4f, 0x4e, 0x10, 0x03, 0x22, 0xed, 0x01, 0x0a, - 0x0d, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1d, - 0x0a, 0x19, 0x43, 0x4f, 0x4d, 0x50, 0x41, 0x54, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, - 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, - 0x16, 0x43, 0x4f, 0x4d, 0x50, 0x41, 0x54, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x42, - 0x41, 0x43, 0x4b, 0x57, 0x41, 0x52, 0x44, 0x10, 0x01, 0x12, 0x25, 0x0a, 0x21, 0x43, 0x4f, 0x4d, - 0x50, 0x41, 0x54, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x42, 0x41, 0x43, 0x4b, 0x57, - 0x41, 0x52, 0x44, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x49, 0x54, 0x49, 0x56, 0x45, 0x10, 0x02, - 0x12, 0x19, 0x0a, 0x15, 0x43, 0x4f, 0x4d, 0x50, 0x41, 0x54, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, - 0x59, 0x5f, 0x46, 0x4f, 0x52, 0x57, 0x41, 0x52, 0x44, 0x10, 0x03, 0x12, 0x24, 0x0a, 0x20, 0x43, - 0x4f, 0x4d, 0x50, 0x41, 0x54, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x46, 0x4f, 0x52, - 0x57, 0x41, 0x52, 0x44, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x49, 0x54, 0x49, 0x56, 0x45, 0x10, - 0x04, 0x12, 0x16, 0x0a, 0x12, 0x43, 0x4f, 0x4d, 0x50, 0x41, 0x54, 0x49, 0x42, 0x49, 0x4c, 0x49, - 0x54, 0x59, 0x5f, 0x46, 0x55, 0x4c, 0x4c, 0x10, 0x05, 0x12, 0x21, 0x0a, 0x1d, 0x43, 0x4f, 0x4d, - 0x50, 0x41, 0x54, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x46, 0x55, 0x4c, 0x4c, 0x5f, - 0x54, 0x52, 0x41, 0x4e, 0x53, 0x49, 0x54, 0x49, 0x56, 0x45, 0x10, 0x06, 0x22, 0x17, 0x0a, 0x15, - 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x59, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x3f, 0x0a, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, 0x65, 0x6e, 0x63, - 0x69, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x52, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, - 0x22, 0x25, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x55, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x4e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x3d, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x69, - 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0xeb, - 0x01, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x41, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x23, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x69, 0x6c, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x46, 0x6f, - 0x72, 0x6d, 0x61, 0x74, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, - 0x61, 0x74, 0x12, 0x56, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x69, 0x6c, - 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x6f, 0x64, 0x70, 0x66, - 0x2e, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x69, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, - 0x69, 0x6c, 0x69, 0x74, 0x79, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x0d, 0x63, 0x6f, 0x6d, - 0x70, 0x61, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x58, 0x0a, 0x17, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, 0x64, 0x70, - 0x66, 0x2e, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x69, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x09, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0xe5, 0x01, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x41, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x23, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x69, 0x6c, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, - 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x06, 0x66, 0x6f, - 0x72, 0x6d, 0x61, 0x74, 0x12, 0x56, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, - 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x6f, 0x64, - 0x70, 0x66, 0x2e, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x69, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x74, - 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x0d, 0x63, - 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x20, 0x0a, 0x0b, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x58, - 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x09, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6f, - 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x69, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x09, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x28, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x22, 0x33, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, - 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x24, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x4d, 0x0a, - 0x13, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, 0x65, - 0x6e, 0x63, 0x69, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x52, 0x07, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x22, 0x58, 0x0a, 0x16, - 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x49, 0x64, 0x22, 0x2d, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, - 0x65, 0x73, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0xfe, 0x01, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, - 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, - 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x49, 0x64, 0x12, 0x18, 0x0a, - 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x42, 0x04, 0xe2, 0x41, 0x01, - 0x02, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3b, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, - 0x74, 0x65, 0x6e, 0x63, 0x69, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x06, 0x66, 0x6f, - 0x72, 0x6d, 0x61, 0x74, 0x12, 0x50, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, - 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x6f, 0x64, - 0x70, 0x66, 0x2e, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x69, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x74, - 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0d, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, - 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x22, 0x5c, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, - 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xc7, 0x01, 0x0a, 0x19, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43, 0x6f, - 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x49, 0x64, 0x12, 0x18, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, - 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x50, 0x0a, 0x0d, - 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, 0x65, 0x6e, 0x63, - 0x69, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, - 0x0d, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x22, 0x1c, - 0x0a, 0x1a, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x69, - 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5a, 0x0a, 0x18, - 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x49, 0x64, 0x22, 0xd2, 0x02, 0x0a, 0x19, 0x47, 0x65, 0x74, - 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, - 0x65, 0x6e, 0x63, 0x69, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x06, 0x66, 0x6f, 0x72, - 0x6d, 0x61, 0x74, 0x12, 0x50, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x69, - 0x6c, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x6f, 0x64, 0x70, - 0x66, 0x2e, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x69, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, - 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0d, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, - 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0xaf, 0x01, - 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, - 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, - 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x49, 0x64, 0x12, 0x50, 0x0a, - 0x0d, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, 0x65, 0x6e, - 0x63, 0x69, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, - 0x52, 0x0d, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x22, - 0xcb, 0x01, 0x0a, 0x1c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x3b, 0x0a, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x23, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x69, 0x6c, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x46, - 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x06, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x50, 0x0a, - 0x0d, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, 0x65, 0x6e, - 0x63, 0x69, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, - 0x52, 0x0d, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, - 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x55, 0x0a, - 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x49, 0x64, 0x22, 0x30, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x55, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, - 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, - 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x49, 0x64, 0x22, 0x32, 0x0a, - 0x14, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x08, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x22, 0x71, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x27, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x75, 0x0a, - 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x73, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x31, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, - 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xb3, 0x01, 0x0a, 0x0d, 0x53, 0x65, 0x61, 0x72, - 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, - 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x05, 0x71, 0x75, 0x65, - 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x02, 0x52, 0x05, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1a, 0x0a, 0x07, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x79, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x07, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, - 0x79, 0x12, 0x1f, 0x0a, 0x0a, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x09, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x49, 0x64, 0x42, 0x09, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x7c, 0x0a, - 0x0e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x34, 0x0a, 0x04, 0x68, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, - 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x69, 0x6c, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x48, 0x69, 0x74, 0x73, 0x52, - 0x04, 0x68, 0x69, 0x74, 0x73, 0x12, 0x34, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, 0x65, 0x6e, 0x63, - 0x69, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, - 0x68, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x22, 0xad, 0x01, 0x0a, 0x0a, - 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x48, 0x69, 0x74, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a, - 0x09, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x65, - 0x6c, 0x64, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, - 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x22, 0x0a, 0x0a, 0x53, - 0x65, 0x61, 0x72, 0x63, 0x68, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, - 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x32, - 0xb1, 0x17, 0x0a, 0x0e, 0x53, 0x74, 0x65, 0x6e, 0x63, 0x69, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0xb0, 0x01, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x2b, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, 0x65, - 0x6e, 0x63, 0x69, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x69, - 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x43, 0x92, 0x41, 0x25, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x12, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, - 0x12, 0x13, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0xaa, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x29, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, - 0x65, 0x6e, 0x63, 0x69, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2a, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x69, 0x6c, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, 0x92, - 0x41, 0x20, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x13, 0x47, - 0x65, 0x74, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x62, 0x79, 0x20, - 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x69, - 0x64, 0x7d, 0x12, 0xb4, 0x01, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, - 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x2c, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, - 0x65, 0x6e, 0x63, 0x69, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, 0x65, 0x6e, - 0x63, 0x69, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x44, 0x92, 0x41, 0x23, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x12, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x18, 0x22, 0x13, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0xc0, 0x01, 0x0a, 0x0f, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x2c, 0x2e, - 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x69, 0x6c, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x6f, 0x64, - 0x70, 0x66, 0x2e, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x69, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x50, 0x92, 0x41, 0x2a, 0x0a, - 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1d, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x65, 0x6e, 0x74, - 0x69, 0x74, 0x79, 0x20, 0x62, 0x79, 0x20, 0x69, 0x64, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x1a, - 0x18, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x3a, 0x01, 0x2a, 0x12, 0x8a, 0x02, 0x0a, - 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x12, 0x2c, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x69, 0x6c, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, - 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x69, 0x6c, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x99, 0x01, - 0x92, 0x41, 0x76, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x16, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x20, 0x62, 0x79, 0x20, 0x69, 0x64, 0x1a, 0x51, 0x45, 0x6e, 0x73, 0x75, 0x72, 0x65, 0x20, 0x61, - 0x6c, 0x6c, 0x20, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, - 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, - 0x69, 0x73, 0x20, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x2c, 0x20, 0x6f, 0x74, 0x68, 0x65, - 0x72, 0x77, 0x69, 0x73, 0x65, 0x20, 0x69, 0x74, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x74, 0x68, - 0x72, 0x6f, 0x77, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x2a, - 0x18, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, - 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xb9, 0x01, 0x0a, 0x0b, 0x4c, 0x69, - 0x73, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x12, 0x28, 0x2e, 0x6f, 0x64, 0x70, 0x66, - 0x2e, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x69, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, 0x65, 0x6e, 0x63, - 0x69, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x55, - 0x92, 0x41, 0x2a, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x20, 0x4c, 0x69, 0x73, - 0x74, 0x20, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, - 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x73, 0x12, 0x67, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x29, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, 0x65, - 0x6e, 0x63, 0x69, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2a, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x69, 0x6c, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x79, - 0x0a, 0x12, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x69, - 0x6c, 0x69, 0x74, 0x79, 0x12, 0x2f, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, 0x65, 0x6e, - 0x63, 0x69, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, 0x65, - 0x6e, 0x63, 0x69, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x68, 0x65, - 0x63, 0x6b, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x98, 0x02, 0x0a, 0x11, 0x47, 0x65, - 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, - 0x2e, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x69, 0x6c, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x2f, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x69, 0x6c, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0xa1, 0x01, 0x92, 0x41, 0x5b, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x51, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x20, 0x75, 0x6e, - 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x2e, 0x20, 0x52, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2c, 0x20, 0x75, 0x6e, 0x69, 0x71, 0x75, - 0x65, 0x20, 0x49, 0x44, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3d, 0x12, 0x3b, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x73, 0x2f, 0x7b, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x69, 0x64, 0x7d, 0x2f, - 0x6d, 0x65, 0x74, 0x61, 0x12, 0xe8, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x31, 0x2e, - 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x69, 0x6c, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x32, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x69, 0x6c, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x69, 0x92, 0x41, 0x25, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x12, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x73, - 0x63, 0x68, 0x65, 0x6d, 0x61, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x3b, 0x32, 0x36, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, - 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x73, - 0x2f, 0x7b, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x69, 0x64, 0x7d, 0x3a, 0x01, 0x2a, 0x12, - 0x70, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x12, 0x2c, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x69, - 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, - 0x65, 0x73, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2d, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x69, 0x6c, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, - 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0xc9, 0x01, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x12, 0x29, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x69, - 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, - 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x69, 0x6c, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x62, 0x92, 0x41, 0x21, 0x0a, 0x06, - 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x73, - 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x2a, 0x36, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, - 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, - 0x73, 0x2f, 0x7b, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x5e, 0x0a, - 0x09, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x26, 0x2e, 0x6f, 0x64, 0x70, - 0x66, 0x2e, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x69, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x69, - 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0xe8, 0x01, - 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x29, - 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x69, 0x6c, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6f, 0x64, 0x70, 0x66, - 0x2e, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x69, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x80, 0x01, 0x92, 0x41, 0x36, 0x0a, 0x06, 0x73, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x4c, 0x69, - 0x73, 0x74, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x73, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x41, 0x12, 0x3f, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x73, 0x2f, 0x7b, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x69, 0x64, 0x7d, 0x2f, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xfb, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2a, 0x2e, 0x6f, 0x64, 0x70, - 0x66, 0x2e, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x69, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, - 0x65, 0x6e, 0x63, 0x69, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x90, 0x01, 0x92, 0x41, 0x39, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x4e, 0x2a, 0x4c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x7d, 0x2f, 0x73, 0x63, 0x68, - 0x65, 0x6d, 0x61, 0x73, 0x2f, 0x7b, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x69, 0x64, 0x7d, - 0x2f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x7d, 0x12, 0x8a, 0x01, 0x0a, 0x06, 0x53, 0x65, 0x61, 0x72, 0x63, - 0x68, 0x12, 0x23, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x69, 0x6c, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6f, 0x64, 0x70, 0x66, 0x2e, 0x73, 0x74, - 0x65, 0x6e, 0x63, 0x69, 0x6c, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x53, 0x65, - 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, 0x92, 0x41, - 0x1b, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x11, 0x47, 0x6c, 0x6f, 0x62, 0x61, - 0x6c, 0x20, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x20, 0x41, 0x50, 0x49, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x11, 0x12, 0x0f, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x65, 0x61, - 0x72, 0x63, 0x68, 0x42, 0x46, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x6f, 0x64, 0x70, 0x66, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6e, 0x2f, 0x73, 0x74, - 0x65, 0x6e, 0x63, 0x69, 0x6c, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x3b, 0x73, 0x74, - 0x65, 0x6e, 0x63, 0x69, 0x6c, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x92, 0x41, 0x0c, 0x12, - 0x07, 0x32, 0x05, 0x30, 0x2e, 0x31, 0x2e, 0x34, 0x2a, 0x01, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_raystack_stencil_v1beta1_stencil_proto_rawDescOnce sync.Once - file_raystack_stencil_v1beta1_stencil_proto_rawDescData = file_raystack_stencil_v1beta1_stencil_proto_rawDesc -) - -func file_raystack_stencil_v1beta1_stencil_proto_rawDescGZIP() []byte { - file_raystack_stencil_v1beta1_stencil_proto_rawDescOnce.Do(func() { - file_raystack_stencil_v1beta1_stencil_proto_rawDescData = protoimpl.X.CompressGZIP(file_raystack_stencil_v1beta1_stencil_proto_rawDescData) - }) - return file_raystack_stencil_v1beta1_stencil_proto_rawDescData -} - -var file_raystack_stencil_v1beta1_stencil_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_raystack_stencil_v1beta1_stencil_proto_msgTypes = make([]protoimpl.MessageInfo, 36) -var file_raystack_stencil_v1beta1_stencil_proto_goTypes = []interface{}{ - (Schema_Format)(0), // 0: raystack.stencil.v1beta1.Schema.Format - (Schema_Compatibility)(0), // 1: raystack.stencil.v1beta1.Schema.Compatibility - (*Namespace)(nil), // 2: raystack.stencil.v1beta1.Namespace - (*Schema)(nil), // 3: raystack.stencil.v1beta1.Schema - (*ListNamespacesRequest)(nil), // 4: raystack.stencil.v1beta1.ListNamespacesRequest - (*ListNamespacesResponse)(nil), // 5: raystack.stencil.v1beta1.ListNamespacesResponse - (*GetNamespaceRequest)(nil), // 6: raystack.stencil.v1beta1.GetNamespaceRequest - (*GetNamespaceResponse)(nil), // 7: raystack.stencil.v1beta1.GetNamespaceResponse - (*CreateNamespaceRequest)(nil), // 8: raystack.stencil.v1beta1.CreateNamespaceRequest - (*CreateNamespaceResponse)(nil), // 9: raystack.stencil.v1beta1.CreateNamespaceResponse - (*UpdateNamespaceRequest)(nil), // 10: raystack.stencil.v1beta1.UpdateNamespaceRequest - (*UpdateNamespaceResponse)(nil), // 11: raystack.stencil.v1beta1.UpdateNamespaceResponse - (*DeleteNamespaceRequest)(nil), // 12: raystack.stencil.v1beta1.DeleteNamespaceRequest - (*DeleteNamespaceResponse)(nil), // 13: raystack.stencil.v1beta1.DeleteNamespaceResponse - (*ListSchemasRequest)(nil), // 14: raystack.stencil.v1beta1.ListSchemasRequest - (*ListSchemasResponse)(nil), // 15: raystack.stencil.v1beta1.ListSchemasResponse - (*GetLatestSchemaRequest)(nil), // 16: raystack.stencil.v1beta1.GetLatestSchemaRequest - (*GetLatestSchemaResponse)(nil), // 17: raystack.stencil.v1beta1.GetLatestSchemaResponse - (*CreateSchemaRequest)(nil), // 18: raystack.stencil.v1beta1.CreateSchemaRequest - (*CreateSchemaResponse)(nil), // 19: raystack.stencil.v1beta1.CreateSchemaResponse - (*CheckCompatibilityRequest)(nil), // 20: raystack.stencil.v1beta1.CheckCompatibilityRequest - (*CheckCompatibilityResponse)(nil), // 21: raystack.stencil.v1beta1.CheckCompatibilityResponse - (*GetSchemaMetadataRequest)(nil), // 22: raystack.stencil.v1beta1.GetSchemaMetadataRequest - (*GetSchemaMetadataResponse)(nil), // 23: raystack.stencil.v1beta1.GetSchemaMetadataResponse - (*UpdateSchemaMetadataRequest)(nil), // 24: raystack.stencil.v1beta1.UpdateSchemaMetadataRequest - (*UpdateSchemaMetadataResponse)(nil), // 25: raystack.stencil.v1beta1.UpdateSchemaMetadataResponse - (*DeleteSchemaRequest)(nil), // 26: raystack.stencil.v1beta1.DeleteSchemaRequest - (*DeleteSchemaResponse)(nil), // 27: raystack.stencil.v1beta1.DeleteSchemaResponse - (*ListVersionsRequest)(nil), // 28: raystack.stencil.v1beta1.ListVersionsRequest - (*ListVersionsResponse)(nil), // 29: raystack.stencil.v1beta1.ListVersionsResponse - (*GetSchemaRequest)(nil), // 30: raystack.stencil.v1beta1.GetSchemaRequest - (*GetSchemaResponse)(nil), // 31: raystack.stencil.v1beta1.GetSchemaResponse - (*DeleteVersionRequest)(nil), // 32: raystack.stencil.v1beta1.DeleteVersionRequest - (*DeleteVersionResponse)(nil), // 33: raystack.stencil.v1beta1.DeleteVersionResponse - (*SearchRequest)(nil), // 34: raystack.stencil.v1beta1.SearchRequest - (*SearchResponse)(nil), // 35: raystack.stencil.v1beta1.SearchResponse - (*SearchHits)(nil), // 36: raystack.stencil.v1beta1.SearchHits - (*SearchMeta)(nil), // 37: raystack.stencil.v1beta1.SearchMeta - (*timestamppb.Timestamp)(nil), // 38: google.protobuf.Timestamp -} -var file_raystack_stencil_v1beta1_stencil_proto_depIdxs = []int32{ - 0, // 0: raystack.stencil.v1beta1.Namespace.format:type_name -> raystack.stencil.v1beta1.Schema.Format - 1, // 1: raystack.stencil.v1beta1.Namespace.Compatibility:type_name -> raystack.stencil.v1beta1.Schema.Compatibility - 38, // 2: raystack.stencil.v1beta1.Namespace.created_at:type_name -> google.protobuf.Timestamp - 38, // 3: raystack.stencil.v1beta1.Namespace.updated_at:type_name -> google.protobuf.Timestamp - 0, // 4: raystack.stencil.v1beta1.Schema.format:type_name -> raystack.stencil.v1beta1.Schema.Format - 1, // 5: raystack.stencil.v1beta1.Schema.compatibility:type_name -> raystack.stencil.v1beta1.Schema.Compatibility - 38, // 6: raystack.stencil.v1beta1.Schema.created_at:type_name -> google.protobuf.Timestamp - 38, // 7: raystack.stencil.v1beta1.Schema.updated_at:type_name -> google.protobuf.Timestamp - 2, // 8: raystack.stencil.v1beta1.ListNamespacesResponse.namespaces:type_name -> raystack.stencil.v1beta1.Namespace - 2, // 9: raystack.stencil.v1beta1.GetNamespaceResponse.namespace:type_name -> raystack.stencil.v1beta1.Namespace - 0, // 10: raystack.stencil.v1beta1.CreateNamespaceRequest.format:type_name -> raystack.stencil.v1beta1.Schema.Format - 1, // 11: raystack.stencil.v1beta1.CreateNamespaceRequest.compatibility:type_name -> raystack.stencil.v1beta1.Schema.Compatibility - 2, // 12: raystack.stencil.v1beta1.CreateNamespaceResponse.namespace:type_name -> raystack.stencil.v1beta1.Namespace - 0, // 13: raystack.stencil.v1beta1.UpdateNamespaceRequest.format:type_name -> raystack.stencil.v1beta1.Schema.Format - 1, // 14: raystack.stencil.v1beta1.UpdateNamespaceRequest.compatibility:type_name -> raystack.stencil.v1beta1.Schema.Compatibility - 2, // 15: raystack.stencil.v1beta1.UpdateNamespaceResponse.namespace:type_name -> raystack.stencil.v1beta1.Namespace - 3, // 16: raystack.stencil.v1beta1.ListSchemasResponse.schemas:type_name -> raystack.stencil.v1beta1.Schema - 0, // 17: raystack.stencil.v1beta1.CreateSchemaRequest.format:type_name -> raystack.stencil.v1beta1.Schema.Format - 1, // 18: raystack.stencil.v1beta1.CreateSchemaRequest.compatibility:type_name -> raystack.stencil.v1beta1.Schema.Compatibility - 1, // 19: raystack.stencil.v1beta1.CheckCompatibilityRequest.compatibility:type_name -> raystack.stencil.v1beta1.Schema.Compatibility - 0, // 20: raystack.stencil.v1beta1.GetSchemaMetadataResponse.format:type_name -> raystack.stencil.v1beta1.Schema.Format - 1, // 21: raystack.stencil.v1beta1.GetSchemaMetadataResponse.compatibility:type_name -> raystack.stencil.v1beta1.Schema.Compatibility - 38, // 22: raystack.stencil.v1beta1.GetSchemaMetadataResponse.created_at:type_name -> google.protobuf.Timestamp - 38, // 23: raystack.stencil.v1beta1.GetSchemaMetadataResponse.updated_at:type_name -> google.protobuf.Timestamp - 1, // 24: raystack.stencil.v1beta1.UpdateSchemaMetadataRequest.compatibility:type_name -> raystack.stencil.v1beta1.Schema.Compatibility - 0, // 25: raystack.stencil.v1beta1.UpdateSchemaMetadataResponse.format:type_name -> raystack.stencil.v1beta1.Schema.Format - 1, // 26: raystack.stencil.v1beta1.UpdateSchemaMetadataResponse.compatibility:type_name -> raystack.stencil.v1beta1.Schema.Compatibility - 36, // 27: raystack.stencil.v1beta1.SearchResponse.hits:type_name -> raystack.stencil.v1beta1.SearchHits - 37, // 28: raystack.stencil.v1beta1.SearchResponse.meta:type_name -> raystack.stencil.v1beta1.SearchMeta - 4, // 29: raystack.stencil.v1beta1.StencilService.ListNamespaces:input_type -> raystack.stencil.v1beta1.ListNamespacesRequest - 6, // 30: raystack.stencil.v1beta1.StencilService.GetNamespace:input_type -> raystack.stencil.v1beta1.GetNamespaceRequest - 8, // 31: raystack.stencil.v1beta1.StencilService.CreateNamespace:input_type -> raystack.stencil.v1beta1.CreateNamespaceRequest - 10, // 32: raystack.stencil.v1beta1.StencilService.UpdateNamespace:input_type -> raystack.stencil.v1beta1.UpdateNamespaceRequest - 12, // 33: raystack.stencil.v1beta1.StencilService.DeleteNamespace:input_type -> raystack.stencil.v1beta1.DeleteNamespaceRequest - 14, // 34: raystack.stencil.v1beta1.StencilService.ListSchemas:input_type -> raystack.stencil.v1beta1.ListSchemasRequest - 18, // 35: raystack.stencil.v1beta1.StencilService.CreateSchema:input_type -> raystack.stencil.v1beta1.CreateSchemaRequest - 20, // 36: raystack.stencil.v1beta1.StencilService.CheckCompatibility:input_type -> raystack.stencil.v1beta1.CheckCompatibilityRequest - 22, // 37: raystack.stencil.v1beta1.StencilService.GetSchemaMetadata:input_type -> raystack.stencil.v1beta1.GetSchemaMetadataRequest - 24, // 38: raystack.stencil.v1beta1.StencilService.UpdateSchemaMetadata:input_type -> raystack.stencil.v1beta1.UpdateSchemaMetadataRequest - 16, // 39: raystack.stencil.v1beta1.StencilService.GetLatestSchema:input_type -> raystack.stencil.v1beta1.GetLatestSchemaRequest - 26, // 40: raystack.stencil.v1beta1.StencilService.DeleteSchema:input_type -> raystack.stencil.v1beta1.DeleteSchemaRequest - 30, // 41: raystack.stencil.v1beta1.StencilService.GetSchema:input_type -> raystack.stencil.v1beta1.GetSchemaRequest - 28, // 42: raystack.stencil.v1beta1.StencilService.ListVersions:input_type -> raystack.stencil.v1beta1.ListVersionsRequest - 32, // 43: raystack.stencil.v1beta1.StencilService.DeleteVersion:input_type -> raystack.stencil.v1beta1.DeleteVersionRequest - 34, // 44: raystack.stencil.v1beta1.StencilService.Search:input_type -> raystack.stencil.v1beta1.SearchRequest - 5, // 45: raystack.stencil.v1beta1.StencilService.ListNamespaces:output_type -> raystack.stencil.v1beta1.ListNamespacesResponse - 7, // 46: raystack.stencil.v1beta1.StencilService.GetNamespace:output_type -> raystack.stencil.v1beta1.GetNamespaceResponse - 9, // 47: raystack.stencil.v1beta1.StencilService.CreateNamespace:output_type -> raystack.stencil.v1beta1.CreateNamespaceResponse - 11, // 48: raystack.stencil.v1beta1.StencilService.UpdateNamespace:output_type -> raystack.stencil.v1beta1.UpdateNamespaceResponse - 13, // 49: raystack.stencil.v1beta1.StencilService.DeleteNamespace:output_type -> raystack.stencil.v1beta1.DeleteNamespaceResponse - 15, // 50: raystack.stencil.v1beta1.StencilService.ListSchemas:output_type -> raystack.stencil.v1beta1.ListSchemasResponse - 19, // 51: raystack.stencil.v1beta1.StencilService.CreateSchema:output_type -> raystack.stencil.v1beta1.CreateSchemaResponse - 21, // 52: raystack.stencil.v1beta1.StencilService.CheckCompatibility:output_type -> raystack.stencil.v1beta1.CheckCompatibilityResponse - 23, // 53: raystack.stencil.v1beta1.StencilService.GetSchemaMetadata:output_type -> raystack.stencil.v1beta1.GetSchemaMetadataResponse - 25, // 54: raystack.stencil.v1beta1.StencilService.UpdateSchemaMetadata:output_type -> raystack.stencil.v1beta1.UpdateSchemaMetadataResponse - 17, // 55: raystack.stencil.v1beta1.StencilService.GetLatestSchema:output_type -> raystack.stencil.v1beta1.GetLatestSchemaResponse - 27, // 56: raystack.stencil.v1beta1.StencilService.DeleteSchema:output_type -> raystack.stencil.v1beta1.DeleteSchemaResponse - 31, // 57: raystack.stencil.v1beta1.StencilService.GetSchema:output_type -> raystack.stencil.v1beta1.GetSchemaResponse - 29, // 58: raystack.stencil.v1beta1.StencilService.ListVersions:output_type -> raystack.stencil.v1beta1.ListVersionsResponse - 33, // 59: raystack.stencil.v1beta1.StencilService.DeleteVersion:output_type -> raystack.stencil.v1beta1.DeleteVersionResponse - 35, // 60: raystack.stencil.v1beta1.StencilService.Search:output_type -> raystack.stencil.v1beta1.SearchResponse - 45, // [45:61] is the sub-list for method output_type - 29, // [29:45] is the sub-list for method input_type - 29, // [29:29] is the sub-list for extension type_name - 29, // [29:29] is the sub-list for extension extendee - 0, // [0:29] is the sub-list for field type_name -} - -func init() { file_raystack_stencil_v1beta1_stencil_proto_init() } -func file_raystack_stencil_v1beta1_stencil_proto_init() { - if File_raystack_stencil_v1beta1_stencil_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_raystack_stencil_v1beta1_stencil_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Namespace); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_raystack_stencil_v1beta1_stencil_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Schema); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_raystack_stencil_v1beta1_stencil_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListNamespacesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_raystack_stencil_v1beta1_stencil_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListNamespacesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_raystack_stencil_v1beta1_stencil_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetNamespaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_raystack_stencil_v1beta1_stencil_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetNamespaceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_raystack_stencil_v1beta1_stencil_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateNamespaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_raystack_stencil_v1beta1_stencil_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateNamespaceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_raystack_stencil_v1beta1_stencil_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateNamespaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_raystack_stencil_v1beta1_stencil_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateNamespaceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_raystack_stencil_v1beta1_stencil_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteNamespaceRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_raystack_stencil_v1beta1_stencil_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteNamespaceResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_raystack_stencil_v1beta1_stencil_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListSchemasRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_raystack_stencil_v1beta1_stencil_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListSchemasResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_raystack_stencil_v1beta1_stencil_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetLatestSchemaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_raystack_stencil_v1beta1_stencil_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetLatestSchemaResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_raystack_stencil_v1beta1_stencil_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateSchemaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_raystack_stencil_v1beta1_stencil_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateSchemaResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_raystack_stencil_v1beta1_stencil_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CheckCompatibilityRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_raystack_stencil_v1beta1_stencil_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CheckCompatibilityResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_raystack_stencil_v1beta1_stencil_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSchemaMetadataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_raystack_stencil_v1beta1_stencil_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSchemaMetadataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_raystack_stencil_v1beta1_stencil_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateSchemaMetadataRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_raystack_stencil_v1beta1_stencil_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateSchemaMetadataResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_raystack_stencil_v1beta1_stencil_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteSchemaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_raystack_stencil_v1beta1_stencil_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteSchemaResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_raystack_stencil_v1beta1_stencil_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListVersionsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_raystack_stencil_v1beta1_stencil_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListVersionsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_raystack_stencil_v1beta1_stencil_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSchemaRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_raystack_stencil_v1beta1_stencil_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSchemaResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_raystack_stencil_v1beta1_stencil_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteVersionRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_raystack_stencil_v1beta1_stencil_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteVersionResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_raystack_stencil_v1beta1_stencil_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SearchRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_raystack_stencil_v1beta1_stencil_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SearchResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_raystack_stencil_v1beta1_stencil_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SearchHits); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_raystack_stencil_v1beta1_stencil_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SearchMeta); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_raystack_stencil_v1beta1_stencil_proto_msgTypes[32].OneofWrappers = []interface{}{ - (*SearchRequest_History)(nil), - (*SearchRequest_VersionId)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_raystack_stencil_v1beta1_stencil_proto_rawDesc, - NumEnums: 2, - NumMessages: 36, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_raystack_stencil_v1beta1_stencil_proto_goTypes, - DependencyIndexes: file_raystack_stencil_v1beta1_stencil_proto_depIdxs, - EnumInfos: file_raystack_stencil_v1beta1_stencil_proto_enumTypes, - MessageInfos: file_raystack_stencil_v1beta1_stencil_proto_msgTypes, - }.Build() - File_raystack_stencil_v1beta1_stencil_proto = out.File - file_raystack_stencil_v1beta1_stencil_proto_rawDesc = nil - file_raystack_stencil_v1beta1_stencil_proto_goTypes = nil - file_raystack_stencil_v1beta1_stencil_proto_depIdxs = nil -} diff --git a/proto/raystack/stencil/v1beta1/stencil.pb.gw.go b/proto/raystack/stencil/v1beta1/stencil.pb.gw.go deleted file mode 100644 index 61edad45..00000000 --- a/proto/raystack/stencil/v1beta1/stencil.pb.gw.go +++ /dev/null @@ -1,1382 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: raystack/stencil/v1beta1/stencil.proto - -/* -Package stencilv1beta1 is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package stencilv1beta1 - -import ( - "context" - "io" - "net/http" - - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join - -func request_StencilService_ListNamespaces_0(ctx context.Context, marshaler runtime.Marshaler, client StencilServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListNamespacesRequest - var metadata runtime.ServerMetadata - - msg, err := client.ListNamespaces(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_StencilService_ListNamespaces_0(ctx context.Context, marshaler runtime.Marshaler, server StencilServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListNamespacesRequest - var metadata runtime.ServerMetadata - - msg, err := server.ListNamespaces(ctx, &protoReq) - return msg, metadata, err - -} - -func request_StencilService_GetNamespace_0(ctx context.Context, marshaler runtime.Marshaler, client StencilServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetNamespaceRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := client.GetNamespace(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_StencilService_GetNamespace_0(ctx context.Context, marshaler runtime.Marshaler, server StencilServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetNamespaceRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := server.GetNamespace(ctx, &protoReq) - return msg, metadata, err - -} - -func request_StencilService_CreateNamespace_0(ctx context.Context, marshaler runtime.Marshaler, client StencilServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateNamespaceRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.CreateNamespace(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_StencilService_CreateNamespace_0(ctx context.Context, marshaler runtime.Marshaler, server StencilServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateNamespaceRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.CreateNamespace(ctx, &protoReq) - return msg, metadata, err - -} - -func request_StencilService_UpdateNamespace_0(ctx context.Context, marshaler runtime.Marshaler, client StencilServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateNamespaceRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := client.UpdateNamespace(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_StencilService_UpdateNamespace_0(ctx context.Context, marshaler runtime.Marshaler, server StencilServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateNamespaceRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := server.UpdateNamespace(ctx, &protoReq) - return msg, metadata, err - -} - -func request_StencilService_DeleteNamespace_0(ctx context.Context, marshaler runtime.Marshaler, client StencilServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteNamespaceRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := client.DeleteNamespace(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_StencilService_DeleteNamespace_0(ctx context.Context, marshaler runtime.Marshaler, server StencilServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteNamespaceRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := server.DeleteNamespace(ctx, &protoReq) - return msg, metadata, err - -} - -func request_StencilService_ListSchemas_0(ctx context.Context, marshaler runtime.Marshaler, client StencilServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListSchemasRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := client.ListSchemas(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_StencilService_ListSchemas_0(ctx context.Context, marshaler runtime.Marshaler, server StencilServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListSchemasRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := server.ListSchemas(ctx, &protoReq) - return msg, metadata, err - -} - -func request_StencilService_GetSchemaMetadata_0(ctx context.Context, marshaler runtime.Marshaler, client StencilServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetSchemaMetadataRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace_id") - } - - protoReq.NamespaceId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace_id", err) - } - - val, ok = pathParams["schema_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "schema_id") - } - - protoReq.SchemaId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "schema_id", err) - } - - msg, err := client.GetSchemaMetadata(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_StencilService_GetSchemaMetadata_0(ctx context.Context, marshaler runtime.Marshaler, server StencilServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetSchemaMetadataRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace_id") - } - - protoReq.NamespaceId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace_id", err) - } - - val, ok = pathParams["schema_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "schema_id") - } - - protoReq.SchemaId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "schema_id", err) - } - - msg, err := server.GetSchemaMetadata(ctx, &protoReq) - return msg, metadata, err - -} - -func request_StencilService_UpdateSchemaMetadata_0(ctx context.Context, marshaler runtime.Marshaler, client StencilServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateSchemaMetadataRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace_id") - } - - protoReq.NamespaceId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace_id", err) - } - - val, ok = pathParams["schema_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "schema_id") - } - - protoReq.SchemaId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "schema_id", err) - } - - msg, err := client.UpdateSchemaMetadata(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_StencilService_UpdateSchemaMetadata_0(ctx context.Context, marshaler runtime.Marshaler, server StencilServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateSchemaMetadataRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace_id") - } - - protoReq.NamespaceId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace_id", err) - } - - val, ok = pathParams["schema_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "schema_id") - } - - protoReq.SchemaId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "schema_id", err) - } - - msg, err := server.UpdateSchemaMetadata(ctx, &protoReq) - return msg, metadata, err - -} - -func request_StencilService_DeleteSchema_0(ctx context.Context, marshaler runtime.Marshaler, client StencilServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteSchemaRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace_id") - } - - protoReq.NamespaceId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace_id", err) - } - - val, ok = pathParams["schema_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "schema_id") - } - - protoReq.SchemaId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "schema_id", err) - } - - msg, err := client.DeleteSchema(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_StencilService_DeleteSchema_0(ctx context.Context, marshaler runtime.Marshaler, server StencilServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteSchemaRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace_id") - } - - protoReq.NamespaceId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace_id", err) - } - - val, ok = pathParams["schema_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "schema_id") - } - - protoReq.SchemaId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "schema_id", err) - } - - msg, err := server.DeleteSchema(ctx, &protoReq) - return msg, metadata, err - -} - -func request_StencilService_ListVersions_0(ctx context.Context, marshaler runtime.Marshaler, client StencilServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListVersionsRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace_id") - } - - protoReq.NamespaceId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace_id", err) - } - - val, ok = pathParams["schema_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "schema_id") - } - - protoReq.SchemaId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "schema_id", err) - } - - msg, err := client.ListVersions(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_StencilService_ListVersions_0(ctx context.Context, marshaler runtime.Marshaler, server StencilServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListVersionsRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace_id") - } - - protoReq.NamespaceId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace_id", err) - } - - val, ok = pathParams["schema_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "schema_id") - } - - protoReq.SchemaId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "schema_id", err) - } - - msg, err := server.ListVersions(ctx, &protoReq) - return msg, metadata, err - -} - -func request_StencilService_DeleteVersion_0(ctx context.Context, marshaler runtime.Marshaler, client StencilServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteVersionRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace_id") - } - - protoReq.NamespaceId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace_id", err) - } - - val, ok = pathParams["schema_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "schema_id") - } - - protoReq.SchemaId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "schema_id", err) - } - - val, ok = pathParams["version_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version_id") - } - - protoReq.VersionId, err = runtime.Int32(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version_id", err) - } - - msg, err := client.DeleteVersion(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_StencilService_DeleteVersion_0(ctx context.Context, marshaler runtime.Marshaler, server StencilServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteVersionRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["namespace_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "namespace_id") - } - - protoReq.NamespaceId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "namespace_id", err) - } - - val, ok = pathParams["schema_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "schema_id") - } - - protoReq.SchemaId, err = runtime.String(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "schema_id", err) - } - - val, ok = pathParams["version_id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "version_id") - } - - protoReq.VersionId, err = runtime.Int32(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "version_id", err) - } - - msg, err := server.DeleteVersion(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_StencilService_Search_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_StencilService_Search_0(ctx context.Context, marshaler runtime.Marshaler, client StencilServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SearchRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_StencilService_Search_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.Search(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_StencilService_Search_0(ctx context.Context, marshaler runtime.Marshaler, server StencilServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq SearchRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_StencilService_Search_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.Search(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterStencilServiceHandlerServer registers the http handlers for service StencilService to "mux". -// UnaryRPC :call StencilServiceServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterStencilServiceHandlerFromEndpoint instead. -func RegisterStencilServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server StencilServiceServer) error { - - mux.Handle("GET", pattern_StencilService_ListNamespaces_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.stencil.v1beta1.StencilService/ListNamespaces", runtime.WithHTTPPathPattern("/v1beta1/namespaces")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_StencilService_ListNamespaces_0(ctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_StencilService_ListNamespaces_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_StencilService_GetNamespace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.stencil.v1beta1.StencilService/GetNamespace", runtime.WithHTTPPathPattern("/v1beta1/namespaces/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_StencilService_GetNamespace_0(ctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_StencilService_GetNamespace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_StencilService_CreateNamespace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.stencil.v1beta1.StencilService/CreateNamespace", runtime.WithHTTPPathPattern("/v1beta1/namespaces")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_StencilService_CreateNamespace_0(ctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_StencilService_CreateNamespace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_StencilService_UpdateNamespace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.stencil.v1beta1.StencilService/UpdateNamespace", runtime.WithHTTPPathPattern("/v1beta1/namespaces/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_StencilService_UpdateNamespace_0(ctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_StencilService_UpdateNamespace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_StencilService_DeleteNamespace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.stencil.v1beta1.StencilService/DeleteNamespace", runtime.WithHTTPPathPattern("/v1beta1/namespaces/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_StencilService_DeleteNamespace_0(ctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_StencilService_DeleteNamespace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_StencilService_ListSchemas_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.stencil.v1beta1.StencilService/ListSchemas", runtime.WithHTTPPathPattern("/v1beta1/namespaces/{id}/schemas")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_StencilService_ListSchemas_0(ctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_StencilService_ListSchemas_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_StencilService_GetSchemaMetadata_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.stencil.v1beta1.StencilService/GetSchemaMetadata", runtime.WithHTTPPathPattern("/v1beta1/namespaces/{namespace_id}/schemas/{schema_id}/meta")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_StencilService_GetSchemaMetadata_0(ctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_StencilService_GetSchemaMetadata_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PATCH", pattern_StencilService_UpdateSchemaMetadata_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.stencil.v1beta1.StencilService/UpdateSchemaMetadata", runtime.WithHTTPPathPattern("/v1beta1/namespaces/{namespace_id}/schemas/{schema_id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_StencilService_UpdateSchemaMetadata_0(ctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_StencilService_UpdateSchemaMetadata_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_StencilService_DeleteSchema_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.stencil.v1beta1.StencilService/DeleteSchema", runtime.WithHTTPPathPattern("/v1beta1/namespaces/{namespace_id}/schemas/{schema_id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_StencilService_DeleteSchema_0(ctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_StencilService_DeleteSchema_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_StencilService_ListVersions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.stencil.v1beta1.StencilService/ListVersions", runtime.WithHTTPPathPattern("/v1beta1/namespaces/{namespace_id}/schemas/{schema_id}/versions")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_StencilService_ListVersions_0(ctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_StencilService_ListVersions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_StencilService_DeleteVersion_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.stencil.v1beta1.StencilService/DeleteVersion", runtime.WithHTTPPathPattern("/v1beta1/namespaces/{namespace_id}/schemas/{schema_id}/versions/{version_id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_StencilService_DeleteVersion_0(ctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_StencilService_DeleteVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_StencilService_Search_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/raystack.stencil.v1beta1.StencilService/Search", runtime.WithHTTPPathPattern("/v1beta1/search")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_StencilService_Search_0(ctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_StencilService_Search_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterStencilServiceHandlerFromEndpoint is same as RegisterStencilServiceHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterStencilServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterStencilServiceHandler(ctx, mux, conn) -} - -// RegisterStencilServiceHandler registers the http handlers for service StencilService to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterStencilServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterStencilServiceHandlerClient(ctx, mux, NewStencilServiceClient(conn)) -} - -// RegisterStencilServiceHandlerClient registers the http handlers for service StencilService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "StencilServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "StencilServiceClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "StencilServiceClient" to call the correct interceptors. -func RegisterStencilServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client StencilServiceClient) error { - - mux.Handle("GET", pattern_StencilService_ListNamespaces_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.stencil.v1beta1.StencilService/ListNamespaces", runtime.WithHTTPPathPattern("/v1beta1/namespaces")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_StencilService_ListNamespaces_0(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_StencilService_ListNamespaces_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_StencilService_GetNamespace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.stencil.v1beta1.StencilService/GetNamespace", runtime.WithHTTPPathPattern("/v1beta1/namespaces/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_StencilService_GetNamespace_0(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_StencilService_GetNamespace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_StencilService_CreateNamespace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.stencil.v1beta1.StencilService/CreateNamespace", runtime.WithHTTPPathPattern("/v1beta1/namespaces")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_StencilService_CreateNamespace_0(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_StencilService_CreateNamespace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PUT", pattern_StencilService_UpdateNamespace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.stencil.v1beta1.StencilService/UpdateNamespace", runtime.WithHTTPPathPattern("/v1beta1/namespaces/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_StencilService_UpdateNamespace_0(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_StencilService_UpdateNamespace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_StencilService_DeleteNamespace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.stencil.v1beta1.StencilService/DeleteNamespace", runtime.WithHTTPPathPattern("/v1beta1/namespaces/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_StencilService_DeleteNamespace_0(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_StencilService_DeleteNamespace_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_StencilService_ListSchemas_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.stencil.v1beta1.StencilService/ListSchemas", runtime.WithHTTPPathPattern("/v1beta1/namespaces/{id}/schemas")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_StencilService_ListSchemas_0(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_StencilService_ListSchemas_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_StencilService_GetSchemaMetadata_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.stencil.v1beta1.StencilService/GetSchemaMetadata", runtime.WithHTTPPathPattern("/v1beta1/namespaces/{namespace_id}/schemas/{schema_id}/meta")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_StencilService_GetSchemaMetadata_0(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_StencilService_GetSchemaMetadata_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("PATCH", pattern_StencilService_UpdateSchemaMetadata_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.stencil.v1beta1.StencilService/UpdateSchemaMetadata", runtime.WithHTTPPathPattern("/v1beta1/namespaces/{namespace_id}/schemas/{schema_id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_StencilService_UpdateSchemaMetadata_0(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_StencilService_UpdateSchemaMetadata_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_StencilService_DeleteSchema_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.stencil.v1beta1.StencilService/DeleteSchema", runtime.WithHTTPPathPattern("/v1beta1/namespaces/{namespace_id}/schemas/{schema_id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_StencilService_DeleteSchema_0(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_StencilService_DeleteSchema_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_StencilService_ListVersions_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.stencil.v1beta1.StencilService/ListVersions", runtime.WithHTTPPathPattern("/v1beta1/namespaces/{namespace_id}/schemas/{schema_id}/versions")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_StencilService_ListVersions_0(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_StencilService_ListVersions_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_StencilService_DeleteVersion_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.stencil.v1beta1.StencilService/DeleteVersion", runtime.WithHTTPPathPattern("/v1beta1/namespaces/{namespace_id}/schemas/{schema_id}/versions/{version_id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_StencilService_DeleteVersion_0(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_StencilService_DeleteVersion_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_StencilService_Search_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - ctx, err = runtime.AnnotateContext(ctx, mux, req, "/raystack.stencil.v1beta1.StencilService/Search", runtime.WithHTTPPathPattern("/v1beta1/search")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_StencilService_Search_0(ctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_StencilService_Search_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_StencilService_ListNamespaces_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1beta1", "namespaces"}, "")) - - pattern_StencilService_GetNamespace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1beta1", "namespaces", "id"}, "")) - - pattern_StencilService_CreateNamespace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1beta1", "namespaces"}, "")) - - pattern_StencilService_UpdateNamespace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1beta1", "namespaces", "id"}, "")) - - pattern_StencilService_DeleteNamespace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1beta1", "namespaces", "id"}, "")) - - pattern_StencilService_ListSchemas_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1beta1", "namespaces", "id", "schemas"}, "")) - - pattern_StencilService_GetSchemaMetadata_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"v1beta1", "namespaces", "namespace_id", "schemas", "schema_id", "meta"}, "")) - - pattern_StencilService_UpdateSchemaMetadata_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"v1beta1", "namespaces", "namespace_id", "schemas", "schema_id"}, "")) - - pattern_StencilService_DeleteSchema_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"v1beta1", "namespaces", "namespace_id", "schemas", "schema_id"}, "")) - - pattern_StencilService_ListVersions_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"v1beta1", "namespaces", "namespace_id", "schemas", "schema_id", "versions"}, "")) - - pattern_StencilService_DeleteVersion_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6}, []string{"v1beta1", "namespaces", "namespace_id", "schemas", "schema_id", "versions", "version_id"}, "")) - - pattern_StencilService_Search_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1beta1", "search"}, "")) -) - -var ( - forward_StencilService_ListNamespaces_0 = runtime.ForwardResponseMessage - - forward_StencilService_GetNamespace_0 = runtime.ForwardResponseMessage - - forward_StencilService_CreateNamespace_0 = runtime.ForwardResponseMessage - - forward_StencilService_UpdateNamespace_0 = runtime.ForwardResponseMessage - - forward_StencilService_DeleteNamespace_0 = runtime.ForwardResponseMessage - - forward_StencilService_ListSchemas_0 = runtime.ForwardResponseMessage - - forward_StencilService_GetSchemaMetadata_0 = runtime.ForwardResponseMessage - - forward_StencilService_UpdateSchemaMetadata_0 = runtime.ForwardResponseMessage - - forward_StencilService_DeleteSchema_0 = runtime.ForwardResponseMessage - - forward_StencilService_ListVersions_0 = runtime.ForwardResponseMessage - - forward_StencilService_DeleteVersion_0 = runtime.ForwardResponseMessage - - forward_StencilService_Search_0 = runtime.ForwardResponseMessage -) diff --git a/proto/raystack/stencil/v1beta1/stencil.pb.validate.go b/proto/raystack/stencil/v1beta1/stencil.pb.validate.go deleted file mode 100644 index 5145874e..00000000 --- a/proto/raystack/stencil/v1beta1/stencil.pb.validate.go +++ /dev/null @@ -1,4193 +0,0 @@ -// Code generated by protoc-gen-validate. DO NOT EDIT. -// source: raystack/stencil/v1beta1/stencil.proto - -package stencilv1beta1 - -import ( - "bytes" - "errors" - "fmt" - "net" - "net/mail" - "net/url" - "regexp" - "sort" - "strings" - "time" - "unicode/utf8" - - "google.golang.org/protobuf/types/known/anypb" -) - -// ensure the imports are used -var ( - _ = bytes.MinRead - _ = errors.New("") - _ = fmt.Print - _ = utf8.UTFMax - _ = (*regexp.Regexp)(nil) - _ = (*strings.Reader)(nil) - _ = net.IPv4len - _ = time.Duration(0) - _ = (*url.URL)(nil) - _ = (*mail.Address)(nil) - _ = anypb.Any{} - _ = sort.Sort -) - -// Validate checks the field values on Namespace with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Namespace) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Namespace with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in NamespaceMultiError, or nil -// if none found. -func (m *Namespace) ValidateAll() error { - return m.validate(true) -} - -func (m *Namespace) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Id - - // no validation rules for Format - - // no validation rules for Compatibility - - // no validation rules for Description - - if all { - switch v := interface{}(m.GetCreatedAt()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, NamespaceValidationError{ - field: "CreatedAt", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, NamespaceValidationError{ - field: "CreatedAt", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCreatedAt()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return NamespaceValidationError{ - field: "CreatedAt", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetUpdatedAt()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, NamespaceValidationError{ - field: "UpdatedAt", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, NamespaceValidationError{ - field: "UpdatedAt", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetUpdatedAt()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return NamespaceValidationError{ - field: "UpdatedAt", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return NamespaceMultiError(errors) - } - return nil -} - -// NamespaceMultiError is an error wrapping multiple validation errors returned -// by Namespace.ValidateAll() if the designated constraints aren't met. -type NamespaceMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m NamespaceMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m NamespaceMultiError) AllErrors() []error { return m } - -// NamespaceValidationError is the validation error returned by -// Namespace.Validate if the designated constraints aren't met. -type NamespaceValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e NamespaceValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e NamespaceValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e NamespaceValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e NamespaceValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e NamespaceValidationError) ErrorName() string { return "NamespaceValidationError" } - -// Error satisfies the builtin error interface -func (e NamespaceValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sNamespace.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = NamespaceValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = NamespaceValidationError{} - -// Validate checks the field values on Schema with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *Schema) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on Schema with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in SchemaMultiError, or nil if none found. -func (m *Schema) ValidateAll() error { - return m.validate(true) -} - -func (m *Schema) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Name - - // no validation rules for Format - - // no validation rules for Authority - - // no validation rules for Compatibility - - if all { - switch v := interface{}(m.GetCreatedAt()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, SchemaValidationError{ - field: "CreatedAt", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, SchemaValidationError{ - field: "CreatedAt", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCreatedAt()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return SchemaValidationError{ - field: "CreatedAt", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetUpdatedAt()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, SchemaValidationError{ - field: "UpdatedAt", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, SchemaValidationError{ - field: "UpdatedAt", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetUpdatedAt()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return SchemaValidationError{ - field: "UpdatedAt", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return SchemaMultiError(errors) - } - return nil -} - -// SchemaMultiError is an error wrapping multiple validation errors returned by -// Schema.ValidateAll() if the designated constraints aren't met. -type SchemaMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m SchemaMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m SchemaMultiError) AllErrors() []error { return m } - -// SchemaValidationError is the validation error returned by Schema.Validate if -// the designated constraints aren't met. -type SchemaValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e SchemaValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e SchemaValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e SchemaValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e SchemaValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e SchemaValidationError) ErrorName() string { return "SchemaValidationError" } - -// Error satisfies the builtin error interface -func (e SchemaValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sSchema.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = SchemaValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = SchemaValidationError{} - -// Validate checks the field values on ListNamespacesRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ListNamespacesRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ListNamespacesRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ListNamespacesRequestMultiError, or nil if none found. -func (m *ListNamespacesRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *ListNamespacesRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return ListNamespacesRequestMultiError(errors) - } - return nil -} - -// ListNamespacesRequestMultiError is an error wrapping multiple validation -// errors returned by ListNamespacesRequest.ValidateAll() if the designated -// constraints aren't met. -type ListNamespacesRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ListNamespacesRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ListNamespacesRequestMultiError) AllErrors() []error { return m } - -// ListNamespacesRequestValidationError is the validation error returned by -// ListNamespacesRequest.Validate if the designated constraints aren't met. -type ListNamespacesRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ListNamespacesRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ListNamespacesRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ListNamespacesRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ListNamespacesRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ListNamespacesRequestValidationError) ErrorName() string { - return "ListNamespacesRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e ListNamespacesRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sListNamespacesRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ListNamespacesRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ListNamespacesRequestValidationError{} - -// Validate checks the field values on ListNamespacesResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ListNamespacesResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ListNamespacesResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ListNamespacesResponseMultiError, or nil if none found. -func (m *ListNamespacesResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *ListNamespacesResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetNamespaces() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ListNamespacesResponseValidationError{ - field: fmt.Sprintf("Namespaces[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ListNamespacesResponseValidationError{ - field: fmt.Sprintf("Namespaces[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListNamespacesResponseValidationError{ - field: fmt.Sprintf("Namespaces[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return ListNamespacesResponseMultiError(errors) - } - return nil -} - -// ListNamespacesResponseMultiError is an error wrapping multiple validation -// errors returned by ListNamespacesResponse.ValidateAll() if the designated -// constraints aren't met. -type ListNamespacesResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ListNamespacesResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ListNamespacesResponseMultiError) AllErrors() []error { return m } - -// ListNamespacesResponseValidationError is the validation error returned by -// ListNamespacesResponse.Validate if the designated constraints aren't met. -type ListNamespacesResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ListNamespacesResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ListNamespacesResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ListNamespacesResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ListNamespacesResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ListNamespacesResponseValidationError) ErrorName() string { - return "ListNamespacesResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e ListNamespacesResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sListNamespacesResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ListNamespacesResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ListNamespacesResponseValidationError{} - -// Validate checks the field values on GetNamespaceRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *GetNamespaceRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on GetNamespaceRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// GetNamespaceRequestMultiError, or nil if none found. -func (m *GetNamespaceRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *GetNamespaceRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Id - - if len(errors) > 0 { - return GetNamespaceRequestMultiError(errors) - } - return nil -} - -// GetNamespaceRequestMultiError is an error wrapping multiple validation -// errors returned by GetNamespaceRequest.ValidateAll() if the designated -// constraints aren't met. -type GetNamespaceRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GetNamespaceRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GetNamespaceRequestMultiError) AllErrors() []error { return m } - -// GetNamespaceRequestValidationError is the validation error returned by -// GetNamespaceRequest.Validate if the designated constraints aren't met. -type GetNamespaceRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GetNamespaceRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GetNamespaceRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GetNamespaceRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GetNamespaceRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GetNamespaceRequestValidationError) ErrorName() string { - return "GetNamespaceRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e GetNamespaceRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGetNamespaceRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GetNamespaceRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GetNamespaceRequestValidationError{} - -// Validate checks the field values on GetNamespaceResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *GetNamespaceResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on GetNamespaceResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// GetNamespaceResponseMultiError, or nil if none found. -func (m *GetNamespaceResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *GetNamespaceResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetNamespace()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GetNamespaceResponseValidationError{ - field: "Namespace", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GetNamespaceResponseValidationError{ - field: "Namespace", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetNamespace()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GetNamespaceResponseValidationError{ - field: "Namespace", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return GetNamespaceResponseMultiError(errors) - } - return nil -} - -// GetNamespaceResponseMultiError is an error wrapping multiple validation -// errors returned by GetNamespaceResponse.ValidateAll() if the designated -// constraints aren't met. -type GetNamespaceResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GetNamespaceResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GetNamespaceResponseMultiError) AllErrors() []error { return m } - -// GetNamespaceResponseValidationError is the validation error returned by -// GetNamespaceResponse.Validate if the designated constraints aren't met. -type GetNamespaceResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GetNamespaceResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GetNamespaceResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GetNamespaceResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GetNamespaceResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GetNamespaceResponseValidationError) ErrorName() string { - return "GetNamespaceResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e GetNamespaceResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGetNamespaceResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GetNamespaceResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GetNamespaceResponseValidationError{} - -// Validate checks the field values on CreateNamespaceRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *CreateNamespaceRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CreateNamespaceRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// CreateNamespaceRequestMultiError, or nil if none found. -func (m *CreateNamespaceRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *CreateNamespaceRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Id - - // no validation rules for Format - - // no validation rules for Compatibility - - // no validation rules for Description - - if len(errors) > 0 { - return CreateNamespaceRequestMultiError(errors) - } - return nil -} - -// CreateNamespaceRequestMultiError is an error wrapping multiple validation -// errors returned by CreateNamespaceRequest.ValidateAll() if the designated -// constraints aren't met. -type CreateNamespaceRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CreateNamespaceRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CreateNamespaceRequestMultiError) AllErrors() []error { return m } - -// CreateNamespaceRequestValidationError is the validation error returned by -// CreateNamespaceRequest.Validate if the designated constraints aren't met. -type CreateNamespaceRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CreateNamespaceRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CreateNamespaceRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CreateNamespaceRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CreateNamespaceRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CreateNamespaceRequestValidationError) ErrorName() string { - return "CreateNamespaceRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e CreateNamespaceRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCreateNamespaceRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CreateNamespaceRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CreateNamespaceRequestValidationError{} - -// Validate checks the field values on CreateNamespaceResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *CreateNamespaceResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CreateNamespaceResponse with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// CreateNamespaceResponseMultiError, or nil if none found. -func (m *CreateNamespaceResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *CreateNamespaceResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetNamespace()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, CreateNamespaceResponseValidationError{ - field: "Namespace", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, CreateNamespaceResponseValidationError{ - field: "Namespace", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetNamespace()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return CreateNamespaceResponseValidationError{ - field: "Namespace", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return CreateNamespaceResponseMultiError(errors) - } - return nil -} - -// CreateNamespaceResponseMultiError is an error wrapping multiple validation -// errors returned by CreateNamespaceResponse.ValidateAll() if the designated -// constraints aren't met. -type CreateNamespaceResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CreateNamespaceResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CreateNamespaceResponseMultiError) AllErrors() []error { return m } - -// CreateNamespaceResponseValidationError is the validation error returned by -// CreateNamespaceResponse.Validate if the designated constraints aren't met. -type CreateNamespaceResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CreateNamespaceResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CreateNamespaceResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CreateNamespaceResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CreateNamespaceResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CreateNamespaceResponseValidationError) ErrorName() string { - return "CreateNamespaceResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e CreateNamespaceResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCreateNamespaceResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CreateNamespaceResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CreateNamespaceResponseValidationError{} - -// Validate checks the field values on UpdateNamespaceRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *UpdateNamespaceRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on UpdateNamespaceRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// UpdateNamespaceRequestMultiError, or nil if none found. -func (m *UpdateNamespaceRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *UpdateNamespaceRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Id - - // no validation rules for Format - - // no validation rules for Compatibility - - // no validation rules for Description - - if len(errors) > 0 { - return UpdateNamespaceRequestMultiError(errors) - } - return nil -} - -// UpdateNamespaceRequestMultiError is an error wrapping multiple validation -// errors returned by UpdateNamespaceRequest.ValidateAll() if the designated -// constraints aren't met. -type UpdateNamespaceRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m UpdateNamespaceRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m UpdateNamespaceRequestMultiError) AllErrors() []error { return m } - -// UpdateNamespaceRequestValidationError is the validation error returned by -// UpdateNamespaceRequest.Validate if the designated constraints aren't met. -type UpdateNamespaceRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e UpdateNamespaceRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e UpdateNamespaceRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e UpdateNamespaceRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e UpdateNamespaceRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e UpdateNamespaceRequestValidationError) ErrorName() string { - return "UpdateNamespaceRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e UpdateNamespaceRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sUpdateNamespaceRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = UpdateNamespaceRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = UpdateNamespaceRequestValidationError{} - -// Validate checks the field values on UpdateNamespaceResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *UpdateNamespaceResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on UpdateNamespaceResponse with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// UpdateNamespaceResponseMultiError, or nil if none found. -func (m *UpdateNamespaceResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *UpdateNamespaceResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if all { - switch v := interface{}(m.GetNamespace()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, UpdateNamespaceResponseValidationError{ - field: "Namespace", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, UpdateNamespaceResponseValidationError{ - field: "Namespace", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetNamespace()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return UpdateNamespaceResponseValidationError{ - field: "Namespace", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return UpdateNamespaceResponseMultiError(errors) - } - return nil -} - -// UpdateNamespaceResponseMultiError is an error wrapping multiple validation -// errors returned by UpdateNamespaceResponse.ValidateAll() if the designated -// constraints aren't met. -type UpdateNamespaceResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m UpdateNamespaceResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m UpdateNamespaceResponseMultiError) AllErrors() []error { return m } - -// UpdateNamespaceResponseValidationError is the validation error returned by -// UpdateNamespaceResponse.Validate if the designated constraints aren't met. -type UpdateNamespaceResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e UpdateNamespaceResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e UpdateNamespaceResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e UpdateNamespaceResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e UpdateNamespaceResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e UpdateNamespaceResponseValidationError) ErrorName() string { - return "UpdateNamespaceResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e UpdateNamespaceResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sUpdateNamespaceResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = UpdateNamespaceResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = UpdateNamespaceResponseValidationError{} - -// Validate checks the field values on DeleteNamespaceRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *DeleteNamespaceRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DeleteNamespaceRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// DeleteNamespaceRequestMultiError, or nil if none found. -func (m *DeleteNamespaceRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *DeleteNamespaceRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Id - - if len(errors) > 0 { - return DeleteNamespaceRequestMultiError(errors) - } - return nil -} - -// DeleteNamespaceRequestMultiError is an error wrapping multiple validation -// errors returned by DeleteNamespaceRequest.ValidateAll() if the designated -// constraints aren't met. -type DeleteNamespaceRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DeleteNamespaceRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DeleteNamespaceRequestMultiError) AllErrors() []error { return m } - -// DeleteNamespaceRequestValidationError is the validation error returned by -// DeleteNamespaceRequest.Validate if the designated constraints aren't met. -type DeleteNamespaceRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DeleteNamespaceRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DeleteNamespaceRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DeleteNamespaceRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DeleteNamespaceRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DeleteNamespaceRequestValidationError) ErrorName() string { - return "DeleteNamespaceRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e DeleteNamespaceRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDeleteNamespaceRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DeleteNamespaceRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DeleteNamespaceRequestValidationError{} - -// Validate checks the field values on DeleteNamespaceResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *DeleteNamespaceResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DeleteNamespaceResponse with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// DeleteNamespaceResponseMultiError, or nil if none found. -func (m *DeleteNamespaceResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *DeleteNamespaceResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Message - - if len(errors) > 0 { - return DeleteNamespaceResponseMultiError(errors) - } - return nil -} - -// DeleteNamespaceResponseMultiError is an error wrapping multiple validation -// errors returned by DeleteNamespaceResponse.ValidateAll() if the designated -// constraints aren't met. -type DeleteNamespaceResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DeleteNamespaceResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DeleteNamespaceResponseMultiError) AllErrors() []error { return m } - -// DeleteNamespaceResponseValidationError is the validation error returned by -// DeleteNamespaceResponse.Validate if the designated constraints aren't met. -type DeleteNamespaceResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DeleteNamespaceResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DeleteNamespaceResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DeleteNamespaceResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DeleteNamespaceResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DeleteNamespaceResponseValidationError) ErrorName() string { - return "DeleteNamespaceResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e DeleteNamespaceResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDeleteNamespaceResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DeleteNamespaceResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DeleteNamespaceResponseValidationError{} - -// Validate checks the field values on ListSchemasRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ListSchemasRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ListSchemasRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ListSchemasRequestMultiError, or nil if none found. -func (m *ListSchemasRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *ListSchemasRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Id - - if len(errors) > 0 { - return ListSchemasRequestMultiError(errors) - } - return nil -} - -// ListSchemasRequestMultiError is an error wrapping multiple validation errors -// returned by ListSchemasRequest.ValidateAll() if the designated constraints -// aren't met. -type ListSchemasRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ListSchemasRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ListSchemasRequestMultiError) AllErrors() []error { return m } - -// ListSchemasRequestValidationError is the validation error returned by -// ListSchemasRequest.Validate if the designated constraints aren't met. -type ListSchemasRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ListSchemasRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ListSchemasRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ListSchemasRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ListSchemasRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ListSchemasRequestValidationError) ErrorName() string { - return "ListSchemasRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e ListSchemasRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sListSchemasRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ListSchemasRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ListSchemasRequestValidationError{} - -// Validate checks the field values on ListSchemasResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ListSchemasResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ListSchemasResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ListSchemasResponseMultiError, or nil if none found. -func (m *ListSchemasResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *ListSchemasResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetSchemas() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, ListSchemasResponseValidationError{ - field: fmt.Sprintf("Schemas[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, ListSchemasResponseValidationError{ - field: fmt.Sprintf("Schemas[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return ListSchemasResponseValidationError{ - field: fmt.Sprintf("Schemas[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return ListSchemasResponseMultiError(errors) - } - return nil -} - -// ListSchemasResponseMultiError is an error wrapping multiple validation -// errors returned by ListSchemasResponse.ValidateAll() if the designated -// constraints aren't met. -type ListSchemasResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ListSchemasResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ListSchemasResponseMultiError) AllErrors() []error { return m } - -// ListSchemasResponseValidationError is the validation error returned by -// ListSchemasResponse.Validate if the designated constraints aren't met. -type ListSchemasResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ListSchemasResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ListSchemasResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ListSchemasResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ListSchemasResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ListSchemasResponseValidationError) ErrorName() string { - return "ListSchemasResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e ListSchemasResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sListSchemasResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ListSchemasResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ListSchemasResponseValidationError{} - -// Validate checks the field values on GetLatestSchemaRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *GetLatestSchemaRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on GetLatestSchemaRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// GetLatestSchemaRequestMultiError, or nil if none found. -func (m *GetLatestSchemaRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *GetLatestSchemaRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for NamespaceId - - // no validation rules for SchemaId - - if len(errors) > 0 { - return GetLatestSchemaRequestMultiError(errors) - } - return nil -} - -// GetLatestSchemaRequestMultiError is an error wrapping multiple validation -// errors returned by GetLatestSchemaRequest.ValidateAll() if the designated -// constraints aren't met. -type GetLatestSchemaRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GetLatestSchemaRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GetLatestSchemaRequestMultiError) AllErrors() []error { return m } - -// GetLatestSchemaRequestValidationError is the validation error returned by -// GetLatestSchemaRequest.Validate if the designated constraints aren't met. -type GetLatestSchemaRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GetLatestSchemaRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GetLatestSchemaRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GetLatestSchemaRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GetLatestSchemaRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GetLatestSchemaRequestValidationError) ErrorName() string { - return "GetLatestSchemaRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e GetLatestSchemaRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGetLatestSchemaRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GetLatestSchemaRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GetLatestSchemaRequestValidationError{} - -// Validate checks the field values on GetLatestSchemaResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *GetLatestSchemaResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on GetLatestSchemaResponse with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// GetLatestSchemaResponseMultiError, or nil if none found. -func (m *GetLatestSchemaResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *GetLatestSchemaResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Data - - if len(errors) > 0 { - return GetLatestSchemaResponseMultiError(errors) - } - return nil -} - -// GetLatestSchemaResponseMultiError is an error wrapping multiple validation -// errors returned by GetLatestSchemaResponse.ValidateAll() if the designated -// constraints aren't met. -type GetLatestSchemaResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GetLatestSchemaResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GetLatestSchemaResponseMultiError) AllErrors() []error { return m } - -// GetLatestSchemaResponseValidationError is the validation error returned by -// GetLatestSchemaResponse.Validate if the designated constraints aren't met. -type GetLatestSchemaResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GetLatestSchemaResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GetLatestSchemaResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GetLatestSchemaResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GetLatestSchemaResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GetLatestSchemaResponseValidationError) ErrorName() string { - return "GetLatestSchemaResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e GetLatestSchemaResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGetLatestSchemaResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GetLatestSchemaResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GetLatestSchemaResponseValidationError{} - -// Validate checks the field values on CreateSchemaRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *CreateSchemaRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CreateSchemaRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// CreateSchemaRequestMultiError, or nil if none found. -func (m *CreateSchemaRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *CreateSchemaRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for NamespaceId - - // no validation rules for SchemaId - - // no validation rules for Data - - // no validation rules for Format - - // no validation rules for Compatibility - - if len(errors) > 0 { - return CreateSchemaRequestMultiError(errors) - } - return nil -} - -// CreateSchemaRequestMultiError is an error wrapping multiple validation -// errors returned by CreateSchemaRequest.ValidateAll() if the designated -// constraints aren't met. -type CreateSchemaRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CreateSchemaRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CreateSchemaRequestMultiError) AllErrors() []error { return m } - -// CreateSchemaRequestValidationError is the validation error returned by -// CreateSchemaRequest.Validate if the designated constraints aren't met. -type CreateSchemaRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CreateSchemaRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CreateSchemaRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CreateSchemaRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CreateSchemaRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CreateSchemaRequestValidationError) ErrorName() string { - return "CreateSchemaRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e CreateSchemaRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCreateSchemaRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CreateSchemaRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CreateSchemaRequestValidationError{} - -// Validate checks the field values on CreateSchemaResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *CreateSchemaResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CreateSchemaResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// CreateSchemaResponseMultiError, or nil if none found. -func (m *CreateSchemaResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *CreateSchemaResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Version - - // no validation rules for Id - - // no validation rules for Location - - if len(errors) > 0 { - return CreateSchemaResponseMultiError(errors) - } - return nil -} - -// CreateSchemaResponseMultiError is an error wrapping multiple validation -// errors returned by CreateSchemaResponse.ValidateAll() if the designated -// constraints aren't met. -type CreateSchemaResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CreateSchemaResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CreateSchemaResponseMultiError) AllErrors() []error { return m } - -// CreateSchemaResponseValidationError is the validation error returned by -// CreateSchemaResponse.Validate if the designated constraints aren't met. -type CreateSchemaResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CreateSchemaResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CreateSchemaResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CreateSchemaResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CreateSchemaResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CreateSchemaResponseValidationError) ErrorName() string { - return "CreateSchemaResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e CreateSchemaResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCreateSchemaResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CreateSchemaResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CreateSchemaResponseValidationError{} - -// Validate checks the field values on CheckCompatibilityRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *CheckCompatibilityRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CheckCompatibilityRequest with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// CheckCompatibilityRequestMultiError, or nil if none found. -func (m *CheckCompatibilityRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *CheckCompatibilityRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for NamespaceId - - // no validation rules for SchemaId - - // no validation rules for Data - - // no validation rules for Compatibility - - if len(errors) > 0 { - return CheckCompatibilityRequestMultiError(errors) - } - return nil -} - -// CheckCompatibilityRequestMultiError is an error wrapping multiple validation -// errors returned by CheckCompatibilityRequest.ValidateAll() if the -// designated constraints aren't met. -type CheckCompatibilityRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CheckCompatibilityRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CheckCompatibilityRequestMultiError) AllErrors() []error { return m } - -// CheckCompatibilityRequestValidationError is the validation error returned by -// CheckCompatibilityRequest.Validate if the designated constraints aren't met. -type CheckCompatibilityRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CheckCompatibilityRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CheckCompatibilityRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CheckCompatibilityRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CheckCompatibilityRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CheckCompatibilityRequestValidationError) ErrorName() string { - return "CheckCompatibilityRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e CheckCompatibilityRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCheckCompatibilityRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CheckCompatibilityRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CheckCompatibilityRequestValidationError{} - -// Validate checks the field values on CheckCompatibilityResponse with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *CheckCompatibilityResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on CheckCompatibilityResponse with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// CheckCompatibilityResponseMultiError, or nil if none found. -func (m *CheckCompatibilityResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *CheckCompatibilityResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return CheckCompatibilityResponseMultiError(errors) - } - return nil -} - -// CheckCompatibilityResponseMultiError is an error wrapping multiple -// validation errors returned by CheckCompatibilityResponse.ValidateAll() if -// the designated constraints aren't met. -type CheckCompatibilityResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m CheckCompatibilityResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m CheckCompatibilityResponseMultiError) AllErrors() []error { return m } - -// CheckCompatibilityResponseValidationError is the validation error returned -// by CheckCompatibilityResponse.Validate if the designated constraints aren't met. -type CheckCompatibilityResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e CheckCompatibilityResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e CheckCompatibilityResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e CheckCompatibilityResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e CheckCompatibilityResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e CheckCompatibilityResponseValidationError) ErrorName() string { - return "CheckCompatibilityResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e CheckCompatibilityResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sCheckCompatibilityResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = CheckCompatibilityResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = CheckCompatibilityResponseValidationError{} - -// Validate checks the field values on GetSchemaMetadataRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *GetSchemaMetadataRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on GetSchemaMetadataRequest with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// GetSchemaMetadataRequestMultiError, or nil if none found. -func (m *GetSchemaMetadataRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *GetSchemaMetadataRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for NamespaceId - - // no validation rules for SchemaId - - if len(errors) > 0 { - return GetSchemaMetadataRequestMultiError(errors) - } - return nil -} - -// GetSchemaMetadataRequestMultiError is an error wrapping multiple validation -// errors returned by GetSchemaMetadataRequest.ValidateAll() if the designated -// constraints aren't met. -type GetSchemaMetadataRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GetSchemaMetadataRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GetSchemaMetadataRequestMultiError) AllErrors() []error { return m } - -// GetSchemaMetadataRequestValidationError is the validation error returned by -// GetSchemaMetadataRequest.Validate if the designated constraints aren't met. -type GetSchemaMetadataRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GetSchemaMetadataRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GetSchemaMetadataRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GetSchemaMetadataRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GetSchemaMetadataRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GetSchemaMetadataRequestValidationError) ErrorName() string { - return "GetSchemaMetadataRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e GetSchemaMetadataRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGetSchemaMetadataRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GetSchemaMetadataRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GetSchemaMetadataRequestValidationError{} - -// Validate checks the field values on GetSchemaMetadataResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *GetSchemaMetadataResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on GetSchemaMetadataResponse with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// GetSchemaMetadataResponseMultiError, or nil if none found. -func (m *GetSchemaMetadataResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *GetSchemaMetadataResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Format - - // no validation rules for Compatibility - - // no validation rules for Authority - - // no validation rules for Name - - if all { - switch v := interface{}(m.GetCreatedAt()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GetSchemaMetadataResponseValidationError{ - field: "CreatedAt", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GetSchemaMetadataResponseValidationError{ - field: "CreatedAt", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetCreatedAt()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GetSchemaMetadataResponseValidationError{ - field: "CreatedAt", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if all { - switch v := interface{}(m.GetUpdatedAt()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, GetSchemaMetadataResponseValidationError{ - field: "UpdatedAt", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, GetSchemaMetadataResponseValidationError{ - field: "UpdatedAt", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetUpdatedAt()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return GetSchemaMetadataResponseValidationError{ - field: "UpdatedAt", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return GetSchemaMetadataResponseMultiError(errors) - } - return nil -} - -// GetSchemaMetadataResponseMultiError is an error wrapping multiple validation -// errors returned by GetSchemaMetadataResponse.ValidateAll() if the -// designated constraints aren't met. -type GetSchemaMetadataResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GetSchemaMetadataResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GetSchemaMetadataResponseMultiError) AllErrors() []error { return m } - -// GetSchemaMetadataResponseValidationError is the validation error returned by -// GetSchemaMetadataResponse.Validate if the designated constraints aren't met. -type GetSchemaMetadataResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GetSchemaMetadataResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GetSchemaMetadataResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GetSchemaMetadataResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GetSchemaMetadataResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GetSchemaMetadataResponseValidationError) ErrorName() string { - return "GetSchemaMetadataResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e GetSchemaMetadataResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGetSchemaMetadataResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GetSchemaMetadataResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GetSchemaMetadataResponseValidationError{} - -// Validate checks the field values on UpdateSchemaMetadataRequest with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *UpdateSchemaMetadataRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on UpdateSchemaMetadataRequest with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// UpdateSchemaMetadataRequestMultiError, or nil if none found. -func (m *UpdateSchemaMetadataRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *UpdateSchemaMetadataRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for NamespaceId - - // no validation rules for SchemaId - - // no validation rules for Compatibility - - if len(errors) > 0 { - return UpdateSchemaMetadataRequestMultiError(errors) - } - return nil -} - -// UpdateSchemaMetadataRequestMultiError is an error wrapping multiple -// validation errors returned by UpdateSchemaMetadataRequest.ValidateAll() if -// the designated constraints aren't met. -type UpdateSchemaMetadataRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m UpdateSchemaMetadataRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m UpdateSchemaMetadataRequestMultiError) AllErrors() []error { return m } - -// UpdateSchemaMetadataRequestValidationError is the validation error returned -// by UpdateSchemaMetadataRequest.Validate if the designated constraints -// aren't met. -type UpdateSchemaMetadataRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e UpdateSchemaMetadataRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e UpdateSchemaMetadataRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e UpdateSchemaMetadataRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e UpdateSchemaMetadataRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e UpdateSchemaMetadataRequestValidationError) ErrorName() string { - return "UpdateSchemaMetadataRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e UpdateSchemaMetadataRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sUpdateSchemaMetadataRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = UpdateSchemaMetadataRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = UpdateSchemaMetadataRequestValidationError{} - -// Validate checks the field values on UpdateSchemaMetadataResponse with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *UpdateSchemaMetadataResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on UpdateSchemaMetadataResponse with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// UpdateSchemaMetadataResponseMultiError, or nil if none found. -func (m *UpdateSchemaMetadataResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *UpdateSchemaMetadataResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Format - - // no validation rules for Compatibility - - // no validation rules for Authority - - if len(errors) > 0 { - return UpdateSchemaMetadataResponseMultiError(errors) - } - return nil -} - -// UpdateSchemaMetadataResponseMultiError is an error wrapping multiple -// validation errors returned by UpdateSchemaMetadataResponse.ValidateAll() if -// the designated constraints aren't met. -type UpdateSchemaMetadataResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m UpdateSchemaMetadataResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m UpdateSchemaMetadataResponseMultiError) AllErrors() []error { return m } - -// UpdateSchemaMetadataResponseValidationError is the validation error returned -// by UpdateSchemaMetadataResponse.Validate if the designated constraints -// aren't met. -type UpdateSchemaMetadataResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e UpdateSchemaMetadataResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e UpdateSchemaMetadataResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e UpdateSchemaMetadataResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e UpdateSchemaMetadataResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e UpdateSchemaMetadataResponseValidationError) ErrorName() string { - return "UpdateSchemaMetadataResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e UpdateSchemaMetadataResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sUpdateSchemaMetadataResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = UpdateSchemaMetadataResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = UpdateSchemaMetadataResponseValidationError{} - -// Validate checks the field values on DeleteSchemaRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *DeleteSchemaRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DeleteSchemaRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// DeleteSchemaRequestMultiError, or nil if none found. -func (m *DeleteSchemaRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *DeleteSchemaRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for NamespaceId - - // no validation rules for SchemaId - - if len(errors) > 0 { - return DeleteSchemaRequestMultiError(errors) - } - return nil -} - -// DeleteSchemaRequestMultiError is an error wrapping multiple validation -// errors returned by DeleteSchemaRequest.ValidateAll() if the designated -// constraints aren't met. -type DeleteSchemaRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DeleteSchemaRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DeleteSchemaRequestMultiError) AllErrors() []error { return m } - -// DeleteSchemaRequestValidationError is the validation error returned by -// DeleteSchemaRequest.Validate if the designated constraints aren't met. -type DeleteSchemaRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DeleteSchemaRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DeleteSchemaRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DeleteSchemaRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DeleteSchemaRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DeleteSchemaRequestValidationError) ErrorName() string { - return "DeleteSchemaRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e DeleteSchemaRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDeleteSchemaRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DeleteSchemaRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DeleteSchemaRequestValidationError{} - -// Validate checks the field values on DeleteSchemaResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *DeleteSchemaResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DeleteSchemaResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// DeleteSchemaResponseMultiError, or nil if none found. -func (m *DeleteSchemaResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *DeleteSchemaResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Message - - if len(errors) > 0 { - return DeleteSchemaResponseMultiError(errors) - } - return nil -} - -// DeleteSchemaResponseMultiError is an error wrapping multiple validation -// errors returned by DeleteSchemaResponse.ValidateAll() if the designated -// constraints aren't met. -type DeleteSchemaResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DeleteSchemaResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DeleteSchemaResponseMultiError) AllErrors() []error { return m } - -// DeleteSchemaResponseValidationError is the validation error returned by -// DeleteSchemaResponse.Validate if the designated constraints aren't met. -type DeleteSchemaResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DeleteSchemaResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DeleteSchemaResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DeleteSchemaResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DeleteSchemaResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DeleteSchemaResponseValidationError) ErrorName() string { - return "DeleteSchemaResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e DeleteSchemaResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDeleteSchemaResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DeleteSchemaResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DeleteSchemaResponseValidationError{} - -// Validate checks the field values on ListVersionsRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ListVersionsRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ListVersionsRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ListVersionsRequestMultiError, or nil if none found. -func (m *ListVersionsRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *ListVersionsRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for NamespaceId - - // no validation rules for SchemaId - - if len(errors) > 0 { - return ListVersionsRequestMultiError(errors) - } - return nil -} - -// ListVersionsRequestMultiError is an error wrapping multiple validation -// errors returned by ListVersionsRequest.ValidateAll() if the designated -// constraints aren't met. -type ListVersionsRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ListVersionsRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ListVersionsRequestMultiError) AllErrors() []error { return m } - -// ListVersionsRequestValidationError is the validation error returned by -// ListVersionsRequest.Validate if the designated constraints aren't met. -type ListVersionsRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ListVersionsRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ListVersionsRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ListVersionsRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ListVersionsRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ListVersionsRequestValidationError) ErrorName() string { - return "ListVersionsRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e ListVersionsRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sListVersionsRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ListVersionsRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ListVersionsRequestValidationError{} - -// Validate checks the field values on ListVersionsResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *ListVersionsResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on ListVersionsResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// ListVersionsResponseMultiError, or nil if none found. -func (m *ListVersionsResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *ListVersionsResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return ListVersionsResponseMultiError(errors) - } - return nil -} - -// ListVersionsResponseMultiError is an error wrapping multiple validation -// errors returned by ListVersionsResponse.ValidateAll() if the designated -// constraints aren't met. -type ListVersionsResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m ListVersionsResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m ListVersionsResponseMultiError) AllErrors() []error { return m } - -// ListVersionsResponseValidationError is the validation error returned by -// ListVersionsResponse.Validate if the designated constraints aren't met. -type ListVersionsResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e ListVersionsResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e ListVersionsResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e ListVersionsResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e ListVersionsResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e ListVersionsResponseValidationError) ErrorName() string { - return "ListVersionsResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e ListVersionsResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sListVersionsResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = ListVersionsResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = ListVersionsResponseValidationError{} - -// Validate checks the field values on GetSchemaRequest with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *GetSchemaRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on GetSchemaRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// GetSchemaRequestMultiError, or nil if none found. -func (m *GetSchemaRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *GetSchemaRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for NamespaceId - - // no validation rules for SchemaId - - // no validation rules for VersionId - - if len(errors) > 0 { - return GetSchemaRequestMultiError(errors) - } - return nil -} - -// GetSchemaRequestMultiError is an error wrapping multiple validation errors -// returned by GetSchemaRequest.ValidateAll() if the designated constraints -// aren't met. -type GetSchemaRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GetSchemaRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GetSchemaRequestMultiError) AllErrors() []error { return m } - -// GetSchemaRequestValidationError is the validation error returned by -// GetSchemaRequest.Validate if the designated constraints aren't met. -type GetSchemaRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GetSchemaRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GetSchemaRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GetSchemaRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GetSchemaRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GetSchemaRequestValidationError) ErrorName() string { return "GetSchemaRequestValidationError" } - -// Error satisfies the builtin error interface -func (e GetSchemaRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGetSchemaRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GetSchemaRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GetSchemaRequestValidationError{} - -// Validate checks the field values on GetSchemaResponse with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *GetSchemaResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on GetSchemaResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// GetSchemaResponseMultiError, or nil if none found. -func (m *GetSchemaResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *GetSchemaResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Data - - if len(errors) > 0 { - return GetSchemaResponseMultiError(errors) - } - return nil -} - -// GetSchemaResponseMultiError is an error wrapping multiple validation errors -// returned by GetSchemaResponse.ValidateAll() if the designated constraints -// aren't met. -type GetSchemaResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m GetSchemaResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m GetSchemaResponseMultiError) AllErrors() []error { return m } - -// GetSchemaResponseValidationError is the validation error returned by -// GetSchemaResponse.Validate if the designated constraints aren't met. -type GetSchemaResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e GetSchemaResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e GetSchemaResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e GetSchemaResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e GetSchemaResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e GetSchemaResponseValidationError) ErrorName() string { - return "GetSchemaResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e GetSchemaResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sGetSchemaResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = GetSchemaResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = GetSchemaResponseValidationError{} - -// Validate checks the field values on DeleteVersionRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *DeleteVersionRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DeleteVersionRequest with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// DeleteVersionRequestMultiError, or nil if none found. -func (m *DeleteVersionRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *DeleteVersionRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for NamespaceId - - // no validation rules for SchemaId - - // no validation rules for VersionId - - if len(errors) > 0 { - return DeleteVersionRequestMultiError(errors) - } - return nil -} - -// DeleteVersionRequestMultiError is an error wrapping multiple validation -// errors returned by DeleteVersionRequest.ValidateAll() if the designated -// constraints aren't met. -type DeleteVersionRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DeleteVersionRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DeleteVersionRequestMultiError) AllErrors() []error { return m } - -// DeleteVersionRequestValidationError is the validation error returned by -// DeleteVersionRequest.Validate if the designated constraints aren't met. -type DeleteVersionRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DeleteVersionRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DeleteVersionRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DeleteVersionRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DeleteVersionRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DeleteVersionRequestValidationError) ErrorName() string { - return "DeleteVersionRequestValidationError" -} - -// Error satisfies the builtin error interface -func (e DeleteVersionRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDeleteVersionRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DeleteVersionRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DeleteVersionRequestValidationError{} - -// Validate checks the field values on DeleteVersionResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *DeleteVersionResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on DeleteVersionResponse with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// DeleteVersionResponseMultiError, or nil if none found. -func (m *DeleteVersionResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *DeleteVersionResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Message - - if len(errors) > 0 { - return DeleteVersionResponseMultiError(errors) - } - return nil -} - -// DeleteVersionResponseMultiError is an error wrapping multiple validation -// errors returned by DeleteVersionResponse.ValidateAll() if the designated -// constraints aren't met. -type DeleteVersionResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m DeleteVersionResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m DeleteVersionResponseMultiError) AllErrors() []error { return m } - -// DeleteVersionResponseValidationError is the validation error returned by -// DeleteVersionResponse.Validate if the designated constraints aren't met. -type DeleteVersionResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e DeleteVersionResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e DeleteVersionResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e DeleteVersionResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e DeleteVersionResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e DeleteVersionResponseValidationError) ErrorName() string { - return "DeleteVersionResponseValidationError" -} - -// Error satisfies the builtin error interface -func (e DeleteVersionResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sDeleteVersionResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = DeleteVersionResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = DeleteVersionResponseValidationError{} - -// Validate checks the field values on SearchRequest with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *SearchRequest) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on SearchRequest with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in SearchRequestMultiError, or -// nil if none found. -func (m *SearchRequest) ValidateAll() error { - return m.validate(true) -} - -func (m *SearchRequest) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for NamespaceId - - // no validation rules for SchemaId - - // no validation rules for Query - - switch m.Version.(type) { - - case *SearchRequest_History: - // no validation rules for History - - case *SearchRequest_VersionId: - // no validation rules for VersionId - - } - - if len(errors) > 0 { - return SearchRequestMultiError(errors) - } - return nil -} - -// SearchRequestMultiError is an error wrapping multiple validation errors -// returned by SearchRequest.ValidateAll() if the designated constraints -// aren't met. -type SearchRequestMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m SearchRequestMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m SearchRequestMultiError) AllErrors() []error { return m } - -// SearchRequestValidationError is the validation error returned by -// SearchRequest.Validate if the designated constraints aren't met. -type SearchRequestValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e SearchRequestValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e SearchRequestValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e SearchRequestValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e SearchRequestValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e SearchRequestValidationError) ErrorName() string { return "SearchRequestValidationError" } - -// Error satisfies the builtin error interface -func (e SearchRequestValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sSearchRequest.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = SearchRequestValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = SearchRequestValidationError{} - -// Validate checks the field values on SearchResponse with the rules defined in -// the proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *SearchResponse) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on SearchResponse with the rules defined -// in the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in SearchResponseMultiError, -// or nil if none found. -func (m *SearchResponse) ValidateAll() error { - return m.validate(true) -} - -func (m *SearchResponse) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - for idx, item := range m.GetHits() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, SearchResponseValidationError{ - field: fmt.Sprintf("Hits[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, SearchResponseValidationError{ - field: fmt.Sprintf("Hits[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return SearchResponseValidationError{ - field: fmt.Sprintf("Hits[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if all { - switch v := interface{}(m.GetMeta()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, SearchResponseValidationError{ - field: "Meta", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, SearchResponseValidationError{ - field: "Meta", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMeta()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return SearchResponseValidationError{ - field: "Meta", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return SearchResponseMultiError(errors) - } - return nil -} - -// SearchResponseMultiError is an error wrapping multiple validation errors -// returned by SearchResponse.ValidateAll() if the designated constraints -// aren't met. -type SearchResponseMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m SearchResponseMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m SearchResponseMultiError) AllErrors() []error { return m } - -// SearchResponseValidationError is the validation error returned by -// SearchResponse.Validate if the designated constraints aren't met. -type SearchResponseValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e SearchResponseValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e SearchResponseValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e SearchResponseValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e SearchResponseValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e SearchResponseValidationError) ErrorName() string { return "SearchResponseValidationError" } - -// Error satisfies the builtin error interface -func (e SearchResponseValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sSearchResponse.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = SearchResponseValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = SearchResponseValidationError{} - -// Validate checks the field values on SearchHits with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *SearchHits) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on SearchHits with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in SearchHitsMultiError, or -// nil if none found. -func (m *SearchHits) ValidateAll() error { - return m.validate(true) -} - -func (m *SearchHits) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for NamespaceId - - // no validation rules for SchemaId - - // no validation rules for VersionId - - // no validation rules for Path - - if len(errors) > 0 { - return SearchHitsMultiError(errors) - } - return nil -} - -// SearchHitsMultiError is an error wrapping multiple validation errors -// returned by SearchHits.ValidateAll() if the designated constraints aren't met. -type SearchHitsMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m SearchHitsMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m SearchHitsMultiError) AllErrors() []error { return m } - -// SearchHitsValidationError is the validation error returned by -// SearchHits.Validate if the designated constraints aren't met. -type SearchHitsValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e SearchHitsValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e SearchHitsValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e SearchHitsValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e SearchHitsValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e SearchHitsValidationError) ErrorName() string { return "SearchHitsValidationError" } - -// Error satisfies the builtin error interface -func (e SearchHitsValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sSearchHits.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = SearchHitsValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = SearchHitsValidationError{} - -// Validate checks the field values on SearchMeta with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *SearchMeta) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on SearchMeta with the rules defined in -// the proto definition for this message. If any rules are violated, the -// result is a list of violation errors wrapped in SearchMetaMultiError, or -// nil if none found. -func (m *SearchMeta) ValidateAll() error { - return m.validate(true) -} - -func (m *SearchMeta) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - // no validation rules for Total - - if len(errors) > 0 { - return SearchMetaMultiError(errors) - } - return nil -} - -// SearchMetaMultiError is an error wrapping multiple validation errors -// returned by SearchMeta.ValidateAll() if the designated constraints aren't met. -type SearchMetaMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m SearchMetaMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m SearchMetaMultiError) AllErrors() []error { return m } - -// SearchMetaValidationError is the validation error returned by -// SearchMeta.Validate if the designated constraints aren't met. -type SearchMetaValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e SearchMetaValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e SearchMetaValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e SearchMetaValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e SearchMetaValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e SearchMetaValidationError) ErrorName() string { return "SearchMetaValidationError" } - -// Error satisfies the builtin error interface -func (e SearchMetaValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sSearchMeta.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = SearchMetaValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = SearchMetaValidationError{} diff --git a/proto/raystack/stencil/v1beta1/stencil.swagger.json b/proto/raystack/stencil/v1beta1/stencil.swagger.json deleted file mode 100644 index 70cad1d5..00000000 --- a/proto/raystack/stencil/v1beta1/stencil.swagger.json +++ /dev/null @@ -1,744 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "raystack/stencil/v1beta1/stencil.proto", - "version": "0.1.4" - }, - "tags": [ - { - "name": "StencilService" - } - ], - "schemes": ["http"], - "consumes": ["application/json"], - "produces": ["application/json"], - "paths": { - "/v1beta1/namespaces": { - "get": { - "summary": "List names of namespaces", - "operationId": "StencilService_ListNamespaces", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1ListNamespacesResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "tags": ["namespace"] - }, - "post": { - "summary": "Create namespace entry", - "operationId": "StencilService_CreateNamespace", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1CreateNamespaceResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v1beta1CreateNamespaceRequest" - } - } - ], - "tags": ["namespace"] - } - }, - "/v1beta1/namespaces/{id}": { - "get": { - "summary": "Get namespace by id", - "operationId": "StencilService_GetNamespace", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1GetNamespaceResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": ["namespace"] - }, - "delete": { - "summary": "Delete namespace by id", - "description": "Ensure all schemas under this namespace is deleted, otherwise it will throw error", - "operationId": "StencilService_DeleteNamespace", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1DeleteNamespaceResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": ["namespace"] - }, - "put": { - "summary": "Update namespace entity by id", - "operationId": "StencilService_UpdateNamespace", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1UpdateNamespaceResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "format": { - "$ref": "#/definitions/SchemaFormat" - }, - "compatibility": { - "$ref": "#/definitions/SchemaCompatibility" - }, - "description": { - "type": "string" - } - } - } - } - ], - "tags": ["namespace"] - } - }, - "/v1beta1/namespaces/{id}/schemas": { - "get": { - "summary": "List schemas under the namespace", - "operationId": "StencilService_ListSchemas", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1ListSchemasResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": ["schema"] - } - }, - "/v1beta1/namespaces/{namespaceId}/schemas/{schemaId}": { - "delete": { - "summary": "Delete specified schema", - "operationId": "StencilService_DeleteSchema", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1DeleteSchemaResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "namespaceId", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "schemaId", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": ["schema"] - }, - "patch": { - "summary": "Update only schema metadata", - "operationId": "StencilService_UpdateSchemaMetadata", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1UpdateSchemaMetadataResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "namespaceId", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "schemaId", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "compatibility": { - "$ref": "#/definitions/SchemaCompatibility" - } - } - } - } - ], - "tags": ["schema"] - } - }, - "/v1beta1/namespaces/{namespaceId}/schemas/{schemaId}/meta": { - "get": { - "summary": "Create schema under the namespace. Returns version number, unique ID and location", - "operationId": "StencilService_GetSchemaMetadata", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1GetSchemaMetadataResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "namespaceId", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "schemaId", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": ["schema"] - } - }, - "/v1beta1/namespaces/{namespaceId}/schemas/{schemaId}/versions": { - "get": { - "summary": "List all version numbers for schema", - "operationId": "StencilService_ListVersions", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1ListVersionsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "namespaceId", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "schemaId", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": ["schema", "version"] - } - }, - "/v1beta1/namespaces/{namespaceId}/schemas/{schemaId}/versions/{versionId}": { - "delete": { - "summary": "Delete specified version of the schema", - "operationId": "StencilService_DeleteVersion", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1DeleteVersionResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "namespaceId", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "schemaId", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "versionId", - "in": "path", - "required": true, - "type": "integer", - "format": "int32" - } - ], - "tags": ["schema", "version"] - } - }, - "/v1beta1/search": { - "get": { - "summary": "Global Search API", - "operationId": "StencilService_Search", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v1beta1SearchResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "namespaceId", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "schemaId", - "in": "query", - "required": false, - "type": "string" - }, - { - "name": "query", - "in": "query", - "required": true, - "type": "string" - }, - { - "name": "history", - "in": "query", - "required": false, - "type": "boolean" - }, - { - "name": "versionId", - "in": "query", - "required": false, - "type": "integer", - "format": "int32" - } - ], - "tags": ["schema"] - } - } - }, - "definitions": { - "SchemaCompatibility": { - "type": "string", - "enum": [ - "COMPATIBILITY_UNSPECIFIED", - "COMPATIBILITY_BACKWARD", - "COMPATIBILITY_BACKWARD_TRANSITIVE", - "COMPATIBILITY_FORWARD", - "COMPATIBILITY_FORWARD_TRANSITIVE", - "COMPATIBILITY_FULL", - "COMPATIBILITY_FULL_TRANSITIVE" - ], - "default": "COMPATIBILITY_UNSPECIFIED" - }, - "SchemaFormat": { - "type": "string", - "enum": [ - "FORMAT_UNSPECIFIED", - "FORMAT_PROTOBUF", - "FORMAT_AVRO", - "FORMAT_JSON" - ], - "default": "FORMAT_UNSPECIFIED" - }, - "protobufAny": { - "type": "object", - "properties": { - "typeUrl": { - "type": "string" - }, - "value": { - "type": "string", - "format": "byte" - } - } - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "v1beta1CheckCompatibilityResponse": { - "type": "object" - }, - "v1beta1CreateNamespaceRequest": { - "type": "object", - "properties": { - "id": { - "type": "string", - "required": ["id"] - }, - "format": { - "$ref": "#/definitions/SchemaFormat" - }, - "compatibility": { - "$ref": "#/definitions/SchemaCompatibility" - }, - "description": { - "type": "string" - } - }, - "required": ["id"] - }, - "v1beta1CreateNamespaceResponse": { - "type": "object", - "properties": { - "namespace": { - "$ref": "#/definitions/v1beta1Namespace" - } - } - }, - "v1beta1CreateSchemaResponse": { - "type": "object", - "properties": { - "version": { - "type": "integer", - "format": "int32" - }, - "id": { - "type": "string" - }, - "location": { - "type": "string" - } - } - }, - "v1beta1DeleteNamespaceResponse": { - "type": "object", - "properties": { - "message": { - "type": "string" - } - } - }, - "v1beta1DeleteSchemaResponse": { - "type": "object", - "properties": { - "message": { - "type": "string" - } - } - }, - "v1beta1DeleteVersionResponse": { - "type": "object", - "properties": { - "message": { - "type": "string" - } - } - }, - "v1beta1GetLatestSchemaResponse": { - "type": "object", - "properties": { - "data": { - "type": "string", - "format": "byte" - } - } - }, - "v1beta1GetNamespaceResponse": { - "type": "object", - "properties": { - "namespace": { - "$ref": "#/definitions/v1beta1Namespace" - } - } - }, - "v1beta1GetSchemaMetadataResponse": { - "type": "object", - "properties": { - "format": { - "$ref": "#/definitions/SchemaFormat" - }, - "compatibility": { - "$ref": "#/definitions/SchemaCompatibility" - }, - "authority": { - "type": "string" - } - } - }, - "v1beta1GetSchemaResponse": { - "type": "object", - "properties": { - "data": { - "type": "string", - "format": "byte" - } - } - }, - "v1beta1ListNamespacesResponse": { - "type": "object", - "properties": { - "namespaces": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "v1beta1ListSchemasResponse": { - "type": "object", - "properties": { - "schemas": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "v1beta1ListVersionsResponse": { - "type": "object", - "properties": { - "versions": { - "type": "array", - "items": { - "type": "integer", - "format": "int32" - } - } - } - }, - "v1beta1Namespace": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "format": { - "$ref": "#/definitions/SchemaFormat" - }, - "Compatibility": { - "$ref": "#/definitions/SchemaCompatibility" - }, - "description": { - "type": "string" - }, - "createdAt": { - "type": "string", - "format": "date-time" - }, - "updatedAt": { - "type": "string", - "format": "date-time" - } - } - }, - "v1beta1SearchHits": { - "type": "object", - "properties": { - "namespaceId": { - "type": "string" - }, - "schemaId": { - "type": "string" - }, - "versionId": { - "type": "integer", - "format": "int32" - }, - "fields": { - "type": "array", - "items": { - "type": "string" - } - }, - "types": { - "type": "array", - "items": { - "type": "string" - } - }, - "path": { - "type": "string" - } - } - }, - "v1beta1SearchMeta": { - "type": "object", - "properties": { - "total": { - "type": "integer", - "format": "int64" - } - } - }, - "v1beta1SearchResponse": { - "type": "object", - "properties": { - "hits": { - "type": "array", - "items": { - "$ref": "#/definitions/v1beta1SearchHits" - } - }, - "meta": { - "$ref": "#/definitions/v1beta1SearchMeta" - } - } - }, - "v1beta1UpdateNamespaceResponse": { - "type": "object", - "properties": { - "namespace": { - "$ref": "#/definitions/v1beta1Namespace" - } - } - }, - "v1beta1UpdateSchemaMetadataResponse": { - "type": "object", - "properties": { - "format": { - "$ref": "#/definitions/SchemaFormat" - }, - "compatibility": { - "$ref": "#/definitions/SchemaCompatibility" - }, - "authority": { - "type": "string" - } - } - } - } -} diff --git a/proto/raystack/stencil/v1beta1/stencil.swagger.md b/proto/raystack/stencil/v1beta1/stencil.swagger.md deleted file mode 100644 index c73ba760..00000000 --- a/proto/raystack/stencil/v1beta1/stencil.swagger.md +++ /dev/null @@ -1,371 +0,0 @@ -# raystack/stencil/v1beta1/stencil.proto - -## Version: 0.1.4 - -### /v1beta1/namespaces - -#### GET - -##### Summary - -List names of namespaces - -##### Responses - -| Code | Description | Schema | -| ------- | ----------------------------- | --------------------------------------------------------------- | -| 200 | A successful response. | [v1beta1ListNamespacesResponse](#v1beta1listnamespacesresponse) | -| default | An unexpected error response. | [rpcStatus](#rpcstatus) | - -#### POST - -##### Summary - -Create namespace entry - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ---- | ---------- | ----------- | -------- | --------------------------------------------------------------- | -| body | body | | Yes | [v1beta1CreateNamespaceRequest](#v1beta1createnamespacerequest) | - -##### Responses - -| Code | Description | Schema | -| ------- | ----------------------------- | ----------------------------------------------------------------- | -| 200 | A successful response. | [v1beta1CreateNamespaceResponse](#v1beta1createnamespaceresponse) | -| default | An unexpected error response. | [rpcStatus](#rpcstatus) | - -### /v1beta1/namespaces/{id} - -#### GET - -##### Summary - -Get namespace by id - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ---- | ---------- | ----------- | -------- | ------ | -| id | path | | Yes | string | - -##### Responses - -| Code | Description | Schema | -| ------- | ----------------------------- | ----------------------------------------------------------- | -| 200 | A successful response. | [v1beta1GetNamespaceResponse](#v1beta1getnamespaceresponse) | -| default | An unexpected error response. | [rpcStatus](#rpcstatus) | - -#### DELETE - -##### Summary - -Delete namespace by id - -##### Description - -Ensure all schemas under this namespace is deleted, otherwise it will throw error - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ---- | ---------- | ----------- | -------- | ------ | -| id | path | | Yes | string | - -##### Responses - -| Code | Description | Schema | -| ------- | ----------------------------- | ----------------------------------------------------------------- | -| 200 | A successful response. | [v1beta1DeleteNamespaceResponse](#v1beta1deletenamespaceresponse) | -| default | An unexpected error response. | [rpcStatus](#rpcstatus) | - -#### PUT - -##### Summary - -Update namespace entity by id - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ---- | ---------- | ----------- | -------- | ------ | -| id | path | | Yes | string | -| body | body | | Yes | object | - -##### Responses - -| Code | Description | Schema | -| ------- | ----------------------------- | ----------------------------------------------------------------- | -| 200 | A successful response. | [v1beta1UpdateNamespaceResponse](#v1beta1updatenamespaceresponse) | -| default | An unexpected error response. | [rpcStatus](#rpcstatus) | - -### /v1beta1/namespaces/{id}/schemas - -#### GET - -##### Summary - -List schemas under the namespace - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ---- | ---------- | ----------- | -------- | ------ | -| id | path | | Yes | string | - -##### Responses - -| Code | Description | Schema | -| ------- | ----------------------------- | --------------------------------------------------------- | -| 200 | A successful response. | [v1beta1ListSchemasResponse](#v1beta1listschemasresponse) | -| default | An unexpected error response. | [rpcStatus](#rpcstatus) | - -### /v1beta1/namespaces/{namespaceId}/schemas/{schemaId} - -#### DELETE - -##### Summary - -Delete specified schema - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ----------- | ---------- | ----------- | -------- | ------ | -| namespaceId | path | | Yes | string | -| schemaId | path | | Yes | string | - -##### Responses - -| Code | Description | Schema | -| ------- | ----------------------------- | ----------------------------------------------------------- | -| 200 | A successful response. | [v1beta1DeleteSchemaResponse](#v1beta1deleteschemaresponse) | -| default | An unexpected error response. | [rpcStatus](#rpcstatus) | - -#### PATCH - -##### Summary - -Update only schema metadata - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ----------- | ---------- | ----------- | -------- | ------ | -| namespaceId | path | | Yes | string | -| schemaId | path | | Yes | string | -| body | body | | Yes | object | - -##### Responses - -| Code | Description | Schema | -| ------- | ----------------------------- | --------------------------------------------------------------------------- | -| 200 | A successful response. | [v1beta1UpdateSchemaMetadataResponse](#v1beta1updateschemametadataresponse) | -| default | An unexpected error response. | [rpcStatus](#rpcstatus) | - -### /v1beta1/namespaces/{namespaceId}/schemas/{schemaId}/meta - -#### GET - -##### Summary - -Create schema under the namespace. Returns version number, unique ID and location - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ----------- | ---------- | ----------- | -------- | ------ | -| namespaceId | path | | Yes | string | -| schemaId | path | | Yes | string | - -##### Responses - -| Code | Description | Schema | -| ------- | ----------------------------- | --------------------------------------------------------------------- | -| 200 | A successful response. | [v1beta1GetSchemaMetadataResponse](#v1beta1getschemametadataresponse) | -| default | An unexpected error response. | [rpcStatus](#rpcstatus) | - -### /v1beta1/namespaces/{namespaceId}/schemas/{schemaId}/versions - -#### GET - -##### Summary - -List all version numbers for schema - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ----------- | ---------- | ----------- | -------- | ------ | -| namespaceId | path | | Yes | string | -| schemaId | path | | Yes | string | - -##### Responses - -| Code | Description | Schema | -| ------- | ----------------------------- | ----------------------------------------------------------- | -| 200 | A successful response. | [v1beta1ListVersionsResponse](#v1beta1listversionsresponse) | -| default | An unexpected error response. | [rpcStatus](#rpcstatus) | - -### /v1beta1/namespaces/{namespaceId}/schemas/{schemaId}/versions/{versionId} - -#### DELETE - -##### Summary - -Delete specified version of the schema - -##### Parameters - -| Name | Located in | Description | Required | Schema | -| ----------- | ---------- | ----------- | -------- | ------- | -| namespaceId | path | | Yes | string | -| schemaId | path | | Yes | string | -| versionId | path | | Yes | integer | - -##### Responses - -| Code | Description | Schema | -| ------- | ----------------------------- | ------------------------------------------------------------- | -| 200 | A successful response. | [v1beta1DeleteVersionResponse](#v1beta1deleteversionresponse) | -| default | An unexpected error response. | [rpcStatus](#rpcstatus) | - -### Models - -#### SchemaCompatibility - -| Name | Type | Description | Required | -| ------------------- | ------ | ----------- | -------- | -| SchemaCompatibility | string | | | - -#### SchemaFormat - -| Name | Type | Description | Required | -| ------------ | ------ | ----------- | -------- | -| SchemaFormat | string | | | - -#### protobufAny - -| Name | Type | Description | Required | -| ------- | ------ | ----------- | -------- | -| typeUrl | string | | No | -| value | byte | | No | - -#### rpcStatus - -| Name | Type | Description | Required | -| ------- | ------------------------------- | ----------- | -------- | -| code | integer | | No | -| message | string | | No | -| details | [ [protobufAny](#protobufany) ] | | No | - -#### v1beta1CreateNamespaceRequest - -| Name | Type | Description | Required | -| ------------- | ------------------------------------------- | ----------- | -------- | -| id | string | | Yes | -| format | [SchemaFormat](#schemaformat) | | No | -| compatibility | [SchemaCompatibility](#schemacompatibility) | | No | -| description | string | | No | - -#### v1beta1CreateNamespaceResponse - -| Name | Type | Description | Required | -| --------- | ------------------------------------- | ----------- | -------- | -| namespace | [v1beta1Namespace](#v1beta1namespace) | | No | - -#### v1beta1CreateSchemaResponse - -| Name | Type | Description | Required | -| -------- | ------- | ----------- | -------- | -| version | integer | | No | -| id | string | | No | -| location | string | | No | - -#### v1beta1DeleteNamespaceResponse - -| Name | Type | Description | Required | -| ------- | ------ | ----------- | -------- | -| message | string | | No | - -#### v1beta1DeleteSchemaResponse - -| Name | Type | Description | Required | -| ------- | ------ | ----------- | -------- | -| message | string | | No | - -#### v1beta1DeleteVersionResponse - -| Name | Type | Description | Required | -| ------- | ------ | ----------- | -------- | -| message | string | | No | - -#### v1beta1GetLatestSchemaResponse - -| Name | Type | Description | Required | -| ---- | ---- | ----------- | -------- | -| data | byte | | No | - -#### v1beta1GetNamespaceResponse - -| Name | Type | Description | Required | -| --------- | ------------------------------------- | ----------- | -------- | -| namespace | [v1beta1Namespace](#v1beta1namespace) | | No | - -#### v1beta1GetSchemaMetadataResponse - -| Name | Type | Description | Required | -| ------------- | ------------------------------------------- | ----------- | -------- | -| format | [SchemaFormat](#schemaformat) | | No | -| compatibility | [SchemaCompatibility](#schemacompatibility) | | No | -| authority | string | | No | - -#### v1beta1GetSchemaResponse - -| Name | Type | Description | Required | -| ---- | ---- | ----------- | -------- | -| data | byte | | No | - -#### v1beta1ListNamespacesResponse - -| Name | Type | Description | Required | -| ---------- | ---------- | ----------- | -------- | -| namespaces | [ string ] | | No | - -#### v1beta1ListSchemasResponse - -| Name | Type | Description | Required | -| ------- | ---------- | ----------- | -------- | -| schemas | [ string ] | | No | - -#### v1beta1ListVersionsResponse - -| Name | Type | Description | Required | -| -------- | ----------- | ----------- | -------- | -| versions | [ integer ] | | No | - -#### v1beta1Namespace - -| Name | Type | Description | Required | -| ------------- | ------------------------------------------- | ----------- | -------- | -| id | string | | No | -| format | [SchemaFormat](#schemaformat) | | No | -| Compatibility | [SchemaCompatibility](#schemacompatibility) | | No | -| description | string | | No | -| createdAt | dateTime | | No | -| updatedAt | dateTime | | No | - -#### v1beta1UpdateNamespaceResponse - -| Name | Type | Description | Required | -| --------- | ------------------------------------- | ----------- | -------- | -| namespace | [v1beta1Namespace](#v1beta1namespace) | | No | - -#### v1beta1UpdateSchemaMetadataResponse - -| Name | Type | Description | Required | -| ------------- | ------------------------------------------- | ----------- | -------- | -| format | [SchemaFormat](#schemaformat) | | No | -| compatibility | [SchemaCompatibility](#schemacompatibility) | | No | -| authority | string | | No | diff --git a/proto/raystack/stencil/v1beta1/stencil_grpc.pb.go b/proto/raystack/stencil/v1beta1/stencil_grpc.pb.go deleted file mode 100644 index 6d6c06ba..00000000 --- a/proto/raystack/stencil/v1beta1/stencil_grpc.pb.go +++ /dev/null @@ -1,645 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: raystack/stencil/v1beta1/stencil.proto - -package stencilv1beta1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// StencilServiceClient is the client API for StencilService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type StencilServiceClient interface { - ListNamespaces(ctx context.Context, in *ListNamespacesRequest, opts ...grpc.CallOption) (*ListNamespacesResponse, error) - GetNamespace(ctx context.Context, in *GetNamespaceRequest, opts ...grpc.CallOption) (*GetNamespaceResponse, error) - CreateNamespace(ctx context.Context, in *CreateNamespaceRequest, opts ...grpc.CallOption) (*CreateNamespaceResponse, error) - UpdateNamespace(ctx context.Context, in *UpdateNamespaceRequest, opts ...grpc.CallOption) (*UpdateNamespaceResponse, error) - DeleteNamespace(ctx context.Context, in *DeleteNamespaceRequest, opts ...grpc.CallOption) (*DeleteNamespaceResponse, error) - ListSchemas(ctx context.Context, in *ListSchemasRequest, opts ...grpc.CallOption) (*ListSchemasResponse, error) - CreateSchema(ctx context.Context, in *CreateSchemaRequest, opts ...grpc.CallOption) (*CreateSchemaResponse, error) - CheckCompatibility(ctx context.Context, in *CheckCompatibilityRequest, opts ...grpc.CallOption) (*CheckCompatibilityResponse, error) - GetSchemaMetadata(ctx context.Context, in *GetSchemaMetadataRequest, opts ...grpc.CallOption) (*GetSchemaMetadataResponse, error) - UpdateSchemaMetadata(ctx context.Context, in *UpdateSchemaMetadataRequest, opts ...grpc.CallOption) (*UpdateSchemaMetadataResponse, error) - GetLatestSchema(ctx context.Context, in *GetLatestSchemaRequest, opts ...grpc.CallOption) (*GetLatestSchemaResponse, error) - DeleteSchema(ctx context.Context, in *DeleteSchemaRequest, opts ...grpc.CallOption) (*DeleteSchemaResponse, error) - GetSchema(ctx context.Context, in *GetSchemaRequest, opts ...grpc.CallOption) (*GetSchemaResponse, error) - ListVersions(ctx context.Context, in *ListVersionsRequest, opts ...grpc.CallOption) (*ListVersionsResponse, error) - DeleteVersion(ctx context.Context, in *DeleteVersionRequest, opts ...grpc.CallOption) (*DeleteVersionResponse, error) - Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error) -} - -type stencilServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewStencilServiceClient(cc grpc.ClientConnInterface) StencilServiceClient { - return &stencilServiceClient{cc} -} - -func (c *stencilServiceClient) ListNamespaces(ctx context.Context, in *ListNamespacesRequest, opts ...grpc.CallOption) (*ListNamespacesResponse, error) { - out := new(ListNamespacesResponse) - err := c.cc.Invoke(ctx, "/raystack.stencil.v1beta1.StencilService/ListNamespaces", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stencilServiceClient) GetNamespace(ctx context.Context, in *GetNamespaceRequest, opts ...grpc.CallOption) (*GetNamespaceResponse, error) { - out := new(GetNamespaceResponse) - err := c.cc.Invoke(ctx, "/raystack.stencil.v1beta1.StencilService/GetNamespace", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stencilServiceClient) CreateNamespace(ctx context.Context, in *CreateNamespaceRequest, opts ...grpc.CallOption) (*CreateNamespaceResponse, error) { - out := new(CreateNamespaceResponse) - err := c.cc.Invoke(ctx, "/raystack.stencil.v1beta1.StencilService/CreateNamespace", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stencilServiceClient) UpdateNamespace(ctx context.Context, in *UpdateNamespaceRequest, opts ...grpc.CallOption) (*UpdateNamespaceResponse, error) { - out := new(UpdateNamespaceResponse) - err := c.cc.Invoke(ctx, "/raystack.stencil.v1beta1.StencilService/UpdateNamespace", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stencilServiceClient) DeleteNamespace(ctx context.Context, in *DeleteNamespaceRequest, opts ...grpc.CallOption) (*DeleteNamespaceResponse, error) { - out := new(DeleteNamespaceResponse) - err := c.cc.Invoke(ctx, "/raystack.stencil.v1beta1.StencilService/DeleteNamespace", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stencilServiceClient) ListSchemas(ctx context.Context, in *ListSchemasRequest, opts ...grpc.CallOption) (*ListSchemasResponse, error) { - out := new(ListSchemasResponse) - err := c.cc.Invoke(ctx, "/raystack.stencil.v1beta1.StencilService/ListSchemas", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stencilServiceClient) CreateSchema(ctx context.Context, in *CreateSchemaRequest, opts ...grpc.CallOption) (*CreateSchemaResponse, error) { - out := new(CreateSchemaResponse) - err := c.cc.Invoke(ctx, "/raystack.stencil.v1beta1.StencilService/CreateSchema", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stencilServiceClient) CheckCompatibility(ctx context.Context, in *CheckCompatibilityRequest, opts ...grpc.CallOption) (*CheckCompatibilityResponse, error) { - out := new(CheckCompatibilityResponse) - err := c.cc.Invoke(ctx, "/raystack.stencil.v1beta1.StencilService/CheckCompatibility", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stencilServiceClient) GetSchemaMetadata(ctx context.Context, in *GetSchemaMetadataRequest, opts ...grpc.CallOption) (*GetSchemaMetadataResponse, error) { - out := new(GetSchemaMetadataResponse) - err := c.cc.Invoke(ctx, "/raystack.stencil.v1beta1.StencilService/GetSchemaMetadata", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stencilServiceClient) UpdateSchemaMetadata(ctx context.Context, in *UpdateSchemaMetadataRequest, opts ...grpc.CallOption) (*UpdateSchemaMetadataResponse, error) { - out := new(UpdateSchemaMetadataResponse) - err := c.cc.Invoke(ctx, "/raystack.stencil.v1beta1.StencilService/UpdateSchemaMetadata", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stencilServiceClient) GetLatestSchema(ctx context.Context, in *GetLatestSchemaRequest, opts ...grpc.CallOption) (*GetLatestSchemaResponse, error) { - out := new(GetLatestSchemaResponse) - err := c.cc.Invoke(ctx, "/raystack.stencil.v1beta1.StencilService/GetLatestSchema", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stencilServiceClient) DeleteSchema(ctx context.Context, in *DeleteSchemaRequest, opts ...grpc.CallOption) (*DeleteSchemaResponse, error) { - out := new(DeleteSchemaResponse) - err := c.cc.Invoke(ctx, "/raystack.stencil.v1beta1.StencilService/DeleteSchema", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stencilServiceClient) GetSchema(ctx context.Context, in *GetSchemaRequest, opts ...grpc.CallOption) (*GetSchemaResponse, error) { - out := new(GetSchemaResponse) - err := c.cc.Invoke(ctx, "/raystack.stencil.v1beta1.StencilService/GetSchema", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stencilServiceClient) ListVersions(ctx context.Context, in *ListVersionsRequest, opts ...grpc.CallOption) (*ListVersionsResponse, error) { - out := new(ListVersionsResponse) - err := c.cc.Invoke(ctx, "/raystack.stencil.v1beta1.StencilService/ListVersions", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stencilServiceClient) DeleteVersion(ctx context.Context, in *DeleteVersionRequest, opts ...grpc.CallOption) (*DeleteVersionResponse, error) { - out := new(DeleteVersionResponse) - err := c.cc.Invoke(ctx, "/raystack.stencil.v1beta1.StencilService/DeleteVersion", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *stencilServiceClient) Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error) { - out := new(SearchResponse) - err := c.cc.Invoke(ctx, "/raystack.stencil.v1beta1.StencilService/Search", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// StencilServiceServer is the server API for StencilService service. -// All implementations must embed UnimplementedStencilServiceServer -// for forward compatibility -type StencilServiceServer interface { - ListNamespaces(context.Context, *ListNamespacesRequest) (*ListNamespacesResponse, error) - GetNamespace(context.Context, *GetNamespaceRequest) (*GetNamespaceResponse, error) - CreateNamespace(context.Context, *CreateNamespaceRequest) (*CreateNamespaceResponse, error) - UpdateNamespace(context.Context, *UpdateNamespaceRequest) (*UpdateNamespaceResponse, error) - DeleteNamespace(context.Context, *DeleteNamespaceRequest) (*DeleteNamespaceResponse, error) - ListSchemas(context.Context, *ListSchemasRequest) (*ListSchemasResponse, error) - CreateSchema(context.Context, *CreateSchemaRequest) (*CreateSchemaResponse, error) - CheckCompatibility(context.Context, *CheckCompatibilityRequest) (*CheckCompatibilityResponse, error) - GetSchemaMetadata(context.Context, *GetSchemaMetadataRequest) (*GetSchemaMetadataResponse, error) - UpdateSchemaMetadata(context.Context, *UpdateSchemaMetadataRequest) (*UpdateSchemaMetadataResponse, error) - GetLatestSchema(context.Context, *GetLatestSchemaRequest) (*GetLatestSchemaResponse, error) - DeleteSchema(context.Context, *DeleteSchemaRequest) (*DeleteSchemaResponse, error) - GetSchema(context.Context, *GetSchemaRequest) (*GetSchemaResponse, error) - ListVersions(context.Context, *ListVersionsRequest) (*ListVersionsResponse, error) - DeleteVersion(context.Context, *DeleteVersionRequest) (*DeleteVersionResponse, error) - Search(context.Context, *SearchRequest) (*SearchResponse, error) - mustEmbedUnimplementedStencilServiceServer() -} - -// UnimplementedStencilServiceServer must be embedded to have forward compatible implementations. -type UnimplementedStencilServiceServer struct { -} - -func (UnimplementedStencilServiceServer) ListNamespaces(context.Context, *ListNamespacesRequest) (*ListNamespacesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListNamespaces not implemented") -} -func (UnimplementedStencilServiceServer) GetNamespace(context.Context, *GetNamespaceRequest) (*GetNamespaceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetNamespace not implemented") -} -func (UnimplementedStencilServiceServer) CreateNamespace(context.Context, *CreateNamespaceRequest) (*CreateNamespaceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateNamespace not implemented") -} -func (UnimplementedStencilServiceServer) UpdateNamespace(context.Context, *UpdateNamespaceRequest) (*UpdateNamespaceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateNamespace not implemented") -} -func (UnimplementedStencilServiceServer) DeleteNamespace(context.Context, *DeleteNamespaceRequest) (*DeleteNamespaceResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteNamespace not implemented") -} -func (UnimplementedStencilServiceServer) ListSchemas(context.Context, *ListSchemasRequest) (*ListSchemasResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListSchemas not implemented") -} -func (UnimplementedStencilServiceServer) CreateSchema(context.Context, *CreateSchemaRequest) (*CreateSchemaResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateSchema not implemented") -} -func (UnimplementedStencilServiceServer) CheckCompatibility(context.Context, *CheckCompatibilityRequest) (*CheckCompatibilityResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CheckCompatibility not implemented") -} -func (UnimplementedStencilServiceServer) GetSchemaMetadata(context.Context, *GetSchemaMetadataRequest) (*GetSchemaMetadataResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetSchemaMetadata not implemented") -} -func (UnimplementedStencilServiceServer) UpdateSchemaMetadata(context.Context, *UpdateSchemaMetadataRequest) (*UpdateSchemaMetadataResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateSchemaMetadata not implemented") -} -func (UnimplementedStencilServiceServer) GetLatestSchema(context.Context, *GetLatestSchemaRequest) (*GetLatestSchemaResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetLatestSchema not implemented") -} -func (UnimplementedStencilServiceServer) DeleteSchema(context.Context, *DeleteSchemaRequest) (*DeleteSchemaResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteSchema not implemented") -} -func (UnimplementedStencilServiceServer) GetSchema(context.Context, *GetSchemaRequest) (*GetSchemaResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetSchema not implemented") -} -func (UnimplementedStencilServiceServer) ListVersions(context.Context, *ListVersionsRequest) (*ListVersionsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListVersions not implemented") -} -func (UnimplementedStencilServiceServer) DeleteVersion(context.Context, *DeleteVersionRequest) (*DeleteVersionResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteVersion not implemented") -} -func (UnimplementedStencilServiceServer) Search(context.Context, *SearchRequest) (*SearchResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Search not implemented") -} -func (UnimplementedStencilServiceServer) mustEmbedUnimplementedStencilServiceServer() {} - -// UnsafeStencilServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to StencilServiceServer will -// result in compilation errors. -type UnsafeStencilServiceServer interface { - mustEmbedUnimplementedStencilServiceServer() -} - -func RegisterStencilServiceServer(s grpc.ServiceRegistrar, srv StencilServiceServer) { - s.RegisterService(&StencilService_ServiceDesc, srv) -} - -func _StencilService_ListNamespaces_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListNamespacesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StencilServiceServer).ListNamespaces(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/raystack.stencil.v1beta1.StencilService/ListNamespaces", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StencilServiceServer).ListNamespaces(ctx, req.(*ListNamespacesRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StencilService_GetNamespace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetNamespaceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StencilServiceServer).GetNamespace(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/raystack.stencil.v1beta1.StencilService/GetNamespace", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StencilServiceServer).GetNamespace(ctx, req.(*GetNamespaceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StencilService_CreateNamespace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateNamespaceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StencilServiceServer).CreateNamespace(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/raystack.stencil.v1beta1.StencilService/CreateNamespace", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StencilServiceServer).CreateNamespace(ctx, req.(*CreateNamespaceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StencilService_UpdateNamespace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateNamespaceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StencilServiceServer).UpdateNamespace(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/raystack.stencil.v1beta1.StencilService/UpdateNamespace", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StencilServiceServer).UpdateNamespace(ctx, req.(*UpdateNamespaceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StencilService_DeleteNamespace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteNamespaceRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StencilServiceServer).DeleteNamespace(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/raystack.stencil.v1beta1.StencilService/DeleteNamespace", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StencilServiceServer).DeleteNamespace(ctx, req.(*DeleteNamespaceRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StencilService_ListSchemas_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListSchemasRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StencilServiceServer).ListSchemas(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/raystack.stencil.v1beta1.StencilService/ListSchemas", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StencilServiceServer).ListSchemas(ctx, req.(*ListSchemasRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StencilService_CreateSchema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateSchemaRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StencilServiceServer).CreateSchema(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/raystack.stencil.v1beta1.StencilService/CreateSchema", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StencilServiceServer).CreateSchema(ctx, req.(*CreateSchemaRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StencilService_CheckCompatibility_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CheckCompatibilityRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StencilServiceServer).CheckCompatibility(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/raystack.stencil.v1beta1.StencilService/CheckCompatibility", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StencilServiceServer).CheckCompatibility(ctx, req.(*CheckCompatibilityRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StencilService_GetSchemaMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetSchemaMetadataRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StencilServiceServer).GetSchemaMetadata(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/raystack.stencil.v1beta1.StencilService/GetSchemaMetadata", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StencilServiceServer).GetSchemaMetadata(ctx, req.(*GetSchemaMetadataRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StencilService_UpdateSchemaMetadata_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateSchemaMetadataRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StencilServiceServer).UpdateSchemaMetadata(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/raystack.stencil.v1beta1.StencilService/UpdateSchemaMetadata", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StencilServiceServer).UpdateSchemaMetadata(ctx, req.(*UpdateSchemaMetadataRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StencilService_GetLatestSchema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetLatestSchemaRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StencilServiceServer).GetLatestSchema(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/raystack.stencil.v1beta1.StencilService/GetLatestSchema", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StencilServiceServer).GetLatestSchema(ctx, req.(*GetLatestSchemaRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StencilService_DeleteSchema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteSchemaRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StencilServiceServer).DeleteSchema(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/raystack.stencil.v1beta1.StencilService/DeleteSchema", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StencilServiceServer).DeleteSchema(ctx, req.(*DeleteSchemaRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StencilService_GetSchema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetSchemaRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StencilServiceServer).GetSchema(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/raystack.stencil.v1beta1.StencilService/GetSchema", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StencilServiceServer).GetSchema(ctx, req.(*GetSchemaRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StencilService_ListVersions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListVersionsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StencilServiceServer).ListVersions(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/raystack.stencil.v1beta1.StencilService/ListVersions", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StencilServiceServer).ListVersions(ctx, req.(*ListVersionsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StencilService_DeleteVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteVersionRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StencilServiceServer).DeleteVersion(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/raystack.stencil.v1beta1.StencilService/DeleteVersion", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StencilServiceServer).DeleteVersion(ctx, req.(*DeleteVersionRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StencilService_Search_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SearchRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StencilServiceServer).Search(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/raystack.stencil.v1beta1.StencilService/Search", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StencilServiceServer).Search(ctx, req.(*SearchRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// StencilService_ServiceDesc is the grpc.ServiceDesc for StencilService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var StencilService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "raystack.stencil.v1beta1.StencilService", - HandlerType: (*StencilServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ListNamespaces", - Handler: _StencilService_ListNamespaces_Handler, - }, - { - MethodName: "GetNamespace", - Handler: _StencilService_GetNamespace_Handler, - }, - { - MethodName: "CreateNamespace", - Handler: _StencilService_CreateNamespace_Handler, - }, - { - MethodName: "UpdateNamespace", - Handler: _StencilService_UpdateNamespace_Handler, - }, - { - MethodName: "DeleteNamespace", - Handler: _StencilService_DeleteNamespace_Handler, - }, - { - MethodName: "ListSchemas", - Handler: _StencilService_ListSchemas_Handler, - }, - { - MethodName: "CreateSchema", - Handler: _StencilService_CreateSchema_Handler, - }, - { - MethodName: "CheckCompatibility", - Handler: _StencilService_CheckCompatibility_Handler, - }, - { - MethodName: "GetSchemaMetadata", - Handler: _StencilService_GetSchemaMetadata_Handler, - }, - { - MethodName: "UpdateSchemaMetadata", - Handler: _StencilService_UpdateSchemaMetadata_Handler, - }, - { - MethodName: "GetLatestSchema", - Handler: _StencilService_GetLatestSchema_Handler, - }, - { - MethodName: "DeleteSchema", - Handler: _StencilService_DeleteSchema_Handler, - }, - { - MethodName: "GetSchema", - Handler: _StencilService_GetSchema_Handler, - }, - { - MethodName: "ListVersions", - Handler: _StencilService_ListVersions_Handler, - }, - { - MethodName: "DeleteVersion", - Handler: _StencilService_DeleteVersion_Handler, - }, - { - MethodName: "Search", - Handler: _StencilService_Search_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "raystack/stencil/v1beta1/stencil.proto", -} From 2ef01929a79ba683fa6ed478f1b88b385ed1b826 Mon Sep 17 00:00:00 2001 From: Ravi Suhag Date: Mon, 20 Apr 2026 21:26:07 -0500 Subject: [PATCH 2/6] fix: include gen/buf/validate in generated code --- Makefile | 1 + gen/buf/validate/validate.pb.go | 9165 +++++++++++++++++++++++++++++++ 2 files changed, 9166 insertions(+) create mode 100644 gen/buf/validate/validate.pb.go diff --git a/Makefile b/Makefile index 3ec3ccd5..ded03e63 100644 --- a/Makefile +++ b/Makefile @@ -25,6 +25,7 @@ proto: ## Generate the protobuf files @echo " > [info] make sure correct version of dependencies are installed using 'make install'" @buf generate @find gen/raystack -mindepth 1 -maxdepth 1 ! -name stencil -exec rm -rf {} + + @find gen -mindepth 1 -maxdepth 1 ! -name raystack ! -name buf -exec rm -rf {} + @echo " > protobuf compilation finished" clean: ## Clean the build artifacts diff --git a/gen/buf/validate/validate.pb.go b/gen/buf/validate/validate.pb.go new file mode 100644 index 00000000..a34aa0aa --- /dev/null +++ b/gen/buf/validate/validate.pb.go @@ -0,0 +1,9165 @@ +// Copyright 2023-2026 Buf Technologies, Inc. +// +// 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. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc (unknown) +// source: buf/validate/validate.proto + +// [Protovalidate](https://protovalidate.com/) is the semantic validation library for Protobuf. +// It provides standard annotations to validate common rules on messages and fields, as well as the ability to use [CEL](https://cel.dev) to write custom rules. +// It's the next generation of [protoc-gen-validate](https://github.com/bufbuild/protoc-gen-validate). +// +// This package provides the options, messages, and enums that power Protovalidate. +// Apply its options to messages, fields, and oneofs in your Protobuf schemas to add validation rules: +// +// ```proto +// message User { +// string id = 1 [(buf.validate.field).string.uuid = true]; +// string first_name = 2 [(buf.validate.field).string.max_len = 64]; +// string last_name = 3 [(buf.validate.field).string.max_len = 64]; +// +// option (buf.validate.message).cel = { +// id: "first_name_requires_last_name" +// message: "last_name must be present if first_name is present" +// expression: "!has(this.first_name) || has(this.last_name)" +// }; +// } +// ``` +// +// These rules are enforced at runtime by language-specific libraries. +// See the [developer quickstart](https://protovalidate.com/quickstart/) to get started, or go directly to the runtime library for your language: +// [Go](https://github.com/bufbuild/protovalidate-go), +// [JavaScript/TypeScript](https://github.com/bufbuild/protovalidate-es), +// [Java](https://github.com/bufbuild/protovalidate-java), +// [Python](https://github.com/bufbuild/protovalidate-python), +// or [C++](https://github.com/bufbuild/protovalidate-cc). + +package validate + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + descriptorpb "google.golang.org/protobuf/types/descriptorpb" + durationpb "google.golang.org/protobuf/types/known/durationpb" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Specifies how `FieldRules.ignore` behaves, depending on the field's value, and +// whether the field tracks presence. +type Ignore int32 + +const ( + // Ignore rules if the field tracks presence and is unset. This is the default + // behavior. + // + // In proto3, only message fields, members of a Protobuf `oneof`, and fields + // with the `optional` label track presence. Consequently, the following fields + // are always validated, whether a value is set or not: + // + // ```proto + // syntax="proto3"; + // + // message RulesApply { + // string email = 1 [ + // (buf.validate.field).string.email = true + // ]; + // int32 age = 2 [ + // (buf.validate.field).int32.gt = 0 + // ]; + // repeated string labels = 3 [ + // (buf.validate.field).repeated.min_items = 1 + // ]; + // } + // + // ``` + // + // In contrast, the following fields track presence, and are only validated if + // a value is set: + // + // ```proto + // syntax="proto3"; + // + // message RulesApplyIfSet { + // optional string email = 1 [ + // (buf.validate.field).string.email = true + // ]; + // oneof ref { + // string reference = 2 [ + // (buf.validate.field).string.uuid = true + // ]; + // string name = 3 [ + // (buf.validate.field).string.min_len = 4 + // ]; + // } + // SomeMessage msg = 4 [ + // (buf.validate.field).cel = {/* ... */} + // ]; + // } + // + // ``` + // + // To ensure that such a field is set, add the `required` rule. + // + // To learn which fields track presence, see the + // [Field Presence cheat sheet](https://protobuf.dev/programming-guides/field_presence/#cheat). + Ignore_IGNORE_UNSPECIFIED Ignore = 0 + // Ignore rules if the field is unset, or set to the zero value. + // + // The zero value depends on the field type: + // - For strings, the zero value is the empty string. + // - For bytes, the zero value is empty bytes. + // - For bool, the zero value is false. + // - For numeric types, the zero value is zero. + // - For enums, the zero value is the first defined enum value. + // - For repeated fields, the zero is an empty list. + // - For map fields, the zero is an empty map. + // - For message fields, absence of the message (typically a null-value) is considered zero value. + // + // For fields that track presence (e.g. adding the `optional` label in proto3), + // this a no-op and behavior is the same as the default `IGNORE_UNSPECIFIED`. + Ignore_IGNORE_IF_ZERO_VALUE Ignore = 1 + // Always ignore rules, including the `required` rule. + // + // This is useful for ignoring the rules of a referenced message, or to + // temporarily ignore rules during development. + // + // ```proto + // + // message MyMessage { + // // The field's rules will always be ignored, including any validations + // // on value's fields. + // MyOtherMessage value = 1 [ + // (buf.validate.field).ignore = IGNORE_ALWAYS + // ]; + // } + // + // ``` + Ignore_IGNORE_ALWAYS Ignore = 3 +) + +// Enum value maps for Ignore. +var ( + Ignore_name = map[int32]string{ + 0: "IGNORE_UNSPECIFIED", + 1: "IGNORE_IF_ZERO_VALUE", + 3: "IGNORE_ALWAYS", + } + Ignore_value = map[string]int32{ + "IGNORE_UNSPECIFIED": 0, + "IGNORE_IF_ZERO_VALUE": 1, + "IGNORE_ALWAYS": 3, + } +) + +func (x Ignore) Enum() *Ignore { + p := new(Ignore) + *p = x + return p +} + +func (x Ignore) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (Ignore) Descriptor() protoreflect.EnumDescriptor { + return file_buf_validate_validate_proto_enumTypes[0].Descriptor() +} + +func (Ignore) Type() protoreflect.EnumType { + return &file_buf_validate_validate_proto_enumTypes[0] +} + +func (x Ignore) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *Ignore) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = Ignore(num) + return nil +} + +// Deprecated: Use Ignore.Descriptor instead. +func (Ignore) EnumDescriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{0} +} + +// KnownRegex contains some well-known patterns. +type KnownRegex int32 + +const ( + KnownRegex_KNOWN_REGEX_UNSPECIFIED KnownRegex = 0 + // HTTP header name as defined by [RFC 7230](https://datatracker.ietf.org/doc/html/rfc7230#section-3.2). + KnownRegex_KNOWN_REGEX_HTTP_HEADER_NAME KnownRegex = 1 + // HTTP header value as defined by [RFC 7230](https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.4). + KnownRegex_KNOWN_REGEX_HTTP_HEADER_VALUE KnownRegex = 2 +) + +// Enum value maps for KnownRegex. +var ( + KnownRegex_name = map[int32]string{ + 0: "KNOWN_REGEX_UNSPECIFIED", + 1: "KNOWN_REGEX_HTTP_HEADER_NAME", + 2: "KNOWN_REGEX_HTTP_HEADER_VALUE", + } + KnownRegex_value = map[string]int32{ + "KNOWN_REGEX_UNSPECIFIED": 0, + "KNOWN_REGEX_HTTP_HEADER_NAME": 1, + "KNOWN_REGEX_HTTP_HEADER_VALUE": 2, + } +) + +func (x KnownRegex) Enum() *KnownRegex { + p := new(KnownRegex) + *p = x + return p +} + +func (x KnownRegex) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (KnownRegex) Descriptor() protoreflect.EnumDescriptor { + return file_buf_validate_validate_proto_enumTypes[1].Descriptor() +} + +func (KnownRegex) Type() protoreflect.EnumType { + return &file_buf_validate_validate_proto_enumTypes[1] +} + +func (x KnownRegex) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *KnownRegex) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = KnownRegex(num) + return nil +} + +// Deprecated: Use KnownRegex.Descriptor instead. +func (KnownRegex) EnumDescriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{1} +} + +// `Rule` represents a validation rule written in the Common Expression +// Language (CEL) syntax. Each Rule includes a unique identifier, an +// optional error message, and the CEL expression to evaluate. For more +// information, [see our documentation](https://buf.build/docs/protovalidate/schemas/custom-rules/). +// +// ```proto +// +// message Foo { +// option (buf.validate.message).cel = { +// id: "foo.bar" +// message: "bar must be greater than 0" +// expression: "this.bar > 0" +// }; +// int32 bar = 1; +// } +// +// ``` +type Rule struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `id` is a string that serves as a machine-readable name for this Rule. + // It should be unique within its scope, which could be either a message or a field. + Id *string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` + // `message` is an optional field that provides a human-readable error message + // for this Rule when the CEL expression evaluates to false. If a + // non-empty message is provided, any strings resulting from the CEL + // expression evaluation are ignored. + Message *string `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"` + // `expression` is the actual CEL expression that will be evaluated for + // validation. This string must resolve to either a boolean or a string + // value. If the expression evaluates to false or a non-empty string, the + // validation is considered failed, and the message is rejected. + Expression *string `protobuf:"bytes,3,opt,name=expression" json:"expression,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Rule) Reset() { + *x = Rule{} + mi := &file_buf_validate_validate_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Rule) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Rule) ProtoMessage() {} + +func (x *Rule) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Rule.ProtoReflect.Descriptor instead. +func (*Rule) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{0} +} + +func (x *Rule) GetId() string { + if x != nil && x.Id != nil { + return *x.Id + } + return "" +} + +func (x *Rule) GetMessage() string { + if x != nil && x.Message != nil { + return *x.Message + } + return "" +} + +func (x *Rule) GetExpression() string { + if x != nil && x.Expression != nil { + return *x.Expression + } + return "" +} + +// MessageRules represents validation rules that are applied to the entire message. +// It includes disabling options and a list of Rule messages representing Common Expression Language (CEL) validation rules. +type MessageRules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `cel_expression` is a repeated field CEL expressions. Each expression specifies a validation + // rule to be applied to this message. These rules are written in Common Expression Language (CEL) syntax. + // + // This is a simplified form of the `cel` Rule field, where only `expression` is set. This allows for + // simpler syntax when defining CEL Rules where `id` and `message` derived from the `expression`. `id` will + // be same as the `expression`. + // + // For more information, [see our documentation](https://buf.build/docs/protovalidate/schemas/custom-rules/). + // + // ```proto + // + // message MyMessage { + // // The field `foo` must be greater than 42. + // option (buf.validate.message).cel_expression = "this.foo > 42"; + // // The field `foo` must be less than 84. + // option (buf.validate.message).cel_expression = "this.foo < 84"; + // optional int32 foo = 1; + // } + // + // ``` + CelExpression []string `protobuf:"bytes,5,rep,name=cel_expression,json=celExpression" json:"cel_expression,omitempty"` + // `cel` is a repeated field of type Rule. Each Rule specifies a validation rule to be applied to this message. + // These rules are written in Common Expression Language (CEL) syntax. For more information, + // [see our documentation](https://buf.build/docs/protovalidate/schemas/custom-rules/). + // + // ```proto + // + // message MyMessage { + // // The field `foo` must be greater than 42. + // option (buf.validate.message).cel = { + // id: "my_message.value", + // message: "must be greater than 42", + // expression: "this.foo > 42", + // }; + // optional int32 foo = 1; + // } + // + // ``` + Cel []*Rule `protobuf:"bytes,3,rep,name=cel" json:"cel,omitempty"` + // `oneof` is a repeated field of type MessageOneofRule that specifies a list of fields + // of which at most one can be present. If `required` is also specified, then exactly one + // of the specified fields _must_ be present. + // + // This will enforce oneof-like constraints with a few features not provided by + // actual Protobuf oneof declarations: + // 1. Repeated and map fields are allowed in this validation. In a Protobuf oneof, + // only scalar fields are allowed. + // 2. Fields with implicit presence are allowed. In a Protobuf oneof, all member + // fields have explicit presence. This means that, for the purpose of determining + // how many fields are set, explicitly setting such a field to its zero value is + // effectively the same as not setting it at all. + // 3. This will always generate validation errors for a message unmarshalled from + // serialized data that sets more than one field. With a Protobuf oneof, when + // multiple fields are present in the serialized form, earlier values are usually + // silently ignored when unmarshalling, with only the last field being set when + // unmarshalling completes. + // + // Note that adding a field to a `oneof` will also set the IGNORE_IF_ZERO_VALUE on the fields. This means + // only the field that is set will be validated and the unset fields are not validated according to the field rules. + // This behavior can be overridden by setting `ignore` against a field. + // + // ```proto + // + // message MyMessage { + // // Only one of `field1` or `field2` _can_ be present in this message. + // option (buf.validate.message).oneof = { fields: ["field1", "field2"] }; + // // Exactly one of `field3` or `field4` _must_ be present in this message. + // option (buf.validate.message).oneof = { fields: ["field3", "field4"], required: true }; + // string field1 = 1; + // bytes field2 = 2; + // bool field3 = 3; + // int32 field4 = 4; + // } + // + // ``` + Oneof []*MessageOneofRule `protobuf:"bytes,4,rep,name=oneof" json:"oneof,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MessageRules) Reset() { + *x = MessageRules{} + mi := &file_buf_validate_validate_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MessageRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MessageRules) ProtoMessage() {} + +func (x *MessageRules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MessageRules.ProtoReflect.Descriptor instead. +func (*MessageRules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{1} +} + +func (x *MessageRules) GetCelExpression() []string { + if x != nil { + return x.CelExpression + } + return nil +} + +func (x *MessageRules) GetCel() []*Rule { + if x != nil { + return x.Cel + } + return nil +} + +func (x *MessageRules) GetOneof() []*MessageOneofRule { + if x != nil { + return x.Oneof + } + return nil +} + +type MessageOneofRule struct { + state protoimpl.MessageState `protogen:"open.v1"` + // A list of field names to include in the oneof. All field names must be + // defined in the message. At least one field must be specified, and + // duplicates are not permitted. + Fields []string `protobuf:"bytes,1,rep,name=fields" json:"fields,omitempty"` + // If true, one of the fields specified _must_ be set. + Required *bool `protobuf:"varint,2,opt,name=required" json:"required,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MessageOneofRule) Reset() { + *x = MessageOneofRule{} + mi := &file_buf_validate_validate_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MessageOneofRule) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MessageOneofRule) ProtoMessage() {} + +func (x *MessageOneofRule) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MessageOneofRule.ProtoReflect.Descriptor instead. +func (*MessageOneofRule) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{2} +} + +func (x *MessageOneofRule) GetFields() []string { + if x != nil { + return x.Fields + } + return nil +} + +func (x *MessageOneofRule) GetRequired() bool { + if x != nil && x.Required != nil { + return *x.Required + } + return false +} + +// The `OneofRules` message type enables you to manage rules for +// oneof fields in your protobuf messages. +type OneofRules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // If `required` is true, exactly one field of the oneof must be set. A + // validation error is returned if no fields in the oneof are set. Further rules + // should be placed on the fields themselves to ensure they are valid values, + // such as `min_len` or `gt`. + // + // ```proto + // + // message MyMessage { + // oneof value { + // // Either `a` or `b` must be set. If `a` is set, it must also be + // // non-empty; whereas if `b` is set, it can still be an empty string. + // option (buf.validate.oneof).required = true; + // string a = 1 [(buf.validate.field).string.min_len = 1]; + // string b = 2; + // } + // } + // + // ``` + Required *bool `protobuf:"varint,1,opt,name=required" json:"required,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OneofRules) Reset() { + *x = OneofRules{} + mi := &file_buf_validate_validate_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OneofRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OneofRules) ProtoMessage() {} + +func (x *OneofRules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OneofRules.ProtoReflect.Descriptor instead. +func (*OneofRules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{3} +} + +func (x *OneofRules) GetRequired() bool { + if x != nil && x.Required != nil { + return *x.Required + } + return false +} + +// FieldRules encapsulates the rules for each type of field. Depending on +// the field, the correct set should be used to ensure proper validations. +type FieldRules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `cel_expression` is a repeated field CEL expressions. Each expression specifies a validation + // rule to be applied to this message. These rules are written in Common Expression Language (CEL) syntax. + // + // This is a simplified form of the `cel` Rule field, where only `expression` is set. This allows for + // simpler syntax when defining CEL Rules where `id` and `message` derived from the `expression`. `id` will + // be same as the `expression`. + // + // For more information, [see our documentation](https://buf.build/docs/protovalidate/schemas/custom-rules/). + // + // ```proto + // + // message MyMessage { + // // The field `value` must be greater than 42. + // optional int32 value = 1 [(buf.validate.field).cel_expression = "this > 42"]; + // } + // + // ``` + CelExpression []string `protobuf:"bytes,29,rep,name=cel_expression,json=celExpression" json:"cel_expression,omitempty"` + // `cel` is a repeated field used to represent a textual expression + // in the Common Expression Language (CEL) syntax. For more information, + // [see our documentation](https://buf.build/docs/protovalidate/schemas/custom-rules/). + // + // ```proto + // + // message MyMessage { + // // The field `value` must be greater than 42. + // optional int32 value = 1 [(buf.validate.field).cel = { + // id: "my_message.value", + // message: "must be greater than 42", + // expression: "this > 42", + // }]; + // } + // + // ``` + Cel []*Rule `protobuf:"bytes,23,rep,name=cel" json:"cel,omitempty"` + // If `required` is true, the field must be set. A validation error is returned + // if the field is not set. + // + // ```proto + // syntax="proto3"; + // + // message FieldsWithPresence { + // // Requires any string to be set, including the empty string. + // optional string link = 1 [ + // (buf.validate.field).required = true + // ]; + // // Requires true or false to be set. + // optional bool disabled = 2 [ + // (buf.validate.field).required = true + // ]; + // // Requires a message to be set, including the empty message. + // SomeMessage msg = 4 [ + // (buf.validate.field).required = true + // ]; + // } + // + // ``` + // + // All fields in the example above track presence. By default, Protovalidate + // ignores rules on those fields if no value is set. `required` ensures that + // the fields are set and valid. + // + // Fields that don't track presence are always validated by Protovalidate, + // whether they are set or not. It is not necessary to add `required`. It + // can be added to indicate that the field cannot be the zero value. + // + // ```proto + // syntax="proto3"; + // + // message FieldsWithoutPresence { + // // `string.email` always applies, even to an empty string. + // string link = 1 [ + // (buf.validate.field).string.email = true + // ]; + // // `repeated.min_items` always applies, even to an empty list. + // repeated string labels = 2 [ + // (buf.validate.field).repeated.min_items = 1 + // ]; + // // `required`, for fields that don't track presence, indicates + // // the value of the field can't be the zero value. + // int32 zero_value_not_allowed = 3 [ + // (buf.validate.field).required = true + // ]; + // } + // + // ``` + // + // To learn which fields track presence, see the + // [Field Presence cheat sheet](https://protobuf.dev/programming-guides/field_presence/#cheat). + // + // Note: While field rules can be applied to repeated items, map keys, and map + // values, the elements are always considered to be set. Consequently, + // specifying `repeated.items.required` is redundant. + Required *bool `protobuf:"varint,25,opt,name=required" json:"required,omitempty"` + // Ignore validation rules on the field if its value matches the specified + // criteria. See the `Ignore` enum for details. + // + // ```proto + // + // message UpdateRequest { + // // The uri rule only applies if the field is not an empty string. + // string url = 1 [ + // (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, + // (buf.validate.field).string.uri = true + // ]; + // } + // + // ``` + Ignore *Ignore `protobuf:"varint,27,opt,name=ignore,enum=buf.validate.Ignore" json:"ignore,omitempty"` + // Types that are valid to be assigned to Type: + // + // *FieldRules_Float + // *FieldRules_Double + // *FieldRules_Int32 + // *FieldRules_Int64 + // *FieldRules_Uint32 + // *FieldRules_Uint64 + // *FieldRules_Sint32 + // *FieldRules_Sint64 + // *FieldRules_Fixed32 + // *FieldRules_Fixed64 + // *FieldRules_Sfixed32 + // *FieldRules_Sfixed64 + // *FieldRules_Bool + // *FieldRules_String_ + // *FieldRules_Bytes + // *FieldRules_Enum + // *FieldRules_Repeated + // *FieldRules_Map + // *FieldRules_Any + // *FieldRules_Duration + // *FieldRules_FieldMask + // *FieldRules_Timestamp + Type isFieldRules_Type `protobuf_oneof:"type"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FieldRules) Reset() { + *x = FieldRules{} + mi := &file_buf_validate_validate_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FieldRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FieldRules) ProtoMessage() {} + +func (x *FieldRules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FieldRules.ProtoReflect.Descriptor instead. +func (*FieldRules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{4} +} + +func (x *FieldRules) GetCelExpression() []string { + if x != nil { + return x.CelExpression + } + return nil +} + +func (x *FieldRules) GetCel() []*Rule { + if x != nil { + return x.Cel + } + return nil +} + +func (x *FieldRules) GetRequired() bool { + if x != nil && x.Required != nil { + return *x.Required + } + return false +} + +func (x *FieldRules) GetIgnore() Ignore { + if x != nil && x.Ignore != nil { + return *x.Ignore + } + return Ignore_IGNORE_UNSPECIFIED +} + +func (x *FieldRules) GetType() isFieldRules_Type { + if x != nil { + return x.Type + } + return nil +} + +func (x *FieldRules) GetFloat() *FloatRules { + if x != nil { + if x, ok := x.Type.(*FieldRules_Float); ok { + return x.Float + } + } + return nil +} + +func (x *FieldRules) GetDouble() *DoubleRules { + if x != nil { + if x, ok := x.Type.(*FieldRules_Double); ok { + return x.Double + } + } + return nil +} + +func (x *FieldRules) GetInt32() *Int32Rules { + if x != nil { + if x, ok := x.Type.(*FieldRules_Int32); ok { + return x.Int32 + } + } + return nil +} + +func (x *FieldRules) GetInt64() *Int64Rules { + if x != nil { + if x, ok := x.Type.(*FieldRules_Int64); ok { + return x.Int64 + } + } + return nil +} + +func (x *FieldRules) GetUint32() *UInt32Rules { + if x != nil { + if x, ok := x.Type.(*FieldRules_Uint32); ok { + return x.Uint32 + } + } + return nil +} + +func (x *FieldRules) GetUint64() *UInt64Rules { + if x != nil { + if x, ok := x.Type.(*FieldRules_Uint64); ok { + return x.Uint64 + } + } + return nil +} + +func (x *FieldRules) GetSint32() *SInt32Rules { + if x != nil { + if x, ok := x.Type.(*FieldRules_Sint32); ok { + return x.Sint32 + } + } + return nil +} + +func (x *FieldRules) GetSint64() *SInt64Rules { + if x != nil { + if x, ok := x.Type.(*FieldRules_Sint64); ok { + return x.Sint64 + } + } + return nil +} + +func (x *FieldRules) GetFixed32() *Fixed32Rules { + if x != nil { + if x, ok := x.Type.(*FieldRules_Fixed32); ok { + return x.Fixed32 + } + } + return nil +} + +func (x *FieldRules) GetFixed64() *Fixed64Rules { + if x != nil { + if x, ok := x.Type.(*FieldRules_Fixed64); ok { + return x.Fixed64 + } + } + return nil +} + +func (x *FieldRules) GetSfixed32() *SFixed32Rules { + if x != nil { + if x, ok := x.Type.(*FieldRules_Sfixed32); ok { + return x.Sfixed32 + } + } + return nil +} + +func (x *FieldRules) GetSfixed64() *SFixed64Rules { + if x != nil { + if x, ok := x.Type.(*FieldRules_Sfixed64); ok { + return x.Sfixed64 + } + } + return nil +} + +func (x *FieldRules) GetBool() *BoolRules { + if x != nil { + if x, ok := x.Type.(*FieldRules_Bool); ok { + return x.Bool + } + } + return nil +} + +func (x *FieldRules) GetString_() *StringRules { + if x != nil { + if x, ok := x.Type.(*FieldRules_String_); ok { + return x.String_ + } + } + return nil +} + +func (x *FieldRules) GetBytes() *BytesRules { + if x != nil { + if x, ok := x.Type.(*FieldRules_Bytes); ok { + return x.Bytes + } + } + return nil +} + +func (x *FieldRules) GetEnum() *EnumRules { + if x != nil { + if x, ok := x.Type.(*FieldRules_Enum); ok { + return x.Enum + } + } + return nil +} + +func (x *FieldRules) GetRepeated() *RepeatedRules { + if x != nil { + if x, ok := x.Type.(*FieldRules_Repeated); ok { + return x.Repeated + } + } + return nil +} + +func (x *FieldRules) GetMap() *MapRules { + if x != nil { + if x, ok := x.Type.(*FieldRules_Map); ok { + return x.Map + } + } + return nil +} + +func (x *FieldRules) GetAny() *AnyRules { + if x != nil { + if x, ok := x.Type.(*FieldRules_Any); ok { + return x.Any + } + } + return nil +} + +func (x *FieldRules) GetDuration() *DurationRules { + if x != nil { + if x, ok := x.Type.(*FieldRules_Duration); ok { + return x.Duration + } + } + return nil +} + +func (x *FieldRules) GetFieldMask() *FieldMaskRules { + if x != nil { + if x, ok := x.Type.(*FieldRules_FieldMask); ok { + return x.FieldMask + } + } + return nil +} + +func (x *FieldRules) GetTimestamp() *TimestampRules { + if x != nil { + if x, ok := x.Type.(*FieldRules_Timestamp); ok { + return x.Timestamp + } + } + return nil +} + +type isFieldRules_Type interface { + isFieldRules_Type() +} + +type FieldRules_Float struct { + // Scalar Field Types + Float *FloatRules `protobuf:"bytes,1,opt,name=float,oneof"` +} + +type FieldRules_Double struct { + Double *DoubleRules `protobuf:"bytes,2,opt,name=double,oneof"` +} + +type FieldRules_Int32 struct { + Int32 *Int32Rules `protobuf:"bytes,3,opt,name=int32,oneof"` +} + +type FieldRules_Int64 struct { + Int64 *Int64Rules `protobuf:"bytes,4,opt,name=int64,oneof"` +} + +type FieldRules_Uint32 struct { + Uint32 *UInt32Rules `protobuf:"bytes,5,opt,name=uint32,oneof"` +} + +type FieldRules_Uint64 struct { + Uint64 *UInt64Rules `protobuf:"bytes,6,opt,name=uint64,oneof"` +} + +type FieldRules_Sint32 struct { + Sint32 *SInt32Rules `protobuf:"bytes,7,opt,name=sint32,oneof"` +} + +type FieldRules_Sint64 struct { + Sint64 *SInt64Rules `protobuf:"bytes,8,opt,name=sint64,oneof"` +} + +type FieldRules_Fixed32 struct { + Fixed32 *Fixed32Rules `protobuf:"bytes,9,opt,name=fixed32,oneof"` +} + +type FieldRules_Fixed64 struct { + Fixed64 *Fixed64Rules `protobuf:"bytes,10,opt,name=fixed64,oneof"` +} + +type FieldRules_Sfixed32 struct { + Sfixed32 *SFixed32Rules `protobuf:"bytes,11,opt,name=sfixed32,oneof"` +} + +type FieldRules_Sfixed64 struct { + Sfixed64 *SFixed64Rules `protobuf:"bytes,12,opt,name=sfixed64,oneof"` +} + +type FieldRules_Bool struct { + Bool *BoolRules `protobuf:"bytes,13,opt,name=bool,oneof"` +} + +type FieldRules_String_ struct { + String_ *StringRules `protobuf:"bytes,14,opt,name=string,oneof"` +} + +type FieldRules_Bytes struct { + Bytes *BytesRules `protobuf:"bytes,15,opt,name=bytes,oneof"` +} + +type FieldRules_Enum struct { + // Complex Field Types + Enum *EnumRules `protobuf:"bytes,16,opt,name=enum,oneof"` +} + +type FieldRules_Repeated struct { + Repeated *RepeatedRules `protobuf:"bytes,18,opt,name=repeated,oneof"` +} + +type FieldRules_Map struct { + Map *MapRules `protobuf:"bytes,19,opt,name=map,oneof"` +} + +type FieldRules_Any struct { + // Well-Known Field Types + Any *AnyRules `protobuf:"bytes,20,opt,name=any,oneof"` +} + +type FieldRules_Duration struct { + Duration *DurationRules `protobuf:"bytes,21,opt,name=duration,oneof"` +} + +type FieldRules_FieldMask struct { + FieldMask *FieldMaskRules `protobuf:"bytes,28,opt,name=field_mask,json=fieldMask,oneof"` +} + +type FieldRules_Timestamp struct { + Timestamp *TimestampRules `protobuf:"bytes,22,opt,name=timestamp,oneof"` +} + +func (*FieldRules_Float) isFieldRules_Type() {} + +func (*FieldRules_Double) isFieldRules_Type() {} + +func (*FieldRules_Int32) isFieldRules_Type() {} + +func (*FieldRules_Int64) isFieldRules_Type() {} + +func (*FieldRules_Uint32) isFieldRules_Type() {} + +func (*FieldRules_Uint64) isFieldRules_Type() {} + +func (*FieldRules_Sint32) isFieldRules_Type() {} + +func (*FieldRules_Sint64) isFieldRules_Type() {} + +func (*FieldRules_Fixed32) isFieldRules_Type() {} + +func (*FieldRules_Fixed64) isFieldRules_Type() {} + +func (*FieldRules_Sfixed32) isFieldRules_Type() {} + +func (*FieldRules_Sfixed64) isFieldRules_Type() {} + +func (*FieldRules_Bool) isFieldRules_Type() {} + +func (*FieldRules_String_) isFieldRules_Type() {} + +func (*FieldRules_Bytes) isFieldRules_Type() {} + +func (*FieldRules_Enum) isFieldRules_Type() {} + +func (*FieldRules_Repeated) isFieldRules_Type() {} + +func (*FieldRules_Map) isFieldRules_Type() {} + +func (*FieldRules_Any) isFieldRules_Type() {} + +func (*FieldRules_Duration) isFieldRules_Type() {} + +func (*FieldRules_FieldMask) isFieldRules_Type() {} + +func (*FieldRules_Timestamp) isFieldRules_Type() {} + +// PredefinedRules are custom rules that can be re-used with +// multiple fields. +type PredefinedRules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `cel` is a repeated field used to represent a textual expression + // in the Common Expression Language (CEL) syntax. For more information, + // [see our documentation](https://buf.build/docs/protovalidate/schemas/predefined-rules/). + // + // ```proto + // + // message MyMessage { + // // The field `value` must be greater than 42. + // optional int32 value = 1 [(buf.validate.predefined).cel = { + // id: "my_message.value", + // message: "must be greater than 42", + // expression: "this > 42", + // }]; + // } + // + // ``` + Cel []*Rule `protobuf:"bytes,1,rep,name=cel" json:"cel,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PredefinedRules) Reset() { + *x = PredefinedRules{} + mi := &file_buf_validate_validate_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PredefinedRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PredefinedRules) ProtoMessage() {} + +func (x *PredefinedRules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PredefinedRules.ProtoReflect.Descriptor instead. +func (*PredefinedRules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{5} +} + +func (x *PredefinedRules) GetCel() []*Rule { + if x != nil { + return x.Cel + } + return nil +} + +// FloatRules describes the rules applied to `float` values. These +// rules may also be applied to the `google.protobuf.FloatValue` Well-Known-Type. +type FloatRules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `const` requires the field value to exactly match the specified value. If + // the field value doesn't match, an error message is generated. + // + // ```proto + // + // message MyFloat { + // // value must equal 42.0 + // float value = 1 [(buf.validate.field).float.const = 42.0]; + // } + // + // ``` + Const *float32 `protobuf:"fixed32,1,opt,name=const" json:"const,omitempty"` + // Types that are valid to be assigned to LessThan: + // + // *FloatRules_Lt + // *FloatRules_Lte + LessThan isFloatRules_LessThan `protobuf_oneof:"less_than"` + // Types that are valid to be assigned to GreaterThan: + // + // *FloatRules_Gt + // *FloatRules_Gte + GreaterThan isFloatRules_GreaterThan `protobuf_oneof:"greater_than"` + // `in` requires the field value to be equal to one of the specified values. + // If the field value isn't one of the specified values, an error message + // is generated. + // + // ```proto + // + // message MyFloat { + // // must be in list [1.0, 2.0, 3.0] + // float value = 1 [(buf.validate.field).float = { in: [1.0, 2.0, 3.0] }]; + // } + // + // ``` + In []float32 `protobuf:"fixed32,6,rep,name=in" json:"in,omitempty"` + // `not_in` requires the field value to not be equal to any of the specified + // values. If the field value is one of the specified values, an error + // message is generated. + // + // ```proto + // + // message MyFloat { + // // value must not be in list [1.0, 2.0, 3.0] + // float value = 1 [(buf.validate.field).float = { not_in: [1.0, 2.0, 3.0] }]; + // } + // + // ``` + NotIn []float32 `protobuf:"fixed32,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // `finite` requires the field value to be finite. If the field value is + // infinite or NaN, an error message is generated. + Finite *bool `protobuf:"varint,8,opt,name=finite" json:"finite,omitempty"` + // `example` specifies values that the field may have. These values SHOULD + // conform to other rules. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // + // message MyFloat { + // float value = 1 [ + // (buf.validate.field).float.example = 1.0, + // (buf.validate.field).float.example = inf + // ]; + // } + // + // ``` + Example []float32 `protobuf:"fixed32,9,rep,name=example" json:"example,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FloatRules) Reset() { + *x = FloatRules{} + mi := &file_buf_validate_validate_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FloatRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FloatRules) ProtoMessage() {} + +func (x *FloatRules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FloatRules.ProtoReflect.Descriptor instead. +func (*FloatRules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{6} +} + +func (x *FloatRules) GetConst() float32 { + if x != nil && x.Const != nil { + return *x.Const + } + return 0 +} + +func (x *FloatRules) GetLessThan() isFloatRules_LessThan { + if x != nil { + return x.LessThan + } + return nil +} + +func (x *FloatRules) GetLt() float32 { + if x != nil { + if x, ok := x.LessThan.(*FloatRules_Lt); ok { + return x.Lt + } + } + return 0 +} + +func (x *FloatRules) GetLte() float32 { + if x != nil { + if x, ok := x.LessThan.(*FloatRules_Lte); ok { + return x.Lte + } + } + return 0 +} + +func (x *FloatRules) GetGreaterThan() isFloatRules_GreaterThan { + if x != nil { + return x.GreaterThan + } + return nil +} + +func (x *FloatRules) GetGt() float32 { + if x != nil { + if x, ok := x.GreaterThan.(*FloatRules_Gt); ok { + return x.Gt + } + } + return 0 +} + +func (x *FloatRules) GetGte() float32 { + if x != nil { + if x, ok := x.GreaterThan.(*FloatRules_Gte); ok { + return x.Gte + } + } + return 0 +} + +func (x *FloatRules) GetIn() []float32 { + if x != nil { + return x.In + } + return nil +} + +func (x *FloatRules) GetNotIn() []float32 { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *FloatRules) GetFinite() bool { + if x != nil && x.Finite != nil { + return *x.Finite + } + return false +} + +func (x *FloatRules) GetExample() []float32 { + if x != nil { + return x.Example + } + return nil +} + +type isFloatRules_LessThan interface { + isFloatRules_LessThan() +} + +type FloatRules_Lt struct { + // `lt` requires the field value to be less than the specified value (field < + // value). If the field value is equal to or greater than the specified value, + // an error message is generated. + // + // ```proto + // + // message MyFloat { + // // must be less than 10.0 + // float value = 1 [(buf.validate.field).float.lt = 10.0]; + // } + // + // ``` + Lt float32 `protobuf:"fixed32,2,opt,name=lt,oneof"` +} + +type FloatRules_Lte struct { + // `lte` requires the field value to be less than or equal to the specified + // value (field <= value). If the field value is greater than the specified + // value, an error message is generated. + // + // ```proto + // + // message MyFloat { + // // must be less than or equal to 10.0 + // float value = 1 [(buf.validate.field).float.lte = 10.0]; + // } + // + // ``` + Lte float32 `protobuf:"fixed32,3,opt,name=lte,oneof"` +} + +func (*FloatRules_Lt) isFloatRules_LessThan() {} + +func (*FloatRules_Lte) isFloatRules_LessThan() {} + +type isFloatRules_GreaterThan interface { + isFloatRules_GreaterThan() +} + +type FloatRules_Gt struct { + // `gt` requires the field value to be greater than the specified value + // (exclusive). If the value of `gt` is larger than a specified `lt` or + // `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MyFloat { + // // must be greater than 5.0 [float.gt] + // float value = 1 [(buf.validate.field).float.gt = 5.0]; + // + // // must be greater than 5 and less than 10.0 [float.gt_lt] + // float other_value = 2 [(buf.validate.field).float = { gt: 5.0, lt: 10.0 }]; + // + // // must be greater than 10 or less than 5.0 [float.gt_lt_exclusive] + // float another_value = 3 [(buf.validate.field).float = { gt: 10.0, lt: 5.0 }]; + // } + // + // ``` + Gt float32 `protobuf:"fixed32,4,opt,name=gt,oneof"` +} + +type FloatRules_Gte struct { + // `gte` requires the field value to be greater than or equal to the specified + // value (exclusive). If the value of `gte` is larger than a specified `lt` + // or `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MyFloat { + // // must be greater than or equal to 5.0 [float.gte] + // float value = 1 [(buf.validate.field).float.gte = 5.0]; + // + // // must be greater than or equal to 5.0 and less than 10.0 [float.gte_lt] + // float other_value = 2 [(buf.validate.field).float = { gte: 5.0, lt: 10.0 }]; + // + // // must be greater than or equal to 10.0 or less than 5.0 [float.gte_lt_exclusive] + // float another_value = 3 [(buf.validate.field).float = { gte: 10.0, lt: 5.0 }]; + // } + // + // ``` + Gte float32 `protobuf:"fixed32,5,opt,name=gte,oneof"` +} + +func (*FloatRules_Gt) isFloatRules_GreaterThan() {} + +func (*FloatRules_Gte) isFloatRules_GreaterThan() {} + +// DoubleRules describes the rules applied to `double` values. These +// rules may also be applied to the `google.protobuf.DoubleValue` Well-Known-Type. +type DoubleRules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `const` requires the field value to exactly match the specified value. If + // the field value doesn't match, an error message is generated. + // + // ```proto + // + // message MyDouble { + // // value must equal 42.0 + // double value = 1 [(buf.validate.field).double.const = 42.0]; + // } + // + // ``` + Const *float64 `protobuf:"fixed64,1,opt,name=const" json:"const,omitempty"` + // Types that are valid to be assigned to LessThan: + // + // *DoubleRules_Lt + // *DoubleRules_Lte + LessThan isDoubleRules_LessThan `protobuf_oneof:"less_than"` + // Types that are valid to be assigned to GreaterThan: + // + // *DoubleRules_Gt + // *DoubleRules_Gte + GreaterThan isDoubleRules_GreaterThan `protobuf_oneof:"greater_than"` + // `in` requires the field value to be equal to one of the specified values. + // If the field value isn't one of the specified values, an error message is + // generated. + // + // ```proto + // + // message MyDouble { + // // must be in list [1.0, 2.0, 3.0] + // double value = 1 [(buf.validate.field).double = { in: [1.0, 2.0, 3.0] }]; + // } + // + // ``` + In []float64 `protobuf:"fixed64,6,rep,name=in" json:"in,omitempty"` + // `not_in` requires the field value to not be equal to any of the specified + // values. If the field value is one of the specified values, an error + // message is generated. + // + // ```proto + // + // message MyDouble { + // // value must not be in list [1.0, 2.0, 3.0] + // double value = 1 [(buf.validate.field).double = { not_in: [1.0, 2.0, 3.0] }]; + // } + // + // ``` + NotIn []float64 `protobuf:"fixed64,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // `finite` requires the field value to be finite. If the field value is + // infinite or NaN, an error message is generated. + Finite *bool `protobuf:"varint,8,opt,name=finite" json:"finite,omitempty"` + // `example` specifies values that the field may have. These values SHOULD + // conform to other rules. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // + // message MyDouble { + // double value = 1 [ + // (buf.validate.field).double.example = 1.0, + // (buf.validate.field).double.example = inf + // ]; + // } + // + // ``` + Example []float64 `protobuf:"fixed64,9,rep,name=example" json:"example,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DoubleRules) Reset() { + *x = DoubleRules{} + mi := &file_buf_validate_validate_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DoubleRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DoubleRules) ProtoMessage() {} + +func (x *DoubleRules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DoubleRules.ProtoReflect.Descriptor instead. +func (*DoubleRules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{7} +} + +func (x *DoubleRules) GetConst() float64 { + if x != nil && x.Const != nil { + return *x.Const + } + return 0 +} + +func (x *DoubleRules) GetLessThan() isDoubleRules_LessThan { + if x != nil { + return x.LessThan + } + return nil +} + +func (x *DoubleRules) GetLt() float64 { + if x != nil { + if x, ok := x.LessThan.(*DoubleRules_Lt); ok { + return x.Lt + } + } + return 0 +} + +func (x *DoubleRules) GetLte() float64 { + if x != nil { + if x, ok := x.LessThan.(*DoubleRules_Lte); ok { + return x.Lte + } + } + return 0 +} + +func (x *DoubleRules) GetGreaterThan() isDoubleRules_GreaterThan { + if x != nil { + return x.GreaterThan + } + return nil +} + +func (x *DoubleRules) GetGt() float64 { + if x != nil { + if x, ok := x.GreaterThan.(*DoubleRules_Gt); ok { + return x.Gt + } + } + return 0 +} + +func (x *DoubleRules) GetGte() float64 { + if x != nil { + if x, ok := x.GreaterThan.(*DoubleRules_Gte); ok { + return x.Gte + } + } + return 0 +} + +func (x *DoubleRules) GetIn() []float64 { + if x != nil { + return x.In + } + return nil +} + +func (x *DoubleRules) GetNotIn() []float64 { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *DoubleRules) GetFinite() bool { + if x != nil && x.Finite != nil { + return *x.Finite + } + return false +} + +func (x *DoubleRules) GetExample() []float64 { + if x != nil { + return x.Example + } + return nil +} + +type isDoubleRules_LessThan interface { + isDoubleRules_LessThan() +} + +type DoubleRules_Lt struct { + // `lt` requires the field value to be less than the specified value (field < + // value). If the field value is equal to or greater than the specified + // value, an error message is generated. + // + // ```proto + // + // message MyDouble { + // // must be less than 10.0 + // double value = 1 [(buf.validate.field).double.lt = 10.0]; + // } + // + // ``` + Lt float64 `protobuf:"fixed64,2,opt,name=lt,oneof"` +} + +type DoubleRules_Lte struct { + // `lte` requires the field value to be less than or equal to the specified value + // (field <= value). If the field value is greater than the specified value, + // an error message is generated. + // + // ```proto + // + // message MyDouble { + // // must be less than or equal to 10.0 + // double value = 1 [(buf.validate.field).double.lte = 10.0]; + // } + // + // ``` + Lte float64 `protobuf:"fixed64,3,opt,name=lte,oneof"` +} + +func (*DoubleRules_Lt) isDoubleRules_LessThan() {} + +func (*DoubleRules_Lte) isDoubleRules_LessThan() {} + +type isDoubleRules_GreaterThan interface { + isDoubleRules_GreaterThan() +} + +type DoubleRules_Gt struct { + // `gt` requires the field value to be greater than the specified value + // (exclusive). If the value of `gt` is larger than a specified `lt` or `lte`, + // the range is reversed, and the field value must be outside the specified + // range. If the field value doesn't meet the required conditions, an error + // message is generated. + // + // ```proto + // + // message MyDouble { + // // must be greater than 5.0 [double.gt] + // double value = 1 [(buf.validate.field).double.gt = 5.0]; + // + // // must be greater than 5 and less than 10.0 [double.gt_lt] + // double other_value = 2 [(buf.validate.field).double = { gt: 5.0, lt: 10.0 }]; + // + // // must be greater than 10 or less than 5.0 [double.gt_lt_exclusive] + // double another_value = 3 [(buf.validate.field).double = { gt: 10.0, lt: 5.0 }]; + // } + // + // ``` + Gt float64 `protobuf:"fixed64,4,opt,name=gt,oneof"` +} + +type DoubleRules_Gte struct { + // `gte` requires the field value to be greater than or equal to the specified + // value (exclusive). If the value of `gte` is larger than a specified `lt` or + // `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MyDouble { + // // must be greater than or equal to 5.0 [double.gte] + // double value = 1 [(buf.validate.field).double.gte = 5.0]; + // + // // must be greater than or equal to 5.0 and less than 10.0 [double.gte_lt] + // double other_value = 2 [(buf.validate.field).double = { gte: 5.0, lt: 10.0 }]; + // + // // must be greater than or equal to 10.0 or less than 5.0 [double.gte_lt_exclusive] + // double another_value = 3 [(buf.validate.field).double = { gte: 10.0, lt: 5.0 }]; + // } + // + // ``` + Gte float64 `protobuf:"fixed64,5,opt,name=gte,oneof"` +} + +func (*DoubleRules_Gt) isDoubleRules_GreaterThan() {} + +func (*DoubleRules_Gte) isDoubleRules_GreaterThan() {} + +// Int32Rules describes the rules applied to `int32` values. These +// rules may also be applied to the `google.protobuf.Int32Value` Well-Known-Type. +type Int32Rules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `const` requires the field value to exactly match the specified value. If + // the field value doesn't match, an error message is generated. + // + // ```proto + // + // message MyInt32 { + // // value must equal 42 + // int32 value = 1 [(buf.validate.field).int32.const = 42]; + // } + // + // ``` + Const *int32 `protobuf:"varint,1,opt,name=const" json:"const,omitempty"` + // Types that are valid to be assigned to LessThan: + // + // *Int32Rules_Lt + // *Int32Rules_Lte + LessThan isInt32Rules_LessThan `protobuf_oneof:"less_than"` + // Types that are valid to be assigned to GreaterThan: + // + // *Int32Rules_Gt + // *Int32Rules_Gte + GreaterThan isInt32Rules_GreaterThan `protobuf_oneof:"greater_than"` + // `in` requires the field value to be equal to one of the specified values. + // If the field value isn't one of the specified values, an error message is + // generated. + // + // ```proto + // + // message MyInt32 { + // // must be in list [1, 2, 3] + // int32 value = 1 [(buf.validate.field).int32 = { in: [1, 2, 3] }]; + // } + // + // ``` + In []int32 `protobuf:"varint,6,rep,name=in" json:"in,omitempty"` + // `not_in` requires the field value to not be equal to any of the specified + // values. If the field value is one of the specified values, an error message + // is generated. + // + // ```proto + // + // message MyInt32 { + // // value must not be in list [1, 2, 3] + // int32 value = 1 [(buf.validate.field).int32 = { not_in: [1, 2, 3] }]; + // } + // + // ``` + NotIn []int32 `protobuf:"varint,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // `example` specifies values that the field may have. These values SHOULD + // conform to other rules. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // + // message MyInt32 { + // int32 value = 1 [ + // (buf.validate.field).int32.example = 1, + // (buf.validate.field).int32.example = -10 + // ]; + // } + // + // ``` + Example []int32 `protobuf:"varint,8,rep,name=example" json:"example,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Int32Rules) Reset() { + *x = Int32Rules{} + mi := &file_buf_validate_validate_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Int32Rules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Int32Rules) ProtoMessage() {} + +func (x *Int32Rules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Int32Rules.ProtoReflect.Descriptor instead. +func (*Int32Rules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{8} +} + +func (x *Int32Rules) GetConst() int32 { + if x != nil && x.Const != nil { + return *x.Const + } + return 0 +} + +func (x *Int32Rules) GetLessThan() isInt32Rules_LessThan { + if x != nil { + return x.LessThan + } + return nil +} + +func (x *Int32Rules) GetLt() int32 { + if x != nil { + if x, ok := x.LessThan.(*Int32Rules_Lt); ok { + return x.Lt + } + } + return 0 +} + +func (x *Int32Rules) GetLte() int32 { + if x != nil { + if x, ok := x.LessThan.(*Int32Rules_Lte); ok { + return x.Lte + } + } + return 0 +} + +func (x *Int32Rules) GetGreaterThan() isInt32Rules_GreaterThan { + if x != nil { + return x.GreaterThan + } + return nil +} + +func (x *Int32Rules) GetGt() int32 { + if x != nil { + if x, ok := x.GreaterThan.(*Int32Rules_Gt); ok { + return x.Gt + } + } + return 0 +} + +func (x *Int32Rules) GetGte() int32 { + if x != nil { + if x, ok := x.GreaterThan.(*Int32Rules_Gte); ok { + return x.Gte + } + } + return 0 +} + +func (x *Int32Rules) GetIn() []int32 { + if x != nil { + return x.In + } + return nil +} + +func (x *Int32Rules) GetNotIn() []int32 { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *Int32Rules) GetExample() []int32 { + if x != nil { + return x.Example + } + return nil +} + +type isInt32Rules_LessThan interface { + isInt32Rules_LessThan() +} + +type Int32Rules_Lt struct { + // `lt` requires the field value to be less than the specified value (field + // < value). If the field value is equal to or greater than the specified + // value, an error message is generated. + // + // ```proto + // + // message MyInt32 { + // // must be less than 10 + // int32 value = 1 [(buf.validate.field).int32.lt = 10]; + // } + // + // ``` + Lt int32 `protobuf:"varint,2,opt,name=lt,oneof"` +} + +type Int32Rules_Lte struct { + // `lte` requires the field value to be less than or equal to the specified + // value (field <= value). If the field value is greater than the specified + // value, an error message is generated. + // + // ```proto + // + // message MyInt32 { + // // must be less than or equal to 10 + // int32 value = 1 [(buf.validate.field).int32.lte = 10]; + // } + // + // ``` + Lte int32 `protobuf:"varint,3,opt,name=lte,oneof"` +} + +func (*Int32Rules_Lt) isInt32Rules_LessThan() {} + +func (*Int32Rules_Lte) isInt32Rules_LessThan() {} + +type isInt32Rules_GreaterThan interface { + isInt32Rules_GreaterThan() +} + +type Int32Rules_Gt struct { + // `gt` requires the field value to be greater than the specified value + // (exclusive). If the value of `gt` is larger than a specified `lt` or + // `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MyInt32 { + // // must be greater than 5 [int32.gt] + // int32 value = 1 [(buf.validate.field).int32.gt = 5]; + // + // // must be greater than 5 and less than 10 [int32.gt_lt] + // int32 other_value = 2 [(buf.validate.field).int32 = { gt: 5, lt: 10 }]; + // + // // must be greater than 10 or less than 5 [int32.gt_lt_exclusive] + // int32 another_value = 3 [(buf.validate.field).int32 = { gt: 10, lt: 5 }]; + // } + // + // ``` + Gt int32 `protobuf:"varint,4,opt,name=gt,oneof"` +} + +type Int32Rules_Gte struct { + // `gte` requires the field value to be greater than or equal to the specified value + // (exclusive). If the value of `gte` is larger than a specified `lt` or + // `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MyInt32 { + // // must be greater than or equal to 5 [int32.gte] + // int32 value = 1 [(buf.validate.field).int32.gte = 5]; + // + // // must be greater than or equal to 5 and less than 10 [int32.gte_lt] + // int32 other_value = 2 [(buf.validate.field).int32 = { gte: 5, lt: 10 }]; + // + // // must be greater than or equal to 10 or less than 5 [int32.gte_lt_exclusive] + // int32 another_value = 3 [(buf.validate.field).int32 = { gte: 10, lt: 5 }]; + // } + // + // ``` + Gte int32 `protobuf:"varint,5,opt,name=gte,oneof"` +} + +func (*Int32Rules_Gt) isInt32Rules_GreaterThan() {} + +func (*Int32Rules_Gte) isInt32Rules_GreaterThan() {} + +// Int64Rules describes the rules applied to `int64` values. These +// rules may also be applied to the `google.protobuf.Int64Value` Well-Known-Type. +type Int64Rules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `const` requires the field value to exactly match the specified value. If + // the field value doesn't match, an error message is generated. + // + // ```proto + // + // message MyInt64 { + // // value must equal 42 + // int64 value = 1 [(buf.validate.field).int64.const = 42]; + // } + // + // ``` + Const *int64 `protobuf:"varint,1,opt,name=const" json:"const,omitempty"` + // Types that are valid to be assigned to LessThan: + // + // *Int64Rules_Lt + // *Int64Rules_Lte + LessThan isInt64Rules_LessThan `protobuf_oneof:"less_than"` + // Types that are valid to be assigned to GreaterThan: + // + // *Int64Rules_Gt + // *Int64Rules_Gte + GreaterThan isInt64Rules_GreaterThan `protobuf_oneof:"greater_than"` + // `in` requires the field value to be equal to one of the specified values. + // If the field value isn't one of the specified values, an error message is + // generated. + // + // ```proto + // + // message MyInt64 { + // // must be in list [1, 2, 3] + // int64 value = 1 [(buf.validate.field).int64 = { in: [1, 2, 3] }]; + // } + // + // ``` + In []int64 `protobuf:"varint,6,rep,name=in" json:"in,omitempty"` + // `not_in` requires the field value to not be equal to any of the specified + // values. If the field value is one of the specified values, an error + // message is generated. + // + // ```proto + // + // message MyInt64 { + // // value must not be in list [1, 2, 3] + // int64 value = 1 [(buf.validate.field).int64 = { not_in: [1, 2, 3] }]; + // } + // + // ``` + NotIn []int64 `protobuf:"varint,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // `example` specifies values that the field may have. These values SHOULD + // conform to other rules. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // + // message MyInt64 { + // int64 value = 1 [ + // (buf.validate.field).int64.example = 1, + // (buf.validate.field).int64.example = -10 + // ]; + // } + // + // ``` + Example []int64 `protobuf:"varint,9,rep,name=example" json:"example,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Int64Rules) Reset() { + *x = Int64Rules{} + mi := &file_buf_validate_validate_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Int64Rules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Int64Rules) ProtoMessage() {} + +func (x *Int64Rules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Int64Rules.ProtoReflect.Descriptor instead. +func (*Int64Rules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{9} +} + +func (x *Int64Rules) GetConst() int64 { + if x != nil && x.Const != nil { + return *x.Const + } + return 0 +} + +func (x *Int64Rules) GetLessThan() isInt64Rules_LessThan { + if x != nil { + return x.LessThan + } + return nil +} + +func (x *Int64Rules) GetLt() int64 { + if x != nil { + if x, ok := x.LessThan.(*Int64Rules_Lt); ok { + return x.Lt + } + } + return 0 +} + +func (x *Int64Rules) GetLte() int64 { + if x != nil { + if x, ok := x.LessThan.(*Int64Rules_Lte); ok { + return x.Lte + } + } + return 0 +} + +func (x *Int64Rules) GetGreaterThan() isInt64Rules_GreaterThan { + if x != nil { + return x.GreaterThan + } + return nil +} + +func (x *Int64Rules) GetGt() int64 { + if x != nil { + if x, ok := x.GreaterThan.(*Int64Rules_Gt); ok { + return x.Gt + } + } + return 0 +} + +func (x *Int64Rules) GetGte() int64 { + if x != nil { + if x, ok := x.GreaterThan.(*Int64Rules_Gte); ok { + return x.Gte + } + } + return 0 +} + +func (x *Int64Rules) GetIn() []int64 { + if x != nil { + return x.In + } + return nil +} + +func (x *Int64Rules) GetNotIn() []int64 { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *Int64Rules) GetExample() []int64 { + if x != nil { + return x.Example + } + return nil +} + +type isInt64Rules_LessThan interface { + isInt64Rules_LessThan() +} + +type Int64Rules_Lt struct { + // `lt` requires the field value to be less than the specified value (field < + // value). If the field value is equal to or greater than the specified value, + // an error message is generated. + // + // ```proto + // + // message MyInt64 { + // // must be less than 10 + // int64 value = 1 [(buf.validate.field).int64.lt = 10]; + // } + // + // ``` + Lt int64 `protobuf:"varint,2,opt,name=lt,oneof"` +} + +type Int64Rules_Lte struct { + // `lte` requires the field value to be less than or equal to the specified + // value (field <= value). If the field value is greater than the specified + // value, an error message is generated. + // + // ```proto + // + // message MyInt64 { + // // must be less than or equal to 10 + // int64 value = 1 [(buf.validate.field).int64.lte = 10]; + // } + // + // ``` + Lte int64 `protobuf:"varint,3,opt,name=lte,oneof"` +} + +func (*Int64Rules_Lt) isInt64Rules_LessThan() {} + +func (*Int64Rules_Lte) isInt64Rules_LessThan() {} + +type isInt64Rules_GreaterThan interface { + isInt64Rules_GreaterThan() +} + +type Int64Rules_Gt struct { + // `gt` requires the field value to be greater than the specified value + // (exclusive). If the value of `gt` is larger than a specified `lt` or + // `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MyInt64 { + // // must be greater than 5 [int64.gt] + // int64 value = 1 [(buf.validate.field).int64.gt = 5]; + // + // // must be greater than 5 and less than 10 [int64.gt_lt] + // int64 other_value = 2 [(buf.validate.field).int64 = { gt: 5, lt: 10 }]; + // + // // must be greater than 10 or less than 5 [int64.gt_lt_exclusive] + // int64 another_value = 3 [(buf.validate.field).int64 = { gt: 10, lt: 5 }]; + // } + // + // ``` + Gt int64 `protobuf:"varint,4,opt,name=gt,oneof"` +} + +type Int64Rules_Gte struct { + // `gte` requires the field value to be greater than or equal to the specified + // value (exclusive). If the value of `gte` is larger than a specified `lt` + // or `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MyInt64 { + // // must be greater than or equal to 5 [int64.gte] + // int64 value = 1 [(buf.validate.field).int64.gte = 5]; + // + // // must be greater than or equal to 5 and less than 10 [int64.gte_lt] + // int64 other_value = 2 [(buf.validate.field).int64 = { gte: 5, lt: 10 }]; + // + // // must be greater than or equal to 10 or less than 5 [int64.gte_lt_exclusive] + // int64 another_value = 3 [(buf.validate.field).int64 = { gte: 10, lt: 5 }]; + // } + // + // ``` + Gte int64 `protobuf:"varint,5,opt,name=gte,oneof"` +} + +func (*Int64Rules_Gt) isInt64Rules_GreaterThan() {} + +func (*Int64Rules_Gte) isInt64Rules_GreaterThan() {} + +// UInt32Rules describes the rules applied to `uint32` values. These +// rules may also be applied to the `google.protobuf.UInt32Value` Well-Known-Type. +type UInt32Rules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `const` requires the field value to exactly match the specified value. If + // the field value doesn't match, an error message is generated. + // + // ```proto + // + // message MyUInt32 { + // // value must equal 42 + // uint32 value = 1 [(buf.validate.field).uint32.const = 42]; + // } + // + // ``` + Const *uint32 `protobuf:"varint,1,opt,name=const" json:"const,omitempty"` + // Types that are valid to be assigned to LessThan: + // + // *UInt32Rules_Lt + // *UInt32Rules_Lte + LessThan isUInt32Rules_LessThan `protobuf_oneof:"less_than"` + // Types that are valid to be assigned to GreaterThan: + // + // *UInt32Rules_Gt + // *UInt32Rules_Gte + GreaterThan isUInt32Rules_GreaterThan `protobuf_oneof:"greater_than"` + // `in` requires the field value to be equal to one of the specified values. + // If the field value isn't one of the specified values, an error message is + // generated. + // + // ```proto + // + // message MyUInt32 { + // // must be in list [1, 2, 3] + // uint32 value = 1 [(buf.validate.field).uint32 = { in: [1, 2, 3] }]; + // } + // + // ``` + In []uint32 `protobuf:"varint,6,rep,name=in" json:"in,omitempty"` + // `not_in` requires the field value to not be equal to any of the specified + // values. If the field value is one of the specified values, an error + // message is generated. + // + // ```proto + // + // message MyUInt32 { + // // value must not be in list [1, 2, 3] + // uint32 value = 1 [(buf.validate.field).uint32 = { not_in: [1, 2, 3] }]; + // } + // + // ``` + NotIn []uint32 `protobuf:"varint,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // `example` specifies values that the field may have. These values SHOULD + // conform to other rules. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // + // message MyUInt32 { + // uint32 value = 1 [ + // (buf.validate.field).uint32.example = 1, + // (buf.validate.field).uint32.example = 10 + // ]; + // } + // + // ``` + Example []uint32 `protobuf:"varint,8,rep,name=example" json:"example,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UInt32Rules) Reset() { + *x = UInt32Rules{} + mi := &file_buf_validate_validate_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UInt32Rules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UInt32Rules) ProtoMessage() {} + +func (x *UInt32Rules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UInt32Rules.ProtoReflect.Descriptor instead. +func (*UInt32Rules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{10} +} + +func (x *UInt32Rules) GetConst() uint32 { + if x != nil && x.Const != nil { + return *x.Const + } + return 0 +} + +func (x *UInt32Rules) GetLessThan() isUInt32Rules_LessThan { + if x != nil { + return x.LessThan + } + return nil +} + +func (x *UInt32Rules) GetLt() uint32 { + if x != nil { + if x, ok := x.LessThan.(*UInt32Rules_Lt); ok { + return x.Lt + } + } + return 0 +} + +func (x *UInt32Rules) GetLte() uint32 { + if x != nil { + if x, ok := x.LessThan.(*UInt32Rules_Lte); ok { + return x.Lte + } + } + return 0 +} + +func (x *UInt32Rules) GetGreaterThan() isUInt32Rules_GreaterThan { + if x != nil { + return x.GreaterThan + } + return nil +} + +func (x *UInt32Rules) GetGt() uint32 { + if x != nil { + if x, ok := x.GreaterThan.(*UInt32Rules_Gt); ok { + return x.Gt + } + } + return 0 +} + +func (x *UInt32Rules) GetGte() uint32 { + if x != nil { + if x, ok := x.GreaterThan.(*UInt32Rules_Gte); ok { + return x.Gte + } + } + return 0 +} + +func (x *UInt32Rules) GetIn() []uint32 { + if x != nil { + return x.In + } + return nil +} + +func (x *UInt32Rules) GetNotIn() []uint32 { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *UInt32Rules) GetExample() []uint32 { + if x != nil { + return x.Example + } + return nil +} + +type isUInt32Rules_LessThan interface { + isUInt32Rules_LessThan() +} + +type UInt32Rules_Lt struct { + // `lt` requires the field value to be less than the specified value (field < + // value). If the field value is equal to or greater than the specified value, + // an error message is generated. + // + // ```proto + // + // message MyUInt32 { + // // must be less than 10 + // uint32 value = 1 [(buf.validate.field).uint32.lt = 10]; + // } + // + // ``` + Lt uint32 `protobuf:"varint,2,opt,name=lt,oneof"` +} + +type UInt32Rules_Lte struct { + // `lte` requires the field value to be less than or equal to the specified + // value (field <= value). If the field value is greater than the specified + // value, an error message is generated. + // + // ```proto + // + // message MyUInt32 { + // // must be less than or equal to 10 + // uint32 value = 1 [(buf.validate.field).uint32.lte = 10]; + // } + // + // ``` + Lte uint32 `protobuf:"varint,3,opt,name=lte,oneof"` +} + +func (*UInt32Rules_Lt) isUInt32Rules_LessThan() {} + +func (*UInt32Rules_Lte) isUInt32Rules_LessThan() {} + +type isUInt32Rules_GreaterThan interface { + isUInt32Rules_GreaterThan() +} + +type UInt32Rules_Gt struct { + // `gt` requires the field value to be greater than the specified value + // (exclusive). If the value of `gt` is larger than a specified `lt` or + // `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MyUInt32 { + // // must be greater than 5 [uint32.gt] + // uint32 value = 1 [(buf.validate.field).uint32.gt = 5]; + // + // // must be greater than 5 and less than 10 [uint32.gt_lt] + // uint32 other_value = 2 [(buf.validate.field).uint32 = { gt: 5, lt: 10 }]; + // + // // must be greater than 10 or less than 5 [uint32.gt_lt_exclusive] + // uint32 another_value = 3 [(buf.validate.field).uint32 = { gt: 10, lt: 5 }]; + // } + // + // ``` + Gt uint32 `protobuf:"varint,4,opt,name=gt,oneof"` +} + +type UInt32Rules_Gte struct { + // `gte` requires the field value to be greater than or equal to the specified + // value (exclusive). If the value of `gte` is larger than a specified `lt` + // or `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MyUInt32 { + // // must be greater than or equal to 5 [uint32.gte] + // uint32 value = 1 [(buf.validate.field).uint32.gte = 5]; + // + // // must be greater than or equal to 5 and less than 10 [uint32.gte_lt] + // uint32 other_value = 2 [(buf.validate.field).uint32 = { gte: 5, lt: 10 }]; + // + // // must be greater than or equal to 10 or less than 5 [uint32.gte_lt_exclusive] + // uint32 another_value = 3 [(buf.validate.field).uint32 = { gte: 10, lt: 5 }]; + // } + // + // ``` + Gte uint32 `protobuf:"varint,5,opt,name=gte,oneof"` +} + +func (*UInt32Rules_Gt) isUInt32Rules_GreaterThan() {} + +func (*UInt32Rules_Gte) isUInt32Rules_GreaterThan() {} + +// UInt64Rules describes the rules applied to `uint64` values. These +// rules may also be applied to the `google.protobuf.UInt64Value` Well-Known-Type. +type UInt64Rules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `const` requires the field value to exactly match the specified value. If + // the field value doesn't match, an error message is generated. + // + // ```proto + // + // message MyUInt64 { + // // value must equal 42 + // uint64 value = 1 [(buf.validate.field).uint64.const = 42]; + // } + // + // ``` + Const *uint64 `protobuf:"varint,1,opt,name=const" json:"const,omitempty"` + // Types that are valid to be assigned to LessThan: + // + // *UInt64Rules_Lt + // *UInt64Rules_Lte + LessThan isUInt64Rules_LessThan `protobuf_oneof:"less_than"` + // Types that are valid to be assigned to GreaterThan: + // + // *UInt64Rules_Gt + // *UInt64Rules_Gte + GreaterThan isUInt64Rules_GreaterThan `protobuf_oneof:"greater_than"` + // `in` requires the field value to be equal to one of the specified values. + // If the field value isn't one of the specified values, an error message is + // generated. + // + // ```proto + // + // message MyUInt64 { + // // must be in list [1, 2, 3] + // uint64 value = 1 [(buf.validate.field).uint64 = { in: [1, 2, 3] }]; + // } + // + // ``` + In []uint64 `protobuf:"varint,6,rep,name=in" json:"in,omitempty"` + // `not_in` requires the field value to not be equal to any of the specified + // values. If the field value is one of the specified values, an error + // message is generated. + // + // ```proto + // + // message MyUInt64 { + // // value must not be in list [1, 2, 3] + // uint64 value = 1 [(buf.validate.field).uint64 = { not_in: [1, 2, 3] }]; + // } + // + // ``` + NotIn []uint64 `protobuf:"varint,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // `example` specifies values that the field may have. These values SHOULD + // conform to other rules. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // + // message MyUInt64 { + // uint64 value = 1 [ + // (buf.validate.field).uint64.example = 1, + // (buf.validate.field).uint64.example = -10 + // ]; + // } + // + // ``` + Example []uint64 `protobuf:"varint,8,rep,name=example" json:"example,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UInt64Rules) Reset() { + *x = UInt64Rules{} + mi := &file_buf_validate_validate_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UInt64Rules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UInt64Rules) ProtoMessage() {} + +func (x *UInt64Rules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UInt64Rules.ProtoReflect.Descriptor instead. +func (*UInt64Rules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{11} +} + +func (x *UInt64Rules) GetConst() uint64 { + if x != nil && x.Const != nil { + return *x.Const + } + return 0 +} + +func (x *UInt64Rules) GetLessThan() isUInt64Rules_LessThan { + if x != nil { + return x.LessThan + } + return nil +} + +func (x *UInt64Rules) GetLt() uint64 { + if x != nil { + if x, ok := x.LessThan.(*UInt64Rules_Lt); ok { + return x.Lt + } + } + return 0 +} + +func (x *UInt64Rules) GetLte() uint64 { + if x != nil { + if x, ok := x.LessThan.(*UInt64Rules_Lte); ok { + return x.Lte + } + } + return 0 +} + +func (x *UInt64Rules) GetGreaterThan() isUInt64Rules_GreaterThan { + if x != nil { + return x.GreaterThan + } + return nil +} + +func (x *UInt64Rules) GetGt() uint64 { + if x != nil { + if x, ok := x.GreaterThan.(*UInt64Rules_Gt); ok { + return x.Gt + } + } + return 0 +} + +func (x *UInt64Rules) GetGte() uint64 { + if x != nil { + if x, ok := x.GreaterThan.(*UInt64Rules_Gte); ok { + return x.Gte + } + } + return 0 +} + +func (x *UInt64Rules) GetIn() []uint64 { + if x != nil { + return x.In + } + return nil +} + +func (x *UInt64Rules) GetNotIn() []uint64 { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *UInt64Rules) GetExample() []uint64 { + if x != nil { + return x.Example + } + return nil +} + +type isUInt64Rules_LessThan interface { + isUInt64Rules_LessThan() +} + +type UInt64Rules_Lt struct { + // `lt` requires the field value to be less than the specified value (field < + // value). If the field value is equal to or greater than the specified value, + // an error message is generated. + // + // ```proto + // + // message MyUInt64 { + // // must be less than 10 + // uint64 value = 1 [(buf.validate.field).uint64.lt = 10]; + // } + // + // ``` + Lt uint64 `protobuf:"varint,2,opt,name=lt,oneof"` +} + +type UInt64Rules_Lte struct { + // `lte` requires the field value to be less than or equal to the specified + // value (field <= value). If the field value is greater than the specified + // value, an error message is generated. + // + // ```proto + // + // message MyUInt64 { + // // must be less than or equal to 10 + // uint64 value = 1 [(buf.validate.field).uint64.lte = 10]; + // } + // + // ``` + Lte uint64 `protobuf:"varint,3,opt,name=lte,oneof"` +} + +func (*UInt64Rules_Lt) isUInt64Rules_LessThan() {} + +func (*UInt64Rules_Lte) isUInt64Rules_LessThan() {} + +type isUInt64Rules_GreaterThan interface { + isUInt64Rules_GreaterThan() +} + +type UInt64Rules_Gt struct { + // `gt` requires the field value to be greater than the specified value + // (exclusive). If the value of `gt` is larger than a specified `lt` or + // `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MyUInt64 { + // // must be greater than 5 [uint64.gt] + // uint64 value = 1 [(buf.validate.field).uint64.gt = 5]; + // + // // must be greater than 5 and less than 10 [uint64.gt_lt] + // uint64 other_value = 2 [(buf.validate.field).uint64 = { gt: 5, lt: 10 }]; + // + // // must be greater than 10 or less than 5 [uint64.gt_lt_exclusive] + // uint64 another_value = 3 [(buf.validate.field).uint64 = { gt: 10, lt: 5 }]; + // } + // + // ``` + Gt uint64 `protobuf:"varint,4,opt,name=gt,oneof"` +} + +type UInt64Rules_Gte struct { + // `gte` requires the field value to be greater than or equal to the specified + // value (exclusive). If the value of `gte` is larger than a specified `lt` + // or `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MyUInt64 { + // // must be greater than or equal to 5 [uint64.gte] + // uint64 value = 1 [(buf.validate.field).uint64.gte = 5]; + // + // // must be greater than or equal to 5 and less than 10 [uint64.gte_lt] + // uint64 other_value = 2 [(buf.validate.field).uint64 = { gte: 5, lt: 10 }]; + // + // // must be greater than or equal to 10 or less than 5 [uint64.gte_lt_exclusive] + // uint64 another_value = 3 [(buf.validate.field).uint64 = { gte: 10, lt: 5 }]; + // } + // + // ``` + Gte uint64 `protobuf:"varint,5,opt,name=gte,oneof"` +} + +func (*UInt64Rules_Gt) isUInt64Rules_GreaterThan() {} + +func (*UInt64Rules_Gte) isUInt64Rules_GreaterThan() {} + +// SInt32Rules describes the rules applied to `sint32` values. +type SInt32Rules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `const` requires the field value to exactly match the specified value. If + // the field value doesn't match, an error message is generated. + // + // ```proto + // + // message MySInt32 { + // // value must equal 42 + // sint32 value = 1 [(buf.validate.field).sint32.const = 42]; + // } + // + // ``` + Const *int32 `protobuf:"zigzag32,1,opt,name=const" json:"const,omitempty"` + // Types that are valid to be assigned to LessThan: + // + // *SInt32Rules_Lt + // *SInt32Rules_Lte + LessThan isSInt32Rules_LessThan `protobuf_oneof:"less_than"` + // Types that are valid to be assigned to GreaterThan: + // + // *SInt32Rules_Gt + // *SInt32Rules_Gte + GreaterThan isSInt32Rules_GreaterThan `protobuf_oneof:"greater_than"` + // `in` requires the field value to be equal to one of the specified values. + // If the field value isn't one of the specified values, an error message is + // generated. + // + // ```proto + // + // message MySInt32 { + // // must be in list [1, 2, 3] + // sint32 value = 1 [(buf.validate.field).sint32 = { in: [1, 2, 3] }]; + // } + // + // ``` + In []int32 `protobuf:"zigzag32,6,rep,name=in" json:"in,omitempty"` + // `not_in` requires the field value to not be equal to any of the specified + // values. If the field value is one of the specified values, an error + // message is generated. + // + // ```proto + // + // message MySInt32 { + // // value must not be in list [1, 2, 3] + // sint32 value = 1 [(buf.validate.field).sint32 = { not_in: [1, 2, 3] }]; + // } + // + // ``` + NotIn []int32 `protobuf:"zigzag32,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // `example` specifies values that the field may have. These values SHOULD + // conform to other rules. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // + // message MySInt32 { + // sint32 value = 1 [ + // (buf.validate.field).sint32.example = 1, + // (buf.validate.field).sint32.example = -10 + // ]; + // } + // + // ``` + Example []int32 `protobuf:"zigzag32,8,rep,name=example" json:"example,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SInt32Rules) Reset() { + *x = SInt32Rules{} + mi := &file_buf_validate_validate_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SInt32Rules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SInt32Rules) ProtoMessage() {} + +func (x *SInt32Rules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SInt32Rules.ProtoReflect.Descriptor instead. +func (*SInt32Rules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{12} +} + +func (x *SInt32Rules) GetConst() int32 { + if x != nil && x.Const != nil { + return *x.Const + } + return 0 +} + +func (x *SInt32Rules) GetLessThan() isSInt32Rules_LessThan { + if x != nil { + return x.LessThan + } + return nil +} + +func (x *SInt32Rules) GetLt() int32 { + if x != nil { + if x, ok := x.LessThan.(*SInt32Rules_Lt); ok { + return x.Lt + } + } + return 0 +} + +func (x *SInt32Rules) GetLte() int32 { + if x != nil { + if x, ok := x.LessThan.(*SInt32Rules_Lte); ok { + return x.Lte + } + } + return 0 +} + +func (x *SInt32Rules) GetGreaterThan() isSInt32Rules_GreaterThan { + if x != nil { + return x.GreaterThan + } + return nil +} + +func (x *SInt32Rules) GetGt() int32 { + if x != nil { + if x, ok := x.GreaterThan.(*SInt32Rules_Gt); ok { + return x.Gt + } + } + return 0 +} + +func (x *SInt32Rules) GetGte() int32 { + if x != nil { + if x, ok := x.GreaterThan.(*SInt32Rules_Gte); ok { + return x.Gte + } + } + return 0 +} + +func (x *SInt32Rules) GetIn() []int32 { + if x != nil { + return x.In + } + return nil +} + +func (x *SInt32Rules) GetNotIn() []int32 { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *SInt32Rules) GetExample() []int32 { + if x != nil { + return x.Example + } + return nil +} + +type isSInt32Rules_LessThan interface { + isSInt32Rules_LessThan() +} + +type SInt32Rules_Lt struct { + // `lt` requires the field value to be less than the specified value (field + // < value). If the field value is equal to or greater than the specified + // value, an error message is generated. + // + // ```proto + // + // message MySInt32 { + // // must be less than 10 + // sint32 value = 1 [(buf.validate.field).sint32.lt = 10]; + // } + // + // ``` + Lt int32 `protobuf:"zigzag32,2,opt,name=lt,oneof"` +} + +type SInt32Rules_Lte struct { + // `lte` requires the field value to be less than or equal to the specified + // value (field <= value). If the field value is greater than the specified + // value, an error message is generated. + // + // ```proto + // + // message MySInt32 { + // // must be less than or equal to 10 + // sint32 value = 1 [(buf.validate.field).sint32.lte = 10]; + // } + // + // ``` + Lte int32 `protobuf:"zigzag32,3,opt,name=lte,oneof"` +} + +func (*SInt32Rules_Lt) isSInt32Rules_LessThan() {} + +func (*SInt32Rules_Lte) isSInt32Rules_LessThan() {} + +type isSInt32Rules_GreaterThan interface { + isSInt32Rules_GreaterThan() +} + +type SInt32Rules_Gt struct { + // `gt` requires the field value to be greater than the specified value + // (exclusive). If the value of `gt` is larger than a specified `lt` or + // `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MySInt32 { + // // must be greater than 5 [sint32.gt] + // sint32 value = 1 [(buf.validate.field).sint32.gt = 5]; + // + // // must be greater than 5 and less than 10 [sint32.gt_lt] + // sint32 other_value = 2 [(buf.validate.field).sint32 = { gt: 5, lt: 10 }]; + // + // // must be greater than 10 or less than 5 [sint32.gt_lt_exclusive] + // sint32 another_value = 3 [(buf.validate.field).sint32 = { gt: 10, lt: 5 }]; + // } + // + // ``` + Gt int32 `protobuf:"zigzag32,4,opt,name=gt,oneof"` +} + +type SInt32Rules_Gte struct { + // `gte` requires the field value to be greater than or equal to the specified + // value (exclusive). If the value of `gte` is larger than a specified `lt` + // or `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MySInt32 { + // // must be greater than or equal to 5 [sint32.gte] + // sint32 value = 1 [(buf.validate.field).sint32.gte = 5]; + // + // // must be greater than or equal to 5 and less than 10 [sint32.gte_lt] + // sint32 other_value = 2 [(buf.validate.field).sint32 = { gte: 5, lt: 10 }]; + // + // // must be greater than or equal to 10 or less than 5 [sint32.gte_lt_exclusive] + // sint32 another_value = 3 [(buf.validate.field).sint32 = { gte: 10, lt: 5 }]; + // } + // + // ``` + Gte int32 `protobuf:"zigzag32,5,opt,name=gte,oneof"` +} + +func (*SInt32Rules_Gt) isSInt32Rules_GreaterThan() {} + +func (*SInt32Rules_Gte) isSInt32Rules_GreaterThan() {} + +// SInt64Rules describes the rules applied to `sint64` values. +type SInt64Rules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `const` requires the field value to exactly match the specified value. If + // the field value doesn't match, an error message is generated. + // + // ```proto + // + // message MySInt64 { + // // value must equal 42 + // sint64 value = 1 [(buf.validate.field).sint64.const = 42]; + // } + // + // ``` + Const *int64 `protobuf:"zigzag64,1,opt,name=const" json:"const,omitempty"` + // Types that are valid to be assigned to LessThan: + // + // *SInt64Rules_Lt + // *SInt64Rules_Lte + LessThan isSInt64Rules_LessThan `protobuf_oneof:"less_than"` + // Types that are valid to be assigned to GreaterThan: + // + // *SInt64Rules_Gt + // *SInt64Rules_Gte + GreaterThan isSInt64Rules_GreaterThan `protobuf_oneof:"greater_than"` + // `in` requires the field value to be equal to one of the specified values. + // If the field value isn't one of the specified values, an error message + // is generated. + // + // ```proto + // + // message MySInt64 { + // // must be in list [1, 2, 3] + // sint64 value = 1 [(buf.validate.field).sint64 = { in: [1, 2, 3] }]; + // } + // + // ``` + In []int64 `protobuf:"zigzag64,6,rep,name=in" json:"in,omitempty"` + // `not_in` requires the field value to not be equal to any of the specified + // values. If the field value is one of the specified values, an error + // message is generated. + // + // ```proto + // + // message MySInt64 { + // // value must not be in list [1, 2, 3] + // sint64 value = 1 [(buf.validate.field).sint64 = { not_in: [1, 2, 3] }]; + // } + // + // ``` + NotIn []int64 `protobuf:"zigzag64,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // `example` specifies values that the field may have. These values SHOULD + // conform to other rules. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // + // message MySInt64 { + // sint64 value = 1 [ + // (buf.validate.field).sint64.example = 1, + // (buf.validate.field).sint64.example = -10 + // ]; + // } + // + // ``` + Example []int64 `protobuf:"zigzag64,8,rep,name=example" json:"example,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SInt64Rules) Reset() { + *x = SInt64Rules{} + mi := &file_buf_validate_validate_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SInt64Rules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SInt64Rules) ProtoMessage() {} + +func (x *SInt64Rules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SInt64Rules.ProtoReflect.Descriptor instead. +func (*SInt64Rules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{13} +} + +func (x *SInt64Rules) GetConst() int64 { + if x != nil && x.Const != nil { + return *x.Const + } + return 0 +} + +func (x *SInt64Rules) GetLessThan() isSInt64Rules_LessThan { + if x != nil { + return x.LessThan + } + return nil +} + +func (x *SInt64Rules) GetLt() int64 { + if x != nil { + if x, ok := x.LessThan.(*SInt64Rules_Lt); ok { + return x.Lt + } + } + return 0 +} + +func (x *SInt64Rules) GetLte() int64 { + if x != nil { + if x, ok := x.LessThan.(*SInt64Rules_Lte); ok { + return x.Lte + } + } + return 0 +} + +func (x *SInt64Rules) GetGreaterThan() isSInt64Rules_GreaterThan { + if x != nil { + return x.GreaterThan + } + return nil +} + +func (x *SInt64Rules) GetGt() int64 { + if x != nil { + if x, ok := x.GreaterThan.(*SInt64Rules_Gt); ok { + return x.Gt + } + } + return 0 +} + +func (x *SInt64Rules) GetGte() int64 { + if x != nil { + if x, ok := x.GreaterThan.(*SInt64Rules_Gte); ok { + return x.Gte + } + } + return 0 +} + +func (x *SInt64Rules) GetIn() []int64 { + if x != nil { + return x.In + } + return nil +} + +func (x *SInt64Rules) GetNotIn() []int64 { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *SInt64Rules) GetExample() []int64 { + if x != nil { + return x.Example + } + return nil +} + +type isSInt64Rules_LessThan interface { + isSInt64Rules_LessThan() +} + +type SInt64Rules_Lt struct { + // `lt` requires the field value to be less than the specified value (field + // < value). If the field value is equal to or greater than the specified + // value, an error message is generated. + // + // ```proto + // + // message MySInt64 { + // // must be less than 10 + // sint64 value = 1 [(buf.validate.field).sint64.lt = 10]; + // } + // + // ``` + Lt int64 `protobuf:"zigzag64,2,opt,name=lt,oneof"` +} + +type SInt64Rules_Lte struct { + // `lte` requires the field value to be less than or equal to the specified + // value (field <= value). If the field value is greater than the specified + // value, an error message is generated. + // + // ```proto + // + // message MySInt64 { + // // must be less than or equal to 10 + // sint64 value = 1 [(buf.validate.field).sint64.lte = 10]; + // } + // + // ``` + Lte int64 `protobuf:"zigzag64,3,opt,name=lte,oneof"` +} + +func (*SInt64Rules_Lt) isSInt64Rules_LessThan() {} + +func (*SInt64Rules_Lte) isSInt64Rules_LessThan() {} + +type isSInt64Rules_GreaterThan interface { + isSInt64Rules_GreaterThan() +} + +type SInt64Rules_Gt struct { + // `gt` requires the field value to be greater than the specified value + // (exclusive). If the value of `gt` is larger than a specified `lt` or + // `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MySInt64 { + // // must be greater than 5 [sint64.gt] + // sint64 value = 1 [(buf.validate.field).sint64.gt = 5]; + // + // // must be greater than 5 and less than 10 [sint64.gt_lt] + // sint64 other_value = 2 [(buf.validate.field).sint64 = { gt: 5, lt: 10 }]; + // + // // must be greater than 10 or less than 5 [sint64.gt_lt_exclusive] + // sint64 another_value = 3 [(buf.validate.field).sint64 = { gt: 10, lt: 5 }]; + // } + // + // ``` + Gt int64 `protobuf:"zigzag64,4,opt,name=gt,oneof"` +} + +type SInt64Rules_Gte struct { + // `gte` requires the field value to be greater than or equal to the specified + // value (exclusive). If the value of `gte` is larger than a specified `lt` + // or `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MySInt64 { + // // must be greater than or equal to 5 [sint64.gte] + // sint64 value = 1 [(buf.validate.field).sint64.gte = 5]; + // + // // must be greater than or equal to 5 and less than 10 [sint64.gte_lt] + // sint64 other_value = 2 [(buf.validate.field).sint64 = { gte: 5, lt: 10 }]; + // + // // must be greater than or equal to 10 or less than 5 [sint64.gte_lt_exclusive] + // sint64 another_value = 3 [(buf.validate.field).sint64 = { gte: 10, lt: 5 }]; + // } + // + // ``` + Gte int64 `protobuf:"zigzag64,5,opt,name=gte,oneof"` +} + +func (*SInt64Rules_Gt) isSInt64Rules_GreaterThan() {} + +func (*SInt64Rules_Gte) isSInt64Rules_GreaterThan() {} + +// Fixed32Rules describes the rules applied to `fixed32` values. +type Fixed32Rules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `const` requires the field value to exactly match the specified value. + // If the field value doesn't match, an error message is generated. + // + // ```proto + // + // message MyFixed32 { + // // value must equal 42 + // fixed32 value = 1 [(buf.validate.field).fixed32.const = 42]; + // } + // + // ``` + Const *uint32 `protobuf:"fixed32,1,opt,name=const" json:"const,omitempty"` + // Types that are valid to be assigned to LessThan: + // + // *Fixed32Rules_Lt + // *Fixed32Rules_Lte + LessThan isFixed32Rules_LessThan `protobuf_oneof:"less_than"` + // Types that are valid to be assigned to GreaterThan: + // + // *Fixed32Rules_Gt + // *Fixed32Rules_Gte + GreaterThan isFixed32Rules_GreaterThan `protobuf_oneof:"greater_than"` + // `in` requires the field value to be equal to one of the specified values. + // If the field value isn't one of the specified values, an error message + // is generated. + // + // ```proto + // + // message MyFixed32 { + // // must be in list [1, 2, 3] + // fixed32 value = 1 [(buf.validate.field).fixed32 = { in: [1, 2, 3] }]; + // } + // + // ``` + In []uint32 `protobuf:"fixed32,6,rep,name=in" json:"in,omitempty"` + // `not_in` requires the field value to not be equal to any of the specified + // values. If the field value is one of the specified values, an error + // message is generated. + // + // ```proto + // + // message MyFixed32 { + // // value must not be in list [1, 2, 3] + // fixed32 value = 1 [(buf.validate.field).fixed32 = { not_in: [1, 2, 3] }]; + // } + // + // ``` + NotIn []uint32 `protobuf:"fixed32,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // `example` specifies values that the field may have. These values SHOULD + // conform to other rules. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // + // message MyFixed32 { + // fixed32 value = 1 [ + // (buf.validate.field).fixed32.example = 1, + // (buf.validate.field).fixed32.example = 2 + // ]; + // } + // + // ``` + Example []uint32 `protobuf:"fixed32,8,rep,name=example" json:"example,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Fixed32Rules) Reset() { + *x = Fixed32Rules{} + mi := &file_buf_validate_validate_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Fixed32Rules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Fixed32Rules) ProtoMessage() {} + +func (x *Fixed32Rules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Fixed32Rules.ProtoReflect.Descriptor instead. +func (*Fixed32Rules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{14} +} + +func (x *Fixed32Rules) GetConst() uint32 { + if x != nil && x.Const != nil { + return *x.Const + } + return 0 +} + +func (x *Fixed32Rules) GetLessThan() isFixed32Rules_LessThan { + if x != nil { + return x.LessThan + } + return nil +} + +func (x *Fixed32Rules) GetLt() uint32 { + if x != nil { + if x, ok := x.LessThan.(*Fixed32Rules_Lt); ok { + return x.Lt + } + } + return 0 +} + +func (x *Fixed32Rules) GetLte() uint32 { + if x != nil { + if x, ok := x.LessThan.(*Fixed32Rules_Lte); ok { + return x.Lte + } + } + return 0 +} + +func (x *Fixed32Rules) GetGreaterThan() isFixed32Rules_GreaterThan { + if x != nil { + return x.GreaterThan + } + return nil +} + +func (x *Fixed32Rules) GetGt() uint32 { + if x != nil { + if x, ok := x.GreaterThan.(*Fixed32Rules_Gt); ok { + return x.Gt + } + } + return 0 +} + +func (x *Fixed32Rules) GetGte() uint32 { + if x != nil { + if x, ok := x.GreaterThan.(*Fixed32Rules_Gte); ok { + return x.Gte + } + } + return 0 +} + +func (x *Fixed32Rules) GetIn() []uint32 { + if x != nil { + return x.In + } + return nil +} + +func (x *Fixed32Rules) GetNotIn() []uint32 { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *Fixed32Rules) GetExample() []uint32 { + if x != nil { + return x.Example + } + return nil +} + +type isFixed32Rules_LessThan interface { + isFixed32Rules_LessThan() +} + +type Fixed32Rules_Lt struct { + // `lt` requires the field value to be less than the specified value (field < + // value). If the field value is equal to or greater than the specified value, + // an error message is generated. + // + // ```proto + // + // message MyFixed32 { + // // must be less than 10 + // fixed32 value = 1 [(buf.validate.field).fixed32.lt = 10]; + // } + // + // ``` + Lt uint32 `protobuf:"fixed32,2,opt,name=lt,oneof"` +} + +type Fixed32Rules_Lte struct { + // `lte` requires the field value to be less than or equal to the specified + // value (field <= value). If the field value is greater than the specified + // value, an error message is generated. + // + // ```proto + // + // message MyFixed32 { + // // must be less than or equal to 10 + // fixed32 value = 1 [(buf.validate.field).fixed32.lte = 10]; + // } + // + // ``` + Lte uint32 `protobuf:"fixed32,3,opt,name=lte,oneof"` +} + +func (*Fixed32Rules_Lt) isFixed32Rules_LessThan() {} + +func (*Fixed32Rules_Lte) isFixed32Rules_LessThan() {} + +type isFixed32Rules_GreaterThan interface { + isFixed32Rules_GreaterThan() +} + +type Fixed32Rules_Gt struct { + // `gt` requires the field value to be greater than the specified value + // (exclusive). If the value of `gt` is larger than a specified `lt` or + // `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MyFixed32 { + // // must be greater than 5 [fixed32.gt] + // fixed32 value = 1 [(buf.validate.field).fixed32.gt = 5]; + // + // // must be greater than 5 and less than 10 [fixed32.gt_lt] + // fixed32 other_value = 2 [(buf.validate.field).fixed32 = { gt: 5, lt: 10 }]; + // + // // must be greater than 10 or less than 5 [fixed32.gt_lt_exclusive] + // fixed32 another_value = 3 [(buf.validate.field).fixed32 = { gt: 10, lt: 5 }]; + // } + // + // ``` + Gt uint32 `protobuf:"fixed32,4,opt,name=gt,oneof"` +} + +type Fixed32Rules_Gte struct { + // `gte` requires the field value to be greater than or equal to the specified + // value (exclusive). If the value of `gte` is larger than a specified `lt` + // or `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MyFixed32 { + // // must be greater than or equal to 5 [fixed32.gte] + // fixed32 value = 1 [(buf.validate.field).fixed32.gte = 5]; + // + // // must be greater than or equal to 5 and less than 10 [fixed32.gte_lt] + // fixed32 other_value = 2 [(buf.validate.field).fixed32 = { gte: 5, lt: 10 }]; + // + // // must be greater than or equal to 10 or less than 5 [fixed32.gte_lt_exclusive] + // fixed32 another_value = 3 [(buf.validate.field).fixed32 = { gte: 10, lt: 5 }]; + // } + // + // ``` + Gte uint32 `protobuf:"fixed32,5,opt,name=gte,oneof"` +} + +func (*Fixed32Rules_Gt) isFixed32Rules_GreaterThan() {} + +func (*Fixed32Rules_Gte) isFixed32Rules_GreaterThan() {} + +// Fixed64Rules describes the rules applied to `fixed64` values. +type Fixed64Rules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `const` requires the field value to exactly match the specified value. If + // the field value doesn't match, an error message is generated. + // + // ```proto + // + // message MyFixed64 { + // // value must equal 42 + // fixed64 value = 1 [(buf.validate.field).fixed64.const = 42]; + // } + // + // ``` + Const *uint64 `protobuf:"fixed64,1,opt,name=const" json:"const,omitempty"` + // Types that are valid to be assigned to LessThan: + // + // *Fixed64Rules_Lt + // *Fixed64Rules_Lte + LessThan isFixed64Rules_LessThan `protobuf_oneof:"less_than"` + // Types that are valid to be assigned to GreaterThan: + // + // *Fixed64Rules_Gt + // *Fixed64Rules_Gte + GreaterThan isFixed64Rules_GreaterThan `protobuf_oneof:"greater_than"` + // `in` requires the field value to be equal to one of the specified values. + // If the field value isn't one of the specified values, an error message is + // generated. + // + // ```proto + // + // message MyFixed64 { + // // must be in list [1, 2, 3] + // fixed64 value = 1 [(buf.validate.field).fixed64 = { in: [1, 2, 3] }]; + // } + // + // ``` + In []uint64 `protobuf:"fixed64,6,rep,name=in" json:"in,omitempty"` + // `not_in` requires the field value to not be equal to any of the specified + // values. If the field value is one of the specified values, an error + // message is generated. + // + // ```proto + // + // message MyFixed64 { + // // value must not be in list [1, 2, 3] + // fixed64 value = 1 [(buf.validate.field).fixed64 = { not_in: [1, 2, 3] }]; + // } + // + // ``` + NotIn []uint64 `protobuf:"fixed64,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // `example` specifies values that the field may have. These values SHOULD + // conform to other rules. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // + // message MyFixed64 { + // fixed64 value = 1 [ + // (buf.validate.field).fixed64.example = 1, + // (buf.validate.field).fixed64.example = 2 + // ]; + // } + // + // ``` + Example []uint64 `protobuf:"fixed64,8,rep,name=example" json:"example,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Fixed64Rules) Reset() { + *x = Fixed64Rules{} + mi := &file_buf_validate_validate_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Fixed64Rules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Fixed64Rules) ProtoMessage() {} + +func (x *Fixed64Rules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Fixed64Rules.ProtoReflect.Descriptor instead. +func (*Fixed64Rules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{15} +} + +func (x *Fixed64Rules) GetConst() uint64 { + if x != nil && x.Const != nil { + return *x.Const + } + return 0 +} + +func (x *Fixed64Rules) GetLessThan() isFixed64Rules_LessThan { + if x != nil { + return x.LessThan + } + return nil +} + +func (x *Fixed64Rules) GetLt() uint64 { + if x != nil { + if x, ok := x.LessThan.(*Fixed64Rules_Lt); ok { + return x.Lt + } + } + return 0 +} + +func (x *Fixed64Rules) GetLte() uint64 { + if x != nil { + if x, ok := x.LessThan.(*Fixed64Rules_Lte); ok { + return x.Lte + } + } + return 0 +} + +func (x *Fixed64Rules) GetGreaterThan() isFixed64Rules_GreaterThan { + if x != nil { + return x.GreaterThan + } + return nil +} + +func (x *Fixed64Rules) GetGt() uint64 { + if x != nil { + if x, ok := x.GreaterThan.(*Fixed64Rules_Gt); ok { + return x.Gt + } + } + return 0 +} + +func (x *Fixed64Rules) GetGte() uint64 { + if x != nil { + if x, ok := x.GreaterThan.(*Fixed64Rules_Gte); ok { + return x.Gte + } + } + return 0 +} + +func (x *Fixed64Rules) GetIn() []uint64 { + if x != nil { + return x.In + } + return nil +} + +func (x *Fixed64Rules) GetNotIn() []uint64 { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *Fixed64Rules) GetExample() []uint64 { + if x != nil { + return x.Example + } + return nil +} + +type isFixed64Rules_LessThan interface { + isFixed64Rules_LessThan() +} + +type Fixed64Rules_Lt struct { + // `lt` requires the field value to be less than the specified value (field < + // value). If the field value is equal to or greater than the specified value, + // an error message is generated. + // + // ```proto + // + // message MyFixed64 { + // // must be less than 10 + // fixed64 value = 1 [(buf.validate.field).fixed64.lt = 10]; + // } + // + // ``` + Lt uint64 `protobuf:"fixed64,2,opt,name=lt,oneof"` +} + +type Fixed64Rules_Lte struct { + // `lte` requires the field value to be less than or equal to the specified + // value (field <= value). If the field value is greater than the specified + // value, an error message is generated. + // + // ```proto + // + // message MyFixed64 { + // // must be less than or equal to 10 + // fixed64 value = 1 [(buf.validate.field).fixed64.lte = 10]; + // } + // + // ``` + Lte uint64 `protobuf:"fixed64,3,opt,name=lte,oneof"` +} + +func (*Fixed64Rules_Lt) isFixed64Rules_LessThan() {} + +func (*Fixed64Rules_Lte) isFixed64Rules_LessThan() {} + +type isFixed64Rules_GreaterThan interface { + isFixed64Rules_GreaterThan() +} + +type Fixed64Rules_Gt struct { + // `gt` requires the field value to be greater than the specified value + // (exclusive). If the value of `gt` is larger than a specified `lt` or + // `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MyFixed64 { + // // must be greater than 5 [fixed64.gt] + // fixed64 value = 1 [(buf.validate.field).fixed64.gt = 5]; + // + // // must be greater than 5 and less than 10 [fixed64.gt_lt] + // fixed64 other_value = 2 [(buf.validate.field).fixed64 = { gt: 5, lt: 10 }]; + // + // // must be greater than 10 or less than 5 [fixed64.gt_lt_exclusive] + // fixed64 another_value = 3 [(buf.validate.field).fixed64 = { gt: 10, lt: 5 }]; + // } + // + // ``` + Gt uint64 `protobuf:"fixed64,4,opt,name=gt,oneof"` +} + +type Fixed64Rules_Gte struct { + // `gte` requires the field value to be greater than or equal to the specified + // value (exclusive). If the value of `gte` is larger than a specified `lt` + // or `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MyFixed64 { + // // must be greater than or equal to 5 [fixed64.gte] + // fixed64 value = 1 [(buf.validate.field).fixed64.gte = 5]; + // + // // must be greater than or equal to 5 and less than 10 [fixed64.gte_lt] + // fixed64 other_value = 2 [(buf.validate.field).fixed64 = { gte: 5, lt: 10 }]; + // + // // must be greater than or equal to 10 or less than 5 [fixed64.gte_lt_exclusive] + // fixed64 another_value = 3 [(buf.validate.field).fixed64 = { gte: 10, lt: 5 }]; + // } + // + // ``` + Gte uint64 `protobuf:"fixed64,5,opt,name=gte,oneof"` +} + +func (*Fixed64Rules_Gt) isFixed64Rules_GreaterThan() {} + +func (*Fixed64Rules_Gte) isFixed64Rules_GreaterThan() {} + +// SFixed32Rules describes the rules applied to `fixed32` values. +type SFixed32Rules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `const` requires the field value to exactly match the specified value. If + // the field value doesn't match, an error message is generated. + // + // ```proto + // + // message MySFixed32 { + // // value must equal 42 + // sfixed32 value = 1 [(buf.validate.field).sfixed32.const = 42]; + // } + // + // ``` + Const *int32 `protobuf:"fixed32,1,opt,name=const" json:"const,omitempty"` + // Types that are valid to be assigned to LessThan: + // + // *SFixed32Rules_Lt + // *SFixed32Rules_Lte + LessThan isSFixed32Rules_LessThan `protobuf_oneof:"less_than"` + // Types that are valid to be assigned to GreaterThan: + // + // *SFixed32Rules_Gt + // *SFixed32Rules_Gte + GreaterThan isSFixed32Rules_GreaterThan `protobuf_oneof:"greater_than"` + // `in` requires the field value to be equal to one of the specified values. + // If the field value isn't one of the specified values, an error message is + // generated. + // + // ```proto + // + // message MySFixed32 { + // // must be in list [1, 2, 3] + // sfixed32 value = 1 [(buf.validate.field).sfixed32 = { in: [1, 2, 3] }]; + // } + // + // ``` + In []int32 `protobuf:"fixed32,6,rep,name=in" json:"in,omitempty"` + // `not_in` requires the field value to not be equal to any of the specified + // values. If the field value is one of the specified values, an error + // message is generated. + // + // ```proto + // + // message MySFixed32 { + // // value must not be in list [1, 2, 3] + // sfixed32 value = 1 [(buf.validate.field).sfixed32 = { not_in: [1, 2, 3] }]; + // } + // + // ``` + NotIn []int32 `protobuf:"fixed32,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // `example` specifies values that the field may have. These values SHOULD + // conform to other rules. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // + // message MySFixed32 { + // sfixed32 value = 1 [ + // (buf.validate.field).sfixed32.example = 1, + // (buf.validate.field).sfixed32.example = 2 + // ]; + // } + // + // ``` + Example []int32 `protobuf:"fixed32,8,rep,name=example" json:"example,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SFixed32Rules) Reset() { + *x = SFixed32Rules{} + mi := &file_buf_validate_validate_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SFixed32Rules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SFixed32Rules) ProtoMessage() {} + +func (x *SFixed32Rules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[16] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SFixed32Rules.ProtoReflect.Descriptor instead. +func (*SFixed32Rules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{16} +} + +func (x *SFixed32Rules) GetConst() int32 { + if x != nil && x.Const != nil { + return *x.Const + } + return 0 +} + +func (x *SFixed32Rules) GetLessThan() isSFixed32Rules_LessThan { + if x != nil { + return x.LessThan + } + return nil +} + +func (x *SFixed32Rules) GetLt() int32 { + if x != nil { + if x, ok := x.LessThan.(*SFixed32Rules_Lt); ok { + return x.Lt + } + } + return 0 +} + +func (x *SFixed32Rules) GetLte() int32 { + if x != nil { + if x, ok := x.LessThan.(*SFixed32Rules_Lte); ok { + return x.Lte + } + } + return 0 +} + +func (x *SFixed32Rules) GetGreaterThan() isSFixed32Rules_GreaterThan { + if x != nil { + return x.GreaterThan + } + return nil +} + +func (x *SFixed32Rules) GetGt() int32 { + if x != nil { + if x, ok := x.GreaterThan.(*SFixed32Rules_Gt); ok { + return x.Gt + } + } + return 0 +} + +func (x *SFixed32Rules) GetGte() int32 { + if x != nil { + if x, ok := x.GreaterThan.(*SFixed32Rules_Gte); ok { + return x.Gte + } + } + return 0 +} + +func (x *SFixed32Rules) GetIn() []int32 { + if x != nil { + return x.In + } + return nil +} + +func (x *SFixed32Rules) GetNotIn() []int32 { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *SFixed32Rules) GetExample() []int32 { + if x != nil { + return x.Example + } + return nil +} + +type isSFixed32Rules_LessThan interface { + isSFixed32Rules_LessThan() +} + +type SFixed32Rules_Lt struct { + // `lt` requires the field value to be less than the specified value (field < + // value). If the field value is equal to or greater than the specified value, + // an error message is generated. + // + // ```proto + // + // message MySFixed32 { + // // must be less than 10 + // sfixed32 value = 1 [(buf.validate.field).sfixed32.lt = 10]; + // } + // + // ``` + Lt int32 `protobuf:"fixed32,2,opt,name=lt,oneof"` +} + +type SFixed32Rules_Lte struct { + // `lte` requires the field value to be less than or equal to the specified + // value (field <= value). If the field value is greater than the specified + // value, an error message is generated. + // + // ```proto + // + // message MySFixed32 { + // // must be less than or equal to 10 + // sfixed32 value = 1 [(buf.validate.field).sfixed32.lte = 10]; + // } + // + // ``` + Lte int32 `protobuf:"fixed32,3,opt,name=lte,oneof"` +} + +func (*SFixed32Rules_Lt) isSFixed32Rules_LessThan() {} + +func (*SFixed32Rules_Lte) isSFixed32Rules_LessThan() {} + +type isSFixed32Rules_GreaterThan interface { + isSFixed32Rules_GreaterThan() +} + +type SFixed32Rules_Gt struct { + // `gt` requires the field value to be greater than the specified value + // (exclusive). If the value of `gt` is larger than a specified `lt` or + // `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MySFixed32 { + // // must be greater than 5 [sfixed32.gt] + // sfixed32 value = 1 [(buf.validate.field).sfixed32.gt = 5]; + // + // // must be greater than 5 and less than 10 [sfixed32.gt_lt] + // sfixed32 other_value = 2 [(buf.validate.field).sfixed32 = { gt: 5, lt: 10 }]; + // + // // must be greater than 10 or less than 5 [sfixed32.gt_lt_exclusive] + // sfixed32 another_value = 3 [(buf.validate.field).sfixed32 = { gt: 10, lt: 5 }]; + // } + // + // ``` + Gt int32 `protobuf:"fixed32,4,opt,name=gt,oneof"` +} + +type SFixed32Rules_Gte struct { + // `gte` requires the field value to be greater than or equal to the specified + // value (exclusive). If the value of `gte` is larger than a specified `lt` + // or `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MySFixed32 { + // // must be greater than or equal to 5 [sfixed32.gte] + // sfixed32 value = 1 [(buf.validate.field).sfixed32.gte = 5]; + // + // // must be greater than or equal to 5 and less than 10 [sfixed32.gte_lt] + // sfixed32 other_value = 2 [(buf.validate.field).sfixed32 = { gte: 5, lt: 10 }]; + // + // // must be greater than or equal to 10 or less than 5 [sfixed32.gte_lt_exclusive] + // sfixed32 another_value = 3 [(buf.validate.field).sfixed32 = { gte: 10, lt: 5 }]; + // } + // + // ``` + Gte int32 `protobuf:"fixed32,5,opt,name=gte,oneof"` +} + +func (*SFixed32Rules_Gt) isSFixed32Rules_GreaterThan() {} + +func (*SFixed32Rules_Gte) isSFixed32Rules_GreaterThan() {} + +// SFixed64Rules describes the rules applied to `fixed64` values. +type SFixed64Rules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `const` requires the field value to exactly match the specified value. If + // the field value doesn't match, an error message is generated. + // + // ```proto + // + // message MySFixed64 { + // // value must equal 42 + // sfixed64 value = 1 [(buf.validate.field).sfixed64.const = 42]; + // } + // + // ``` + Const *int64 `protobuf:"fixed64,1,opt,name=const" json:"const,omitempty"` + // Types that are valid to be assigned to LessThan: + // + // *SFixed64Rules_Lt + // *SFixed64Rules_Lte + LessThan isSFixed64Rules_LessThan `protobuf_oneof:"less_than"` + // Types that are valid to be assigned to GreaterThan: + // + // *SFixed64Rules_Gt + // *SFixed64Rules_Gte + GreaterThan isSFixed64Rules_GreaterThan `protobuf_oneof:"greater_than"` + // `in` requires the field value to be equal to one of the specified values. + // If the field value isn't one of the specified values, an error message is + // generated. + // + // ```proto + // + // message MySFixed64 { + // // must be in list [1, 2, 3] + // sfixed64 value = 1 [(buf.validate.field).sfixed64 = { in: [1, 2, 3] }]; + // } + // + // ``` + In []int64 `protobuf:"fixed64,6,rep,name=in" json:"in,omitempty"` + // `not_in` requires the field value to not be equal to any of the specified + // values. If the field value is one of the specified values, an error + // message is generated. + // + // ```proto + // + // message MySFixed64 { + // // value must not be in list [1, 2, 3] + // sfixed64 value = 1 [(buf.validate.field).sfixed64 = { not_in: [1, 2, 3] }]; + // } + // + // ``` + NotIn []int64 `protobuf:"fixed64,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // `example` specifies values that the field may have. These values SHOULD + // conform to other rules. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // + // message MySFixed64 { + // sfixed64 value = 1 [ + // (buf.validate.field).sfixed64.example = 1, + // (buf.validate.field).sfixed64.example = 2 + // ]; + // } + // + // ``` + Example []int64 `protobuf:"fixed64,8,rep,name=example" json:"example,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SFixed64Rules) Reset() { + *x = SFixed64Rules{} + mi := &file_buf_validate_validate_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SFixed64Rules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SFixed64Rules) ProtoMessage() {} + +func (x *SFixed64Rules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[17] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SFixed64Rules.ProtoReflect.Descriptor instead. +func (*SFixed64Rules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{17} +} + +func (x *SFixed64Rules) GetConst() int64 { + if x != nil && x.Const != nil { + return *x.Const + } + return 0 +} + +func (x *SFixed64Rules) GetLessThan() isSFixed64Rules_LessThan { + if x != nil { + return x.LessThan + } + return nil +} + +func (x *SFixed64Rules) GetLt() int64 { + if x != nil { + if x, ok := x.LessThan.(*SFixed64Rules_Lt); ok { + return x.Lt + } + } + return 0 +} + +func (x *SFixed64Rules) GetLte() int64 { + if x != nil { + if x, ok := x.LessThan.(*SFixed64Rules_Lte); ok { + return x.Lte + } + } + return 0 +} + +func (x *SFixed64Rules) GetGreaterThan() isSFixed64Rules_GreaterThan { + if x != nil { + return x.GreaterThan + } + return nil +} + +func (x *SFixed64Rules) GetGt() int64 { + if x != nil { + if x, ok := x.GreaterThan.(*SFixed64Rules_Gt); ok { + return x.Gt + } + } + return 0 +} + +func (x *SFixed64Rules) GetGte() int64 { + if x != nil { + if x, ok := x.GreaterThan.(*SFixed64Rules_Gte); ok { + return x.Gte + } + } + return 0 +} + +func (x *SFixed64Rules) GetIn() []int64 { + if x != nil { + return x.In + } + return nil +} + +func (x *SFixed64Rules) GetNotIn() []int64 { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *SFixed64Rules) GetExample() []int64 { + if x != nil { + return x.Example + } + return nil +} + +type isSFixed64Rules_LessThan interface { + isSFixed64Rules_LessThan() +} + +type SFixed64Rules_Lt struct { + // `lt` requires the field value to be less than the specified value (field < + // value). If the field value is equal to or greater than the specified value, + // an error message is generated. + // + // ```proto + // + // message MySFixed64 { + // // must be less than 10 + // sfixed64 value = 1 [(buf.validate.field).sfixed64.lt = 10]; + // } + // + // ``` + Lt int64 `protobuf:"fixed64,2,opt,name=lt,oneof"` +} + +type SFixed64Rules_Lte struct { + // `lte` requires the field value to be less than or equal to the specified + // value (field <= value). If the field value is greater than the specified + // value, an error message is generated. + // + // ```proto + // + // message MySFixed64 { + // // must be less than or equal to 10 + // sfixed64 value = 1 [(buf.validate.field).sfixed64.lte = 10]; + // } + // + // ``` + Lte int64 `protobuf:"fixed64,3,opt,name=lte,oneof"` +} + +func (*SFixed64Rules_Lt) isSFixed64Rules_LessThan() {} + +func (*SFixed64Rules_Lte) isSFixed64Rules_LessThan() {} + +type isSFixed64Rules_GreaterThan interface { + isSFixed64Rules_GreaterThan() +} + +type SFixed64Rules_Gt struct { + // `gt` requires the field value to be greater than the specified value + // (exclusive). If the value of `gt` is larger than a specified `lt` or + // `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MySFixed64 { + // // must be greater than 5 [sfixed64.gt] + // sfixed64 value = 1 [(buf.validate.field).sfixed64.gt = 5]; + // + // // must be greater than 5 and less than 10 [sfixed64.gt_lt] + // sfixed64 other_value = 2 [(buf.validate.field).sfixed64 = { gt: 5, lt: 10 }]; + // + // // must be greater than 10 or less than 5 [sfixed64.gt_lt_exclusive] + // sfixed64 another_value = 3 [(buf.validate.field).sfixed64 = { gt: 10, lt: 5 }]; + // } + // + // ``` + Gt int64 `protobuf:"fixed64,4,opt,name=gt,oneof"` +} + +type SFixed64Rules_Gte struct { + // `gte` requires the field value to be greater than or equal to the specified + // value (exclusive). If the value of `gte` is larger than a specified `lt` + // or `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MySFixed64 { + // // must be greater than or equal to 5 [sfixed64.gte] + // sfixed64 value = 1 [(buf.validate.field).sfixed64.gte = 5]; + // + // // must be greater than or equal to 5 and less than 10 [sfixed64.gte_lt] + // sfixed64 other_value = 2 [(buf.validate.field).sfixed64 = { gte: 5, lt: 10 }]; + // + // // must be greater than or equal to 10 or less than 5 [sfixed64.gte_lt_exclusive] + // sfixed64 another_value = 3 [(buf.validate.field).sfixed64 = { gte: 10, lt: 5 }]; + // } + // + // ``` + Gte int64 `protobuf:"fixed64,5,opt,name=gte,oneof"` +} + +func (*SFixed64Rules_Gt) isSFixed64Rules_GreaterThan() {} + +func (*SFixed64Rules_Gte) isSFixed64Rules_GreaterThan() {} + +// BoolRules describes the rules applied to `bool` values. These rules +// may also be applied to the `google.protobuf.BoolValue` Well-Known-Type. +type BoolRules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `const` requires the field value to exactly match the specified boolean value. + // If the field value doesn't match, an error message is generated. + // + // ```proto + // + // message MyBool { + // // value must equal true + // bool value = 1 [(buf.validate.field).bool.const = true]; + // } + // + // ``` + Const *bool `protobuf:"varint,1,opt,name=const" json:"const,omitempty"` + // `example` specifies values that the field may have. These values SHOULD + // conform to other rules. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // + // message MyBool { + // bool value = 1 [ + // (buf.validate.field).bool.example = 1, + // (buf.validate.field).bool.example = 2 + // ]; + // } + // + // ``` + Example []bool `protobuf:"varint,2,rep,name=example" json:"example,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BoolRules) Reset() { + *x = BoolRules{} + mi := &file_buf_validate_validate_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BoolRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BoolRules) ProtoMessage() {} + +func (x *BoolRules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[18] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BoolRules.ProtoReflect.Descriptor instead. +func (*BoolRules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{18} +} + +func (x *BoolRules) GetConst() bool { + if x != nil && x.Const != nil { + return *x.Const + } + return false +} + +func (x *BoolRules) GetExample() []bool { + if x != nil { + return x.Example + } + return nil +} + +// StringRules describes the rules applied to `string` values These +// rules may also be applied to the `google.protobuf.StringValue` Well-Known-Type. +type StringRules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `const` requires the field value to exactly match the specified value. If + // the field value doesn't match, an error message is generated. + // + // ```proto + // + // message MyString { + // // value must equal `hello` + // string value = 1 [(buf.validate.field).string.const = "hello"]; + // } + // + // ``` + Const *string `protobuf:"bytes,1,opt,name=const" json:"const,omitempty"` + // `len` dictates that the field value must have the specified + // number of characters (Unicode code points), which may differ from the number + // of bytes in the string. If the field value does not meet the specified + // length, an error message will be generated. + // + // ```proto + // + // message MyString { + // // value length must be 5 characters + // string value = 1 [(buf.validate.field).string.len = 5]; + // } + // + // ``` + Len *uint64 `protobuf:"varint,19,opt,name=len" json:"len,omitempty"` + // `min_len` specifies that the field value must have at least the specified + // number of characters (Unicode code points), which may differ from the number + // of bytes in the string. If the field value contains fewer characters, an error + // message will be generated. + // + // ```proto + // + // message MyString { + // // value length must be at least 3 characters + // string value = 1 [(buf.validate.field).string.min_len = 3]; + // } + // + // ``` + MinLen *uint64 `protobuf:"varint,2,opt,name=min_len,json=minLen" json:"min_len,omitempty"` + // `max_len` specifies that the field value must have no more than the specified + // number of characters (Unicode code points), which may differ from the + // number of bytes in the string. If the field value contains more characters, + // an error message will be generated. + // + // ```proto + // + // message MyString { + // // value length must be at most 10 characters + // string value = 1 [(buf.validate.field).string.max_len = 10]; + // } + // + // ``` + MaxLen *uint64 `protobuf:"varint,3,opt,name=max_len,json=maxLen" json:"max_len,omitempty"` + // `len_bytes` dictates that the field value must have the specified number of + // bytes. If the field value does not match the specified length in bytes, + // an error message will be generated. + // + // ```proto + // + // message MyString { + // // value length must be 6 bytes + // string value = 1 [(buf.validate.field).string.len_bytes = 6]; + // } + // + // ``` + LenBytes *uint64 `protobuf:"varint,20,opt,name=len_bytes,json=lenBytes" json:"len_bytes,omitempty"` + // `min_bytes` specifies that the field value must have at least the specified + // number of bytes. If the field value contains fewer bytes, an error message + // will be generated. + // + // ```proto + // + // message MyString { + // // value length must be at least 4 bytes + // string value = 1 [(buf.validate.field).string.min_bytes = 4]; + // } + // + // ``` + MinBytes *uint64 `protobuf:"varint,4,opt,name=min_bytes,json=minBytes" json:"min_bytes,omitempty"` + // `max_bytes` specifies that the field value must have no more than the + // specified number of bytes. If the field value contains more bytes, an + // error message will be generated. + // + // ```proto + // + // message MyString { + // // value length must be at most 8 bytes + // string value = 1 [(buf.validate.field).string.max_bytes = 8]; + // } + // + // ``` + MaxBytes *uint64 `protobuf:"varint,5,opt,name=max_bytes,json=maxBytes" json:"max_bytes,omitempty"` + // `pattern` specifies that the field value must match the specified + // regular expression (RE2 syntax), with the expression provided without any + // delimiters. If the field value doesn't match the regular expression, an + // error message will be generated. + // + // ```proto + // + // message MyString { + // // value does not match regex pattern `^[a-zA-Z]//$` + // string value = 1 [(buf.validate.field).string.pattern = "^[a-zA-Z]//$"]; + // } + // + // ``` + Pattern *string `protobuf:"bytes,6,opt,name=pattern" json:"pattern,omitempty"` + // `prefix` specifies that the field value must have the + // specified substring at the beginning of the string. If the field value + // doesn't start with the specified prefix, an error message will be + // generated. + // + // ```proto + // + // message MyString { + // // value does not have prefix `pre` + // string value = 1 [(buf.validate.field).string.prefix = "pre"]; + // } + // + // ``` + Prefix *string `protobuf:"bytes,7,opt,name=prefix" json:"prefix,omitempty"` + // `suffix` specifies that the field value must have the + // specified substring at the end of the string. If the field value doesn't + // end with the specified suffix, an error message will be generated. + // + // ```proto + // + // message MyString { + // // value does not have suffix `post` + // string value = 1 [(buf.validate.field).string.suffix = "post"]; + // } + // + // ``` + Suffix *string `protobuf:"bytes,8,opt,name=suffix" json:"suffix,omitempty"` + // `contains` specifies that the field value must have the + // specified substring anywhere in the string. If the field value doesn't + // contain the specified substring, an error message will be generated. + // + // ```proto + // + // message MyString { + // // value does not contain substring `inside`. + // string value = 1 [(buf.validate.field).string.contains = "inside"]; + // } + // + // ``` + Contains *string `protobuf:"bytes,9,opt,name=contains" json:"contains,omitempty"` + // `not_contains` specifies that the field value must not have the + // specified substring anywhere in the string. If the field value contains + // the specified substring, an error message will be generated. + // + // ```proto + // + // message MyString { + // // value contains substring `inside`. + // string value = 1 [(buf.validate.field).string.not_contains = "inside"]; + // } + // + // ``` + NotContains *string `protobuf:"bytes,23,opt,name=not_contains,json=notContains" json:"not_contains,omitempty"` + // `in` specifies that the field value must be equal to one of the specified + // values. If the field value isn't one of the specified values, an error + // message will be generated. + // + // ```proto + // + // message MyString { + // // must be in list ["apple", "banana"] + // string value = 1 [(buf.validate.field).string.in = "apple", (buf.validate.field).string.in = "banana"]; + // } + // + // ``` + In []string `protobuf:"bytes,10,rep,name=in" json:"in,omitempty"` + // `not_in` specifies that the field value cannot be equal to any + // of the specified values. If the field value is one of the specified values, + // an error message will be generated. + // ```proto + // + // message MyString { + // // value must not be in list ["orange", "grape"] + // string value = 1 [(buf.validate.field).string.not_in = "orange", (buf.validate.field).string.not_in = "grape"]; + // } + // + // ``` + NotIn []string `protobuf:"bytes,11,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // `WellKnown` rules provide advanced rules against common string + // patterns. + // + // Types that are valid to be assigned to WellKnown: + // + // *StringRules_Email + // *StringRules_Hostname + // *StringRules_Ip + // *StringRules_Ipv4 + // *StringRules_Ipv6 + // *StringRules_Uri + // *StringRules_UriRef + // *StringRules_Address + // *StringRules_Uuid + // *StringRules_Tuuid + // *StringRules_IpWithPrefixlen + // *StringRules_Ipv4WithPrefixlen + // *StringRules_Ipv6WithPrefixlen + // *StringRules_IpPrefix + // *StringRules_Ipv4Prefix + // *StringRules_Ipv6Prefix + // *StringRules_HostAndPort + // *StringRules_Ulid + // *StringRules_ProtobufFqn + // *StringRules_ProtobufDotFqn + // *StringRules_WellKnownRegex + WellKnown isStringRules_WellKnown `protobuf_oneof:"well_known"` + // This applies to regexes `HTTP_HEADER_NAME` and `HTTP_HEADER_VALUE` to + // enable strict header validation. By default, this is true, and HTTP header + // validations are [RFC-compliant](https://datatracker.ietf.org/doc/html/rfc7230#section-3). Setting to false will enable looser + // validations that only disallow `\r\n\0` characters, which can be used to + // bypass header matching rules. + // + // ```proto + // + // message MyString { + // // The field `value` must have be a valid HTTP headers, but not enforced with strict rules. + // string value = 1 [(buf.validate.field).string.strict = false]; + // } + // + // ``` + Strict *bool `protobuf:"varint,25,opt,name=strict" json:"strict,omitempty"` + // `example` specifies values that the field may have. These values SHOULD + // conform to other rules. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // + // message MyString { + // string value = 1 [ + // (buf.validate.field).string.example = "hello", + // (buf.validate.field).string.example = "world" + // ]; + // } + // + // ``` + Example []string `protobuf:"bytes,34,rep,name=example" json:"example,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StringRules) Reset() { + *x = StringRules{} + mi := &file_buf_validate_validate_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StringRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StringRules) ProtoMessage() {} + +func (x *StringRules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[19] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StringRules.ProtoReflect.Descriptor instead. +func (*StringRules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{19} +} + +func (x *StringRules) GetConst() string { + if x != nil && x.Const != nil { + return *x.Const + } + return "" +} + +func (x *StringRules) GetLen() uint64 { + if x != nil && x.Len != nil { + return *x.Len + } + return 0 +} + +func (x *StringRules) GetMinLen() uint64 { + if x != nil && x.MinLen != nil { + return *x.MinLen + } + return 0 +} + +func (x *StringRules) GetMaxLen() uint64 { + if x != nil && x.MaxLen != nil { + return *x.MaxLen + } + return 0 +} + +func (x *StringRules) GetLenBytes() uint64 { + if x != nil && x.LenBytes != nil { + return *x.LenBytes + } + return 0 +} + +func (x *StringRules) GetMinBytes() uint64 { + if x != nil && x.MinBytes != nil { + return *x.MinBytes + } + return 0 +} + +func (x *StringRules) GetMaxBytes() uint64 { + if x != nil && x.MaxBytes != nil { + return *x.MaxBytes + } + return 0 +} + +func (x *StringRules) GetPattern() string { + if x != nil && x.Pattern != nil { + return *x.Pattern + } + return "" +} + +func (x *StringRules) GetPrefix() string { + if x != nil && x.Prefix != nil { + return *x.Prefix + } + return "" +} + +func (x *StringRules) GetSuffix() string { + if x != nil && x.Suffix != nil { + return *x.Suffix + } + return "" +} + +func (x *StringRules) GetContains() string { + if x != nil && x.Contains != nil { + return *x.Contains + } + return "" +} + +func (x *StringRules) GetNotContains() string { + if x != nil && x.NotContains != nil { + return *x.NotContains + } + return "" +} + +func (x *StringRules) GetIn() []string { + if x != nil { + return x.In + } + return nil +} + +func (x *StringRules) GetNotIn() []string { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *StringRules) GetWellKnown() isStringRules_WellKnown { + if x != nil { + return x.WellKnown + } + return nil +} + +func (x *StringRules) GetEmail() bool { + if x != nil { + if x, ok := x.WellKnown.(*StringRules_Email); ok { + return x.Email + } + } + return false +} + +func (x *StringRules) GetHostname() bool { + if x != nil { + if x, ok := x.WellKnown.(*StringRules_Hostname); ok { + return x.Hostname + } + } + return false +} + +func (x *StringRules) GetIp() bool { + if x != nil { + if x, ok := x.WellKnown.(*StringRules_Ip); ok { + return x.Ip + } + } + return false +} + +func (x *StringRules) GetIpv4() bool { + if x != nil { + if x, ok := x.WellKnown.(*StringRules_Ipv4); ok { + return x.Ipv4 + } + } + return false +} + +func (x *StringRules) GetIpv6() bool { + if x != nil { + if x, ok := x.WellKnown.(*StringRules_Ipv6); ok { + return x.Ipv6 + } + } + return false +} + +func (x *StringRules) GetUri() bool { + if x != nil { + if x, ok := x.WellKnown.(*StringRules_Uri); ok { + return x.Uri + } + } + return false +} + +func (x *StringRules) GetUriRef() bool { + if x != nil { + if x, ok := x.WellKnown.(*StringRules_UriRef); ok { + return x.UriRef + } + } + return false +} + +func (x *StringRules) GetAddress() bool { + if x != nil { + if x, ok := x.WellKnown.(*StringRules_Address); ok { + return x.Address + } + } + return false +} + +func (x *StringRules) GetUuid() bool { + if x != nil { + if x, ok := x.WellKnown.(*StringRules_Uuid); ok { + return x.Uuid + } + } + return false +} + +func (x *StringRules) GetTuuid() bool { + if x != nil { + if x, ok := x.WellKnown.(*StringRules_Tuuid); ok { + return x.Tuuid + } + } + return false +} + +func (x *StringRules) GetIpWithPrefixlen() bool { + if x != nil { + if x, ok := x.WellKnown.(*StringRules_IpWithPrefixlen); ok { + return x.IpWithPrefixlen + } + } + return false +} + +func (x *StringRules) GetIpv4WithPrefixlen() bool { + if x != nil { + if x, ok := x.WellKnown.(*StringRules_Ipv4WithPrefixlen); ok { + return x.Ipv4WithPrefixlen + } + } + return false +} + +func (x *StringRules) GetIpv6WithPrefixlen() bool { + if x != nil { + if x, ok := x.WellKnown.(*StringRules_Ipv6WithPrefixlen); ok { + return x.Ipv6WithPrefixlen + } + } + return false +} + +func (x *StringRules) GetIpPrefix() bool { + if x != nil { + if x, ok := x.WellKnown.(*StringRules_IpPrefix); ok { + return x.IpPrefix + } + } + return false +} + +func (x *StringRules) GetIpv4Prefix() bool { + if x != nil { + if x, ok := x.WellKnown.(*StringRules_Ipv4Prefix); ok { + return x.Ipv4Prefix + } + } + return false +} + +func (x *StringRules) GetIpv6Prefix() bool { + if x != nil { + if x, ok := x.WellKnown.(*StringRules_Ipv6Prefix); ok { + return x.Ipv6Prefix + } + } + return false +} + +func (x *StringRules) GetHostAndPort() bool { + if x != nil { + if x, ok := x.WellKnown.(*StringRules_HostAndPort); ok { + return x.HostAndPort + } + } + return false +} + +func (x *StringRules) GetUlid() bool { + if x != nil { + if x, ok := x.WellKnown.(*StringRules_Ulid); ok { + return x.Ulid + } + } + return false +} + +func (x *StringRules) GetProtobufFqn() bool { + if x != nil { + if x, ok := x.WellKnown.(*StringRules_ProtobufFqn); ok { + return x.ProtobufFqn + } + } + return false +} + +func (x *StringRules) GetProtobufDotFqn() bool { + if x != nil { + if x, ok := x.WellKnown.(*StringRules_ProtobufDotFqn); ok { + return x.ProtobufDotFqn + } + } + return false +} + +func (x *StringRules) GetWellKnownRegex() KnownRegex { + if x != nil { + if x, ok := x.WellKnown.(*StringRules_WellKnownRegex); ok { + return x.WellKnownRegex + } + } + return KnownRegex_KNOWN_REGEX_UNSPECIFIED +} + +func (x *StringRules) GetStrict() bool { + if x != nil && x.Strict != nil { + return *x.Strict + } + return false +} + +func (x *StringRules) GetExample() []string { + if x != nil { + return x.Example + } + return nil +} + +type isStringRules_WellKnown interface { + isStringRules_WellKnown() +} + +type StringRules_Email struct { + // `email` specifies that the field value must be a valid email address, for + // example "foo@example.com". + // + // Conforms to the definition for a valid email address from the [HTML standard](https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address). + // Note that this standard willfully deviates from [RFC 5322](https://datatracker.ietf.org/doc/html/rfc5322), + // which allows many unexpected forms of email addresses and will easily match + // a typographical error. + // + // If the field value isn't a valid email address, an error message will be generated. + // + // ```proto + // + // message MyString { + // // must be a valid email address + // string value = 1 [(buf.validate.field).string.email = true]; + // } + // + // ``` + Email bool `protobuf:"varint,12,opt,name=email,oneof"` +} + +type StringRules_Hostname struct { + // `hostname` specifies that the field value must be a valid hostname, for + // example "foo.example.com". + // + // A valid hostname follows the rules below: + // - The name consists of one or more labels, separated by a dot ("."). + // - Each label can be 1 to 63 alphanumeric characters. + // - A label can contain hyphens ("-"), but must not start or end with a hyphen. + // - The right-most label must not be digits only. + // - The name can have a trailing dot—for example, "foo.example.com.". + // - The name can be 253 characters at most, excluding the optional trailing dot. + // + // If the field value isn't a valid hostname, an error message will be generated. + // + // ```proto + // + // message MyString { + // // must be a valid hostname + // string value = 1 [(buf.validate.field).string.hostname = true]; + // } + // + // ``` + Hostname bool `protobuf:"varint,13,opt,name=hostname,oneof"` +} + +type StringRules_Ip struct { + // `ip` specifies that the field value must be a valid IP (v4 or v6) address. + // + // IPv4 addresses are expected in the dotted decimal format—for example, "192.168.5.21". + // IPv6 addresses are expected in their text representation—for example, "::1", + // or "2001:0DB8:ABCD:0012::0". + // + // Both formats are well-defined in the internet standard [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986). + // Zone identifiers for IPv6 addresses (for example, "fe80::a%en1") are supported. + // + // If the field value isn't a valid IP address, an error message will be + // generated. + // + // ```proto + // + // message MyString { + // // must be a valid IP address + // string value = 1 [(buf.validate.field).string.ip = true]; + // } + // + // ``` + Ip bool `protobuf:"varint,14,opt,name=ip,oneof"` +} + +type StringRules_Ipv4 struct { + // `ipv4` specifies that the field value must be a valid IPv4 address—for + // example "192.168.5.21". If the field value isn't a valid IPv4 address, an + // error message will be generated. + // + // ```proto + // + // message MyString { + // // must be a valid IPv4 address + // string value = 1 [(buf.validate.field).string.ipv4 = true]; + // } + // + // ``` + Ipv4 bool `protobuf:"varint,15,opt,name=ipv4,oneof"` +} + +type StringRules_Ipv6 struct { + // `ipv6` specifies that the field value must be a valid IPv6 address—for + // example "::1", or "d7a:115c:a1e0:ab12:4843:cd96:626b:430b". If the field + // value is not a valid IPv6 address, an error message will be generated. + // + // ```proto + // + // message MyString { + // // must be a valid IPv6 address + // string value = 1 [(buf.validate.field).string.ipv6 = true]; + // } + // + // ``` + Ipv6 bool `protobuf:"varint,16,opt,name=ipv6,oneof"` +} + +type StringRules_Uri struct { + // `uri` specifies that the field value must be a valid URI, for example + // "https://example.com/foo/bar?baz=quux#frag". + // + // URI is defined in the internet standard [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986). + // Zone Identifiers in IPv6 address literals are supported ([RFC 6874](https://datatracker.ietf.org/doc/html/rfc6874)). + // + // If the field value isn't a valid URI, an error message will be generated. + // + // ```proto + // + // message MyString { + // // must be a valid URI + // string value = 1 [(buf.validate.field).string.uri = true]; + // } + // + // ``` + Uri bool `protobuf:"varint,17,opt,name=uri,oneof"` +} + +type StringRules_UriRef struct { + // `uri_ref` specifies that the field value must be a valid URI Reference—either + // a URI such as "https://example.com/foo/bar?baz=quux#frag", or a Relative + // Reference such as "./foo/bar?query". + // + // URI, URI Reference, and Relative Reference are defined in the internet + // standard [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986). Zone + // Identifiers in IPv6 address literals are supported ([RFC 6874](https://datatracker.ietf.org/doc/html/rfc6874)). + // + // If the field value isn't a valid URI Reference, an error message will be + // generated. + // + // ```proto + // + // message MyString { + // // must be a valid URI Reference + // string value = 1 [(buf.validate.field).string.uri_ref = true]; + // } + // + // ``` + UriRef bool `protobuf:"varint,18,opt,name=uri_ref,json=uriRef,oneof"` +} + +type StringRules_Address struct { + // `address` specifies that the field value must be either a valid hostname + // (for example, "example.com"), or a valid IP (v4 or v6) address (for example, + // "192.168.0.1", or "::1"). If the field value isn't a valid hostname or IP, + // an error message will be generated. + // + // ```proto + // + // message MyString { + // // must be a valid hostname, or ip address + // string value = 1 [(buf.validate.field).string.address = true]; + // } + // + // ``` + Address bool `protobuf:"varint,21,opt,name=address,oneof"` +} + +type StringRules_Uuid struct { + // `uuid` specifies that the field value must be a valid UUID as defined by + // [RFC 4122](https://datatracker.ietf.org/doc/html/rfc4122#section-4.1.2). If the + // field value isn't a valid UUID, an error message will be generated. + // + // ```proto + // + // message MyString { + // // must be a valid UUID + // string value = 1 [(buf.validate.field).string.uuid = true]; + // } + // + // ``` + Uuid bool `protobuf:"varint,22,opt,name=uuid,oneof"` +} + +type StringRules_Tuuid struct { + // `tuuid` (trimmed UUID) specifies that the field value must be a valid UUID as + // defined by [RFC 4122](https://datatracker.ietf.org/doc/html/rfc4122#section-4.1.2) with all dashes + // omitted. If the field value isn't a valid UUID without dashes, an error message + // will be generated. + // + // ```proto + // + // message MyString { + // // must be a valid trimmed UUID + // string value = 1 [(buf.validate.field).string.tuuid = true]; + // } + // + // ``` + Tuuid bool `protobuf:"varint,33,opt,name=tuuid,oneof"` +} + +type StringRules_IpWithPrefixlen struct { + // `ip_with_prefixlen` specifies that the field value must be a valid IP + // (v4 or v6) address with prefix length—for example, "192.168.5.21/16" or + // "2001:0DB8:ABCD:0012::F1/64". If the field value isn't a valid IP with + // prefix length, an error message will be generated. + // + // ```proto + // + // message MyString { + // // must be a valid IP with prefix length + // string value = 1 [(buf.validate.field).string.ip_with_prefixlen = true]; + // } + // + // ``` + IpWithPrefixlen bool `protobuf:"varint,26,opt,name=ip_with_prefixlen,json=ipWithPrefixlen,oneof"` +} + +type StringRules_Ipv4WithPrefixlen struct { + // `ipv4_with_prefixlen` specifies that the field value must be a valid + // IPv4 address with prefix length—for example, "192.168.5.21/16". If the + // field value isn't a valid IPv4 address with prefix length, an error + // message will be generated. + // + // ```proto + // + // message MyString { + // // must be a valid IPv4 address with prefix length + // string value = 1 [(buf.validate.field).string.ipv4_with_prefixlen = true]; + // } + // + // ``` + Ipv4WithPrefixlen bool `protobuf:"varint,27,opt,name=ipv4_with_prefixlen,json=ipv4WithPrefixlen,oneof"` +} + +type StringRules_Ipv6WithPrefixlen struct { + // `ipv6_with_prefixlen` specifies that the field value must be a valid + // IPv6 address with prefix length—for example, "2001:0DB8:ABCD:0012::F1/64". + // If the field value is not a valid IPv6 address with prefix length, + // an error message will be generated. + // + // ```proto + // + // message MyString { + // // must be a valid IPv6 address prefix length + // string value = 1 [(buf.validate.field).string.ipv6_with_prefixlen = true]; + // } + // + // ``` + Ipv6WithPrefixlen bool `protobuf:"varint,28,opt,name=ipv6_with_prefixlen,json=ipv6WithPrefixlen,oneof"` +} + +type StringRules_IpPrefix struct { + // `ip_prefix` specifies that the field value must be a valid IP (v4 or v6) + // prefix—for example, "192.168.0.0/16" or "2001:0DB8:ABCD:0012::0/64". + // + // The prefix must have all zeros for the unmasked bits. For example, + // "2001:0DB8:ABCD:0012::0/64" designates the left-most 64 bits for the + // prefix, and the remaining 64 bits must be zero. + // + // If the field value isn't a valid IP prefix, an error message will be + // generated. + // + // ```proto + // + // message MyString { + // // must be a valid IP prefix + // string value = 1 [(buf.validate.field).string.ip_prefix = true]; + // } + // + // ``` + IpPrefix bool `protobuf:"varint,29,opt,name=ip_prefix,json=ipPrefix,oneof"` +} + +type StringRules_Ipv4Prefix struct { + // `ipv4_prefix` specifies that the field value must be a valid IPv4 + // prefix, for example "192.168.0.0/16". + // + // The prefix must have all zeros for the unmasked bits. For example, + // "192.168.0.0/16" designates the left-most 16 bits for the prefix, + // and the remaining 16 bits must be zero. + // + // If the field value isn't a valid IPv4 prefix, an error message + // will be generated. + // + // ```proto + // + // message MyString { + // // must be a valid IPv4 prefix + // string value = 1 [(buf.validate.field).string.ipv4_prefix = true]; + // } + // + // ``` + Ipv4Prefix bool `protobuf:"varint,30,opt,name=ipv4_prefix,json=ipv4Prefix,oneof"` +} + +type StringRules_Ipv6Prefix struct { + // `ipv6_prefix` specifies that the field value must be a valid IPv6 prefix—for + // example, "2001:0DB8:ABCD:0012::0/64". + // + // The prefix must have all zeros for the unmasked bits. For example, + // "2001:0DB8:ABCD:0012::0/64" designates the left-most 64 bits for the + // prefix, and the remaining 64 bits must be zero. + // + // If the field value is not a valid IPv6 prefix, an error message will be + // generated. + // + // ```proto + // + // message MyString { + // // must be a valid IPv6 prefix + // string value = 1 [(buf.validate.field).string.ipv6_prefix = true]; + // } + // + // ``` + Ipv6Prefix bool `protobuf:"varint,31,opt,name=ipv6_prefix,json=ipv6Prefix,oneof"` +} + +type StringRules_HostAndPort struct { + // `host_and_port` specifies that the field value must be a valid host/port + // pair—for example, "example.com:8080". + // + // The host can be one of: + // - An IPv4 address in dotted decimal format—for example, "192.168.5.21". + // - An IPv6 address enclosed in square brackets—for example, "[2001:0DB8:ABCD:0012::F1]". + // - A hostname—for example, "example.com". + // + // The port is separated by a colon. It must be non-empty, with a decimal number + // in the range of 0-65535, inclusive. + HostAndPort bool `protobuf:"varint,32,opt,name=host_and_port,json=hostAndPort,oneof"` +} + +type StringRules_Ulid struct { + // `ulid` specifies that the field value must be a valid ULID (Universally Unique + // Lexicographically Sortable Identifier) as defined by the [ULID specification](https://github.com/ulid/spec). + // If the field value isn't a valid ULID, an error message will be generated. + // + // ```proto + // + // message MyString { + // // must be a valid ULID + // string value = 1 [(buf.validate.field).string.ulid = true]; + // } + // + // ``` + Ulid bool `protobuf:"varint,35,opt,name=ulid,oneof"` +} + +type StringRules_ProtobufFqn struct { + // `protobuf_fqn` specifies that the field value must be a valid fully-qualified + // Protobuf name as defined by the [Protobuf Language Specification](https://protobuf.com/docs/language-spec). + // + // A fully-qualified Protobuf name is a dot-separated list of Protobuf identifiers, + // where each identifier starts with a letter or underscore and is followed by zero or + // more letters, underscores, or digits. + // + // Examples: "buf.validate", "google.protobuf.Timestamp", "my_package.MyMessage". + // + // Note: historically, fully-qualified Protobuf names were represented with a leading + // dot (for example, ".buf.validate.StringRules"). Modern Protobuf does not use the + // leading dot, and most fully-qualified names are represented without it. Use + // `protobuf_dot_fqn` if a leading dot is required. + // + // If the field value isn't a valid fully-qualified Protobuf name, an error message + // will be generated. + // + // ```proto + // + // message MyString { + // // value must be a valid fully-qualified Protobuf name + // string value = 1 [(buf.validate.field).string.protobuf_fqn = true]; + // } + // + // ``` + ProtobufFqn bool `protobuf:"varint,37,opt,name=protobuf_fqn,json=protobufFqn,oneof"` +} + +type StringRules_ProtobufDotFqn struct { + // `protobuf_dot_fqn` specifies that the field value must be a valid fully-qualified + // Protobuf name with a leading dot, as defined by the + // [Protobuf Language Specification](https://protobuf.com/docs/language-spec). + // + // A fully-qualified Protobuf name with a leading dot is a dot followed by a + // dot-separated list of Protobuf identifiers, where each identifier starts with a + // letter or underscore and is followed by zero or more letters, underscores, or + // digits. + // + // Examples: ".buf.validate", ".google.protobuf.Timestamp", ".my_package.MyMessage". + // + // Note: this is the historical representation of fully-qualified Protobuf names, + // where a leading dot denotes an absolute reference. Modern Protobuf does not use + // the leading dot, and most fully-qualified names are represented without it. Most + // users will want to use `protobuf_fqn` instead. + // + // If the field value isn't a valid fully-qualified Protobuf name with a leading dot, + // an error message will be generated. + // + // ```proto + // + // message MyString { + // // value must be a valid fully-qualified Protobuf name with a leading dot + // string value = 1 [(buf.validate.field).string.protobuf_dot_fqn = true]; + // } + // + // ``` + ProtobufDotFqn bool `protobuf:"varint,38,opt,name=protobuf_dot_fqn,json=protobufDotFqn,oneof"` +} + +type StringRules_WellKnownRegex struct { + // `well_known_regex` specifies a common well-known pattern + // defined as a regex. If the field value doesn't match the well-known + // regex, an error message will be generated. + // + // ```proto + // + // message MyString { + // // must be a valid HTTP header value + // string value = 1 [(buf.validate.field).string.well_known_regex = KNOWN_REGEX_HTTP_HEADER_VALUE]; + // } + // + // ``` + // + // #### KnownRegex + // + // `well_known_regex` contains some well-known patterns. + // + // | Name | Number | Description | + // |-------------------------------|--------|-------------------------------------------| + // | KNOWN_REGEX_UNSPECIFIED | 0 | | + // | KNOWN_REGEX_HTTP_HEADER_NAME | 1 | HTTP header name as defined by [RFC 7230](https://datatracker.ietf.org/doc/html/rfc7230#section-3.2) | + // | KNOWN_REGEX_HTTP_HEADER_VALUE | 2 | HTTP header value as defined by [RFC 7230](https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.4) | + WellKnownRegex KnownRegex `protobuf:"varint,24,opt,name=well_known_regex,json=wellKnownRegex,enum=buf.validate.KnownRegex,oneof"` +} + +func (*StringRules_Email) isStringRules_WellKnown() {} + +func (*StringRules_Hostname) isStringRules_WellKnown() {} + +func (*StringRules_Ip) isStringRules_WellKnown() {} + +func (*StringRules_Ipv4) isStringRules_WellKnown() {} + +func (*StringRules_Ipv6) isStringRules_WellKnown() {} + +func (*StringRules_Uri) isStringRules_WellKnown() {} + +func (*StringRules_UriRef) isStringRules_WellKnown() {} + +func (*StringRules_Address) isStringRules_WellKnown() {} + +func (*StringRules_Uuid) isStringRules_WellKnown() {} + +func (*StringRules_Tuuid) isStringRules_WellKnown() {} + +func (*StringRules_IpWithPrefixlen) isStringRules_WellKnown() {} + +func (*StringRules_Ipv4WithPrefixlen) isStringRules_WellKnown() {} + +func (*StringRules_Ipv6WithPrefixlen) isStringRules_WellKnown() {} + +func (*StringRules_IpPrefix) isStringRules_WellKnown() {} + +func (*StringRules_Ipv4Prefix) isStringRules_WellKnown() {} + +func (*StringRules_Ipv6Prefix) isStringRules_WellKnown() {} + +func (*StringRules_HostAndPort) isStringRules_WellKnown() {} + +func (*StringRules_Ulid) isStringRules_WellKnown() {} + +func (*StringRules_ProtobufFqn) isStringRules_WellKnown() {} + +func (*StringRules_ProtobufDotFqn) isStringRules_WellKnown() {} + +func (*StringRules_WellKnownRegex) isStringRules_WellKnown() {} + +// BytesRules describe the rules applied to `bytes` values. These rules +// may also be applied to the `google.protobuf.BytesValue` Well-Known-Type. +type BytesRules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `const` requires the field value to exactly match the specified bytes + // value. If the field value doesn't match, an error message is generated. + // + // ```proto + // + // message MyBytes { + // // must be "\x01\x02\x03\x04" + // bytes value = 1 [(buf.validate.field).bytes.const = "\x01\x02\x03\x04"]; + // } + // + // ``` + Const []byte `protobuf:"bytes,1,opt,name=const" json:"const,omitempty"` + // `len` requires the field value to have the specified length in bytes. + // If the field value doesn't match, an error message is generated. + // + // ```proto + // + // message MyBytes { + // // value length must be 4 bytes. + // optional bytes value = 1 [(buf.validate.field).bytes.len = 4]; + // } + // + // ``` + Len *uint64 `protobuf:"varint,13,opt,name=len" json:"len,omitempty"` + // `min_len` requires the field value to have at least the specified minimum + // length in bytes. + // If the field value doesn't meet the requirement, an error message is generated. + // + // ```proto + // + // message MyBytes { + // // value length must be at least 2 bytes. + // optional bytes value = 1 [(buf.validate.field).bytes.min_len = 2]; + // } + // + // ``` + MinLen *uint64 `protobuf:"varint,2,opt,name=min_len,json=minLen" json:"min_len,omitempty"` + // `max_len` requires the field value to have at most the specified maximum + // length in bytes. + // If the field value exceeds the requirement, an error message is generated. + // + // ```proto + // + // message MyBytes { + // // must be at most 6 bytes. + // optional bytes value = 1 [(buf.validate.field).bytes.max_len = 6]; + // } + // + // ``` + MaxLen *uint64 `protobuf:"varint,3,opt,name=max_len,json=maxLen" json:"max_len,omitempty"` + // `pattern` requires the field value to match the specified regular + // expression ([RE2 syntax](https://github.com/google/re2/wiki/Syntax)). + // The value of the field must be valid UTF-8 or validation will fail with a + // runtime error. + // If the field value doesn't match the pattern, an error message is generated. + // + // ```proto + // + // message MyBytes { + // // value must match regex pattern "^[a-zA-Z0-9]+$". + // optional bytes value = 1 [(buf.validate.field).bytes.pattern = "^[a-zA-Z0-9]+$"]; + // } + // + // ``` + Pattern *string `protobuf:"bytes,4,opt,name=pattern" json:"pattern,omitempty"` + // `prefix` requires the field value to have the specified bytes at the + // beginning of the string. + // If the field value doesn't meet the requirement, an error message is generated. + // + // ```proto + // + // message MyBytes { + // // value does not have prefix \x01\x02 + // optional bytes value = 1 [(buf.validate.field).bytes.prefix = "\x01\x02"]; + // } + // + // ``` + Prefix []byte `protobuf:"bytes,5,opt,name=prefix" json:"prefix,omitempty"` + // `suffix` requires the field value to have the specified bytes at the end + // of the string. + // If the field value doesn't meet the requirement, an error message is generated. + // + // ```proto + // + // message MyBytes { + // // value does not have suffix \x03\x04 + // optional bytes value = 1 [(buf.validate.field).bytes.suffix = "\x03\x04"]; + // } + // + // ``` + Suffix []byte `protobuf:"bytes,6,opt,name=suffix" json:"suffix,omitempty"` + // `contains` requires the field value to have the specified bytes anywhere in + // the string. + // If the field value doesn't meet the requirement, an error message is generated. + // + // ```proto + // + // message MyBytes { + // // value does not contain \x02\x03 + // optional bytes value = 1 [(buf.validate.field).bytes.contains = "\x02\x03"]; + // } + // + // ``` + Contains []byte `protobuf:"bytes,7,opt,name=contains" json:"contains,omitempty"` + // `in` requires the field value to be equal to one of the specified + // values. If the field value doesn't match any of the specified values, an + // error message is generated. + // + // ```proto + // + // message MyBytes { + // // value must in ["\x01\x02", "\x02\x03", "\x03\x04"] + // optional bytes value = 1 [(buf.validate.field).bytes.in = {"\x01\x02", "\x02\x03", "\x03\x04"}]; + // } + // + // ``` + In [][]byte `protobuf:"bytes,8,rep,name=in" json:"in,omitempty"` + // `not_in` requires the field value to be not equal to any of the specified + // values. + // If the field value matches any of the specified values, an error message is + // generated. + // + // ```proto + // + // message MyBytes { + // // value must not in ["\x01\x02", "\x02\x03", "\x03\x04"] + // optional bytes value = 1 [(buf.validate.field).bytes.not_in = {"\x01\x02", "\x02\x03", "\x03\x04"}]; + // } + // + // ``` + NotIn [][]byte `protobuf:"bytes,9,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // WellKnown rules provide advanced rules against common byte + // patterns + // + // Types that are valid to be assigned to WellKnown: + // + // *BytesRules_Ip + // *BytesRules_Ipv4 + // *BytesRules_Ipv6 + // *BytesRules_Uuid + WellKnown isBytesRules_WellKnown `protobuf_oneof:"well_known"` + // `example` specifies values that the field may have. These values SHOULD + // conform to other rules. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // + // message MyBytes { + // bytes value = 1 [ + // (buf.validate.field).bytes.example = "\x01\x02", + // (buf.validate.field).bytes.example = "\x02\x03" + // ]; + // } + // + // ``` + Example [][]byte `protobuf:"bytes,14,rep,name=example" json:"example,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BytesRules) Reset() { + *x = BytesRules{} + mi := &file_buf_validate_validate_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BytesRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BytesRules) ProtoMessage() {} + +func (x *BytesRules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[20] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BytesRules.ProtoReflect.Descriptor instead. +func (*BytesRules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{20} +} + +func (x *BytesRules) GetConst() []byte { + if x != nil { + return x.Const + } + return nil +} + +func (x *BytesRules) GetLen() uint64 { + if x != nil && x.Len != nil { + return *x.Len + } + return 0 +} + +func (x *BytesRules) GetMinLen() uint64 { + if x != nil && x.MinLen != nil { + return *x.MinLen + } + return 0 +} + +func (x *BytesRules) GetMaxLen() uint64 { + if x != nil && x.MaxLen != nil { + return *x.MaxLen + } + return 0 +} + +func (x *BytesRules) GetPattern() string { + if x != nil && x.Pattern != nil { + return *x.Pattern + } + return "" +} + +func (x *BytesRules) GetPrefix() []byte { + if x != nil { + return x.Prefix + } + return nil +} + +func (x *BytesRules) GetSuffix() []byte { + if x != nil { + return x.Suffix + } + return nil +} + +func (x *BytesRules) GetContains() []byte { + if x != nil { + return x.Contains + } + return nil +} + +func (x *BytesRules) GetIn() [][]byte { + if x != nil { + return x.In + } + return nil +} + +func (x *BytesRules) GetNotIn() [][]byte { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *BytesRules) GetWellKnown() isBytesRules_WellKnown { + if x != nil { + return x.WellKnown + } + return nil +} + +func (x *BytesRules) GetIp() bool { + if x != nil { + if x, ok := x.WellKnown.(*BytesRules_Ip); ok { + return x.Ip + } + } + return false +} + +func (x *BytesRules) GetIpv4() bool { + if x != nil { + if x, ok := x.WellKnown.(*BytesRules_Ipv4); ok { + return x.Ipv4 + } + } + return false +} + +func (x *BytesRules) GetIpv6() bool { + if x != nil { + if x, ok := x.WellKnown.(*BytesRules_Ipv6); ok { + return x.Ipv6 + } + } + return false +} + +func (x *BytesRules) GetUuid() bool { + if x != nil { + if x, ok := x.WellKnown.(*BytesRules_Uuid); ok { + return x.Uuid + } + } + return false +} + +func (x *BytesRules) GetExample() [][]byte { + if x != nil { + return x.Example + } + return nil +} + +type isBytesRules_WellKnown interface { + isBytesRules_WellKnown() +} + +type BytesRules_Ip struct { + // `ip` ensures that the field `value` is a valid IP address (v4 or v6) in byte format. + // If the field value doesn't meet this rule, an error message is generated. + // + // ```proto + // + // message MyBytes { + // // must be a valid IP address + // optional bytes value = 1 [(buf.validate.field).bytes.ip = true]; + // } + // + // ``` + Ip bool `protobuf:"varint,10,opt,name=ip,oneof"` +} + +type BytesRules_Ipv4 struct { + // `ipv4` ensures that the field `value` is a valid IPv4 address in byte format. + // If the field value doesn't meet this rule, an error message is generated. + // + // ```proto + // + // message MyBytes { + // // must be a valid IPv4 address + // optional bytes value = 1 [(buf.validate.field).bytes.ipv4 = true]; + // } + // + // ``` + Ipv4 bool `protobuf:"varint,11,opt,name=ipv4,oneof"` +} + +type BytesRules_Ipv6 struct { + // `ipv6` ensures that the field `value` is a valid IPv6 address in byte format. + // If the field value doesn't meet this rule, an error message is generated. + // ```proto + // + // message MyBytes { + // // must be a valid IPv6 address + // optional bytes value = 1 [(buf.validate.field).bytes.ipv6 = true]; + // } + // + // ``` + Ipv6 bool `protobuf:"varint,12,opt,name=ipv6,oneof"` +} + +type BytesRules_Uuid struct { + // `uuid` ensures that the field value encodes 128-bit UUID data as defined + // by [RFC 4122](https://datatracker.ietf.org/doc/html/rfc4122#section-4.1.2). + // The field must contain exactly 16 bytes representing the UUID. If the + // field value isn't a valid UUID, an error message will be generated. + // + // ```proto + // + // message MyBytes { + // // must be a valid UUID + // optional bytes value = 1 [(buf.validate.field).bytes.uuid = true]; + // } + // + // ``` + Uuid bool `protobuf:"varint,15,opt,name=uuid,oneof"` +} + +func (*BytesRules_Ip) isBytesRules_WellKnown() {} + +func (*BytesRules_Ipv4) isBytesRules_WellKnown() {} + +func (*BytesRules_Ipv6) isBytesRules_WellKnown() {} + +func (*BytesRules_Uuid) isBytesRules_WellKnown() {} + +// EnumRules describe the rules applied to `enum` values. +type EnumRules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `const` requires the field value to exactly match the specified enum value. + // If the field value doesn't match, an error message is generated. + // + // ```proto + // + // enum MyEnum { + // MY_ENUM_UNSPECIFIED = 0; + // MY_ENUM_VALUE1 = 1; + // MY_ENUM_VALUE2 = 2; + // } + // + // message MyMessage { + // // The field `value` must be exactly MY_ENUM_VALUE1. + // MyEnum value = 1 [(buf.validate.field).enum.const = 1]; + // } + // + // ``` + Const *int32 `protobuf:"varint,1,opt,name=const" json:"const,omitempty"` + // `defined_only` requires the field value to be one of the defined values for + // this enum, failing on any undefined value. + // + // ```proto + // + // enum MyEnum { + // MY_ENUM_UNSPECIFIED = 0; + // MY_ENUM_VALUE1 = 1; + // MY_ENUM_VALUE2 = 2; + // } + // + // message MyMessage { + // // The field `value` must be a defined value of MyEnum. + // MyEnum value = 1 [(buf.validate.field).enum.defined_only = true]; + // } + // + // ``` + DefinedOnly *bool `protobuf:"varint,2,opt,name=defined_only,json=definedOnly" json:"defined_only,omitempty"` + // `in` requires the field value to be equal to one of the + // specified enum values. If the field value doesn't match any of the + // specified values, an error message is generated. + // + // ```proto + // + // enum MyEnum { + // MY_ENUM_UNSPECIFIED = 0; + // MY_ENUM_VALUE1 = 1; + // MY_ENUM_VALUE2 = 2; + // } + // + // message MyMessage { + // // The field `value` must be equal to one of the specified values. + // MyEnum value = 1 [(buf.validate.field).enum = { in: [1, 2]}]; + // } + // + // ``` + In []int32 `protobuf:"varint,3,rep,name=in" json:"in,omitempty"` + // `not_in` requires the field value to be not equal to any of the + // specified enum values. If the field value matches one of the specified + // values, an error message is generated. + // + // ```proto + // + // enum MyEnum { + // MY_ENUM_UNSPECIFIED = 0; + // MY_ENUM_VALUE1 = 1; + // MY_ENUM_VALUE2 = 2; + // } + // + // message MyMessage { + // // The field `value` must not be equal to any of the specified values. + // MyEnum value = 1 [(buf.validate.field).enum = { not_in: [1, 2]}]; + // } + // + // ``` + NotIn []int32 `protobuf:"varint,4,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // `example` specifies values that the field may have. These values SHOULD + // conform to other rules. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // + // enum MyEnum { + // MY_ENUM_UNSPECIFIED = 0; + // MY_ENUM_VALUE1 = 1; + // MY_ENUM_VALUE2 = 2; + // } + // + // message MyMessage { + // (buf.validate.field).enum.example = 1, + // (buf.validate.field).enum.example = 2 + // } + // + // ``` + Example []int32 `protobuf:"varint,5,rep,name=example" json:"example,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EnumRules) Reset() { + *x = EnumRules{} + mi := &file_buf_validate_validate_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EnumRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EnumRules) ProtoMessage() {} + +func (x *EnumRules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[21] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EnumRules.ProtoReflect.Descriptor instead. +func (*EnumRules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{21} +} + +func (x *EnumRules) GetConst() int32 { + if x != nil && x.Const != nil { + return *x.Const + } + return 0 +} + +func (x *EnumRules) GetDefinedOnly() bool { + if x != nil && x.DefinedOnly != nil { + return *x.DefinedOnly + } + return false +} + +func (x *EnumRules) GetIn() []int32 { + if x != nil { + return x.In + } + return nil +} + +func (x *EnumRules) GetNotIn() []int32 { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *EnumRules) GetExample() []int32 { + if x != nil { + return x.Example + } + return nil +} + +// RepeatedRules describe the rules applied to `repeated` values. +type RepeatedRules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `min_items` requires that this field must contain at least the specified + // minimum number of items. + // + // Note that `min_items = 1` is equivalent to setting a field as `required`. + // + // ```proto + // + // message MyRepeated { + // // value must contain at least 2 items + // repeated string value = 1 [(buf.validate.field).repeated.min_items = 2]; + // } + // + // ``` + MinItems *uint64 `protobuf:"varint,1,opt,name=min_items,json=minItems" json:"min_items,omitempty"` + // `max_items` denotes that this field must not exceed a + // certain number of items as the upper limit. If the field contains more + // items than specified, an error message will be generated, requiring the + // field to maintain no more than the specified number of items. + // + // ```proto + // + // message MyRepeated { + // // value must contain no more than 3 item(s) + // repeated string value = 1 [(buf.validate.field).repeated.max_items = 3]; + // } + // + // ``` + MaxItems *uint64 `protobuf:"varint,2,opt,name=max_items,json=maxItems" json:"max_items,omitempty"` + // `unique` indicates that all elements in this field must + // be unique. This rule is strictly applicable to scalar and enum + // types, with message types not being supported. + // + // ```proto + // + // message MyRepeated { + // // repeated value must contain unique items + // repeated string value = 1 [(buf.validate.field).repeated.unique = true]; + // } + // + // ``` + Unique *bool `protobuf:"varint,3,opt,name=unique" json:"unique,omitempty"` + // `items` details the rules to be applied to each item + // in the field. Even for repeated message fields, validation is executed + // against each item unless `ignore` is specified. + // + // ```proto + // + // message MyRepeated { + // // The items in the field `value` must follow the specified rules. + // repeated string value = 1 [(buf.validate.field).repeated.items = { + // string: { + // min_len: 3 + // max_len: 10 + // } + // }]; + // } + // + // ``` + // + // Note that the `required` rule does not apply. Repeated items + // cannot be unset. + Items *FieldRules `protobuf:"bytes,4,opt,name=items" json:"items,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RepeatedRules) Reset() { + *x = RepeatedRules{} + mi := &file_buf_validate_validate_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RepeatedRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RepeatedRules) ProtoMessage() {} + +func (x *RepeatedRules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[22] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RepeatedRules.ProtoReflect.Descriptor instead. +func (*RepeatedRules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{22} +} + +func (x *RepeatedRules) GetMinItems() uint64 { + if x != nil && x.MinItems != nil { + return *x.MinItems + } + return 0 +} + +func (x *RepeatedRules) GetMaxItems() uint64 { + if x != nil && x.MaxItems != nil { + return *x.MaxItems + } + return 0 +} + +func (x *RepeatedRules) GetUnique() bool { + if x != nil && x.Unique != nil { + return *x.Unique + } + return false +} + +func (x *RepeatedRules) GetItems() *FieldRules { + if x != nil { + return x.Items + } + return nil +} + +// MapRules describe the rules applied to `map` values. +type MapRules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // Specifies the minimum number of key-value pairs allowed. If the field has + // fewer key-value pairs than specified, an error message is generated. + // + // ```proto + // + // message MyMap { + // // The field `value` must have at least 2 key-value pairs. + // map value = 1 [(buf.validate.field).map.min_pairs = 2]; + // } + // + // ``` + MinPairs *uint64 `protobuf:"varint,1,opt,name=min_pairs,json=minPairs" json:"min_pairs,omitempty"` + // Specifies the maximum number of key-value pairs allowed. If the field has + // more key-value pairs than specified, an error message is generated. + // + // ```proto + // + // message MyMap { + // // The field `value` must have at most 3 key-value pairs. + // map value = 1 [(buf.validate.field).map.max_pairs = 3]; + // } + // + // ``` + MaxPairs *uint64 `protobuf:"varint,2,opt,name=max_pairs,json=maxPairs" json:"max_pairs,omitempty"` + // Specifies the rules to be applied to each key in the field. + // + // ```proto + // + // message MyMap { + // // The keys in the field `value` must follow the specified rules. + // map value = 1 [(buf.validate.field).map.keys = { + // string: { + // min_len: 3 + // max_len: 10 + // } + // }]; + // } + // + // ``` + // + // Note that the `required` rule does not apply. Map keys cannot be unset. + Keys *FieldRules `protobuf:"bytes,4,opt,name=keys" json:"keys,omitempty"` + // Specifies the rules to be applied to the value of each key in the + // field. Message values will still have their validations evaluated unless + // `ignore` is specified. + // + // ```proto + // + // message MyMap { + // // The values in the field `value` must follow the specified rules. + // map value = 1 [(buf.validate.field).map.values = { + // string: { + // min_len: 5 + // max_len: 20 + // } + // }]; + // } + // + // ``` + // Note that the `required` rule does not apply. Map values cannot be unset. + Values *FieldRules `protobuf:"bytes,5,opt,name=values" json:"values,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *MapRules) Reset() { + *x = MapRules{} + mi := &file_buf_validate_validate_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *MapRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MapRules) ProtoMessage() {} + +func (x *MapRules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[23] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MapRules.ProtoReflect.Descriptor instead. +func (*MapRules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{23} +} + +func (x *MapRules) GetMinPairs() uint64 { + if x != nil && x.MinPairs != nil { + return *x.MinPairs + } + return 0 +} + +func (x *MapRules) GetMaxPairs() uint64 { + if x != nil && x.MaxPairs != nil { + return *x.MaxPairs + } + return 0 +} + +func (x *MapRules) GetKeys() *FieldRules { + if x != nil { + return x.Keys + } + return nil +} + +func (x *MapRules) GetValues() *FieldRules { + if x != nil { + return x.Values + } + return nil +} + +// AnyRules describe rules applied exclusively to the `google.protobuf.Any` well-known type. +type AnyRules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `in` requires the field's `type_url` to be equal to one of the + // specified values. If it doesn't match any of the specified values, an error + // message is generated. + // + // ```proto + // + // message MyAny { + // // The `value` field must have a `type_url` equal to one of the specified values. + // google.protobuf.Any value = 1 [(buf.validate.field).any = { + // in: ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"] + // }]; + // } + // + // ``` + In []string `protobuf:"bytes,2,rep,name=in" json:"in,omitempty"` + // `not_in` requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated. + // + // ```proto + // + // message MyAny { + // // The `value` field must not have a `type_url` equal to any of the specified values. + // google.protobuf.Any value = 1 [(buf.validate.field).any = { + // not_in: ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"] + // }]; + // } + // + // ``` + NotIn []string `protobuf:"bytes,3,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AnyRules) Reset() { + *x = AnyRules{} + mi := &file_buf_validate_validate_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AnyRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AnyRules) ProtoMessage() {} + +func (x *AnyRules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[24] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AnyRules.ProtoReflect.Descriptor instead. +func (*AnyRules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{24} +} + +func (x *AnyRules) GetIn() []string { + if x != nil { + return x.In + } + return nil +} + +func (x *AnyRules) GetNotIn() []string { + if x != nil { + return x.NotIn + } + return nil +} + +// DurationRules describe the rules applied exclusively to the `google.protobuf.Duration` well-known type. +type DurationRules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `const` dictates that the field must match the specified value of the `google.protobuf.Duration` type exactly. + // If the field's value deviates from the specified value, an error message + // will be generated. + // + // ```proto + // + // message MyDuration { + // // value must equal 5s + // google.protobuf.Duration value = 1 [(buf.validate.field).duration.const = "5s"]; + // } + // + // ``` + Const *durationpb.Duration `protobuf:"bytes,2,opt,name=const" json:"const,omitempty"` + // Types that are valid to be assigned to LessThan: + // + // *DurationRules_Lt + // *DurationRules_Lte + LessThan isDurationRules_LessThan `protobuf_oneof:"less_than"` + // Types that are valid to be assigned to GreaterThan: + // + // *DurationRules_Gt + // *DurationRules_Gte + GreaterThan isDurationRules_GreaterThan `protobuf_oneof:"greater_than"` + // `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type. + // If the field's value doesn't correspond to any of the specified values, + // an error message will be generated. + // + // ```proto + // + // message MyDuration { + // // must be in list [1s, 2s, 3s] + // google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]]; + // } + // + // ``` + In []*durationpb.Duration `protobuf:"bytes,7,rep,name=in" json:"in,omitempty"` + // `not_in` denotes that the field must not be equal to + // any of the specified values of the `google.protobuf.Duration` type. + // If the field's value matches any of these values, an error message will be + // generated. + // + // ```proto + // + // message MyDuration { + // // value must not be in list [1s, 2s, 3s] + // google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]]; + // } + // + // ``` + NotIn []*durationpb.Duration `protobuf:"bytes,8,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // `example` specifies values that the field may have. These values SHOULD + // conform to other rules. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // + // message MyDuration { + // google.protobuf.Duration value = 1 [ + // (buf.validate.field).duration.example = { seconds: 1 }, + // (buf.validate.field).duration.example = { seconds: 2 }, + // ]; + // } + // + // ``` + Example []*durationpb.Duration `protobuf:"bytes,9,rep,name=example" json:"example,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *DurationRules) Reset() { + *x = DurationRules{} + mi := &file_buf_validate_validate_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *DurationRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DurationRules) ProtoMessage() {} + +func (x *DurationRules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[25] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DurationRules.ProtoReflect.Descriptor instead. +func (*DurationRules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{25} +} + +func (x *DurationRules) GetConst() *durationpb.Duration { + if x != nil { + return x.Const + } + return nil +} + +func (x *DurationRules) GetLessThan() isDurationRules_LessThan { + if x != nil { + return x.LessThan + } + return nil +} + +func (x *DurationRules) GetLt() *durationpb.Duration { + if x != nil { + if x, ok := x.LessThan.(*DurationRules_Lt); ok { + return x.Lt + } + } + return nil +} + +func (x *DurationRules) GetLte() *durationpb.Duration { + if x != nil { + if x, ok := x.LessThan.(*DurationRules_Lte); ok { + return x.Lte + } + } + return nil +} + +func (x *DurationRules) GetGreaterThan() isDurationRules_GreaterThan { + if x != nil { + return x.GreaterThan + } + return nil +} + +func (x *DurationRules) GetGt() *durationpb.Duration { + if x != nil { + if x, ok := x.GreaterThan.(*DurationRules_Gt); ok { + return x.Gt + } + } + return nil +} + +func (x *DurationRules) GetGte() *durationpb.Duration { + if x != nil { + if x, ok := x.GreaterThan.(*DurationRules_Gte); ok { + return x.Gte + } + } + return nil +} + +func (x *DurationRules) GetIn() []*durationpb.Duration { + if x != nil { + return x.In + } + return nil +} + +func (x *DurationRules) GetNotIn() []*durationpb.Duration { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *DurationRules) GetExample() []*durationpb.Duration { + if x != nil { + return x.Example + } + return nil +} + +type isDurationRules_LessThan interface { + isDurationRules_LessThan() +} + +type DurationRules_Lt struct { + // `lt` stipulates that the field must be less than the specified value of the `google.protobuf.Duration` type, + // exclusive. If the field's value is greater than or equal to the specified + // value, an error message will be generated. + // + // ```proto + // + // message MyDuration { + // // must be less than 5s + // google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = "5s"]; + // } + // + // ``` + Lt *durationpb.Duration `protobuf:"bytes,3,opt,name=lt,oneof"` +} + +type DurationRules_Lte struct { + // `lte` indicates that the field must be less than or equal to the specified + // value of the `google.protobuf.Duration` type, inclusive. If the field's value is greater than the specified value, + // an error message will be generated. + // + // ```proto + // + // message MyDuration { + // // must be less than or equal to 10s + // google.protobuf.Duration value = 1 [(buf.validate.field).duration.lte = "10s"]; + // } + // + // ``` + Lte *durationpb.Duration `protobuf:"bytes,4,opt,name=lte,oneof"` +} + +func (*DurationRules_Lt) isDurationRules_LessThan() {} + +func (*DurationRules_Lte) isDurationRules_LessThan() {} + +type isDurationRules_GreaterThan interface { + isDurationRules_GreaterThan() +} + +type DurationRules_Gt struct { + // `gt` requires the duration field value to be greater than the specified + // value (exclusive). If the value of `gt` is larger than a specified `lt` + // or `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MyDuration { + // // duration must be greater than 5s [duration.gt] + // google.protobuf.Duration value = 1 [(buf.validate.field).duration.gt = { seconds: 5 }]; + // + // // duration must be greater than 5s and less than 10s [duration.gt_lt] + // google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gt: { seconds: 5 }, lt: { seconds: 10 } }]; + // + // // duration must be greater than 10s or less than 5s [duration.gt_lt_exclusive] + // google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gt: { seconds: 10 }, lt: { seconds: 5 } }]; + // } + // + // ``` + Gt *durationpb.Duration `protobuf:"bytes,5,opt,name=gt,oneof"` +} + +type DurationRules_Gte struct { + // `gte` requires the duration field value to be greater than or equal to the + // specified value (exclusive). If the value of `gte` is larger than a + // specified `lt` or `lte`, the range is reversed, and the field value must + // be outside the specified range. If the field value doesn't meet the + // required conditions, an error message is generated. + // + // ```proto + // + // message MyDuration { + // // duration must be greater than or equal to 5s [duration.gte] + // google.protobuf.Duration value = 1 [(buf.validate.field).duration.gte = { seconds: 5 }]; + // + // // duration must be greater than or equal to 5s and less than 10s [duration.gte_lt] + // google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gte: { seconds: 5 }, lt: { seconds: 10 } }]; + // + // // duration must be greater than or equal to 10s or less than 5s [duration.gte_lt_exclusive] + // google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gte: { seconds: 10 }, lt: { seconds: 5 } }]; + // } + // + // ``` + Gte *durationpb.Duration `protobuf:"bytes,6,opt,name=gte,oneof"` +} + +func (*DurationRules_Gt) isDurationRules_GreaterThan() {} + +func (*DurationRules_Gte) isDurationRules_GreaterThan() {} + +// FieldMaskRules describe rules applied exclusively to the `google.protobuf.FieldMask` well-known type. +type FieldMaskRules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `const` dictates that the field must match the specified value of the `google.protobuf.FieldMask` type exactly. + // If the field's value deviates from the specified value, an error message + // will be generated. + // + // ```proto + // + // message MyFieldMask { + // // value must equal ["a"] + // google.protobuf.FieldMask value = 1 [(buf.validate.field).field_mask.const = { + // paths: ["a"] + // }]; + // } + // + // ``` + Const *fieldmaskpb.FieldMask `protobuf:"bytes,1,opt,name=const" json:"const,omitempty"` + // `in` requires the field value to only contain paths matching specified + // values or their subpaths. + // If any of the field value's paths doesn't match the rule, + // an error message is generated. + // See: https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask + // + // ```proto + // + // message MyFieldMask { + // // The `value` FieldMask must only contain paths listed in `in`. + // google.protobuf.FieldMask value = 1 [(buf.validate.field).field_mask = { + // in: ["a", "b", "c.a"] + // }]; + // } + // + // ``` + In []string `protobuf:"bytes,2,rep,name=in" json:"in,omitempty"` + // `not_in` requires the field value to not contain paths matching specified + // values or their subpaths. + // If any of the field value's paths matches the rule, + // an error message is generated. + // See: https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask + // + // ```proto + // + // message MyFieldMask { + // // The `value` FieldMask shall not contain paths listed in `not_in`. + // google.protobuf.FieldMask value = 1 [(buf.validate.field).field_mask = { + // not_in: ["forbidden", "immutable", "c.a"] + // }]; + // } + // + // ``` + NotIn []string `protobuf:"bytes,3,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // `example` specifies values that the field may have. These values SHOULD + // conform to other rules. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // + // message MyFieldMask { + // google.protobuf.FieldMask value = 1 [ + // (buf.validate.field).field_mask.example = { paths: ["a", "b"] }, + // (buf.validate.field).field_mask.example = { paths: ["c.a", "d"] }, + // ]; + // } + // + // ``` + Example []*fieldmaskpb.FieldMask `protobuf:"bytes,4,rep,name=example" json:"example,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FieldMaskRules) Reset() { + *x = FieldMaskRules{} + mi := &file_buf_validate_validate_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FieldMaskRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FieldMaskRules) ProtoMessage() {} + +func (x *FieldMaskRules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[26] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FieldMaskRules.ProtoReflect.Descriptor instead. +func (*FieldMaskRules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{26} +} + +func (x *FieldMaskRules) GetConst() *fieldmaskpb.FieldMask { + if x != nil { + return x.Const + } + return nil +} + +func (x *FieldMaskRules) GetIn() []string { + if x != nil { + return x.In + } + return nil +} + +func (x *FieldMaskRules) GetNotIn() []string { + if x != nil { + return x.NotIn + } + return nil +} + +func (x *FieldMaskRules) GetExample() []*fieldmaskpb.FieldMask { + if x != nil { + return x.Example + } + return nil +} + +// TimestampRules describe the rules applied exclusively to the `google.protobuf.Timestamp` well-known type. +type TimestampRules struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `const` dictates that this field, of the `google.protobuf.Timestamp` type, must exactly match the specified value. If the field value doesn't correspond to the specified timestamp, an error message will be generated. + // + // ```proto + // + // message MyTimestamp { + // // value must equal 2023-05-03T10:00:00Z + // google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.const = {seconds: 1727998800}]; + // } + // + // ``` + Const *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=const" json:"const,omitempty"` + // Types that are valid to be assigned to LessThan: + // + // *TimestampRules_Lt + // *TimestampRules_Lte + // *TimestampRules_LtNow + LessThan isTimestampRules_LessThan `protobuf_oneof:"less_than"` + // Types that are valid to be assigned to GreaterThan: + // + // *TimestampRules_Gt + // *TimestampRules_Gte + // *TimestampRules_GtNow + GreaterThan isTimestampRules_GreaterThan `protobuf_oneof:"greater_than"` + // `within` specifies that this field, of the `google.protobuf.Timestamp` type, must be within the specified duration of the current time. If the field value isn't within the duration, an error message is generated. + // + // ```proto + // + // message MyTimestamp { + // // must be within 1 hour of now + // google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.within = {seconds: 3600}]; + // } + // + // ``` + Within *durationpb.Duration `protobuf:"bytes,9,opt,name=within" json:"within,omitempty"` + // `example` specifies values that the field may have. These values SHOULD + // conform to other rules. `example` values will not impact validation + // but may be used as helpful guidance on how to populate the given field. + // + // ```proto + // + // message MyTimestamp { + // google.protobuf.Timestamp value = 1 [ + // (buf.validate.field).timestamp.example = { seconds: 1672444800 }, + // (buf.validate.field).timestamp.example = { seconds: 1672531200 }, + // ]; + // } + // + // ``` + Example []*timestamppb.Timestamp `protobuf:"bytes,10,rep,name=example" json:"example,omitempty"` + extensionFields protoimpl.ExtensionFields + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TimestampRules) Reset() { + *x = TimestampRules{} + mi := &file_buf_validate_validate_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TimestampRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TimestampRules) ProtoMessage() {} + +func (x *TimestampRules) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[27] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TimestampRules.ProtoReflect.Descriptor instead. +func (*TimestampRules) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{27} +} + +func (x *TimestampRules) GetConst() *timestamppb.Timestamp { + if x != nil { + return x.Const + } + return nil +} + +func (x *TimestampRules) GetLessThan() isTimestampRules_LessThan { + if x != nil { + return x.LessThan + } + return nil +} + +func (x *TimestampRules) GetLt() *timestamppb.Timestamp { + if x != nil { + if x, ok := x.LessThan.(*TimestampRules_Lt); ok { + return x.Lt + } + } + return nil +} + +func (x *TimestampRules) GetLte() *timestamppb.Timestamp { + if x != nil { + if x, ok := x.LessThan.(*TimestampRules_Lte); ok { + return x.Lte + } + } + return nil +} + +func (x *TimestampRules) GetLtNow() bool { + if x != nil { + if x, ok := x.LessThan.(*TimestampRules_LtNow); ok { + return x.LtNow + } + } + return false +} + +func (x *TimestampRules) GetGreaterThan() isTimestampRules_GreaterThan { + if x != nil { + return x.GreaterThan + } + return nil +} + +func (x *TimestampRules) GetGt() *timestamppb.Timestamp { + if x != nil { + if x, ok := x.GreaterThan.(*TimestampRules_Gt); ok { + return x.Gt + } + } + return nil +} + +func (x *TimestampRules) GetGte() *timestamppb.Timestamp { + if x != nil { + if x, ok := x.GreaterThan.(*TimestampRules_Gte); ok { + return x.Gte + } + } + return nil +} + +func (x *TimestampRules) GetGtNow() bool { + if x != nil { + if x, ok := x.GreaterThan.(*TimestampRules_GtNow); ok { + return x.GtNow + } + } + return false +} + +func (x *TimestampRules) GetWithin() *durationpb.Duration { + if x != nil { + return x.Within + } + return nil +} + +func (x *TimestampRules) GetExample() []*timestamppb.Timestamp { + if x != nil { + return x.Example + } + return nil +} + +type isTimestampRules_LessThan interface { + isTimestampRules_LessThan() +} + +type TimestampRules_Lt struct { + // `lt` requires the timestamp field value to be less than the specified value (field < value). If the field value doesn't meet the required conditions, an error message is generated. + // + // ```proto + // + // message MyTimestamp { + // // timestamp must be less than '2023-01-01T00:00:00Z' [timestamp.lt] + // google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.lt = { seconds: 1672444800 }]; + // } + // + // ``` + Lt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=lt,oneof"` +} + +type TimestampRules_Lte struct { + // `lte` requires the timestamp field value to be less than or equal to the specified value (field <= value). If the field value doesn't meet the required conditions, an error message is generated. + // + // ```proto + // + // message MyTimestamp { + // // timestamp must be less than or equal to '2023-05-14T00:00:00Z' [timestamp.lte] + // google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.lte = { seconds: 1678867200 }]; + // } + // + // ``` + Lte *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=lte,oneof"` +} + +type TimestampRules_LtNow struct { + // `lt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be less than the current time. `lt_now` can only be used with the `within` rule. + // + // ```proto + // + // message MyTimestamp { + // // must be less than now + // google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.lt_now = true]; + // } + // + // ``` + LtNow bool `protobuf:"varint,7,opt,name=lt_now,json=ltNow,oneof"` +} + +func (*TimestampRules_Lt) isTimestampRules_LessThan() {} + +func (*TimestampRules_Lte) isTimestampRules_LessThan() {} + +func (*TimestampRules_LtNow) isTimestampRules_LessThan() {} + +type isTimestampRules_GreaterThan interface { + isTimestampRules_GreaterThan() +} + +type TimestampRules_Gt struct { + // `gt` requires the timestamp field value to be greater than the specified + // value (exclusive). If the value of `gt` is larger than a specified `lt` + // or `lte`, the range is reversed, and the field value must be outside the + // specified range. If the field value doesn't meet the required conditions, + // an error message is generated. + // + // ```proto + // + // message MyTimestamp { + // // timestamp must be greater than '2023-01-01T00:00:00Z' [timestamp.gt] + // google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gt = { seconds: 1672444800 }]; + // + // // timestamp must be greater than '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gt_lt] + // google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gt: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }]; + // + // // timestamp must be greater than '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gt_lt_exclusive] + // google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gt: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }]; + // } + // + // ``` + Gt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=gt,oneof"` +} + +type TimestampRules_Gte struct { + // `gte` requires the timestamp field value to be greater than or equal to the + // specified value (exclusive). If the value of `gte` is larger than a + // specified `lt` or `lte`, the range is reversed, and the field value + // must be outside the specified range. If the field value doesn't meet + // the required conditions, an error message is generated. + // + // ```proto + // + // message MyTimestamp { + // // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' [timestamp.gte] + // google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gte = { seconds: 1672444800 }]; + // + // // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gte_lt] + // google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gte: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }]; + // + // // timestamp must be greater than or equal to '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gte_lt_exclusive] + // google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gte: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }]; + // } + // + // ``` + Gte *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=gte,oneof"` +} + +type TimestampRules_GtNow struct { + // `gt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be greater than the current time. `gt_now` can only be used with the `within` rule. + // + // ```proto + // + // message MyTimestamp { + // // must be greater than now + // google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.gt_now = true]; + // } + // + // ``` + GtNow bool `protobuf:"varint,8,opt,name=gt_now,json=gtNow,oneof"` +} + +func (*TimestampRules_Gt) isTimestampRules_GreaterThan() {} + +func (*TimestampRules_Gte) isTimestampRules_GreaterThan() {} + +func (*TimestampRules_GtNow) isTimestampRules_GreaterThan() {} + +// `Violations` is a collection of `Violation` messages. This message type is returned by +// Protovalidate when a proto message fails to meet the requirements set by the `Rule` validation rules. +// Each individual violation is represented by a `Violation` message. +type Violations struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `violations` is a repeated field that contains all the `Violation` messages corresponding to the violations detected. + Violations []*Violation `protobuf:"bytes,1,rep,name=violations" json:"violations,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Violations) Reset() { + *x = Violations{} + mi := &file_buf_validate_validate_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Violations) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Violations) ProtoMessage() {} + +func (x *Violations) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[28] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Violations.ProtoReflect.Descriptor instead. +func (*Violations) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{28} +} + +func (x *Violations) GetViolations() []*Violation { + if x != nil { + return x.Violations + } + return nil +} + +// `Violation` represents a single instance where a validation rule, expressed +// as a `Rule`, was not met. It provides information about the field that +// caused the violation, the specific rule that wasn't fulfilled, and a +// human-readable error message. +// +// For example, consider the following message: +// +// ```proto +// +// message User { +// int32 age = 1 [(buf.validate.field).cel = { +// id: "user.age", +// expression: "this < 18 ? 'User must be at least 18 years old' : ''", +// }]; +// } +// +// ``` +// +// It could produce the following violation: +// +// ```json +// +// { +// "ruleId": "user.age", +// "message": "User must be at least 18 years old", +// "field": { +// "elements": [ +// { +// "fieldNumber": 1, +// "fieldName": "age", +// "fieldType": "TYPE_INT32" +// } +// ] +// }, +// "rule": { +// "elements": [ +// { +// "fieldNumber": 23, +// "fieldName": "cel", +// "fieldType": "TYPE_MESSAGE", +// "index": "0" +// } +// ] +// } +// } +// +// ``` +type Violation struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `field` is a machine-readable path to the field that failed validation. + // This could be a nested field, in which case the path will include all the parent fields leading to the actual field that caused the violation. + // + // For example, consider the following message: + // + // ```proto + // + // message Message { + // bool a = 1 [(buf.validate.field).required = true]; + // } + // + // ``` + // + // It could produce the following violation: + // + // ```textproto + // + // violation { + // field { element { field_number: 1, field_name: "a", field_type: 8 } } + // ... + // } + // + // ``` + Field *FieldPath `protobuf:"bytes,5,opt,name=field" json:"field,omitempty"` + // `rule` is a machine-readable path that points to the specific rule that failed validation. + // This will be a nested field starting from the FieldRules of the field that failed validation. + // For custom rules, this will provide the path of the rule, e.g. `cel[0]`. + // + // For example, consider the following message: + // + // ```proto + // + // message Message { + // bool a = 1 [(buf.validate.field).required = true]; + // bool b = 2 [(buf.validate.field).cel = { + // id: "custom_rule", + // expression: "!this ? 'b must be true': ''" + // }] + // } + // + // ``` + // + // It could produce the following violations: + // + // ```textproto + // + // violation { + // rule { element { field_number: 25, field_name: "required", field_type: 8 } } + // ... + // } + // + // violation { + // rule { element { field_number: 23, field_name: "cel", field_type: 11, index: 0 } } + // ... + // } + // + // ``` + Rule *FieldPath `protobuf:"bytes,6,opt,name=rule" json:"rule,omitempty"` + // `rule_id` is the unique identifier of the `Rule` that was not fulfilled. + // This is the same `id` that was specified in the `Rule` message, allowing easy tracing of which rule was violated. + RuleId *string `protobuf:"bytes,2,opt,name=rule_id,json=ruleId" json:"rule_id,omitempty"` + // `message` is a human-readable error message that describes the nature of the violation. + // This can be the default error message from the violated `Rule`, or it can be a custom message that gives more context about the violation. + Message *string `protobuf:"bytes,3,opt,name=message" json:"message,omitempty"` + // `for_key` indicates whether the violation was caused by a map key, rather than a value. + ForKey *bool `protobuf:"varint,4,opt,name=for_key,json=forKey" json:"for_key,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Violation) Reset() { + *x = Violation{} + mi := &file_buf_validate_validate_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Violation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Violation) ProtoMessage() {} + +func (x *Violation) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[29] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Violation.ProtoReflect.Descriptor instead. +func (*Violation) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{29} +} + +func (x *Violation) GetField() *FieldPath { + if x != nil { + return x.Field + } + return nil +} + +func (x *Violation) GetRule() *FieldPath { + if x != nil { + return x.Rule + } + return nil +} + +func (x *Violation) GetRuleId() string { + if x != nil && x.RuleId != nil { + return *x.RuleId + } + return "" +} + +func (x *Violation) GetMessage() string { + if x != nil && x.Message != nil { + return *x.Message + } + return "" +} + +func (x *Violation) GetForKey() bool { + if x != nil && x.ForKey != nil { + return *x.ForKey + } + return false +} + +// `FieldPath` provides a path to a nested protobuf field. +// +// This message provides enough information to render a dotted field path even without protobuf descriptors. +// It also provides enough information to resolve a nested field through unknown wire data. +type FieldPath struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `elements` contains each element of the path, starting from the root and recursing downward. + Elements []*FieldPathElement `protobuf:"bytes,1,rep,name=elements" json:"elements,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FieldPath) Reset() { + *x = FieldPath{} + mi := &file_buf_validate_validate_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FieldPath) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FieldPath) ProtoMessage() {} + +func (x *FieldPath) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[30] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FieldPath.ProtoReflect.Descriptor instead. +func (*FieldPath) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{30} +} + +func (x *FieldPath) GetElements() []*FieldPathElement { + if x != nil { + return x.Elements + } + return nil +} + +// `FieldPathElement` provides enough information to nest through a single protobuf field. +// +// If the selected field is a map or repeated field, the `subscript` value selects a specific element from it. +// A path that refers to a value nested under a map key or repeated field index will have a `subscript` value. +// The `field_type` field allows unambiguous resolution of a field even if descriptors are not available. +type FieldPathElement struct { + state protoimpl.MessageState `protogen:"open.v1"` + // `field_number` is the field number this path element refers to. + FieldNumber *int32 `protobuf:"varint,1,opt,name=field_number,json=fieldNumber" json:"field_number,omitempty"` + // `field_name` contains the field name this path element refers to. + // This can be used to display a human-readable path even if the field number is unknown. + FieldName *string `protobuf:"bytes,2,opt,name=field_name,json=fieldName" json:"field_name,omitempty"` + // `field_type` specifies the type of this field. When using reflection, this value is not needed. + // + // This value is provided to make it possible to traverse unknown fields through wire data. + // When traversing wire data, be mindful of both packed[1] and delimited[2] encoding schemes. + // + // N.B.: Although groups are deprecated, the corresponding delimited encoding scheme is not, and + // can be explicitly used in Protocol Buffers 2023 Edition. + // + // [1]: https://protobuf.dev/programming-guides/encoding/#packed + // [2]: https://protobuf.dev/programming-guides/encoding/#groups + FieldType *descriptorpb.FieldDescriptorProto_Type `protobuf:"varint,3,opt,name=field_type,json=fieldType,enum=google.protobuf.FieldDescriptorProto_Type" json:"field_type,omitempty"` + // `key_type` specifies the map key type of this field. This value is useful when traversing + // unknown fields through wire data: specifically, it allows handling the differences between + // different integer encodings. + KeyType *descriptorpb.FieldDescriptorProto_Type `protobuf:"varint,4,opt,name=key_type,json=keyType,enum=google.protobuf.FieldDescriptorProto_Type" json:"key_type,omitempty"` + // `value_type` specifies map value type of this field. This is useful if you want to display a + // value inside unknown fields through wire data. + ValueType *descriptorpb.FieldDescriptorProto_Type `protobuf:"varint,5,opt,name=value_type,json=valueType,enum=google.protobuf.FieldDescriptorProto_Type" json:"value_type,omitempty"` + // `subscript` contains a repeated index or map key, if this path element nests into a repeated or map field. + // + // Types that are valid to be assigned to Subscript: + // + // *FieldPathElement_Index + // *FieldPathElement_BoolKey + // *FieldPathElement_IntKey + // *FieldPathElement_UintKey + // *FieldPathElement_StringKey + Subscript isFieldPathElement_Subscript `protobuf_oneof:"subscript"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FieldPathElement) Reset() { + *x = FieldPathElement{} + mi := &file_buf_validate_validate_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FieldPathElement) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FieldPathElement) ProtoMessage() {} + +func (x *FieldPathElement) ProtoReflect() protoreflect.Message { + mi := &file_buf_validate_validate_proto_msgTypes[31] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FieldPathElement.ProtoReflect.Descriptor instead. +func (*FieldPathElement) Descriptor() ([]byte, []int) { + return file_buf_validate_validate_proto_rawDescGZIP(), []int{31} +} + +func (x *FieldPathElement) GetFieldNumber() int32 { + if x != nil && x.FieldNumber != nil { + return *x.FieldNumber + } + return 0 +} + +func (x *FieldPathElement) GetFieldName() string { + if x != nil && x.FieldName != nil { + return *x.FieldName + } + return "" +} + +func (x *FieldPathElement) GetFieldType() descriptorpb.FieldDescriptorProto_Type { + if x != nil && x.FieldType != nil { + return *x.FieldType + } + return descriptorpb.FieldDescriptorProto_Type(1) +} + +func (x *FieldPathElement) GetKeyType() descriptorpb.FieldDescriptorProto_Type { + if x != nil && x.KeyType != nil { + return *x.KeyType + } + return descriptorpb.FieldDescriptorProto_Type(1) +} + +func (x *FieldPathElement) GetValueType() descriptorpb.FieldDescriptorProto_Type { + if x != nil && x.ValueType != nil { + return *x.ValueType + } + return descriptorpb.FieldDescriptorProto_Type(1) +} + +func (x *FieldPathElement) GetSubscript() isFieldPathElement_Subscript { + if x != nil { + return x.Subscript + } + return nil +} + +func (x *FieldPathElement) GetIndex() uint64 { + if x != nil { + if x, ok := x.Subscript.(*FieldPathElement_Index); ok { + return x.Index + } + } + return 0 +} + +func (x *FieldPathElement) GetBoolKey() bool { + if x != nil { + if x, ok := x.Subscript.(*FieldPathElement_BoolKey); ok { + return x.BoolKey + } + } + return false +} + +func (x *FieldPathElement) GetIntKey() int64 { + if x != nil { + if x, ok := x.Subscript.(*FieldPathElement_IntKey); ok { + return x.IntKey + } + } + return 0 +} + +func (x *FieldPathElement) GetUintKey() uint64 { + if x != nil { + if x, ok := x.Subscript.(*FieldPathElement_UintKey); ok { + return x.UintKey + } + } + return 0 +} + +func (x *FieldPathElement) GetStringKey() string { + if x != nil { + if x, ok := x.Subscript.(*FieldPathElement_StringKey); ok { + return x.StringKey + } + } + return "" +} + +type isFieldPathElement_Subscript interface { + isFieldPathElement_Subscript() +} + +type FieldPathElement_Index struct { + // `index` specifies a 0-based index into a repeated field. + Index uint64 `protobuf:"varint,6,opt,name=index,oneof"` +} + +type FieldPathElement_BoolKey struct { + // `bool_key` specifies a map key of type bool. + BoolKey bool `protobuf:"varint,7,opt,name=bool_key,json=boolKey,oneof"` +} + +type FieldPathElement_IntKey struct { + // `int_key` specifies a map key of type int32, int64, sint32, sint64, sfixed32 or sfixed64. + IntKey int64 `protobuf:"varint,8,opt,name=int_key,json=intKey,oneof"` +} + +type FieldPathElement_UintKey struct { + // `uint_key` specifies a map key of type uint32, uint64, fixed32 or fixed64. + UintKey uint64 `protobuf:"varint,9,opt,name=uint_key,json=uintKey,oneof"` +} + +type FieldPathElement_StringKey struct { + // `string_key` specifies a map key of type string. + StringKey string `protobuf:"bytes,10,opt,name=string_key,json=stringKey,oneof"` +} + +func (*FieldPathElement_Index) isFieldPathElement_Subscript() {} + +func (*FieldPathElement_BoolKey) isFieldPathElement_Subscript() {} + +func (*FieldPathElement_IntKey) isFieldPathElement_Subscript() {} + +func (*FieldPathElement_UintKey) isFieldPathElement_Subscript() {} + +func (*FieldPathElement_StringKey) isFieldPathElement_Subscript() {} + +var file_buf_validate_validate_proto_extTypes = []protoimpl.ExtensionInfo{ + { + ExtendedType: (*descriptorpb.MessageOptions)(nil), + ExtensionType: (*MessageRules)(nil), + Field: 1159, + Name: "buf.validate.message", + Tag: "bytes,1159,opt,name=message", + Filename: "buf/validate/validate.proto", + }, + { + ExtendedType: (*descriptorpb.OneofOptions)(nil), + ExtensionType: (*OneofRules)(nil), + Field: 1159, + Name: "buf.validate.oneof", + Tag: "bytes,1159,opt,name=oneof", + Filename: "buf/validate/validate.proto", + }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*FieldRules)(nil), + Field: 1159, + Name: "buf.validate.field", + Tag: "bytes,1159,opt,name=field", + Filename: "buf/validate/validate.proto", + }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*PredefinedRules)(nil), + Field: 1160, + Name: "buf.validate.predefined", + Tag: "bytes,1160,opt,name=predefined", + Filename: "buf/validate/validate.proto", + }, +} + +// Extension fields to descriptorpb.MessageOptions. +var ( + // Rules specify the validations to be performed on this message. By default, + // no validation is performed against a message. + // + // optional buf.validate.MessageRules message = 1159; + E_Message = &file_buf_validate_validate_proto_extTypes[0] +) + +// Extension fields to descriptorpb.OneofOptions. +var ( + // Rules specify the validations to be performed on this oneof. By default, + // no validation is performed against a oneof. + // + // optional buf.validate.OneofRules oneof = 1159; + E_Oneof = &file_buf_validate_validate_proto_extTypes[1] +) + +// Extension fields to descriptorpb.FieldOptions. +var ( + // Rules specify the validations to be performed on this field. By default, + // no validation is performed against a field. + // + // optional buf.validate.FieldRules field = 1159; + E_Field = &file_buf_validate_validate_proto_extTypes[2] + // Specifies predefined rules. When extending a standard rule message, + // this adds additional CEL expressions that apply when the extension is used. + // + // ```proto + // + // extend buf.validate.Int32Rules { + // bool is_zero [(buf.validate.predefined).cel = { + // id: "int32.is_zero", + // message: "must be zero", + // expression: "!rule || this == 0", + // }]; + // } + // + // message Foo { + // int32 reserved = 1 [(buf.validate.field).int32.(is_zero) = true]; + // } + // + // ``` + // + // optional buf.validate.PredefinedRules predefined = 1160; + E_Predefined = &file_buf_validate_validate_proto_extTypes[3] +) + +var File_buf_validate_validate_proto protoreflect.FileDescriptor + +const file_buf_validate_validate_proto_rawDesc = "" + + "\n" + + "\x1bbuf/validate/validate.proto\x12\fbuf.validate\x1a google/protobuf/descriptor.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"P\n" + + "\x04Rule\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x18\n" + + "\amessage\x18\x02 \x01(\tR\amessage\x12\x1e\n" + + "\n" + + "expression\x18\x03 \x01(\tR\n" + + "expression\"\xa1\x01\n" + + "\fMessageRules\x12%\n" + + "\x0ecel_expression\x18\x05 \x03(\tR\rcelExpression\x12$\n" + + "\x03cel\x18\x03 \x03(\v2\x12.buf.validate.RuleR\x03cel\x124\n" + + "\x05oneof\x18\x04 \x03(\v2\x1e.buf.validate.MessageOneofRuleR\x05oneofJ\x04\b\x01\x10\x02R\bdisabled\"F\n" + + "\x10MessageOneofRule\x12\x16\n" + + "\x06fields\x18\x01 \x03(\tR\x06fields\x12\x1a\n" + + "\brequired\x18\x02 \x01(\bR\brequired\"(\n" + + "\n" + + "OneofRules\x12\x1a\n" + + "\brequired\x18\x01 \x01(\bR\brequired\"\xe3\n" + + "\n" + + "\n" + + "FieldRules\x12%\n" + + "\x0ecel_expression\x18\x1d \x03(\tR\rcelExpression\x12$\n" + + "\x03cel\x18\x17 \x03(\v2\x12.buf.validate.RuleR\x03cel\x12\x1a\n" + + "\brequired\x18\x19 \x01(\bR\brequired\x12,\n" + + "\x06ignore\x18\x1b \x01(\x0e2\x14.buf.validate.IgnoreR\x06ignore\x120\n" + + "\x05float\x18\x01 \x01(\v2\x18.buf.validate.FloatRulesH\x00R\x05float\x123\n" + + "\x06double\x18\x02 \x01(\v2\x19.buf.validate.DoubleRulesH\x00R\x06double\x120\n" + + "\x05int32\x18\x03 \x01(\v2\x18.buf.validate.Int32RulesH\x00R\x05int32\x120\n" + + "\x05int64\x18\x04 \x01(\v2\x18.buf.validate.Int64RulesH\x00R\x05int64\x123\n" + + "\x06uint32\x18\x05 \x01(\v2\x19.buf.validate.UInt32RulesH\x00R\x06uint32\x123\n" + + "\x06uint64\x18\x06 \x01(\v2\x19.buf.validate.UInt64RulesH\x00R\x06uint64\x123\n" + + "\x06sint32\x18\a \x01(\v2\x19.buf.validate.SInt32RulesH\x00R\x06sint32\x123\n" + + "\x06sint64\x18\b \x01(\v2\x19.buf.validate.SInt64RulesH\x00R\x06sint64\x126\n" + + "\afixed32\x18\t \x01(\v2\x1a.buf.validate.Fixed32RulesH\x00R\afixed32\x126\n" + + "\afixed64\x18\n" + + " \x01(\v2\x1a.buf.validate.Fixed64RulesH\x00R\afixed64\x129\n" + + "\bsfixed32\x18\v \x01(\v2\x1b.buf.validate.SFixed32RulesH\x00R\bsfixed32\x129\n" + + "\bsfixed64\x18\f \x01(\v2\x1b.buf.validate.SFixed64RulesH\x00R\bsfixed64\x12-\n" + + "\x04bool\x18\r \x01(\v2\x17.buf.validate.BoolRulesH\x00R\x04bool\x123\n" + + "\x06string\x18\x0e \x01(\v2\x19.buf.validate.StringRulesH\x00R\x06string\x120\n" + + "\x05bytes\x18\x0f \x01(\v2\x18.buf.validate.BytesRulesH\x00R\x05bytes\x12-\n" + + "\x04enum\x18\x10 \x01(\v2\x17.buf.validate.EnumRulesH\x00R\x04enum\x129\n" + + "\brepeated\x18\x12 \x01(\v2\x1b.buf.validate.RepeatedRulesH\x00R\brepeated\x12*\n" + + "\x03map\x18\x13 \x01(\v2\x16.buf.validate.MapRulesH\x00R\x03map\x12*\n" + + "\x03any\x18\x14 \x01(\v2\x16.buf.validate.AnyRulesH\x00R\x03any\x129\n" + + "\bduration\x18\x15 \x01(\v2\x1b.buf.validate.DurationRulesH\x00R\bduration\x12=\n" + + "\n" + + "field_mask\x18\x1c \x01(\v2\x1c.buf.validate.FieldMaskRulesH\x00R\tfieldMask\x12<\n" + + "\ttimestamp\x18\x16 \x01(\v2\x1c.buf.validate.TimestampRulesH\x00R\ttimestampB\x06\n" + + "\x04typeJ\x04\b\x18\x10\x19J\x04\b\x1a\x10\x1bR\askippedR\fignore_empty\"Z\n" + + "\x0fPredefinedRules\x12$\n" + + "\x03cel\x18\x01 \x03(\v2\x12.buf.validate.RuleR\x03celJ\x04\b\x18\x10\x19J\x04\b\x1a\x10\x1bR\askippedR\fignore_empty\"\xae\x17\n" + + "\n" + + "FloatRules\x12\x84\x01\n" + + "\x05const\x18\x01 \x01(\x02Bn\xc2Hk\n" + + "i\n" + + "\vfloat.const\x1aZthis != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''R\x05const\x12\x9d\x01\n" + + "\x02lt\x18\x02 \x01(\x02B\x8a\x01\xc2H\x86\x01\n" + + "\x83\x01\n" + + "\bfloat.lt\x1aw!has(rules.gte) && !has(rules.gt) && (this.isNan() || this >= rules.lt)? 'must be less than %s'.format([rules.lt]) : ''H\x00R\x02lt\x12\xae\x01\n" + + "\x03lte\x18\x03 \x01(\x02B\x99\x01\xc2H\x95\x01\n" + + "\x92\x01\n" + + "\tfloat.lte\x1a\x84\x01!has(rules.gte) && !has(rules.gt) && (this.isNan() || this > rules.lte)? 'must be less than or equal to %s'.format([rules.lte]) : ''H\x00R\x03lte\x12\xd4\a\n" + + "\x02gt\x18\x04 \x01(\x02B\xc1\a\xc2H\xbd\a\n" + + "\x86\x01\n" + + "\bfloat.gt\x1az!has(rules.lt) && !has(rules.lte) && (this.isNan() || this <= rules.gt)? 'must be greater than %s'.format([rules.gt]) : ''\n" + + "\xbd\x01\n" + + "\vfloat.gt_lt\x1a\xad\x01has(rules.lt) && rules.lt >= rules.gt && (this.isNan() || this >= rules.lt || this <= rules.gt)? 'must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''\n" + + "\xc7\x01\n" + + "\x15float.gt_lt_exclusive\x1a\xad\x01has(rules.lt) && rules.lt < rules.gt && (this.isNan() || (rules.lt <= this && this <= rules.gt))? 'must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''\n" + + "\xcd\x01\n" + + "\ffloat.gt_lte\x1a\xbc\x01has(rules.lte) && rules.lte >= rules.gt && (this.isNan() || this > rules.lte || this <= rules.gt)? 'must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''\n" + + "\xd7\x01\n" + + "\x16float.gt_lte_exclusive\x1a\xbc\x01has(rules.lte) && rules.lte < rules.gt && (this.isNan() || (rules.lte < this && this <= rules.gt))? 'must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''H\x01R\x02gt\x12\xa1\b\n" + + "\x03gte\x18\x05 \x01(\x02B\x8c\b\xc2H\x88\b\n" + + "\x95\x01\n" + + "\tfloat.gte\x1a\x87\x01!has(rules.lt) && !has(rules.lte) && (this.isNan() || this < rules.gte)? 'must be greater than or equal to %s'.format([rules.gte]) : ''\n" + + "\xcc\x01\n" + + "\ffloat.gte_lt\x1a\xbb\x01has(rules.lt) && rules.lt >= rules.gte && (this.isNan() || this >= rules.lt || this < rules.gte)? 'must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''\n" + + "\xd6\x01\n" + + "\x16float.gte_lt_exclusive\x1a\xbb\x01has(rules.lt) && rules.lt < rules.gte && (this.isNan() || (rules.lt <= this && this < rules.gte))? 'must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''\n" + + "\xdc\x01\n" + + "\rfloat.gte_lte\x1a\xca\x01has(rules.lte) && rules.lte >= rules.gte && (this.isNan() || this > rules.lte || this < rules.gte)? 'must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''\n" + + "\xe6\x01\n" + + "\x17float.gte_lte_exclusive\x1a\xca\x01has(rules.lte) && rules.lte < rules.gte && (this.isNan() || (rules.lte < this && this < rules.gte))? 'must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''H\x01R\x03gte\x12}\n" + + "\x02in\x18\x06 \x03(\x02Bm\xc2Hj\n" + + "h\n" + + "\bfloat.in\x1a\\!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''R\x02in\x12w\n" + + "\x06not_in\x18\a \x03(\x02B`\xc2H]\n" + + "[\n" + + "\ffloat.not_in\x1aKthis in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''R\x05notIn\x12w\n" + + "\x06finite\x18\b \x01(\bB_\xc2H\\\n" + + "Z\n" + + "\ffloat.finite\x1aJrules.finite ? (this.isNan() || this.isInf() ? 'must be finite' : '') : ''R\x06finite\x124\n" + + "\aexample\x18\t \x03(\x02B\x1a\xc2H\x17\n" + + "\x15\n" + + "\rfloat.example\x1a\x04trueR\aexample*\t\b\xe8\a\x10\x80\x80\x80\x80\x02B\v\n" + + "\tless_thanB\x0e\n" + + "\fgreater_than\"\xc0\x17\n" + + "\vDoubleRules\x12\x85\x01\n" + + "\x05const\x18\x01 \x01(\x01Bo\xc2Hl\n" + + "j\n" + + "\fdouble.const\x1aZthis != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''R\x05const\x12\x9e\x01\n" + + "\x02lt\x18\x02 \x01(\x01B\x8b\x01\xc2H\x87\x01\n" + + "\x84\x01\n" + + "\tdouble.lt\x1aw!has(rules.gte) && !has(rules.gt) && (this.isNan() || this >= rules.lt)? 'must be less than %s'.format([rules.lt]) : ''H\x00R\x02lt\x12\xaf\x01\n" + + "\x03lte\x18\x03 \x01(\x01B\x9a\x01\xc2H\x96\x01\n" + + "\x93\x01\n" + + "\n" + + "double.lte\x1a\x84\x01!has(rules.gte) && !has(rules.gt) && (this.isNan() || this > rules.lte)? 'must be less than or equal to %s'.format([rules.lte]) : ''H\x00R\x03lte\x12\xd9\a\n" + + "\x02gt\x18\x04 \x01(\x01B\xc6\a\xc2H\xc2\a\n" + + "\x87\x01\n" + + "\tdouble.gt\x1az!has(rules.lt) && !has(rules.lte) && (this.isNan() || this <= rules.gt)? 'must be greater than %s'.format([rules.gt]) : ''\n" + + "\xbe\x01\n" + + "\fdouble.gt_lt\x1a\xad\x01has(rules.lt) && rules.lt >= rules.gt && (this.isNan() || this >= rules.lt || this <= rules.gt)? 'must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''\n" + + "\xc8\x01\n" + + "\x16double.gt_lt_exclusive\x1a\xad\x01has(rules.lt) && rules.lt < rules.gt && (this.isNan() || (rules.lt <= this && this <= rules.gt))? 'must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''\n" + + "\xce\x01\n" + + "\rdouble.gt_lte\x1a\xbc\x01has(rules.lte) && rules.lte >= rules.gt && (this.isNan() || this > rules.lte || this <= rules.gt)? 'must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''\n" + + "\xd8\x01\n" + + "\x17double.gt_lte_exclusive\x1a\xbc\x01has(rules.lte) && rules.lte < rules.gt && (this.isNan() || (rules.lte < this && this <= rules.gt))? 'must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''H\x01R\x02gt\x12\xa6\b\n" + + "\x03gte\x18\x05 \x01(\x01B\x91\b\xc2H\x8d\b\n" + + "\x96\x01\n" + + "\n" + + "double.gte\x1a\x87\x01!has(rules.lt) && !has(rules.lte) && (this.isNan() || this < rules.gte)? 'must be greater than or equal to %s'.format([rules.gte]) : ''\n" + + "\xcd\x01\n" + + "\rdouble.gte_lt\x1a\xbb\x01has(rules.lt) && rules.lt >= rules.gte && (this.isNan() || this >= rules.lt || this < rules.gte)? 'must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''\n" + + "\xd7\x01\n" + + "\x17double.gte_lt_exclusive\x1a\xbb\x01has(rules.lt) && rules.lt < rules.gte && (this.isNan() || (rules.lt <= this && this < rules.gte))? 'must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''\n" + + "\xdd\x01\n" + + "\x0edouble.gte_lte\x1a\xca\x01has(rules.lte) && rules.lte >= rules.gte && (this.isNan() || this > rules.lte || this < rules.gte)? 'must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''\n" + + "\xe7\x01\n" + + "\x18double.gte_lte_exclusive\x1a\xca\x01has(rules.lte) && rules.lte < rules.gte && (this.isNan() || (rules.lte < this && this < rules.gte))? 'must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''H\x01R\x03gte\x12~\n" + + "\x02in\x18\x06 \x03(\x01Bn\xc2Hk\n" + + "i\n" + + "\tdouble.in\x1a\\!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''R\x02in\x12x\n" + + "\x06not_in\x18\a \x03(\x01Ba\xc2H^\n" + + "\\\n" + + "\rdouble.not_in\x1aKthis in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''R\x05notIn\x12x\n" + + "\x06finite\x18\b \x01(\bB`\xc2H]\n" + + "[\n" + + "\rdouble.finite\x1aJrules.finite ? (this.isNan() || this.isInf() ? 'must be finite' : '') : ''R\x06finite\x125\n" + + "\aexample\x18\t \x03(\x01B\x1b\xc2H\x18\n" + + "\x16\n" + + "\x0edouble.example\x1a\x04trueR\aexample*\t\b\xe8\a\x10\x80\x80\x80\x80\x02B\v\n" + + "\tless_thanB\x0e\n" + + "\fgreater_than\"\xde\x14\n" + + "\n" + + "Int32Rules\x12\x84\x01\n" + + "\x05const\x18\x01 \x01(\x05Bn\xc2Hk\n" + + "i\n" + + "\vint32.const\x1aZthis != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''R\x05const\x12\x88\x01\n" + + "\x02lt\x18\x02 \x01(\x05Bv\xc2Hs\n" + + "q\n" + + "\bint32.lt\x1ae!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'must be less than %s'.format([rules.lt]) : ''H\x00R\x02lt\x12\x9a\x01\n" + + "\x03lte\x18\x03 \x01(\x05B\x85\x01\xc2H\x81\x01\n" + + "\x7f\n" + + "\tint32.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'must be less than or equal to %s'.format([rules.lte]) : ''H\x00R\x03lte\x12\xfd\x06\n" + + "\x02gt\x18\x04 \x01(\x05B\xea\x06\xc2H\xe6\x06\n" + + "t\n" + + "\bint32.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'must be greater than %s'.format([rules.gt]) : ''\n" + + "\xad\x01\n" + + "\vint32.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''\n" + + "\xb5\x01\n" + + "\x15int32.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''\n" + + "\xbd\x01\n" + + "\fint32.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''\n" + + "\xc5\x01\n" + + "\x16int32.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''H\x01R\x02gt\x12\xca\a\n" + + "\x03gte\x18\x05 \x01(\x05B\xb5\a\xc2H\xb1\a\n" + + "\x82\x01\n" + + "\tint32.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'must be greater than or equal to %s'.format([rules.gte]) : ''\n" + + "\xbc\x01\n" + + "\fint32.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''\n" + + "\xc4\x01\n" + + "\x16int32.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''\n" + + "\xcc\x01\n" + + "\rint32.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''\n" + + "\xd4\x01\n" + + "\x17int32.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''H\x01R\x03gte\x12}\n" + + "\x02in\x18\x06 \x03(\x05Bm\xc2Hj\n" + + "h\n" + + "\bint32.in\x1a\\!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''R\x02in\x12w\n" + + "\x06not_in\x18\a \x03(\x05B`\xc2H]\n" + + "[\n" + + "\fint32.not_in\x1aKthis in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''R\x05notIn\x124\n" + + "\aexample\x18\b \x03(\x05B\x1a\xc2H\x17\n" + + "\x15\n" + + "\rint32.example\x1a\x04trueR\aexample*\t\b\xe8\a\x10\x80\x80\x80\x80\x02B\v\n" + + "\tless_thanB\x0e\n" + + "\fgreater_than\"\xde\x14\n" + + "\n" + + "Int64Rules\x12\x84\x01\n" + + "\x05const\x18\x01 \x01(\x03Bn\xc2Hk\n" + + "i\n" + + "\vint64.const\x1aZthis != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''R\x05const\x12\x88\x01\n" + + "\x02lt\x18\x02 \x01(\x03Bv\xc2Hs\n" + + "q\n" + + "\bint64.lt\x1ae!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'must be less than %s'.format([rules.lt]) : ''H\x00R\x02lt\x12\x9a\x01\n" + + "\x03lte\x18\x03 \x01(\x03B\x85\x01\xc2H\x81\x01\n" + + "\x7f\n" + + "\tint64.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'must be less than or equal to %s'.format([rules.lte]) : ''H\x00R\x03lte\x12\xfd\x06\n" + + "\x02gt\x18\x04 \x01(\x03B\xea\x06\xc2H\xe6\x06\n" + + "t\n" + + "\bint64.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'must be greater than %s'.format([rules.gt]) : ''\n" + + "\xad\x01\n" + + "\vint64.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''\n" + + "\xb5\x01\n" + + "\x15int64.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''\n" + + "\xbd\x01\n" + + "\fint64.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''\n" + + "\xc5\x01\n" + + "\x16int64.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''H\x01R\x02gt\x12\xca\a\n" + + "\x03gte\x18\x05 \x01(\x03B\xb5\a\xc2H\xb1\a\n" + + "\x82\x01\n" + + "\tint64.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'must be greater than or equal to %s'.format([rules.gte]) : ''\n" + + "\xbc\x01\n" + + "\fint64.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''\n" + + "\xc4\x01\n" + + "\x16int64.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''\n" + + "\xcc\x01\n" + + "\rint64.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''\n" + + "\xd4\x01\n" + + "\x17int64.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''H\x01R\x03gte\x12}\n" + + "\x02in\x18\x06 \x03(\x03Bm\xc2Hj\n" + + "h\n" + + "\bint64.in\x1a\\!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''R\x02in\x12w\n" + + "\x06not_in\x18\a \x03(\x03B`\xc2H]\n" + + "[\n" + + "\fint64.not_in\x1aKthis in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''R\x05notIn\x124\n" + + "\aexample\x18\t \x03(\x03B\x1a\xc2H\x17\n" + + "\x15\n" + + "\rint64.example\x1a\x04trueR\aexample*\t\b\xe8\a\x10\x80\x80\x80\x80\x02B\v\n" + + "\tless_thanB\x0e\n" + + "\fgreater_than\"\xf0\x14\n" + + "\vUInt32Rules\x12\x85\x01\n" + + "\x05const\x18\x01 \x01(\rBo\xc2Hl\n" + + "j\n" + + "\fuint32.const\x1aZthis != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''R\x05const\x12\x89\x01\n" + + "\x02lt\x18\x02 \x01(\rBw\xc2Ht\n" + + "r\n" + + "\tuint32.lt\x1ae!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'must be less than %s'.format([rules.lt]) : ''H\x00R\x02lt\x12\x9c\x01\n" + + "\x03lte\x18\x03 \x01(\rB\x87\x01\xc2H\x83\x01\n" + + "\x80\x01\n" + + "\n" + + "uint32.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'must be less than or equal to %s'.format([rules.lte]) : ''H\x00R\x03lte\x12\x82\a\n" + + "\x02gt\x18\x04 \x01(\rB\xef\x06\xc2H\xeb\x06\n" + + "u\n" + + "\tuint32.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'must be greater than %s'.format([rules.gt]) : ''\n" + + "\xae\x01\n" + + "\fuint32.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''\n" + + "\xb6\x01\n" + + "\x16uint32.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''\n" + + "\xbe\x01\n" + + "\ruint32.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''\n" + + "\xc6\x01\n" + + "\x17uint32.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''H\x01R\x02gt\x12\xcf\a\n" + + "\x03gte\x18\x05 \x01(\rB\xba\a\xc2H\xb6\a\n" + + "\x83\x01\n" + + "\n" + + "uint32.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'must be greater than or equal to %s'.format([rules.gte]) : ''\n" + + "\xbd\x01\n" + + "\ruint32.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''\n" + + "\xc5\x01\n" + + "\x17uint32.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''\n" + + "\xcd\x01\n" + + "\x0euint32.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''\n" + + "\xd5\x01\n" + + "\x18uint32.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''H\x01R\x03gte\x12~\n" + + "\x02in\x18\x06 \x03(\rBn\xc2Hk\n" + + "i\n" + + "\tuint32.in\x1a\\!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''R\x02in\x12x\n" + + "\x06not_in\x18\a \x03(\rBa\xc2H^\n" + + "\\\n" + + "\ruint32.not_in\x1aKthis in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''R\x05notIn\x125\n" + + "\aexample\x18\b \x03(\rB\x1b\xc2H\x18\n" + + "\x16\n" + + "\x0euint32.example\x1a\x04trueR\aexample*\t\b\xe8\a\x10\x80\x80\x80\x80\x02B\v\n" + + "\tless_thanB\x0e\n" + + "\fgreater_than\"\xf0\x14\n" + + "\vUInt64Rules\x12\x85\x01\n" + + "\x05const\x18\x01 \x01(\x04Bo\xc2Hl\n" + + "j\n" + + "\fuint64.const\x1aZthis != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''R\x05const\x12\x89\x01\n" + + "\x02lt\x18\x02 \x01(\x04Bw\xc2Ht\n" + + "r\n" + + "\tuint64.lt\x1ae!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'must be less than %s'.format([rules.lt]) : ''H\x00R\x02lt\x12\x9c\x01\n" + + "\x03lte\x18\x03 \x01(\x04B\x87\x01\xc2H\x83\x01\n" + + "\x80\x01\n" + + "\n" + + "uint64.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'must be less than or equal to %s'.format([rules.lte]) : ''H\x00R\x03lte\x12\x82\a\n" + + "\x02gt\x18\x04 \x01(\x04B\xef\x06\xc2H\xeb\x06\n" + + "u\n" + + "\tuint64.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'must be greater than %s'.format([rules.gt]) : ''\n" + + "\xae\x01\n" + + "\fuint64.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''\n" + + "\xb6\x01\n" + + "\x16uint64.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''\n" + + "\xbe\x01\n" + + "\ruint64.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''\n" + + "\xc6\x01\n" + + "\x17uint64.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''H\x01R\x02gt\x12\xcf\a\n" + + "\x03gte\x18\x05 \x01(\x04B\xba\a\xc2H\xb6\a\n" + + "\x83\x01\n" + + "\n" + + "uint64.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'must be greater than or equal to %s'.format([rules.gte]) : ''\n" + + "\xbd\x01\n" + + "\ruint64.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''\n" + + "\xc5\x01\n" + + "\x17uint64.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''\n" + + "\xcd\x01\n" + + "\x0euint64.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''\n" + + "\xd5\x01\n" + + "\x18uint64.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''H\x01R\x03gte\x12~\n" + + "\x02in\x18\x06 \x03(\x04Bn\xc2Hk\n" + + "i\n" + + "\tuint64.in\x1a\\!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''R\x02in\x12x\n" + + "\x06not_in\x18\a \x03(\x04Ba\xc2H^\n" + + "\\\n" + + "\ruint64.not_in\x1aKthis in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''R\x05notIn\x125\n" + + "\aexample\x18\b \x03(\x04B\x1b\xc2H\x18\n" + + "\x16\n" + + "\x0euint64.example\x1a\x04trueR\aexample*\t\b\xe8\a\x10\x80\x80\x80\x80\x02B\v\n" + + "\tless_thanB\x0e\n" + + "\fgreater_than\"\xf0\x14\n" + + "\vSInt32Rules\x12\x85\x01\n" + + "\x05const\x18\x01 \x01(\x11Bo\xc2Hl\n" + + "j\n" + + "\fsint32.const\x1aZthis != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''R\x05const\x12\x89\x01\n" + + "\x02lt\x18\x02 \x01(\x11Bw\xc2Ht\n" + + "r\n" + + "\tsint32.lt\x1ae!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'must be less than %s'.format([rules.lt]) : ''H\x00R\x02lt\x12\x9c\x01\n" + + "\x03lte\x18\x03 \x01(\x11B\x87\x01\xc2H\x83\x01\n" + + "\x80\x01\n" + + "\n" + + "sint32.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'must be less than or equal to %s'.format([rules.lte]) : ''H\x00R\x03lte\x12\x82\a\n" + + "\x02gt\x18\x04 \x01(\x11B\xef\x06\xc2H\xeb\x06\n" + + "u\n" + + "\tsint32.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'must be greater than %s'.format([rules.gt]) : ''\n" + + "\xae\x01\n" + + "\fsint32.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''\n" + + "\xb6\x01\n" + + "\x16sint32.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''\n" + + "\xbe\x01\n" + + "\rsint32.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''\n" + + "\xc6\x01\n" + + "\x17sint32.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''H\x01R\x02gt\x12\xcf\a\n" + + "\x03gte\x18\x05 \x01(\x11B\xba\a\xc2H\xb6\a\n" + + "\x83\x01\n" + + "\n" + + "sint32.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'must be greater than or equal to %s'.format([rules.gte]) : ''\n" + + "\xbd\x01\n" + + "\rsint32.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''\n" + + "\xc5\x01\n" + + "\x17sint32.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''\n" + + "\xcd\x01\n" + + "\x0esint32.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''\n" + + "\xd5\x01\n" + + "\x18sint32.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''H\x01R\x03gte\x12~\n" + + "\x02in\x18\x06 \x03(\x11Bn\xc2Hk\n" + + "i\n" + + "\tsint32.in\x1a\\!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''R\x02in\x12x\n" + + "\x06not_in\x18\a \x03(\x11Ba\xc2H^\n" + + "\\\n" + + "\rsint32.not_in\x1aKthis in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''R\x05notIn\x125\n" + + "\aexample\x18\b \x03(\x11B\x1b\xc2H\x18\n" + + "\x16\n" + + "\x0esint32.example\x1a\x04trueR\aexample*\t\b\xe8\a\x10\x80\x80\x80\x80\x02B\v\n" + + "\tless_thanB\x0e\n" + + "\fgreater_than\"\xf0\x14\n" + + "\vSInt64Rules\x12\x85\x01\n" + + "\x05const\x18\x01 \x01(\x12Bo\xc2Hl\n" + + "j\n" + + "\fsint64.const\x1aZthis != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''R\x05const\x12\x89\x01\n" + + "\x02lt\x18\x02 \x01(\x12Bw\xc2Ht\n" + + "r\n" + + "\tsint64.lt\x1ae!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'must be less than %s'.format([rules.lt]) : ''H\x00R\x02lt\x12\x9c\x01\n" + + "\x03lte\x18\x03 \x01(\x12B\x87\x01\xc2H\x83\x01\n" + + "\x80\x01\n" + + "\n" + + "sint64.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'must be less than or equal to %s'.format([rules.lte]) : ''H\x00R\x03lte\x12\x82\a\n" + + "\x02gt\x18\x04 \x01(\x12B\xef\x06\xc2H\xeb\x06\n" + + "u\n" + + "\tsint64.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'must be greater than %s'.format([rules.gt]) : ''\n" + + "\xae\x01\n" + + "\fsint64.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''\n" + + "\xb6\x01\n" + + "\x16sint64.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''\n" + + "\xbe\x01\n" + + "\rsint64.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''\n" + + "\xc6\x01\n" + + "\x17sint64.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''H\x01R\x02gt\x12\xcf\a\n" + + "\x03gte\x18\x05 \x01(\x12B\xba\a\xc2H\xb6\a\n" + + "\x83\x01\n" + + "\n" + + "sint64.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'must be greater than or equal to %s'.format([rules.gte]) : ''\n" + + "\xbd\x01\n" + + "\rsint64.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''\n" + + "\xc5\x01\n" + + "\x17sint64.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''\n" + + "\xcd\x01\n" + + "\x0esint64.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''\n" + + "\xd5\x01\n" + + "\x18sint64.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''H\x01R\x03gte\x12~\n" + + "\x02in\x18\x06 \x03(\x12Bn\xc2Hk\n" + + "i\n" + + "\tsint64.in\x1a\\!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''R\x02in\x12x\n" + + "\x06not_in\x18\a \x03(\x12Ba\xc2H^\n" + + "\\\n" + + "\rsint64.not_in\x1aKthis in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''R\x05notIn\x125\n" + + "\aexample\x18\b \x03(\x12B\x1b\xc2H\x18\n" + + "\x16\n" + + "\x0esint64.example\x1a\x04trueR\aexample*\t\b\xe8\a\x10\x80\x80\x80\x80\x02B\v\n" + + "\tless_thanB\x0e\n" + + "\fgreater_than\"\x81\x15\n" + + "\fFixed32Rules\x12\x86\x01\n" + + "\x05const\x18\x01 \x01(\aBp\xc2Hm\n" + + "k\n" + + "\rfixed32.const\x1aZthis != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''R\x05const\x12\x8a\x01\n" + + "\x02lt\x18\x02 \x01(\aBx\xc2Hu\n" + + "s\n" + + "\n" + + "fixed32.lt\x1ae!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'must be less than %s'.format([rules.lt]) : ''H\x00R\x02lt\x12\x9d\x01\n" + + "\x03lte\x18\x03 \x01(\aB\x88\x01\xc2H\x84\x01\n" + + "\x81\x01\n" + + "\vfixed32.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'must be less than or equal to %s'.format([rules.lte]) : ''H\x00R\x03lte\x12\x87\a\n" + + "\x02gt\x18\x04 \x01(\aB\xf4\x06\xc2H\xf0\x06\n" + + "v\n" + + "\n" + + "fixed32.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'must be greater than %s'.format([rules.gt]) : ''\n" + + "\xaf\x01\n" + + "\rfixed32.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''\n" + + "\xb7\x01\n" + + "\x17fixed32.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''\n" + + "\xbf\x01\n" + + "\x0efixed32.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''\n" + + "\xc7\x01\n" + + "\x18fixed32.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''H\x01R\x02gt\x12\xd4\a\n" + + "\x03gte\x18\x05 \x01(\aB\xbf\a\xc2H\xbb\a\n" + + "\x84\x01\n" + + "\vfixed32.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'must be greater than or equal to %s'.format([rules.gte]) : ''\n" + + "\xbe\x01\n" + + "\x0efixed32.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''\n" + + "\xc6\x01\n" + + "\x18fixed32.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''\n" + + "\xce\x01\n" + + "\x0ffixed32.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''\n" + + "\xd6\x01\n" + + "\x19fixed32.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''H\x01R\x03gte\x12\x7f\n" + + "\x02in\x18\x06 \x03(\aBo\xc2Hl\n" + + "j\n" + + "\n" + + "fixed32.in\x1a\\!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''R\x02in\x12y\n" + + "\x06not_in\x18\a \x03(\aBb\xc2H_\n" + + "]\n" + + "\x0efixed32.not_in\x1aKthis in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''R\x05notIn\x126\n" + + "\aexample\x18\b \x03(\aB\x1c\xc2H\x19\n" + + "\x17\n" + + "\x0ffixed32.example\x1a\x04trueR\aexample*\t\b\xe8\a\x10\x80\x80\x80\x80\x02B\v\n" + + "\tless_thanB\x0e\n" + + "\fgreater_than\"\x81\x15\n" + + "\fFixed64Rules\x12\x86\x01\n" + + "\x05const\x18\x01 \x01(\x06Bp\xc2Hm\n" + + "k\n" + + "\rfixed64.const\x1aZthis != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''R\x05const\x12\x8a\x01\n" + + "\x02lt\x18\x02 \x01(\x06Bx\xc2Hu\n" + + "s\n" + + "\n" + + "fixed64.lt\x1ae!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'must be less than %s'.format([rules.lt]) : ''H\x00R\x02lt\x12\x9d\x01\n" + + "\x03lte\x18\x03 \x01(\x06B\x88\x01\xc2H\x84\x01\n" + + "\x81\x01\n" + + "\vfixed64.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'must be less than or equal to %s'.format([rules.lte]) : ''H\x00R\x03lte\x12\x87\a\n" + + "\x02gt\x18\x04 \x01(\x06B\xf4\x06\xc2H\xf0\x06\n" + + "v\n" + + "\n" + + "fixed64.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'must be greater than %s'.format([rules.gt]) : ''\n" + + "\xaf\x01\n" + + "\rfixed64.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''\n" + + "\xb7\x01\n" + + "\x17fixed64.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''\n" + + "\xbf\x01\n" + + "\x0efixed64.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''\n" + + "\xc7\x01\n" + + "\x18fixed64.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''H\x01R\x02gt\x12\xd4\a\n" + + "\x03gte\x18\x05 \x01(\x06B\xbf\a\xc2H\xbb\a\n" + + "\x84\x01\n" + + "\vfixed64.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'must be greater than or equal to %s'.format([rules.gte]) : ''\n" + + "\xbe\x01\n" + + "\x0efixed64.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''\n" + + "\xc6\x01\n" + + "\x18fixed64.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''\n" + + "\xce\x01\n" + + "\x0ffixed64.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''\n" + + "\xd6\x01\n" + + "\x19fixed64.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''H\x01R\x03gte\x12\x7f\n" + + "\x02in\x18\x06 \x03(\x06Bo\xc2Hl\n" + + "j\n" + + "\n" + + "fixed64.in\x1a\\!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''R\x02in\x12y\n" + + "\x06not_in\x18\a \x03(\x06Bb\xc2H_\n" + + "]\n" + + "\x0efixed64.not_in\x1aKthis in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''R\x05notIn\x126\n" + + "\aexample\x18\b \x03(\x06B\x1c\xc2H\x19\n" + + "\x17\n" + + "\x0ffixed64.example\x1a\x04trueR\aexample*\t\b\xe8\a\x10\x80\x80\x80\x80\x02B\v\n" + + "\tless_thanB\x0e\n" + + "\fgreater_than\"\x93\x15\n" + + "\rSFixed32Rules\x12\x87\x01\n" + + "\x05const\x18\x01 \x01(\x0fBq\xc2Hn\n" + + "l\n" + + "\x0esfixed32.const\x1aZthis != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''R\x05const\x12\x8b\x01\n" + + "\x02lt\x18\x02 \x01(\x0fBy\xc2Hv\n" + + "t\n" + + "\vsfixed32.lt\x1ae!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'must be less than %s'.format([rules.lt]) : ''H\x00R\x02lt\x12\x9e\x01\n" + + "\x03lte\x18\x03 \x01(\x0fB\x89\x01\xc2H\x85\x01\n" + + "\x82\x01\n" + + "\fsfixed32.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'must be less than or equal to %s'.format([rules.lte]) : ''H\x00R\x03lte\x12\x8c\a\n" + + "\x02gt\x18\x04 \x01(\x0fB\xf9\x06\xc2H\xf5\x06\n" + + "w\n" + + "\vsfixed32.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'must be greater than %s'.format([rules.gt]) : ''\n" + + "\xb0\x01\n" + + "\x0esfixed32.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''\n" + + "\xb8\x01\n" + + "\x18sfixed32.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''\n" + + "\xc0\x01\n" + + "\x0fsfixed32.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''\n" + + "\xc8\x01\n" + + "\x19sfixed32.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''H\x01R\x02gt\x12\xd9\a\n" + + "\x03gte\x18\x05 \x01(\x0fB\xc4\a\xc2H\xc0\a\n" + + "\x85\x01\n" + + "\fsfixed32.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'must be greater than or equal to %s'.format([rules.gte]) : ''\n" + + "\xbf\x01\n" + + "\x0fsfixed32.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''\n" + + "\xc7\x01\n" + + "\x19sfixed32.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''\n" + + "\xcf\x01\n" + + "\x10sfixed32.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''\n" + + "\xd7\x01\n" + + "\x1asfixed32.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''H\x01R\x03gte\x12\x80\x01\n" + + "\x02in\x18\x06 \x03(\x0fBp\xc2Hm\n" + + "k\n" + + "\vsfixed32.in\x1a\\!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''R\x02in\x12z\n" + + "\x06not_in\x18\a \x03(\x0fBc\xc2H`\n" + + "^\n" + + "\x0fsfixed32.not_in\x1aKthis in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''R\x05notIn\x127\n" + + "\aexample\x18\b \x03(\x0fB\x1d\xc2H\x1a\n" + + "\x18\n" + + "\x10sfixed32.example\x1a\x04trueR\aexample*\t\b\xe8\a\x10\x80\x80\x80\x80\x02B\v\n" + + "\tless_thanB\x0e\n" + + "\fgreater_than\"\x93\x15\n" + + "\rSFixed64Rules\x12\x87\x01\n" + + "\x05const\x18\x01 \x01(\x10Bq\xc2Hn\n" + + "l\n" + + "\x0esfixed64.const\x1aZthis != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''R\x05const\x12\x8b\x01\n" + + "\x02lt\x18\x02 \x01(\x10By\xc2Hv\n" + + "t\n" + + "\vsfixed64.lt\x1ae!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'must be less than %s'.format([rules.lt]) : ''H\x00R\x02lt\x12\x9e\x01\n" + + "\x03lte\x18\x03 \x01(\x10B\x89\x01\xc2H\x85\x01\n" + + "\x82\x01\n" + + "\fsfixed64.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'must be less than or equal to %s'.format([rules.lte]) : ''H\x00R\x03lte\x12\x8c\a\n" + + "\x02gt\x18\x04 \x01(\x10B\xf9\x06\xc2H\xf5\x06\n" + + "w\n" + + "\vsfixed64.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'must be greater than %s'.format([rules.gt]) : ''\n" + + "\xb0\x01\n" + + "\x0esfixed64.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''\n" + + "\xb8\x01\n" + + "\x18sfixed64.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''\n" + + "\xc0\x01\n" + + "\x0fsfixed64.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''\n" + + "\xc8\x01\n" + + "\x19sfixed64.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''H\x01R\x02gt\x12\xd9\a\n" + + "\x03gte\x18\x05 \x01(\x10B\xc4\a\xc2H\xc0\a\n" + + "\x85\x01\n" + + "\fsfixed64.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'must be greater than or equal to %s'.format([rules.gte]) : ''\n" + + "\xbf\x01\n" + + "\x0fsfixed64.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''\n" + + "\xc7\x01\n" + + "\x19sfixed64.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''\n" + + "\xcf\x01\n" + + "\x10sfixed64.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''\n" + + "\xd7\x01\n" + + "\x1asfixed64.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''H\x01R\x03gte\x12\x80\x01\n" + + "\x02in\x18\x06 \x03(\x10Bp\xc2Hm\n" + + "k\n" + + "\vsfixed64.in\x1a\\!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''R\x02in\x12z\n" + + "\x06not_in\x18\a \x03(\x10Bc\xc2H`\n" + + "^\n" + + "\x0fsfixed64.not_in\x1aKthis in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''R\x05notIn\x127\n" + + "\aexample\x18\b \x03(\x10B\x1d\xc2H\x1a\n" + + "\x18\n" + + "\x10sfixed64.example\x1a\x04trueR\aexample*\t\b\xe8\a\x10\x80\x80\x80\x80\x02B\v\n" + + "\tless_thanB\x0e\n" + + "\fgreater_than\"\xd1\x01\n" + + "\tBoolRules\x12\x83\x01\n" + + "\x05const\x18\x01 \x01(\bBm\xc2Hj\n" + + "h\n" + + "\n" + + "bool.const\x1aZthis != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''R\x05const\x123\n" + + "\aexample\x18\x02 \x03(\bB\x19\xc2H\x16\n" + + "\x14\n" + + "\fbool.example\x1a\x04trueR\aexample*\t\b\xe8\a\x10\x80\x80\x80\x80\x02\"\xcf?\n" + + "\vStringRules\x12\x87\x01\n" + + "\x05const\x18\x01 \x01(\tBq\xc2Hn\n" + + "l\n" + + "\fstring.const\x1a\\this != getField(rules, 'const') ? 'must equal `%s`'.format([getField(rules, 'const')]) : ''R\x05const\x12v\n" + + "\x03len\x18\x13 \x01(\x04Bd\xc2Ha\n" + + "_\n" + + "\n" + + "string.len\x1aQuint(this.size()) != rules.len ? 'must be %s characters'.format([rules.len]) : ''R\x03len\x12\x91\x01\n" + + "\amin_len\x18\x02 \x01(\x04Bx\xc2Hu\n" + + "s\n" + + "\x0estring.min_len\x1aauint(this.size()) < rules.min_len ? 'must be at least %s characters'.format([rules.min_len]) : ''R\x06minLen\x12\x90\x01\n" + + "\amax_len\x18\x03 \x01(\x04Bw\xc2Ht\n" + + "r\n" + + "\x0estring.max_len\x1a`uint(this.size()) > rules.max_len ? 'must be at most %s characters'.format([rules.max_len]) : ''R\x06maxLen\x12\x95\x01\n" + + "\tlen_bytes\x18\x14 \x01(\x04Bx\xc2Hu\n" + + "s\n" + + "\x10string.len_bytes\x1a_uint(bytes(this).size()) != rules.len_bytes ? 'must be %s bytes'.format([rules.len_bytes]) : ''R\blenBytes\x12\x9e\x01\n" + + "\tmin_bytes\x18\x04 \x01(\x04B\x80\x01\xc2H}\n" + + "{\n" + + "\x10string.min_bytes\x1aguint(bytes(this).size()) < rules.min_bytes ? 'must be at least %s bytes'.format([rules.min_bytes]) : ''R\bminBytes\x12\x9c\x01\n" + + "\tmax_bytes\x18\x05 \x01(\x04B\x7f\xc2H|\n" + + "z\n" + + "\x10string.max_bytes\x1afuint(bytes(this).size()) > rules.max_bytes ? 'must be at most %s bytes'.format([rules.max_bytes]) : ''R\bmaxBytes\x12\x90\x01\n" + + "\apattern\x18\x06 \x01(\tBv\xc2Hs\n" + + "q\n" + + "\x0estring.pattern\x1a_!this.matches(rules.pattern) ? 'does not match regex pattern `%s`'.format([rules.pattern]) : ''R\apattern\x12\x86\x01\n" + + "\x06prefix\x18\a \x01(\tBn\xc2Hk\n" + + "i\n" + + "\rstring.prefix\x1aX!this.startsWith(rules.prefix) ? 'does not have prefix `%s`'.format([rules.prefix]) : ''R\x06prefix\x12\x84\x01\n" + + "\x06suffix\x18\b \x01(\tBl\xc2Hi\n" + + "g\n" + + "\rstring.suffix\x1aV!this.endsWith(rules.suffix) ? 'does not have suffix `%s`'.format([rules.suffix]) : ''R\x06suffix\x12\x94\x01\n" + + "\bcontains\x18\t \x01(\tBx\xc2Hu\n" + + "s\n" + + "\x0fstring.contains\x1a`!this.contains(rules.contains) ? 'does not contain substring `%s`'.format([rules.contains]) : ''R\bcontains\x12\x9e\x01\n" + + "\fnot_contains\x18\x17 \x01(\tB{\xc2Hx\n" + + "v\n" + + "\x13string.not_contains\x1a_this.contains(rules.not_contains) ? 'contains substring `%s`'.format([rules.not_contains]) : ''R\vnotContains\x12~\n" + + "\x02in\x18\n" + + " \x03(\tBn\xc2Hk\n" + + "i\n" + + "\tstring.in\x1a\\!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''R\x02in\x12x\n" + + "\x06not_in\x18\v \x03(\tBa\xc2H^\n" + + "\\\n" + + "\rstring.not_in\x1aKthis in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''R\x05notIn\x12\xe0\x01\n" + + "\x05email\x18\f \x01(\bB\xc7\x01\xc2H\xc3\x01\n" + + "[\n" + + "\fstring.email\x12\x1dmust be a valid email address\x1a,!rules.email || this == '' || this.isEmail()\n" + + "d\n" + + "\x12string.email_empty\x122value is empty, which is not a valid email address\x1a\x1a!rules.email || this != ''H\x00R\x05email\x12\xeb\x01\n" + + "\bhostname\x18\r \x01(\bB\xcc\x01\xc2H\xc8\x01\n" + + "_\n" + + "\x0fstring.hostname\x12\x18must be a valid hostname\x1a2!rules.hostname || this == '' || this.isHostname()\n" + + "e\n" + + "\x15string.hostname_empty\x12-value is empty, which is not a valid hostname\x1a\x1d!rules.hostname || this != ''H\x00R\bhostname\x12\xc5\x01\n" + + "\x02ip\x18\x0e \x01(\bB\xb2\x01\xc2H\xae\x01\n" + + "O\n" + + "\tstring.ip\x12\x1amust be a valid IP address\x1a&!rules.ip || this == '' || this.isIp()\n" + + "[\n" + + "\x0fstring.ip_empty\x12/value is empty, which is not a valid IP address\x1a\x17!rules.ip || this != ''H\x00R\x02ip\x12\xd6\x01\n" + + "\x04ipv4\x18\x0f \x01(\bB\xbf\x01\xc2H\xbb\x01\n" + + "V\n" + + "\vstring.ipv4\x12\x1cmust be a valid IPv4 address\x1a)!rules.ipv4 || this == '' || this.isIp(4)\n" + + "a\n" + + "\x11string.ipv4_empty\x121value is empty, which is not a valid IPv4 address\x1a\x19!rules.ipv4 || this != ''H\x00R\x04ipv4\x12\xd6\x01\n" + + "\x04ipv6\x18\x10 \x01(\bB\xbf\x01\xc2H\xbb\x01\n" + + "V\n" + + "\vstring.ipv6\x12\x1cmust be a valid IPv6 address\x1a)!rules.ipv6 || this == '' || this.isIp(6)\n" + + "a\n" + + "\x11string.ipv6_empty\x121value is empty, which is not a valid IPv6 address\x1a\x19!rules.ipv6 || this != ''H\x00R\x04ipv6\x12\xbe\x01\n" + + "\x03uri\x18\x11 \x01(\bB\xa9\x01\xc2H\xa5\x01\n" + + "K\n" + + "\n" + + "string.uri\x12\x13must be a valid URI\x1a(!rules.uri || this == '' || this.isUri()\n" + + "V\n" + + "\x10string.uri_empty\x12(value is empty, which is not a valid URI\x1a\x18!rules.uri || this != ''H\x00R\x03uri\x12r\n" + + "\auri_ref\x18\x12 \x01(\bBW\xc2HT\n" + + "R\n" + + "\x0estring.uri_ref\x12\x1dmust be a valid URI Reference\x1a!!rules.uri_ref || this.isUriRef()H\x00R\x06uriRef\x12\x92\x02\n" + + "\aaddress\x18\x15 \x01(\bB\xf5\x01\xc2H\xf1\x01\n" + + "{\n" + + "\x0estring.address\x12'must be a valid hostname, or ip address\x1a@!rules.address || this == '' || this.isHostname() || this.isIp()\n" + + "r\n" + + "\x14string.address_empty\x12!rules.ipv4_with_prefixlen || this == '' || this.isIpPrefix(4)\n" + + "\x92\x01\n" + + " string.ipv4_with_prefixlen_empty\x12Dvalue is empty, which is not a valid IPv4 address with prefix length\x1a(!rules.ipv4_with_prefixlen || this != ''H\x00R\x11ipv4WithPrefixlen\x12\xdc\x02\n" + + "\x13ipv6_with_prefixlen\x18\x1c \x01(\bB\xa9\x02\xc2H\xa5\x02\n" + + "\x8d\x01\n" + + "\x1astring.ipv6_with_prefixlen\x12/must be a valid IPv6 address with prefix length\x1a>!rules.ipv6_with_prefixlen || this == '' || this.isIpPrefix(6)\n" + + "\x92\x01\n" + + " string.ipv6_with_prefixlen_empty\x12Dvalue is empty, which is not a valid IPv6 address with prefix length\x1a(!rules.ipv6_with_prefixlen || this != ''H\x00R\x11ipv6WithPrefixlen\x12\xf6\x01\n" + + "\tip_prefix\x18\x1d \x01(\bB\xd6\x01\xc2H\xd2\x01\n" + + "f\n" + + "\x10string.ip_prefix\x12\x19must be a valid IP prefix\x1a7!rules.ip_prefix || this == '' || this.isIpPrefix(true)\n" + + "h\n" + + "\x16string.ip_prefix_empty\x12.value is empty, which is not a valid IP prefix\x1a\x1e!rules.ip_prefix || this != ''H\x00R\bipPrefix\x12\x89\x02\n" + + "\vipv4_prefix\x18\x1e \x01(\bB\xe5\x01\xc2H\xe1\x01\n" + + "o\n" + + "\x12string.ipv4_prefix\x12\x1bmust be a valid IPv4 prefix\x1a!rules.host_and_port || this == '' || this.isHostAndPort(true)\n" + + "y\n" + + "\x1astring.host_and_port_empty\x127value is empty, which is not a valid host and port pair\x1a\"!rules.host_and_port || this != ''H\x00R\vhostAndPort\x12\xf4\x01\n" + + "\x04ulid\x18# \x01(\bB\xdd\x01\xc2H\xd9\x01\n" + + "|\n" + + "\vstring.ulid\x12\x14must be a valid ULID\x1aW!rules.ulid || this == '' || this.matches('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$')\n" + + "Y\n" + + "\x11string.ulid_empty\x12)value is empty, which is not a valid ULID\x1a\x19!rules.ulid || this != ''H\x00R\x04ulid\x12\xe1\x02\n" + + "\fprotobuf_fqn\x18% \x01(\bB\xbb\x02\xc2H\xb7\x02\n" + + "\xaf\x01\n" + + "\x13string.protobuf_fqn\x12-must be a valid fully-qualified Protobuf name\x1ai!rules.protobuf_fqn || this == '' || this.matches('^[A-Za-z_][A-Za-z_0-9]*(\\\\.[A-Za-z_][A-Za-z_0-9]*)*$')\n" + + "\x82\x01\n" + + "\x19string.protobuf_fqn_empty\x12Bvalue is empty, which is not a valid fully-qualified Protobuf name\x1a!!rules.protobuf_fqn || this != ''H\x00R\vprotobufFqn\x12\xa1\x03\n" + + "\x10protobuf_dot_fqn\x18& \x01(\bB\xf4\x02\xc2H\xf0\x02\n" + + "\xcd\x01\n" + + "\x17string.protobuf_dot_fqn\x12@must be a valid fully-qualified Protobuf name with a leading dot\x1ap!rules.protobuf_dot_fqn || this == '' || this.matches('^\\\\.[A-Za-z_][A-Za-z_0-9]*(\\\\.[A-Za-z_][A-Za-z_0-9]*)*$')\n" + + "\x9d\x01\n" + + "\x1dstring.protobuf_dot_fqn_empty\x12Uvalue is empty, which is not a valid fully-qualified Protobuf name with a leading dot\x1a%!rules.protobuf_dot_fqn || this != ''H\x00R\x0eprotobufDotFqn\x12\xac\x05\n" + + "\x10well_known_regex\x18\x18 \x01(\x0e2\x18.buf.validate.KnownRegexB\xe5\x04\xc2H\xe1\x04\n" + + "\xea\x01\n" + + "#string.well_known_regex.header_name\x12 must be a valid HTTP header name\x1a\xa0\x01rules.well_known_regex != 1 || this == '' || this.matches(!has(rules.strict) || rules.strict ?'^:?[0-9a-zA-Z!#$%&\\'*+-.^_|~\\x60]+$' :'^[^\\u0000\\u000A\\u000D]+$')\n" + + "\x8d\x01\n" + + ")string.well_known_regex.header_name_empty\x125value is empty, which is not a valid HTTP header name\x1a)rules.well_known_regex != 1 || this != ''\n" + + "\xe1\x01\n" + + "$string.well_known_regex.header_value\x12!must be a valid HTTP header value\x1a\x95\x01rules.well_known_regex != 2 || this.matches(!has(rules.strict) || rules.strict ?'^[^\\u0000-\\u0008\\u000A-\\u001F\\u007F]*$' :'^[^\\u0000\\u000A\\u000D]*$')H\x00R\x0ewellKnownRegex\x12\x16\n" + + "\x06strict\x18\x19 \x01(\bR\x06strict\x125\n" + + "\aexample\x18\" \x03(\tB\x1b\xc2H\x18\n" + + "\x16\n" + + "\x0estring.example\x1a\x04trueR\aexample*\t\b\xe8\a\x10\x80\x80\x80\x80\x02B\f\n" + + "\n" + + "well_known\"\xca\x12\n" + + "\n" + + "BytesRules\x12\x81\x01\n" + + "\x05const\x18\x01 \x01(\fBk\xc2Hh\n" + + "f\n" + + "\vbytes.const\x1aWthis != getField(rules, 'const') ? 'must be %x'.format([getField(rules, 'const')]) : ''R\x05const\x12p\n" + + "\x03len\x18\r \x01(\x04B^\xc2H[\n" + + "Y\n" + + "\tbytes.len\x1aLuint(this.size()) != rules.len ? 'must be %s bytes'.format([rules.len]) : ''R\x03len\x12\x8b\x01\n" + + "\amin_len\x18\x02 \x01(\x04Br\xc2Ho\n" + + "m\n" + + "\rbytes.min_len\x1a\\uint(this.size()) < rules.min_len ? 'must be at least %s bytes'.format([rules.min_len]) : ''R\x06minLen\x12\x8a\x01\n" + + "\amax_len\x18\x03 \x01(\x04Bq\xc2Hn\n" + + "l\n" + + "\rbytes.max_len\x1a[uint(this.size()) > rules.max_len ? 'must be at most %s bytes'.format([rules.max_len]) : ''R\x06maxLen\x12\x93\x01\n" + + "\apattern\x18\x04 \x01(\tBy\xc2Hv\n" + + "t\n" + + "\rbytes.pattern\x1ac!string(this).matches(rules.pattern) ? 'must match regex pattern `%s`'.format([rules.pattern]) : ''R\apattern\x12\x83\x01\n" + + "\x06prefix\x18\x05 \x01(\fBk\xc2Hh\n" + + "f\n" + + "\fbytes.prefix\x1aV!this.startsWith(rules.prefix) ? 'does not have prefix %x'.format([rules.prefix]) : ''R\x06prefix\x12\x81\x01\n" + + "\x06suffix\x18\x06 \x01(\fBi\xc2Hf\n" + + "d\n" + + "\fbytes.suffix\x1aT!this.endsWith(rules.suffix) ? 'does not have suffix %x'.format([rules.suffix]) : ''R\x06suffix\x12\x87\x01\n" + + "\bcontains\x18\a \x01(\fBk\xc2Hh\n" + + "f\n" + + "\x0ebytes.contains\x1aT!this.contains(rules.contains) ? 'does not contain %x'.format([rules.contains]) : ''R\bcontains\x12\xa5\x01\n" + + "\x02in\x18\b \x03(\fB\x94\x01\xc2H\x90\x01\n" + + "\x8d\x01\n" + + "\bbytes.in\x1a\x80\x01getField(rules, 'in').size() > 0 && !(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''R\x02in\x12w\n" + + "\x06not_in\x18\t \x03(\fB`\xc2H]\n" + + "[\n" + + "\fbytes.not_in\x1aKthis in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''R\x05notIn\x12\xe9\x01\n" + + "\x02ip\x18\n" + + " \x01(\bB\xd6\x01\xc2H\xd2\x01\n" + + "n\n" + + "\bbytes.ip\x12\x1amust be a valid IP address\x1aF!rules.ip || this.size() == 0 || this.size() == 4 || this.size() == 16\n" + + "`\n" + + "\x0ebytes.ip_empty\x12/value is empty, which is not a valid IP address\x1a\x1d!rules.ip || this.size() != 0H\x00R\x02ip\x12\xe4\x01\n" + + "\x04ipv4\x18\v \x01(\bB\xcd\x01\xc2H\xc9\x01\n" + + "_\n" + + "\n" + + "bytes.ipv4\x12\x1cmust be a valid IPv4 address\x1a3!rules.ipv4 || this.size() == 0 || this.size() == 4\n" + + "f\n" + + "\x10bytes.ipv4_empty\x121value is empty, which is not a valid IPv4 address\x1a\x1f!rules.ipv4 || this.size() != 0H\x00R\x04ipv4\x12\xe5\x01\n" + + "\x04ipv6\x18\f \x01(\bB\xce\x01\xc2H\xca\x01\n" + + "`\n" + + "\n" + + "bytes.ipv6\x12\x1cmust be a valid IPv6 address\x1a4!rules.ipv6 || this.size() == 0 || this.size() == 16\n" + + "f\n" + + "\x10bytes.ipv6_empty\x121value is empty, which is not a valid IPv6 address\x1a\x1f!rules.ipv6 || this.size() != 0H\x00R\x04ipv6\x12\xd5\x01\n" + + "\x04uuid\x18\x0f \x01(\bB\xbe\x01\xc2H\xba\x01\n" + + "X\n" + + "\n" + + "bytes.uuid\x12\x14must be a valid UUID\x1a4!rules.uuid || this.size() == 0 || this.size() == 16\n" + + "^\n" + + "\x10bytes.uuid_empty\x12)value is empty, which is not a valid UUID\x1a\x1f!rules.uuid || this.size() != 0H\x00R\x04uuid\x124\n" + + "\aexample\x18\x0e \x03(\fB\x1a\xc2H\x17\n" + + "\x15\n" + + "\rbytes.example\x1a\x04trueR\aexample*\t\b\xe8\a\x10\x80\x80\x80\x80\x02B\f\n" + + "\n" + + "well_known\"\xea\x03\n" + + "\tEnumRules\x12\x83\x01\n" + + "\x05const\x18\x01 \x01(\x05Bm\xc2Hj\n" + + "h\n" + + "\n" + + "enum.const\x1aZthis != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''R\x05const\x12!\n" + + "\fdefined_only\x18\x02 \x01(\bR\vdefinedOnly\x12|\n" + + "\x02in\x18\x03 \x03(\x05Bl\xc2Hi\n" + + "g\n" + + "\aenum.in\x1a\\!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''R\x02in\x12v\n" + + "\x06not_in\x18\x04 \x03(\x05B_\xc2H\\\n" + + "Z\n" + + "\venum.not_in\x1aKthis in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''R\x05notIn\x123\n" + + "\aexample\x18\x05 \x03(\x05B\x19\xc2H\x16\n" + + "\x14\n" + + "\fenum.example\x1a\x04trueR\aexample*\t\b\xe8\a\x10\x80\x80\x80\x80\x02\"\x90\x04\n" + + "\rRepeatedRules\x12\xa0\x01\n" + + "\tmin_items\x18\x01 \x01(\x04B\x82\x01\xc2H\x7f\n" + + "}\n" + + "\x12repeated.min_items\x1aguint(this.size()) < rules.min_items ? 'must contain at least %d item(s)'.format([rules.min_items]) : ''R\bminItems\x12\xa6\x01\n" + + "\tmax_items\x18\x02 \x01(\x04B\x88\x01\xc2H\x84\x01\n" + + "\x81\x01\n" + + "\x12repeated.max_items\x1akuint(this.size()) > rules.max_items ? 'must contain no more than %s item(s)'.format([rules.max_items]) : ''R\bmaxItems\x12x\n" + + "\x06unique\x18\x03 \x01(\bB`\xc2H]\n" + + "[\n" + + "\x0frepeated.unique\x12(repeated value must contain unique items\x1a\x1e!rules.unique || this.unique()R\x06unique\x12.\n" + + "\x05items\x18\x04 \x01(\v2\x18.buf.validate.FieldRulesR\x05items*\t\b\xe8\a\x10\x80\x80\x80\x80\x02\"\xac\x03\n" + + "\bMapRules\x12\x99\x01\n" + + "\tmin_pairs\x18\x01 \x01(\x04B|\xc2Hy\n" + + "w\n" + + "\rmap.min_pairs\x1afuint(this.size()) < rules.min_pairs ? 'map must be at least %d entries'.format([rules.min_pairs]) : ''R\bminPairs\x12\x98\x01\n" + + "\tmax_pairs\x18\x02 \x01(\x04B{\xc2Hx\n" + + "v\n" + + "\rmap.max_pairs\x1aeuint(this.size()) > rules.max_pairs ? 'map must be at most %d entries'.format([rules.max_pairs]) : ''R\bmaxPairs\x12,\n" + + "\x04keys\x18\x04 \x01(\v2\x18.buf.validate.FieldRulesR\x04keys\x120\n" + + "\x06values\x18\x05 \x01(\v2\x18.buf.validate.FieldRulesR\x06values*\t\b\xe8\a\x10\x80\x80\x80\x80\x02\"1\n" + + "\bAnyRules\x12\x0e\n" + + "\x02in\x18\x02 \x03(\tR\x02in\x12\x15\n" + + "\x06not_in\x18\x03 \x03(\tR\x05notIn\"\xec\x16\n" + + "\rDurationRules\x12\xa2\x01\n" + + "\x05const\x18\x02 \x01(\v2\x19.google.protobuf.DurationBq\xc2Hn\n" + + "l\n" + + "\x0eduration.const\x1aZthis != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''R\x05const\x12\xa6\x01\n" + + "\x02lt\x18\x03 \x01(\v2\x19.google.protobuf.DurationBy\xc2Hv\n" + + "t\n" + + "\vduration.lt\x1ae!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'must be less than %s'.format([rules.lt]) : ''H\x00R\x02lt\x12\xb9\x01\n" + + "\x03lte\x18\x04 \x01(\v2\x19.google.protobuf.DurationB\x89\x01\xc2H\x85\x01\n" + + "\x82\x01\n" + + "\fduration.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'must be less than or equal to %s'.format([rules.lte]) : ''H\x00R\x03lte\x12\xa7\a\n" + + "\x02gt\x18\x05 \x01(\v2\x19.google.protobuf.DurationB\xf9\x06\xc2H\xf5\x06\n" + + "w\n" + + "\vduration.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'must be greater than %s'.format([rules.gt]) : ''\n" + + "\xb0\x01\n" + + "\x0eduration.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''\n" + + "\xb8\x01\n" + + "\x18duration.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''\n" + + "\xc0\x01\n" + + "\x0fduration.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''\n" + + "\xc8\x01\n" + + "\x19duration.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''H\x01R\x02gt\x12\xf4\a\n" + + "\x03gte\x18\x06 \x01(\v2\x19.google.protobuf.DurationB\xc4\a\xc2H\xc0\a\n" + + "\x85\x01\n" + + "\fduration.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'must be greater than or equal to %s'.format([rules.gte]) : ''\n" + + "\xbf\x01\n" + + "\x0fduration.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''\n" + + "\xc7\x01\n" + + "\x19duration.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''\n" + + "\xcf\x01\n" + + "\x10duration.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''\n" + + "\xd7\x01\n" + + "\x1aduration.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''H\x01R\x03gte\x12\x9b\x01\n" + + "\x02in\x18\a \x03(\v2\x19.google.protobuf.DurationBp\xc2Hm\n" + + "k\n" + + "\vduration.in\x1a\\!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''R\x02in\x12\x95\x01\n" + + "\x06not_in\x18\b \x03(\v2\x19.google.protobuf.DurationBc\xc2H`\n" + + "^\n" + + "\x0fduration.not_in\x1aKthis in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''R\x05notIn\x12R\n" + + "\aexample\x18\t \x03(\v2\x19.google.protobuf.DurationB\x1d\xc2H\x1a\n" + + "\x18\n" + + "\x10duration.example\x1a\x04trueR\aexample*\t\b\xe8\a\x10\x80\x80\x80\x80\x02B\v\n" + + "\tless_thanB\x0e\n" + + "\fgreater_than\"\x86\x06\n" + + "\x0eFieldMaskRules\x12\xc0\x01\n" + + "\x05const\x18\x01 \x01(\v2\x1a.google.protobuf.FieldMaskB\x8d\x01\xc2H\x89\x01\n" + + "\x86\x01\n" + + "\x10field_mask.const\x1arthis.paths != getField(rules, 'const').paths ? 'must equal paths %s'.format([getField(rules, 'const').paths]) : ''R\x05const\x12\xd7\x01\n" + + "\x02in\x18\x02 \x03(\tB\xc6\x01\xc2H\xc2\x01\n" + + "\xbf\x01\n" + + "\rfield_mask.in\x1a\xad\x01!this.paths.all(p, p in getField(rules, 'in') || getField(rules, 'in').exists(f, p.startsWith(f+'.'))) ? 'must only contain paths in %s'.format([getField(rules, 'in')]) : ''R\x02in\x12\xf4\x01\n" + + "\x06not_in\x18\x03 \x03(\tB\xdc\x01\xc2H\xd8\x01\n" + + "\xd5\x01\n" + + "\x11field_mask.not_in\x1a\xbf\x01!this.paths.all(p, !(p in getField(rules, 'not_in') || getField(rules, 'not_in').exists(f, p.startsWith(f+'.')))) ? 'must not contain any paths in %s'.format([getField(rules, 'not_in')]) : ''R\x05notIn\x12U\n" + + "\aexample\x18\x04 \x03(\v2\x1a.google.protobuf.FieldMaskB\x1f\xc2H\x1c\n" + + "\x1a\n" + + "\x12field_mask.example\x1a\x04trueR\aexample*\t\b\xe8\a\x10\x80\x80\x80\x80\x02\"\xe8\x17\n" + + "\x0eTimestampRules\x12\xa4\x01\n" + + "\x05const\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampBr\xc2Ho\n" + + "m\n" + + "\x0ftimestamp.const\x1aZthis != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''R\x05const\x12\xa8\x01\n" + + "\x02lt\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampBz\xc2Hw\n" + + "u\n" + + "\ftimestamp.lt\x1ae!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'must be less than %s'.format([rules.lt]) : ''H\x00R\x02lt\x12\xbb\x01\n" + + "\x03lte\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampB\x8a\x01\xc2H\x86\x01\n" + + "\x83\x01\n" + + "\rtimestamp.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'must be less than or equal to %s'.format([rules.lte]) : ''H\x00R\x03lte\x12m\n" + + "\x06lt_now\x18\a \x01(\bBT\xc2HQ\n" + + "O\n" + + "\x10timestamp.lt_now\x1a;(rules.lt_now && this > now) ? 'must be less than now' : ''H\x00R\x05ltNow\x12\xad\a\n" + + "\x02gt\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampB\xfe\x06\xc2H\xfa\x06\n" + + "x\n" + + "\ftimestamp.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'must be greater than %s'.format([rules.gt]) : ''\n" + + "\xb1\x01\n" + + "\x0ftimestamp.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''\n" + + "\xb9\x01\n" + + "\x19timestamp.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''\n" + + "\xc1\x01\n" + + "\x10timestamp.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''\n" + + "\xc9\x01\n" + + "\x1atimestamp.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''H\x01R\x02gt\x12\xfa\a\n" + + "\x03gte\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampB\xc9\a\xc2H\xc5\a\n" + + "\x86\x01\n" + + "\rtimestamp.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'must be greater than or equal to %s'.format([rules.gte]) : ''\n" + + "\xc0\x01\n" + + "\x10timestamp.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''\n" + + "\xc8\x01\n" + + "\x1atimestamp.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''\n" + + "\xd0\x01\n" + + "\x11timestamp.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''\n" + + "\xd8\x01\n" + + "\x1btimestamp.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''H\x01R\x03gte\x12p\n" + + "\x06gt_now\x18\b \x01(\bBW\xc2HT\n" + + "R\n" + + "\x10timestamp.gt_now\x1a>(rules.gt_now && this < now) ? 'must be greater than now' : ''H\x01R\x05gtNow\x12\xb9\x01\n" + + "\x06within\x18\t \x01(\v2\x19.google.protobuf.DurationB\x85\x01\xc2H\x81\x01\n" + + "\x7f\n" + + "\x10timestamp.within\x1akthis < now-rules.within || this > now+rules.within ? 'must be within %s of now'.format([rules.within]) : ''R\x06within\x12T\n" + + "\aexample\x18\n" + + " \x03(\v2\x1a.google.protobuf.TimestampB\x1e\xc2H\x1b\n" + + "\x19\n" + + "\x11timestamp.example\x1a\x04trueR\aexample*\t\b\xe8\a\x10\x80\x80\x80\x80\x02B\v\n" + + "\tless_thanB\x0e\n" + + "\fgreater_than\"E\n" + + "\n" + + "Violations\x127\n" + + "\n" + + "violations\x18\x01 \x03(\v2\x17.buf.validate.ViolationR\n" + + "violations\"\xc5\x01\n" + + "\tViolation\x12-\n" + + "\x05field\x18\x05 \x01(\v2\x17.buf.validate.FieldPathR\x05field\x12+\n" + + "\x04rule\x18\x06 \x01(\v2\x17.buf.validate.FieldPathR\x04rule\x12\x17\n" + + "\arule_id\x18\x02 \x01(\tR\x06ruleId\x12\x18\n" + + "\amessage\x18\x03 \x01(\tR\amessage\x12\x17\n" + + "\afor_key\x18\x04 \x01(\bR\x06forKeyJ\x04\b\x01\x10\x02R\n" + + "field_path\"G\n" + + "\tFieldPath\x12:\n" + + "\belements\x18\x01 \x03(\v2\x1e.buf.validate.FieldPathElementR\belements\"\xcc\x03\n" + + "\x10FieldPathElement\x12!\n" + + "\ffield_number\x18\x01 \x01(\x05R\vfieldNumber\x12\x1d\n" + + "\n" + + "field_name\x18\x02 \x01(\tR\tfieldName\x12I\n" + + "\n" + + "field_type\x18\x03 \x01(\x0e2*.google.protobuf.FieldDescriptorProto.TypeR\tfieldType\x12E\n" + + "\bkey_type\x18\x04 \x01(\x0e2*.google.protobuf.FieldDescriptorProto.TypeR\akeyType\x12I\n" + + "\n" + + "value_type\x18\x05 \x01(\x0e2*.google.protobuf.FieldDescriptorProto.TypeR\tvalueType\x12\x16\n" + + "\x05index\x18\x06 \x01(\x04H\x00R\x05index\x12\x1b\n" + + "\bbool_key\x18\a \x01(\bH\x00R\aboolKey\x12\x19\n" + + "\aint_key\x18\b \x01(\x03H\x00R\x06intKey\x12\x1b\n" + + "\buint_key\x18\t \x01(\x04H\x00R\auintKey\x12\x1f\n" + + "\n" + + "string_key\x18\n" + + " \x01(\tH\x00R\tstringKeyB\v\n" + + "\tsubscript*\xa1\x01\n" + + "\x06Ignore\x12\x16\n" + + "\x12IGNORE_UNSPECIFIED\x10\x00\x12\x18\n" + + "\x14IGNORE_IF_ZERO_VALUE\x10\x01\x12\x11\n" + + "\rIGNORE_ALWAYS\x10\x03\"\x04\b\x02\x10\x02*\fIGNORE_EMPTY*\x0eIGNORE_DEFAULT*\x17IGNORE_IF_DEFAULT_VALUE*\x15IGNORE_IF_UNPOPULATED*n\n" + + "\n" + + "KnownRegex\x12\x1b\n" + + "\x17KNOWN_REGEX_UNSPECIFIED\x10\x00\x12 \n" + + "\x1cKNOWN_REGEX_HTTP_HEADER_NAME\x10\x01\x12!\n" + + "\x1dKNOWN_REGEX_HTTP_HEADER_VALUE\x10\x02:V\n" + + "\amessage\x12\x1f.google.protobuf.MessageOptions\x18\x87\t \x01(\v2\x1a.buf.validate.MessageRulesR\amessage:N\n" + + "\x05oneof\x12\x1d.google.protobuf.OneofOptions\x18\x87\t \x01(\v2\x18.buf.validate.OneofRulesR\x05oneof:N\n" + + "\x05field\x12\x1d.google.protobuf.FieldOptions\x18\x87\t \x01(\v2\x18.buf.validate.FieldRulesR\x05field:]\n" + + "\n" + + "predefined\x12\x1d.google.protobuf.FieldOptions\x18\x88\t \x01(\v2\x1d.buf.validate.PredefinedRulesR\n" + + "predefinedB\xbb\x01\n" + + "\x10com.buf.validateB\rValidateProtoP\x01ZGbuf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate\xa2\x02\x03BVX\xaa\x02\fBuf.Validate\xca\x02\fBuf\\Validate\xe2\x02\x18Buf\\Validate\\GPBMetadata\xea\x02\rBuf::Validate" + +var ( + file_buf_validate_validate_proto_rawDescOnce sync.Once + file_buf_validate_validate_proto_rawDescData []byte +) + +func file_buf_validate_validate_proto_rawDescGZIP() []byte { + file_buf_validate_validate_proto_rawDescOnce.Do(func() { + file_buf_validate_validate_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_buf_validate_validate_proto_rawDesc), len(file_buf_validate_validate_proto_rawDesc))) + }) + return file_buf_validate_validate_proto_rawDescData +} + +var file_buf_validate_validate_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_buf_validate_validate_proto_msgTypes = make([]protoimpl.MessageInfo, 32) +var file_buf_validate_validate_proto_goTypes = []any{ + (Ignore)(0), // 0: buf.validate.Ignore + (KnownRegex)(0), // 1: buf.validate.KnownRegex + (*Rule)(nil), // 2: buf.validate.Rule + (*MessageRules)(nil), // 3: buf.validate.MessageRules + (*MessageOneofRule)(nil), // 4: buf.validate.MessageOneofRule + (*OneofRules)(nil), // 5: buf.validate.OneofRules + (*FieldRules)(nil), // 6: buf.validate.FieldRules + (*PredefinedRules)(nil), // 7: buf.validate.PredefinedRules + (*FloatRules)(nil), // 8: buf.validate.FloatRules + (*DoubleRules)(nil), // 9: buf.validate.DoubleRules + (*Int32Rules)(nil), // 10: buf.validate.Int32Rules + (*Int64Rules)(nil), // 11: buf.validate.Int64Rules + (*UInt32Rules)(nil), // 12: buf.validate.UInt32Rules + (*UInt64Rules)(nil), // 13: buf.validate.UInt64Rules + (*SInt32Rules)(nil), // 14: buf.validate.SInt32Rules + (*SInt64Rules)(nil), // 15: buf.validate.SInt64Rules + (*Fixed32Rules)(nil), // 16: buf.validate.Fixed32Rules + (*Fixed64Rules)(nil), // 17: buf.validate.Fixed64Rules + (*SFixed32Rules)(nil), // 18: buf.validate.SFixed32Rules + (*SFixed64Rules)(nil), // 19: buf.validate.SFixed64Rules + (*BoolRules)(nil), // 20: buf.validate.BoolRules + (*StringRules)(nil), // 21: buf.validate.StringRules + (*BytesRules)(nil), // 22: buf.validate.BytesRules + (*EnumRules)(nil), // 23: buf.validate.EnumRules + (*RepeatedRules)(nil), // 24: buf.validate.RepeatedRules + (*MapRules)(nil), // 25: buf.validate.MapRules + (*AnyRules)(nil), // 26: buf.validate.AnyRules + (*DurationRules)(nil), // 27: buf.validate.DurationRules + (*FieldMaskRules)(nil), // 28: buf.validate.FieldMaskRules + (*TimestampRules)(nil), // 29: buf.validate.TimestampRules + (*Violations)(nil), // 30: buf.validate.Violations + (*Violation)(nil), // 31: buf.validate.Violation + (*FieldPath)(nil), // 32: buf.validate.FieldPath + (*FieldPathElement)(nil), // 33: buf.validate.FieldPathElement + (*durationpb.Duration)(nil), // 34: google.protobuf.Duration + (*fieldmaskpb.FieldMask)(nil), // 35: google.protobuf.FieldMask + (*timestamppb.Timestamp)(nil), // 36: google.protobuf.Timestamp + (descriptorpb.FieldDescriptorProto_Type)(0), // 37: google.protobuf.FieldDescriptorProto.Type + (*descriptorpb.MessageOptions)(nil), // 38: google.protobuf.MessageOptions + (*descriptorpb.OneofOptions)(nil), // 39: google.protobuf.OneofOptions + (*descriptorpb.FieldOptions)(nil), // 40: google.protobuf.FieldOptions +} +var file_buf_validate_validate_proto_depIdxs = []int32{ + 2, // 0: buf.validate.MessageRules.cel:type_name -> buf.validate.Rule + 4, // 1: buf.validate.MessageRules.oneof:type_name -> buf.validate.MessageOneofRule + 2, // 2: buf.validate.FieldRules.cel:type_name -> buf.validate.Rule + 0, // 3: buf.validate.FieldRules.ignore:type_name -> buf.validate.Ignore + 8, // 4: buf.validate.FieldRules.float:type_name -> buf.validate.FloatRules + 9, // 5: buf.validate.FieldRules.double:type_name -> buf.validate.DoubleRules + 10, // 6: buf.validate.FieldRules.int32:type_name -> buf.validate.Int32Rules + 11, // 7: buf.validate.FieldRules.int64:type_name -> buf.validate.Int64Rules + 12, // 8: buf.validate.FieldRules.uint32:type_name -> buf.validate.UInt32Rules + 13, // 9: buf.validate.FieldRules.uint64:type_name -> buf.validate.UInt64Rules + 14, // 10: buf.validate.FieldRules.sint32:type_name -> buf.validate.SInt32Rules + 15, // 11: buf.validate.FieldRules.sint64:type_name -> buf.validate.SInt64Rules + 16, // 12: buf.validate.FieldRules.fixed32:type_name -> buf.validate.Fixed32Rules + 17, // 13: buf.validate.FieldRules.fixed64:type_name -> buf.validate.Fixed64Rules + 18, // 14: buf.validate.FieldRules.sfixed32:type_name -> buf.validate.SFixed32Rules + 19, // 15: buf.validate.FieldRules.sfixed64:type_name -> buf.validate.SFixed64Rules + 20, // 16: buf.validate.FieldRules.bool:type_name -> buf.validate.BoolRules + 21, // 17: buf.validate.FieldRules.string:type_name -> buf.validate.StringRules + 22, // 18: buf.validate.FieldRules.bytes:type_name -> buf.validate.BytesRules + 23, // 19: buf.validate.FieldRules.enum:type_name -> buf.validate.EnumRules + 24, // 20: buf.validate.FieldRules.repeated:type_name -> buf.validate.RepeatedRules + 25, // 21: buf.validate.FieldRules.map:type_name -> buf.validate.MapRules + 26, // 22: buf.validate.FieldRules.any:type_name -> buf.validate.AnyRules + 27, // 23: buf.validate.FieldRules.duration:type_name -> buf.validate.DurationRules + 28, // 24: buf.validate.FieldRules.field_mask:type_name -> buf.validate.FieldMaskRules + 29, // 25: buf.validate.FieldRules.timestamp:type_name -> buf.validate.TimestampRules + 2, // 26: buf.validate.PredefinedRules.cel:type_name -> buf.validate.Rule + 1, // 27: buf.validate.StringRules.well_known_regex:type_name -> buf.validate.KnownRegex + 6, // 28: buf.validate.RepeatedRules.items:type_name -> buf.validate.FieldRules + 6, // 29: buf.validate.MapRules.keys:type_name -> buf.validate.FieldRules + 6, // 30: buf.validate.MapRules.values:type_name -> buf.validate.FieldRules + 34, // 31: buf.validate.DurationRules.const:type_name -> google.protobuf.Duration + 34, // 32: buf.validate.DurationRules.lt:type_name -> google.protobuf.Duration + 34, // 33: buf.validate.DurationRules.lte:type_name -> google.protobuf.Duration + 34, // 34: buf.validate.DurationRules.gt:type_name -> google.protobuf.Duration + 34, // 35: buf.validate.DurationRules.gte:type_name -> google.protobuf.Duration + 34, // 36: buf.validate.DurationRules.in:type_name -> google.protobuf.Duration + 34, // 37: buf.validate.DurationRules.not_in:type_name -> google.protobuf.Duration + 34, // 38: buf.validate.DurationRules.example:type_name -> google.protobuf.Duration + 35, // 39: buf.validate.FieldMaskRules.const:type_name -> google.protobuf.FieldMask + 35, // 40: buf.validate.FieldMaskRules.example:type_name -> google.protobuf.FieldMask + 36, // 41: buf.validate.TimestampRules.const:type_name -> google.protobuf.Timestamp + 36, // 42: buf.validate.TimestampRules.lt:type_name -> google.protobuf.Timestamp + 36, // 43: buf.validate.TimestampRules.lte:type_name -> google.protobuf.Timestamp + 36, // 44: buf.validate.TimestampRules.gt:type_name -> google.protobuf.Timestamp + 36, // 45: buf.validate.TimestampRules.gte:type_name -> google.protobuf.Timestamp + 34, // 46: buf.validate.TimestampRules.within:type_name -> google.protobuf.Duration + 36, // 47: buf.validate.TimestampRules.example:type_name -> google.protobuf.Timestamp + 31, // 48: buf.validate.Violations.violations:type_name -> buf.validate.Violation + 32, // 49: buf.validate.Violation.field:type_name -> buf.validate.FieldPath + 32, // 50: buf.validate.Violation.rule:type_name -> buf.validate.FieldPath + 33, // 51: buf.validate.FieldPath.elements:type_name -> buf.validate.FieldPathElement + 37, // 52: buf.validate.FieldPathElement.field_type:type_name -> google.protobuf.FieldDescriptorProto.Type + 37, // 53: buf.validate.FieldPathElement.key_type:type_name -> google.protobuf.FieldDescriptorProto.Type + 37, // 54: buf.validate.FieldPathElement.value_type:type_name -> google.protobuf.FieldDescriptorProto.Type + 38, // 55: buf.validate.message:extendee -> google.protobuf.MessageOptions + 39, // 56: buf.validate.oneof:extendee -> google.protobuf.OneofOptions + 40, // 57: buf.validate.field:extendee -> google.protobuf.FieldOptions + 40, // 58: buf.validate.predefined:extendee -> google.protobuf.FieldOptions + 3, // 59: buf.validate.message:type_name -> buf.validate.MessageRules + 5, // 60: buf.validate.oneof:type_name -> buf.validate.OneofRules + 6, // 61: buf.validate.field:type_name -> buf.validate.FieldRules + 7, // 62: buf.validate.predefined:type_name -> buf.validate.PredefinedRules + 63, // [63:63] is the sub-list for method output_type + 63, // [63:63] is the sub-list for method input_type + 59, // [59:63] is the sub-list for extension type_name + 55, // [55:59] is the sub-list for extension extendee + 0, // [0:55] is the sub-list for field type_name +} + +func init() { file_buf_validate_validate_proto_init() } +func file_buf_validate_validate_proto_init() { + if File_buf_validate_validate_proto != nil { + return + } + file_buf_validate_validate_proto_msgTypes[4].OneofWrappers = []any{ + (*FieldRules_Float)(nil), + (*FieldRules_Double)(nil), + (*FieldRules_Int32)(nil), + (*FieldRules_Int64)(nil), + (*FieldRules_Uint32)(nil), + (*FieldRules_Uint64)(nil), + (*FieldRules_Sint32)(nil), + (*FieldRules_Sint64)(nil), + (*FieldRules_Fixed32)(nil), + (*FieldRules_Fixed64)(nil), + (*FieldRules_Sfixed32)(nil), + (*FieldRules_Sfixed64)(nil), + (*FieldRules_Bool)(nil), + (*FieldRules_String_)(nil), + (*FieldRules_Bytes)(nil), + (*FieldRules_Enum)(nil), + (*FieldRules_Repeated)(nil), + (*FieldRules_Map)(nil), + (*FieldRules_Any)(nil), + (*FieldRules_Duration)(nil), + (*FieldRules_FieldMask)(nil), + (*FieldRules_Timestamp)(nil), + } + file_buf_validate_validate_proto_msgTypes[6].OneofWrappers = []any{ + (*FloatRules_Lt)(nil), + (*FloatRules_Lte)(nil), + (*FloatRules_Gt)(nil), + (*FloatRules_Gte)(nil), + } + file_buf_validate_validate_proto_msgTypes[7].OneofWrappers = []any{ + (*DoubleRules_Lt)(nil), + (*DoubleRules_Lte)(nil), + (*DoubleRules_Gt)(nil), + (*DoubleRules_Gte)(nil), + } + file_buf_validate_validate_proto_msgTypes[8].OneofWrappers = []any{ + (*Int32Rules_Lt)(nil), + (*Int32Rules_Lte)(nil), + (*Int32Rules_Gt)(nil), + (*Int32Rules_Gte)(nil), + } + file_buf_validate_validate_proto_msgTypes[9].OneofWrappers = []any{ + (*Int64Rules_Lt)(nil), + (*Int64Rules_Lte)(nil), + (*Int64Rules_Gt)(nil), + (*Int64Rules_Gte)(nil), + } + file_buf_validate_validate_proto_msgTypes[10].OneofWrappers = []any{ + (*UInt32Rules_Lt)(nil), + (*UInt32Rules_Lte)(nil), + (*UInt32Rules_Gt)(nil), + (*UInt32Rules_Gte)(nil), + } + file_buf_validate_validate_proto_msgTypes[11].OneofWrappers = []any{ + (*UInt64Rules_Lt)(nil), + (*UInt64Rules_Lte)(nil), + (*UInt64Rules_Gt)(nil), + (*UInt64Rules_Gte)(nil), + } + file_buf_validate_validate_proto_msgTypes[12].OneofWrappers = []any{ + (*SInt32Rules_Lt)(nil), + (*SInt32Rules_Lte)(nil), + (*SInt32Rules_Gt)(nil), + (*SInt32Rules_Gte)(nil), + } + file_buf_validate_validate_proto_msgTypes[13].OneofWrappers = []any{ + (*SInt64Rules_Lt)(nil), + (*SInt64Rules_Lte)(nil), + (*SInt64Rules_Gt)(nil), + (*SInt64Rules_Gte)(nil), + } + file_buf_validate_validate_proto_msgTypes[14].OneofWrappers = []any{ + (*Fixed32Rules_Lt)(nil), + (*Fixed32Rules_Lte)(nil), + (*Fixed32Rules_Gt)(nil), + (*Fixed32Rules_Gte)(nil), + } + file_buf_validate_validate_proto_msgTypes[15].OneofWrappers = []any{ + (*Fixed64Rules_Lt)(nil), + (*Fixed64Rules_Lte)(nil), + (*Fixed64Rules_Gt)(nil), + (*Fixed64Rules_Gte)(nil), + } + file_buf_validate_validate_proto_msgTypes[16].OneofWrappers = []any{ + (*SFixed32Rules_Lt)(nil), + (*SFixed32Rules_Lte)(nil), + (*SFixed32Rules_Gt)(nil), + (*SFixed32Rules_Gte)(nil), + } + file_buf_validate_validate_proto_msgTypes[17].OneofWrappers = []any{ + (*SFixed64Rules_Lt)(nil), + (*SFixed64Rules_Lte)(nil), + (*SFixed64Rules_Gt)(nil), + (*SFixed64Rules_Gte)(nil), + } + file_buf_validate_validate_proto_msgTypes[19].OneofWrappers = []any{ + (*StringRules_Email)(nil), + (*StringRules_Hostname)(nil), + (*StringRules_Ip)(nil), + (*StringRules_Ipv4)(nil), + (*StringRules_Ipv6)(nil), + (*StringRules_Uri)(nil), + (*StringRules_UriRef)(nil), + (*StringRules_Address)(nil), + (*StringRules_Uuid)(nil), + (*StringRules_Tuuid)(nil), + (*StringRules_IpWithPrefixlen)(nil), + (*StringRules_Ipv4WithPrefixlen)(nil), + (*StringRules_Ipv6WithPrefixlen)(nil), + (*StringRules_IpPrefix)(nil), + (*StringRules_Ipv4Prefix)(nil), + (*StringRules_Ipv6Prefix)(nil), + (*StringRules_HostAndPort)(nil), + (*StringRules_Ulid)(nil), + (*StringRules_ProtobufFqn)(nil), + (*StringRules_ProtobufDotFqn)(nil), + (*StringRules_WellKnownRegex)(nil), + } + file_buf_validate_validate_proto_msgTypes[20].OneofWrappers = []any{ + (*BytesRules_Ip)(nil), + (*BytesRules_Ipv4)(nil), + (*BytesRules_Ipv6)(nil), + (*BytesRules_Uuid)(nil), + } + file_buf_validate_validate_proto_msgTypes[25].OneofWrappers = []any{ + (*DurationRules_Lt)(nil), + (*DurationRules_Lte)(nil), + (*DurationRules_Gt)(nil), + (*DurationRules_Gte)(nil), + } + file_buf_validate_validate_proto_msgTypes[27].OneofWrappers = []any{ + (*TimestampRules_Lt)(nil), + (*TimestampRules_Lte)(nil), + (*TimestampRules_LtNow)(nil), + (*TimestampRules_Gt)(nil), + (*TimestampRules_Gte)(nil), + (*TimestampRules_GtNow)(nil), + } + file_buf_validate_validate_proto_msgTypes[31].OneofWrappers = []any{ + (*FieldPathElement_Index)(nil), + (*FieldPathElement_BoolKey)(nil), + (*FieldPathElement_IntKey)(nil), + (*FieldPathElement_UintKey)(nil), + (*FieldPathElement_StringKey)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_buf_validate_validate_proto_rawDesc), len(file_buf_validate_validate_proto_rawDesc)), + NumEnums: 2, + NumMessages: 32, + NumExtensions: 4, + NumServices: 0, + }, + GoTypes: file_buf_validate_validate_proto_goTypes, + DependencyIndexes: file_buf_validate_validate_proto_depIdxs, + EnumInfos: file_buf_validate_validate_proto_enumTypes, + MessageInfos: file_buf_validate_validate_proto_msgTypes, + ExtensionInfos: file_buf_validate_validate_proto_extTypes, + }.Build() + File_buf_validate_validate_proto = out.File + file_buf_validate_validate_proto_goTypes = nil + file_buf_validate_validate_proto_depIdxs = nil +} From ad7ea7b8c5bfa04439ce05d2a1d0af693767a9b0 Mon Sep 17 00:00:00 2001 From: Ravi Suhag Date: Mon, 20 Apr 2026 21:28:44 -0500 Subject: [PATCH 3/6] fix: use remote buf/validate module, remove local gen/buf --- Makefile | 2 +- gen/buf/validate/validate.pb.go | 9165 ------------------------------- 2 files changed, 1 insertion(+), 9166 deletions(-) delete mode 100644 gen/buf/validate/validate.pb.go diff --git a/Makefile b/Makefile index ded03e63..12046286 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ proto: ## Generate the protobuf files @echo " > [info] make sure correct version of dependencies are installed using 'make install'" @buf generate @find gen/raystack -mindepth 1 -maxdepth 1 ! -name stencil -exec rm -rf {} + - @find gen -mindepth 1 -maxdepth 1 ! -name raystack ! -name buf -exec rm -rf {} + + @rm -rf gen/buf @echo " > protobuf compilation finished" clean: ## Clean the build artifacts diff --git a/gen/buf/validate/validate.pb.go b/gen/buf/validate/validate.pb.go deleted file mode 100644 index a34aa0aa..00000000 --- a/gen/buf/validate/validate.pb.go +++ /dev/null @@ -1,9165 +0,0 @@ -// Copyright 2023-2026 Buf Technologies, Inc. -// -// 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. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.36.11 -// protoc (unknown) -// source: buf/validate/validate.proto - -// [Protovalidate](https://protovalidate.com/) is the semantic validation library for Protobuf. -// It provides standard annotations to validate common rules on messages and fields, as well as the ability to use [CEL](https://cel.dev) to write custom rules. -// It's the next generation of [protoc-gen-validate](https://github.com/bufbuild/protoc-gen-validate). -// -// This package provides the options, messages, and enums that power Protovalidate. -// Apply its options to messages, fields, and oneofs in your Protobuf schemas to add validation rules: -// -// ```proto -// message User { -// string id = 1 [(buf.validate.field).string.uuid = true]; -// string first_name = 2 [(buf.validate.field).string.max_len = 64]; -// string last_name = 3 [(buf.validate.field).string.max_len = 64]; -// -// option (buf.validate.message).cel = { -// id: "first_name_requires_last_name" -// message: "last_name must be present if first_name is present" -// expression: "!has(this.first_name) || has(this.last_name)" -// }; -// } -// ``` -// -// These rules are enforced at runtime by language-specific libraries. -// See the [developer quickstart](https://protovalidate.com/quickstart/) to get started, or go directly to the runtime library for your language: -// [Go](https://github.com/bufbuild/protovalidate-go), -// [JavaScript/TypeScript](https://github.com/bufbuild/protovalidate-es), -// [Java](https://github.com/bufbuild/protovalidate-java), -// [Python](https://github.com/bufbuild/protovalidate-python), -// or [C++](https://github.com/bufbuild/protovalidate-cc). - -package validate - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - descriptorpb "google.golang.org/protobuf/types/descriptorpb" - durationpb "google.golang.org/protobuf/types/known/durationpb" - fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" - unsafe "unsafe" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Specifies how `FieldRules.ignore` behaves, depending on the field's value, and -// whether the field tracks presence. -type Ignore int32 - -const ( - // Ignore rules if the field tracks presence and is unset. This is the default - // behavior. - // - // In proto3, only message fields, members of a Protobuf `oneof`, and fields - // with the `optional` label track presence. Consequently, the following fields - // are always validated, whether a value is set or not: - // - // ```proto - // syntax="proto3"; - // - // message RulesApply { - // string email = 1 [ - // (buf.validate.field).string.email = true - // ]; - // int32 age = 2 [ - // (buf.validate.field).int32.gt = 0 - // ]; - // repeated string labels = 3 [ - // (buf.validate.field).repeated.min_items = 1 - // ]; - // } - // - // ``` - // - // In contrast, the following fields track presence, and are only validated if - // a value is set: - // - // ```proto - // syntax="proto3"; - // - // message RulesApplyIfSet { - // optional string email = 1 [ - // (buf.validate.field).string.email = true - // ]; - // oneof ref { - // string reference = 2 [ - // (buf.validate.field).string.uuid = true - // ]; - // string name = 3 [ - // (buf.validate.field).string.min_len = 4 - // ]; - // } - // SomeMessage msg = 4 [ - // (buf.validate.field).cel = {/* ... */} - // ]; - // } - // - // ``` - // - // To ensure that such a field is set, add the `required` rule. - // - // To learn which fields track presence, see the - // [Field Presence cheat sheet](https://protobuf.dev/programming-guides/field_presence/#cheat). - Ignore_IGNORE_UNSPECIFIED Ignore = 0 - // Ignore rules if the field is unset, or set to the zero value. - // - // The zero value depends on the field type: - // - For strings, the zero value is the empty string. - // - For bytes, the zero value is empty bytes. - // - For bool, the zero value is false. - // - For numeric types, the zero value is zero. - // - For enums, the zero value is the first defined enum value. - // - For repeated fields, the zero is an empty list. - // - For map fields, the zero is an empty map. - // - For message fields, absence of the message (typically a null-value) is considered zero value. - // - // For fields that track presence (e.g. adding the `optional` label in proto3), - // this a no-op and behavior is the same as the default `IGNORE_UNSPECIFIED`. - Ignore_IGNORE_IF_ZERO_VALUE Ignore = 1 - // Always ignore rules, including the `required` rule. - // - // This is useful for ignoring the rules of a referenced message, or to - // temporarily ignore rules during development. - // - // ```proto - // - // message MyMessage { - // // The field's rules will always be ignored, including any validations - // // on value's fields. - // MyOtherMessage value = 1 [ - // (buf.validate.field).ignore = IGNORE_ALWAYS - // ]; - // } - // - // ``` - Ignore_IGNORE_ALWAYS Ignore = 3 -) - -// Enum value maps for Ignore. -var ( - Ignore_name = map[int32]string{ - 0: "IGNORE_UNSPECIFIED", - 1: "IGNORE_IF_ZERO_VALUE", - 3: "IGNORE_ALWAYS", - } - Ignore_value = map[string]int32{ - "IGNORE_UNSPECIFIED": 0, - "IGNORE_IF_ZERO_VALUE": 1, - "IGNORE_ALWAYS": 3, - } -) - -func (x Ignore) Enum() *Ignore { - p := new(Ignore) - *p = x - return p -} - -func (x Ignore) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Ignore) Descriptor() protoreflect.EnumDescriptor { - return file_buf_validate_validate_proto_enumTypes[0].Descriptor() -} - -func (Ignore) Type() protoreflect.EnumType { - return &file_buf_validate_validate_proto_enumTypes[0] -} - -func (x Ignore) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Do not use. -func (x *Ignore) UnmarshalJSON(b []byte) error { - num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) - if err != nil { - return err - } - *x = Ignore(num) - return nil -} - -// Deprecated: Use Ignore.Descriptor instead. -func (Ignore) EnumDescriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{0} -} - -// KnownRegex contains some well-known patterns. -type KnownRegex int32 - -const ( - KnownRegex_KNOWN_REGEX_UNSPECIFIED KnownRegex = 0 - // HTTP header name as defined by [RFC 7230](https://datatracker.ietf.org/doc/html/rfc7230#section-3.2). - KnownRegex_KNOWN_REGEX_HTTP_HEADER_NAME KnownRegex = 1 - // HTTP header value as defined by [RFC 7230](https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.4). - KnownRegex_KNOWN_REGEX_HTTP_HEADER_VALUE KnownRegex = 2 -) - -// Enum value maps for KnownRegex. -var ( - KnownRegex_name = map[int32]string{ - 0: "KNOWN_REGEX_UNSPECIFIED", - 1: "KNOWN_REGEX_HTTP_HEADER_NAME", - 2: "KNOWN_REGEX_HTTP_HEADER_VALUE", - } - KnownRegex_value = map[string]int32{ - "KNOWN_REGEX_UNSPECIFIED": 0, - "KNOWN_REGEX_HTTP_HEADER_NAME": 1, - "KNOWN_REGEX_HTTP_HEADER_VALUE": 2, - } -) - -func (x KnownRegex) Enum() *KnownRegex { - p := new(KnownRegex) - *p = x - return p -} - -func (x KnownRegex) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (KnownRegex) Descriptor() protoreflect.EnumDescriptor { - return file_buf_validate_validate_proto_enumTypes[1].Descriptor() -} - -func (KnownRegex) Type() protoreflect.EnumType { - return &file_buf_validate_validate_proto_enumTypes[1] -} - -func (x KnownRegex) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Do not use. -func (x *KnownRegex) UnmarshalJSON(b []byte) error { - num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) - if err != nil { - return err - } - *x = KnownRegex(num) - return nil -} - -// Deprecated: Use KnownRegex.Descriptor instead. -func (KnownRegex) EnumDescriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{1} -} - -// `Rule` represents a validation rule written in the Common Expression -// Language (CEL) syntax. Each Rule includes a unique identifier, an -// optional error message, and the CEL expression to evaluate. For more -// information, [see our documentation](https://buf.build/docs/protovalidate/schemas/custom-rules/). -// -// ```proto -// -// message Foo { -// option (buf.validate.message).cel = { -// id: "foo.bar" -// message: "bar must be greater than 0" -// expression: "this.bar > 0" -// }; -// int32 bar = 1; -// } -// -// ``` -type Rule struct { - state protoimpl.MessageState `protogen:"open.v1"` - // `id` is a string that serves as a machine-readable name for this Rule. - // It should be unique within its scope, which could be either a message or a field. - Id *string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` - // `message` is an optional field that provides a human-readable error message - // for this Rule when the CEL expression evaluates to false. If a - // non-empty message is provided, any strings resulting from the CEL - // expression evaluation are ignored. - Message *string `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"` - // `expression` is the actual CEL expression that will be evaluated for - // validation. This string must resolve to either a boolean or a string - // value. If the expression evaluates to false or a non-empty string, the - // validation is considered failed, and the message is rejected. - Expression *string `protobuf:"bytes,3,opt,name=expression" json:"expression,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Rule) Reset() { - *x = Rule{} - mi := &file_buf_validate_validate_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Rule) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Rule) ProtoMessage() {} - -func (x *Rule) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[0] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Rule.ProtoReflect.Descriptor instead. -func (*Rule) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{0} -} - -func (x *Rule) GetId() string { - if x != nil && x.Id != nil { - return *x.Id - } - return "" -} - -func (x *Rule) GetMessage() string { - if x != nil && x.Message != nil { - return *x.Message - } - return "" -} - -func (x *Rule) GetExpression() string { - if x != nil && x.Expression != nil { - return *x.Expression - } - return "" -} - -// MessageRules represents validation rules that are applied to the entire message. -// It includes disabling options and a list of Rule messages representing Common Expression Language (CEL) validation rules. -type MessageRules struct { - state protoimpl.MessageState `protogen:"open.v1"` - // `cel_expression` is a repeated field CEL expressions. Each expression specifies a validation - // rule to be applied to this message. These rules are written in Common Expression Language (CEL) syntax. - // - // This is a simplified form of the `cel` Rule field, where only `expression` is set. This allows for - // simpler syntax when defining CEL Rules where `id` and `message` derived from the `expression`. `id` will - // be same as the `expression`. - // - // For more information, [see our documentation](https://buf.build/docs/protovalidate/schemas/custom-rules/). - // - // ```proto - // - // message MyMessage { - // // The field `foo` must be greater than 42. - // option (buf.validate.message).cel_expression = "this.foo > 42"; - // // The field `foo` must be less than 84. - // option (buf.validate.message).cel_expression = "this.foo < 84"; - // optional int32 foo = 1; - // } - // - // ``` - CelExpression []string `protobuf:"bytes,5,rep,name=cel_expression,json=celExpression" json:"cel_expression,omitempty"` - // `cel` is a repeated field of type Rule. Each Rule specifies a validation rule to be applied to this message. - // These rules are written in Common Expression Language (CEL) syntax. For more information, - // [see our documentation](https://buf.build/docs/protovalidate/schemas/custom-rules/). - // - // ```proto - // - // message MyMessage { - // // The field `foo` must be greater than 42. - // option (buf.validate.message).cel = { - // id: "my_message.value", - // message: "must be greater than 42", - // expression: "this.foo > 42", - // }; - // optional int32 foo = 1; - // } - // - // ``` - Cel []*Rule `protobuf:"bytes,3,rep,name=cel" json:"cel,omitempty"` - // `oneof` is a repeated field of type MessageOneofRule that specifies a list of fields - // of which at most one can be present. If `required` is also specified, then exactly one - // of the specified fields _must_ be present. - // - // This will enforce oneof-like constraints with a few features not provided by - // actual Protobuf oneof declarations: - // 1. Repeated and map fields are allowed in this validation. In a Protobuf oneof, - // only scalar fields are allowed. - // 2. Fields with implicit presence are allowed. In a Protobuf oneof, all member - // fields have explicit presence. This means that, for the purpose of determining - // how many fields are set, explicitly setting such a field to its zero value is - // effectively the same as not setting it at all. - // 3. This will always generate validation errors for a message unmarshalled from - // serialized data that sets more than one field. With a Protobuf oneof, when - // multiple fields are present in the serialized form, earlier values are usually - // silently ignored when unmarshalling, with only the last field being set when - // unmarshalling completes. - // - // Note that adding a field to a `oneof` will also set the IGNORE_IF_ZERO_VALUE on the fields. This means - // only the field that is set will be validated and the unset fields are not validated according to the field rules. - // This behavior can be overridden by setting `ignore` against a field. - // - // ```proto - // - // message MyMessage { - // // Only one of `field1` or `field2` _can_ be present in this message. - // option (buf.validate.message).oneof = { fields: ["field1", "field2"] }; - // // Exactly one of `field3` or `field4` _must_ be present in this message. - // option (buf.validate.message).oneof = { fields: ["field3", "field4"], required: true }; - // string field1 = 1; - // bytes field2 = 2; - // bool field3 = 3; - // int32 field4 = 4; - // } - // - // ``` - Oneof []*MessageOneofRule `protobuf:"bytes,4,rep,name=oneof" json:"oneof,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *MessageRules) Reset() { - *x = MessageRules{} - mi := &file_buf_validate_validate_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *MessageRules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MessageRules) ProtoMessage() {} - -func (x *MessageRules) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[1] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MessageRules.ProtoReflect.Descriptor instead. -func (*MessageRules) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{1} -} - -func (x *MessageRules) GetCelExpression() []string { - if x != nil { - return x.CelExpression - } - return nil -} - -func (x *MessageRules) GetCel() []*Rule { - if x != nil { - return x.Cel - } - return nil -} - -func (x *MessageRules) GetOneof() []*MessageOneofRule { - if x != nil { - return x.Oneof - } - return nil -} - -type MessageOneofRule struct { - state protoimpl.MessageState `protogen:"open.v1"` - // A list of field names to include in the oneof. All field names must be - // defined in the message. At least one field must be specified, and - // duplicates are not permitted. - Fields []string `protobuf:"bytes,1,rep,name=fields" json:"fields,omitempty"` - // If true, one of the fields specified _must_ be set. - Required *bool `protobuf:"varint,2,opt,name=required" json:"required,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *MessageOneofRule) Reset() { - *x = MessageOneofRule{} - mi := &file_buf_validate_validate_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *MessageOneofRule) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MessageOneofRule) ProtoMessage() {} - -func (x *MessageOneofRule) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[2] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MessageOneofRule.ProtoReflect.Descriptor instead. -func (*MessageOneofRule) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{2} -} - -func (x *MessageOneofRule) GetFields() []string { - if x != nil { - return x.Fields - } - return nil -} - -func (x *MessageOneofRule) GetRequired() bool { - if x != nil && x.Required != nil { - return *x.Required - } - return false -} - -// The `OneofRules` message type enables you to manage rules for -// oneof fields in your protobuf messages. -type OneofRules struct { - state protoimpl.MessageState `protogen:"open.v1"` - // If `required` is true, exactly one field of the oneof must be set. A - // validation error is returned if no fields in the oneof are set. Further rules - // should be placed on the fields themselves to ensure they are valid values, - // such as `min_len` or `gt`. - // - // ```proto - // - // message MyMessage { - // oneof value { - // // Either `a` or `b` must be set. If `a` is set, it must also be - // // non-empty; whereas if `b` is set, it can still be an empty string. - // option (buf.validate.oneof).required = true; - // string a = 1 [(buf.validate.field).string.min_len = 1]; - // string b = 2; - // } - // } - // - // ``` - Required *bool `protobuf:"varint,1,opt,name=required" json:"required,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *OneofRules) Reset() { - *x = OneofRules{} - mi := &file_buf_validate_validate_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *OneofRules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OneofRules) ProtoMessage() {} - -func (x *OneofRules) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[3] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OneofRules.ProtoReflect.Descriptor instead. -func (*OneofRules) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{3} -} - -func (x *OneofRules) GetRequired() bool { - if x != nil && x.Required != nil { - return *x.Required - } - return false -} - -// FieldRules encapsulates the rules for each type of field. Depending on -// the field, the correct set should be used to ensure proper validations. -type FieldRules struct { - state protoimpl.MessageState `protogen:"open.v1"` - // `cel_expression` is a repeated field CEL expressions. Each expression specifies a validation - // rule to be applied to this message. These rules are written in Common Expression Language (CEL) syntax. - // - // This is a simplified form of the `cel` Rule field, where only `expression` is set. This allows for - // simpler syntax when defining CEL Rules where `id` and `message` derived from the `expression`. `id` will - // be same as the `expression`. - // - // For more information, [see our documentation](https://buf.build/docs/protovalidate/schemas/custom-rules/). - // - // ```proto - // - // message MyMessage { - // // The field `value` must be greater than 42. - // optional int32 value = 1 [(buf.validate.field).cel_expression = "this > 42"]; - // } - // - // ``` - CelExpression []string `protobuf:"bytes,29,rep,name=cel_expression,json=celExpression" json:"cel_expression,omitempty"` - // `cel` is a repeated field used to represent a textual expression - // in the Common Expression Language (CEL) syntax. For more information, - // [see our documentation](https://buf.build/docs/protovalidate/schemas/custom-rules/). - // - // ```proto - // - // message MyMessage { - // // The field `value` must be greater than 42. - // optional int32 value = 1 [(buf.validate.field).cel = { - // id: "my_message.value", - // message: "must be greater than 42", - // expression: "this > 42", - // }]; - // } - // - // ``` - Cel []*Rule `protobuf:"bytes,23,rep,name=cel" json:"cel,omitempty"` - // If `required` is true, the field must be set. A validation error is returned - // if the field is not set. - // - // ```proto - // syntax="proto3"; - // - // message FieldsWithPresence { - // // Requires any string to be set, including the empty string. - // optional string link = 1 [ - // (buf.validate.field).required = true - // ]; - // // Requires true or false to be set. - // optional bool disabled = 2 [ - // (buf.validate.field).required = true - // ]; - // // Requires a message to be set, including the empty message. - // SomeMessage msg = 4 [ - // (buf.validate.field).required = true - // ]; - // } - // - // ``` - // - // All fields in the example above track presence. By default, Protovalidate - // ignores rules on those fields if no value is set. `required` ensures that - // the fields are set and valid. - // - // Fields that don't track presence are always validated by Protovalidate, - // whether they are set or not. It is not necessary to add `required`. It - // can be added to indicate that the field cannot be the zero value. - // - // ```proto - // syntax="proto3"; - // - // message FieldsWithoutPresence { - // // `string.email` always applies, even to an empty string. - // string link = 1 [ - // (buf.validate.field).string.email = true - // ]; - // // `repeated.min_items` always applies, even to an empty list. - // repeated string labels = 2 [ - // (buf.validate.field).repeated.min_items = 1 - // ]; - // // `required`, for fields that don't track presence, indicates - // // the value of the field can't be the zero value. - // int32 zero_value_not_allowed = 3 [ - // (buf.validate.field).required = true - // ]; - // } - // - // ``` - // - // To learn which fields track presence, see the - // [Field Presence cheat sheet](https://protobuf.dev/programming-guides/field_presence/#cheat). - // - // Note: While field rules can be applied to repeated items, map keys, and map - // values, the elements are always considered to be set. Consequently, - // specifying `repeated.items.required` is redundant. - Required *bool `protobuf:"varint,25,opt,name=required" json:"required,omitempty"` - // Ignore validation rules on the field if its value matches the specified - // criteria. See the `Ignore` enum for details. - // - // ```proto - // - // message UpdateRequest { - // // The uri rule only applies if the field is not an empty string. - // string url = 1 [ - // (buf.validate.field).ignore = IGNORE_IF_ZERO_VALUE, - // (buf.validate.field).string.uri = true - // ]; - // } - // - // ``` - Ignore *Ignore `protobuf:"varint,27,opt,name=ignore,enum=buf.validate.Ignore" json:"ignore,omitempty"` - // Types that are valid to be assigned to Type: - // - // *FieldRules_Float - // *FieldRules_Double - // *FieldRules_Int32 - // *FieldRules_Int64 - // *FieldRules_Uint32 - // *FieldRules_Uint64 - // *FieldRules_Sint32 - // *FieldRules_Sint64 - // *FieldRules_Fixed32 - // *FieldRules_Fixed64 - // *FieldRules_Sfixed32 - // *FieldRules_Sfixed64 - // *FieldRules_Bool - // *FieldRules_String_ - // *FieldRules_Bytes - // *FieldRules_Enum - // *FieldRules_Repeated - // *FieldRules_Map - // *FieldRules_Any - // *FieldRules_Duration - // *FieldRules_FieldMask - // *FieldRules_Timestamp - Type isFieldRules_Type `protobuf_oneof:"type"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *FieldRules) Reset() { - *x = FieldRules{} - mi := &file_buf_validate_validate_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *FieldRules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FieldRules) ProtoMessage() {} - -func (x *FieldRules) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[4] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FieldRules.ProtoReflect.Descriptor instead. -func (*FieldRules) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{4} -} - -func (x *FieldRules) GetCelExpression() []string { - if x != nil { - return x.CelExpression - } - return nil -} - -func (x *FieldRules) GetCel() []*Rule { - if x != nil { - return x.Cel - } - return nil -} - -func (x *FieldRules) GetRequired() bool { - if x != nil && x.Required != nil { - return *x.Required - } - return false -} - -func (x *FieldRules) GetIgnore() Ignore { - if x != nil && x.Ignore != nil { - return *x.Ignore - } - return Ignore_IGNORE_UNSPECIFIED -} - -func (x *FieldRules) GetType() isFieldRules_Type { - if x != nil { - return x.Type - } - return nil -} - -func (x *FieldRules) GetFloat() *FloatRules { - if x != nil { - if x, ok := x.Type.(*FieldRules_Float); ok { - return x.Float - } - } - return nil -} - -func (x *FieldRules) GetDouble() *DoubleRules { - if x != nil { - if x, ok := x.Type.(*FieldRules_Double); ok { - return x.Double - } - } - return nil -} - -func (x *FieldRules) GetInt32() *Int32Rules { - if x != nil { - if x, ok := x.Type.(*FieldRules_Int32); ok { - return x.Int32 - } - } - return nil -} - -func (x *FieldRules) GetInt64() *Int64Rules { - if x != nil { - if x, ok := x.Type.(*FieldRules_Int64); ok { - return x.Int64 - } - } - return nil -} - -func (x *FieldRules) GetUint32() *UInt32Rules { - if x != nil { - if x, ok := x.Type.(*FieldRules_Uint32); ok { - return x.Uint32 - } - } - return nil -} - -func (x *FieldRules) GetUint64() *UInt64Rules { - if x != nil { - if x, ok := x.Type.(*FieldRules_Uint64); ok { - return x.Uint64 - } - } - return nil -} - -func (x *FieldRules) GetSint32() *SInt32Rules { - if x != nil { - if x, ok := x.Type.(*FieldRules_Sint32); ok { - return x.Sint32 - } - } - return nil -} - -func (x *FieldRules) GetSint64() *SInt64Rules { - if x != nil { - if x, ok := x.Type.(*FieldRules_Sint64); ok { - return x.Sint64 - } - } - return nil -} - -func (x *FieldRules) GetFixed32() *Fixed32Rules { - if x != nil { - if x, ok := x.Type.(*FieldRules_Fixed32); ok { - return x.Fixed32 - } - } - return nil -} - -func (x *FieldRules) GetFixed64() *Fixed64Rules { - if x != nil { - if x, ok := x.Type.(*FieldRules_Fixed64); ok { - return x.Fixed64 - } - } - return nil -} - -func (x *FieldRules) GetSfixed32() *SFixed32Rules { - if x != nil { - if x, ok := x.Type.(*FieldRules_Sfixed32); ok { - return x.Sfixed32 - } - } - return nil -} - -func (x *FieldRules) GetSfixed64() *SFixed64Rules { - if x != nil { - if x, ok := x.Type.(*FieldRules_Sfixed64); ok { - return x.Sfixed64 - } - } - return nil -} - -func (x *FieldRules) GetBool() *BoolRules { - if x != nil { - if x, ok := x.Type.(*FieldRules_Bool); ok { - return x.Bool - } - } - return nil -} - -func (x *FieldRules) GetString_() *StringRules { - if x != nil { - if x, ok := x.Type.(*FieldRules_String_); ok { - return x.String_ - } - } - return nil -} - -func (x *FieldRules) GetBytes() *BytesRules { - if x != nil { - if x, ok := x.Type.(*FieldRules_Bytes); ok { - return x.Bytes - } - } - return nil -} - -func (x *FieldRules) GetEnum() *EnumRules { - if x != nil { - if x, ok := x.Type.(*FieldRules_Enum); ok { - return x.Enum - } - } - return nil -} - -func (x *FieldRules) GetRepeated() *RepeatedRules { - if x != nil { - if x, ok := x.Type.(*FieldRules_Repeated); ok { - return x.Repeated - } - } - return nil -} - -func (x *FieldRules) GetMap() *MapRules { - if x != nil { - if x, ok := x.Type.(*FieldRules_Map); ok { - return x.Map - } - } - return nil -} - -func (x *FieldRules) GetAny() *AnyRules { - if x != nil { - if x, ok := x.Type.(*FieldRules_Any); ok { - return x.Any - } - } - return nil -} - -func (x *FieldRules) GetDuration() *DurationRules { - if x != nil { - if x, ok := x.Type.(*FieldRules_Duration); ok { - return x.Duration - } - } - return nil -} - -func (x *FieldRules) GetFieldMask() *FieldMaskRules { - if x != nil { - if x, ok := x.Type.(*FieldRules_FieldMask); ok { - return x.FieldMask - } - } - return nil -} - -func (x *FieldRules) GetTimestamp() *TimestampRules { - if x != nil { - if x, ok := x.Type.(*FieldRules_Timestamp); ok { - return x.Timestamp - } - } - return nil -} - -type isFieldRules_Type interface { - isFieldRules_Type() -} - -type FieldRules_Float struct { - // Scalar Field Types - Float *FloatRules `protobuf:"bytes,1,opt,name=float,oneof"` -} - -type FieldRules_Double struct { - Double *DoubleRules `protobuf:"bytes,2,opt,name=double,oneof"` -} - -type FieldRules_Int32 struct { - Int32 *Int32Rules `protobuf:"bytes,3,opt,name=int32,oneof"` -} - -type FieldRules_Int64 struct { - Int64 *Int64Rules `protobuf:"bytes,4,opt,name=int64,oneof"` -} - -type FieldRules_Uint32 struct { - Uint32 *UInt32Rules `protobuf:"bytes,5,opt,name=uint32,oneof"` -} - -type FieldRules_Uint64 struct { - Uint64 *UInt64Rules `protobuf:"bytes,6,opt,name=uint64,oneof"` -} - -type FieldRules_Sint32 struct { - Sint32 *SInt32Rules `protobuf:"bytes,7,opt,name=sint32,oneof"` -} - -type FieldRules_Sint64 struct { - Sint64 *SInt64Rules `protobuf:"bytes,8,opt,name=sint64,oneof"` -} - -type FieldRules_Fixed32 struct { - Fixed32 *Fixed32Rules `protobuf:"bytes,9,opt,name=fixed32,oneof"` -} - -type FieldRules_Fixed64 struct { - Fixed64 *Fixed64Rules `protobuf:"bytes,10,opt,name=fixed64,oneof"` -} - -type FieldRules_Sfixed32 struct { - Sfixed32 *SFixed32Rules `protobuf:"bytes,11,opt,name=sfixed32,oneof"` -} - -type FieldRules_Sfixed64 struct { - Sfixed64 *SFixed64Rules `protobuf:"bytes,12,opt,name=sfixed64,oneof"` -} - -type FieldRules_Bool struct { - Bool *BoolRules `protobuf:"bytes,13,opt,name=bool,oneof"` -} - -type FieldRules_String_ struct { - String_ *StringRules `protobuf:"bytes,14,opt,name=string,oneof"` -} - -type FieldRules_Bytes struct { - Bytes *BytesRules `protobuf:"bytes,15,opt,name=bytes,oneof"` -} - -type FieldRules_Enum struct { - // Complex Field Types - Enum *EnumRules `protobuf:"bytes,16,opt,name=enum,oneof"` -} - -type FieldRules_Repeated struct { - Repeated *RepeatedRules `protobuf:"bytes,18,opt,name=repeated,oneof"` -} - -type FieldRules_Map struct { - Map *MapRules `protobuf:"bytes,19,opt,name=map,oneof"` -} - -type FieldRules_Any struct { - // Well-Known Field Types - Any *AnyRules `protobuf:"bytes,20,opt,name=any,oneof"` -} - -type FieldRules_Duration struct { - Duration *DurationRules `protobuf:"bytes,21,opt,name=duration,oneof"` -} - -type FieldRules_FieldMask struct { - FieldMask *FieldMaskRules `protobuf:"bytes,28,opt,name=field_mask,json=fieldMask,oneof"` -} - -type FieldRules_Timestamp struct { - Timestamp *TimestampRules `protobuf:"bytes,22,opt,name=timestamp,oneof"` -} - -func (*FieldRules_Float) isFieldRules_Type() {} - -func (*FieldRules_Double) isFieldRules_Type() {} - -func (*FieldRules_Int32) isFieldRules_Type() {} - -func (*FieldRules_Int64) isFieldRules_Type() {} - -func (*FieldRules_Uint32) isFieldRules_Type() {} - -func (*FieldRules_Uint64) isFieldRules_Type() {} - -func (*FieldRules_Sint32) isFieldRules_Type() {} - -func (*FieldRules_Sint64) isFieldRules_Type() {} - -func (*FieldRules_Fixed32) isFieldRules_Type() {} - -func (*FieldRules_Fixed64) isFieldRules_Type() {} - -func (*FieldRules_Sfixed32) isFieldRules_Type() {} - -func (*FieldRules_Sfixed64) isFieldRules_Type() {} - -func (*FieldRules_Bool) isFieldRules_Type() {} - -func (*FieldRules_String_) isFieldRules_Type() {} - -func (*FieldRules_Bytes) isFieldRules_Type() {} - -func (*FieldRules_Enum) isFieldRules_Type() {} - -func (*FieldRules_Repeated) isFieldRules_Type() {} - -func (*FieldRules_Map) isFieldRules_Type() {} - -func (*FieldRules_Any) isFieldRules_Type() {} - -func (*FieldRules_Duration) isFieldRules_Type() {} - -func (*FieldRules_FieldMask) isFieldRules_Type() {} - -func (*FieldRules_Timestamp) isFieldRules_Type() {} - -// PredefinedRules are custom rules that can be re-used with -// multiple fields. -type PredefinedRules struct { - state protoimpl.MessageState `protogen:"open.v1"` - // `cel` is a repeated field used to represent a textual expression - // in the Common Expression Language (CEL) syntax. For more information, - // [see our documentation](https://buf.build/docs/protovalidate/schemas/predefined-rules/). - // - // ```proto - // - // message MyMessage { - // // The field `value` must be greater than 42. - // optional int32 value = 1 [(buf.validate.predefined).cel = { - // id: "my_message.value", - // message: "must be greater than 42", - // expression: "this > 42", - // }]; - // } - // - // ``` - Cel []*Rule `protobuf:"bytes,1,rep,name=cel" json:"cel,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *PredefinedRules) Reset() { - *x = PredefinedRules{} - mi := &file_buf_validate_validate_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *PredefinedRules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PredefinedRules) ProtoMessage() {} - -func (x *PredefinedRules) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[5] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PredefinedRules.ProtoReflect.Descriptor instead. -func (*PredefinedRules) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{5} -} - -func (x *PredefinedRules) GetCel() []*Rule { - if x != nil { - return x.Cel - } - return nil -} - -// FloatRules describes the rules applied to `float` values. These -// rules may also be applied to the `google.protobuf.FloatValue` Well-Known-Type. -type FloatRules struct { - state protoimpl.MessageState `protogen:"open.v1"` - // `const` requires the field value to exactly match the specified value. If - // the field value doesn't match, an error message is generated. - // - // ```proto - // - // message MyFloat { - // // value must equal 42.0 - // float value = 1 [(buf.validate.field).float.const = 42.0]; - // } - // - // ``` - Const *float32 `protobuf:"fixed32,1,opt,name=const" json:"const,omitempty"` - // Types that are valid to be assigned to LessThan: - // - // *FloatRules_Lt - // *FloatRules_Lte - LessThan isFloatRules_LessThan `protobuf_oneof:"less_than"` - // Types that are valid to be assigned to GreaterThan: - // - // *FloatRules_Gt - // *FloatRules_Gte - GreaterThan isFloatRules_GreaterThan `protobuf_oneof:"greater_than"` - // `in` requires the field value to be equal to one of the specified values. - // If the field value isn't one of the specified values, an error message - // is generated. - // - // ```proto - // - // message MyFloat { - // // must be in list [1.0, 2.0, 3.0] - // float value = 1 [(buf.validate.field).float = { in: [1.0, 2.0, 3.0] }]; - // } - // - // ``` - In []float32 `protobuf:"fixed32,6,rep,name=in" json:"in,omitempty"` - // `not_in` requires the field value to not be equal to any of the specified - // values. If the field value is one of the specified values, an error - // message is generated. - // - // ```proto - // - // message MyFloat { - // // value must not be in list [1.0, 2.0, 3.0] - // float value = 1 [(buf.validate.field).float = { not_in: [1.0, 2.0, 3.0] }]; - // } - // - // ``` - NotIn []float32 `protobuf:"fixed32,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - // `finite` requires the field value to be finite. If the field value is - // infinite or NaN, an error message is generated. - Finite *bool `protobuf:"varint,8,opt,name=finite" json:"finite,omitempty"` - // `example` specifies values that the field may have. These values SHOULD - // conform to other rules. `example` values will not impact validation - // but may be used as helpful guidance on how to populate the given field. - // - // ```proto - // - // message MyFloat { - // float value = 1 [ - // (buf.validate.field).float.example = 1.0, - // (buf.validate.field).float.example = inf - // ]; - // } - // - // ``` - Example []float32 `protobuf:"fixed32,9,rep,name=example" json:"example,omitempty"` - extensionFields protoimpl.ExtensionFields - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *FloatRules) Reset() { - *x = FloatRules{} - mi := &file_buf_validate_validate_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *FloatRules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FloatRules) ProtoMessage() {} - -func (x *FloatRules) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[6] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FloatRules.ProtoReflect.Descriptor instead. -func (*FloatRules) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{6} -} - -func (x *FloatRules) GetConst() float32 { - if x != nil && x.Const != nil { - return *x.Const - } - return 0 -} - -func (x *FloatRules) GetLessThan() isFloatRules_LessThan { - if x != nil { - return x.LessThan - } - return nil -} - -func (x *FloatRules) GetLt() float32 { - if x != nil { - if x, ok := x.LessThan.(*FloatRules_Lt); ok { - return x.Lt - } - } - return 0 -} - -func (x *FloatRules) GetLte() float32 { - if x != nil { - if x, ok := x.LessThan.(*FloatRules_Lte); ok { - return x.Lte - } - } - return 0 -} - -func (x *FloatRules) GetGreaterThan() isFloatRules_GreaterThan { - if x != nil { - return x.GreaterThan - } - return nil -} - -func (x *FloatRules) GetGt() float32 { - if x != nil { - if x, ok := x.GreaterThan.(*FloatRules_Gt); ok { - return x.Gt - } - } - return 0 -} - -func (x *FloatRules) GetGte() float32 { - if x != nil { - if x, ok := x.GreaterThan.(*FloatRules_Gte); ok { - return x.Gte - } - } - return 0 -} - -func (x *FloatRules) GetIn() []float32 { - if x != nil { - return x.In - } - return nil -} - -func (x *FloatRules) GetNotIn() []float32 { - if x != nil { - return x.NotIn - } - return nil -} - -func (x *FloatRules) GetFinite() bool { - if x != nil && x.Finite != nil { - return *x.Finite - } - return false -} - -func (x *FloatRules) GetExample() []float32 { - if x != nil { - return x.Example - } - return nil -} - -type isFloatRules_LessThan interface { - isFloatRules_LessThan() -} - -type FloatRules_Lt struct { - // `lt` requires the field value to be less than the specified value (field < - // value). If the field value is equal to or greater than the specified value, - // an error message is generated. - // - // ```proto - // - // message MyFloat { - // // must be less than 10.0 - // float value = 1 [(buf.validate.field).float.lt = 10.0]; - // } - // - // ``` - Lt float32 `protobuf:"fixed32,2,opt,name=lt,oneof"` -} - -type FloatRules_Lte struct { - // `lte` requires the field value to be less than or equal to the specified - // value (field <= value). If the field value is greater than the specified - // value, an error message is generated. - // - // ```proto - // - // message MyFloat { - // // must be less than or equal to 10.0 - // float value = 1 [(buf.validate.field).float.lte = 10.0]; - // } - // - // ``` - Lte float32 `protobuf:"fixed32,3,opt,name=lte,oneof"` -} - -func (*FloatRules_Lt) isFloatRules_LessThan() {} - -func (*FloatRules_Lte) isFloatRules_LessThan() {} - -type isFloatRules_GreaterThan interface { - isFloatRules_GreaterThan() -} - -type FloatRules_Gt struct { - // `gt` requires the field value to be greater than the specified value - // (exclusive). If the value of `gt` is larger than a specified `lt` or - // `lte`, the range is reversed, and the field value must be outside the - // specified range. If the field value doesn't meet the required conditions, - // an error message is generated. - // - // ```proto - // - // message MyFloat { - // // must be greater than 5.0 [float.gt] - // float value = 1 [(buf.validate.field).float.gt = 5.0]; - // - // // must be greater than 5 and less than 10.0 [float.gt_lt] - // float other_value = 2 [(buf.validate.field).float = { gt: 5.0, lt: 10.0 }]; - // - // // must be greater than 10 or less than 5.0 [float.gt_lt_exclusive] - // float another_value = 3 [(buf.validate.field).float = { gt: 10.0, lt: 5.0 }]; - // } - // - // ``` - Gt float32 `protobuf:"fixed32,4,opt,name=gt,oneof"` -} - -type FloatRules_Gte struct { - // `gte` requires the field value to be greater than or equal to the specified - // value (exclusive). If the value of `gte` is larger than a specified `lt` - // or `lte`, the range is reversed, and the field value must be outside the - // specified range. If the field value doesn't meet the required conditions, - // an error message is generated. - // - // ```proto - // - // message MyFloat { - // // must be greater than or equal to 5.0 [float.gte] - // float value = 1 [(buf.validate.field).float.gte = 5.0]; - // - // // must be greater than or equal to 5.0 and less than 10.0 [float.gte_lt] - // float other_value = 2 [(buf.validate.field).float = { gte: 5.0, lt: 10.0 }]; - // - // // must be greater than or equal to 10.0 or less than 5.0 [float.gte_lt_exclusive] - // float another_value = 3 [(buf.validate.field).float = { gte: 10.0, lt: 5.0 }]; - // } - // - // ``` - Gte float32 `protobuf:"fixed32,5,opt,name=gte,oneof"` -} - -func (*FloatRules_Gt) isFloatRules_GreaterThan() {} - -func (*FloatRules_Gte) isFloatRules_GreaterThan() {} - -// DoubleRules describes the rules applied to `double` values. These -// rules may also be applied to the `google.protobuf.DoubleValue` Well-Known-Type. -type DoubleRules struct { - state protoimpl.MessageState `protogen:"open.v1"` - // `const` requires the field value to exactly match the specified value. If - // the field value doesn't match, an error message is generated. - // - // ```proto - // - // message MyDouble { - // // value must equal 42.0 - // double value = 1 [(buf.validate.field).double.const = 42.0]; - // } - // - // ``` - Const *float64 `protobuf:"fixed64,1,opt,name=const" json:"const,omitempty"` - // Types that are valid to be assigned to LessThan: - // - // *DoubleRules_Lt - // *DoubleRules_Lte - LessThan isDoubleRules_LessThan `protobuf_oneof:"less_than"` - // Types that are valid to be assigned to GreaterThan: - // - // *DoubleRules_Gt - // *DoubleRules_Gte - GreaterThan isDoubleRules_GreaterThan `protobuf_oneof:"greater_than"` - // `in` requires the field value to be equal to one of the specified values. - // If the field value isn't one of the specified values, an error message is - // generated. - // - // ```proto - // - // message MyDouble { - // // must be in list [1.0, 2.0, 3.0] - // double value = 1 [(buf.validate.field).double = { in: [1.0, 2.0, 3.0] }]; - // } - // - // ``` - In []float64 `protobuf:"fixed64,6,rep,name=in" json:"in,omitempty"` - // `not_in` requires the field value to not be equal to any of the specified - // values. If the field value is one of the specified values, an error - // message is generated. - // - // ```proto - // - // message MyDouble { - // // value must not be in list [1.0, 2.0, 3.0] - // double value = 1 [(buf.validate.field).double = { not_in: [1.0, 2.0, 3.0] }]; - // } - // - // ``` - NotIn []float64 `protobuf:"fixed64,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - // `finite` requires the field value to be finite. If the field value is - // infinite or NaN, an error message is generated. - Finite *bool `protobuf:"varint,8,opt,name=finite" json:"finite,omitempty"` - // `example` specifies values that the field may have. These values SHOULD - // conform to other rules. `example` values will not impact validation - // but may be used as helpful guidance on how to populate the given field. - // - // ```proto - // - // message MyDouble { - // double value = 1 [ - // (buf.validate.field).double.example = 1.0, - // (buf.validate.field).double.example = inf - // ]; - // } - // - // ``` - Example []float64 `protobuf:"fixed64,9,rep,name=example" json:"example,omitempty"` - extensionFields protoimpl.ExtensionFields - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DoubleRules) Reset() { - *x = DoubleRules{} - mi := &file_buf_validate_validate_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DoubleRules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DoubleRules) ProtoMessage() {} - -func (x *DoubleRules) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[7] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DoubleRules.ProtoReflect.Descriptor instead. -func (*DoubleRules) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{7} -} - -func (x *DoubleRules) GetConst() float64 { - if x != nil && x.Const != nil { - return *x.Const - } - return 0 -} - -func (x *DoubleRules) GetLessThan() isDoubleRules_LessThan { - if x != nil { - return x.LessThan - } - return nil -} - -func (x *DoubleRules) GetLt() float64 { - if x != nil { - if x, ok := x.LessThan.(*DoubleRules_Lt); ok { - return x.Lt - } - } - return 0 -} - -func (x *DoubleRules) GetLte() float64 { - if x != nil { - if x, ok := x.LessThan.(*DoubleRules_Lte); ok { - return x.Lte - } - } - return 0 -} - -func (x *DoubleRules) GetGreaterThan() isDoubleRules_GreaterThan { - if x != nil { - return x.GreaterThan - } - return nil -} - -func (x *DoubleRules) GetGt() float64 { - if x != nil { - if x, ok := x.GreaterThan.(*DoubleRules_Gt); ok { - return x.Gt - } - } - return 0 -} - -func (x *DoubleRules) GetGte() float64 { - if x != nil { - if x, ok := x.GreaterThan.(*DoubleRules_Gte); ok { - return x.Gte - } - } - return 0 -} - -func (x *DoubleRules) GetIn() []float64 { - if x != nil { - return x.In - } - return nil -} - -func (x *DoubleRules) GetNotIn() []float64 { - if x != nil { - return x.NotIn - } - return nil -} - -func (x *DoubleRules) GetFinite() bool { - if x != nil && x.Finite != nil { - return *x.Finite - } - return false -} - -func (x *DoubleRules) GetExample() []float64 { - if x != nil { - return x.Example - } - return nil -} - -type isDoubleRules_LessThan interface { - isDoubleRules_LessThan() -} - -type DoubleRules_Lt struct { - // `lt` requires the field value to be less than the specified value (field < - // value). If the field value is equal to or greater than the specified - // value, an error message is generated. - // - // ```proto - // - // message MyDouble { - // // must be less than 10.0 - // double value = 1 [(buf.validate.field).double.lt = 10.0]; - // } - // - // ``` - Lt float64 `protobuf:"fixed64,2,opt,name=lt,oneof"` -} - -type DoubleRules_Lte struct { - // `lte` requires the field value to be less than or equal to the specified value - // (field <= value). If the field value is greater than the specified value, - // an error message is generated. - // - // ```proto - // - // message MyDouble { - // // must be less than or equal to 10.0 - // double value = 1 [(buf.validate.field).double.lte = 10.0]; - // } - // - // ``` - Lte float64 `protobuf:"fixed64,3,opt,name=lte,oneof"` -} - -func (*DoubleRules_Lt) isDoubleRules_LessThan() {} - -func (*DoubleRules_Lte) isDoubleRules_LessThan() {} - -type isDoubleRules_GreaterThan interface { - isDoubleRules_GreaterThan() -} - -type DoubleRules_Gt struct { - // `gt` requires the field value to be greater than the specified value - // (exclusive). If the value of `gt` is larger than a specified `lt` or `lte`, - // the range is reversed, and the field value must be outside the specified - // range. If the field value doesn't meet the required conditions, an error - // message is generated. - // - // ```proto - // - // message MyDouble { - // // must be greater than 5.0 [double.gt] - // double value = 1 [(buf.validate.field).double.gt = 5.0]; - // - // // must be greater than 5 and less than 10.0 [double.gt_lt] - // double other_value = 2 [(buf.validate.field).double = { gt: 5.0, lt: 10.0 }]; - // - // // must be greater than 10 or less than 5.0 [double.gt_lt_exclusive] - // double another_value = 3 [(buf.validate.field).double = { gt: 10.0, lt: 5.0 }]; - // } - // - // ``` - Gt float64 `protobuf:"fixed64,4,opt,name=gt,oneof"` -} - -type DoubleRules_Gte struct { - // `gte` requires the field value to be greater than or equal to the specified - // value (exclusive). If the value of `gte` is larger than a specified `lt` or - // `lte`, the range is reversed, and the field value must be outside the - // specified range. If the field value doesn't meet the required conditions, - // an error message is generated. - // - // ```proto - // - // message MyDouble { - // // must be greater than or equal to 5.0 [double.gte] - // double value = 1 [(buf.validate.field).double.gte = 5.0]; - // - // // must be greater than or equal to 5.0 and less than 10.0 [double.gte_lt] - // double other_value = 2 [(buf.validate.field).double = { gte: 5.0, lt: 10.0 }]; - // - // // must be greater than or equal to 10.0 or less than 5.0 [double.gte_lt_exclusive] - // double another_value = 3 [(buf.validate.field).double = { gte: 10.0, lt: 5.0 }]; - // } - // - // ``` - Gte float64 `protobuf:"fixed64,5,opt,name=gte,oneof"` -} - -func (*DoubleRules_Gt) isDoubleRules_GreaterThan() {} - -func (*DoubleRules_Gte) isDoubleRules_GreaterThan() {} - -// Int32Rules describes the rules applied to `int32` values. These -// rules may also be applied to the `google.protobuf.Int32Value` Well-Known-Type. -type Int32Rules struct { - state protoimpl.MessageState `protogen:"open.v1"` - // `const` requires the field value to exactly match the specified value. If - // the field value doesn't match, an error message is generated. - // - // ```proto - // - // message MyInt32 { - // // value must equal 42 - // int32 value = 1 [(buf.validate.field).int32.const = 42]; - // } - // - // ``` - Const *int32 `protobuf:"varint,1,opt,name=const" json:"const,omitempty"` - // Types that are valid to be assigned to LessThan: - // - // *Int32Rules_Lt - // *Int32Rules_Lte - LessThan isInt32Rules_LessThan `protobuf_oneof:"less_than"` - // Types that are valid to be assigned to GreaterThan: - // - // *Int32Rules_Gt - // *Int32Rules_Gte - GreaterThan isInt32Rules_GreaterThan `protobuf_oneof:"greater_than"` - // `in` requires the field value to be equal to one of the specified values. - // If the field value isn't one of the specified values, an error message is - // generated. - // - // ```proto - // - // message MyInt32 { - // // must be in list [1, 2, 3] - // int32 value = 1 [(buf.validate.field).int32 = { in: [1, 2, 3] }]; - // } - // - // ``` - In []int32 `protobuf:"varint,6,rep,name=in" json:"in,omitempty"` - // `not_in` requires the field value to not be equal to any of the specified - // values. If the field value is one of the specified values, an error message - // is generated. - // - // ```proto - // - // message MyInt32 { - // // value must not be in list [1, 2, 3] - // int32 value = 1 [(buf.validate.field).int32 = { not_in: [1, 2, 3] }]; - // } - // - // ``` - NotIn []int32 `protobuf:"varint,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - // `example` specifies values that the field may have. These values SHOULD - // conform to other rules. `example` values will not impact validation - // but may be used as helpful guidance on how to populate the given field. - // - // ```proto - // - // message MyInt32 { - // int32 value = 1 [ - // (buf.validate.field).int32.example = 1, - // (buf.validate.field).int32.example = -10 - // ]; - // } - // - // ``` - Example []int32 `protobuf:"varint,8,rep,name=example" json:"example,omitempty"` - extensionFields protoimpl.ExtensionFields - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Int32Rules) Reset() { - *x = Int32Rules{} - mi := &file_buf_validate_validate_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Int32Rules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Int32Rules) ProtoMessage() {} - -func (x *Int32Rules) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[8] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Int32Rules.ProtoReflect.Descriptor instead. -func (*Int32Rules) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{8} -} - -func (x *Int32Rules) GetConst() int32 { - if x != nil && x.Const != nil { - return *x.Const - } - return 0 -} - -func (x *Int32Rules) GetLessThan() isInt32Rules_LessThan { - if x != nil { - return x.LessThan - } - return nil -} - -func (x *Int32Rules) GetLt() int32 { - if x != nil { - if x, ok := x.LessThan.(*Int32Rules_Lt); ok { - return x.Lt - } - } - return 0 -} - -func (x *Int32Rules) GetLte() int32 { - if x != nil { - if x, ok := x.LessThan.(*Int32Rules_Lte); ok { - return x.Lte - } - } - return 0 -} - -func (x *Int32Rules) GetGreaterThan() isInt32Rules_GreaterThan { - if x != nil { - return x.GreaterThan - } - return nil -} - -func (x *Int32Rules) GetGt() int32 { - if x != nil { - if x, ok := x.GreaterThan.(*Int32Rules_Gt); ok { - return x.Gt - } - } - return 0 -} - -func (x *Int32Rules) GetGte() int32 { - if x != nil { - if x, ok := x.GreaterThan.(*Int32Rules_Gte); ok { - return x.Gte - } - } - return 0 -} - -func (x *Int32Rules) GetIn() []int32 { - if x != nil { - return x.In - } - return nil -} - -func (x *Int32Rules) GetNotIn() []int32 { - if x != nil { - return x.NotIn - } - return nil -} - -func (x *Int32Rules) GetExample() []int32 { - if x != nil { - return x.Example - } - return nil -} - -type isInt32Rules_LessThan interface { - isInt32Rules_LessThan() -} - -type Int32Rules_Lt struct { - // `lt` requires the field value to be less than the specified value (field - // < value). If the field value is equal to or greater than the specified - // value, an error message is generated. - // - // ```proto - // - // message MyInt32 { - // // must be less than 10 - // int32 value = 1 [(buf.validate.field).int32.lt = 10]; - // } - // - // ``` - Lt int32 `protobuf:"varint,2,opt,name=lt,oneof"` -} - -type Int32Rules_Lte struct { - // `lte` requires the field value to be less than or equal to the specified - // value (field <= value). If the field value is greater than the specified - // value, an error message is generated. - // - // ```proto - // - // message MyInt32 { - // // must be less than or equal to 10 - // int32 value = 1 [(buf.validate.field).int32.lte = 10]; - // } - // - // ``` - Lte int32 `protobuf:"varint,3,opt,name=lte,oneof"` -} - -func (*Int32Rules_Lt) isInt32Rules_LessThan() {} - -func (*Int32Rules_Lte) isInt32Rules_LessThan() {} - -type isInt32Rules_GreaterThan interface { - isInt32Rules_GreaterThan() -} - -type Int32Rules_Gt struct { - // `gt` requires the field value to be greater than the specified value - // (exclusive). If the value of `gt` is larger than a specified `lt` or - // `lte`, the range is reversed, and the field value must be outside the - // specified range. If the field value doesn't meet the required conditions, - // an error message is generated. - // - // ```proto - // - // message MyInt32 { - // // must be greater than 5 [int32.gt] - // int32 value = 1 [(buf.validate.field).int32.gt = 5]; - // - // // must be greater than 5 and less than 10 [int32.gt_lt] - // int32 other_value = 2 [(buf.validate.field).int32 = { gt: 5, lt: 10 }]; - // - // // must be greater than 10 or less than 5 [int32.gt_lt_exclusive] - // int32 another_value = 3 [(buf.validate.field).int32 = { gt: 10, lt: 5 }]; - // } - // - // ``` - Gt int32 `protobuf:"varint,4,opt,name=gt,oneof"` -} - -type Int32Rules_Gte struct { - // `gte` requires the field value to be greater than or equal to the specified value - // (exclusive). If the value of `gte` is larger than a specified `lt` or - // `lte`, the range is reversed, and the field value must be outside the - // specified range. If the field value doesn't meet the required conditions, - // an error message is generated. - // - // ```proto - // - // message MyInt32 { - // // must be greater than or equal to 5 [int32.gte] - // int32 value = 1 [(buf.validate.field).int32.gte = 5]; - // - // // must be greater than or equal to 5 and less than 10 [int32.gte_lt] - // int32 other_value = 2 [(buf.validate.field).int32 = { gte: 5, lt: 10 }]; - // - // // must be greater than or equal to 10 or less than 5 [int32.gte_lt_exclusive] - // int32 another_value = 3 [(buf.validate.field).int32 = { gte: 10, lt: 5 }]; - // } - // - // ``` - Gte int32 `protobuf:"varint,5,opt,name=gte,oneof"` -} - -func (*Int32Rules_Gt) isInt32Rules_GreaterThan() {} - -func (*Int32Rules_Gte) isInt32Rules_GreaterThan() {} - -// Int64Rules describes the rules applied to `int64` values. These -// rules may also be applied to the `google.protobuf.Int64Value` Well-Known-Type. -type Int64Rules struct { - state protoimpl.MessageState `protogen:"open.v1"` - // `const` requires the field value to exactly match the specified value. If - // the field value doesn't match, an error message is generated. - // - // ```proto - // - // message MyInt64 { - // // value must equal 42 - // int64 value = 1 [(buf.validate.field).int64.const = 42]; - // } - // - // ``` - Const *int64 `protobuf:"varint,1,opt,name=const" json:"const,omitempty"` - // Types that are valid to be assigned to LessThan: - // - // *Int64Rules_Lt - // *Int64Rules_Lte - LessThan isInt64Rules_LessThan `protobuf_oneof:"less_than"` - // Types that are valid to be assigned to GreaterThan: - // - // *Int64Rules_Gt - // *Int64Rules_Gte - GreaterThan isInt64Rules_GreaterThan `protobuf_oneof:"greater_than"` - // `in` requires the field value to be equal to one of the specified values. - // If the field value isn't one of the specified values, an error message is - // generated. - // - // ```proto - // - // message MyInt64 { - // // must be in list [1, 2, 3] - // int64 value = 1 [(buf.validate.field).int64 = { in: [1, 2, 3] }]; - // } - // - // ``` - In []int64 `protobuf:"varint,6,rep,name=in" json:"in,omitempty"` - // `not_in` requires the field value to not be equal to any of the specified - // values. If the field value is one of the specified values, an error - // message is generated. - // - // ```proto - // - // message MyInt64 { - // // value must not be in list [1, 2, 3] - // int64 value = 1 [(buf.validate.field).int64 = { not_in: [1, 2, 3] }]; - // } - // - // ``` - NotIn []int64 `protobuf:"varint,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - // `example` specifies values that the field may have. These values SHOULD - // conform to other rules. `example` values will not impact validation - // but may be used as helpful guidance on how to populate the given field. - // - // ```proto - // - // message MyInt64 { - // int64 value = 1 [ - // (buf.validate.field).int64.example = 1, - // (buf.validate.field).int64.example = -10 - // ]; - // } - // - // ``` - Example []int64 `protobuf:"varint,9,rep,name=example" json:"example,omitempty"` - extensionFields protoimpl.ExtensionFields - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Int64Rules) Reset() { - *x = Int64Rules{} - mi := &file_buf_validate_validate_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Int64Rules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Int64Rules) ProtoMessage() {} - -func (x *Int64Rules) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[9] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Int64Rules.ProtoReflect.Descriptor instead. -func (*Int64Rules) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{9} -} - -func (x *Int64Rules) GetConst() int64 { - if x != nil && x.Const != nil { - return *x.Const - } - return 0 -} - -func (x *Int64Rules) GetLessThan() isInt64Rules_LessThan { - if x != nil { - return x.LessThan - } - return nil -} - -func (x *Int64Rules) GetLt() int64 { - if x != nil { - if x, ok := x.LessThan.(*Int64Rules_Lt); ok { - return x.Lt - } - } - return 0 -} - -func (x *Int64Rules) GetLte() int64 { - if x != nil { - if x, ok := x.LessThan.(*Int64Rules_Lte); ok { - return x.Lte - } - } - return 0 -} - -func (x *Int64Rules) GetGreaterThan() isInt64Rules_GreaterThan { - if x != nil { - return x.GreaterThan - } - return nil -} - -func (x *Int64Rules) GetGt() int64 { - if x != nil { - if x, ok := x.GreaterThan.(*Int64Rules_Gt); ok { - return x.Gt - } - } - return 0 -} - -func (x *Int64Rules) GetGte() int64 { - if x != nil { - if x, ok := x.GreaterThan.(*Int64Rules_Gte); ok { - return x.Gte - } - } - return 0 -} - -func (x *Int64Rules) GetIn() []int64 { - if x != nil { - return x.In - } - return nil -} - -func (x *Int64Rules) GetNotIn() []int64 { - if x != nil { - return x.NotIn - } - return nil -} - -func (x *Int64Rules) GetExample() []int64 { - if x != nil { - return x.Example - } - return nil -} - -type isInt64Rules_LessThan interface { - isInt64Rules_LessThan() -} - -type Int64Rules_Lt struct { - // `lt` requires the field value to be less than the specified value (field < - // value). If the field value is equal to or greater than the specified value, - // an error message is generated. - // - // ```proto - // - // message MyInt64 { - // // must be less than 10 - // int64 value = 1 [(buf.validate.field).int64.lt = 10]; - // } - // - // ``` - Lt int64 `protobuf:"varint,2,opt,name=lt,oneof"` -} - -type Int64Rules_Lte struct { - // `lte` requires the field value to be less than or equal to the specified - // value (field <= value). If the field value is greater than the specified - // value, an error message is generated. - // - // ```proto - // - // message MyInt64 { - // // must be less than or equal to 10 - // int64 value = 1 [(buf.validate.field).int64.lte = 10]; - // } - // - // ``` - Lte int64 `protobuf:"varint,3,opt,name=lte,oneof"` -} - -func (*Int64Rules_Lt) isInt64Rules_LessThan() {} - -func (*Int64Rules_Lte) isInt64Rules_LessThan() {} - -type isInt64Rules_GreaterThan interface { - isInt64Rules_GreaterThan() -} - -type Int64Rules_Gt struct { - // `gt` requires the field value to be greater than the specified value - // (exclusive). If the value of `gt` is larger than a specified `lt` or - // `lte`, the range is reversed, and the field value must be outside the - // specified range. If the field value doesn't meet the required conditions, - // an error message is generated. - // - // ```proto - // - // message MyInt64 { - // // must be greater than 5 [int64.gt] - // int64 value = 1 [(buf.validate.field).int64.gt = 5]; - // - // // must be greater than 5 and less than 10 [int64.gt_lt] - // int64 other_value = 2 [(buf.validate.field).int64 = { gt: 5, lt: 10 }]; - // - // // must be greater than 10 or less than 5 [int64.gt_lt_exclusive] - // int64 another_value = 3 [(buf.validate.field).int64 = { gt: 10, lt: 5 }]; - // } - // - // ``` - Gt int64 `protobuf:"varint,4,opt,name=gt,oneof"` -} - -type Int64Rules_Gte struct { - // `gte` requires the field value to be greater than or equal to the specified - // value (exclusive). If the value of `gte` is larger than a specified `lt` - // or `lte`, the range is reversed, and the field value must be outside the - // specified range. If the field value doesn't meet the required conditions, - // an error message is generated. - // - // ```proto - // - // message MyInt64 { - // // must be greater than or equal to 5 [int64.gte] - // int64 value = 1 [(buf.validate.field).int64.gte = 5]; - // - // // must be greater than or equal to 5 and less than 10 [int64.gte_lt] - // int64 other_value = 2 [(buf.validate.field).int64 = { gte: 5, lt: 10 }]; - // - // // must be greater than or equal to 10 or less than 5 [int64.gte_lt_exclusive] - // int64 another_value = 3 [(buf.validate.field).int64 = { gte: 10, lt: 5 }]; - // } - // - // ``` - Gte int64 `protobuf:"varint,5,opt,name=gte,oneof"` -} - -func (*Int64Rules_Gt) isInt64Rules_GreaterThan() {} - -func (*Int64Rules_Gte) isInt64Rules_GreaterThan() {} - -// UInt32Rules describes the rules applied to `uint32` values. These -// rules may also be applied to the `google.protobuf.UInt32Value` Well-Known-Type. -type UInt32Rules struct { - state protoimpl.MessageState `protogen:"open.v1"` - // `const` requires the field value to exactly match the specified value. If - // the field value doesn't match, an error message is generated. - // - // ```proto - // - // message MyUInt32 { - // // value must equal 42 - // uint32 value = 1 [(buf.validate.field).uint32.const = 42]; - // } - // - // ``` - Const *uint32 `protobuf:"varint,1,opt,name=const" json:"const,omitempty"` - // Types that are valid to be assigned to LessThan: - // - // *UInt32Rules_Lt - // *UInt32Rules_Lte - LessThan isUInt32Rules_LessThan `protobuf_oneof:"less_than"` - // Types that are valid to be assigned to GreaterThan: - // - // *UInt32Rules_Gt - // *UInt32Rules_Gte - GreaterThan isUInt32Rules_GreaterThan `protobuf_oneof:"greater_than"` - // `in` requires the field value to be equal to one of the specified values. - // If the field value isn't one of the specified values, an error message is - // generated. - // - // ```proto - // - // message MyUInt32 { - // // must be in list [1, 2, 3] - // uint32 value = 1 [(buf.validate.field).uint32 = { in: [1, 2, 3] }]; - // } - // - // ``` - In []uint32 `protobuf:"varint,6,rep,name=in" json:"in,omitempty"` - // `not_in` requires the field value to not be equal to any of the specified - // values. If the field value is one of the specified values, an error - // message is generated. - // - // ```proto - // - // message MyUInt32 { - // // value must not be in list [1, 2, 3] - // uint32 value = 1 [(buf.validate.field).uint32 = { not_in: [1, 2, 3] }]; - // } - // - // ``` - NotIn []uint32 `protobuf:"varint,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - // `example` specifies values that the field may have. These values SHOULD - // conform to other rules. `example` values will not impact validation - // but may be used as helpful guidance on how to populate the given field. - // - // ```proto - // - // message MyUInt32 { - // uint32 value = 1 [ - // (buf.validate.field).uint32.example = 1, - // (buf.validate.field).uint32.example = 10 - // ]; - // } - // - // ``` - Example []uint32 `protobuf:"varint,8,rep,name=example" json:"example,omitempty"` - extensionFields protoimpl.ExtensionFields - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UInt32Rules) Reset() { - *x = UInt32Rules{} - mi := &file_buf_validate_validate_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UInt32Rules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UInt32Rules) ProtoMessage() {} - -func (x *UInt32Rules) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[10] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UInt32Rules.ProtoReflect.Descriptor instead. -func (*UInt32Rules) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{10} -} - -func (x *UInt32Rules) GetConst() uint32 { - if x != nil && x.Const != nil { - return *x.Const - } - return 0 -} - -func (x *UInt32Rules) GetLessThan() isUInt32Rules_LessThan { - if x != nil { - return x.LessThan - } - return nil -} - -func (x *UInt32Rules) GetLt() uint32 { - if x != nil { - if x, ok := x.LessThan.(*UInt32Rules_Lt); ok { - return x.Lt - } - } - return 0 -} - -func (x *UInt32Rules) GetLte() uint32 { - if x != nil { - if x, ok := x.LessThan.(*UInt32Rules_Lte); ok { - return x.Lte - } - } - return 0 -} - -func (x *UInt32Rules) GetGreaterThan() isUInt32Rules_GreaterThan { - if x != nil { - return x.GreaterThan - } - return nil -} - -func (x *UInt32Rules) GetGt() uint32 { - if x != nil { - if x, ok := x.GreaterThan.(*UInt32Rules_Gt); ok { - return x.Gt - } - } - return 0 -} - -func (x *UInt32Rules) GetGte() uint32 { - if x != nil { - if x, ok := x.GreaterThan.(*UInt32Rules_Gte); ok { - return x.Gte - } - } - return 0 -} - -func (x *UInt32Rules) GetIn() []uint32 { - if x != nil { - return x.In - } - return nil -} - -func (x *UInt32Rules) GetNotIn() []uint32 { - if x != nil { - return x.NotIn - } - return nil -} - -func (x *UInt32Rules) GetExample() []uint32 { - if x != nil { - return x.Example - } - return nil -} - -type isUInt32Rules_LessThan interface { - isUInt32Rules_LessThan() -} - -type UInt32Rules_Lt struct { - // `lt` requires the field value to be less than the specified value (field < - // value). If the field value is equal to or greater than the specified value, - // an error message is generated. - // - // ```proto - // - // message MyUInt32 { - // // must be less than 10 - // uint32 value = 1 [(buf.validate.field).uint32.lt = 10]; - // } - // - // ``` - Lt uint32 `protobuf:"varint,2,opt,name=lt,oneof"` -} - -type UInt32Rules_Lte struct { - // `lte` requires the field value to be less than or equal to the specified - // value (field <= value). If the field value is greater than the specified - // value, an error message is generated. - // - // ```proto - // - // message MyUInt32 { - // // must be less than or equal to 10 - // uint32 value = 1 [(buf.validate.field).uint32.lte = 10]; - // } - // - // ``` - Lte uint32 `protobuf:"varint,3,opt,name=lte,oneof"` -} - -func (*UInt32Rules_Lt) isUInt32Rules_LessThan() {} - -func (*UInt32Rules_Lte) isUInt32Rules_LessThan() {} - -type isUInt32Rules_GreaterThan interface { - isUInt32Rules_GreaterThan() -} - -type UInt32Rules_Gt struct { - // `gt` requires the field value to be greater than the specified value - // (exclusive). If the value of `gt` is larger than a specified `lt` or - // `lte`, the range is reversed, and the field value must be outside the - // specified range. If the field value doesn't meet the required conditions, - // an error message is generated. - // - // ```proto - // - // message MyUInt32 { - // // must be greater than 5 [uint32.gt] - // uint32 value = 1 [(buf.validate.field).uint32.gt = 5]; - // - // // must be greater than 5 and less than 10 [uint32.gt_lt] - // uint32 other_value = 2 [(buf.validate.field).uint32 = { gt: 5, lt: 10 }]; - // - // // must be greater than 10 or less than 5 [uint32.gt_lt_exclusive] - // uint32 another_value = 3 [(buf.validate.field).uint32 = { gt: 10, lt: 5 }]; - // } - // - // ``` - Gt uint32 `protobuf:"varint,4,opt,name=gt,oneof"` -} - -type UInt32Rules_Gte struct { - // `gte` requires the field value to be greater than or equal to the specified - // value (exclusive). If the value of `gte` is larger than a specified `lt` - // or `lte`, the range is reversed, and the field value must be outside the - // specified range. If the field value doesn't meet the required conditions, - // an error message is generated. - // - // ```proto - // - // message MyUInt32 { - // // must be greater than or equal to 5 [uint32.gte] - // uint32 value = 1 [(buf.validate.field).uint32.gte = 5]; - // - // // must be greater than or equal to 5 and less than 10 [uint32.gte_lt] - // uint32 other_value = 2 [(buf.validate.field).uint32 = { gte: 5, lt: 10 }]; - // - // // must be greater than or equal to 10 or less than 5 [uint32.gte_lt_exclusive] - // uint32 another_value = 3 [(buf.validate.field).uint32 = { gte: 10, lt: 5 }]; - // } - // - // ``` - Gte uint32 `protobuf:"varint,5,opt,name=gte,oneof"` -} - -func (*UInt32Rules_Gt) isUInt32Rules_GreaterThan() {} - -func (*UInt32Rules_Gte) isUInt32Rules_GreaterThan() {} - -// UInt64Rules describes the rules applied to `uint64` values. These -// rules may also be applied to the `google.protobuf.UInt64Value` Well-Known-Type. -type UInt64Rules struct { - state protoimpl.MessageState `protogen:"open.v1"` - // `const` requires the field value to exactly match the specified value. If - // the field value doesn't match, an error message is generated. - // - // ```proto - // - // message MyUInt64 { - // // value must equal 42 - // uint64 value = 1 [(buf.validate.field).uint64.const = 42]; - // } - // - // ``` - Const *uint64 `protobuf:"varint,1,opt,name=const" json:"const,omitempty"` - // Types that are valid to be assigned to LessThan: - // - // *UInt64Rules_Lt - // *UInt64Rules_Lte - LessThan isUInt64Rules_LessThan `protobuf_oneof:"less_than"` - // Types that are valid to be assigned to GreaterThan: - // - // *UInt64Rules_Gt - // *UInt64Rules_Gte - GreaterThan isUInt64Rules_GreaterThan `protobuf_oneof:"greater_than"` - // `in` requires the field value to be equal to one of the specified values. - // If the field value isn't one of the specified values, an error message is - // generated. - // - // ```proto - // - // message MyUInt64 { - // // must be in list [1, 2, 3] - // uint64 value = 1 [(buf.validate.field).uint64 = { in: [1, 2, 3] }]; - // } - // - // ``` - In []uint64 `protobuf:"varint,6,rep,name=in" json:"in,omitempty"` - // `not_in` requires the field value to not be equal to any of the specified - // values. If the field value is one of the specified values, an error - // message is generated. - // - // ```proto - // - // message MyUInt64 { - // // value must not be in list [1, 2, 3] - // uint64 value = 1 [(buf.validate.field).uint64 = { not_in: [1, 2, 3] }]; - // } - // - // ``` - NotIn []uint64 `protobuf:"varint,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - // `example` specifies values that the field may have. These values SHOULD - // conform to other rules. `example` values will not impact validation - // but may be used as helpful guidance on how to populate the given field. - // - // ```proto - // - // message MyUInt64 { - // uint64 value = 1 [ - // (buf.validate.field).uint64.example = 1, - // (buf.validate.field).uint64.example = -10 - // ]; - // } - // - // ``` - Example []uint64 `protobuf:"varint,8,rep,name=example" json:"example,omitempty"` - extensionFields protoimpl.ExtensionFields - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *UInt64Rules) Reset() { - *x = UInt64Rules{} - mi := &file_buf_validate_validate_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *UInt64Rules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UInt64Rules) ProtoMessage() {} - -func (x *UInt64Rules) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[11] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UInt64Rules.ProtoReflect.Descriptor instead. -func (*UInt64Rules) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{11} -} - -func (x *UInt64Rules) GetConst() uint64 { - if x != nil && x.Const != nil { - return *x.Const - } - return 0 -} - -func (x *UInt64Rules) GetLessThan() isUInt64Rules_LessThan { - if x != nil { - return x.LessThan - } - return nil -} - -func (x *UInt64Rules) GetLt() uint64 { - if x != nil { - if x, ok := x.LessThan.(*UInt64Rules_Lt); ok { - return x.Lt - } - } - return 0 -} - -func (x *UInt64Rules) GetLte() uint64 { - if x != nil { - if x, ok := x.LessThan.(*UInt64Rules_Lte); ok { - return x.Lte - } - } - return 0 -} - -func (x *UInt64Rules) GetGreaterThan() isUInt64Rules_GreaterThan { - if x != nil { - return x.GreaterThan - } - return nil -} - -func (x *UInt64Rules) GetGt() uint64 { - if x != nil { - if x, ok := x.GreaterThan.(*UInt64Rules_Gt); ok { - return x.Gt - } - } - return 0 -} - -func (x *UInt64Rules) GetGte() uint64 { - if x != nil { - if x, ok := x.GreaterThan.(*UInt64Rules_Gte); ok { - return x.Gte - } - } - return 0 -} - -func (x *UInt64Rules) GetIn() []uint64 { - if x != nil { - return x.In - } - return nil -} - -func (x *UInt64Rules) GetNotIn() []uint64 { - if x != nil { - return x.NotIn - } - return nil -} - -func (x *UInt64Rules) GetExample() []uint64 { - if x != nil { - return x.Example - } - return nil -} - -type isUInt64Rules_LessThan interface { - isUInt64Rules_LessThan() -} - -type UInt64Rules_Lt struct { - // `lt` requires the field value to be less than the specified value (field < - // value). If the field value is equal to or greater than the specified value, - // an error message is generated. - // - // ```proto - // - // message MyUInt64 { - // // must be less than 10 - // uint64 value = 1 [(buf.validate.field).uint64.lt = 10]; - // } - // - // ``` - Lt uint64 `protobuf:"varint,2,opt,name=lt,oneof"` -} - -type UInt64Rules_Lte struct { - // `lte` requires the field value to be less than or equal to the specified - // value (field <= value). If the field value is greater than the specified - // value, an error message is generated. - // - // ```proto - // - // message MyUInt64 { - // // must be less than or equal to 10 - // uint64 value = 1 [(buf.validate.field).uint64.lte = 10]; - // } - // - // ``` - Lte uint64 `protobuf:"varint,3,opt,name=lte,oneof"` -} - -func (*UInt64Rules_Lt) isUInt64Rules_LessThan() {} - -func (*UInt64Rules_Lte) isUInt64Rules_LessThan() {} - -type isUInt64Rules_GreaterThan interface { - isUInt64Rules_GreaterThan() -} - -type UInt64Rules_Gt struct { - // `gt` requires the field value to be greater than the specified value - // (exclusive). If the value of `gt` is larger than a specified `lt` or - // `lte`, the range is reversed, and the field value must be outside the - // specified range. If the field value doesn't meet the required conditions, - // an error message is generated. - // - // ```proto - // - // message MyUInt64 { - // // must be greater than 5 [uint64.gt] - // uint64 value = 1 [(buf.validate.field).uint64.gt = 5]; - // - // // must be greater than 5 and less than 10 [uint64.gt_lt] - // uint64 other_value = 2 [(buf.validate.field).uint64 = { gt: 5, lt: 10 }]; - // - // // must be greater than 10 or less than 5 [uint64.gt_lt_exclusive] - // uint64 another_value = 3 [(buf.validate.field).uint64 = { gt: 10, lt: 5 }]; - // } - // - // ``` - Gt uint64 `protobuf:"varint,4,opt,name=gt,oneof"` -} - -type UInt64Rules_Gte struct { - // `gte` requires the field value to be greater than or equal to the specified - // value (exclusive). If the value of `gte` is larger than a specified `lt` - // or `lte`, the range is reversed, and the field value must be outside the - // specified range. If the field value doesn't meet the required conditions, - // an error message is generated. - // - // ```proto - // - // message MyUInt64 { - // // must be greater than or equal to 5 [uint64.gte] - // uint64 value = 1 [(buf.validate.field).uint64.gte = 5]; - // - // // must be greater than or equal to 5 and less than 10 [uint64.gte_lt] - // uint64 other_value = 2 [(buf.validate.field).uint64 = { gte: 5, lt: 10 }]; - // - // // must be greater than or equal to 10 or less than 5 [uint64.gte_lt_exclusive] - // uint64 another_value = 3 [(buf.validate.field).uint64 = { gte: 10, lt: 5 }]; - // } - // - // ``` - Gte uint64 `protobuf:"varint,5,opt,name=gte,oneof"` -} - -func (*UInt64Rules_Gt) isUInt64Rules_GreaterThan() {} - -func (*UInt64Rules_Gte) isUInt64Rules_GreaterThan() {} - -// SInt32Rules describes the rules applied to `sint32` values. -type SInt32Rules struct { - state protoimpl.MessageState `protogen:"open.v1"` - // `const` requires the field value to exactly match the specified value. If - // the field value doesn't match, an error message is generated. - // - // ```proto - // - // message MySInt32 { - // // value must equal 42 - // sint32 value = 1 [(buf.validate.field).sint32.const = 42]; - // } - // - // ``` - Const *int32 `protobuf:"zigzag32,1,opt,name=const" json:"const,omitempty"` - // Types that are valid to be assigned to LessThan: - // - // *SInt32Rules_Lt - // *SInt32Rules_Lte - LessThan isSInt32Rules_LessThan `protobuf_oneof:"less_than"` - // Types that are valid to be assigned to GreaterThan: - // - // *SInt32Rules_Gt - // *SInt32Rules_Gte - GreaterThan isSInt32Rules_GreaterThan `protobuf_oneof:"greater_than"` - // `in` requires the field value to be equal to one of the specified values. - // If the field value isn't one of the specified values, an error message is - // generated. - // - // ```proto - // - // message MySInt32 { - // // must be in list [1, 2, 3] - // sint32 value = 1 [(buf.validate.field).sint32 = { in: [1, 2, 3] }]; - // } - // - // ``` - In []int32 `protobuf:"zigzag32,6,rep,name=in" json:"in,omitempty"` - // `not_in` requires the field value to not be equal to any of the specified - // values. If the field value is one of the specified values, an error - // message is generated. - // - // ```proto - // - // message MySInt32 { - // // value must not be in list [1, 2, 3] - // sint32 value = 1 [(buf.validate.field).sint32 = { not_in: [1, 2, 3] }]; - // } - // - // ``` - NotIn []int32 `protobuf:"zigzag32,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - // `example` specifies values that the field may have. These values SHOULD - // conform to other rules. `example` values will not impact validation - // but may be used as helpful guidance on how to populate the given field. - // - // ```proto - // - // message MySInt32 { - // sint32 value = 1 [ - // (buf.validate.field).sint32.example = 1, - // (buf.validate.field).sint32.example = -10 - // ]; - // } - // - // ``` - Example []int32 `protobuf:"zigzag32,8,rep,name=example" json:"example,omitempty"` - extensionFields protoimpl.ExtensionFields - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SInt32Rules) Reset() { - *x = SInt32Rules{} - mi := &file_buf_validate_validate_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SInt32Rules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SInt32Rules) ProtoMessage() {} - -func (x *SInt32Rules) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[12] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SInt32Rules.ProtoReflect.Descriptor instead. -func (*SInt32Rules) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{12} -} - -func (x *SInt32Rules) GetConst() int32 { - if x != nil && x.Const != nil { - return *x.Const - } - return 0 -} - -func (x *SInt32Rules) GetLessThan() isSInt32Rules_LessThan { - if x != nil { - return x.LessThan - } - return nil -} - -func (x *SInt32Rules) GetLt() int32 { - if x != nil { - if x, ok := x.LessThan.(*SInt32Rules_Lt); ok { - return x.Lt - } - } - return 0 -} - -func (x *SInt32Rules) GetLte() int32 { - if x != nil { - if x, ok := x.LessThan.(*SInt32Rules_Lte); ok { - return x.Lte - } - } - return 0 -} - -func (x *SInt32Rules) GetGreaterThan() isSInt32Rules_GreaterThan { - if x != nil { - return x.GreaterThan - } - return nil -} - -func (x *SInt32Rules) GetGt() int32 { - if x != nil { - if x, ok := x.GreaterThan.(*SInt32Rules_Gt); ok { - return x.Gt - } - } - return 0 -} - -func (x *SInt32Rules) GetGte() int32 { - if x != nil { - if x, ok := x.GreaterThan.(*SInt32Rules_Gte); ok { - return x.Gte - } - } - return 0 -} - -func (x *SInt32Rules) GetIn() []int32 { - if x != nil { - return x.In - } - return nil -} - -func (x *SInt32Rules) GetNotIn() []int32 { - if x != nil { - return x.NotIn - } - return nil -} - -func (x *SInt32Rules) GetExample() []int32 { - if x != nil { - return x.Example - } - return nil -} - -type isSInt32Rules_LessThan interface { - isSInt32Rules_LessThan() -} - -type SInt32Rules_Lt struct { - // `lt` requires the field value to be less than the specified value (field - // < value). If the field value is equal to or greater than the specified - // value, an error message is generated. - // - // ```proto - // - // message MySInt32 { - // // must be less than 10 - // sint32 value = 1 [(buf.validate.field).sint32.lt = 10]; - // } - // - // ``` - Lt int32 `protobuf:"zigzag32,2,opt,name=lt,oneof"` -} - -type SInt32Rules_Lte struct { - // `lte` requires the field value to be less than or equal to the specified - // value (field <= value). If the field value is greater than the specified - // value, an error message is generated. - // - // ```proto - // - // message MySInt32 { - // // must be less than or equal to 10 - // sint32 value = 1 [(buf.validate.field).sint32.lte = 10]; - // } - // - // ``` - Lte int32 `protobuf:"zigzag32,3,opt,name=lte,oneof"` -} - -func (*SInt32Rules_Lt) isSInt32Rules_LessThan() {} - -func (*SInt32Rules_Lte) isSInt32Rules_LessThan() {} - -type isSInt32Rules_GreaterThan interface { - isSInt32Rules_GreaterThan() -} - -type SInt32Rules_Gt struct { - // `gt` requires the field value to be greater than the specified value - // (exclusive). If the value of `gt` is larger than a specified `lt` or - // `lte`, the range is reversed, and the field value must be outside the - // specified range. If the field value doesn't meet the required conditions, - // an error message is generated. - // - // ```proto - // - // message MySInt32 { - // // must be greater than 5 [sint32.gt] - // sint32 value = 1 [(buf.validate.field).sint32.gt = 5]; - // - // // must be greater than 5 and less than 10 [sint32.gt_lt] - // sint32 other_value = 2 [(buf.validate.field).sint32 = { gt: 5, lt: 10 }]; - // - // // must be greater than 10 or less than 5 [sint32.gt_lt_exclusive] - // sint32 another_value = 3 [(buf.validate.field).sint32 = { gt: 10, lt: 5 }]; - // } - // - // ``` - Gt int32 `protobuf:"zigzag32,4,opt,name=gt,oneof"` -} - -type SInt32Rules_Gte struct { - // `gte` requires the field value to be greater than or equal to the specified - // value (exclusive). If the value of `gte` is larger than a specified `lt` - // or `lte`, the range is reversed, and the field value must be outside the - // specified range. If the field value doesn't meet the required conditions, - // an error message is generated. - // - // ```proto - // - // message MySInt32 { - // // must be greater than or equal to 5 [sint32.gte] - // sint32 value = 1 [(buf.validate.field).sint32.gte = 5]; - // - // // must be greater than or equal to 5 and less than 10 [sint32.gte_lt] - // sint32 other_value = 2 [(buf.validate.field).sint32 = { gte: 5, lt: 10 }]; - // - // // must be greater than or equal to 10 or less than 5 [sint32.gte_lt_exclusive] - // sint32 another_value = 3 [(buf.validate.field).sint32 = { gte: 10, lt: 5 }]; - // } - // - // ``` - Gte int32 `protobuf:"zigzag32,5,opt,name=gte,oneof"` -} - -func (*SInt32Rules_Gt) isSInt32Rules_GreaterThan() {} - -func (*SInt32Rules_Gte) isSInt32Rules_GreaterThan() {} - -// SInt64Rules describes the rules applied to `sint64` values. -type SInt64Rules struct { - state protoimpl.MessageState `protogen:"open.v1"` - // `const` requires the field value to exactly match the specified value. If - // the field value doesn't match, an error message is generated. - // - // ```proto - // - // message MySInt64 { - // // value must equal 42 - // sint64 value = 1 [(buf.validate.field).sint64.const = 42]; - // } - // - // ``` - Const *int64 `protobuf:"zigzag64,1,opt,name=const" json:"const,omitempty"` - // Types that are valid to be assigned to LessThan: - // - // *SInt64Rules_Lt - // *SInt64Rules_Lte - LessThan isSInt64Rules_LessThan `protobuf_oneof:"less_than"` - // Types that are valid to be assigned to GreaterThan: - // - // *SInt64Rules_Gt - // *SInt64Rules_Gte - GreaterThan isSInt64Rules_GreaterThan `protobuf_oneof:"greater_than"` - // `in` requires the field value to be equal to one of the specified values. - // If the field value isn't one of the specified values, an error message - // is generated. - // - // ```proto - // - // message MySInt64 { - // // must be in list [1, 2, 3] - // sint64 value = 1 [(buf.validate.field).sint64 = { in: [1, 2, 3] }]; - // } - // - // ``` - In []int64 `protobuf:"zigzag64,6,rep,name=in" json:"in,omitempty"` - // `not_in` requires the field value to not be equal to any of the specified - // values. If the field value is one of the specified values, an error - // message is generated. - // - // ```proto - // - // message MySInt64 { - // // value must not be in list [1, 2, 3] - // sint64 value = 1 [(buf.validate.field).sint64 = { not_in: [1, 2, 3] }]; - // } - // - // ``` - NotIn []int64 `protobuf:"zigzag64,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - // `example` specifies values that the field may have. These values SHOULD - // conform to other rules. `example` values will not impact validation - // but may be used as helpful guidance on how to populate the given field. - // - // ```proto - // - // message MySInt64 { - // sint64 value = 1 [ - // (buf.validate.field).sint64.example = 1, - // (buf.validate.field).sint64.example = -10 - // ]; - // } - // - // ``` - Example []int64 `protobuf:"zigzag64,8,rep,name=example" json:"example,omitempty"` - extensionFields protoimpl.ExtensionFields - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SInt64Rules) Reset() { - *x = SInt64Rules{} - mi := &file_buf_validate_validate_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SInt64Rules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SInt64Rules) ProtoMessage() {} - -func (x *SInt64Rules) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[13] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SInt64Rules.ProtoReflect.Descriptor instead. -func (*SInt64Rules) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{13} -} - -func (x *SInt64Rules) GetConst() int64 { - if x != nil && x.Const != nil { - return *x.Const - } - return 0 -} - -func (x *SInt64Rules) GetLessThan() isSInt64Rules_LessThan { - if x != nil { - return x.LessThan - } - return nil -} - -func (x *SInt64Rules) GetLt() int64 { - if x != nil { - if x, ok := x.LessThan.(*SInt64Rules_Lt); ok { - return x.Lt - } - } - return 0 -} - -func (x *SInt64Rules) GetLte() int64 { - if x != nil { - if x, ok := x.LessThan.(*SInt64Rules_Lte); ok { - return x.Lte - } - } - return 0 -} - -func (x *SInt64Rules) GetGreaterThan() isSInt64Rules_GreaterThan { - if x != nil { - return x.GreaterThan - } - return nil -} - -func (x *SInt64Rules) GetGt() int64 { - if x != nil { - if x, ok := x.GreaterThan.(*SInt64Rules_Gt); ok { - return x.Gt - } - } - return 0 -} - -func (x *SInt64Rules) GetGte() int64 { - if x != nil { - if x, ok := x.GreaterThan.(*SInt64Rules_Gte); ok { - return x.Gte - } - } - return 0 -} - -func (x *SInt64Rules) GetIn() []int64 { - if x != nil { - return x.In - } - return nil -} - -func (x *SInt64Rules) GetNotIn() []int64 { - if x != nil { - return x.NotIn - } - return nil -} - -func (x *SInt64Rules) GetExample() []int64 { - if x != nil { - return x.Example - } - return nil -} - -type isSInt64Rules_LessThan interface { - isSInt64Rules_LessThan() -} - -type SInt64Rules_Lt struct { - // `lt` requires the field value to be less than the specified value (field - // < value). If the field value is equal to or greater than the specified - // value, an error message is generated. - // - // ```proto - // - // message MySInt64 { - // // must be less than 10 - // sint64 value = 1 [(buf.validate.field).sint64.lt = 10]; - // } - // - // ``` - Lt int64 `protobuf:"zigzag64,2,opt,name=lt,oneof"` -} - -type SInt64Rules_Lte struct { - // `lte` requires the field value to be less than or equal to the specified - // value (field <= value). If the field value is greater than the specified - // value, an error message is generated. - // - // ```proto - // - // message MySInt64 { - // // must be less than or equal to 10 - // sint64 value = 1 [(buf.validate.field).sint64.lte = 10]; - // } - // - // ``` - Lte int64 `protobuf:"zigzag64,3,opt,name=lte,oneof"` -} - -func (*SInt64Rules_Lt) isSInt64Rules_LessThan() {} - -func (*SInt64Rules_Lte) isSInt64Rules_LessThan() {} - -type isSInt64Rules_GreaterThan interface { - isSInt64Rules_GreaterThan() -} - -type SInt64Rules_Gt struct { - // `gt` requires the field value to be greater than the specified value - // (exclusive). If the value of `gt` is larger than a specified `lt` or - // `lte`, the range is reversed, and the field value must be outside the - // specified range. If the field value doesn't meet the required conditions, - // an error message is generated. - // - // ```proto - // - // message MySInt64 { - // // must be greater than 5 [sint64.gt] - // sint64 value = 1 [(buf.validate.field).sint64.gt = 5]; - // - // // must be greater than 5 and less than 10 [sint64.gt_lt] - // sint64 other_value = 2 [(buf.validate.field).sint64 = { gt: 5, lt: 10 }]; - // - // // must be greater than 10 or less than 5 [sint64.gt_lt_exclusive] - // sint64 another_value = 3 [(buf.validate.field).sint64 = { gt: 10, lt: 5 }]; - // } - // - // ``` - Gt int64 `protobuf:"zigzag64,4,opt,name=gt,oneof"` -} - -type SInt64Rules_Gte struct { - // `gte` requires the field value to be greater than or equal to the specified - // value (exclusive). If the value of `gte` is larger than a specified `lt` - // or `lte`, the range is reversed, and the field value must be outside the - // specified range. If the field value doesn't meet the required conditions, - // an error message is generated. - // - // ```proto - // - // message MySInt64 { - // // must be greater than or equal to 5 [sint64.gte] - // sint64 value = 1 [(buf.validate.field).sint64.gte = 5]; - // - // // must be greater than or equal to 5 and less than 10 [sint64.gte_lt] - // sint64 other_value = 2 [(buf.validate.field).sint64 = { gte: 5, lt: 10 }]; - // - // // must be greater than or equal to 10 or less than 5 [sint64.gte_lt_exclusive] - // sint64 another_value = 3 [(buf.validate.field).sint64 = { gte: 10, lt: 5 }]; - // } - // - // ``` - Gte int64 `protobuf:"zigzag64,5,opt,name=gte,oneof"` -} - -func (*SInt64Rules_Gt) isSInt64Rules_GreaterThan() {} - -func (*SInt64Rules_Gte) isSInt64Rules_GreaterThan() {} - -// Fixed32Rules describes the rules applied to `fixed32` values. -type Fixed32Rules struct { - state protoimpl.MessageState `protogen:"open.v1"` - // `const` requires the field value to exactly match the specified value. - // If the field value doesn't match, an error message is generated. - // - // ```proto - // - // message MyFixed32 { - // // value must equal 42 - // fixed32 value = 1 [(buf.validate.field).fixed32.const = 42]; - // } - // - // ``` - Const *uint32 `protobuf:"fixed32,1,opt,name=const" json:"const,omitempty"` - // Types that are valid to be assigned to LessThan: - // - // *Fixed32Rules_Lt - // *Fixed32Rules_Lte - LessThan isFixed32Rules_LessThan `protobuf_oneof:"less_than"` - // Types that are valid to be assigned to GreaterThan: - // - // *Fixed32Rules_Gt - // *Fixed32Rules_Gte - GreaterThan isFixed32Rules_GreaterThan `protobuf_oneof:"greater_than"` - // `in` requires the field value to be equal to one of the specified values. - // If the field value isn't one of the specified values, an error message - // is generated. - // - // ```proto - // - // message MyFixed32 { - // // must be in list [1, 2, 3] - // fixed32 value = 1 [(buf.validate.field).fixed32 = { in: [1, 2, 3] }]; - // } - // - // ``` - In []uint32 `protobuf:"fixed32,6,rep,name=in" json:"in,omitempty"` - // `not_in` requires the field value to not be equal to any of the specified - // values. If the field value is one of the specified values, an error - // message is generated. - // - // ```proto - // - // message MyFixed32 { - // // value must not be in list [1, 2, 3] - // fixed32 value = 1 [(buf.validate.field).fixed32 = { not_in: [1, 2, 3] }]; - // } - // - // ``` - NotIn []uint32 `protobuf:"fixed32,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - // `example` specifies values that the field may have. These values SHOULD - // conform to other rules. `example` values will not impact validation - // but may be used as helpful guidance on how to populate the given field. - // - // ```proto - // - // message MyFixed32 { - // fixed32 value = 1 [ - // (buf.validate.field).fixed32.example = 1, - // (buf.validate.field).fixed32.example = 2 - // ]; - // } - // - // ``` - Example []uint32 `protobuf:"fixed32,8,rep,name=example" json:"example,omitempty"` - extensionFields protoimpl.ExtensionFields - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Fixed32Rules) Reset() { - *x = Fixed32Rules{} - mi := &file_buf_validate_validate_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Fixed32Rules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Fixed32Rules) ProtoMessage() {} - -func (x *Fixed32Rules) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[14] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Fixed32Rules.ProtoReflect.Descriptor instead. -func (*Fixed32Rules) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{14} -} - -func (x *Fixed32Rules) GetConst() uint32 { - if x != nil && x.Const != nil { - return *x.Const - } - return 0 -} - -func (x *Fixed32Rules) GetLessThan() isFixed32Rules_LessThan { - if x != nil { - return x.LessThan - } - return nil -} - -func (x *Fixed32Rules) GetLt() uint32 { - if x != nil { - if x, ok := x.LessThan.(*Fixed32Rules_Lt); ok { - return x.Lt - } - } - return 0 -} - -func (x *Fixed32Rules) GetLte() uint32 { - if x != nil { - if x, ok := x.LessThan.(*Fixed32Rules_Lte); ok { - return x.Lte - } - } - return 0 -} - -func (x *Fixed32Rules) GetGreaterThan() isFixed32Rules_GreaterThan { - if x != nil { - return x.GreaterThan - } - return nil -} - -func (x *Fixed32Rules) GetGt() uint32 { - if x != nil { - if x, ok := x.GreaterThan.(*Fixed32Rules_Gt); ok { - return x.Gt - } - } - return 0 -} - -func (x *Fixed32Rules) GetGte() uint32 { - if x != nil { - if x, ok := x.GreaterThan.(*Fixed32Rules_Gte); ok { - return x.Gte - } - } - return 0 -} - -func (x *Fixed32Rules) GetIn() []uint32 { - if x != nil { - return x.In - } - return nil -} - -func (x *Fixed32Rules) GetNotIn() []uint32 { - if x != nil { - return x.NotIn - } - return nil -} - -func (x *Fixed32Rules) GetExample() []uint32 { - if x != nil { - return x.Example - } - return nil -} - -type isFixed32Rules_LessThan interface { - isFixed32Rules_LessThan() -} - -type Fixed32Rules_Lt struct { - // `lt` requires the field value to be less than the specified value (field < - // value). If the field value is equal to or greater than the specified value, - // an error message is generated. - // - // ```proto - // - // message MyFixed32 { - // // must be less than 10 - // fixed32 value = 1 [(buf.validate.field).fixed32.lt = 10]; - // } - // - // ``` - Lt uint32 `protobuf:"fixed32,2,opt,name=lt,oneof"` -} - -type Fixed32Rules_Lte struct { - // `lte` requires the field value to be less than or equal to the specified - // value (field <= value). If the field value is greater than the specified - // value, an error message is generated. - // - // ```proto - // - // message MyFixed32 { - // // must be less than or equal to 10 - // fixed32 value = 1 [(buf.validate.field).fixed32.lte = 10]; - // } - // - // ``` - Lte uint32 `protobuf:"fixed32,3,opt,name=lte,oneof"` -} - -func (*Fixed32Rules_Lt) isFixed32Rules_LessThan() {} - -func (*Fixed32Rules_Lte) isFixed32Rules_LessThan() {} - -type isFixed32Rules_GreaterThan interface { - isFixed32Rules_GreaterThan() -} - -type Fixed32Rules_Gt struct { - // `gt` requires the field value to be greater than the specified value - // (exclusive). If the value of `gt` is larger than a specified `lt` or - // `lte`, the range is reversed, and the field value must be outside the - // specified range. If the field value doesn't meet the required conditions, - // an error message is generated. - // - // ```proto - // - // message MyFixed32 { - // // must be greater than 5 [fixed32.gt] - // fixed32 value = 1 [(buf.validate.field).fixed32.gt = 5]; - // - // // must be greater than 5 and less than 10 [fixed32.gt_lt] - // fixed32 other_value = 2 [(buf.validate.field).fixed32 = { gt: 5, lt: 10 }]; - // - // // must be greater than 10 or less than 5 [fixed32.gt_lt_exclusive] - // fixed32 another_value = 3 [(buf.validate.field).fixed32 = { gt: 10, lt: 5 }]; - // } - // - // ``` - Gt uint32 `protobuf:"fixed32,4,opt,name=gt,oneof"` -} - -type Fixed32Rules_Gte struct { - // `gte` requires the field value to be greater than or equal to the specified - // value (exclusive). If the value of `gte` is larger than a specified `lt` - // or `lte`, the range is reversed, and the field value must be outside the - // specified range. If the field value doesn't meet the required conditions, - // an error message is generated. - // - // ```proto - // - // message MyFixed32 { - // // must be greater than or equal to 5 [fixed32.gte] - // fixed32 value = 1 [(buf.validate.field).fixed32.gte = 5]; - // - // // must be greater than or equal to 5 and less than 10 [fixed32.gte_lt] - // fixed32 other_value = 2 [(buf.validate.field).fixed32 = { gte: 5, lt: 10 }]; - // - // // must be greater than or equal to 10 or less than 5 [fixed32.gte_lt_exclusive] - // fixed32 another_value = 3 [(buf.validate.field).fixed32 = { gte: 10, lt: 5 }]; - // } - // - // ``` - Gte uint32 `protobuf:"fixed32,5,opt,name=gte,oneof"` -} - -func (*Fixed32Rules_Gt) isFixed32Rules_GreaterThan() {} - -func (*Fixed32Rules_Gte) isFixed32Rules_GreaterThan() {} - -// Fixed64Rules describes the rules applied to `fixed64` values. -type Fixed64Rules struct { - state protoimpl.MessageState `protogen:"open.v1"` - // `const` requires the field value to exactly match the specified value. If - // the field value doesn't match, an error message is generated. - // - // ```proto - // - // message MyFixed64 { - // // value must equal 42 - // fixed64 value = 1 [(buf.validate.field).fixed64.const = 42]; - // } - // - // ``` - Const *uint64 `protobuf:"fixed64,1,opt,name=const" json:"const,omitempty"` - // Types that are valid to be assigned to LessThan: - // - // *Fixed64Rules_Lt - // *Fixed64Rules_Lte - LessThan isFixed64Rules_LessThan `protobuf_oneof:"less_than"` - // Types that are valid to be assigned to GreaterThan: - // - // *Fixed64Rules_Gt - // *Fixed64Rules_Gte - GreaterThan isFixed64Rules_GreaterThan `protobuf_oneof:"greater_than"` - // `in` requires the field value to be equal to one of the specified values. - // If the field value isn't one of the specified values, an error message is - // generated. - // - // ```proto - // - // message MyFixed64 { - // // must be in list [1, 2, 3] - // fixed64 value = 1 [(buf.validate.field).fixed64 = { in: [1, 2, 3] }]; - // } - // - // ``` - In []uint64 `protobuf:"fixed64,6,rep,name=in" json:"in,omitempty"` - // `not_in` requires the field value to not be equal to any of the specified - // values. If the field value is one of the specified values, an error - // message is generated. - // - // ```proto - // - // message MyFixed64 { - // // value must not be in list [1, 2, 3] - // fixed64 value = 1 [(buf.validate.field).fixed64 = { not_in: [1, 2, 3] }]; - // } - // - // ``` - NotIn []uint64 `protobuf:"fixed64,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - // `example` specifies values that the field may have. These values SHOULD - // conform to other rules. `example` values will not impact validation - // but may be used as helpful guidance on how to populate the given field. - // - // ```proto - // - // message MyFixed64 { - // fixed64 value = 1 [ - // (buf.validate.field).fixed64.example = 1, - // (buf.validate.field).fixed64.example = 2 - // ]; - // } - // - // ``` - Example []uint64 `protobuf:"fixed64,8,rep,name=example" json:"example,omitempty"` - extensionFields protoimpl.ExtensionFields - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Fixed64Rules) Reset() { - *x = Fixed64Rules{} - mi := &file_buf_validate_validate_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Fixed64Rules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Fixed64Rules) ProtoMessage() {} - -func (x *Fixed64Rules) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[15] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Fixed64Rules.ProtoReflect.Descriptor instead. -func (*Fixed64Rules) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{15} -} - -func (x *Fixed64Rules) GetConst() uint64 { - if x != nil && x.Const != nil { - return *x.Const - } - return 0 -} - -func (x *Fixed64Rules) GetLessThan() isFixed64Rules_LessThan { - if x != nil { - return x.LessThan - } - return nil -} - -func (x *Fixed64Rules) GetLt() uint64 { - if x != nil { - if x, ok := x.LessThan.(*Fixed64Rules_Lt); ok { - return x.Lt - } - } - return 0 -} - -func (x *Fixed64Rules) GetLte() uint64 { - if x != nil { - if x, ok := x.LessThan.(*Fixed64Rules_Lte); ok { - return x.Lte - } - } - return 0 -} - -func (x *Fixed64Rules) GetGreaterThan() isFixed64Rules_GreaterThan { - if x != nil { - return x.GreaterThan - } - return nil -} - -func (x *Fixed64Rules) GetGt() uint64 { - if x != nil { - if x, ok := x.GreaterThan.(*Fixed64Rules_Gt); ok { - return x.Gt - } - } - return 0 -} - -func (x *Fixed64Rules) GetGte() uint64 { - if x != nil { - if x, ok := x.GreaterThan.(*Fixed64Rules_Gte); ok { - return x.Gte - } - } - return 0 -} - -func (x *Fixed64Rules) GetIn() []uint64 { - if x != nil { - return x.In - } - return nil -} - -func (x *Fixed64Rules) GetNotIn() []uint64 { - if x != nil { - return x.NotIn - } - return nil -} - -func (x *Fixed64Rules) GetExample() []uint64 { - if x != nil { - return x.Example - } - return nil -} - -type isFixed64Rules_LessThan interface { - isFixed64Rules_LessThan() -} - -type Fixed64Rules_Lt struct { - // `lt` requires the field value to be less than the specified value (field < - // value). If the field value is equal to or greater than the specified value, - // an error message is generated. - // - // ```proto - // - // message MyFixed64 { - // // must be less than 10 - // fixed64 value = 1 [(buf.validate.field).fixed64.lt = 10]; - // } - // - // ``` - Lt uint64 `protobuf:"fixed64,2,opt,name=lt,oneof"` -} - -type Fixed64Rules_Lte struct { - // `lte` requires the field value to be less than or equal to the specified - // value (field <= value). If the field value is greater than the specified - // value, an error message is generated. - // - // ```proto - // - // message MyFixed64 { - // // must be less than or equal to 10 - // fixed64 value = 1 [(buf.validate.field).fixed64.lte = 10]; - // } - // - // ``` - Lte uint64 `protobuf:"fixed64,3,opt,name=lte,oneof"` -} - -func (*Fixed64Rules_Lt) isFixed64Rules_LessThan() {} - -func (*Fixed64Rules_Lte) isFixed64Rules_LessThan() {} - -type isFixed64Rules_GreaterThan interface { - isFixed64Rules_GreaterThan() -} - -type Fixed64Rules_Gt struct { - // `gt` requires the field value to be greater than the specified value - // (exclusive). If the value of `gt` is larger than a specified `lt` or - // `lte`, the range is reversed, and the field value must be outside the - // specified range. If the field value doesn't meet the required conditions, - // an error message is generated. - // - // ```proto - // - // message MyFixed64 { - // // must be greater than 5 [fixed64.gt] - // fixed64 value = 1 [(buf.validate.field).fixed64.gt = 5]; - // - // // must be greater than 5 and less than 10 [fixed64.gt_lt] - // fixed64 other_value = 2 [(buf.validate.field).fixed64 = { gt: 5, lt: 10 }]; - // - // // must be greater than 10 or less than 5 [fixed64.gt_lt_exclusive] - // fixed64 another_value = 3 [(buf.validate.field).fixed64 = { gt: 10, lt: 5 }]; - // } - // - // ``` - Gt uint64 `protobuf:"fixed64,4,opt,name=gt,oneof"` -} - -type Fixed64Rules_Gte struct { - // `gte` requires the field value to be greater than or equal to the specified - // value (exclusive). If the value of `gte` is larger than a specified `lt` - // or `lte`, the range is reversed, and the field value must be outside the - // specified range. If the field value doesn't meet the required conditions, - // an error message is generated. - // - // ```proto - // - // message MyFixed64 { - // // must be greater than or equal to 5 [fixed64.gte] - // fixed64 value = 1 [(buf.validate.field).fixed64.gte = 5]; - // - // // must be greater than or equal to 5 and less than 10 [fixed64.gte_lt] - // fixed64 other_value = 2 [(buf.validate.field).fixed64 = { gte: 5, lt: 10 }]; - // - // // must be greater than or equal to 10 or less than 5 [fixed64.gte_lt_exclusive] - // fixed64 another_value = 3 [(buf.validate.field).fixed64 = { gte: 10, lt: 5 }]; - // } - // - // ``` - Gte uint64 `protobuf:"fixed64,5,opt,name=gte,oneof"` -} - -func (*Fixed64Rules_Gt) isFixed64Rules_GreaterThan() {} - -func (*Fixed64Rules_Gte) isFixed64Rules_GreaterThan() {} - -// SFixed32Rules describes the rules applied to `fixed32` values. -type SFixed32Rules struct { - state protoimpl.MessageState `protogen:"open.v1"` - // `const` requires the field value to exactly match the specified value. If - // the field value doesn't match, an error message is generated. - // - // ```proto - // - // message MySFixed32 { - // // value must equal 42 - // sfixed32 value = 1 [(buf.validate.field).sfixed32.const = 42]; - // } - // - // ``` - Const *int32 `protobuf:"fixed32,1,opt,name=const" json:"const,omitempty"` - // Types that are valid to be assigned to LessThan: - // - // *SFixed32Rules_Lt - // *SFixed32Rules_Lte - LessThan isSFixed32Rules_LessThan `protobuf_oneof:"less_than"` - // Types that are valid to be assigned to GreaterThan: - // - // *SFixed32Rules_Gt - // *SFixed32Rules_Gte - GreaterThan isSFixed32Rules_GreaterThan `protobuf_oneof:"greater_than"` - // `in` requires the field value to be equal to one of the specified values. - // If the field value isn't one of the specified values, an error message is - // generated. - // - // ```proto - // - // message MySFixed32 { - // // must be in list [1, 2, 3] - // sfixed32 value = 1 [(buf.validate.field).sfixed32 = { in: [1, 2, 3] }]; - // } - // - // ``` - In []int32 `protobuf:"fixed32,6,rep,name=in" json:"in,omitempty"` - // `not_in` requires the field value to not be equal to any of the specified - // values. If the field value is one of the specified values, an error - // message is generated. - // - // ```proto - // - // message MySFixed32 { - // // value must not be in list [1, 2, 3] - // sfixed32 value = 1 [(buf.validate.field).sfixed32 = { not_in: [1, 2, 3] }]; - // } - // - // ``` - NotIn []int32 `protobuf:"fixed32,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - // `example` specifies values that the field may have. These values SHOULD - // conform to other rules. `example` values will not impact validation - // but may be used as helpful guidance on how to populate the given field. - // - // ```proto - // - // message MySFixed32 { - // sfixed32 value = 1 [ - // (buf.validate.field).sfixed32.example = 1, - // (buf.validate.field).sfixed32.example = 2 - // ]; - // } - // - // ``` - Example []int32 `protobuf:"fixed32,8,rep,name=example" json:"example,omitempty"` - extensionFields protoimpl.ExtensionFields - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SFixed32Rules) Reset() { - *x = SFixed32Rules{} - mi := &file_buf_validate_validate_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SFixed32Rules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SFixed32Rules) ProtoMessage() {} - -func (x *SFixed32Rules) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[16] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SFixed32Rules.ProtoReflect.Descriptor instead. -func (*SFixed32Rules) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{16} -} - -func (x *SFixed32Rules) GetConst() int32 { - if x != nil && x.Const != nil { - return *x.Const - } - return 0 -} - -func (x *SFixed32Rules) GetLessThan() isSFixed32Rules_LessThan { - if x != nil { - return x.LessThan - } - return nil -} - -func (x *SFixed32Rules) GetLt() int32 { - if x != nil { - if x, ok := x.LessThan.(*SFixed32Rules_Lt); ok { - return x.Lt - } - } - return 0 -} - -func (x *SFixed32Rules) GetLte() int32 { - if x != nil { - if x, ok := x.LessThan.(*SFixed32Rules_Lte); ok { - return x.Lte - } - } - return 0 -} - -func (x *SFixed32Rules) GetGreaterThan() isSFixed32Rules_GreaterThan { - if x != nil { - return x.GreaterThan - } - return nil -} - -func (x *SFixed32Rules) GetGt() int32 { - if x != nil { - if x, ok := x.GreaterThan.(*SFixed32Rules_Gt); ok { - return x.Gt - } - } - return 0 -} - -func (x *SFixed32Rules) GetGte() int32 { - if x != nil { - if x, ok := x.GreaterThan.(*SFixed32Rules_Gte); ok { - return x.Gte - } - } - return 0 -} - -func (x *SFixed32Rules) GetIn() []int32 { - if x != nil { - return x.In - } - return nil -} - -func (x *SFixed32Rules) GetNotIn() []int32 { - if x != nil { - return x.NotIn - } - return nil -} - -func (x *SFixed32Rules) GetExample() []int32 { - if x != nil { - return x.Example - } - return nil -} - -type isSFixed32Rules_LessThan interface { - isSFixed32Rules_LessThan() -} - -type SFixed32Rules_Lt struct { - // `lt` requires the field value to be less than the specified value (field < - // value). If the field value is equal to or greater than the specified value, - // an error message is generated. - // - // ```proto - // - // message MySFixed32 { - // // must be less than 10 - // sfixed32 value = 1 [(buf.validate.field).sfixed32.lt = 10]; - // } - // - // ``` - Lt int32 `protobuf:"fixed32,2,opt,name=lt,oneof"` -} - -type SFixed32Rules_Lte struct { - // `lte` requires the field value to be less than or equal to the specified - // value (field <= value). If the field value is greater than the specified - // value, an error message is generated. - // - // ```proto - // - // message MySFixed32 { - // // must be less than or equal to 10 - // sfixed32 value = 1 [(buf.validate.field).sfixed32.lte = 10]; - // } - // - // ``` - Lte int32 `protobuf:"fixed32,3,opt,name=lte,oneof"` -} - -func (*SFixed32Rules_Lt) isSFixed32Rules_LessThan() {} - -func (*SFixed32Rules_Lte) isSFixed32Rules_LessThan() {} - -type isSFixed32Rules_GreaterThan interface { - isSFixed32Rules_GreaterThan() -} - -type SFixed32Rules_Gt struct { - // `gt` requires the field value to be greater than the specified value - // (exclusive). If the value of `gt` is larger than a specified `lt` or - // `lte`, the range is reversed, and the field value must be outside the - // specified range. If the field value doesn't meet the required conditions, - // an error message is generated. - // - // ```proto - // - // message MySFixed32 { - // // must be greater than 5 [sfixed32.gt] - // sfixed32 value = 1 [(buf.validate.field).sfixed32.gt = 5]; - // - // // must be greater than 5 and less than 10 [sfixed32.gt_lt] - // sfixed32 other_value = 2 [(buf.validate.field).sfixed32 = { gt: 5, lt: 10 }]; - // - // // must be greater than 10 or less than 5 [sfixed32.gt_lt_exclusive] - // sfixed32 another_value = 3 [(buf.validate.field).sfixed32 = { gt: 10, lt: 5 }]; - // } - // - // ``` - Gt int32 `protobuf:"fixed32,4,opt,name=gt,oneof"` -} - -type SFixed32Rules_Gte struct { - // `gte` requires the field value to be greater than or equal to the specified - // value (exclusive). If the value of `gte` is larger than a specified `lt` - // or `lte`, the range is reversed, and the field value must be outside the - // specified range. If the field value doesn't meet the required conditions, - // an error message is generated. - // - // ```proto - // - // message MySFixed32 { - // // must be greater than or equal to 5 [sfixed32.gte] - // sfixed32 value = 1 [(buf.validate.field).sfixed32.gte = 5]; - // - // // must be greater than or equal to 5 and less than 10 [sfixed32.gte_lt] - // sfixed32 other_value = 2 [(buf.validate.field).sfixed32 = { gte: 5, lt: 10 }]; - // - // // must be greater than or equal to 10 or less than 5 [sfixed32.gte_lt_exclusive] - // sfixed32 another_value = 3 [(buf.validate.field).sfixed32 = { gte: 10, lt: 5 }]; - // } - // - // ``` - Gte int32 `protobuf:"fixed32,5,opt,name=gte,oneof"` -} - -func (*SFixed32Rules_Gt) isSFixed32Rules_GreaterThan() {} - -func (*SFixed32Rules_Gte) isSFixed32Rules_GreaterThan() {} - -// SFixed64Rules describes the rules applied to `fixed64` values. -type SFixed64Rules struct { - state protoimpl.MessageState `protogen:"open.v1"` - // `const` requires the field value to exactly match the specified value. If - // the field value doesn't match, an error message is generated. - // - // ```proto - // - // message MySFixed64 { - // // value must equal 42 - // sfixed64 value = 1 [(buf.validate.field).sfixed64.const = 42]; - // } - // - // ``` - Const *int64 `protobuf:"fixed64,1,opt,name=const" json:"const,omitempty"` - // Types that are valid to be assigned to LessThan: - // - // *SFixed64Rules_Lt - // *SFixed64Rules_Lte - LessThan isSFixed64Rules_LessThan `protobuf_oneof:"less_than"` - // Types that are valid to be assigned to GreaterThan: - // - // *SFixed64Rules_Gt - // *SFixed64Rules_Gte - GreaterThan isSFixed64Rules_GreaterThan `protobuf_oneof:"greater_than"` - // `in` requires the field value to be equal to one of the specified values. - // If the field value isn't one of the specified values, an error message is - // generated. - // - // ```proto - // - // message MySFixed64 { - // // must be in list [1, 2, 3] - // sfixed64 value = 1 [(buf.validate.field).sfixed64 = { in: [1, 2, 3] }]; - // } - // - // ``` - In []int64 `protobuf:"fixed64,6,rep,name=in" json:"in,omitempty"` - // `not_in` requires the field value to not be equal to any of the specified - // values. If the field value is one of the specified values, an error - // message is generated. - // - // ```proto - // - // message MySFixed64 { - // // value must not be in list [1, 2, 3] - // sfixed64 value = 1 [(buf.validate.field).sfixed64 = { not_in: [1, 2, 3] }]; - // } - // - // ``` - NotIn []int64 `protobuf:"fixed64,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - // `example` specifies values that the field may have. These values SHOULD - // conform to other rules. `example` values will not impact validation - // but may be used as helpful guidance on how to populate the given field. - // - // ```proto - // - // message MySFixed64 { - // sfixed64 value = 1 [ - // (buf.validate.field).sfixed64.example = 1, - // (buf.validate.field).sfixed64.example = 2 - // ]; - // } - // - // ``` - Example []int64 `protobuf:"fixed64,8,rep,name=example" json:"example,omitempty"` - extensionFields protoimpl.ExtensionFields - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *SFixed64Rules) Reset() { - *x = SFixed64Rules{} - mi := &file_buf_validate_validate_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *SFixed64Rules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SFixed64Rules) ProtoMessage() {} - -func (x *SFixed64Rules) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[17] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SFixed64Rules.ProtoReflect.Descriptor instead. -func (*SFixed64Rules) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{17} -} - -func (x *SFixed64Rules) GetConst() int64 { - if x != nil && x.Const != nil { - return *x.Const - } - return 0 -} - -func (x *SFixed64Rules) GetLessThan() isSFixed64Rules_LessThan { - if x != nil { - return x.LessThan - } - return nil -} - -func (x *SFixed64Rules) GetLt() int64 { - if x != nil { - if x, ok := x.LessThan.(*SFixed64Rules_Lt); ok { - return x.Lt - } - } - return 0 -} - -func (x *SFixed64Rules) GetLte() int64 { - if x != nil { - if x, ok := x.LessThan.(*SFixed64Rules_Lte); ok { - return x.Lte - } - } - return 0 -} - -func (x *SFixed64Rules) GetGreaterThan() isSFixed64Rules_GreaterThan { - if x != nil { - return x.GreaterThan - } - return nil -} - -func (x *SFixed64Rules) GetGt() int64 { - if x != nil { - if x, ok := x.GreaterThan.(*SFixed64Rules_Gt); ok { - return x.Gt - } - } - return 0 -} - -func (x *SFixed64Rules) GetGte() int64 { - if x != nil { - if x, ok := x.GreaterThan.(*SFixed64Rules_Gte); ok { - return x.Gte - } - } - return 0 -} - -func (x *SFixed64Rules) GetIn() []int64 { - if x != nil { - return x.In - } - return nil -} - -func (x *SFixed64Rules) GetNotIn() []int64 { - if x != nil { - return x.NotIn - } - return nil -} - -func (x *SFixed64Rules) GetExample() []int64 { - if x != nil { - return x.Example - } - return nil -} - -type isSFixed64Rules_LessThan interface { - isSFixed64Rules_LessThan() -} - -type SFixed64Rules_Lt struct { - // `lt` requires the field value to be less than the specified value (field < - // value). If the field value is equal to or greater than the specified value, - // an error message is generated. - // - // ```proto - // - // message MySFixed64 { - // // must be less than 10 - // sfixed64 value = 1 [(buf.validate.field).sfixed64.lt = 10]; - // } - // - // ``` - Lt int64 `protobuf:"fixed64,2,opt,name=lt,oneof"` -} - -type SFixed64Rules_Lte struct { - // `lte` requires the field value to be less than or equal to the specified - // value (field <= value). If the field value is greater than the specified - // value, an error message is generated. - // - // ```proto - // - // message MySFixed64 { - // // must be less than or equal to 10 - // sfixed64 value = 1 [(buf.validate.field).sfixed64.lte = 10]; - // } - // - // ``` - Lte int64 `protobuf:"fixed64,3,opt,name=lte,oneof"` -} - -func (*SFixed64Rules_Lt) isSFixed64Rules_LessThan() {} - -func (*SFixed64Rules_Lte) isSFixed64Rules_LessThan() {} - -type isSFixed64Rules_GreaterThan interface { - isSFixed64Rules_GreaterThan() -} - -type SFixed64Rules_Gt struct { - // `gt` requires the field value to be greater than the specified value - // (exclusive). If the value of `gt` is larger than a specified `lt` or - // `lte`, the range is reversed, and the field value must be outside the - // specified range. If the field value doesn't meet the required conditions, - // an error message is generated. - // - // ```proto - // - // message MySFixed64 { - // // must be greater than 5 [sfixed64.gt] - // sfixed64 value = 1 [(buf.validate.field).sfixed64.gt = 5]; - // - // // must be greater than 5 and less than 10 [sfixed64.gt_lt] - // sfixed64 other_value = 2 [(buf.validate.field).sfixed64 = { gt: 5, lt: 10 }]; - // - // // must be greater than 10 or less than 5 [sfixed64.gt_lt_exclusive] - // sfixed64 another_value = 3 [(buf.validate.field).sfixed64 = { gt: 10, lt: 5 }]; - // } - // - // ``` - Gt int64 `protobuf:"fixed64,4,opt,name=gt,oneof"` -} - -type SFixed64Rules_Gte struct { - // `gte` requires the field value to be greater than or equal to the specified - // value (exclusive). If the value of `gte` is larger than a specified `lt` - // or `lte`, the range is reversed, and the field value must be outside the - // specified range. If the field value doesn't meet the required conditions, - // an error message is generated. - // - // ```proto - // - // message MySFixed64 { - // // must be greater than or equal to 5 [sfixed64.gte] - // sfixed64 value = 1 [(buf.validate.field).sfixed64.gte = 5]; - // - // // must be greater than or equal to 5 and less than 10 [sfixed64.gte_lt] - // sfixed64 other_value = 2 [(buf.validate.field).sfixed64 = { gte: 5, lt: 10 }]; - // - // // must be greater than or equal to 10 or less than 5 [sfixed64.gte_lt_exclusive] - // sfixed64 another_value = 3 [(buf.validate.field).sfixed64 = { gte: 10, lt: 5 }]; - // } - // - // ``` - Gte int64 `protobuf:"fixed64,5,opt,name=gte,oneof"` -} - -func (*SFixed64Rules_Gt) isSFixed64Rules_GreaterThan() {} - -func (*SFixed64Rules_Gte) isSFixed64Rules_GreaterThan() {} - -// BoolRules describes the rules applied to `bool` values. These rules -// may also be applied to the `google.protobuf.BoolValue` Well-Known-Type. -type BoolRules struct { - state protoimpl.MessageState `protogen:"open.v1"` - // `const` requires the field value to exactly match the specified boolean value. - // If the field value doesn't match, an error message is generated. - // - // ```proto - // - // message MyBool { - // // value must equal true - // bool value = 1 [(buf.validate.field).bool.const = true]; - // } - // - // ``` - Const *bool `protobuf:"varint,1,opt,name=const" json:"const,omitempty"` - // `example` specifies values that the field may have. These values SHOULD - // conform to other rules. `example` values will not impact validation - // but may be used as helpful guidance on how to populate the given field. - // - // ```proto - // - // message MyBool { - // bool value = 1 [ - // (buf.validate.field).bool.example = 1, - // (buf.validate.field).bool.example = 2 - // ]; - // } - // - // ``` - Example []bool `protobuf:"varint,2,rep,name=example" json:"example,omitempty"` - extensionFields protoimpl.ExtensionFields - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *BoolRules) Reset() { - *x = BoolRules{} - mi := &file_buf_validate_validate_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *BoolRules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BoolRules) ProtoMessage() {} - -func (x *BoolRules) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[18] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BoolRules.ProtoReflect.Descriptor instead. -func (*BoolRules) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{18} -} - -func (x *BoolRules) GetConst() bool { - if x != nil && x.Const != nil { - return *x.Const - } - return false -} - -func (x *BoolRules) GetExample() []bool { - if x != nil { - return x.Example - } - return nil -} - -// StringRules describes the rules applied to `string` values These -// rules may also be applied to the `google.protobuf.StringValue` Well-Known-Type. -type StringRules struct { - state protoimpl.MessageState `protogen:"open.v1"` - // `const` requires the field value to exactly match the specified value. If - // the field value doesn't match, an error message is generated. - // - // ```proto - // - // message MyString { - // // value must equal `hello` - // string value = 1 [(buf.validate.field).string.const = "hello"]; - // } - // - // ``` - Const *string `protobuf:"bytes,1,opt,name=const" json:"const,omitempty"` - // `len` dictates that the field value must have the specified - // number of characters (Unicode code points), which may differ from the number - // of bytes in the string. If the field value does not meet the specified - // length, an error message will be generated. - // - // ```proto - // - // message MyString { - // // value length must be 5 characters - // string value = 1 [(buf.validate.field).string.len = 5]; - // } - // - // ``` - Len *uint64 `protobuf:"varint,19,opt,name=len" json:"len,omitempty"` - // `min_len` specifies that the field value must have at least the specified - // number of characters (Unicode code points), which may differ from the number - // of bytes in the string. If the field value contains fewer characters, an error - // message will be generated. - // - // ```proto - // - // message MyString { - // // value length must be at least 3 characters - // string value = 1 [(buf.validate.field).string.min_len = 3]; - // } - // - // ``` - MinLen *uint64 `protobuf:"varint,2,opt,name=min_len,json=minLen" json:"min_len,omitempty"` - // `max_len` specifies that the field value must have no more than the specified - // number of characters (Unicode code points), which may differ from the - // number of bytes in the string. If the field value contains more characters, - // an error message will be generated. - // - // ```proto - // - // message MyString { - // // value length must be at most 10 characters - // string value = 1 [(buf.validate.field).string.max_len = 10]; - // } - // - // ``` - MaxLen *uint64 `protobuf:"varint,3,opt,name=max_len,json=maxLen" json:"max_len,omitempty"` - // `len_bytes` dictates that the field value must have the specified number of - // bytes. If the field value does not match the specified length in bytes, - // an error message will be generated. - // - // ```proto - // - // message MyString { - // // value length must be 6 bytes - // string value = 1 [(buf.validate.field).string.len_bytes = 6]; - // } - // - // ``` - LenBytes *uint64 `protobuf:"varint,20,opt,name=len_bytes,json=lenBytes" json:"len_bytes,omitempty"` - // `min_bytes` specifies that the field value must have at least the specified - // number of bytes. If the field value contains fewer bytes, an error message - // will be generated. - // - // ```proto - // - // message MyString { - // // value length must be at least 4 bytes - // string value = 1 [(buf.validate.field).string.min_bytes = 4]; - // } - // - // ``` - MinBytes *uint64 `protobuf:"varint,4,opt,name=min_bytes,json=minBytes" json:"min_bytes,omitempty"` - // `max_bytes` specifies that the field value must have no more than the - // specified number of bytes. If the field value contains more bytes, an - // error message will be generated. - // - // ```proto - // - // message MyString { - // // value length must be at most 8 bytes - // string value = 1 [(buf.validate.field).string.max_bytes = 8]; - // } - // - // ``` - MaxBytes *uint64 `protobuf:"varint,5,opt,name=max_bytes,json=maxBytes" json:"max_bytes,omitempty"` - // `pattern` specifies that the field value must match the specified - // regular expression (RE2 syntax), with the expression provided without any - // delimiters. If the field value doesn't match the regular expression, an - // error message will be generated. - // - // ```proto - // - // message MyString { - // // value does not match regex pattern `^[a-zA-Z]//$` - // string value = 1 [(buf.validate.field).string.pattern = "^[a-zA-Z]//$"]; - // } - // - // ``` - Pattern *string `protobuf:"bytes,6,opt,name=pattern" json:"pattern,omitempty"` - // `prefix` specifies that the field value must have the - // specified substring at the beginning of the string. If the field value - // doesn't start with the specified prefix, an error message will be - // generated. - // - // ```proto - // - // message MyString { - // // value does not have prefix `pre` - // string value = 1 [(buf.validate.field).string.prefix = "pre"]; - // } - // - // ``` - Prefix *string `protobuf:"bytes,7,opt,name=prefix" json:"prefix,omitempty"` - // `suffix` specifies that the field value must have the - // specified substring at the end of the string. If the field value doesn't - // end with the specified suffix, an error message will be generated. - // - // ```proto - // - // message MyString { - // // value does not have suffix `post` - // string value = 1 [(buf.validate.field).string.suffix = "post"]; - // } - // - // ``` - Suffix *string `protobuf:"bytes,8,opt,name=suffix" json:"suffix,omitempty"` - // `contains` specifies that the field value must have the - // specified substring anywhere in the string. If the field value doesn't - // contain the specified substring, an error message will be generated. - // - // ```proto - // - // message MyString { - // // value does not contain substring `inside`. - // string value = 1 [(buf.validate.field).string.contains = "inside"]; - // } - // - // ``` - Contains *string `protobuf:"bytes,9,opt,name=contains" json:"contains,omitempty"` - // `not_contains` specifies that the field value must not have the - // specified substring anywhere in the string. If the field value contains - // the specified substring, an error message will be generated. - // - // ```proto - // - // message MyString { - // // value contains substring `inside`. - // string value = 1 [(buf.validate.field).string.not_contains = "inside"]; - // } - // - // ``` - NotContains *string `protobuf:"bytes,23,opt,name=not_contains,json=notContains" json:"not_contains,omitempty"` - // `in` specifies that the field value must be equal to one of the specified - // values. If the field value isn't one of the specified values, an error - // message will be generated. - // - // ```proto - // - // message MyString { - // // must be in list ["apple", "banana"] - // string value = 1 [(buf.validate.field).string.in = "apple", (buf.validate.field).string.in = "banana"]; - // } - // - // ``` - In []string `protobuf:"bytes,10,rep,name=in" json:"in,omitempty"` - // `not_in` specifies that the field value cannot be equal to any - // of the specified values. If the field value is one of the specified values, - // an error message will be generated. - // ```proto - // - // message MyString { - // // value must not be in list ["orange", "grape"] - // string value = 1 [(buf.validate.field).string.not_in = "orange", (buf.validate.field).string.not_in = "grape"]; - // } - // - // ``` - NotIn []string `protobuf:"bytes,11,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - // `WellKnown` rules provide advanced rules against common string - // patterns. - // - // Types that are valid to be assigned to WellKnown: - // - // *StringRules_Email - // *StringRules_Hostname - // *StringRules_Ip - // *StringRules_Ipv4 - // *StringRules_Ipv6 - // *StringRules_Uri - // *StringRules_UriRef - // *StringRules_Address - // *StringRules_Uuid - // *StringRules_Tuuid - // *StringRules_IpWithPrefixlen - // *StringRules_Ipv4WithPrefixlen - // *StringRules_Ipv6WithPrefixlen - // *StringRules_IpPrefix - // *StringRules_Ipv4Prefix - // *StringRules_Ipv6Prefix - // *StringRules_HostAndPort - // *StringRules_Ulid - // *StringRules_ProtobufFqn - // *StringRules_ProtobufDotFqn - // *StringRules_WellKnownRegex - WellKnown isStringRules_WellKnown `protobuf_oneof:"well_known"` - // This applies to regexes `HTTP_HEADER_NAME` and `HTTP_HEADER_VALUE` to - // enable strict header validation. By default, this is true, and HTTP header - // validations are [RFC-compliant](https://datatracker.ietf.org/doc/html/rfc7230#section-3). Setting to false will enable looser - // validations that only disallow `\r\n\0` characters, which can be used to - // bypass header matching rules. - // - // ```proto - // - // message MyString { - // // The field `value` must have be a valid HTTP headers, but not enforced with strict rules. - // string value = 1 [(buf.validate.field).string.strict = false]; - // } - // - // ``` - Strict *bool `protobuf:"varint,25,opt,name=strict" json:"strict,omitempty"` - // `example` specifies values that the field may have. These values SHOULD - // conform to other rules. `example` values will not impact validation - // but may be used as helpful guidance on how to populate the given field. - // - // ```proto - // - // message MyString { - // string value = 1 [ - // (buf.validate.field).string.example = "hello", - // (buf.validate.field).string.example = "world" - // ]; - // } - // - // ``` - Example []string `protobuf:"bytes,34,rep,name=example" json:"example,omitempty"` - extensionFields protoimpl.ExtensionFields - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *StringRules) Reset() { - *x = StringRules{} - mi := &file_buf_validate_validate_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *StringRules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*StringRules) ProtoMessage() {} - -func (x *StringRules) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[19] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use StringRules.ProtoReflect.Descriptor instead. -func (*StringRules) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{19} -} - -func (x *StringRules) GetConst() string { - if x != nil && x.Const != nil { - return *x.Const - } - return "" -} - -func (x *StringRules) GetLen() uint64 { - if x != nil && x.Len != nil { - return *x.Len - } - return 0 -} - -func (x *StringRules) GetMinLen() uint64 { - if x != nil && x.MinLen != nil { - return *x.MinLen - } - return 0 -} - -func (x *StringRules) GetMaxLen() uint64 { - if x != nil && x.MaxLen != nil { - return *x.MaxLen - } - return 0 -} - -func (x *StringRules) GetLenBytes() uint64 { - if x != nil && x.LenBytes != nil { - return *x.LenBytes - } - return 0 -} - -func (x *StringRules) GetMinBytes() uint64 { - if x != nil && x.MinBytes != nil { - return *x.MinBytes - } - return 0 -} - -func (x *StringRules) GetMaxBytes() uint64 { - if x != nil && x.MaxBytes != nil { - return *x.MaxBytes - } - return 0 -} - -func (x *StringRules) GetPattern() string { - if x != nil && x.Pattern != nil { - return *x.Pattern - } - return "" -} - -func (x *StringRules) GetPrefix() string { - if x != nil && x.Prefix != nil { - return *x.Prefix - } - return "" -} - -func (x *StringRules) GetSuffix() string { - if x != nil && x.Suffix != nil { - return *x.Suffix - } - return "" -} - -func (x *StringRules) GetContains() string { - if x != nil && x.Contains != nil { - return *x.Contains - } - return "" -} - -func (x *StringRules) GetNotContains() string { - if x != nil && x.NotContains != nil { - return *x.NotContains - } - return "" -} - -func (x *StringRules) GetIn() []string { - if x != nil { - return x.In - } - return nil -} - -func (x *StringRules) GetNotIn() []string { - if x != nil { - return x.NotIn - } - return nil -} - -func (x *StringRules) GetWellKnown() isStringRules_WellKnown { - if x != nil { - return x.WellKnown - } - return nil -} - -func (x *StringRules) GetEmail() bool { - if x != nil { - if x, ok := x.WellKnown.(*StringRules_Email); ok { - return x.Email - } - } - return false -} - -func (x *StringRules) GetHostname() bool { - if x != nil { - if x, ok := x.WellKnown.(*StringRules_Hostname); ok { - return x.Hostname - } - } - return false -} - -func (x *StringRules) GetIp() bool { - if x != nil { - if x, ok := x.WellKnown.(*StringRules_Ip); ok { - return x.Ip - } - } - return false -} - -func (x *StringRules) GetIpv4() bool { - if x != nil { - if x, ok := x.WellKnown.(*StringRules_Ipv4); ok { - return x.Ipv4 - } - } - return false -} - -func (x *StringRules) GetIpv6() bool { - if x != nil { - if x, ok := x.WellKnown.(*StringRules_Ipv6); ok { - return x.Ipv6 - } - } - return false -} - -func (x *StringRules) GetUri() bool { - if x != nil { - if x, ok := x.WellKnown.(*StringRules_Uri); ok { - return x.Uri - } - } - return false -} - -func (x *StringRules) GetUriRef() bool { - if x != nil { - if x, ok := x.WellKnown.(*StringRules_UriRef); ok { - return x.UriRef - } - } - return false -} - -func (x *StringRules) GetAddress() bool { - if x != nil { - if x, ok := x.WellKnown.(*StringRules_Address); ok { - return x.Address - } - } - return false -} - -func (x *StringRules) GetUuid() bool { - if x != nil { - if x, ok := x.WellKnown.(*StringRules_Uuid); ok { - return x.Uuid - } - } - return false -} - -func (x *StringRules) GetTuuid() bool { - if x != nil { - if x, ok := x.WellKnown.(*StringRules_Tuuid); ok { - return x.Tuuid - } - } - return false -} - -func (x *StringRules) GetIpWithPrefixlen() bool { - if x != nil { - if x, ok := x.WellKnown.(*StringRules_IpWithPrefixlen); ok { - return x.IpWithPrefixlen - } - } - return false -} - -func (x *StringRules) GetIpv4WithPrefixlen() bool { - if x != nil { - if x, ok := x.WellKnown.(*StringRules_Ipv4WithPrefixlen); ok { - return x.Ipv4WithPrefixlen - } - } - return false -} - -func (x *StringRules) GetIpv6WithPrefixlen() bool { - if x != nil { - if x, ok := x.WellKnown.(*StringRules_Ipv6WithPrefixlen); ok { - return x.Ipv6WithPrefixlen - } - } - return false -} - -func (x *StringRules) GetIpPrefix() bool { - if x != nil { - if x, ok := x.WellKnown.(*StringRules_IpPrefix); ok { - return x.IpPrefix - } - } - return false -} - -func (x *StringRules) GetIpv4Prefix() bool { - if x != nil { - if x, ok := x.WellKnown.(*StringRules_Ipv4Prefix); ok { - return x.Ipv4Prefix - } - } - return false -} - -func (x *StringRules) GetIpv6Prefix() bool { - if x != nil { - if x, ok := x.WellKnown.(*StringRules_Ipv6Prefix); ok { - return x.Ipv6Prefix - } - } - return false -} - -func (x *StringRules) GetHostAndPort() bool { - if x != nil { - if x, ok := x.WellKnown.(*StringRules_HostAndPort); ok { - return x.HostAndPort - } - } - return false -} - -func (x *StringRules) GetUlid() bool { - if x != nil { - if x, ok := x.WellKnown.(*StringRules_Ulid); ok { - return x.Ulid - } - } - return false -} - -func (x *StringRules) GetProtobufFqn() bool { - if x != nil { - if x, ok := x.WellKnown.(*StringRules_ProtobufFqn); ok { - return x.ProtobufFqn - } - } - return false -} - -func (x *StringRules) GetProtobufDotFqn() bool { - if x != nil { - if x, ok := x.WellKnown.(*StringRules_ProtobufDotFqn); ok { - return x.ProtobufDotFqn - } - } - return false -} - -func (x *StringRules) GetWellKnownRegex() KnownRegex { - if x != nil { - if x, ok := x.WellKnown.(*StringRules_WellKnownRegex); ok { - return x.WellKnownRegex - } - } - return KnownRegex_KNOWN_REGEX_UNSPECIFIED -} - -func (x *StringRules) GetStrict() bool { - if x != nil && x.Strict != nil { - return *x.Strict - } - return false -} - -func (x *StringRules) GetExample() []string { - if x != nil { - return x.Example - } - return nil -} - -type isStringRules_WellKnown interface { - isStringRules_WellKnown() -} - -type StringRules_Email struct { - // `email` specifies that the field value must be a valid email address, for - // example "foo@example.com". - // - // Conforms to the definition for a valid email address from the [HTML standard](https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address). - // Note that this standard willfully deviates from [RFC 5322](https://datatracker.ietf.org/doc/html/rfc5322), - // which allows many unexpected forms of email addresses and will easily match - // a typographical error. - // - // If the field value isn't a valid email address, an error message will be generated. - // - // ```proto - // - // message MyString { - // // must be a valid email address - // string value = 1 [(buf.validate.field).string.email = true]; - // } - // - // ``` - Email bool `protobuf:"varint,12,opt,name=email,oneof"` -} - -type StringRules_Hostname struct { - // `hostname` specifies that the field value must be a valid hostname, for - // example "foo.example.com". - // - // A valid hostname follows the rules below: - // - The name consists of one or more labels, separated by a dot ("."). - // - Each label can be 1 to 63 alphanumeric characters. - // - A label can contain hyphens ("-"), but must not start or end with a hyphen. - // - The right-most label must not be digits only. - // - The name can have a trailing dot—for example, "foo.example.com.". - // - The name can be 253 characters at most, excluding the optional trailing dot. - // - // If the field value isn't a valid hostname, an error message will be generated. - // - // ```proto - // - // message MyString { - // // must be a valid hostname - // string value = 1 [(buf.validate.field).string.hostname = true]; - // } - // - // ``` - Hostname bool `protobuf:"varint,13,opt,name=hostname,oneof"` -} - -type StringRules_Ip struct { - // `ip` specifies that the field value must be a valid IP (v4 or v6) address. - // - // IPv4 addresses are expected in the dotted decimal format—for example, "192.168.5.21". - // IPv6 addresses are expected in their text representation—for example, "::1", - // or "2001:0DB8:ABCD:0012::0". - // - // Both formats are well-defined in the internet standard [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986). - // Zone identifiers for IPv6 addresses (for example, "fe80::a%en1") are supported. - // - // If the field value isn't a valid IP address, an error message will be - // generated. - // - // ```proto - // - // message MyString { - // // must be a valid IP address - // string value = 1 [(buf.validate.field).string.ip = true]; - // } - // - // ``` - Ip bool `protobuf:"varint,14,opt,name=ip,oneof"` -} - -type StringRules_Ipv4 struct { - // `ipv4` specifies that the field value must be a valid IPv4 address—for - // example "192.168.5.21". If the field value isn't a valid IPv4 address, an - // error message will be generated. - // - // ```proto - // - // message MyString { - // // must be a valid IPv4 address - // string value = 1 [(buf.validate.field).string.ipv4 = true]; - // } - // - // ``` - Ipv4 bool `protobuf:"varint,15,opt,name=ipv4,oneof"` -} - -type StringRules_Ipv6 struct { - // `ipv6` specifies that the field value must be a valid IPv6 address—for - // example "::1", or "d7a:115c:a1e0:ab12:4843:cd96:626b:430b". If the field - // value is not a valid IPv6 address, an error message will be generated. - // - // ```proto - // - // message MyString { - // // must be a valid IPv6 address - // string value = 1 [(buf.validate.field).string.ipv6 = true]; - // } - // - // ``` - Ipv6 bool `protobuf:"varint,16,opt,name=ipv6,oneof"` -} - -type StringRules_Uri struct { - // `uri` specifies that the field value must be a valid URI, for example - // "https://example.com/foo/bar?baz=quux#frag". - // - // URI is defined in the internet standard [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986). - // Zone Identifiers in IPv6 address literals are supported ([RFC 6874](https://datatracker.ietf.org/doc/html/rfc6874)). - // - // If the field value isn't a valid URI, an error message will be generated. - // - // ```proto - // - // message MyString { - // // must be a valid URI - // string value = 1 [(buf.validate.field).string.uri = true]; - // } - // - // ``` - Uri bool `protobuf:"varint,17,opt,name=uri,oneof"` -} - -type StringRules_UriRef struct { - // `uri_ref` specifies that the field value must be a valid URI Reference—either - // a URI such as "https://example.com/foo/bar?baz=quux#frag", or a Relative - // Reference such as "./foo/bar?query". - // - // URI, URI Reference, and Relative Reference are defined in the internet - // standard [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986). Zone - // Identifiers in IPv6 address literals are supported ([RFC 6874](https://datatracker.ietf.org/doc/html/rfc6874)). - // - // If the field value isn't a valid URI Reference, an error message will be - // generated. - // - // ```proto - // - // message MyString { - // // must be a valid URI Reference - // string value = 1 [(buf.validate.field).string.uri_ref = true]; - // } - // - // ``` - UriRef bool `protobuf:"varint,18,opt,name=uri_ref,json=uriRef,oneof"` -} - -type StringRules_Address struct { - // `address` specifies that the field value must be either a valid hostname - // (for example, "example.com"), or a valid IP (v4 or v6) address (for example, - // "192.168.0.1", or "::1"). If the field value isn't a valid hostname or IP, - // an error message will be generated. - // - // ```proto - // - // message MyString { - // // must be a valid hostname, or ip address - // string value = 1 [(buf.validate.field).string.address = true]; - // } - // - // ``` - Address bool `protobuf:"varint,21,opt,name=address,oneof"` -} - -type StringRules_Uuid struct { - // `uuid` specifies that the field value must be a valid UUID as defined by - // [RFC 4122](https://datatracker.ietf.org/doc/html/rfc4122#section-4.1.2). If the - // field value isn't a valid UUID, an error message will be generated. - // - // ```proto - // - // message MyString { - // // must be a valid UUID - // string value = 1 [(buf.validate.field).string.uuid = true]; - // } - // - // ``` - Uuid bool `protobuf:"varint,22,opt,name=uuid,oneof"` -} - -type StringRules_Tuuid struct { - // `tuuid` (trimmed UUID) specifies that the field value must be a valid UUID as - // defined by [RFC 4122](https://datatracker.ietf.org/doc/html/rfc4122#section-4.1.2) with all dashes - // omitted. If the field value isn't a valid UUID without dashes, an error message - // will be generated. - // - // ```proto - // - // message MyString { - // // must be a valid trimmed UUID - // string value = 1 [(buf.validate.field).string.tuuid = true]; - // } - // - // ``` - Tuuid bool `protobuf:"varint,33,opt,name=tuuid,oneof"` -} - -type StringRules_IpWithPrefixlen struct { - // `ip_with_prefixlen` specifies that the field value must be a valid IP - // (v4 or v6) address with prefix length—for example, "192.168.5.21/16" or - // "2001:0DB8:ABCD:0012::F1/64". If the field value isn't a valid IP with - // prefix length, an error message will be generated. - // - // ```proto - // - // message MyString { - // // must be a valid IP with prefix length - // string value = 1 [(buf.validate.field).string.ip_with_prefixlen = true]; - // } - // - // ``` - IpWithPrefixlen bool `protobuf:"varint,26,opt,name=ip_with_prefixlen,json=ipWithPrefixlen,oneof"` -} - -type StringRules_Ipv4WithPrefixlen struct { - // `ipv4_with_prefixlen` specifies that the field value must be a valid - // IPv4 address with prefix length—for example, "192.168.5.21/16". If the - // field value isn't a valid IPv4 address with prefix length, an error - // message will be generated. - // - // ```proto - // - // message MyString { - // // must be a valid IPv4 address with prefix length - // string value = 1 [(buf.validate.field).string.ipv4_with_prefixlen = true]; - // } - // - // ``` - Ipv4WithPrefixlen bool `protobuf:"varint,27,opt,name=ipv4_with_prefixlen,json=ipv4WithPrefixlen,oneof"` -} - -type StringRules_Ipv6WithPrefixlen struct { - // `ipv6_with_prefixlen` specifies that the field value must be a valid - // IPv6 address with prefix length—for example, "2001:0DB8:ABCD:0012::F1/64". - // If the field value is not a valid IPv6 address with prefix length, - // an error message will be generated. - // - // ```proto - // - // message MyString { - // // must be a valid IPv6 address prefix length - // string value = 1 [(buf.validate.field).string.ipv6_with_prefixlen = true]; - // } - // - // ``` - Ipv6WithPrefixlen bool `protobuf:"varint,28,opt,name=ipv6_with_prefixlen,json=ipv6WithPrefixlen,oneof"` -} - -type StringRules_IpPrefix struct { - // `ip_prefix` specifies that the field value must be a valid IP (v4 or v6) - // prefix—for example, "192.168.0.0/16" or "2001:0DB8:ABCD:0012::0/64". - // - // The prefix must have all zeros for the unmasked bits. For example, - // "2001:0DB8:ABCD:0012::0/64" designates the left-most 64 bits for the - // prefix, and the remaining 64 bits must be zero. - // - // If the field value isn't a valid IP prefix, an error message will be - // generated. - // - // ```proto - // - // message MyString { - // // must be a valid IP prefix - // string value = 1 [(buf.validate.field).string.ip_prefix = true]; - // } - // - // ``` - IpPrefix bool `protobuf:"varint,29,opt,name=ip_prefix,json=ipPrefix,oneof"` -} - -type StringRules_Ipv4Prefix struct { - // `ipv4_prefix` specifies that the field value must be a valid IPv4 - // prefix, for example "192.168.0.0/16". - // - // The prefix must have all zeros for the unmasked bits. For example, - // "192.168.0.0/16" designates the left-most 16 bits for the prefix, - // and the remaining 16 bits must be zero. - // - // If the field value isn't a valid IPv4 prefix, an error message - // will be generated. - // - // ```proto - // - // message MyString { - // // must be a valid IPv4 prefix - // string value = 1 [(buf.validate.field).string.ipv4_prefix = true]; - // } - // - // ``` - Ipv4Prefix bool `protobuf:"varint,30,opt,name=ipv4_prefix,json=ipv4Prefix,oneof"` -} - -type StringRules_Ipv6Prefix struct { - // `ipv6_prefix` specifies that the field value must be a valid IPv6 prefix—for - // example, "2001:0DB8:ABCD:0012::0/64". - // - // The prefix must have all zeros for the unmasked bits. For example, - // "2001:0DB8:ABCD:0012::0/64" designates the left-most 64 bits for the - // prefix, and the remaining 64 bits must be zero. - // - // If the field value is not a valid IPv6 prefix, an error message will be - // generated. - // - // ```proto - // - // message MyString { - // // must be a valid IPv6 prefix - // string value = 1 [(buf.validate.field).string.ipv6_prefix = true]; - // } - // - // ``` - Ipv6Prefix bool `protobuf:"varint,31,opt,name=ipv6_prefix,json=ipv6Prefix,oneof"` -} - -type StringRules_HostAndPort struct { - // `host_and_port` specifies that the field value must be a valid host/port - // pair—for example, "example.com:8080". - // - // The host can be one of: - // - An IPv4 address in dotted decimal format—for example, "192.168.5.21". - // - An IPv6 address enclosed in square brackets—for example, "[2001:0DB8:ABCD:0012::F1]". - // - A hostname—for example, "example.com". - // - // The port is separated by a colon. It must be non-empty, with a decimal number - // in the range of 0-65535, inclusive. - HostAndPort bool `protobuf:"varint,32,opt,name=host_and_port,json=hostAndPort,oneof"` -} - -type StringRules_Ulid struct { - // `ulid` specifies that the field value must be a valid ULID (Universally Unique - // Lexicographically Sortable Identifier) as defined by the [ULID specification](https://github.com/ulid/spec). - // If the field value isn't a valid ULID, an error message will be generated. - // - // ```proto - // - // message MyString { - // // must be a valid ULID - // string value = 1 [(buf.validate.field).string.ulid = true]; - // } - // - // ``` - Ulid bool `protobuf:"varint,35,opt,name=ulid,oneof"` -} - -type StringRules_ProtobufFqn struct { - // `protobuf_fqn` specifies that the field value must be a valid fully-qualified - // Protobuf name as defined by the [Protobuf Language Specification](https://protobuf.com/docs/language-spec). - // - // A fully-qualified Protobuf name is a dot-separated list of Protobuf identifiers, - // where each identifier starts with a letter or underscore and is followed by zero or - // more letters, underscores, or digits. - // - // Examples: "buf.validate", "google.protobuf.Timestamp", "my_package.MyMessage". - // - // Note: historically, fully-qualified Protobuf names were represented with a leading - // dot (for example, ".buf.validate.StringRules"). Modern Protobuf does not use the - // leading dot, and most fully-qualified names are represented without it. Use - // `protobuf_dot_fqn` if a leading dot is required. - // - // If the field value isn't a valid fully-qualified Protobuf name, an error message - // will be generated. - // - // ```proto - // - // message MyString { - // // value must be a valid fully-qualified Protobuf name - // string value = 1 [(buf.validate.field).string.protobuf_fqn = true]; - // } - // - // ``` - ProtobufFqn bool `protobuf:"varint,37,opt,name=protobuf_fqn,json=protobufFqn,oneof"` -} - -type StringRules_ProtobufDotFqn struct { - // `protobuf_dot_fqn` specifies that the field value must be a valid fully-qualified - // Protobuf name with a leading dot, as defined by the - // [Protobuf Language Specification](https://protobuf.com/docs/language-spec). - // - // A fully-qualified Protobuf name with a leading dot is a dot followed by a - // dot-separated list of Protobuf identifiers, where each identifier starts with a - // letter or underscore and is followed by zero or more letters, underscores, or - // digits. - // - // Examples: ".buf.validate", ".google.protobuf.Timestamp", ".my_package.MyMessage". - // - // Note: this is the historical representation of fully-qualified Protobuf names, - // where a leading dot denotes an absolute reference. Modern Protobuf does not use - // the leading dot, and most fully-qualified names are represented without it. Most - // users will want to use `protobuf_fqn` instead. - // - // If the field value isn't a valid fully-qualified Protobuf name with a leading dot, - // an error message will be generated. - // - // ```proto - // - // message MyString { - // // value must be a valid fully-qualified Protobuf name with a leading dot - // string value = 1 [(buf.validate.field).string.protobuf_dot_fqn = true]; - // } - // - // ``` - ProtobufDotFqn bool `protobuf:"varint,38,opt,name=protobuf_dot_fqn,json=protobufDotFqn,oneof"` -} - -type StringRules_WellKnownRegex struct { - // `well_known_regex` specifies a common well-known pattern - // defined as a regex. If the field value doesn't match the well-known - // regex, an error message will be generated. - // - // ```proto - // - // message MyString { - // // must be a valid HTTP header value - // string value = 1 [(buf.validate.field).string.well_known_regex = KNOWN_REGEX_HTTP_HEADER_VALUE]; - // } - // - // ``` - // - // #### KnownRegex - // - // `well_known_regex` contains some well-known patterns. - // - // | Name | Number | Description | - // |-------------------------------|--------|-------------------------------------------| - // | KNOWN_REGEX_UNSPECIFIED | 0 | | - // | KNOWN_REGEX_HTTP_HEADER_NAME | 1 | HTTP header name as defined by [RFC 7230](https://datatracker.ietf.org/doc/html/rfc7230#section-3.2) | - // | KNOWN_REGEX_HTTP_HEADER_VALUE | 2 | HTTP header value as defined by [RFC 7230](https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.4) | - WellKnownRegex KnownRegex `protobuf:"varint,24,opt,name=well_known_regex,json=wellKnownRegex,enum=buf.validate.KnownRegex,oneof"` -} - -func (*StringRules_Email) isStringRules_WellKnown() {} - -func (*StringRules_Hostname) isStringRules_WellKnown() {} - -func (*StringRules_Ip) isStringRules_WellKnown() {} - -func (*StringRules_Ipv4) isStringRules_WellKnown() {} - -func (*StringRules_Ipv6) isStringRules_WellKnown() {} - -func (*StringRules_Uri) isStringRules_WellKnown() {} - -func (*StringRules_UriRef) isStringRules_WellKnown() {} - -func (*StringRules_Address) isStringRules_WellKnown() {} - -func (*StringRules_Uuid) isStringRules_WellKnown() {} - -func (*StringRules_Tuuid) isStringRules_WellKnown() {} - -func (*StringRules_IpWithPrefixlen) isStringRules_WellKnown() {} - -func (*StringRules_Ipv4WithPrefixlen) isStringRules_WellKnown() {} - -func (*StringRules_Ipv6WithPrefixlen) isStringRules_WellKnown() {} - -func (*StringRules_IpPrefix) isStringRules_WellKnown() {} - -func (*StringRules_Ipv4Prefix) isStringRules_WellKnown() {} - -func (*StringRules_Ipv6Prefix) isStringRules_WellKnown() {} - -func (*StringRules_HostAndPort) isStringRules_WellKnown() {} - -func (*StringRules_Ulid) isStringRules_WellKnown() {} - -func (*StringRules_ProtobufFqn) isStringRules_WellKnown() {} - -func (*StringRules_ProtobufDotFqn) isStringRules_WellKnown() {} - -func (*StringRules_WellKnownRegex) isStringRules_WellKnown() {} - -// BytesRules describe the rules applied to `bytes` values. These rules -// may also be applied to the `google.protobuf.BytesValue` Well-Known-Type. -type BytesRules struct { - state protoimpl.MessageState `protogen:"open.v1"` - // `const` requires the field value to exactly match the specified bytes - // value. If the field value doesn't match, an error message is generated. - // - // ```proto - // - // message MyBytes { - // // must be "\x01\x02\x03\x04" - // bytes value = 1 [(buf.validate.field).bytes.const = "\x01\x02\x03\x04"]; - // } - // - // ``` - Const []byte `protobuf:"bytes,1,opt,name=const" json:"const,omitempty"` - // `len` requires the field value to have the specified length in bytes. - // If the field value doesn't match, an error message is generated. - // - // ```proto - // - // message MyBytes { - // // value length must be 4 bytes. - // optional bytes value = 1 [(buf.validate.field).bytes.len = 4]; - // } - // - // ``` - Len *uint64 `protobuf:"varint,13,opt,name=len" json:"len,omitempty"` - // `min_len` requires the field value to have at least the specified minimum - // length in bytes. - // If the field value doesn't meet the requirement, an error message is generated. - // - // ```proto - // - // message MyBytes { - // // value length must be at least 2 bytes. - // optional bytes value = 1 [(buf.validate.field).bytes.min_len = 2]; - // } - // - // ``` - MinLen *uint64 `protobuf:"varint,2,opt,name=min_len,json=minLen" json:"min_len,omitempty"` - // `max_len` requires the field value to have at most the specified maximum - // length in bytes. - // If the field value exceeds the requirement, an error message is generated. - // - // ```proto - // - // message MyBytes { - // // must be at most 6 bytes. - // optional bytes value = 1 [(buf.validate.field).bytes.max_len = 6]; - // } - // - // ``` - MaxLen *uint64 `protobuf:"varint,3,opt,name=max_len,json=maxLen" json:"max_len,omitempty"` - // `pattern` requires the field value to match the specified regular - // expression ([RE2 syntax](https://github.com/google/re2/wiki/Syntax)). - // The value of the field must be valid UTF-8 or validation will fail with a - // runtime error. - // If the field value doesn't match the pattern, an error message is generated. - // - // ```proto - // - // message MyBytes { - // // value must match regex pattern "^[a-zA-Z0-9]+$". - // optional bytes value = 1 [(buf.validate.field).bytes.pattern = "^[a-zA-Z0-9]+$"]; - // } - // - // ``` - Pattern *string `protobuf:"bytes,4,opt,name=pattern" json:"pattern,omitempty"` - // `prefix` requires the field value to have the specified bytes at the - // beginning of the string. - // If the field value doesn't meet the requirement, an error message is generated. - // - // ```proto - // - // message MyBytes { - // // value does not have prefix \x01\x02 - // optional bytes value = 1 [(buf.validate.field).bytes.prefix = "\x01\x02"]; - // } - // - // ``` - Prefix []byte `protobuf:"bytes,5,opt,name=prefix" json:"prefix,omitempty"` - // `suffix` requires the field value to have the specified bytes at the end - // of the string. - // If the field value doesn't meet the requirement, an error message is generated. - // - // ```proto - // - // message MyBytes { - // // value does not have suffix \x03\x04 - // optional bytes value = 1 [(buf.validate.field).bytes.suffix = "\x03\x04"]; - // } - // - // ``` - Suffix []byte `protobuf:"bytes,6,opt,name=suffix" json:"suffix,omitempty"` - // `contains` requires the field value to have the specified bytes anywhere in - // the string. - // If the field value doesn't meet the requirement, an error message is generated. - // - // ```proto - // - // message MyBytes { - // // value does not contain \x02\x03 - // optional bytes value = 1 [(buf.validate.field).bytes.contains = "\x02\x03"]; - // } - // - // ``` - Contains []byte `protobuf:"bytes,7,opt,name=contains" json:"contains,omitempty"` - // `in` requires the field value to be equal to one of the specified - // values. If the field value doesn't match any of the specified values, an - // error message is generated. - // - // ```proto - // - // message MyBytes { - // // value must in ["\x01\x02", "\x02\x03", "\x03\x04"] - // optional bytes value = 1 [(buf.validate.field).bytes.in = {"\x01\x02", "\x02\x03", "\x03\x04"}]; - // } - // - // ``` - In [][]byte `protobuf:"bytes,8,rep,name=in" json:"in,omitempty"` - // `not_in` requires the field value to be not equal to any of the specified - // values. - // If the field value matches any of the specified values, an error message is - // generated. - // - // ```proto - // - // message MyBytes { - // // value must not in ["\x01\x02", "\x02\x03", "\x03\x04"] - // optional bytes value = 1 [(buf.validate.field).bytes.not_in = {"\x01\x02", "\x02\x03", "\x03\x04"}]; - // } - // - // ``` - NotIn [][]byte `protobuf:"bytes,9,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - // WellKnown rules provide advanced rules against common byte - // patterns - // - // Types that are valid to be assigned to WellKnown: - // - // *BytesRules_Ip - // *BytesRules_Ipv4 - // *BytesRules_Ipv6 - // *BytesRules_Uuid - WellKnown isBytesRules_WellKnown `protobuf_oneof:"well_known"` - // `example` specifies values that the field may have. These values SHOULD - // conform to other rules. `example` values will not impact validation - // but may be used as helpful guidance on how to populate the given field. - // - // ```proto - // - // message MyBytes { - // bytes value = 1 [ - // (buf.validate.field).bytes.example = "\x01\x02", - // (buf.validate.field).bytes.example = "\x02\x03" - // ]; - // } - // - // ``` - Example [][]byte `protobuf:"bytes,14,rep,name=example" json:"example,omitempty"` - extensionFields protoimpl.ExtensionFields - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *BytesRules) Reset() { - *x = BytesRules{} - mi := &file_buf_validate_validate_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *BytesRules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BytesRules) ProtoMessage() {} - -func (x *BytesRules) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[20] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BytesRules.ProtoReflect.Descriptor instead. -func (*BytesRules) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{20} -} - -func (x *BytesRules) GetConst() []byte { - if x != nil { - return x.Const - } - return nil -} - -func (x *BytesRules) GetLen() uint64 { - if x != nil && x.Len != nil { - return *x.Len - } - return 0 -} - -func (x *BytesRules) GetMinLen() uint64 { - if x != nil && x.MinLen != nil { - return *x.MinLen - } - return 0 -} - -func (x *BytesRules) GetMaxLen() uint64 { - if x != nil && x.MaxLen != nil { - return *x.MaxLen - } - return 0 -} - -func (x *BytesRules) GetPattern() string { - if x != nil && x.Pattern != nil { - return *x.Pattern - } - return "" -} - -func (x *BytesRules) GetPrefix() []byte { - if x != nil { - return x.Prefix - } - return nil -} - -func (x *BytesRules) GetSuffix() []byte { - if x != nil { - return x.Suffix - } - return nil -} - -func (x *BytesRules) GetContains() []byte { - if x != nil { - return x.Contains - } - return nil -} - -func (x *BytesRules) GetIn() [][]byte { - if x != nil { - return x.In - } - return nil -} - -func (x *BytesRules) GetNotIn() [][]byte { - if x != nil { - return x.NotIn - } - return nil -} - -func (x *BytesRules) GetWellKnown() isBytesRules_WellKnown { - if x != nil { - return x.WellKnown - } - return nil -} - -func (x *BytesRules) GetIp() bool { - if x != nil { - if x, ok := x.WellKnown.(*BytesRules_Ip); ok { - return x.Ip - } - } - return false -} - -func (x *BytesRules) GetIpv4() bool { - if x != nil { - if x, ok := x.WellKnown.(*BytesRules_Ipv4); ok { - return x.Ipv4 - } - } - return false -} - -func (x *BytesRules) GetIpv6() bool { - if x != nil { - if x, ok := x.WellKnown.(*BytesRules_Ipv6); ok { - return x.Ipv6 - } - } - return false -} - -func (x *BytesRules) GetUuid() bool { - if x != nil { - if x, ok := x.WellKnown.(*BytesRules_Uuid); ok { - return x.Uuid - } - } - return false -} - -func (x *BytesRules) GetExample() [][]byte { - if x != nil { - return x.Example - } - return nil -} - -type isBytesRules_WellKnown interface { - isBytesRules_WellKnown() -} - -type BytesRules_Ip struct { - // `ip` ensures that the field `value` is a valid IP address (v4 or v6) in byte format. - // If the field value doesn't meet this rule, an error message is generated. - // - // ```proto - // - // message MyBytes { - // // must be a valid IP address - // optional bytes value = 1 [(buf.validate.field).bytes.ip = true]; - // } - // - // ``` - Ip bool `protobuf:"varint,10,opt,name=ip,oneof"` -} - -type BytesRules_Ipv4 struct { - // `ipv4` ensures that the field `value` is a valid IPv4 address in byte format. - // If the field value doesn't meet this rule, an error message is generated. - // - // ```proto - // - // message MyBytes { - // // must be a valid IPv4 address - // optional bytes value = 1 [(buf.validate.field).bytes.ipv4 = true]; - // } - // - // ``` - Ipv4 bool `protobuf:"varint,11,opt,name=ipv4,oneof"` -} - -type BytesRules_Ipv6 struct { - // `ipv6` ensures that the field `value` is a valid IPv6 address in byte format. - // If the field value doesn't meet this rule, an error message is generated. - // ```proto - // - // message MyBytes { - // // must be a valid IPv6 address - // optional bytes value = 1 [(buf.validate.field).bytes.ipv6 = true]; - // } - // - // ``` - Ipv6 bool `protobuf:"varint,12,opt,name=ipv6,oneof"` -} - -type BytesRules_Uuid struct { - // `uuid` ensures that the field value encodes 128-bit UUID data as defined - // by [RFC 4122](https://datatracker.ietf.org/doc/html/rfc4122#section-4.1.2). - // The field must contain exactly 16 bytes representing the UUID. If the - // field value isn't a valid UUID, an error message will be generated. - // - // ```proto - // - // message MyBytes { - // // must be a valid UUID - // optional bytes value = 1 [(buf.validate.field).bytes.uuid = true]; - // } - // - // ``` - Uuid bool `protobuf:"varint,15,opt,name=uuid,oneof"` -} - -func (*BytesRules_Ip) isBytesRules_WellKnown() {} - -func (*BytesRules_Ipv4) isBytesRules_WellKnown() {} - -func (*BytesRules_Ipv6) isBytesRules_WellKnown() {} - -func (*BytesRules_Uuid) isBytesRules_WellKnown() {} - -// EnumRules describe the rules applied to `enum` values. -type EnumRules struct { - state protoimpl.MessageState `protogen:"open.v1"` - // `const` requires the field value to exactly match the specified enum value. - // If the field value doesn't match, an error message is generated. - // - // ```proto - // - // enum MyEnum { - // MY_ENUM_UNSPECIFIED = 0; - // MY_ENUM_VALUE1 = 1; - // MY_ENUM_VALUE2 = 2; - // } - // - // message MyMessage { - // // The field `value` must be exactly MY_ENUM_VALUE1. - // MyEnum value = 1 [(buf.validate.field).enum.const = 1]; - // } - // - // ``` - Const *int32 `protobuf:"varint,1,opt,name=const" json:"const,omitempty"` - // `defined_only` requires the field value to be one of the defined values for - // this enum, failing on any undefined value. - // - // ```proto - // - // enum MyEnum { - // MY_ENUM_UNSPECIFIED = 0; - // MY_ENUM_VALUE1 = 1; - // MY_ENUM_VALUE2 = 2; - // } - // - // message MyMessage { - // // The field `value` must be a defined value of MyEnum. - // MyEnum value = 1 [(buf.validate.field).enum.defined_only = true]; - // } - // - // ``` - DefinedOnly *bool `protobuf:"varint,2,opt,name=defined_only,json=definedOnly" json:"defined_only,omitempty"` - // `in` requires the field value to be equal to one of the - // specified enum values. If the field value doesn't match any of the - // specified values, an error message is generated. - // - // ```proto - // - // enum MyEnum { - // MY_ENUM_UNSPECIFIED = 0; - // MY_ENUM_VALUE1 = 1; - // MY_ENUM_VALUE2 = 2; - // } - // - // message MyMessage { - // // The field `value` must be equal to one of the specified values. - // MyEnum value = 1 [(buf.validate.field).enum = { in: [1, 2]}]; - // } - // - // ``` - In []int32 `protobuf:"varint,3,rep,name=in" json:"in,omitempty"` - // `not_in` requires the field value to be not equal to any of the - // specified enum values. If the field value matches one of the specified - // values, an error message is generated. - // - // ```proto - // - // enum MyEnum { - // MY_ENUM_UNSPECIFIED = 0; - // MY_ENUM_VALUE1 = 1; - // MY_ENUM_VALUE2 = 2; - // } - // - // message MyMessage { - // // The field `value` must not be equal to any of the specified values. - // MyEnum value = 1 [(buf.validate.field).enum = { not_in: [1, 2]}]; - // } - // - // ``` - NotIn []int32 `protobuf:"varint,4,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - // `example` specifies values that the field may have. These values SHOULD - // conform to other rules. `example` values will not impact validation - // but may be used as helpful guidance on how to populate the given field. - // - // ```proto - // - // enum MyEnum { - // MY_ENUM_UNSPECIFIED = 0; - // MY_ENUM_VALUE1 = 1; - // MY_ENUM_VALUE2 = 2; - // } - // - // message MyMessage { - // (buf.validate.field).enum.example = 1, - // (buf.validate.field).enum.example = 2 - // } - // - // ``` - Example []int32 `protobuf:"varint,5,rep,name=example" json:"example,omitempty"` - extensionFields protoimpl.ExtensionFields - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *EnumRules) Reset() { - *x = EnumRules{} - mi := &file_buf_validate_validate_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *EnumRules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*EnumRules) ProtoMessage() {} - -func (x *EnumRules) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[21] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use EnumRules.ProtoReflect.Descriptor instead. -func (*EnumRules) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{21} -} - -func (x *EnumRules) GetConst() int32 { - if x != nil && x.Const != nil { - return *x.Const - } - return 0 -} - -func (x *EnumRules) GetDefinedOnly() bool { - if x != nil && x.DefinedOnly != nil { - return *x.DefinedOnly - } - return false -} - -func (x *EnumRules) GetIn() []int32 { - if x != nil { - return x.In - } - return nil -} - -func (x *EnumRules) GetNotIn() []int32 { - if x != nil { - return x.NotIn - } - return nil -} - -func (x *EnumRules) GetExample() []int32 { - if x != nil { - return x.Example - } - return nil -} - -// RepeatedRules describe the rules applied to `repeated` values. -type RepeatedRules struct { - state protoimpl.MessageState `protogen:"open.v1"` - // `min_items` requires that this field must contain at least the specified - // minimum number of items. - // - // Note that `min_items = 1` is equivalent to setting a field as `required`. - // - // ```proto - // - // message MyRepeated { - // // value must contain at least 2 items - // repeated string value = 1 [(buf.validate.field).repeated.min_items = 2]; - // } - // - // ``` - MinItems *uint64 `protobuf:"varint,1,opt,name=min_items,json=minItems" json:"min_items,omitempty"` - // `max_items` denotes that this field must not exceed a - // certain number of items as the upper limit. If the field contains more - // items than specified, an error message will be generated, requiring the - // field to maintain no more than the specified number of items. - // - // ```proto - // - // message MyRepeated { - // // value must contain no more than 3 item(s) - // repeated string value = 1 [(buf.validate.field).repeated.max_items = 3]; - // } - // - // ``` - MaxItems *uint64 `protobuf:"varint,2,opt,name=max_items,json=maxItems" json:"max_items,omitempty"` - // `unique` indicates that all elements in this field must - // be unique. This rule is strictly applicable to scalar and enum - // types, with message types not being supported. - // - // ```proto - // - // message MyRepeated { - // // repeated value must contain unique items - // repeated string value = 1 [(buf.validate.field).repeated.unique = true]; - // } - // - // ``` - Unique *bool `protobuf:"varint,3,opt,name=unique" json:"unique,omitempty"` - // `items` details the rules to be applied to each item - // in the field. Even for repeated message fields, validation is executed - // against each item unless `ignore` is specified. - // - // ```proto - // - // message MyRepeated { - // // The items in the field `value` must follow the specified rules. - // repeated string value = 1 [(buf.validate.field).repeated.items = { - // string: { - // min_len: 3 - // max_len: 10 - // } - // }]; - // } - // - // ``` - // - // Note that the `required` rule does not apply. Repeated items - // cannot be unset. - Items *FieldRules `protobuf:"bytes,4,opt,name=items" json:"items,omitempty"` - extensionFields protoimpl.ExtensionFields - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *RepeatedRules) Reset() { - *x = RepeatedRules{} - mi := &file_buf_validate_validate_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *RepeatedRules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RepeatedRules) ProtoMessage() {} - -func (x *RepeatedRules) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[22] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RepeatedRules.ProtoReflect.Descriptor instead. -func (*RepeatedRules) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{22} -} - -func (x *RepeatedRules) GetMinItems() uint64 { - if x != nil && x.MinItems != nil { - return *x.MinItems - } - return 0 -} - -func (x *RepeatedRules) GetMaxItems() uint64 { - if x != nil && x.MaxItems != nil { - return *x.MaxItems - } - return 0 -} - -func (x *RepeatedRules) GetUnique() bool { - if x != nil && x.Unique != nil { - return *x.Unique - } - return false -} - -func (x *RepeatedRules) GetItems() *FieldRules { - if x != nil { - return x.Items - } - return nil -} - -// MapRules describe the rules applied to `map` values. -type MapRules struct { - state protoimpl.MessageState `protogen:"open.v1"` - // Specifies the minimum number of key-value pairs allowed. If the field has - // fewer key-value pairs than specified, an error message is generated. - // - // ```proto - // - // message MyMap { - // // The field `value` must have at least 2 key-value pairs. - // map value = 1 [(buf.validate.field).map.min_pairs = 2]; - // } - // - // ``` - MinPairs *uint64 `protobuf:"varint,1,opt,name=min_pairs,json=minPairs" json:"min_pairs,omitempty"` - // Specifies the maximum number of key-value pairs allowed. If the field has - // more key-value pairs than specified, an error message is generated. - // - // ```proto - // - // message MyMap { - // // The field `value` must have at most 3 key-value pairs. - // map value = 1 [(buf.validate.field).map.max_pairs = 3]; - // } - // - // ``` - MaxPairs *uint64 `protobuf:"varint,2,opt,name=max_pairs,json=maxPairs" json:"max_pairs,omitempty"` - // Specifies the rules to be applied to each key in the field. - // - // ```proto - // - // message MyMap { - // // The keys in the field `value` must follow the specified rules. - // map value = 1 [(buf.validate.field).map.keys = { - // string: { - // min_len: 3 - // max_len: 10 - // } - // }]; - // } - // - // ``` - // - // Note that the `required` rule does not apply. Map keys cannot be unset. - Keys *FieldRules `protobuf:"bytes,4,opt,name=keys" json:"keys,omitempty"` - // Specifies the rules to be applied to the value of each key in the - // field. Message values will still have their validations evaluated unless - // `ignore` is specified. - // - // ```proto - // - // message MyMap { - // // The values in the field `value` must follow the specified rules. - // map value = 1 [(buf.validate.field).map.values = { - // string: { - // min_len: 5 - // max_len: 20 - // } - // }]; - // } - // - // ``` - // Note that the `required` rule does not apply. Map values cannot be unset. - Values *FieldRules `protobuf:"bytes,5,opt,name=values" json:"values,omitempty"` - extensionFields protoimpl.ExtensionFields - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *MapRules) Reset() { - *x = MapRules{} - mi := &file_buf_validate_validate_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *MapRules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MapRules) ProtoMessage() {} - -func (x *MapRules) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[23] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MapRules.ProtoReflect.Descriptor instead. -func (*MapRules) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{23} -} - -func (x *MapRules) GetMinPairs() uint64 { - if x != nil && x.MinPairs != nil { - return *x.MinPairs - } - return 0 -} - -func (x *MapRules) GetMaxPairs() uint64 { - if x != nil && x.MaxPairs != nil { - return *x.MaxPairs - } - return 0 -} - -func (x *MapRules) GetKeys() *FieldRules { - if x != nil { - return x.Keys - } - return nil -} - -func (x *MapRules) GetValues() *FieldRules { - if x != nil { - return x.Values - } - return nil -} - -// AnyRules describe rules applied exclusively to the `google.protobuf.Any` well-known type. -type AnyRules struct { - state protoimpl.MessageState `protogen:"open.v1"` - // `in` requires the field's `type_url` to be equal to one of the - // specified values. If it doesn't match any of the specified values, an error - // message is generated. - // - // ```proto - // - // message MyAny { - // // The `value` field must have a `type_url` equal to one of the specified values. - // google.protobuf.Any value = 1 [(buf.validate.field).any = { - // in: ["type.googleapis.com/MyType1", "type.googleapis.com/MyType2"] - // }]; - // } - // - // ``` - In []string `protobuf:"bytes,2,rep,name=in" json:"in,omitempty"` - // `not_in` requires the field's type_url to be not equal to any of the specified values. If it matches any of the specified values, an error message is generated. - // - // ```proto - // - // message MyAny { - // // The `value` field must not have a `type_url` equal to any of the specified values. - // google.protobuf.Any value = 1 [(buf.validate.field).any = { - // not_in: ["type.googleapis.com/ForbiddenType1", "type.googleapis.com/ForbiddenType2"] - // }]; - // } - // - // ``` - NotIn []string `protobuf:"bytes,3,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *AnyRules) Reset() { - *x = AnyRules{} - mi := &file_buf_validate_validate_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *AnyRules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AnyRules) ProtoMessage() {} - -func (x *AnyRules) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[24] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AnyRules.ProtoReflect.Descriptor instead. -func (*AnyRules) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{24} -} - -func (x *AnyRules) GetIn() []string { - if x != nil { - return x.In - } - return nil -} - -func (x *AnyRules) GetNotIn() []string { - if x != nil { - return x.NotIn - } - return nil -} - -// DurationRules describe the rules applied exclusively to the `google.protobuf.Duration` well-known type. -type DurationRules struct { - state protoimpl.MessageState `protogen:"open.v1"` - // `const` dictates that the field must match the specified value of the `google.protobuf.Duration` type exactly. - // If the field's value deviates from the specified value, an error message - // will be generated. - // - // ```proto - // - // message MyDuration { - // // value must equal 5s - // google.protobuf.Duration value = 1 [(buf.validate.field).duration.const = "5s"]; - // } - // - // ``` - Const *durationpb.Duration `protobuf:"bytes,2,opt,name=const" json:"const,omitempty"` - // Types that are valid to be assigned to LessThan: - // - // *DurationRules_Lt - // *DurationRules_Lte - LessThan isDurationRules_LessThan `protobuf_oneof:"less_than"` - // Types that are valid to be assigned to GreaterThan: - // - // *DurationRules_Gt - // *DurationRules_Gte - GreaterThan isDurationRules_GreaterThan `protobuf_oneof:"greater_than"` - // `in` asserts that the field must be equal to one of the specified values of the `google.protobuf.Duration` type. - // If the field's value doesn't correspond to any of the specified values, - // an error message will be generated. - // - // ```proto - // - // message MyDuration { - // // must be in list [1s, 2s, 3s] - // google.protobuf.Duration value = 1 [(buf.validate.field).duration.in = ["1s", "2s", "3s"]]; - // } - // - // ``` - In []*durationpb.Duration `protobuf:"bytes,7,rep,name=in" json:"in,omitempty"` - // `not_in` denotes that the field must not be equal to - // any of the specified values of the `google.protobuf.Duration` type. - // If the field's value matches any of these values, an error message will be - // generated. - // - // ```proto - // - // message MyDuration { - // // value must not be in list [1s, 2s, 3s] - // google.protobuf.Duration value = 1 [(buf.validate.field).duration.not_in = ["1s", "2s", "3s"]]; - // } - // - // ``` - NotIn []*durationpb.Duration `protobuf:"bytes,8,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - // `example` specifies values that the field may have. These values SHOULD - // conform to other rules. `example` values will not impact validation - // but may be used as helpful guidance on how to populate the given field. - // - // ```proto - // - // message MyDuration { - // google.protobuf.Duration value = 1 [ - // (buf.validate.field).duration.example = { seconds: 1 }, - // (buf.validate.field).duration.example = { seconds: 2 }, - // ]; - // } - // - // ``` - Example []*durationpb.Duration `protobuf:"bytes,9,rep,name=example" json:"example,omitempty"` - extensionFields protoimpl.ExtensionFields - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *DurationRules) Reset() { - *x = DurationRules{} - mi := &file_buf_validate_validate_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *DurationRules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DurationRules) ProtoMessage() {} - -func (x *DurationRules) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[25] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DurationRules.ProtoReflect.Descriptor instead. -func (*DurationRules) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{25} -} - -func (x *DurationRules) GetConst() *durationpb.Duration { - if x != nil { - return x.Const - } - return nil -} - -func (x *DurationRules) GetLessThan() isDurationRules_LessThan { - if x != nil { - return x.LessThan - } - return nil -} - -func (x *DurationRules) GetLt() *durationpb.Duration { - if x != nil { - if x, ok := x.LessThan.(*DurationRules_Lt); ok { - return x.Lt - } - } - return nil -} - -func (x *DurationRules) GetLte() *durationpb.Duration { - if x != nil { - if x, ok := x.LessThan.(*DurationRules_Lte); ok { - return x.Lte - } - } - return nil -} - -func (x *DurationRules) GetGreaterThan() isDurationRules_GreaterThan { - if x != nil { - return x.GreaterThan - } - return nil -} - -func (x *DurationRules) GetGt() *durationpb.Duration { - if x != nil { - if x, ok := x.GreaterThan.(*DurationRules_Gt); ok { - return x.Gt - } - } - return nil -} - -func (x *DurationRules) GetGte() *durationpb.Duration { - if x != nil { - if x, ok := x.GreaterThan.(*DurationRules_Gte); ok { - return x.Gte - } - } - return nil -} - -func (x *DurationRules) GetIn() []*durationpb.Duration { - if x != nil { - return x.In - } - return nil -} - -func (x *DurationRules) GetNotIn() []*durationpb.Duration { - if x != nil { - return x.NotIn - } - return nil -} - -func (x *DurationRules) GetExample() []*durationpb.Duration { - if x != nil { - return x.Example - } - return nil -} - -type isDurationRules_LessThan interface { - isDurationRules_LessThan() -} - -type DurationRules_Lt struct { - // `lt` stipulates that the field must be less than the specified value of the `google.protobuf.Duration` type, - // exclusive. If the field's value is greater than or equal to the specified - // value, an error message will be generated. - // - // ```proto - // - // message MyDuration { - // // must be less than 5s - // google.protobuf.Duration value = 1 [(buf.validate.field).duration.lt = "5s"]; - // } - // - // ``` - Lt *durationpb.Duration `protobuf:"bytes,3,opt,name=lt,oneof"` -} - -type DurationRules_Lte struct { - // `lte` indicates that the field must be less than or equal to the specified - // value of the `google.protobuf.Duration` type, inclusive. If the field's value is greater than the specified value, - // an error message will be generated. - // - // ```proto - // - // message MyDuration { - // // must be less than or equal to 10s - // google.protobuf.Duration value = 1 [(buf.validate.field).duration.lte = "10s"]; - // } - // - // ``` - Lte *durationpb.Duration `protobuf:"bytes,4,opt,name=lte,oneof"` -} - -func (*DurationRules_Lt) isDurationRules_LessThan() {} - -func (*DurationRules_Lte) isDurationRules_LessThan() {} - -type isDurationRules_GreaterThan interface { - isDurationRules_GreaterThan() -} - -type DurationRules_Gt struct { - // `gt` requires the duration field value to be greater than the specified - // value (exclusive). If the value of `gt` is larger than a specified `lt` - // or `lte`, the range is reversed, and the field value must be outside the - // specified range. If the field value doesn't meet the required conditions, - // an error message is generated. - // - // ```proto - // - // message MyDuration { - // // duration must be greater than 5s [duration.gt] - // google.protobuf.Duration value = 1 [(buf.validate.field).duration.gt = { seconds: 5 }]; - // - // // duration must be greater than 5s and less than 10s [duration.gt_lt] - // google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gt: { seconds: 5 }, lt: { seconds: 10 } }]; - // - // // duration must be greater than 10s or less than 5s [duration.gt_lt_exclusive] - // google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gt: { seconds: 10 }, lt: { seconds: 5 } }]; - // } - // - // ``` - Gt *durationpb.Duration `protobuf:"bytes,5,opt,name=gt,oneof"` -} - -type DurationRules_Gte struct { - // `gte` requires the duration field value to be greater than or equal to the - // specified value (exclusive). If the value of `gte` is larger than a - // specified `lt` or `lte`, the range is reversed, and the field value must - // be outside the specified range. If the field value doesn't meet the - // required conditions, an error message is generated. - // - // ```proto - // - // message MyDuration { - // // duration must be greater than or equal to 5s [duration.gte] - // google.protobuf.Duration value = 1 [(buf.validate.field).duration.gte = { seconds: 5 }]; - // - // // duration must be greater than or equal to 5s and less than 10s [duration.gte_lt] - // google.protobuf.Duration another_value = 2 [(buf.validate.field).duration = { gte: { seconds: 5 }, lt: { seconds: 10 } }]; - // - // // duration must be greater than or equal to 10s or less than 5s [duration.gte_lt_exclusive] - // google.protobuf.Duration other_value = 3 [(buf.validate.field).duration = { gte: { seconds: 10 }, lt: { seconds: 5 } }]; - // } - // - // ``` - Gte *durationpb.Duration `protobuf:"bytes,6,opt,name=gte,oneof"` -} - -func (*DurationRules_Gt) isDurationRules_GreaterThan() {} - -func (*DurationRules_Gte) isDurationRules_GreaterThan() {} - -// FieldMaskRules describe rules applied exclusively to the `google.protobuf.FieldMask` well-known type. -type FieldMaskRules struct { - state protoimpl.MessageState `protogen:"open.v1"` - // `const` dictates that the field must match the specified value of the `google.protobuf.FieldMask` type exactly. - // If the field's value deviates from the specified value, an error message - // will be generated. - // - // ```proto - // - // message MyFieldMask { - // // value must equal ["a"] - // google.protobuf.FieldMask value = 1 [(buf.validate.field).field_mask.const = { - // paths: ["a"] - // }]; - // } - // - // ``` - Const *fieldmaskpb.FieldMask `protobuf:"bytes,1,opt,name=const" json:"const,omitempty"` - // `in` requires the field value to only contain paths matching specified - // values or their subpaths. - // If any of the field value's paths doesn't match the rule, - // an error message is generated. - // See: https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask - // - // ```proto - // - // message MyFieldMask { - // // The `value` FieldMask must only contain paths listed in `in`. - // google.protobuf.FieldMask value = 1 [(buf.validate.field).field_mask = { - // in: ["a", "b", "c.a"] - // }]; - // } - // - // ``` - In []string `protobuf:"bytes,2,rep,name=in" json:"in,omitempty"` - // `not_in` requires the field value to not contain paths matching specified - // values or their subpaths. - // If any of the field value's paths matches the rule, - // an error message is generated. - // See: https://protobuf.dev/reference/protobuf/google.protobuf/#field-mask - // - // ```proto - // - // message MyFieldMask { - // // The `value` FieldMask shall not contain paths listed in `not_in`. - // google.protobuf.FieldMask value = 1 [(buf.validate.field).field_mask = { - // not_in: ["forbidden", "immutable", "c.a"] - // }]; - // } - // - // ``` - NotIn []string `protobuf:"bytes,3,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - // `example` specifies values that the field may have. These values SHOULD - // conform to other rules. `example` values will not impact validation - // but may be used as helpful guidance on how to populate the given field. - // - // ```proto - // - // message MyFieldMask { - // google.protobuf.FieldMask value = 1 [ - // (buf.validate.field).field_mask.example = { paths: ["a", "b"] }, - // (buf.validate.field).field_mask.example = { paths: ["c.a", "d"] }, - // ]; - // } - // - // ``` - Example []*fieldmaskpb.FieldMask `protobuf:"bytes,4,rep,name=example" json:"example,omitempty"` - extensionFields protoimpl.ExtensionFields - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *FieldMaskRules) Reset() { - *x = FieldMaskRules{} - mi := &file_buf_validate_validate_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *FieldMaskRules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FieldMaskRules) ProtoMessage() {} - -func (x *FieldMaskRules) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[26] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FieldMaskRules.ProtoReflect.Descriptor instead. -func (*FieldMaskRules) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{26} -} - -func (x *FieldMaskRules) GetConst() *fieldmaskpb.FieldMask { - if x != nil { - return x.Const - } - return nil -} - -func (x *FieldMaskRules) GetIn() []string { - if x != nil { - return x.In - } - return nil -} - -func (x *FieldMaskRules) GetNotIn() []string { - if x != nil { - return x.NotIn - } - return nil -} - -func (x *FieldMaskRules) GetExample() []*fieldmaskpb.FieldMask { - if x != nil { - return x.Example - } - return nil -} - -// TimestampRules describe the rules applied exclusively to the `google.protobuf.Timestamp` well-known type. -type TimestampRules struct { - state protoimpl.MessageState `protogen:"open.v1"` - // `const` dictates that this field, of the `google.protobuf.Timestamp` type, must exactly match the specified value. If the field value doesn't correspond to the specified timestamp, an error message will be generated. - // - // ```proto - // - // message MyTimestamp { - // // value must equal 2023-05-03T10:00:00Z - // google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.const = {seconds: 1727998800}]; - // } - // - // ``` - Const *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=const" json:"const,omitempty"` - // Types that are valid to be assigned to LessThan: - // - // *TimestampRules_Lt - // *TimestampRules_Lte - // *TimestampRules_LtNow - LessThan isTimestampRules_LessThan `protobuf_oneof:"less_than"` - // Types that are valid to be assigned to GreaterThan: - // - // *TimestampRules_Gt - // *TimestampRules_Gte - // *TimestampRules_GtNow - GreaterThan isTimestampRules_GreaterThan `protobuf_oneof:"greater_than"` - // `within` specifies that this field, of the `google.protobuf.Timestamp` type, must be within the specified duration of the current time. If the field value isn't within the duration, an error message is generated. - // - // ```proto - // - // message MyTimestamp { - // // must be within 1 hour of now - // google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.within = {seconds: 3600}]; - // } - // - // ``` - Within *durationpb.Duration `protobuf:"bytes,9,opt,name=within" json:"within,omitempty"` - // `example` specifies values that the field may have. These values SHOULD - // conform to other rules. `example` values will not impact validation - // but may be used as helpful guidance on how to populate the given field. - // - // ```proto - // - // message MyTimestamp { - // google.protobuf.Timestamp value = 1 [ - // (buf.validate.field).timestamp.example = { seconds: 1672444800 }, - // (buf.validate.field).timestamp.example = { seconds: 1672531200 }, - // ]; - // } - // - // ``` - Example []*timestamppb.Timestamp `protobuf:"bytes,10,rep,name=example" json:"example,omitempty"` - extensionFields protoimpl.ExtensionFields - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *TimestampRules) Reset() { - *x = TimestampRules{} - mi := &file_buf_validate_validate_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *TimestampRules) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*TimestampRules) ProtoMessage() {} - -func (x *TimestampRules) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[27] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use TimestampRules.ProtoReflect.Descriptor instead. -func (*TimestampRules) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{27} -} - -func (x *TimestampRules) GetConst() *timestamppb.Timestamp { - if x != nil { - return x.Const - } - return nil -} - -func (x *TimestampRules) GetLessThan() isTimestampRules_LessThan { - if x != nil { - return x.LessThan - } - return nil -} - -func (x *TimestampRules) GetLt() *timestamppb.Timestamp { - if x != nil { - if x, ok := x.LessThan.(*TimestampRules_Lt); ok { - return x.Lt - } - } - return nil -} - -func (x *TimestampRules) GetLte() *timestamppb.Timestamp { - if x != nil { - if x, ok := x.LessThan.(*TimestampRules_Lte); ok { - return x.Lte - } - } - return nil -} - -func (x *TimestampRules) GetLtNow() bool { - if x != nil { - if x, ok := x.LessThan.(*TimestampRules_LtNow); ok { - return x.LtNow - } - } - return false -} - -func (x *TimestampRules) GetGreaterThan() isTimestampRules_GreaterThan { - if x != nil { - return x.GreaterThan - } - return nil -} - -func (x *TimestampRules) GetGt() *timestamppb.Timestamp { - if x != nil { - if x, ok := x.GreaterThan.(*TimestampRules_Gt); ok { - return x.Gt - } - } - return nil -} - -func (x *TimestampRules) GetGte() *timestamppb.Timestamp { - if x != nil { - if x, ok := x.GreaterThan.(*TimestampRules_Gte); ok { - return x.Gte - } - } - return nil -} - -func (x *TimestampRules) GetGtNow() bool { - if x != nil { - if x, ok := x.GreaterThan.(*TimestampRules_GtNow); ok { - return x.GtNow - } - } - return false -} - -func (x *TimestampRules) GetWithin() *durationpb.Duration { - if x != nil { - return x.Within - } - return nil -} - -func (x *TimestampRules) GetExample() []*timestamppb.Timestamp { - if x != nil { - return x.Example - } - return nil -} - -type isTimestampRules_LessThan interface { - isTimestampRules_LessThan() -} - -type TimestampRules_Lt struct { - // `lt` requires the timestamp field value to be less than the specified value (field < value). If the field value doesn't meet the required conditions, an error message is generated. - // - // ```proto - // - // message MyTimestamp { - // // timestamp must be less than '2023-01-01T00:00:00Z' [timestamp.lt] - // google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.lt = { seconds: 1672444800 }]; - // } - // - // ``` - Lt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=lt,oneof"` -} - -type TimestampRules_Lte struct { - // `lte` requires the timestamp field value to be less than or equal to the specified value (field <= value). If the field value doesn't meet the required conditions, an error message is generated. - // - // ```proto - // - // message MyTimestamp { - // // timestamp must be less than or equal to '2023-05-14T00:00:00Z' [timestamp.lte] - // google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.lte = { seconds: 1678867200 }]; - // } - // - // ``` - Lte *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=lte,oneof"` -} - -type TimestampRules_LtNow struct { - // `lt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be less than the current time. `lt_now` can only be used with the `within` rule. - // - // ```proto - // - // message MyTimestamp { - // // must be less than now - // google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.lt_now = true]; - // } - // - // ``` - LtNow bool `protobuf:"varint,7,opt,name=lt_now,json=ltNow,oneof"` -} - -func (*TimestampRules_Lt) isTimestampRules_LessThan() {} - -func (*TimestampRules_Lte) isTimestampRules_LessThan() {} - -func (*TimestampRules_LtNow) isTimestampRules_LessThan() {} - -type isTimestampRules_GreaterThan interface { - isTimestampRules_GreaterThan() -} - -type TimestampRules_Gt struct { - // `gt` requires the timestamp field value to be greater than the specified - // value (exclusive). If the value of `gt` is larger than a specified `lt` - // or `lte`, the range is reversed, and the field value must be outside the - // specified range. If the field value doesn't meet the required conditions, - // an error message is generated. - // - // ```proto - // - // message MyTimestamp { - // // timestamp must be greater than '2023-01-01T00:00:00Z' [timestamp.gt] - // google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gt = { seconds: 1672444800 }]; - // - // // timestamp must be greater than '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gt_lt] - // google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gt: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }]; - // - // // timestamp must be greater than '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gt_lt_exclusive] - // google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gt: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }]; - // } - // - // ``` - Gt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=gt,oneof"` -} - -type TimestampRules_Gte struct { - // `gte` requires the timestamp field value to be greater than or equal to the - // specified value (exclusive). If the value of `gte` is larger than a - // specified `lt` or `lte`, the range is reversed, and the field value - // must be outside the specified range. If the field value doesn't meet - // the required conditions, an error message is generated. - // - // ```proto - // - // message MyTimestamp { - // // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' [timestamp.gte] - // google.protobuf.Timestamp value = 1 [(buf.validate.field).timestamp.gte = { seconds: 1672444800 }]; - // - // // timestamp must be greater than or equal to '2023-01-01T00:00:00Z' and less than '2023-01-02T00:00:00Z' [timestamp.gte_lt] - // google.protobuf.Timestamp another_value = 2 [(buf.validate.field).timestamp = { gte: { seconds: 1672444800 }, lt: { seconds: 1672531200 } }]; - // - // // timestamp must be greater than or equal to '2023-01-02T00:00:00Z' or less than '2023-01-01T00:00:00Z' [timestamp.gte_lt_exclusive] - // google.protobuf.Timestamp other_value = 3 [(buf.validate.field).timestamp = { gte: { seconds: 1672531200 }, lt: { seconds: 1672444800 } }]; - // } - // - // ``` - Gte *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=gte,oneof"` -} - -type TimestampRules_GtNow struct { - // `gt_now` specifies that this field, of the `google.protobuf.Timestamp` type, must be greater than the current time. `gt_now` can only be used with the `within` rule. - // - // ```proto - // - // message MyTimestamp { - // // must be greater than now - // google.protobuf.Timestamp created_at = 1 [(buf.validate.field).timestamp.gt_now = true]; - // } - // - // ``` - GtNow bool `protobuf:"varint,8,opt,name=gt_now,json=gtNow,oneof"` -} - -func (*TimestampRules_Gt) isTimestampRules_GreaterThan() {} - -func (*TimestampRules_Gte) isTimestampRules_GreaterThan() {} - -func (*TimestampRules_GtNow) isTimestampRules_GreaterThan() {} - -// `Violations` is a collection of `Violation` messages. This message type is returned by -// Protovalidate when a proto message fails to meet the requirements set by the `Rule` validation rules. -// Each individual violation is represented by a `Violation` message. -type Violations struct { - state protoimpl.MessageState `protogen:"open.v1"` - // `violations` is a repeated field that contains all the `Violation` messages corresponding to the violations detected. - Violations []*Violation `protobuf:"bytes,1,rep,name=violations" json:"violations,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Violations) Reset() { - *x = Violations{} - mi := &file_buf_validate_validate_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Violations) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Violations) ProtoMessage() {} - -func (x *Violations) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[28] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Violations.ProtoReflect.Descriptor instead. -func (*Violations) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{28} -} - -func (x *Violations) GetViolations() []*Violation { - if x != nil { - return x.Violations - } - return nil -} - -// `Violation` represents a single instance where a validation rule, expressed -// as a `Rule`, was not met. It provides information about the field that -// caused the violation, the specific rule that wasn't fulfilled, and a -// human-readable error message. -// -// For example, consider the following message: -// -// ```proto -// -// message User { -// int32 age = 1 [(buf.validate.field).cel = { -// id: "user.age", -// expression: "this < 18 ? 'User must be at least 18 years old' : ''", -// }]; -// } -// -// ``` -// -// It could produce the following violation: -// -// ```json -// -// { -// "ruleId": "user.age", -// "message": "User must be at least 18 years old", -// "field": { -// "elements": [ -// { -// "fieldNumber": 1, -// "fieldName": "age", -// "fieldType": "TYPE_INT32" -// } -// ] -// }, -// "rule": { -// "elements": [ -// { -// "fieldNumber": 23, -// "fieldName": "cel", -// "fieldType": "TYPE_MESSAGE", -// "index": "0" -// } -// ] -// } -// } -// -// ``` -type Violation struct { - state protoimpl.MessageState `protogen:"open.v1"` - // `field` is a machine-readable path to the field that failed validation. - // This could be a nested field, in which case the path will include all the parent fields leading to the actual field that caused the violation. - // - // For example, consider the following message: - // - // ```proto - // - // message Message { - // bool a = 1 [(buf.validate.field).required = true]; - // } - // - // ``` - // - // It could produce the following violation: - // - // ```textproto - // - // violation { - // field { element { field_number: 1, field_name: "a", field_type: 8 } } - // ... - // } - // - // ``` - Field *FieldPath `protobuf:"bytes,5,opt,name=field" json:"field,omitempty"` - // `rule` is a machine-readable path that points to the specific rule that failed validation. - // This will be a nested field starting from the FieldRules of the field that failed validation. - // For custom rules, this will provide the path of the rule, e.g. `cel[0]`. - // - // For example, consider the following message: - // - // ```proto - // - // message Message { - // bool a = 1 [(buf.validate.field).required = true]; - // bool b = 2 [(buf.validate.field).cel = { - // id: "custom_rule", - // expression: "!this ? 'b must be true': ''" - // }] - // } - // - // ``` - // - // It could produce the following violations: - // - // ```textproto - // - // violation { - // rule { element { field_number: 25, field_name: "required", field_type: 8 } } - // ... - // } - // - // violation { - // rule { element { field_number: 23, field_name: "cel", field_type: 11, index: 0 } } - // ... - // } - // - // ``` - Rule *FieldPath `protobuf:"bytes,6,opt,name=rule" json:"rule,omitempty"` - // `rule_id` is the unique identifier of the `Rule` that was not fulfilled. - // This is the same `id` that was specified in the `Rule` message, allowing easy tracing of which rule was violated. - RuleId *string `protobuf:"bytes,2,opt,name=rule_id,json=ruleId" json:"rule_id,omitempty"` - // `message` is a human-readable error message that describes the nature of the violation. - // This can be the default error message from the violated `Rule`, or it can be a custom message that gives more context about the violation. - Message *string `protobuf:"bytes,3,opt,name=message" json:"message,omitempty"` - // `for_key` indicates whether the violation was caused by a map key, rather than a value. - ForKey *bool `protobuf:"varint,4,opt,name=for_key,json=forKey" json:"for_key,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *Violation) Reset() { - *x = Violation{} - mi := &file_buf_validate_validate_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *Violation) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Violation) ProtoMessage() {} - -func (x *Violation) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[29] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Violation.ProtoReflect.Descriptor instead. -func (*Violation) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{29} -} - -func (x *Violation) GetField() *FieldPath { - if x != nil { - return x.Field - } - return nil -} - -func (x *Violation) GetRule() *FieldPath { - if x != nil { - return x.Rule - } - return nil -} - -func (x *Violation) GetRuleId() string { - if x != nil && x.RuleId != nil { - return *x.RuleId - } - return "" -} - -func (x *Violation) GetMessage() string { - if x != nil && x.Message != nil { - return *x.Message - } - return "" -} - -func (x *Violation) GetForKey() bool { - if x != nil && x.ForKey != nil { - return *x.ForKey - } - return false -} - -// `FieldPath` provides a path to a nested protobuf field. -// -// This message provides enough information to render a dotted field path even without protobuf descriptors. -// It also provides enough information to resolve a nested field through unknown wire data. -type FieldPath struct { - state protoimpl.MessageState `protogen:"open.v1"` - // `elements` contains each element of the path, starting from the root and recursing downward. - Elements []*FieldPathElement `protobuf:"bytes,1,rep,name=elements" json:"elements,omitempty"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *FieldPath) Reset() { - *x = FieldPath{} - mi := &file_buf_validate_validate_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *FieldPath) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FieldPath) ProtoMessage() {} - -func (x *FieldPath) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[30] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FieldPath.ProtoReflect.Descriptor instead. -func (*FieldPath) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{30} -} - -func (x *FieldPath) GetElements() []*FieldPathElement { - if x != nil { - return x.Elements - } - return nil -} - -// `FieldPathElement` provides enough information to nest through a single protobuf field. -// -// If the selected field is a map or repeated field, the `subscript` value selects a specific element from it. -// A path that refers to a value nested under a map key or repeated field index will have a `subscript` value. -// The `field_type` field allows unambiguous resolution of a field even if descriptors are not available. -type FieldPathElement struct { - state protoimpl.MessageState `protogen:"open.v1"` - // `field_number` is the field number this path element refers to. - FieldNumber *int32 `protobuf:"varint,1,opt,name=field_number,json=fieldNumber" json:"field_number,omitempty"` - // `field_name` contains the field name this path element refers to. - // This can be used to display a human-readable path even if the field number is unknown. - FieldName *string `protobuf:"bytes,2,opt,name=field_name,json=fieldName" json:"field_name,omitempty"` - // `field_type` specifies the type of this field. When using reflection, this value is not needed. - // - // This value is provided to make it possible to traverse unknown fields through wire data. - // When traversing wire data, be mindful of both packed[1] and delimited[2] encoding schemes. - // - // N.B.: Although groups are deprecated, the corresponding delimited encoding scheme is not, and - // can be explicitly used in Protocol Buffers 2023 Edition. - // - // [1]: https://protobuf.dev/programming-guides/encoding/#packed - // [2]: https://protobuf.dev/programming-guides/encoding/#groups - FieldType *descriptorpb.FieldDescriptorProto_Type `protobuf:"varint,3,opt,name=field_type,json=fieldType,enum=google.protobuf.FieldDescriptorProto_Type" json:"field_type,omitempty"` - // `key_type` specifies the map key type of this field. This value is useful when traversing - // unknown fields through wire data: specifically, it allows handling the differences between - // different integer encodings. - KeyType *descriptorpb.FieldDescriptorProto_Type `protobuf:"varint,4,opt,name=key_type,json=keyType,enum=google.protobuf.FieldDescriptorProto_Type" json:"key_type,omitempty"` - // `value_type` specifies map value type of this field. This is useful if you want to display a - // value inside unknown fields through wire data. - ValueType *descriptorpb.FieldDescriptorProto_Type `protobuf:"varint,5,opt,name=value_type,json=valueType,enum=google.protobuf.FieldDescriptorProto_Type" json:"value_type,omitempty"` - // `subscript` contains a repeated index or map key, if this path element nests into a repeated or map field. - // - // Types that are valid to be assigned to Subscript: - // - // *FieldPathElement_Index - // *FieldPathElement_BoolKey - // *FieldPathElement_IntKey - // *FieldPathElement_UintKey - // *FieldPathElement_StringKey - Subscript isFieldPathElement_Subscript `protobuf_oneof:"subscript"` - unknownFields protoimpl.UnknownFields - sizeCache protoimpl.SizeCache -} - -func (x *FieldPathElement) Reset() { - *x = FieldPathElement{} - mi := &file_buf_validate_validate_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) -} - -func (x *FieldPathElement) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FieldPathElement) ProtoMessage() {} - -func (x *FieldPathElement) ProtoReflect() protoreflect.Message { - mi := &file_buf_validate_validate_proto_msgTypes[31] - if x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FieldPathElement.ProtoReflect.Descriptor instead. -func (*FieldPathElement) Descriptor() ([]byte, []int) { - return file_buf_validate_validate_proto_rawDescGZIP(), []int{31} -} - -func (x *FieldPathElement) GetFieldNumber() int32 { - if x != nil && x.FieldNumber != nil { - return *x.FieldNumber - } - return 0 -} - -func (x *FieldPathElement) GetFieldName() string { - if x != nil && x.FieldName != nil { - return *x.FieldName - } - return "" -} - -func (x *FieldPathElement) GetFieldType() descriptorpb.FieldDescriptorProto_Type { - if x != nil && x.FieldType != nil { - return *x.FieldType - } - return descriptorpb.FieldDescriptorProto_Type(1) -} - -func (x *FieldPathElement) GetKeyType() descriptorpb.FieldDescriptorProto_Type { - if x != nil && x.KeyType != nil { - return *x.KeyType - } - return descriptorpb.FieldDescriptorProto_Type(1) -} - -func (x *FieldPathElement) GetValueType() descriptorpb.FieldDescriptorProto_Type { - if x != nil && x.ValueType != nil { - return *x.ValueType - } - return descriptorpb.FieldDescriptorProto_Type(1) -} - -func (x *FieldPathElement) GetSubscript() isFieldPathElement_Subscript { - if x != nil { - return x.Subscript - } - return nil -} - -func (x *FieldPathElement) GetIndex() uint64 { - if x != nil { - if x, ok := x.Subscript.(*FieldPathElement_Index); ok { - return x.Index - } - } - return 0 -} - -func (x *FieldPathElement) GetBoolKey() bool { - if x != nil { - if x, ok := x.Subscript.(*FieldPathElement_BoolKey); ok { - return x.BoolKey - } - } - return false -} - -func (x *FieldPathElement) GetIntKey() int64 { - if x != nil { - if x, ok := x.Subscript.(*FieldPathElement_IntKey); ok { - return x.IntKey - } - } - return 0 -} - -func (x *FieldPathElement) GetUintKey() uint64 { - if x != nil { - if x, ok := x.Subscript.(*FieldPathElement_UintKey); ok { - return x.UintKey - } - } - return 0 -} - -func (x *FieldPathElement) GetStringKey() string { - if x != nil { - if x, ok := x.Subscript.(*FieldPathElement_StringKey); ok { - return x.StringKey - } - } - return "" -} - -type isFieldPathElement_Subscript interface { - isFieldPathElement_Subscript() -} - -type FieldPathElement_Index struct { - // `index` specifies a 0-based index into a repeated field. - Index uint64 `protobuf:"varint,6,opt,name=index,oneof"` -} - -type FieldPathElement_BoolKey struct { - // `bool_key` specifies a map key of type bool. - BoolKey bool `protobuf:"varint,7,opt,name=bool_key,json=boolKey,oneof"` -} - -type FieldPathElement_IntKey struct { - // `int_key` specifies a map key of type int32, int64, sint32, sint64, sfixed32 or sfixed64. - IntKey int64 `protobuf:"varint,8,opt,name=int_key,json=intKey,oneof"` -} - -type FieldPathElement_UintKey struct { - // `uint_key` specifies a map key of type uint32, uint64, fixed32 or fixed64. - UintKey uint64 `protobuf:"varint,9,opt,name=uint_key,json=uintKey,oneof"` -} - -type FieldPathElement_StringKey struct { - // `string_key` specifies a map key of type string. - StringKey string `protobuf:"bytes,10,opt,name=string_key,json=stringKey,oneof"` -} - -func (*FieldPathElement_Index) isFieldPathElement_Subscript() {} - -func (*FieldPathElement_BoolKey) isFieldPathElement_Subscript() {} - -func (*FieldPathElement_IntKey) isFieldPathElement_Subscript() {} - -func (*FieldPathElement_UintKey) isFieldPathElement_Subscript() {} - -func (*FieldPathElement_StringKey) isFieldPathElement_Subscript() {} - -var file_buf_validate_validate_proto_extTypes = []protoimpl.ExtensionInfo{ - { - ExtendedType: (*descriptorpb.MessageOptions)(nil), - ExtensionType: (*MessageRules)(nil), - Field: 1159, - Name: "buf.validate.message", - Tag: "bytes,1159,opt,name=message", - Filename: "buf/validate/validate.proto", - }, - { - ExtendedType: (*descriptorpb.OneofOptions)(nil), - ExtensionType: (*OneofRules)(nil), - Field: 1159, - Name: "buf.validate.oneof", - Tag: "bytes,1159,opt,name=oneof", - Filename: "buf/validate/validate.proto", - }, - { - ExtendedType: (*descriptorpb.FieldOptions)(nil), - ExtensionType: (*FieldRules)(nil), - Field: 1159, - Name: "buf.validate.field", - Tag: "bytes,1159,opt,name=field", - Filename: "buf/validate/validate.proto", - }, - { - ExtendedType: (*descriptorpb.FieldOptions)(nil), - ExtensionType: (*PredefinedRules)(nil), - Field: 1160, - Name: "buf.validate.predefined", - Tag: "bytes,1160,opt,name=predefined", - Filename: "buf/validate/validate.proto", - }, -} - -// Extension fields to descriptorpb.MessageOptions. -var ( - // Rules specify the validations to be performed on this message. By default, - // no validation is performed against a message. - // - // optional buf.validate.MessageRules message = 1159; - E_Message = &file_buf_validate_validate_proto_extTypes[0] -) - -// Extension fields to descriptorpb.OneofOptions. -var ( - // Rules specify the validations to be performed on this oneof. By default, - // no validation is performed against a oneof. - // - // optional buf.validate.OneofRules oneof = 1159; - E_Oneof = &file_buf_validate_validate_proto_extTypes[1] -) - -// Extension fields to descriptorpb.FieldOptions. -var ( - // Rules specify the validations to be performed on this field. By default, - // no validation is performed against a field. - // - // optional buf.validate.FieldRules field = 1159; - E_Field = &file_buf_validate_validate_proto_extTypes[2] - // Specifies predefined rules. When extending a standard rule message, - // this adds additional CEL expressions that apply when the extension is used. - // - // ```proto - // - // extend buf.validate.Int32Rules { - // bool is_zero [(buf.validate.predefined).cel = { - // id: "int32.is_zero", - // message: "must be zero", - // expression: "!rule || this == 0", - // }]; - // } - // - // message Foo { - // int32 reserved = 1 [(buf.validate.field).int32.(is_zero) = true]; - // } - // - // ``` - // - // optional buf.validate.PredefinedRules predefined = 1160; - E_Predefined = &file_buf_validate_validate_proto_extTypes[3] -) - -var File_buf_validate_validate_proto protoreflect.FileDescriptor - -const file_buf_validate_validate_proto_rawDesc = "" + - "\n" + - "\x1bbuf/validate/validate.proto\x12\fbuf.validate\x1a google/protobuf/descriptor.proto\x1a\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"P\n" + - "\x04Rule\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\x12\x18\n" + - "\amessage\x18\x02 \x01(\tR\amessage\x12\x1e\n" + - "\n" + - "expression\x18\x03 \x01(\tR\n" + - "expression\"\xa1\x01\n" + - "\fMessageRules\x12%\n" + - "\x0ecel_expression\x18\x05 \x03(\tR\rcelExpression\x12$\n" + - "\x03cel\x18\x03 \x03(\v2\x12.buf.validate.RuleR\x03cel\x124\n" + - "\x05oneof\x18\x04 \x03(\v2\x1e.buf.validate.MessageOneofRuleR\x05oneofJ\x04\b\x01\x10\x02R\bdisabled\"F\n" + - "\x10MessageOneofRule\x12\x16\n" + - "\x06fields\x18\x01 \x03(\tR\x06fields\x12\x1a\n" + - "\brequired\x18\x02 \x01(\bR\brequired\"(\n" + - "\n" + - "OneofRules\x12\x1a\n" + - "\brequired\x18\x01 \x01(\bR\brequired\"\xe3\n" + - "\n" + - "\n" + - "FieldRules\x12%\n" + - "\x0ecel_expression\x18\x1d \x03(\tR\rcelExpression\x12$\n" + - "\x03cel\x18\x17 \x03(\v2\x12.buf.validate.RuleR\x03cel\x12\x1a\n" + - "\brequired\x18\x19 \x01(\bR\brequired\x12,\n" + - "\x06ignore\x18\x1b \x01(\x0e2\x14.buf.validate.IgnoreR\x06ignore\x120\n" + - "\x05float\x18\x01 \x01(\v2\x18.buf.validate.FloatRulesH\x00R\x05float\x123\n" + - "\x06double\x18\x02 \x01(\v2\x19.buf.validate.DoubleRulesH\x00R\x06double\x120\n" + - "\x05int32\x18\x03 \x01(\v2\x18.buf.validate.Int32RulesH\x00R\x05int32\x120\n" + - "\x05int64\x18\x04 \x01(\v2\x18.buf.validate.Int64RulesH\x00R\x05int64\x123\n" + - "\x06uint32\x18\x05 \x01(\v2\x19.buf.validate.UInt32RulesH\x00R\x06uint32\x123\n" + - "\x06uint64\x18\x06 \x01(\v2\x19.buf.validate.UInt64RulesH\x00R\x06uint64\x123\n" + - "\x06sint32\x18\a \x01(\v2\x19.buf.validate.SInt32RulesH\x00R\x06sint32\x123\n" + - "\x06sint64\x18\b \x01(\v2\x19.buf.validate.SInt64RulesH\x00R\x06sint64\x126\n" + - "\afixed32\x18\t \x01(\v2\x1a.buf.validate.Fixed32RulesH\x00R\afixed32\x126\n" + - "\afixed64\x18\n" + - " \x01(\v2\x1a.buf.validate.Fixed64RulesH\x00R\afixed64\x129\n" + - "\bsfixed32\x18\v \x01(\v2\x1b.buf.validate.SFixed32RulesH\x00R\bsfixed32\x129\n" + - "\bsfixed64\x18\f \x01(\v2\x1b.buf.validate.SFixed64RulesH\x00R\bsfixed64\x12-\n" + - "\x04bool\x18\r \x01(\v2\x17.buf.validate.BoolRulesH\x00R\x04bool\x123\n" + - "\x06string\x18\x0e \x01(\v2\x19.buf.validate.StringRulesH\x00R\x06string\x120\n" + - "\x05bytes\x18\x0f \x01(\v2\x18.buf.validate.BytesRulesH\x00R\x05bytes\x12-\n" + - "\x04enum\x18\x10 \x01(\v2\x17.buf.validate.EnumRulesH\x00R\x04enum\x129\n" + - "\brepeated\x18\x12 \x01(\v2\x1b.buf.validate.RepeatedRulesH\x00R\brepeated\x12*\n" + - "\x03map\x18\x13 \x01(\v2\x16.buf.validate.MapRulesH\x00R\x03map\x12*\n" + - "\x03any\x18\x14 \x01(\v2\x16.buf.validate.AnyRulesH\x00R\x03any\x129\n" + - "\bduration\x18\x15 \x01(\v2\x1b.buf.validate.DurationRulesH\x00R\bduration\x12=\n" + - "\n" + - "field_mask\x18\x1c \x01(\v2\x1c.buf.validate.FieldMaskRulesH\x00R\tfieldMask\x12<\n" + - "\ttimestamp\x18\x16 \x01(\v2\x1c.buf.validate.TimestampRulesH\x00R\ttimestampB\x06\n" + - "\x04typeJ\x04\b\x18\x10\x19J\x04\b\x1a\x10\x1bR\askippedR\fignore_empty\"Z\n" + - "\x0fPredefinedRules\x12$\n" + - "\x03cel\x18\x01 \x03(\v2\x12.buf.validate.RuleR\x03celJ\x04\b\x18\x10\x19J\x04\b\x1a\x10\x1bR\askippedR\fignore_empty\"\xae\x17\n" + - "\n" + - "FloatRules\x12\x84\x01\n" + - "\x05const\x18\x01 \x01(\x02Bn\xc2Hk\n" + - "i\n" + - "\vfloat.const\x1aZthis != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''R\x05const\x12\x9d\x01\n" + - "\x02lt\x18\x02 \x01(\x02B\x8a\x01\xc2H\x86\x01\n" + - "\x83\x01\n" + - "\bfloat.lt\x1aw!has(rules.gte) && !has(rules.gt) && (this.isNan() || this >= rules.lt)? 'must be less than %s'.format([rules.lt]) : ''H\x00R\x02lt\x12\xae\x01\n" + - "\x03lte\x18\x03 \x01(\x02B\x99\x01\xc2H\x95\x01\n" + - "\x92\x01\n" + - "\tfloat.lte\x1a\x84\x01!has(rules.gte) && !has(rules.gt) && (this.isNan() || this > rules.lte)? 'must be less than or equal to %s'.format([rules.lte]) : ''H\x00R\x03lte\x12\xd4\a\n" + - "\x02gt\x18\x04 \x01(\x02B\xc1\a\xc2H\xbd\a\n" + - "\x86\x01\n" + - "\bfloat.gt\x1az!has(rules.lt) && !has(rules.lte) && (this.isNan() || this <= rules.gt)? 'must be greater than %s'.format([rules.gt]) : ''\n" + - "\xbd\x01\n" + - "\vfloat.gt_lt\x1a\xad\x01has(rules.lt) && rules.lt >= rules.gt && (this.isNan() || this >= rules.lt || this <= rules.gt)? 'must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''\n" + - "\xc7\x01\n" + - "\x15float.gt_lt_exclusive\x1a\xad\x01has(rules.lt) && rules.lt < rules.gt && (this.isNan() || (rules.lt <= this && this <= rules.gt))? 'must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''\n" + - "\xcd\x01\n" + - "\ffloat.gt_lte\x1a\xbc\x01has(rules.lte) && rules.lte >= rules.gt && (this.isNan() || this > rules.lte || this <= rules.gt)? 'must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''\n" + - "\xd7\x01\n" + - "\x16float.gt_lte_exclusive\x1a\xbc\x01has(rules.lte) && rules.lte < rules.gt && (this.isNan() || (rules.lte < this && this <= rules.gt))? 'must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''H\x01R\x02gt\x12\xa1\b\n" + - "\x03gte\x18\x05 \x01(\x02B\x8c\b\xc2H\x88\b\n" + - "\x95\x01\n" + - "\tfloat.gte\x1a\x87\x01!has(rules.lt) && !has(rules.lte) && (this.isNan() || this < rules.gte)? 'must be greater than or equal to %s'.format([rules.gte]) : ''\n" + - "\xcc\x01\n" + - "\ffloat.gte_lt\x1a\xbb\x01has(rules.lt) && rules.lt >= rules.gte && (this.isNan() || this >= rules.lt || this < rules.gte)? 'must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''\n" + - "\xd6\x01\n" + - "\x16float.gte_lt_exclusive\x1a\xbb\x01has(rules.lt) && rules.lt < rules.gte && (this.isNan() || (rules.lt <= this && this < rules.gte))? 'must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''\n" + - "\xdc\x01\n" + - "\rfloat.gte_lte\x1a\xca\x01has(rules.lte) && rules.lte >= rules.gte && (this.isNan() || this > rules.lte || this < rules.gte)? 'must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''\n" + - "\xe6\x01\n" + - "\x17float.gte_lte_exclusive\x1a\xca\x01has(rules.lte) && rules.lte < rules.gte && (this.isNan() || (rules.lte < this && this < rules.gte))? 'must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''H\x01R\x03gte\x12}\n" + - "\x02in\x18\x06 \x03(\x02Bm\xc2Hj\n" + - "h\n" + - "\bfloat.in\x1a\\!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''R\x02in\x12w\n" + - "\x06not_in\x18\a \x03(\x02B`\xc2H]\n" + - "[\n" + - "\ffloat.not_in\x1aKthis in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''R\x05notIn\x12w\n" + - "\x06finite\x18\b \x01(\bB_\xc2H\\\n" + - "Z\n" + - "\ffloat.finite\x1aJrules.finite ? (this.isNan() || this.isInf() ? 'must be finite' : '') : ''R\x06finite\x124\n" + - "\aexample\x18\t \x03(\x02B\x1a\xc2H\x17\n" + - "\x15\n" + - "\rfloat.example\x1a\x04trueR\aexample*\t\b\xe8\a\x10\x80\x80\x80\x80\x02B\v\n" + - "\tless_thanB\x0e\n" + - "\fgreater_than\"\xc0\x17\n" + - "\vDoubleRules\x12\x85\x01\n" + - "\x05const\x18\x01 \x01(\x01Bo\xc2Hl\n" + - "j\n" + - "\fdouble.const\x1aZthis != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''R\x05const\x12\x9e\x01\n" + - "\x02lt\x18\x02 \x01(\x01B\x8b\x01\xc2H\x87\x01\n" + - "\x84\x01\n" + - "\tdouble.lt\x1aw!has(rules.gte) && !has(rules.gt) && (this.isNan() || this >= rules.lt)? 'must be less than %s'.format([rules.lt]) : ''H\x00R\x02lt\x12\xaf\x01\n" + - "\x03lte\x18\x03 \x01(\x01B\x9a\x01\xc2H\x96\x01\n" + - "\x93\x01\n" + - "\n" + - "double.lte\x1a\x84\x01!has(rules.gte) && !has(rules.gt) && (this.isNan() || this > rules.lte)? 'must be less than or equal to %s'.format([rules.lte]) : ''H\x00R\x03lte\x12\xd9\a\n" + - "\x02gt\x18\x04 \x01(\x01B\xc6\a\xc2H\xc2\a\n" + - "\x87\x01\n" + - "\tdouble.gt\x1az!has(rules.lt) && !has(rules.lte) && (this.isNan() || this <= rules.gt)? 'must be greater than %s'.format([rules.gt]) : ''\n" + - "\xbe\x01\n" + - "\fdouble.gt_lt\x1a\xad\x01has(rules.lt) && rules.lt >= rules.gt && (this.isNan() || this >= rules.lt || this <= rules.gt)? 'must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''\n" + - "\xc8\x01\n" + - "\x16double.gt_lt_exclusive\x1a\xad\x01has(rules.lt) && rules.lt < rules.gt && (this.isNan() || (rules.lt <= this && this <= rules.gt))? 'must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''\n" + - "\xce\x01\n" + - "\rdouble.gt_lte\x1a\xbc\x01has(rules.lte) && rules.lte >= rules.gt && (this.isNan() || this > rules.lte || this <= rules.gt)? 'must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''\n" + - "\xd8\x01\n" + - "\x17double.gt_lte_exclusive\x1a\xbc\x01has(rules.lte) && rules.lte < rules.gt && (this.isNan() || (rules.lte < this && this <= rules.gt))? 'must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''H\x01R\x02gt\x12\xa6\b\n" + - "\x03gte\x18\x05 \x01(\x01B\x91\b\xc2H\x8d\b\n" + - "\x96\x01\n" + - "\n" + - "double.gte\x1a\x87\x01!has(rules.lt) && !has(rules.lte) && (this.isNan() || this < rules.gte)? 'must be greater than or equal to %s'.format([rules.gte]) : ''\n" + - "\xcd\x01\n" + - "\rdouble.gte_lt\x1a\xbb\x01has(rules.lt) && rules.lt >= rules.gte && (this.isNan() || this >= rules.lt || this < rules.gte)? 'must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''\n" + - "\xd7\x01\n" + - "\x17double.gte_lt_exclusive\x1a\xbb\x01has(rules.lt) && rules.lt < rules.gte && (this.isNan() || (rules.lt <= this && this < rules.gte))? 'must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''\n" + - "\xdd\x01\n" + - "\x0edouble.gte_lte\x1a\xca\x01has(rules.lte) && rules.lte >= rules.gte && (this.isNan() || this > rules.lte || this < rules.gte)? 'must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''\n" + - "\xe7\x01\n" + - "\x18double.gte_lte_exclusive\x1a\xca\x01has(rules.lte) && rules.lte < rules.gte && (this.isNan() || (rules.lte < this && this < rules.gte))? 'must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''H\x01R\x03gte\x12~\n" + - "\x02in\x18\x06 \x03(\x01Bn\xc2Hk\n" + - "i\n" + - "\tdouble.in\x1a\\!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''R\x02in\x12x\n" + - "\x06not_in\x18\a \x03(\x01Ba\xc2H^\n" + - "\\\n" + - "\rdouble.not_in\x1aKthis in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''R\x05notIn\x12x\n" + - "\x06finite\x18\b \x01(\bB`\xc2H]\n" + - "[\n" + - "\rdouble.finite\x1aJrules.finite ? (this.isNan() || this.isInf() ? 'must be finite' : '') : ''R\x06finite\x125\n" + - "\aexample\x18\t \x03(\x01B\x1b\xc2H\x18\n" + - "\x16\n" + - "\x0edouble.example\x1a\x04trueR\aexample*\t\b\xe8\a\x10\x80\x80\x80\x80\x02B\v\n" + - "\tless_thanB\x0e\n" + - "\fgreater_than\"\xde\x14\n" + - "\n" + - "Int32Rules\x12\x84\x01\n" + - "\x05const\x18\x01 \x01(\x05Bn\xc2Hk\n" + - "i\n" + - "\vint32.const\x1aZthis != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''R\x05const\x12\x88\x01\n" + - "\x02lt\x18\x02 \x01(\x05Bv\xc2Hs\n" + - "q\n" + - "\bint32.lt\x1ae!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'must be less than %s'.format([rules.lt]) : ''H\x00R\x02lt\x12\x9a\x01\n" + - "\x03lte\x18\x03 \x01(\x05B\x85\x01\xc2H\x81\x01\n" + - "\x7f\n" + - "\tint32.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'must be less than or equal to %s'.format([rules.lte]) : ''H\x00R\x03lte\x12\xfd\x06\n" + - "\x02gt\x18\x04 \x01(\x05B\xea\x06\xc2H\xe6\x06\n" + - "t\n" + - "\bint32.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'must be greater than %s'.format([rules.gt]) : ''\n" + - "\xad\x01\n" + - "\vint32.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''\n" + - "\xb5\x01\n" + - "\x15int32.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''\n" + - "\xbd\x01\n" + - "\fint32.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''\n" + - "\xc5\x01\n" + - "\x16int32.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''H\x01R\x02gt\x12\xca\a\n" + - "\x03gte\x18\x05 \x01(\x05B\xb5\a\xc2H\xb1\a\n" + - "\x82\x01\n" + - "\tint32.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'must be greater than or equal to %s'.format([rules.gte]) : ''\n" + - "\xbc\x01\n" + - "\fint32.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''\n" + - "\xc4\x01\n" + - "\x16int32.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''\n" + - "\xcc\x01\n" + - "\rint32.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''\n" + - "\xd4\x01\n" + - "\x17int32.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''H\x01R\x03gte\x12}\n" + - "\x02in\x18\x06 \x03(\x05Bm\xc2Hj\n" + - "h\n" + - "\bint32.in\x1a\\!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''R\x02in\x12w\n" + - "\x06not_in\x18\a \x03(\x05B`\xc2H]\n" + - "[\n" + - "\fint32.not_in\x1aKthis in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''R\x05notIn\x124\n" + - "\aexample\x18\b \x03(\x05B\x1a\xc2H\x17\n" + - "\x15\n" + - "\rint32.example\x1a\x04trueR\aexample*\t\b\xe8\a\x10\x80\x80\x80\x80\x02B\v\n" + - "\tless_thanB\x0e\n" + - "\fgreater_than\"\xde\x14\n" + - "\n" + - "Int64Rules\x12\x84\x01\n" + - "\x05const\x18\x01 \x01(\x03Bn\xc2Hk\n" + - "i\n" + - "\vint64.const\x1aZthis != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''R\x05const\x12\x88\x01\n" + - "\x02lt\x18\x02 \x01(\x03Bv\xc2Hs\n" + - "q\n" + - "\bint64.lt\x1ae!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'must be less than %s'.format([rules.lt]) : ''H\x00R\x02lt\x12\x9a\x01\n" + - "\x03lte\x18\x03 \x01(\x03B\x85\x01\xc2H\x81\x01\n" + - "\x7f\n" + - "\tint64.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'must be less than or equal to %s'.format([rules.lte]) : ''H\x00R\x03lte\x12\xfd\x06\n" + - "\x02gt\x18\x04 \x01(\x03B\xea\x06\xc2H\xe6\x06\n" + - "t\n" + - "\bint64.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'must be greater than %s'.format([rules.gt]) : ''\n" + - "\xad\x01\n" + - "\vint64.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''\n" + - "\xb5\x01\n" + - "\x15int64.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''\n" + - "\xbd\x01\n" + - "\fint64.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''\n" + - "\xc5\x01\n" + - "\x16int64.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''H\x01R\x02gt\x12\xca\a\n" + - "\x03gte\x18\x05 \x01(\x03B\xb5\a\xc2H\xb1\a\n" + - "\x82\x01\n" + - "\tint64.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'must be greater than or equal to %s'.format([rules.gte]) : ''\n" + - "\xbc\x01\n" + - "\fint64.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''\n" + - "\xc4\x01\n" + - "\x16int64.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''\n" + - "\xcc\x01\n" + - "\rint64.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''\n" + - "\xd4\x01\n" + - "\x17int64.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''H\x01R\x03gte\x12}\n" + - "\x02in\x18\x06 \x03(\x03Bm\xc2Hj\n" + - "h\n" + - "\bint64.in\x1a\\!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''R\x02in\x12w\n" + - "\x06not_in\x18\a \x03(\x03B`\xc2H]\n" + - "[\n" + - "\fint64.not_in\x1aKthis in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''R\x05notIn\x124\n" + - "\aexample\x18\t \x03(\x03B\x1a\xc2H\x17\n" + - "\x15\n" + - "\rint64.example\x1a\x04trueR\aexample*\t\b\xe8\a\x10\x80\x80\x80\x80\x02B\v\n" + - "\tless_thanB\x0e\n" + - "\fgreater_than\"\xf0\x14\n" + - "\vUInt32Rules\x12\x85\x01\n" + - "\x05const\x18\x01 \x01(\rBo\xc2Hl\n" + - "j\n" + - "\fuint32.const\x1aZthis != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''R\x05const\x12\x89\x01\n" + - "\x02lt\x18\x02 \x01(\rBw\xc2Ht\n" + - "r\n" + - "\tuint32.lt\x1ae!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'must be less than %s'.format([rules.lt]) : ''H\x00R\x02lt\x12\x9c\x01\n" + - "\x03lte\x18\x03 \x01(\rB\x87\x01\xc2H\x83\x01\n" + - "\x80\x01\n" + - "\n" + - "uint32.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'must be less than or equal to %s'.format([rules.lte]) : ''H\x00R\x03lte\x12\x82\a\n" + - "\x02gt\x18\x04 \x01(\rB\xef\x06\xc2H\xeb\x06\n" + - "u\n" + - "\tuint32.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'must be greater than %s'.format([rules.gt]) : ''\n" + - "\xae\x01\n" + - "\fuint32.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''\n" + - "\xb6\x01\n" + - "\x16uint32.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''\n" + - "\xbe\x01\n" + - "\ruint32.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''\n" + - "\xc6\x01\n" + - "\x17uint32.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''H\x01R\x02gt\x12\xcf\a\n" + - "\x03gte\x18\x05 \x01(\rB\xba\a\xc2H\xb6\a\n" + - "\x83\x01\n" + - "\n" + - "uint32.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'must be greater than or equal to %s'.format([rules.gte]) : ''\n" + - "\xbd\x01\n" + - "\ruint32.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''\n" + - "\xc5\x01\n" + - "\x17uint32.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''\n" + - "\xcd\x01\n" + - "\x0euint32.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''\n" + - "\xd5\x01\n" + - "\x18uint32.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''H\x01R\x03gte\x12~\n" + - "\x02in\x18\x06 \x03(\rBn\xc2Hk\n" + - "i\n" + - "\tuint32.in\x1a\\!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''R\x02in\x12x\n" + - "\x06not_in\x18\a \x03(\rBa\xc2H^\n" + - "\\\n" + - "\ruint32.not_in\x1aKthis in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''R\x05notIn\x125\n" + - "\aexample\x18\b \x03(\rB\x1b\xc2H\x18\n" + - "\x16\n" + - "\x0euint32.example\x1a\x04trueR\aexample*\t\b\xe8\a\x10\x80\x80\x80\x80\x02B\v\n" + - "\tless_thanB\x0e\n" + - "\fgreater_than\"\xf0\x14\n" + - "\vUInt64Rules\x12\x85\x01\n" + - "\x05const\x18\x01 \x01(\x04Bo\xc2Hl\n" + - "j\n" + - "\fuint64.const\x1aZthis != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''R\x05const\x12\x89\x01\n" + - "\x02lt\x18\x02 \x01(\x04Bw\xc2Ht\n" + - "r\n" + - "\tuint64.lt\x1ae!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'must be less than %s'.format([rules.lt]) : ''H\x00R\x02lt\x12\x9c\x01\n" + - "\x03lte\x18\x03 \x01(\x04B\x87\x01\xc2H\x83\x01\n" + - "\x80\x01\n" + - "\n" + - "uint64.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'must be less than or equal to %s'.format([rules.lte]) : ''H\x00R\x03lte\x12\x82\a\n" + - "\x02gt\x18\x04 \x01(\x04B\xef\x06\xc2H\xeb\x06\n" + - "u\n" + - "\tuint64.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'must be greater than %s'.format([rules.gt]) : ''\n" + - "\xae\x01\n" + - "\fuint64.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''\n" + - "\xb6\x01\n" + - "\x16uint64.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''\n" + - "\xbe\x01\n" + - "\ruint64.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''\n" + - "\xc6\x01\n" + - "\x17uint64.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''H\x01R\x02gt\x12\xcf\a\n" + - "\x03gte\x18\x05 \x01(\x04B\xba\a\xc2H\xb6\a\n" + - "\x83\x01\n" + - "\n" + - "uint64.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'must be greater than or equal to %s'.format([rules.gte]) : ''\n" + - "\xbd\x01\n" + - "\ruint64.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''\n" + - "\xc5\x01\n" + - "\x17uint64.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''\n" + - "\xcd\x01\n" + - "\x0euint64.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''\n" + - "\xd5\x01\n" + - "\x18uint64.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''H\x01R\x03gte\x12~\n" + - "\x02in\x18\x06 \x03(\x04Bn\xc2Hk\n" + - "i\n" + - "\tuint64.in\x1a\\!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''R\x02in\x12x\n" + - "\x06not_in\x18\a \x03(\x04Ba\xc2H^\n" + - "\\\n" + - "\ruint64.not_in\x1aKthis in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''R\x05notIn\x125\n" + - "\aexample\x18\b \x03(\x04B\x1b\xc2H\x18\n" + - "\x16\n" + - "\x0euint64.example\x1a\x04trueR\aexample*\t\b\xe8\a\x10\x80\x80\x80\x80\x02B\v\n" + - "\tless_thanB\x0e\n" + - "\fgreater_than\"\xf0\x14\n" + - "\vSInt32Rules\x12\x85\x01\n" + - "\x05const\x18\x01 \x01(\x11Bo\xc2Hl\n" + - "j\n" + - "\fsint32.const\x1aZthis != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''R\x05const\x12\x89\x01\n" + - "\x02lt\x18\x02 \x01(\x11Bw\xc2Ht\n" + - "r\n" + - "\tsint32.lt\x1ae!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'must be less than %s'.format([rules.lt]) : ''H\x00R\x02lt\x12\x9c\x01\n" + - "\x03lte\x18\x03 \x01(\x11B\x87\x01\xc2H\x83\x01\n" + - "\x80\x01\n" + - "\n" + - "sint32.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'must be less than or equal to %s'.format([rules.lte]) : ''H\x00R\x03lte\x12\x82\a\n" + - "\x02gt\x18\x04 \x01(\x11B\xef\x06\xc2H\xeb\x06\n" + - "u\n" + - "\tsint32.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'must be greater than %s'.format([rules.gt]) : ''\n" + - "\xae\x01\n" + - "\fsint32.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''\n" + - "\xb6\x01\n" + - "\x16sint32.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''\n" + - "\xbe\x01\n" + - "\rsint32.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''\n" + - "\xc6\x01\n" + - "\x17sint32.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''H\x01R\x02gt\x12\xcf\a\n" + - "\x03gte\x18\x05 \x01(\x11B\xba\a\xc2H\xb6\a\n" + - "\x83\x01\n" + - "\n" + - "sint32.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'must be greater than or equal to %s'.format([rules.gte]) : ''\n" + - "\xbd\x01\n" + - "\rsint32.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''\n" + - "\xc5\x01\n" + - "\x17sint32.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''\n" + - "\xcd\x01\n" + - "\x0esint32.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''\n" + - "\xd5\x01\n" + - "\x18sint32.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''H\x01R\x03gte\x12~\n" + - "\x02in\x18\x06 \x03(\x11Bn\xc2Hk\n" + - "i\n" + - "\tsint32.in\x1a\\!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''R\x02in\x12x\n" + - "\x06not_in\x18\a \x03(\x11Ba\xc2H^\n" + - "\\\n" + - "\rsint32.not_in\x1aKthis in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''R\x05notIn\x125\n" + - "\aexample\x18\b \x03(\x11B\x1b\xc2H\x18\n" + - "\x16\n" + - "\x0esint32.example\x1a\x04trueR\aexample*\t\b\xe8\a\x10\x80\x80\x80\x80\x02B\v\n" + - "\tless_thanB\x0e\n" + - "\fgreater_than\"\xf0\x14\n" + - "\vSInt64Rules\x12\x85\x01\n" + - "\x05const\x18\x01 \x01(\x12Bo\xc2Hl\n" + - "j\n" + - "\fsint64.const\x1aZthis != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''R\x05const\x12\x89\x01\n" + - "\x02lt\x18\x02 \x01(\x12Bw\xc2Ht\n" + - "r\n" + - "\tsint64.lt\x1ae!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'must be less than %s'.format([rules.lt]) : ''H\x00R\x02lt\x12\x9c\x01\n" + - "\x03lte\x18\x03 \x01(\x12B\x87\x01\xc2H\x83\x01\n" + - "\x80\x01\n" + - "\n" + - "sint64.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'must be less than or equal to %s'.format([rules.lte]) : ''H\x00R\x03lte\x12\x82\a\n" + - "\x02gt\x18\x04 \x01(\x12B\xef\x06\xc2H\xeb\x06\n" + - "u\n" + - "\tsint64.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'must be greater than %s'.format([rules.gt]) : ''\n" + - "\xae\x01\n" + - "\fsint64.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''\n" + - "\xb6\x01\n" + - "\x16sint64.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''\n" + - "\xbe\x01\n" + - "\rsint64.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''\n" + - "\xc6\x01\n" + - "\x17sint64.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''H\x01R\x02gt\x12\xcf\a\n" + - "\x03gte\x18\x05 \x01(\x12B\xba\a\xc2H\xb6\a\n" + - "\x83\x01\n" + - "\n" + - "sint64.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'must be greater than or equal to %s'.format([rules.gte]) : ''\n" + - "\xbd\x01\n" + - "\rsint64.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''\n" + - "\xc5\x01\n" + - "\x17sint64.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''\n" + - "\xcd\x01\n" + - "\x0esint64.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''\n" + - "\xd5\x01\n" + - "\x18sint64.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''H\x01R\x03gte\x12~\n" + - "\x02in\x18\x06 \x03(\x12Bn\xc2Hk\n" + - "i\n" + - "\tsint64.in\x1a\\!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''R\x02in\x12x\n" + - "\x06not_in\x18\a \x03(\x12Ba\xc2H^\n" + - "\\\n" + - "\rsint64.not_in\x1aKthis in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''R\x05notIn\x125\n" + - "\aexample\x18\b \x03(\x12B\x1b\xc2H\x18\n" + - "\x16\n" + - "\x0esint64.example\x1a\x04trueR\aexample*\t\b\xe8\a\x10\x80\x80\x80\x80\x02B\v\n" + - "\tless_thanB\x0e\n" + - "\fgreater_than\"\x81\x15\n" + - "\fFixed32Rules\x12\x86\x01\n" + - "\x05const\x18\x01 \x01(\aBp\xc2Hm\n" + - "k\n" + - "\rfixed32.const\x1aZthis != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''R\x05const\x12\x8a\x01\n" + - "\x02lt\x18\x02 \x01(\aBx\xc2Hu\n" + - "s\n" + - "\n" + - "fixed32.lt\x1ae!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'must be less than %s'.format([rules.lt]) : ''H\x00R\x02lt\x12\x9d\x01\n" + - "\x03lte\x18\x03 \x01(\aB\x88\x01\xc2H\x84\x01\n" + - "\x81\x01\n" + - "\vfixed32.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'must be less than or equal to %s'.format([rules.lte]) : ''H\x00R\x03lte\x12\x87\a\n" + - "\x02gt\x18\x04 \x01(\aB\xf4\x06\xc2H\xf0\x06\n" + - "v\n" + - "\n" + - "fixed32.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'must be greater than %s'.format([rules.gt]) : ''\n" + - "\xaf\x01\n" + - "\rfixed32.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''\n" + - "\xb7\x01\n" + - "\x17fixed32.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''\n" + - "\xbf\x01\n" + - "\x0efixed32.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''\n" + - "\xc7\x01\n" + - "\x18fixed32.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''H\x01R\x02gt\x12\xd4\a\n" + - "\x03gte\x18\x05 \x01(\aB\xbf\a\xc2H\xbb\a\n" + - "\x84\x01\n" + - "\vfixed32.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'must be greater than or equal to %s'.format([rules.gte]) : ''\n" + - "\xbe\x01\n" + - "\x0efixed32.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''\n" + - "\xc6\x01\n" + - "\x18fixed32.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''\n" + - "\xce\x01\n" + - "\x0ffixed32.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''\n" + - "\xd6\x01\n" + - "\x19fixed32.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''H\x01R\x03gte\x12\x7f\n" + - "\x02in\x18\x06 \x03(\aBo\xc2Hl\n" + - "j\n" + - "\n" + - "fixed32.in\x1a\\!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''R\x02in\x12y\n" + - "\x06not_in\x18\a \x03(\aBb\xc2H_\n" + - "]\n" + - "\x0efixed32.not_in\x1aKthis in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''R\x05notIn\x126\n" + - "\aexample\x18\b \x03(\aB\x1c\xc2H\x19\n" + - "\x17\n" + - "\x0ffixed32.example\x1a\x04trueR\aexample*\t\b\xe8\a\x10\x80\x80\x80\x80\x02B\v\n" + - "\tless_thanB\x0e\n" + - "\fgreater_than\"\x81\x15\n" + - "\fFixed64Rules\x12\x86\x01\n" + - "\x05const\x18\x01 \x01(\x06Bp\xc2Hm\n" + - "k\n" + - "\rfixed64.const\x1aZthis != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''R\x05const\x12\x8a\x01\n" + - "\x02lt\x18\x02 \x01(\x06Bx\xc2Hu\n" + - "s\n" + - "\n" + - "fixed64.lt\x1ae!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'must be less than %s'.format([rules.lt]) : ''H\x00R\x02lt\x12\x9d\x01\n" + - "\x03lte\x18\x03 \x01(\x06B\x88\x01\xc2H\x84\x01\n" + - "\x81\x01\n" + - "\vfixed64.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'must be less than or equal to %s'.format([rules.lte]) : ''H\x00R\x03lte\x12\x87\a\n" + - "\x02gt\x18\x04 \x01(\x06B\xf4\x06\xc2H\xf0\x06\n" + - "v\n" + - "\n" + - "fixed64.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'must be greater than %s'.format([rules.gt]) : ''\n" + - "\xaf\x01\n" + - "\rfixed64.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''\n" + - "\xb7\x01\n" + - "\x17fixed64.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''\n" + - "\xbf\x01\n" + - "\x0efixed64.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''\n" + - "\xc7\x01\n" + - "\x18fixed64.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''H\x01R\x02gt\x12\xd4\a\n" + - "\x03gte\x18\x05 \x01(\x06B\xbf\a\xc2H\xbb\a\n" + - "\x84\x01\n" + - "\vfixed64.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'must be greater than or equal to %s'.format([rules.gte]) : ''\n" + - "\xbe\x01\n" + - "\x0efixed64.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''\n" + - "\xc6\x01\n" + - "\x18fixed64.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''\n" + - "\xce\x01\n" + - "\x0ffixed64.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''\n" + - "\xd6\x01\n" + - "\x19fixed64.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''H\x01R\x03gte\x12\x7f\n" + - "\x02in\x18\x06 \x03(\x06Bo\xc2Hl\n" + - "j\n" + - "\n" + - "fixed64.in\x1a\\!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''R\x02in\x12y\n" + - "\x06not_in\x18\a \x03(\x06Bb\xc2H_\n" + - "]\n" + - "\x0efixed64.not_in\x1aKthis in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''R\x05notIn\x126\n" + - "\aexample\x18\b \x03(\x06B\x1c\xc2H\x19\n" + - "\x17\n" + - "\x0ffixed64.example\x1a\x04trueR\aexample*\t\b\xe8\a\x10\x80\x80\x80\x80\x02B\v\n" + - "\tless_thanB\x0e\n" + - "\fgreater_than\"\x93\x15\n" + - "\rSFixed32Rules\x12\x87\x01\n" + - "\x05const\x18\x01 \x01(\x0fBq\xc2Hn\n" + - "l\n" + - "\x0esfixed32.const\x1aZthis != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''R\x05const\x12\x8b\x01\n" + - "\x02lt\x18\x02 \x01(\x0fBy\xc2Hv\n" + - "t\n" + - "\vsfixed32.lt\x1ae!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'must be less than %s'.format([rules.lt]) : ''H\x00R\x02lt\x12\x9e\x01\n" + - "\x03lte\x18\x03 \x01(\x0fB\x89\x01\xc2H\x85\x01\n" + - "\x82\x01\n" + - "\fsfixed32.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'must be less than or equal to %s'.format([rules.lte]) : ''H\x00R\x03lte\x12\x8c\a\n" + - "\x02gt\x18\x04 \x01(\x0fB\xf9\x06\xc2H\xf5\x06\n" + - "w\n" + - "\vsfixed32.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'must be greater than %s'.format([rules.gt]) : ''\n" + - "\xb0\x01\n" + - "\x0esfixed32.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''\n" + - "\xb8\x01\n" + - "\x18sfixed32.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''\n" + - "\xc0\x01\n" + - "\x0fsfixed32.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''\n" + - "\xc8\x01\n" + - "\x19sfixed32.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''H\x01R\x02gt\x12\xd9\a\n" + - "\x03gte\x18\x05 \x01(\x0fB\xc4\a\xc2H\xc0\a\n" + - "\x85\x01\n" + - "\fsfixed32.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'must be greater than or equal to %s'.format([rules.gte]) : ''\n" + - "\xbf\x01\n" + - "\x0fsfixed32.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''\n" + - "\xc7\x01\n" + - "\x19sfixed32.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''\n" + - "\xcf\x01\n" + - "\x10sfixed32.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''\n" + - "\xd7\x01\n" + - "\x1asfixed32.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''H\x01R\x03gte\x12\x80\x01\n" + - "\x02in\x18\x06 \x03(\x0fBp\xc2Hm\n" + - "k\n" + - "\vsfixed32.in\x1a\\!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''R\x02in\x12z\n" + - "\x06not_in\x18\a \x03(\x0fBc\xc2H`\n" + - "^\n" + - "\x0fsfixed32.not_in\x1aKthis in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''R\x05notIn\x127\n" + - "\aexample\x18\b \x03(\x0fB\x1d\xc2H\x1a\n" + - "\x18\n" + - "\x10sfixed32.example\x1a\x04trueR\aexample*\t\b\xe8\a\x10\x80\x80\x80\x80\x02B\v\n" + - "\tless_thanB\x0e\n" + - "\fgreater_than\"\x93\x15\n" + - "\rSFixed64Rules\x12\x87\x01\n" + - "\x05const\x18\x01 \x01(\x10Bq\xc2Hn\n" + - "l\n" + - "\x0esfixed64.const\x1aZthis != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''R\x05const\x12\x8b\x01\n" + - "\x02lt\x18\x02 \x01(\x10By\xc2Hv\n" + - "t\n" + - "\vsfixed64.lt\x1ae!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'must be less than %s'.format([rules.lt]) : ''H\x00R\x02lt\x12\x9e\x01\n" + - "\x03lte\x18\x03 \x01(\x10B\x89\x01\xc2H\x85\x01\n" + - "\x82\x01\n" + - "\fsfixed64.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'must be less than or equal to %s'.format([rules.lte]) : ''H\x00R\x03lte\x12\x8c\a\n" + - "\x02gt\x18\x04 \x01(\x10B\xf9\x06\xc2H\xf5\x06\n" + - "w\n" + - "\vsfixed64.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'must be greater than %s'.format([rules.gt]) : ''\n" + - "\xb0\x01\n" + - "\x0esfixed64.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''\n" + - "\xb8\x01\n" + - "\x18sfixed64.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''\n" + - "\xc0\x01\n" + - "\x0fsfixed64.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''\n" + - "\xc8\x01\n" + - "\x19sfixed64.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''H\x01R\x02gt\x12\xd9\a\n" + - "\x03gte\x18\x05 \x01(\x10B\xc4\a\xc2H\xc0\a\n" + - "\x85\x01\n" + - "\fsfixed64.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'must be greater than or equal to %s'.format([rules.gte]) : ''\n" + - "\xbf\x01\n" + - "\x0fsfixed64.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''\n" + - "\xc7\x01\n" + - "\x19sfixed64.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''\n" + - "\xcf\x01\n" + - "\x10sfixed64.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''\n" + - "\xd7\x01\n" + - "\x1asfixed64.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''H\x01R\x03gte\x12\x80\x01\n" + - "\x02in\x18\x06 \x03(\x10Bp\xc2Hm\n" + - "k\n" + - "\vsfixed64.in\x1a\\!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''R\x02in\x12z\n" + - "\x06not_in\x18\a \x03(\x10Bc\xc2H`\n" + - "^\n" + - "\x0fsfixed64.not_in\x1aKthis in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''R\x05notIn\x127\n" + - "\aexample\x18\b \x03(\x10B\x1d\xc2H\x1a\n" + - "\x18\n" + - "\x10sfixed64.example\x1a\x04trueR\aexample*\t\b\xe8\a\x10\x80\x80\x80\x80\x02B\v\n" + - "\tless_thanB\x0e\n" + - "\fgreater_than\"\xd1\x01\n" + - "\tBoolRules\x12\x83\x01\n" + - "\x05const\x18\x01 \x01(\bBm\xc2Hj\n" + - "h\n" + - "\n" + - "bool.const\x1aZthis != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''R\x05const\x123\n" + - "\aexample\x18\x02 \x03(\bB\x19\xc2H\x16\n" + - "\x14\n" + - "\fbool.example\x1a\x04trueR\aexample*\t\b\xe8\a\x10\x80\x80\x80\x80\x02\"\xcf?\n" + - "\vStringRules\x12\x87\x01\n" + - "\x05const\x18\x01 \x01(\tBq\xc2Hn\n" + - "l\n" + - "\fstring.const\x1a\\this != getField(rules, 'const') ? 'must equal `%s`'.format([getField(rules, 'const')]) : ''R\x05const\x12v\n" + - "\x03len\x18\x13 \x01(\x04Bd\xc2Ha\n" + - "_\n" + - "\n" + - "string.len\x1aQuint(this.size()) != rules.len ? 'must be %s characters'.format([rules.len]) : ''R\x03len\x12\x91\x01\n" + - "\amin_len\x18\x02 \x01(\x04Bx\xc2Hu\n" + - "s\n" + - "\x0estring.min_len\x1aauint(this.size()) < rules.min_len ? 'must be at least %s characters'.format([rules.min_len]) : ''R\x06minLen\x12\x90\x01\n" + - "\amax_len\x18\x03 \x01(\x04Bw\xc2Ht\n" + - "r\n" + - "\x0estring.max_len\x1a`uint(this.size()) > rules.max_len ? 'must be at most %s characters'.format([rules.max_len]) : ''R\x06maxLen\x12\x95\x01\n" + - "\tlen_bytes\x18\x14 \x01(\x04Bx\xc2Hu\n" + - "s\n" + - "\x10string.len_bytes\x1a_uint(bytes(this).size()) != rules.len_bytes ? 'must be %s bytes'.format([rules.len_bytes]) : ''R\blenBytes\x12\x9e\x01\n" + - "\tmin_bytes\x18\x04 \x01(\x04B\x80\x01\xc2H}\n" + - "{\n" + - "\x10string.min_bytes\x1aguint(bytes(this).size()) < rules.min_bytes ? 'must be at least %s bytes'.format([rules.min_bytes]) : ''R\bminBytes\x12\x9c\x01\n" + - "\tmax_bytes\x18\x05 \x01(\x04B\x7f\xc2H|\n" + - "z\n" + - "\x10string.max_bytes\x1afuint(bytes(this).size()) > rules.max_bytes ? 'must be at most %s bytes'.format([rules.max_bytes]) : ''R\bmaxBytes\x12\x90\x01\n" + - "\apattern\x18\x06 \x01(\tBv\xc2Hs\n" + - "q\n" + - "\x0estring.pattern\x1a_!this.matches(rules.pattern) ? 'does not match regex pattern `%s`'.format([rules.pattern]) : ''R\apattern\x12\x86\x01\n" + - "\x06prefix\x18\a \x01(\tBn\xc2Hk\n" + - "i\n" + - "\rstring.prefix\x1aX!this.startsWith(rules.prefix) ? 'does not have prefix `%s`'.format([rules.prefix]) : ''R\x06prefix\x12\x84\x01\n" + - "\x06suffix\x18\b \x01(\tBl\xc2Hi\n" + - "g\n" + - "\rstring.suffix\x1aV!this.endsWith(rules.suffix) ? 'does not have suffix `%s`'.format([rules.suffix]) : ''R\x06suffix\x12\x94\x01\n" + - "\bcontains\x18\t \x01(\tBx\xc2Hu\n" + - "s\n" + - "\x0fstring.contains\x1a`!this.contains(rules.contains) ? 'does not contain substring `%s`'.format([rules.contains]) : ''R\bcontains\x12\x9e\x01\n" + - "\fnot_contains\x18\x17 \x01(\tB{\xc2Hx\n" + - "v\n" + - "\x13string.not_contains\x1a_this.contains(rules.not_contains) ? 'contains substring `%s`'.format([rules.not_contains]) : ''R\vnotContains\x12~\n" + - "\x02in\x18\n" + - " \x03(\tBn\xc2Hk\n" + - "i\n" + - "\tstring.in\x1a\\!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''R\x02in\x12x\n" + - "\x06not_in\x18\v \x03(\tBa\xc2H^\n" + - "\\\n" + - "\rstring.not_in\x1aKthis in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''R\x05notIn\x12\xe0\x01\n" + - "\x05email\x18\f \x01(\bB\xc7\x01\xc2H\xc3\x01\n" + - "[\n" + - "\fstring.email\x12\x1dmust be a valid email address\x1a,!rules.email || this == '' || this.isEmail()\n" + - "d\n" + - "\x12string.email_empty\x122value is empty, which is not a valid email address\x1a\x1a!rules.email || this != ''H\x00R\x05email\x12\xeb\x01\n" + - "\bhostname\x18\r \x01(\bB\xcc\x01\xc2H\xc8\x01\n" + - "_\n" + - "\x0fstring.hostname\x12\x18must be a valid hostname\x1a2!rules.hostname || this == '' || this.isHostname()\n" + - "e\n" + - "\x15string.hostname_empty\x12-value is empty, which is not a valid hostname\x1a\x1d!rules.hostname || this != ''H\x00R\bhostname\x12\xc5\x01\n" + - "\x02ip\x18\x0e \x01(\bB\xb2\x01\xc2H\xae\x01\n" + - "O\n" + - "\tstring.ip\x12\x1amust be a valid IP address\x1a&!rules.ip || this == '' || this.isIp()\n" + - "[\n" + - "\x0fstring.ip_empty\x12/value is empty, which is not a valid IP address\x1a\x17!rules.ip || this != ''H\x00R\x02ip\x12\xd6\x01\n" + - "\x04ipv4\x18\x0f \x01(\bB\xbf\x01\xc2H\xbb\x01\n" + - "V\n" + - "\vstring.ipv4\x12\x1cmust be a valid IPv4 address\x1a)!rules.ipv4 || this == '' || this.isIp(4)\n" + - "a\n" + - "\x11string.ipv4_empty\x121value is empty, which is not a valid IPv4 address\x1a\x19!rules.ipv4 || this != ''H\x00R\x04ipv4\x12\xd6\x01\n" + - "\x04ipv6\x18\x10 \x01(\bB\xbf\x01\xc2H\xbb\x01\n" + - "V\n" + - "\vstring.ipv6\x12\x1cmust be a valid IPv6 address\x1a)!rules.ipv6 || this == '' || this.isIp(6)\n" + - "a\n" + - "\x11string.ipv6_empty\x121value is empty, which is not a valid IPv6 address\x1a\x19!rules.ipv6 || this != ''H\x00R\x04ipv6\x12\xbe\x01\n" + - "\x03uri\x18\x11 \x01(\bB\xa9\x01\xc2H\xa5\x01\n" + - "K\n" + - "\n" + - "string.uri\x12\x13must be a valid URI\x1a(!rules.uri || this == '' || this.isUri()\n" + - "V\n" + - "\x10string.uri_empty\x12(value is empty, which is not a valid URI\x1a\x18!rules.uri || this != ''H\x00R\x03uri\x12r\n" + - "\auri_ref\x18\x12 \x01(\bBW\xc2HT\n" + - "R\n" + - "\x0estring.uri_ref\x12\x1dmust be a valid URI Reference\x1a!!rules.uri_ref || this.isUriRef()H\x00R\x06uriRef\x12\x92\x02\n" + - "\aaddress\x18\x15 \x01(\bB\xf5\x01\xc2H\xf1\x01\n" + - "{\n" + - "\x0estring.address\x12'must be a valid hostname, or ip address\x1a@!rules.address || this == '' || this.isHostname() || this.isIp()\n" + - "r\n" + - "\x14string.address_empty\x12!rules.ipv4_with_prefixlen || this == '' || this.isIpPrefix(4)\n" + - "\x92\x01\n" + - " string.ipv4_with_prefixlen_empty\x12Dvalue is empty, which is not a valid IPv4 address with prefix length\x1a(!rules.ipv4_with_prefixlen || this != ''H\x00R\x11ipv4WithPrefixlen\x12\xdc\x02\n" + - "\x13ipv6_with_prefixlen\x18\x1c \x01(\bB\xa9\x02\xc2H\xa5\x02\n" + - "\x8d\x01\n" + - "\x1astring.ipv6_with_prefixlen\x12/must be a valid IPv6 address with prefix length\x1a>!rules.ipv6_with_prefixlen || this == '' || this.isIpPrefix(6)\n" + - "\x92\x01\n" + - " string.ipv6_with_prefixlen_empty\x12Dvalue is empty, which is not a valid IPv6 address with prefix length\x1a(!rules.ipv6_with_prefixlen || this != ''H\x00R\x11ipv6WithPrefixlen\x12\xf6\x01\n" + - "\tip_prefix\x18\x1d \x01(\bB\xd6\x01\xc2H\xd2\x01\n" + - "f\n" + - "\x10string.ip_prefix\x12\x19must be a valid IP prefix\x1a7!rules.ip_prefix || this == '' || this.isIpPrefix(true)\n" + - "h\n" + - "\x16string.ip_prefix_empty\x12.value is empty, which is not a valid IP prefix\x1a\x1e!rules.ip_prefix || this != ''H\x00R\bipPrefix\x12\x89\x02\n" + - "\vipv4_prefix\x18\x1e \x01(\bB\xe5\x01\xc2H\xe1\x01\n" + - "o\n" + - "\x12string.ipv4_prefix\x12\x1bmust be a valid IPv4 prefix\x1a!rules.host_and_port || this == '' || this.isHostAndPort(true)\n" + - "y\n" + - "\x1astring.host_and_port_empty\x127value is empty, which is not a valid host and port pair\x1a\"!rules.host_and_port || this != ''H\x00R\vhostAndPort\x12\xf4\x01\n" + - "\x04ulid\x18# \x01(\bB\xdd\x01\xc2H\xd9\x01\n" + - "|\n" + - "\vstring.ulid\x12\x14must be a valid ULID\x1aW!rules.ulid || this == '' || this.matches('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$')\n" + - "Y\n" + - "\x11string.ulid_empty\x12)value is empty, which is not a valid ULID\x1a\x19!rules.ulid || this != ''H\x00R\x04ulid\x12\xe1\x02\n" + - "\fprotobuf_fqn\x18% \x01(\bB\xbb\x02\xc2H\xb7\x02\n" + - "\xaf\x01\n" + - "\x13string.protobuf_fqn\x12-must be a valid fully-qualified Protobuf name\x1ai!rules.protobuf_fqn || this == '' || this.matches('^[A-Za-z_][A-Za-z_0-9]*(\\\\.[A-Za-z_][A-Za-z_0-9]*)*$')\n" + - "\x82\x01\n" + - "\x19string.protobuf_fqn_empty\x12Bvalue is empty, which is not a valid fully-qualified Protobuf name\x1a!!rules.protobuf_fqn || this != ''H\x00R\vprotobufFqn\x12\xa1\x03\n" + - "\x10protobuf_dot_fqn\x18& \x01(\bB\xf4\x02\xc2H\xf0\x02\n" + - "\xcd\x01\n" + - "\x17string.protobuf_dot_fqn\x12@must be a valid fully-qualified Protobuf name with a leading dot\x1ap!rules.protobuf_dot_fqn || this == '' || this.matches('^\\\\.[A-Za-z_][A-Za-z_0-9]*(\\\\.[A-Za-z_][A-Za-z_0-9]*)*$')\n" + - "\x9d\x01\n" + - "\x1dstring.protobuf_dot_fqn_empty\x12Uvalue is empty, which is not a valid fully-qualified Protobuf name with a leading dot\x1a%!rules.protobuf_dot_fqn || this != ''H\x00R\x0eprotobufDotFqn\x12\xac\x05\n" + - "\x10well_known_regex\x18\x18 \x01(\x0e2\x18.buf.validate.KnownRegexB\xe5\x04\xc2H\xe1\x04\n" + - "\xea\x01\n" + - "#string.well_known_regex.header_name\x12 must be a valid HTTP header name\x1a\xa0\x01rules.well_known_regex != 1 || this == '' || this.matches(!has(rules.strict) || rules.strict ?'^:?[0-9a-zA-Z!#$%&\\'*+-.^_|~\\x60]+$' :'^[^\\u0000\\u000A\\u000D]+$')\n" + - "\x8d\x01\n" + - ")string.well_known_regex.header_name_empty\x125value is empty, which is not a valid HTTP header name\x1a)rules.well_known_regex != 1 || this != ''\n" + - "\xe1\x01\n" + - "$string.well_known_regex.header_value\x12!must be a valid HTTP header value\x1a\x95\x01rules.well_known_regex != 2 || this.matches(!has(rules.strict) || rules.strict ?'^[^\\u0000-\\u0008\\u000A-\\u001F\\u007F]*$' :'^[^\\u0000\\u000A\\u000D]*$')H\x00R\x0ewellKnownRegex\x12\x16\n" + - "\x06strict\x18\x19 \x01(\bR\x06strict\x125\n" + - "\aexample\x18\" \x03(\tB\x1b\xc2H\x18\n" + - "\x16\n" + - "\x0estring.example\x1a\x04trueR\aexample*\t\b\xe8\a\x10\x80\x80\x80\x80\x02B\f\n" + - "\n" + - "well_known\"\xca\x12\n" + - "\n" + - "BytesRules\x12\x81\x01\n" + - "\x05const\x18\x01 \x01(\fBk\xc2Hh\n" + - "f\n" + - "\vbytes.const\x1aWthis != getField(rules, 'const') ? 'must be %x'.format([getField(rules, 'const')]) : ''R\x05const\x12p\n" + - "\x03len\x18\r \x01(\x04B^\xc2H[\n" + - "Y\n" + - "\tbytes.len\x1aLuint(this.size()) != rules.len ? 'must be %s bytes'.format([rules.len]) : ''R\x03len\x12\x8b\x01\n" + - "\amin_len\x18\x02 \x01(\x04Br\xc2Ho\n" + - "m\n" + - "\rbytes.min_len\x1a\\uint(this.size()) < rules.min_len ? 'must be at least %s bytes'.format([rules.min_len]) : ''R\x06minLen\x12\x8a\x01\n" + - "\amax_len\x18\x03 \x01(\x04Bq\xc2Hn\n" + - "l\n" + - "\rbytes.max_len\x1a[uint(this.size()) > rules.max_len ? 'must be at most %s bytes'.format([rules.max_len]) : ''R\x06maxLen\x12\x93\x01\n" + - "\apattern\x18\x04 \x01(\tBy\xc2Hv\n" + - "t\n" + - "\rbytes.pattern\x1ac!string(this).matches(rules.pattern) ? 'must match regex pattern `%s`'.format([rules.pattern]) : ''R\apattern\x12\x83\x01\n" + - "\x06prefix\x18\x05 \x01(\fBk\xc2Hh\n" + - "f\n" + - "\fbytes.prefix\x1aV!this.startsWith(rules.prefix) ? 'does not have prefix %x'.format([rules.prefix]) : ''R\x06prefix\x12\x81\x01\n" + - "\x06suffix\x18\x06 \x01(\fBi\xc2Hf\n" + - "d\n" + - "\fbytes.suffix\x1aT!this.endsWith(rules.suffix) ? 'does not have suffix %x'.format([rules.suffix]) : ''R\x06suffix\x12\x87\x01\n" + - "\bcontains\x18\a \x01(\fBk\xc2Hh\n" + - "f\n" + - "\x0ebytes.contains\x1aT!this.contains(rules.contains) ? 'does not contain %x'.format([rules.contains]) : ''R\bcontains\x12\xa5\x01\n" + - "\x02in\x18\b \x03(\fB\x94\x01\xc2H\x90\x01\n" + - "\x8d\x01\n" + - "\bbytes.in\x1a\x80\x01getField(rules, 'in').size() > 0 && !(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''R\x02in\x12w\n" + - "\x06not_in\x18\t \x03(\fB`\xc2H]\n" + - "[\n" + - "\fbytes.not_in\x1aKthis in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''R\x05notIn\x12\xe9\x01\n" + - "\x02ip\x18\n" + - " \x01(\bB\xd6\x01\xc2H\xd2\x01\n" + - "n\n" + - "\bbytes.ip\x12\x1amust be a valid IP address\x1aF!rules.ip || this.size() == 0 || this.size() == 4 || this.size() == 16\n" + - "`\n" + - "\x0ebytes.ip_empty\x12/value is empty, which is not a valid IP address\x1a\x1d!rules.ip || this.size() != 0H\x00R\x02ip\x12\xe4\x01\n" + - "\x04ipv4\x18\v \x01(\bB\xcd\x01\xc2H\xc9\x01\n" + - "_\n" + - "\n" + - "bytes.ipv4\x12\x1cmust be a valid IPv4 address\x1a3!rules.ipv4 || this.size() == 0 || this.size() == 4\n" + - "f\n" + - "\x10bytes.ipv4_empty\x121value is empty, which is not a valid IPv4 address\x1a\x1f!rules.ipv4 || this.size() != 0H\x00R\x04ipv4\x12\xe5\x01\n" + - "\x04ipv6\x18\f \x01(\bB\xce\x01\xc2H\xca\x01\n" + - "`\n" + - "\n" + - "bytes.ipv6\x12\x1cmust be a valid IPv6 address\x1a4!rules.ipv6 || this.size() == 0 || this.size() == 16\n" + - "f\n" + - "\x10bytes.ipv6_empty\x121value is empty, which is not a valid IPv6 address\x1a\x1f!rules.ipv6 || this.size() != 0H\x00R\x04ipv6\x12\xd5\x01\n" + - "\x04uuid\x18\x0f \x01(\bB\xbe\x01\xc2H\xba\x01\n" + - "X\n" + - "\n" + - "bytes.uuid\x12\x14must be a valid UUID\x1a4!rules.uuid || this.size() == 0 || this.size() == 16\n" + - "^\n" + - "\x10bytes.uuid_empty\x12)value is empty, which is not a valid UUID\x1a\x1f!rules.uuid || this.size() != 0H\x00R\x04uuid\x124\n" + - "\aexample\x18\x0e \x03(\fB\x1a\xc2H\x17\n" + - "\x15\n" + - "\rbytes.example\x1a\x04trueR\aexample*\t\b\xe8\a\x10\x80\x80\x80\x80\x02B\f\n" + - "\n" + - "well_known\"\xea\x03\n" + - "\tEnumRules\x12\x83\x01\n" + - "\x05const\x18\x01 \x01(\x05Bm\xc2Hj\n" + - "h\n" + - "\n" + - "enum.const\x1aZthis != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''R\x05const\x12!\n" + - "\fdefined_only\x18\x02 \x01(\bR\vdefinedOnly\x12|\n" + - "\x02in\x18\x03 \x03(\x05Bl\xc2Hi\n" + - "g\n" + - "\aenum.in\x1a\\!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''R\x02in\x12v\n" + - "\x06not_in\x18\x04 \x03(\x05B_\xc2H\\\n" + - "Z\n" + - "\venum.not_in\x1aKthis in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''R\x05notIn\x123\n" + - "\aexample\x18\x05 \x03(\x05B\x19\xc2H\x16\n" + - "\x14\n" + - "\fenum.example\x1a\x04trueR\aexample*\t\b\xe8\a\x10\x80\x80\x80\x80\x02\"\x90\x04\n" + - "\rRepeatedRules\x12\xa0\x01\n" + - "\tmin_items\x18\x01 \x01(\x04B\x82\x01\xc2H\x7f\n" + - "}\n" + - "\x12repeated.min_items\x1aguint(this.size()) < rules.min_items ? 'must contain at least %d item(s)'.format([rules.min_items]) : ''R\bminItems\x12\xa6\x01\n" + - "\tmax_items\x18\x02 \x01(\x04B\x88\x01\xc2H\x84\x01\n" + - "\x81\x01\n" + - "\x12repeated.max_items\x1akuint(this.size()) > rules.max_items ? 'must contain no more than %s item(s)'.format([rules.max_items]) : ''R\bmaxItems\x12x\n" + - "\x06unique\x18\x03 \x01(\bB`\xc2H]\n" + - "[\n" + - "\x0frepeated.unique\x12(repeated value must contain unique items\x1a\x1e!rules.unique || this.unique()R\x06unique\x12.\n" + - "\x05items\x18\x04 \x01(\v2\x18.buf.validate.FieldRulesR\x05items*\t\b\xe8\a\x10\x80\x80\x80\x80\x02\"\xac\x03\n" + - "\bMapRules\x12\x99\x01\n" + - "\tmin_pairs\x18\x01 \x01(\x04B|\xc2Hy\n" + - "w\n" + - "\rmap.min_pairs\x1afuint(this.size()) < rules.min_pairs ? 'map must be at least %d entries'.format([rules.min_pairs]) : ''R\bminPairs\x12\x98\x01\n" + - "\tmax_pairs\x18\x02 \x01(\x04B{\xc2Hx\n" + - "v\n" + - "\rmap.max_pairs\x1aeuint(this.size()) > rules.max_pairs ? 'map must be at most %d entries'.format([rules.max_pairs]) : ''R\bmaxPairs\x12,\n" + - "\x04keys\x18\x04 \x01(\v2\x18.buf.validate.FieldRulesR\x04keys\x120\n" + - "\x06values\x18\x05 \x01(\v2\x18.buf.validate.FieldRulesR\x06values*\t\b\xe8\a\x10\x80\x80\x80\x80\x02\"1\n" + - "\bAnyRules\x12\x0e\n" + - "\x02in\x18\x02 \x03(\tR\x02in\x12\x15\n" + - "\x06not_in\x18\x03 \x03(\tR\x05notIn\"\xec\x16\n" + - "\rDurationRules\x12\xa2\x01\n" + - "\x05const\x18\x02 \x01(\v2\x19.google.protobuf.DurationBq\xc2Hn\n" + - "l\n" + - "\x0eduration.const\x1aZthis != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''R\x05const\x12\xa6\x01\n" + - "\x02lt\x18\x03 \x01(\v2\x19.google.protobuf.DurationBy\xc2Hv\n" + - "t\n" + - "\vduration.lt\x1ae!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'must be less than %s'.format([rules.lt]) : ''H\x00R\x02lt\x12\xb9\x01\n" + - "\x03lte\x18\x04 \x01(\v2\x19.google.protobuf.DurationB\x89\x01\xc2H\x85\x01\n" + - "\x82\x01\n" + - "\fduration.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'must be less than or equal to %s'.format([rules.lte]) : ''H\x00R\x03lte\x12\xa7\a\n" + - "\x02gt\x18\x05 \x01(\v2\x19.google.protobuf.DurationB\xf9\x06\xc2H\xf5\x06\n" + - "w\n" + - "\vduration.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'must be greater than %s'.format([rules.gt]) : ''\n" + - "\xb0\x01\n" + - "\x0eduration.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''\n" + - "\xb8\x01\n" + - "\x18duration.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''\n" + - "\xc0\x01\n" + - "\x0fduration.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''\n" + - "\xc8\x01\n" + - "\x19duration.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''H\x01R\x02gt\x12\xf4\a\n" + - "\x03gte\x18\x06 \x01(\v2\x19.google.protobuf.DurationB\xc4\a\xc2H\xc0\a\n" + - "\x85\x01\n" + - "\fduration.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'must be greater than or equal to %s'.format([rules.gte]) : ''\n" + - "\xbf\x01\n" + - "\x0fduration.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''\n" + - "\xc7\x01\n" + - "\x19duration.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''\n" + - "\xcf\x01\n" + - "\x10duration.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''\n" + - "\xd7\x01\n" + - "\x1aduration.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''H\x01R\x03gte\x12\x9b\x01\n" + - "\x02in\x18\a \x03(\v2\x19.google.protobuf.DurationBp\xc2Hm\n" + - "k\n" + - "\vduration.in\x1a\\!(this in getField(rules, 'in')) ? 'must be in list %s'.format([getField(rules, 'in')]) : ''R\x02in\x12\x95\x01\n" + - "\x06not_in\x18\b \x03(\v2\x19.google.protobuf.DurationBc\xc2H`\n" + - "^\n" + - "\x0fduration.not_in\x1aKthis in rules.not_in ? 'must not be in list %s'.format([rules.not_in]) : ''R\x05notIn\x12R\n" + - "\aexample\x18\t \x03(\v2\x19.google.protobuf.DurationB\x1d\xc2H\x1a\n" + - "\x18\n" + - "\x10duration.example\x1a\x04trueR\aexample*\t\b\xe8\a\x10\x80\x80\x80\x80\x02B\v\n" + - "\tless_thanB\x0e\n" + - "\fgreater_than\"\x86\x06\n" + - "\x0eFieldMaskRules\x12\xc0\x01\n" + - "\x05const\x18\x01 \x01(\v2\x1a.google.protobuf.FieldMaskB\x8d\x01\xc2H\x89\x01\n" + - "\x86\x01\n" + - "\x10field_mask.const\x1arthis.paths != getField(rules, 'const').paths ? 'must equal paths %s'.format([getField(rules, 'const').paths]) : ''R\x05const\x12\xd7\x01\n" + - "\x02in\x18\x02 \x03(\tB\xc6\x01\xc2H\xc2\x01\n" + - "\xbf\x01\n" + - "\rfield_mask.in\x1a\xad\x01!this.paths.all(p, p in getField(rules, 'in') || getField(rules, 'in').exists(f, p.startsWith(f+'.'))) ? 'must only contain paths in %s'.format([getField(rules, 'in')]) : ''R\x02in\x12\xf4\x01\n" + - "\x06not_in\x18\x03 \x03(\tB\xdc\x01\xc2H\xd8\x01\n" + - "\xd5\x01\n" + - "\x11field_mask.not_in\x1a\xbf\x01!this.paths.all(p, !(p in getField(rules, 'not_in') || getField(rules, 'not_in').exists(f, p.startsWith(f+'.')))) ? 'must not contain any paths in %s'.format([getField(rules, 'not_in')]) : ''R\x05notIn\x12U\n" + - "\aexample\x18\x04 \x03(\v2\x1a.google.protobuf.FieldMaskB\x1f\xc2H\x1c\n" + - "\x1a\n" + - "\x12field_mask.example\x1a\x04trueR\aexample*\t\b\xe8\a\x10\x80\x80\x80\x80\x02\"\xe8\x17\n" + - "\x0eTimestampRules\x12\xa4\x01\n" + - "\x05const\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampBr\xc2Ho\n" + - "m\n" + - "\x0ftimestamp.const\x1aZthis != getField(rules, 'const') ? 'must equal %s'.format([getField(rules, 'const')]) : ''R\x05const\x12\xa8\x01\n" + - "\x02lt\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampBz\xc2Hw\n" + - "u\n" + - "\ftimestamp.lt\x1ae!has(rules.gte) && !has(rules.gt) && this >= rules.lt? 'must be less than %s'.format([rules.lt]) : ''H\x00R\x02lt\x12\xbb\x01\n" + - "\x03lte\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampB\x8a\x01\xc2H\x86\x01\n" + - "\x83\x01\n" + - "\rtimestamp.lte\x1ar!has(rules.gte) && !has(rules.gt) && this > rules.lte? 'must be less than or equal to %s'.format([rules.lte]) : ''H\x00R\x03lte\x12m\n" + - "\x06lt_now\x18\a \x01(\bBT\xc2HQ\n" + - "O\n" + - "\x10timestamp.lt_now\x1a;(rules.lt_now && this > now) ? 'must be less than now' : ''H\x00R\x05ltNow\x12\xad\a\n" + - "\x02gt\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampB\xfe\x06\xc2H\xfa\x06\n" + - "x\n" + - "\ftimestamp.gt\x1ah!has(rules.lt) && !has(rules.lte) && this <= rules.gt? 'must be greater than %s'.format([rules.gt]) : ''\n" + - "\xb1\x01\n" + - "\x0ftimestamp.gt_lt\x1a\x9d\x01has(rules.lt) && rules.lt >= rules.gt && (this >= rules.lt || this <= rules.gt)? 'must be greater than %s and less than %s'.format([rules.gt, rules.lt]) : ''\n" + - "\xb9\x01\n" + - "\x19timestamp.gt_lt_exclusive\x1a\x9b\x01has(rules.lt) && rules.lt < rules.gt && (rules.lt <= this && this <= rules.gt)? 'must be greater than %s or less than %s'.format([rules.gt, rules.lt]) : ''\n" + - "\xc1\x01\n" + - "\x10timestamp.gt_lte\x1a\xac\x01has(rules.lte) && rules.lte >= rules.gt && (this > rules.lte || this <= rules.gt)? 'must be greater than %s and less than or equal to %s'.format([rules.gt, rules.lte]) : ''\n" + - "\xc9\x01\n" + - "\x1atimestamp.gt_lte_exclusive\x1a\xaa\x01has(rules.lte) && rules.lte < rules.gt && (rules.lte < this && this <= rules.gt)? 'must be greater than %s or less than or equal to %s'.format([rules.gt, rules.lte]) : ''H\x01R\x02gt\x12\xfa\a\n" + - "\x03gte\x18\x06 \x01(\v2\x1a.google.protobuf.TimestampB\xc9\a\xc2H\xc5\a\n" + - "\x86\x01\n" + - "\rtimestamp.gte\x1au!has(rules.lt) && !has(rules.lte) && this < rules.gte? 'must be greater than or equal to %s'.format([rules.gte]) : ''\n" + - "\xc0\x01\n" + - "\x10timestamp.gte_lt\x1a\xab\x01has(rules.lt) && rules.lt >= rules.gte && (this >= rules.lt || this < rules.gte)? 'must be greater than or equal to %s and less than %s'.format([rules.gte, rules.lt]) : ''\n" + - "\xc8\x01\n" + - "\x1atimestamp.gte_lt_exclusive\x1a\xa9\x01has(rules.lt) && rules.lt < rules.gte && (rules.lt <= this && this < rules.gte)? 'must be greater than or equal to %s or less than %s'.format([rules.gte, rules.lt]) : ''\n" + - "\xd0\x01\n" + - "\x11timestamp.gte_lte\x1a\xba\x01has(rules.lte) && rules.lte >= rules.gte && (this > rules.lte || this < rules.gte)? 'must be greater than or equal to %s and less than or equal to %s'.format([rules.gte, rules.lte]) : ''\n" + - "\xd8\x01\n" + - "\x1btimestamp.gte_lte_exclusive\x1a\xb8\x01has(rules.lte) && rules.lte < rules.gte && (rules.lte < this && this < rules.gte)? 'must be greater than or equal to %s or less than or equal to %s'.format([rules.gte, rules.lte]) : ''H\x01R\x03gte\x12p\n" + - "\x06gt_now\x18\b \x01(\bBW\xc2HT\n" + - "R\n" + - "\x10timestamp.gt_now\x1a>(rules.gt_now && this < now) ? 'must be greater than now' : ''H\x01R\x05gtNow\x12\xb9\x01\n" + - "\x06within\x18\t \x01(\v2\x19.google.protobuf.DurationB\x85\x01\xc2H\x81\x01\n" + - "\x7f\n" + - "\x10timestamp.within\x1akthis < now-rules.within || this > now+rules.within ? 'must be within %s of now'.format([rules.within]) : ''R\x06within\x12T\n" + - "\aexample\x18\n" + - " \x03(\v2\x1a.google.protobuf.TimestampB\x1e\xc2H\x1b\n" + - "\x19\n" + - "\x11timestamp.example\x1a\x04trueR\aexample*\t\b\xe8\a\x10\x80\x80\x80\x80\x02B\v\n" + - "\tless_thanB\x0e\n" + - "\fgreater_than\"E\n" + - "\n" + - "Violations\x127\n" + - "\n" + - "violations\x18\x01 \x03(\v2\x17.buf.validate.ViolationR\n" + - "violations\"\xc5\x01\n" + - "\tViolation\x12-\n" + - "\x05field\x18\x05 \x01(\v2\x17.buf.validate.FieldPathR\x05field\x12+\n" + - "\x04rule\x18\x06 \x01(\v2\x17.buf.validate.FieldPathR\x04rule\x12\x17\n" + - "\arule_id\x18\x02 \x01(\tR\x06ruleId\x12\x18\n" + - "\amessage\x18\x03 \x01(\tR\amessage\x12\x17\n" + - "\afor_key\x18\x04 \x01(\bR\x06forKeyJ\x04\b\x01\x10\x02R\n" + - "field_path\"G\n" + - "\tFieldPath\x12:\n" + - "\belements\x18\x01 \x03(\v2\x1e.buf.validate.FieldPathElementR\belements\"\xcc\x03\n" + - "\x10FieldPathElement\x12!\n" + - "\ffield_number\x18\x01 \x01(\x05R\vfieldNumber\x12\x1d\n" + - "\n" + - "field_name\x18\x02 \x01(\tR\tfieldName\x12I\n" + - "\n" + - "field_type\x18\x03 \x01(\x0e2*.google.protobuf.FieldDescriptorProto.TypeR\tfieldType\x12E\n" + - "\bkey_type\x18\x04 \x01(\x0e2*.google.protobuf.FieldDescriptorProto.TypeR\akeyType\x12I\n" + - "\n" + - "value_type\x18\x05 \x01(\x0e2*.google.protobuf.FieldDescriptorProto.TypeR\tvalueType\x12\x16\n" + - "\x05index\x18\x06 \x01(\x04H\x00R\x05index\x12\x1b\n" + - "\bbool_key\x18\a \x01(\bH\x00R\aboolKey\x12\x19\n" + - "\aint_key\x18\b \x01(\x03H\x00R\x06intKey\x12\x1b\n" + - "\buint_key\x18\t \x01(\x04H\x00R\auintKey\x12\x1f\n" + - "\n" + - "string_key\x18\n" + - " \x01(\tH\x00R\tstringKeyB\v\n" + - "\tsubscript*\xa1\x01\n" + - "\x06Ignore\x12\x16\n" + - "\x12IGNORE_UNSPECIFIED\x10\x00\x12\x18\n" + - "\x14IGNORE_IF_ZERO_VALUE\x10\x01\x12\x11\n" + - "\rIGNORE_ALWAYS\x10\x03\"\x04\b\x02\x10\x02*\fIGNORE_EMPTY*\x0eIGNORE_DEFAULT*\x17IGNORE_IF_DEFAULT_VALUE*\x15IGNORE_IF_UNPOPULATED*n\n" + - "\n" + - "KnownRegex\x12\x1b\n" + - "\x17KNOWN_REGEX_UNSPECIFIED\x10\x00\x12 \n" + - "\x1cKNOWN_REGEX_HTTP_HEADER_NAME\x10\x01\x12!\n" + - "\x1dKNOWN_REGEX_HTTP_HEADER_VALUE\x10\x02:V\n" + - "\amessage\x12\x1f.google.protobuf.MessageOptions\x18\x87\t \x01(\v2\x1a.buf.validate.MessageRulesR\amessage:N\n" + - "\x05oneof\x12\x1d.google.protobuf.OneofOptions\x18\x87\t \x01(\v2\x18.buf.validate.OneofRulesR\x05oneof:N\n" + - "\x05field\x12\x1d.google.protobuf.FieldOptions\x18\x87\t \x01(\v2\x18.buf.validate.FieldRulesR\x05field:]\n" + - "\n" + - "predefined\x12\x1d.google.protobuf.FieldOptions\x18\x88\t \x01(\v2\x1d.buf.validate.PredefinedRulesR\n" + - "predefinedB\xbb\x01\n" + - "\x10com.buf.validateB\rValidateProtoP\x01ZGbuf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate\xa2\x02\x03BVX\xaa\x02\fBuf.Validate\xca\x02\fBuf\\Validate\xe2\x02\x18Buf\\Validate\\GPBMetadata\xea\x02\rBuf::Validate" - -var ( - file_buf_validate_validate_proto_rawDescOnce sync.Once - file_buf_validate_validate_proto_rawDescData []byte -) - -func file_buf_validate_validate_proto_rawDescGZIP() []byte { - file_buf_validate_validate_proto_rawDescOnce.Do(func() { - file_buf_validate_validate_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_buf_validate_validate_proto_rawDesc), len(file_buf_validate_validate_proto_rawDesc))) - }) - return file_buf_validate_validate_proto_rawDescData -} - -var file_buf_validate_validate_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_buf_validate_validate_proto_msgTypes = make([]protoimpl.MessageInfo, 32) -var file_buf_validate_validate_proto_goTypes = []any{ - (Ignore)(0), // 0: buf.validate.Ignore - (KnownRegex)(0), // 1: buf.validate.KnownRegex - (*Rule)(nil), // 2: buf.validate.Rule - (*MessageRules)(nil), // 3: buf.validate.MessageRules - (*MessageOneofRule)(nil), // 4: buf.validate.MessageOneofRule - (*OneofRules)(nil), // 5: buf.validate.OneofRules - (*FieldRules)(nil), // 6: buf.validate.FieldRules - (*PredefinedRules)(nil), // 7: buf.validate.PredefinedRules - (*FloatRules)(nil), // 8: buf.validate.FloatRules - (*DoubleRules)(nil), // 9: buf.validate.DoubleRules - (*Int32Rules)(nil), // 10: buf.validate.Int32Rules - (*Int64Rules)(nil), // 11: buf.validate.Int64Rules - (*UInt32Rules)(nil), // 12: buf.validate.UInt32Rules - (*UInt64Rules)(nil), // 13: buf.validate.UInt64Rules - (*SInt32Rules)(nil), // 14: buf.validate.SInt32Rules - (*SInt64Rules)(nil), // 15: buf.validate.SInt64Rules - (*Fixed32Rules)(nil), // 16: buf.validate.Fixed32Rules - (*Fixed64Rules)(nil), // 17: buf.validate.Fixed64Rules - (*SFixed32Rules)(nil), // 18: buf.validate.SFixed32Rules - (*SFixed64Rules)(nil), // 19: buf.validate.SFixed64Rules - (*BoolRules)(nil), // 20: buf.validate.BoolRules - (*StringRules)(nil), // 21: buf.validate.StringRules - (*BytesRules)(nil), // 22: buf.validate.BytesRules - (*EnumRules)(nil), // 23: buf.validate.EnumRules - (*RepeatedRules)(nil), // 24: buf.validate.RepeatedRules - (*MapRules)(nil), // 25: buf.validate.MapRules - (*AnyRules)(nil), // 26: buf.validate.AnyRules - (*DurationRules)(nil), // 27: buf.validate.DurationRules - (*FieldMaskRules)(nil), // 28: buf.validate.FieldMaskRules - (*TimestampRules)(nil), // 29: buf.validate.TimestampRules - (*Violations)(nil), // 30: buf.validate.Violations - (*Violation)(nil), // 31: buf.validate.Violation - (*FieldPath)(nil), // 32: buf.validate.FieldPath - (*FieldPathElement)(nil), // 33: buf.validate.FieldPathElement - (*durationpb.Duration)(nil), // 34: google.protobuf.Duration - (*fieldmaskpb.FieldMask)(nil), // 35: google.protobuf.FieldMask - (*timestamppb.Timestamp)(nil), // 36: google.protobuf.Timestamp - (descriptorpb.FieldDescriptorProto_Type)(0), // 37: google.protobuf.FieldDescriptorProto.Type - (*descriptorpb.MessageOptions)(nil), // 38: google.protobuf.MessageOptions - (*descriptorpb.OneofOptions)(nil), // 39: google.protobuf.OneofOptions - (*descriptorpb.FieldOptions)(nil), // 40: google.protobuf.FieldOptions -} -var file_buf_validate_validate_proto_depIdxs = []int32{ - 2, // 0: buf.validate.MessageRules.cel:type_name -> buf.validate.Rule - 4, // 1: buf.validate.MessageRules.oneof:type_name -> buf.validate.MessageOneofRule - 2, // 2: buf.validate.FieldRules.cel:type_name -> buf.validate.Rule - 0, // 3: buf.validate.FieldRules.ignore:type_name -> buf.validate.Ignore - 8, // 4: buf.validate.FieldRules.float:type_name -> buf.validate.FloatRules - 9, // 5: buf.validate.FieldRules.double:type_name -> buf.validate.DoubleRules - 10, // 6: buf.validate.FieldRules.int32:type_name -> buf.validate.Int32Rules - 11, // 7: buf.validate.FieldRules.int64:type_name -> buf.validate.Int64Rules - 12, // 8: buf.validate.FieldRules.uint32:type_name -> buf.validate.UInt32Rules - 13, // 9: buf.validate.FieldRules.uint64:type_name -> buf.validate.UInt64Rules - 14, // 10: buf.validate.FieldRules.sint32:type_name -> buf.validate.SInt32Rules - 15, // 11: buf.validate.FieldRules.sint64:type_name -> buf.validate.SInt64Rules - 16, // 12: buf.validate.FieldRules.fixed32:type_name -> buf.validate.Fixed32Rules - 17, // 13: buf.validate.FieldRules.fixed64:type_name -> buf.validate.Fixed64Rules - 18, // 14: buf.validate.FieldRules.sfixed32:type_name -> buf.validate.SFixed32Rules - 19, // 15: buf.validate.FieldRules.sfixed64:type_name -> buf.validate.SFixed64Rules - 20, // 16: buf.validate.FieldRules.bool:type_name -> buf.validate.BoolRules - 21, // 17: buf.validate.FieldRules.string:type_name -> buf.validate.StringRules - 22, // 18: buf.validate.FieldRules.bytes:type_name -> buf.validate.BytesRules - 23, // 19: buf.validate.FieldRules.enum:type_name -> buf.validate.EnumRules - 24, // 20: buf.validate.FieldRules.repeated:type_name -> buf.validate.RepeatedRules - 25, // 21: buf.validate.FieldRules.map:type_name -> buf.validate.MapRules - 26, // 22: buf.validate.FieldRules.any:type_name -> buf.validate.AnyRules - 27, // 23: buf.validate.FieldRules.duration:type_name -> buf.validate.DurationRules - 28, // 24: buf.validate.FieldRules.field_mask:type_name -> buf.validate.FieldMaskRules - 29, // 25: buf.validate.FieldRules.timestamp:type_name -> buf.validate.TimestampRules - 2, // 26: buf.validate.PredefinedRules.cel:type_name -> buf.validate.Rule - 1, // 27: buf.validate.StringRules.well_known_regex:type_name -> buf.validate.KnownRegex - 6, // 28: buf.validate.RepeatedRules.items:type_name -> buf.validate.FieldRules - 6, // 29: buf.validate.MapRules.keys:type_name -> buf.validate.FieldRules - 6, // 30: buf.validate.MapRules.values:type_name -> buf.validate.FieldRules - 34, // 31: buf.validate.DurationRules.const:type_name -> google.protobuf.Duration - 34, // 32: buf.validate.DurationRules.lt:type_name -> google.protobuf.Duration - 34, // 33: buf.validate.DurationRules.lte:type_name -> google.protobuf.Duration - 34, // 34: buf.validate.DurationRules.gt:type_name -> google.protobuf.Duration - 34, // 35: buf.validate.DurationRules.gte:type_name -> google.protobuf.Duration - 34, // 36: buf.validate.DurationRules.in:type_name -> google.protobuf.Duration - 34, // 37: buf.validate.DurationRules.not_in:type_name -> google.protobuf.Duration - 34, // 38: buf.validate.DurationRules.example:type_name -> google.protobuf.Duration - 35, // 39: buf.validate.FieldMaskRules.const:type_name -> google.protobuf.FieldMask - 35, // 40: buf.validate.FieldMaskRules.example:type_name -> google.protobuf.FieldMask - 36, // 41: buf.validate.TimestampRules.const:type_name -> google.protobuf.Timestamp - 36, // 42: buf.validate.TimestampRules.lt:type_name -> google.protobuf.Timestamp - 36, // 43: buf.validate.TimestampRules.lte:type_name -> google.protobuf.Timestamp - 36, // 44: buf.validate.TimestampRules.gt:type_name -> google.protobuf.Timestamp - 36, // 45: buf.validate.TimestampRules.gte:type_name -> google.protobuf.Timestamp - 34, // 46: buf.validate.TimestampRules.within:type_name -> google.protobuf.Duration - 36, // 47: buf.validate.TimestampRules.example:type_name -> google.protobuf.Timestamp - 31, // 48: buf.validate.Violations.violations:type_name -> buf.validate.Violation - 32, // 49: buf.validate.Violation.field:type_name -> buf.validate.FieldPath - 32, // 50: buf.validate.Violation.rule:type_name -> buf.validate.FieldPath - 33, // 51: buf.validate.FieldPath.elements:type_name -> buf.validate.FieldPathElement - 37, // 52: buf.validate.FieldPathElement.field_type:type_name -> google.protobuf.FieldDescriptorProto.Type - 37, // 53: buf.validate.FieldPathElement.key_type:type_name -> google.protobuf.FieldDescriptorProto.Type - 37, // 54: buf.validate.FieldPathElement.value_type:type_name -> google.protobuf.FieldDescriptorProto.Type - 38, // 55: buf.validate.message:extendee -> google.protobuf.MessageOptions - 39, // 56: buf.validate.oneof:extendee -> google.protobuf.OneofOptions - 40, // 57: buf.validate.field:extendee -> google.protobuf.FieldOptions - 40, // 58: buf.validate.predefined:extendee -> google.protobuf.FieldOptions - 3, // 59: buf.validate.message:type_name -> buf.validate.MessageRules - 5, // 60: buf.validate.oneof:type_name -> buf.validate.OneofRules - 6, // 61: buf.validate.field:type_name -> buf.validate.FieldRules - 7, // 62: buf.validate.predefined:type_name -> buf.validate.PredefinedRules - 63, // [63:63] is the sub-list for method output_type - 63, // [63:63] is the sub-list for method input_type - 59, // [59:63] is the sub-list for extension type_name - 55, // [55:59] is the sub-list for extension extendee - 0, // [0:55] is the sub-list for field type_name -} - -func init() { file_buf_validate_validate_proto_init() } -func file_buf_validate_validate_proto_init() { - if File_buf_validate_validate_proto != nil { - return - } - file_buf_validate_validate_proto_msgTypes[4].OneofWrappers = []any{ - (*FieldRules_Float)(nil), - (*FieldRules_Double)(nil), - (*FieldRules_Int32)(nil), - (*FieldRules_Int64)(nil), - (*FieldRules_Uint32)(nil), - (*FieldRules_Uint64)(nil), - (*FieldRules_Sint32)(nil), - (*FieldRules_Sint64)(nil), - (*FieldRules_Fixed32)(nil), - (*FieldRules_Fixed64)(nil), - (*FieldRules_Sfixed32)(nil), - (*FieldRules_Sfixed64)(nil), - (*FieldRules_Bool)(nil), - (*FieldRules_String_)(nil), - (*FieldRules_Bytes)(nil), - (*FieldRules_Enum)(nil), - (*FieldRules_Repeated)(nil), - (*FieldRules_Map)(nil), - (*FieldRules_Any)(nil), - (*FieldRules_Duration)(nil), - (*FieldRules_FieldMask)(nil), - (*FieldRules_Timestamp)(nil), - } - file_buf_validate_validate_proto_msgTypes[6].OneofWrappers = []any{ - (*FloatRules_Lt)(nil), - (*FloatRules_Lte)(nil), - (*FloatRules_Gt)(nil), - (*FloatRules_Gte)(nil), - } - file_buf_validate_validate_proto_msgTypes[7].OneofWrappers = []any{ - (*DoubleRules_Lt)(nil), - (*DoubleRules_Lte)(nil), - (*DoubleRules_Gt)(nil), - (*DoubleRules_Gte)(nil), - } - file_buf_validate_validate_proto_msgTypes[8].OneofWrappers = []any{ - (*Int32Rules_Lt)(nil), - (*Int32Rules_Lte)(nil), - (*Int32Rules_Gt)(nil), - (*Int32Rules_Gte)(nil), - } - file_buf_validate_validate_proto_msgTypes[9].OneofWrappers = []any{ - (*Int64Rules_Lt)(nil), - (*Int64Rules_Lte)(nil), - (*Int64Rules_Gt)(nil), - (*Int64Rules_Gte)(nil), - } - file_buf_validate_validate_proto_msgTypes[10].OneofWrappers = []any{ - (*UInt32Rules_Lt)(nil), - (*UInt32Rules_Lte)(nil), - (*UInt32Rules_Gt)(nil), - (*UInt32Rules_Gte)(nil), - } - file_buf_validate_validate_proto_msgTypes[11].OneofWrappers = []any{ - (*UInt64Rules_Lt)(nil), - (*UInt64Rules_Lte)(nil), - (*UInt64Rules_Gt)(nil), - (*UInt64Rules_Gte)(nil), - } - file_buf_validate_validate_proto_msgTypes[12].OneofWrappers = []any{ - (*SInt32Rules_Lt)(nil), - (*SInt32Rules_Lte)(nil), - (*SInt32Rules_Gt)(nil), - (*SInt32Rules_Gte)(nil), - } - file_buf_validate_validate_proto_msgTypes[13].OneofWrappers = []any{ - (*SInt64Rules_Lt)(nil), - (*SInt64Rules_Lte)(nil), - (*SInt64Rules_Gt)(nil), - (*SInt64Rules_Gte)(nil), - } - file_buf_validate_validate_proto_msgTypes[14].OneofWrappers = []any{ - (*Fixed32Rules_Lt)(nil), - (*Fixed32Rules_Lte)(nil), - (*Fixed32Rules_Gt)(nil), - (*Fixed32Rules_Gte)(nil), - } - file_buf_validate_validate_proto_msgTypes[15].OneofWrappers = []any{ - (*Fixed64Rules_Lt)(nil), - (*Fixed64Rules_Lte)(nil), - (*Fixed64Rules_Gt)(nil), - (*Fixed64Rules_Gte)(nil), - } - file_buf_validate_validate_proto_msgTypes[16].OneofWrappers = []any{ - (*SFixed32Rules_Lt)(nil), - (*SFixed32Rules_Lte)(nil), - (*SFixed32Rules_Gt)(nil), - (*SFixed32Rules_Gte)(nil), - } - file_buf_validate_validate_proto_msgTypes[17].OneofWrappers = []any{ - (*SFixed64Rules_Lt)(nil), - (*SFixed64Rules_Lte)(nil), - (*SFixed64Rules_Gt)(nil), - (*SFixed64Rules_Gte)(nil), - } - file_buf_validate_validate_proto_msgTypes[19].OneofWrappers = []any{ - (*StringRules_Email)(nil), - (*StringRules_Hostname)(nil), - (*StringRules_Ip)(nil), - (*StringRules_Ipv4)(nil), - (*StringRules_Ipv6)(nil), - (*StringRules_Uri)(nil), - (*StringRules_UriRef)(nil), - (*StringRules_Address)(nil), - (*StringRules_Uuid)(nil), - (*StringRules_Tuuid)(nil), - (*StringRules_IpWithPrefixlen)(nil), - (*StringRules_Ipv4WithPrefixlen)(nil), - (*StringRules_Ipv6WithPrefixlen)(nil), - (*StringRules_IpPrefix)(nil), - (*StringRules_Ipv4Prefix)(nil), - (*StringRules_Ipv6Prefix)(nil), - (*StringRules_HostAndPort)(nil), - (*StringRules_Ulid)(nil), - (*StringRules_ProtobufFqn)(nil), - (*StringRules_ProtobufDotFqn)(nil), - (*StringRules_WellKnownRegex)(nil), - } - file_buf_validate_validate_proto_msgTypes[20].OneofWrappers = []any{ - (*BytesRules_Ip)(nil), - (*BytesRules_Ipv4)(nil), - (*BytesRules_Ipv6)(nil), - (*BytesRules_Uuid)(nil), - } - file_buf_validate_validate_proto_msgTypes[25].OneofWrappers = []any{ - (*DurationRules_Lt)(nil), - (*DurationRules_Lte)(nil), - (*DurationRules_Gt)(nil), - (*DurationRules_Gte)(nil), - } - file_buf_validate_validate_proto_msgTypes[27].OneofWrappers = []any{ - (*TimestampRules_Lt)(nil), - (*TimestampRules_Lte)(nil), - (*TimestampRules_LtNow)(nil), - (*TimestampRules_Gt)(nil), - (*TimestampRules_Gte)(nil), - (*TimestampRules_GtNow)(nil), - } - file_buf_validate_validate_proto_msgTypes[31].OneofWrappers = []any{ - (*FieldPathElement_Index)(nil), - (*FieldPathElement_BoolKey)(nil), - (*FieldPathElement_IntKey)(nil), - (*FieldPathElement_UintKey)(nil), - (*FieldPathElement_StringKey)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: unsafe.Slice(unsafe.StringData(file_buf_validate_validate_proto_rawDesc), len(file_buf_validate_validate_proto_rawDesc)), - NumEnums: 2, - NumMessages: 32, - NumExtensions: 4, - NumServices: 0, - }, - GoTypes: file_buf_validate_validate_proto_goTypes, - DependencyIndexes: file_buf_validate_validate_proto_depIdxs, - EnumInfos: file_buf_validate_validate_proto_enumTypes, - MessageInfos: file_buf_validate_validate_proto_msgTypes, - ExtensionInfos: file_buf_validate_validate_proto_extTypes, - }.Build() - File_buf_validate_validate_proto = out.File - file_buf_validate_validate_proto_goTypes = nil - file_buf_validate_validate_proto_depIdxs = nil -} From 4885379414a41676029d4602270bbb1fc95cc69b Mon Sep 17 00:00:00 2001 From: Ravi Suhag Date: Mon, 20 Apr 2026 21:32:09 -0500 Subject: [PATCH 4/6] fix: fetch proton from remote git repo instead of local directory --- Makefile | 1 - buf.gen.yaml | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 12046286..671afd94 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,6 @@ proto: ## Generate the protobuf files @echo " > generating protobuf from raystack/proton" @echo " > [info] make sure correct version of dependencies are installed using 'make install'" @buf generate - @find gen/raystack -mindepth 1 -maxdepth 1 ! -name stencil -exec rm -rf {} + @rm -rf gen/buf @echo " > protobuf compilation finished" diff --git a/buf.gen.yaml b/buf.gen.yaml index a11c9839..0e7c1151 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -1,9 +1,9 @@ version: v2 -# Proto source lives in the proton repo (../proton). -# After running `buf generate`, remove unwanted generated files: -# find gen/raystack -mindepth 1 -maxdepth 1 ! -name stencil -exec rm -rf {} + inputs: - - directory: ../proton + - git_repo: https://github.com/raystack/proton.git + branch: main + paths: + - raystack/stencil - module: buf.build/bufbuild/protovalidate managed: enabled: true From 2c59b8a9eab5e991683f016d912cdccdd842900e Mon Sep 17 00:00:00 2001 From: Ravi Suhag Date: Mon, 20 Apr 2026 21:38:18 -0500 Subject: [PATCH 5/6] fix: move proton input to Makefile with configurable PROTON_REF --- Makefile | 8 ++++---- buf.gen.yaml | 6 ------ 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 671afd94..8fe5abf6 100644 --- a/Makefile +++ b/Makefile @@ -20,11 +20,11 @@ vet: ## Run the go vet tool lint: ## Run golang-ci lint golangci-lint run +PROTON_REF ?= main + proto: ## Generate the protobuf files - @echo " > generating protobuf from raystack/proton" - @echo " > [info] make sure correct version of dependencies are installed using 'make install'" - @buf generate - @rm -rf gen/buf + @echo " > generating protobuf from raystack/proton (ref: ${PROTON_REF})" + @buf generate "https://github.com/raystack/proton.git#ref=${PROTON_REF}" --path raystack/stencil @echo " > protobuf compilation finished" clean: ## Clean the build artifacts diff --git a/buf.gen.yaml b/buf.gen.yaml index 0e7c1151..c9291ebf 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -1,10 +1,4 @@ version: v2 -inputs: - - git_repo: https://github.com/raystack/proton.git - branch: main - paths: - - raystack/stencil - - module: buf.build/bufbuild/protovalidate managed: enabled: true override: From a18ea5beaf470def1f6ef990b2895d6aa1c685a5 Mon Sep 17 00:00:00 2001 From: Ravi Suhag Date: Mon, 20 Apr 2026 21:49:35 -0500 Subject: [PATCH 6/6] fix: pin proton commit in buf.gen.yaml instead of Makefile variable --- Makefile | 6 ++---- buf.gen.yaml | 5 +++++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 8fe5abf6..55f1b3c9 100644 --- a/Makefile +++ b/Makefile @@ -20,11 +20,9 @@ vet: ## Run the go vet tool lint: ## Run golang-ci lint golangci-lint run -PROTON_REF ?= main - proto: ## Generate the protobuf files - @echo " > generating protobuf from raystack/proton (ref: ${PROTON_REF})" - @buf generate "https://github.com/raystack/proton.git#ref=${PROTON_REF}" --path raystack/stencil + @echo " > generating protobuf from raystack/proton" + @buf generate @echo " > protobuf compilation finished" clean: ## Clean the build artifacts diff --git a/buf.gen.yaml b/buf.gen.yaml index c9291ebf..9094076d 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -1,4 +1,9 @@ version: v2 +inputs: + - git_repo: https://github.com/raystack/proton.git + ref: 8ef3e30859491f877a791fe0f9039370235c99b2 + paths: + - raystack/stencil managed: enabled: true override: