From 196bd259333d47918b502041d06455804a0178eb Mon Sep 17 00:00:00 2001 From: Jonathan Tatum Date: Wed, 11 Mar 2026 19:28:30 +0000 Subject: [PATCH 1/6] Optionally include reachable fieldpaths in prompt Update the AI prompt template to optionally include all of the reachable fields from the input variables along with any documentation. The fields are described in terms of CEL types. --- cel/BUILD.bazel | 7 +- cel/fieldpaths.go | 152 +++++++ cel/fieldpaths_test.go | 167 ++++++++ cel/prompt.go | 65 ++- cel/prompt_test.go | 75 +++- cel/templates/authoring.tmpl | 27 +- cel/testdata/BUILD.bazel | 7 +- cel/testdata/field_paths.prompt.txt | 403 ++++++++++++++++++ cel/testdata/macros.prompt.txt | 14 +- cel/testdata/mutant.proto | 8 + cel/testdata/team.proto | 5 + ...itive-descriptor-set-source-info.proto.bin | Bin 0 -> 1071 bytes common/doc.go | 13 + common/doc_test.go | 12 + common/types/pb/type.go | 8 + 15 files changed, 943 insertions(+), 20 deletions(-) create mode 100644 cel/fieldpaths.go create mode 100644 cel/fieldpaths_test.go create mode 100644 cel/testdata/field_paths.prompt.txt create mode 100755 cel/testdata/test_fds_with_source_info-transitive-descriptor-set-source-info.proto.bin diff --git a/cel/BUILD.bazel b/cel/BUILD.bazel index 89cf460d3..3a47990c2 100644 --- a/cel/BUILD.bazel +++ b/cel/BUILD.bazel @@ -10,6 +10,7 @@ go_library( "cel.go", "decls.go", "env.go", + "fieldpaths.go", "folding.go", "inlining.go", "io.go", @@ -43,6 +44,7 @@ go_library( "//interpreter:go_default_library", "//parser:go_default_library", "@dev_cel_expr//:expr", + "@dev_cel_expr//conformance/proto3:go_default_library", "@org_golang_google_genproto_googleapis_api//expr/v1alpha1:go_default_library", "@org_golang_google_protobuf//proto:go_default_library", "@org_golang_google_protobuf//reflect/protodesc:go_default_library", @@ -63,6 +65,7 @@ go_test( "cel_test.go", "decls_test.go", "env_test.go", + "fieldpaths_test.go", "folding_test.go", "inlining_test.go", "io_test.go", @@ -78,6 +81,7 @@ go_test( ], embedsrcs = [ "//cel/testdata:prompts", + "//cel/testdata:test_fds_with_source_info-transitive-descriptor-set-source-info.proto.bin", ], deps = [ "//common/operators:go_default_library", @@ -89,6 +93,7 @@ go_test( "//test:go_default_library", "//test/proto2pb:go_default_library", "//test/proto3pb:go_default_library", + "@com_github_google_go_cmp//cmp:go_default_library", "@org_golang_google_genproto_googleapis_api//expr/v1alpha1:go_default_library", "@org_golang_google_protobuf//encoding/prototext:go_default_library", "@org_golang_google_protobuf//proto:go_default_library", @@ -100,4 +105,4 @@ go_test( exports_files( ["templates/authoring.tmpl"], visibility = ["//visibility:public"], -) \ No newline at end of file +) diff --git a/cel/fieldpaths.go b/cel/fieldpaths.go new file mode 100644 index 000000000..fda88ba04 --- /dev/null +++ b/cel/fieldpaths.go @@ -0,0 +1,152 @@ +package cel + +import ( + "slices" + "strings" + + "github.com/google/cel-go/common" + "github.com/google/cel-go/common/types" +) + +// fieldPath represents a selection path to a field from a variable in a CEL environment. +type fieldPath struct { + celType *Type + // path represents the selection path to the field. + path string + description string + isLeaf bool +} + +func (f *fieldPath) Documentation() *common.Doc { + return common.NewFieldDoc(f.path, f.celType.String(), f.description) +} + +type backtrack struct { + // provider used to resolve types. + provider types.Provider + // paths of fields that have been visited along the path. + path []string + // types of fields that have been visited along the path. used to avoid cycles. + types []*Type +} + +func (b *backtrack) push(pathStep string, celType *Type) { + b.path = append(b.path, pathStep) + b.types = append(b.types, celType) +} + +func (b *backtrack) pop() { + b.path = b.path[:len(b.path)-1] + b.types = b.types[:len(b.types)-1] +} + +func formatPath(path []string) string { + var buffer strings.Builder + for i, p := range path { + if i == 0 { + buffer.WriteString(p) + continue + } + if strings.HasPrefix(p, "[") { + buffer.WriteString(p) + continue + } + buffer.WriteString(".") + buffer.WriteString(p) + } + return buffer.String() +} + +func (b *backtrack) expandFieldPaths(celType *Type, paths []*fieldPath) []*fieldPath { + if slices.ContainsFunc(b.types[:len(b.types)-1], func(t *Type) bool { return t.String() == celType.String() }) { + // Cycle detected, so stop expanding. + paths[len(paths)-1].isLeaf = false + return paths + } + switch celType.Kind() { + case types.StructKind: + fields, ok := b.provider.FindStructFieldNames(celType.String()) + if !ok { + // Caller added this type to the path, so it must be a leaf. + paths[len(paths)-1].isLeaf = true + return paths + } + for _, field := range fields { + fieldType, ok := b.provider.FindStructFieldType(celType.String(), field) + if !ok { + // Field not found, either hidden or an error. + continue + } + b.push(field, celType) + path := &fieldPath{ + celType: fieldType.Type, + path: formatPath(b.path), + description: fieldType.Description, + isLeaf: false, + } + paths = append(paths, path) + paths = b.expandFieldPaths(fieldType.Type, paths) + b.pop() + } + return paths + case types.MapKind: + if len(celType.Parameters()) != 2 { + // dynamic map, so treat as a leaf. + paths[len(paths)-1].isLeaf = true + return paths + } + mapKeyType := celType.Parameters()[0] + mapValueType := celType.Parameters()[1] + // Add a placeholder for the map key kind (the zero value). + keyIdentifier := "" + switch mapKeyType.Kind() { + case types.StringKind: + keyIdentifier = "[\"\"]" + case types.IntKind: + keyIdentifier = "[0]" + case types.UintKind: + keyIdentifier = "[0u]" + case types.BoolKind: + keyIdentifier = "[false]" + default: + // Caller added this type to the path, so it must be a leaf. + paths[len(paths)-1].isLeaf = true + return paths + } + b.push(keyIdentifier, mapValueType) + defer b.pop() + return b.expandFieldPaths(mapValueType, paths) + case types.ListKind: + if len(celType.Parameters()) != 1 { + // dynamic list, so treat as a leaf. + paths[len(paths)-1].isLeaf = true + return paths + } + listElemType := celType.Parameters()[0] + b.push("[0]", listElemType) + defer b.pop() + return b.expandFieldPaths(listElemType, paths) + default: + paths[len(paths)-1].isLeaf = true + } + + return paths +} + +// fieldPathsForType expands the reachable fields from the given root identifier. +func fieldPathsForType(provider types.Provider, identifier string, celType *Type) []*fieldPath { + b := &backtrack{ + provider: provider, + path: []string{identifier}, + types: []*Type{celType}, + } + paths := []*fieldPath{ + { + celType: celType, + path: identifier, + isLeaf: false, + }, + } + + return b.expandFieldPaths(celType, paths) +} diff --git a/cel/fieldpaths_test.go b/cel/fieldpaths_test.go new file mode 100644 index 000000000..340237a57 --- /dev/null +++ b/cel/fieldpaths_test.go @@ -0,0 +1,167 @@ +package cel + +import ( + "testing" + + tatpb "cel.dev/expr/conformance/proto3" +) + +func TestFieldPathsForTestAllTypes(t *testing.T) { + env, err := NewEnv( + Types(&tatpb.TestAllTypes{}), + Variable("t", ObjectType("cel.expr.conformance.proto3.NestedTestAllTypes")), + ) + if err != nil { + t.Fatalf("NewEnv() failed: %v", err) + } + + p := env.CELTypeProvider() + + paths := fieldPathsForType(p, "t", ObjectType("cel.expr.conformance.proto3.NestedTestAllTypes")) + if err != nil { + t.Fatalf("fieldPathsForType() failed: %v", err) + } + pathStrings := make([]string, 0, len(paths)) + for i, path := range paths { + t.Logf("path %d: %v", i, path.path) + pathStrings = append(pathStrings, path.path) + } + + tcs := []struct { + path string + typeName string + isLeaf bool + }{ + { + path: "t.payload.single_int64", + typeName: "int", + isLeaf: true, + }, + { + path: "t.payload.single_bytes", + typeName: "bytes", + isLeaf: true, + }, + { + path: "t.payload.standalone_enum", + typeName: "int", + isLeaf: true, + }, + { + path: "t.payload.single_bool", + typeName: "bool", + isLeaf: true, + }, + { + path: "t.payload.single_float", + typeName: "double", + isLeaf: true, + }, + { + path: "t.payload.repeated_double", + typeName: "list(double)", + isLeaf: true, + }, + { + path: "t.payload.single_timestamp", + typeName: "google.protobuf.Timestamp", + isLeaf: true, + }, + { + path: "t.payload.single_duration", + typeName: "google.protobuf.Duration", + isLeaf: true, + }, + { + path: "t.payload.single_any", + typeName: "google.protobuf.Any", + isLeaf: true, + }, + { + path: "t.payload.single_struct", + typeName: "map(string, dyn)", + isLeaf: true, + }, + { + path: "t.payload.list_value", + typeName: "list(dyn)", + isLeaf: true, + }, + { + path: "t.payload.single_value", + typeName: "dyn", + isLeaf: true, + }, + { + path: "t.payload.single_int32_wrapper", + typeName: "wrapper(int)", + isLeaf: true, + }, + { + path: "t.child", + typeName: "cel.expr.conformance.proto3.NestedTestAllTypes", + isLeaf: false, + }, + { + path: "t.payload.standalone_message", + typeName: "cel.expr.conformance.proto3.TestAllTypes.NestedMessage", + isLeaf: false, + }, + { + path: "t.payload.standalone_message.bb", + typeName: "int", + isLeaf: true, + }, + { + path: "t.payload.map_string_message", + typeName: "map(string, cel.expr.conformance.proto3.TestAllTypes.NestedMessage)", + isLeaf: false, + }, + { + path: "t.payload.repeated_nested_message[0].bb", + typeName: "int", + isLeaf: true, + }, + { + path: "t.payload.map_string_message[\"\"].bb", + typeName: "int", + isLeaf: true, + }, + { + path: "t.payload.map_int64_message[0].bb", + typeName: "int", + isLeaf: true, + }, + { + path: "t.payload.map_uint64_message[0u].bb", + typeName: "int", + isLeaf: true, + }, + { + path: "t.payload.map_bool_message[false].bb", + typeName: "int", + isLeaf: true, + }, + } + for _, tc := range tcs { + t.Run(tc.path, func(t *testing.T) { + found := false + for _, path := range paths { + if path.path == tc.path { + found = true + if path.celType.String() != tc.typeName { + t.Errorf("path %s has type %s, want %s", tc.path, path.celType.String(), tc.typeName) + } + if path.isLeaf != tc.isLeaf { + t.Errorf("path %s has isLeaf %t, want %t", tc.path, path.isLeaf, tc.isLeaf) + } + break + } + } + if !found { + t.Errorf("path %s not found in field paths", tc.path) + } + }) + } + +} diff --git a/cel/prompt.go b/cel/prompt.go index 929a26f91..c3bfef675 100644 --- a/cel/prompt.go +++ b/cel/prompt.go @@ -23,15 +23,48 @@ import ( "github.com/google/cel-go/common" "github.com/google/cel-go/common/operators" "github.com/google/cel-go/common/overloads" + "github.com/google/cel-go/common/types" ) //go:embed templates/authoring.tmpl var authoringPrompt string +// splitImpl splits a string into a list of strings. +// +// Normalizes extracted comments (trim common prefix whitespace and extra trailing newlines). +func splitImpl(str string) []string { + str = strings.TrimRight(str, " \n\t\r") + out := strings.Split(str, "\n") + if len(out) == 0 { + return nil + } + negative := strings.TrimLeft(out[0], " \t") + lenNegative := len(negative) + lenOut := len(out[0]) + if lenNegative == lenOut { + return out + } + prefix := out[0][:lenOut-lenNegative] + trimmed := make([]string, len(out)) + for i, line := range out { + if line == "" { + trimmed[i] = "" + continue + } + if !strings.HasPrefix(line, prefix) { + return out + } + trimmed[i] = strings.TrimPrefix(line, prefix) + } + + return trimmed +} + // AuthoringPrompt creates a prompt template from a CEL environment for the purpose of AI-assisted authoring. func AuthoringPrompt(env *Env) (*Prompt, error) { funcMap := template.FuncMap{ - "split": func(str string) []string { return strings.Split(str, "\n") }, + "split": splitImpl, + "newlineToSpace": func(str string) string { return strings.ReplaceAll(str, "\n", " ") }, } tmpl := template.New("cel").Funcs(funcMap) tmpl, err := tmpl.Parse(authoringPrompt) @@ -47,6 +80,17 @@ func AuthoringPrompt(env *Env) (*Prompt, error) { }, nil } +// AuthoringPrompt creates a prompt template from a CEL environment for the purpose of AI-assisted authoring. +// Includes documentation for all of the reachable field paths in the environment. +func AuthoringPromptWithFieldPaths(env *Env) (*Prompt, error) { + p, err := AuthoringPrompt(env) + if err != nil { + return nil, err + } + p.fieldPaths = true + return p, nil +} + // Prompt represents the core components of an LLM prompt based on a CEL environment. // // All fields of the prompt may be overwritten / modified with support for rendering the @@ -64,6 +108,9 @@ type Prompt struct { // tmpl is the text template base-configuration for rendering text. tmpl *template.Template + // fieldPaths is a flag to enable including reachable field paths in the prompt. + fieldPaths bool + // env reference used to collect variables, functions, and macros available to the prompt. env *Env } @@ -72,6 +119,7 @@ type promptInst struct { *Prompt Variables []*common.Doc + FieldPaths []*common.Doc Macros []*common.Doc Functions []*common.Doc UserPrompt string @@ -88,6 +136,20 @@ func (p *Prompt) Render(userPrompt string) string { sort.SliceStable(vars, func(i, j int) bool { return vars[i].Name < vars[j].Name }) + var fieldPaths []*common.Doc + if p.fieldPaths { + for _, v := range p.env.Variables() { + if v.Type().Kind() == types.StructKind { + paths := fieldPathsForType(p.env.CELTypeProvider(), v.Name(), v.Type()) + for _, path := range paths { + fieldPaths = append(fieldPaths, path.Documentation()) + } + } + } + } + sort.SliceStable(fieldPaths, func(i, j int) bool { + return fieldPaths[i].Name < fieldPaths[j].Name + }) macs := make([]*common.Doc, len(p.env.Macros())) for i, m := range p.env.Macros() { macs[i] = m.(common.Documentor).Documentation() @@ -105,6 +167,7 @@ func (p *Prompt) Render(userPrompt string) string { inst := &promptInst{ Prompt: p, Variables: vars, + FieldPaths: fieldPaths, Macros: macs, Functions: funcs, UserPrompt: userPrompt} diff --git a/cel/prompt_test.go b/cel/prompt_test.go index c4d3e6358..db92619e8 100644 --- a/cel/prompt_test.go +++ b/cel/prompt_test.go @@ -16,10 +16,14 @@ package cel import ( _ "embed" + "sync" "testing" "github.com/google/cel-go/common/env" - "github.com/google/cel-go/test" + "github.com/google/go-cmp/cmp" + + "google.golang.org/protobuf/proto" + dpb "google.golang.org/protobuf/types/descriptorpb" ) //go:embed testdata/basic.prompt.txt @@ -31,6 +35,26 @@ var wantMacrosPrompt string //go:embed testdata/standard_env.prompt.txt var wantStandardEnvPrompt string +//go:embed testdata/field_paths.prompt.txt +var wantFieldPathsPrompt string + +//go:embed testdata/test_fds_with_source_info-transitive-descriptor-set-source-info.proto.bin +var testFdsWithSourceInfo []byte + +var onceFds sync.Once +var fds *dpb.FileDescriptorSet + +func testFds(t *testing.T) *dpb.FileDescriptorSet { + onceFds.Do(func() { + fds = &dpb.FileDescriptorSet{} + err := proto.Unmarshal(testFdsWithSourceInfo, fds) + if err != nil { + t.Fatalf("failed to unmarshal testFdsWithSourceInfo: %v", err) + } + }) + return fds +} + func TestPromptTemplate(t *testing.T) { tests := []struct { name string @@ -56,7 +80,11 @@ func TestPromptTemplate(t *testing.T) { for _, tst := range tests { tc := tst t.Run(tc.name, func(t *testing.T) { - env, err := NewCustomEnv(tc.envOpts...) + envOpts := append([]EnvOption{TypeDescs(testFds(t))}, tc.envOpts...) + + env, err := NewCustomEnv( + envOpts..., + ) if err != nil { t.Fatalf("cel.NewCustomEnv() failed: %v", err) } @@ -65,8 +93,47 @@ func TestPromptTemplate(t *testing.T) { t.Fatalf("cel.AuthoringPrompt() failed: %v", err) } out := prompt.Render("") - if !test.Compare(out, tc.out) { - t.Errorf("got %s, wanted %s", out, tc.out) + if diff := cmp.Diff(tc.out, out); diff != "" { + t.Errorf("got %s, diff (-want +got): %s", out, diff) + } + }) + } +} + +func TestPromptTemplateFieldPaths(t *testing.T) { + tests := []struct { + name string + envOpts []EnvOption + out string + }{ + { + name: "standard_env", + envOpts: []EnvOption{ + Variable("team", ObjectType("cel.testdata.Team")), + StdLib(StdLibSubset(env.NewLibrarySubset().SetDisableMacros(true))), + }, + out: wantFieldPathsPrompt, + }, + } + + for _, tst := range tests { + tc := tst + t.Run(tc.name, func(t *testing.T) { + envOpts := append([]EnvOption{TypeDescs(testFds(t))}, tc.envOpts...) + + env, err := NewCustomEnv( + envOpts..., + ) + if err != nil { + t.Fatalf("cel.NewCustomEnv() failed: %v", err) + } + prompt, err := AuthoringPromptWithFieldPaths(env) + if err != nil { + t.Fatalf("cel.AuthoringPromptWithFieldPaths() failed: %v", err) + } + out := prompt.Render("") + if diff := cmp.Diff(tc.out, out); diff != "" { + t.Errorf("got %s, diff (-want +got): %s", out, diff) } }) } diff --git a/cel/templates/authoring.tmpl b/cel/templates/authoring.tmpl index d0b0133f1..d492ccda8 100644 --- a/cel/templates/authoring.tmpl +++ b/cel/templates/authoring.tmpl @@ -6,7 +6,7 @@ {{- end -}} {{define "macro" -}} -{{.Name}} macro{{if .Description}} - {{range split .Description}}{{.}} {{end}} +{{.Name}} macro{{if .Description}} - {{newlineToSpace .Description}} {{end}} {{range .Children}}{{range split .Description}} {{.}} {{end}} @@ -22,11 +22,19 @@ {{- end -}} {{define "function" -}} -{{.Name}}{{if .Description}} - {{range split .Description}}{{.}} {{end}} +{{.Name}}{{if .Description}} - {{newlineToSpace .Description}} {{end}} {{range .Children}}{{template "overload" .}}{{end}} {{- end -}} +{{define "fieldPath" -}} +{{.Name}} is a {{.Type}} +{{if .Description}} +{{range split .Description}} {{.}} +{{ end }} +{{ end -}} +{{- end -}} + {{.Persona}} {{.FormatRules}} @@ -38,23 +46,30 @@ Variables: {{range .Variables}}* {{template "variable" .}} {{end -}} - {{end -}} + +{{if .FieldPaths}} +Field Paths: + +{{range .FieldPaths}}* {{template "fieldPath" .}} +{{- end -}} +{{- end -}} + {{if .Macros}} Macros: {{range .Macros}}* {{template "macro" .}} {{end -}} - {{end -}} + {{if .Functions}} Functions: {{range .Functions}}* {{template "function" .}} {{end -}} - -{{end -}} {{- end -}} +{{- end -}} + {{.GeneralUsage}} {{.UserPrompt}} diff --git a/cel/testdata/BUILD.bazel b/cel/testdata/BUILD.bazel index 96ca73c8c..d05c25e87 100644 --- a/cel/testdata/BUILD.bazel +++ b/cel/testdata/BUILD.bazel @@ -20,4 +20,9 @@ genrule( filegroup( name = "prompts", srcs = glob(["*.prompt.txt"]), -) \ No newline at end of file +) + +exports_files( + ["test_fds_with_source_info-transitive-descriptor-set-source-info.proto.bin"], + visibility = ["//cel:__subpackages__"], +) diff --git a/cel/testdata/field_paths.prompt.txt b/cel/testdata/field_paths.prompt.txt new file mode 100644 index 000000000..552900a3e --- /dev/null +++ b/cel/testdata/field_paths.prompt.txt @@ -0,0 +1,403 @@ +You are a software engineer with expertise in networking and application security +authoring boolean Common Expression Language (CEL) expressions to ensure firewall, +networking, authentication, and data access is only permitted when all conditions +are satisfied. + +Output your response as a CEL expression. + +Write the expression with the comment on the first line and the expression on the +subsequent lines. Format the expression using 80-character line limits commonly +found in C++ or Java code. + +Only use the following variables, macros, and functions in expressions. + +Variables: + +* team is a cel.testdata.Team + +Field Paths: + +* team is a cel.testdata.Team +* team.members is a list(cel.testdata.Mutant) + + The members of the team. + +* team.members[0].level is a int + + The level of the mutant. + Values from 1 to 10. + +* team.members[0].name is a string + + The display name of the mutant. + +* team.members[0].super_power is a string + + The super power of the mutant. + Matches the IDs in Foo.db. + +* team.name is a string + + The name of the team. + Formated as 'team_<8_digit_hex_number>'. + + +Functions: + +* !_ - logically negate a boolean value. + + !true // false + !false // true + !error // error + +* -_ - negate a numeric value + + -(3.14) // -3.14 + -(5) // -5 + +* @in - test whether a value exists in a list, or a key exists in a map + + 2 in [1, 2, 3] // true + "a" in ["b", "c"] // false + 'key1' in {'key1': 'value1', 'key2': 'value2'} // true + 3 in {1: "one", 2: "two"} // false + +* _!=_ - compare two values of the same type for inequality + + 1 != 2 // true + "a" != "a" // false + 3.0 != 3.1 // true + +* _%_ - compute the modulus of one integer into another + + 3 % 2 // 1 + 6u % 3u // 0u + +* _&&_ - logically AND two boolean values. Errors and unknown values are valid inputs and will not halt evaluation. + + true && true // true + true && false // false + error && true // error + error && false // false + +* _*_ - multiply two numbers + + 3.5 * 40.0 // 140.0 + -2 * 6 // -12 + 13u * 3u // 39u + +* _+_ - adds two numeric values or concatenates two strings, bytes, or lists. + + b'hi' + bytes('ya') // b'hiya' + 3.14 + 1.59 // 4.73 + duration('1m') + duration('1s') // duration('1m1s') + duration('24h') + timestamp('2023-01-01T00:00:00Z') // timestamp('2023-01-02T00:00:00Z') + timestamp('2023-01-01T00:00:00Z') + duration('24h1m2s') // timestamp('2023-01-02T00:01:02Z') + 1 + 2 // 3 + [1] + [2, 3] // [1, 2, 3] + "Hello, " + "world!" // "Hello, world!" + 22u + 33u // 55u + +* _-_ - subtract two numbers, or two time-related values + + 10.5 - 2.0 // 8.5 + duration('1m') - duration('1s') // duration('59s') + 5 - 3 // 2 + timestamp('2023-01-10T12:00:00Z') + - duration('12h') // timestamp('2023-01-10T00:00:00Z') + timestamp('2023-01-10T12:00:00Z') + - timestamp('2023-01-10T00:00:00Z') // duration('12h') + // the subtraction result must be positive, otherwise an overflow + // error is generated. + 42u - 3u // 39u + +* _/_ - divide two numbers + + 7.0 / 2.0 // 3.5 + 10 / 2 // 5 + 42u / 2u // 21u + +* _<=_ - compare two values and return true if the first value is less than or equal to the second + + false <= true // true + -2 <= 3 // true + 1 <= 1.1 // true + 1 <= 2u // true + -1 <= 0u // true + 1u <= 2u // true + 1u <= 1.0 // true + 1u <= 1.1 // true + 1u <= 23 // true + 2.0 <= 2.4 // true + 2.1 <= 3 // true + 2.0 <= 2u // true + -1.0 <= 1u // true + 'a' <= 'b' // true + 'a' <= 'a' // true + 'cat' <= 'cab' // false + b'hello' <= b'world' // true + timestamp('2001-01-01T02:03:04Z') <= timestamp('2002-02-02T02:03:04Z') // true + duration('1ms') <= duration('1s') // true + +* _<_ - compare two values and return true if the first value is less than the second + + false < true // true + -2 < 3 // true + 1 < 0 // false + 1 < 1.1 // true + 1 < 2u // true + 1u < 2u // true + 1u < 0.9 // false + 1u < 23 // true + 1u < -1 // false + 2.0 < 2.4 // true + 2.1 < 3 // true + 2.3 < 2u // false + -1.0 < 1u // true + 'a' < 'b' // true + 'cat' < 'cab' // false + b'hello' < b'world' // true + timestamp('2001-01-01T02:03:04Z') < timestamp('2002-02-02T02:03:04Z') // true + duration('1ms') < duration('1s') // true + +* _==_ - compare two values of the same type for equality + + 1 == 1 // true + 'hello' == 'world' // false + bytes('hello') == b'hello' // true + duration('1h') == duration('60m') // true + dyn(3.0) == 3 // true + +* _>=_ - compare two values and return true if the first value is greater than or equal to the second + + true >= false // true + 3 >= -2 // true + 2 >= 1.1 // true + 1 >= 1.0 // true + 3 >= 2u // true + 2u >= 1u // true + 2u >= 1.9 // true + 23u >= 1 // true + 1u >= 1 // true + 2.4 >= 2.0 // true + 3.1 >= 3 // true + 2.3 >= 2u // true + 'b' >= 'a' // true + b'world' >= b'hello' // true + timestamp('2001-01-01T02:03:04Z') >= timestamp('2001-01-01T02:03:04Z') // true + duration('60s') >= duration('1m') // true + +* _>_ - compare two values and return true if the first value is greater than the second + + true > false // true + 3 > -2 // true + 2 > 1.1 // true + 3 > 2u // true + 2u > 1u // true + 2u > 1.9 // true + 23u > 1 // true + 0u > -1 // true + 2.4 > 2.0 // true + 3.1 > 3 // true + 3.0 > 3 // false + 2.3 > 2u // true + 'b' > 'a' // true + b'world' > b'hello' // true + timestamp('2002-02-02T02:03:04Z') > timestamp('2001-01-01T02:03:04Z') // true + duration('1ms') > duration('1us') // true + +* _?_:_ - The ternary operator tests a boolean predicate and returns the left-hand side (truthy) expression if true, or the right-hand side (falsy) expression if false + + 'hello'.contains('lo') ? 'hi' : 'bye' // 'hi' + 32 % 3 == 0 ? 'divisible' : 'not divisible' // 'not divisible' + +* _[_] - select a value from a list by index, or value from a map by key + + [1, 2, 3][1] // 2 + {'key': 'value'}['key'] // 'value' + {'key': 'value'}['missing'] // error + +* _||_ - logically OR two boolean values. Errors and unknown values are valid inputs and will not halt evaluation. + + true || false // true + false || false // false + error || true // true + error || error // true + +* bool - convert a value to a boolean + + bool(true) // true + bool('true') // true + bool('false') // false + +* bytes - convert a value to bytes + + bytes(b'abc') // b'abc' + bytes('hello') // b'hello' + +* contains - test whether a string contains a substring + + 'hello world'.contains('o w') // true + 'hello world'.contains('goodbye') // false + +* double - convert a value to a double + + double(1.23) // 1.23 + double(123) // 123.0 + double('1.23') // 1.23 + double(123u) // 123.0 + +* duration - convert a value to a google.protobuf.Duration + + duration(duration('1s')) // duration('1s') + duration(int) -> google.protobuf.Duration + duration('1h2m3s') // duration('3723s') + +* dyn - indicate that the type is dynamic for type-checking purposes + + dyn(1) // 1 + +* endsWith - test whether a string ends with a substring suffix + + 'hello world'.endsWith('world') // true + 'hello world'.endsWith('hello') // false + +* getDate - get the 1-based day of the month from a timestamp, UTC unless an IANA timezone is specified. + + timestamp('2023-07-14T10:30:45.123Z').getDate() // 14 + timestamp('2023-07-01T05:00:00Z').getDate('America/Los_Angeles') // 30 + +* getDayOfMonth - get the 0-based day of the month from a timestamp, UTC unless an IANA timezone is specified. + + timestamp('2023-07-14T10:30:45.123Z').getDayOfMonth() // 13 + timestamp('2023-07-01T05:00:00Z').getDayOfMonth('America/Los_Angeles') // 29 + +* getDayOfWeek - get the 0-based day of the week from a timestamp, UTC unless an IANA timezone is specified. + + timestamp('2023-07-14T10:30:45.123Z').getDayOfWeek() // 5 + timestamp('2023-07-16T05:00:00Z').getDayOfWeek('America/Los_Angeles') // 6 + +* getDayOfYear - get the 0-based day of the year from a timestamp, UTC unless an IANA timezone is specified. + + timestamp('2023-01-02T00:00:00Z').getDayOfYear() // 1 + timestamp('2023-01-01T05:00:00Z').getDayOfYear('America/Los_Angeles') // 364 + +* getFullYear - get the 0-based full year from a timestamp, UTC unless an IANA timezone is specified. + + timestamp('2023-07-14T10:30:45.123Z').getFullYear() // 2023 + timestamp('2023-01-01T05:30:00Z').getFullYear('-08:00') // 2022 + +* getHours - get the hours portion from a timestamp, or convert a duration to hours + + timestamp('2023-07-14T10:30:45.123Z').getHours() // 10 + timestamp('2023-07-14T10:30:45.123Z').getHours('America/Los_Angeles') // 2 + duration('3723s').getHours() // 1 + +* getMilliseconds - get the milliseconds portion from a timestamp + + timestamp('2023-07-14T10:30:45.123Z').getMilliseconds() // 123 + timestamp('2023-07-14T10:30:45.123Z').getMilliseconds('America/Los_Angeles') // 123 + google.protobuf.Duration.getMilliseconds() -> int + +* getMinutes - get the minutes portion from a timestamp, or convert a duration to minutes + + timestamp('2023-07-14T10:30:45.123Z').getMinutes() // 30 + timestamp('2023-07-14T10:30:45.123Z').getMinutes('America/Los_Angeles') // 30 + duration('3723s').getMinutes() // 62 + +* getMonth - get the 0-based month from a timestamp, UTC unless an IANA timezone is specified. + + timestamp('2023-07-14T10:30:45.123Z').getMonth() // 6 + timestamp('2023-01-01T05:30:00Z').getMonth('America/Los_Angeles') // 11 + +* getSeconds - get the seconds portion from a timestamp, or convert a duration to seconds + + timestamp('2023-07-14T10:30:45.123Z').getSeconds() // 45 + timestamp('2023-07-14T10:30:45.123Z').getSeconds('America/Los_Angeles') // 45 + duration('3723.456s').getSeconds() // 3723 + +* int - convert a value to an int + + int(123) // 123 + int(123.45) // 123 + int(duration('1s')) // 1000000000 + int('123') // 123 + int('-456') // -456 + int(timestamp('1970-01-01T00:00:01Z')) // 1 + int(123u) // 123 + +* matches - test whether a string matches an RE2 regular expression + + matches('123-456', '^[0-9]+(-[0-9]+)?$') // true + matches('hello', '^h.*o$') // true + '123-456'.matches('^[0-9]+(-[0-9]+)?$') // true + 'hello'.matches('^h.*o$') // true + +* size - compute the size of a list or map, the number of characters in a string, or the number of bytes in a sequence + + size(b'123') // 3 + b'123'.size() // 3 + size([1, 2, 3]) // 3 + [1, 2, 3].size() // 3 + size({'a': 1, 'b': 2}) // 2 + {'a': 1, 'b': 2}.size() // 2 + size('hello') // 5 + 'hello'.size() // 5 + +* startsWith - test whether a string starts with a substring prefix + + 'hello world'.startsWith('hello') // true + 'hello world'.startsWith('world') // false + +* string - convert a value to a string + + string('hello') // 'hello' + string(true) // 'true' + string(b'hello') // 'hello' + string(-1.23e4) // '-12300' + string(duration('1h30m')) // '5400s' + string(-123) // '-123' + string(timestamp('1970-01-01T00:00:00Z')) // '1970-01-01T00:00:00Z' + string(123u) // '123' + +* timestamp - convert a value to a google.protobuf.Timestamp + + timestamp(timestamp('2023-01-01T00:00:00Z')) // timestamp('2023-01-01T00:00:00Z') + timestamp(1) // timestamp('1970-01-01T00:00:01Z') + timestamp('2025-01-01T12:34:56Z') // timestamp('2025-01-01T12:34:56Z') + +* type - convert a value to its type identifier + + type(1) // int + type('hello') // string + type(int) // type + type(type) // type + +* uint - convert a value to a uint + + uint(123u) // 123u + uint(123.45) // 123u + uint(123) // 123u + uint('123') // 123u + +CEL supports Protocol Buffer and JSON types, as well as simple types and aggregate types. + +Simple types include bool, bytes, double, int, string, and uint: + +* double literals must always include a decimal point: 1.0, 3.5, -2.2 +* uint literals must be positive values suffixed with a 'u': 42u +* byte literals are strings prefixed with a 'b': b'1235' +* string literals can use either single quotes or double quotes: 'hello', "world" +* string literals can also be treated as raw strings that do not require any + escaping within the string by using the 'R' prefix: R"""quote: "hi" """ + +Aggregate types include list and map: + +* list literals consist of zero or more values between brackets: "['a', 'b', 'c']" +* map literal consist of colon-separated key-value pairs within braces: "{'key1': 1, 'key2': 2}" +* Only int, uint, string, and bool types are valid map keys. +* Maps containing HTTP headers must always use lower-cased string keys. + +Comments start with two-forward slashes followed by text and a newline. + + diff --git a/cel/testdata/macros.prompt.txt b/cel/testdata/macros.prompt.txt index 91793d4c2..019751e0f 100644 --- a/cel/testdata/macros.prompt.txt +++ b/cel/testdata/macros.prompt.txt @@ -13,7 +13,7 @@ Only use the following variables, macros, and functions in expressions. Macros: -* has macro - check a protocol buffer message for the presence of a field, or check a map for the presence of a string key. Only map accesses using the select notation are supported. +* has macro - check a protocol buffer message for the presence of a field, or check a map for the presence of a string key. Only map accesses using the select notation are supported. // true if the 'address' field exists in the 'user' message has(user.address) @@ -22,7 +22,7 @@ Macros: // test whether the 'id' field is set to a non-default value on the Expr{} message literal has(Expr{}.id) // false -* all macro - tests whether all elements in the input list or all keys in a map satisfy the given predicate. The all macro behaves in a manner consistent with the Logical AND operator including in how it absorbs errors and short-circuits. +* all macro - tests whether all elements in the input list or all keys in a map satisfy the given predicate. The all macro behaves in a manner consistent with the Logical AND operator including in how it absorbs errors and short-circuits. [1, 2, 3].all(x, x > 0) // true [1, 2, 0].all(x, x > 0) // false @@ -32,7 +32,7 @@ Macros: // an empty list or map as the range will result in a trivially true result [].all(x, x > 0) // true -* exists macro - tests whether any value in the list or any key in the map satisfies the predicate expression. The exists macro behaves in a manner consistent with the Logical OR operator including in how it absorbs errors and short-circuits. +* exists macro - tests whether any value in the list or any key in the map satisfies the predicate expression. The exists macro behaves in a manner consistent with the Logical OR operator including in how it absorbs errors and short-circuits. [1, 2, 3].exists(i, i % 2 != 0) // true [0, -1, 5].exists(num, num < 0) // true @@ -44,7 +44,7 @@ Macros: // tokens = {'sub': 'me', 'iss': 'https://issuer.cel.dev'} tokens.exists(k, k == 'iss' && tokens[k].contains('cel.dev')) -* exists_one macro - tests whether exactly one list element or map key satisfies the predicate expression. This macro does not short-circuit in order to remain consistent with logical operators being the only operators which can absorb errors within CEL. +* exists_one macro - tests whether exactly one list element or map key satisfies the predicate expression. This macro does not short-circuit in order to remain consistent with logical operators being the only operators which can absorb errors within CEL. [1, 2, 2].exists_one(i, i < 2) // true {'a': 'hello', 'aa': 'hellohello'}.exists_one(k, k.startsWith('a')) // false @@ -52,7 +52,7 @@ Macros: // ensure exactly one key in the map ends in @acme.co {'wiley@acme.co': 'coyote', 'aa@milne.co': 'bear'}.exists_one(k, k.endsWith('@acme.co')) // true -* map macro - the three-argument form of map transforms all elements in the input range. +* map macro - the three-argument form of map transforms all elements in the input range. [1, 2, 3].map(x, x * 2) // [2, 4, 6] [5, 10, 15].map(x, x / 5) // [1, 2, 3] @@ -61,12 +61,12 @@ Macros: {'hi': 'you', 'howzit': 'bruv'}.map(k, k + ":" + {'hi': 'you', 'howzit': 'bruv'}[k]) // ['hi:you', 'howzit:bruv'] -* map macro - the four-argument form of the map transforms only elements which satisfy the predicate which is equivalent to chaining the filter and three-argument map macros together. +* map macro - the four-argument form of the map transforms only elements which satisfy the predicate which is equivalent to chaining the filter and three-argument map macros together. // multiply only numbers divisible two, by 2 [1, 2, 3, 4].map(num, num % 2 == 0, num * 2) // [4, 8] -* filter macro - returns a list containing only the elements from the input list that satisfy the given predicate +* filter macro - returns a list containing only the elements from the input list that satisfy the given predicate [1, 2, 3].filter(x, x > 1) // [2, 3] ['cat', 'dog', 'bird', 'fish'].filter(pet, pet.size() == 3) // ['cat', 'dog'] diff --git a/cel/testdata/mutant.proto b/cel/testdata/mutant.proto index 242f271b2..a7afac866 100644 --- a/cel/testdata/mutant.proto +++ b/cel/testdata/mutant.proto @@ -2,8 +2,16 @@ syntax = "proto3"; package cel.testdata; +// Mutant is a test message for CEL. message Mutant { + // The display name of the mutant. string name = 1; + + // The level of the mutant. + // Values from 1 to 10. int32 level = 2; + + // The super power of the mutant. + // Matches the IDs in Foo.db. string super_power = 3; } diff --git a/cel/testdata/team.proto b/cel/testdata/team.proto index bf601da8b..3221290f6 100644 --- a/cel/testdata/team.proto +++ b/cel/testdata/team.proto @@ -4,7 +4,12 @@ package cel.testdata; import "cel/testdata/mutant.proto"; +// Team is a test message for CEL. message Team { + // The name of the team. + // Formated as 'team_<8_digit_hex_number>'. string name = 1; + + // The members of the team. repeated Mutant members = 2; } diff --git a/cel/testdata/test_fds_with_source_info-transitive-descriptor-set-source-info.proto.bin b/cel/testdata/test_fds_with_source_info-transitive-descriptor-set-source-info.proto.bin new file mode 100755 index 0000000000000000000000000000000000000000..3e5024b7e382ac3afd13f52583651dafdd4c5b78 GIT binary patch literal 1071 zcmb7?-EPw`6vq=gY1)%^-K-+Ihz~O^Iw43mkPsIG3GpGVVhELKw~@QLZKS5D5*OHG z@E|+_Z^i}3PF)SC1mq?@=h)|eK7R1cgNJIC7UN_o3U$@Ll=J>HH$NpyH5N+rvy~DH z6)%fi<*bP}VjDX62(>d4WemK9$Yj^$?qOqS&a4CeTz-=CE#}~Zj({RVfsWECC&}#1MwW@`52Gx^GcqlB^O+m#WPu! zVk-G0FZioB?_$7@dXCGeU*CZkJkKExqXA*jJ$^oue4LicxwzuGe4bCZLf^V&fF}6* zzONtDt%bRQM$1|ht=&C%ZZcyi#LPz~vuXbKl>9=>SF+@jBG33SS2;gE!Xhgn7llF+ zSW9QCTOk*PLKHeRLO6^z*^f?)kQp8~^ZY~ZOsLBl>gl#lUza>x@V9v$k4GC(f}-tB zcLYV-jn29Rf}-u4-BHbK{|Wq{@ZfK}C@HdSv_$_!+Q9(4bIi1rtQdk!W+PdY$QC^e zA9v#GT*eg@LwjlPom5EeY)7gAgd!83^AsLcbOp|itNFkJ{)w%i-h}s-EkFWZn#Eja z%8UhY_(dj^9CK0fp7tdt&ysOEO;s|JUy{X2xAmg8*^XupHrvr0!!PUsBGI$#waA?) mGRo`mSR5*G%azAyi)@&yp%w1g7z(u5zO``uty{P4`hNmH?c>Y< literal 0 HcmV?d00001 diff --git a/common/doc.go b/common/doc.go index 06eae3642..c10742c28 100644 --- a/common/doc.go +++ b/common/doc.go @@ -37,6 +37,8 @@ const ( DocMacro // DocExample represents example documentation. DocExample + // DocField represents documentation for a struct field. + DocField ) // Doc holds the documentation details for a specific program element like @@ -163,6 +165,17 @@ func NewExampleDoc(ex string) *Doc { } } +// NewFieldDoc creates a new Doc struct for documenting a struct field. +func NewFieldDoc(name, celType, description string, examples ...*Doc) *Doc { + return &Doc{ + Kind: DocField, + Name: name, + Type: celType, + Description: description, + Children: examples, + } +} + // Documentor is an interface for types that can provide their own documentation. type Documentor interface { // Documentation returns the documentation coded by the DocKind to assist diff --git a/common/doc_test.go b/common/doc_test.go index c84c3678a..f5ec4b5f6 100644 --- a/common/doc_test.go +++ b/common/doc_test.go @@ -133,6 +133,18 @@ func TestNewDoc(t *testing.T) { desc: "get the JWT token from a request\nas deserialized JSON", childCount: 1, }, + { + newDoc: func() *Doc { + return NewFieldDoc("google.rpc.context.AttributeContext.Request.token", "string", + "The HTTP URL scheme, such as `http` and `https`.", + NewExampleDoc("\"https\"")) + }, + kind: DocField, + name: "google.rpc.context.AttributeContext.Request.token", + celType: "string", + desc: "The HTTP URL scheme, such as `http` and `https`.", + childCount: 1, + }, } for _, tst := range tests { diff --git a/common/types/pb/type.go b/common/types/pb/type.go index 18564642c..b2363db03 100644 --- a/common/types/pb/type.go +++ b/common/types/pb/type.go @@ -239,6 +239,14 @@ func (fd *FieldDescription) Descriptor() protoreflect.FieldDescriptor { return fd.desc } +// Documentation returns the documentation for the field. +func (fd *FieldDescription) Documentation() string { + if parentFile := fd.desc.ParentFile(); parentFile != nil { + return parentFile.SourceLocations().ByDescriptor(fd.desc).LeadingComments + } + return "" +} + // IsSet returns whether the field is set on the target value, per the proto presence conventions // of proto2 or proto3 accordingly. // From 0f8bc57a358dacc740b4283b3df427349e19557b Mon Sep 17 00:00:00 2001 From: Jonathan Tatum Date: Wed, 11 Mar 2026 21:42:13 +0000 Subject: [PATCH 2/6] go mod tidy --- go.mod | 1 + 1 file changed, 1 insertion(+) diff --git a/go.mod b/go.mod index 46cfaaa96..ad223de71 100644 --- a/go.mod +++ b/go.mod @@ -5,6 +5,7 @@ go 1.23.0 require ( cel.dev/expr v0.25.1 github.com/antlr4-go/antlr/v4 v4.13.1 + github.com/google/go-cmp v0.7.0 go.yaml.in/yaml/v3 v3.0.4 google.golang.org/genproto/googleapis/api v0.0.0-20240826202546-f6391c0de4c7 google.golang.org/protobuf v1.36.10 From 1868cc65888e28b5eb7c2ba1d25b0dda115b05b8 Mon Sep 17 00:00:00 2001 From: Jonathan Tatum Date: Wed, 11 Mar 2026 21:53:34 +0000 Subject: [PATCH 3/6] go mod vendor --- .../expr/conformance/proto3/BUILD.bazel | 39 + .../conformance/proto3/test_all_types.pb.go | 3753 +++++++++++++++++ vendor/github.com/google/go-cmp/LICENSE | 27 + .../github.com/google/go-cmp/cmp/compare.go | 671 +++ vendor/github.com/google/go-cmp/cmp/export.go | 31 + .../go-cmp/cmp/internal/diff/debug_disable.go | 18 + .../go-cmp/cmp/internal/diff/debug_enable.go | 123 + .../google/go-cmp/cmp/internal/diff/diff.go | 402 ++ .../google/go-cmp/cmp/internal/flags/flags.go | 9 + .../go-cmp/cmp/internal/function/func.go | 106 + .../google/go-cmp/cmp/internal/value/name.go | 164 + .../go-cmp/cmp/internal/value/pointer.go | 34 + .../google/go-cmp/cmp/internal/value/sort.go | 106 + .../github.com/google/go-cmp/cmp/options.go | 562 +++ vendor/github.com/google/go-cmp/cmp/path.go | 390 ++ vendor/github.com/google/go-cmp/cmp/report.go | 54 + .../google/go-cmp/cmp/report_compare.go | 433 ++ .../google/go-cmp/cmp/report_references.go | 264 ++ .../google/go-cmp/cmp/report_reflect.go | 414 ++ .../google/go-cmp/cmp/report_slices.go | 614 +++ .../google/go-cmp/cmp/report_text.go | 432 ++ .../google/go-cmp/cmp/report_value.go | 121 + .../types/known/fieldmaskpb/field_mask.pb.go | 560 +++ vendor/modules.txt | 9 + 24 files changed, 9336 insertions(+) create mode 100644 vendor/cel.dev/expr/conformance/proto3/BUILD.bazel create mode 100644 vendor/cel.dev/expr/conformance/proto3/test_all_types.pb.go create mode 100644 vendor/github.com/google/go-cmp/LICENSE create mode 100644 vendor/github.com/google/go-cmp/cmp/compare.go create mode 100644 vendor/github.com/google/go-cmp/cmp/export.go create mode 100644 vendor/github.com/google/go-cmp/cmp/internal/diff/debug_disable.go create mode 100644 vendor/github.com/google/go-cmp/cmp/internal/diff/debug_enable.go create mode 100644 vendor/github.com/google/go-cmp/cmp/internal/diff/diff.go create mode 100644 vendor/github.com/google/go-cmp/cmp/internal/flags/flags.go create mode 100644 vendor/github.com/google/go-cmp/cmp/internal/function/func.go create mode 100644 vendor/github.com/google/go-cmp/cmp/internal/value/name.go create mode 100644 vendor/github.com/google/go-cmp/cmp/internal/value/pointer.go create mode 100644 vendor/github.com/google/go-cmp/cmp/internal/value/sort.go create mode 100644 vendor/github.com/google/go-cmp/cmp/options.go create mode 100644 vendor/github.com/google/go-cmp/cmp/path.go create mode 100644 vendor/github.com/google/go-cmp/cmp/report.go create mode 100644 vendor/github.com/google/go-cmp/cmp/report_compare.go create mode 100644 vendor/github.com/google/go-cmp/cmp/report_references.go create mode 100644 vendor/github.com/google/go-cmp/cmp/report_reflect.go create mode 100644 vendor/github.com/google/go-cmp/cmp/report_slices.go create mode 100644 vendor/github.com/google/go-cmp/cmp/report_text.go create mode 100644 vendor/github.com/google/go-cmp/cmp/report_value.go create mode 100644 vendor/google.golang.org/protobuf/types/known/fieldmaskpb/field_mask.pb.go diff --git a/vendor/cel.dev/expr/conformance/proto3/BUILD.bazel b/vendor/cel.dev/expr/conformance/proto3/BUILD.bazel new file mode 100644 index 000000000..3e1de543d --- /dev/null +++ b/vendor/cel.dev/expr/conformance/proto3/BUILD.bazel @@ -0,0 +1,39 @@ +# Copyright 2024 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +package( + default_visibility = ["//visibility:public"], + licenses = ["notice"], # Apache 2.0 +) + +go_library( + name = "go_default_library", + srcs = [ + "test_all_types.pb.go", + ], + importpath = "cel.dev/expr/conformance/proto3", + deps = [ + "@org_golang_google_protobuf//reflect/protoreflect", + "@org_golang_google_protobuf//runtime/protoimpl", + "@org_golang_google_protobuf//types/known/anypb", + "@org_golang_google_protobuf//types/known/durationpb", + "@org_golang_google_protobuf//types/known/emptypb", + "@org_golang_google_protobuf//types/known/fieldmaskpb", + "@org_golang_google_protobuf//types/known/structpb", + "@org_golang_google_protobuf//types/known/timestamppb", + "@org_golang_google_protobuf//types/known/wrapperspb", + ], +) diff --git a/vendor/cel.dev/expr/conformance/proto3/test_all_types.pb.go b/vendor/cel.dev/expr/conformance/proto3/test_all_types.pb.go new file mode 100644 index 000000000..4aad53cae --- /dev/null +++ b/vendor/cel.dev/expr/conformance/proto3/test_all_types.pb.go @@ -0,0 +1,3753 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.10 +// protoc v5.27.1 +// source: cel/expr/conformance/proto3/test_all_types.proto + +package proto3 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + anypb "google.golang.org/protobuf/types/known/anypb" + durationpb "google.golang.org/protobuf/types/known/durationpb" + emptypb "google.golang.org/protobuf/types/known/emptypb" + fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" + structpb "google.golang.org/protobuf/types/known/structpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + 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 GlobalEnum int32 + +const ( + GlobalEnum_GOO GlobalEnum = 0 + GlobalEnum_GAR GlobalEnum = 1 + GlobalEnum_GAZ GlobalEnum = 2 +) + +// Enum value maps for GlobalEnum. +var ( + GlobalEnum_name = map[int32]string{ + 0: "GOO", + 1: "GAR", + 2: "GAZ", + } + GlobalEnum_value = map[string]int32{ + "GOO": 0, + "GAR": 1, + "GAZ": 2, + } +) + +func (x GlobalEnum) Enum() *GlobalEnum { + p := new(GlobalEnum) + *p = x + return p +} + +func (x GlobalEnum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (GlobalEnum) Descriptor() protoreflect.EnumDescriptor { + return file_cel_expr_conformance_proto3_test_all_types_proto_enumTypes[0].Descriptor() +} + +func (GlobalEnum) Type() protoreflect.EnumType { + return &file_cel_expr_conformance_proto3_test_all_types_proto_enumTypes[0] +} + +func (x GlobalEnum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use GlobalEnum.Descriptor instead. +func (GlobalEnum) EnumDescriptor() ([]byte, []int) { + return file_cel_expr_conformance_proto3_test_all_types_proto_rawDescGZIP(), []int{0} +} + +type TestAllTypes_NestedEnum int32 + +const ( + TestAllTypes_FOO TestAllTypes_NestedEnum = 0 + TestAllTypes_BAR TestAllTypes_NestedEnum = 1 + TestAllTypes_BAZ TestAllTypes_NestedEnum = 2 +) + +// Enum value maps for TestAllTypes_NestedEnum. +var ( + TestAllTypes_NestedEnum_name = map[int32]string{ + 0: "FOO", + 1: "BAR", + 2: "BAZ", + } + TestAllTypes_NestedEnum_value = map[string]int32{ + "FOO": 0, + "BAR": 1, + "BAZ": 2, + } +) + +func (x TestAllTypes_NestedEnum) Enum() *TestAllTypes_NestedEnum { + p := new(TestAllTypes_NestedEnum) + *p = x + return p +} + +func (x TestAllTypes_NestedEnum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TestAllTypes_NestedEnum) Descriptor() protoreflect.EnumDescriptor { + return file_cel_expr_conformance_proto3_test_all_types_proto_enumTypes[1].Descriptor() +} + +func (TestAllTypes_NestedEnum) Type() protoreflect.EnumType { + return &file_cel_expr_conformance_proto3_test_all_types_proto_enumTypes[1] +} + +func (x TestAllTypes_NestedEnum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TestAllTypes_NestedEnum.Descriptor instead. +func (TestAllTypes_NestedEnum) EnumDescriptor() ([]byte, []int) { + return file_cel_expr_conformance_proto3_test_all_types_proto_rawDescGZIP(), []int{0, 0} +} + +type TestAllTypes struct { + state protoimpl.MessageState `protogen:"open.v1"` + SingleInt32 int32 `protobuf:"varint,1,opt,name=single_int32,json=singleInt32,proto3" json:"single_int32,omitempty"` + SingleInt64 int64 `protobuf:"varint,2,opt,name=single_int64,json=singleInt64,proto3" json:"single_int64,omitempty"` + SingleUint32 uint32 `protobuf:"varint,3,opt,name=single_uint32,json=singleUint32,proto3" json:"single_uint32,omitempty"` + SingleUint64 uint64 `protobuf:"varint,4,opt,name=single_uint64,json=singleUint64,proto3" json:"single_uint64,omitempty"` + SingleSint32 int32 `protobuf:"zigzag32,5,opt,name=single_sint32,json=singleSint32,proto3" json:"single_sint32,omitempty"` + SingleSint64 int64 `protobuf:"zigzag64,6,opt,name=single_sint64,json=singleSint64,proto3" json:"single_sint64,omitempty"` + SingleFixed32 uint32 `protobuf:"fixed32,7,opt,name=single_fixed32,json=singleFixed32,proto3" json:"single_fixed32,omitempty"` + SingleFixed64 uint64 `protobuf:"fixed64,8,opt,name=single_fixed64,json=singleFixed64,proto3" json:"single_fixed64,omitempty"` + SingleSfixed32 int32 `protobuf:"fixed32,9,opt,name=single_sfixed32,json=singleSfixed32,proto3" json:"single_sfixed32,omitempty"` + SingleSfixed64 int64 `protobuf:"fixed64,10,opt,name=single_sfixed64,json=singleSfixed64,proto3" json:"single_sfixed64,omitempty"` + SingleFloat float32 `protobuf:"fixed32,11,opt,name=single_float,json=singleFloat,proto3" json:"single_float,omitempty"` + SingleDouble float64 `protobuf:"fixed64,12,opt,name=single_double,json=singleDouble,proto3" json:"single_double,omitempty"` + SingleBool bool `protobuf:"varint,13,opt,name=single_bool,json=singleBool,proto3" json:"single_bool,omitempty"` + SingleString string `protobuf:"bytes,14,opt,name=single_string,json=singleString,proto3" json:"single_string,omitempty"` + SingleBytes []byte `protobuf:"bytes,15,opt,name=single_bytes,json=singleBytes,proto3" json:"single_bytes,omitempty"` + OptionalBool *bool `protobuf:"varint,16,opt,name=optional_bool,json=optionalBool,proto3,oneof" json:"optional_bool,omitempty"` + OptionalString *string `protobuf:"bytes,17,opt,name=optional_string,json=optionalString,proto3,oneof" json:"optional_string,omitempty"` + In bool `protobuf:"varint,18,opt,name=in,proto3" json:"in,omitempty"` + SingleAny *anypb.Any `protobuf:"bytes,100,opt,name=single_any,json=singleAny,proto3" json:"single_any,omitempty"` + SingleDuration *durationpb.Duration `protobuf:"bytes,101,opt,name=single_duration,json=singleDuration,proto3" json:"single_duration,omitempty"` + SingleTimestamp *timestamppb.Timestamp `protobuf:"bytes,102,opt,name=single_timestamp,json=singleTimestamp,proto3" json:"single_timestamp,omitempty"` + SingleStruct *structpb.Struct `protobuf:"bytes,103,opt,name=single_struct,json=singleStruct,proto3" json:"single_struct,omitempty"` + SingleValue *structpb.Value `protobuf:"bytes,104,opt,name=single_value,json=singleValue,proto3" json:"single_value,omitempty"` + SingleInt64Wrapper *wrapperspb.Int64Value `protobuf:"bytes,105,opt,name=single_int64_wrapper,json=singleInt64Wrapper,proto3" json:"single_int64_wrapper,omitempty"` + SingleInt32Wrapper *wrapperspb.Int32Value `protobuf:"bytes,106,opt,name=single_int32_wrapper,json=singleInt32Wrapper,proto3" json:"single_int32_wrapper,omitempty"` + SingleDoubleWrapper *wrapperspb.DoubleValue `protobuf:"bytes,107,opt,name=single_double_wrapper,json=singleDoubleWrapper,proto3" json:"single_double_wrapper,omitempty"` + SingleFloatWrapper *wrapperspb.FloatValue `protobuf:"bytes,108,opt,name=single_float_wrapper,json=singleFloatWrapper,proto3" json:"single_float_wrapper,omitempty"` + SingleUint64Wrapper *wrapperspb.UInt64Value `protobuf:"bytes,109,opt,name=single_uint64_wrapper,json=singleUint64Wrapper,proto3" json:"single_uint64_wrapper,omitempty"` + SingleUint32Wrapper *wrapperspb.UInt32Value `protobuf:"bytes,110,opt,name=single_uint32_wrapper,json=singleUint32Wrapper,proto3" json:"single_uint32_wrapper,omitempty"` + SingleStringWrapper *wrapperspb.StringValue `protobuf:"bytes,111,opt,name=single_string_wrapper,json=singleStringWrapper,proto3" json:"single_string_wrapper,omitempty"` + SingleBoolWrapper *wrapperspb.BoolValue `protobuf:"bytes,112,opt,name=single_bool_wrapper,json=singleBoolWrapper,proto3" json:"single_bool_wrapper,omitempty"` + SingleBytesWrapper *wrapperspb.BytesValue `protobuf:"bytes,113,opt,name=single_bytes_wrapper,json=singleBytesWrapper,proto3" json:"single_bytes_wrapper,omitempty"` + ListValue *structpb.ListValue `protobuf:"bytes,114,opt,name=list_value,json=listValue,proto3" json:"list_value,omitempty"` + NullValue structpb.NullValue `protobuf:"varint,115,opt,name=null_value,json=nullValue,proto3,enum=google.protobuf.NullValue" json:"null_value,omitempty"` + OptionalNullValue *structpb.NullValue `protobuf:"varint,116,opt,name=optional_null_value,json=optionalNullValue,proto3,enum=google.protobuf.NullValue,oneof" json:"optional_null_value,omitempty"` + FieldMask *fieldmaskpb.FieldMask `protobuf:"bytes,117,opt,name=field_mask,json=fieldMask,proto3" json:"field_mask,omitempty"` + Empty *emptypb.Empty `protobuf:"bytes,118,opt,name=empty,proto3" json:"empty,omitempty"` + // Types that are valid to be assigned to NestedType: + // + // *TestAllTypes_SingleNestedMessage + // *TestAllTypes_SingleNestedEnum + NestedType isTestAllTypes_NestedType `protobuf_oneof:"nested_type"` + StandaloneMessage *TestAllTypes_NestedMessage `protobuf:"bytes,23,opt,name=standalone_message,json=standaloneMessage,proto3" json:"standalone_message,omitempty"` + StandaloneEnum TestAllTypes_NestedEnum `protobuf:"varint,24,opt,name=standalone_enum,json=standaloneEnum,proto3,enum=cel.expr.conformance.proto3.TestAllTypes_NestedEnum" json:"standalone_enum,omitempty"` + RepeatedInt32 []int32 `protobuf:"varint,31,rep,packed,name=repeated_int32,json=repeatedInt32,proto3" json:"repeated_int32,omitempty"` + RepeatedInt64 []int64 `protobuf:"varint,32,rep,packed,name=repeated_int64,json=repeatedInt64,proto3" json:"repeated_int64,omitempty"` + RepeatedUint32 []uint32 `protobuf:"varint,33,rep,packed,name=repeated_uint32,json=repeatedUint32,proto3" json:"repeated_uint32,omitempty"` + RepeatedUint64 []uint64 `protobuf:"varint,34,rep,packed,name=repeated_uint64,json=repeatedUint64,proto3" json:"repeated_uint64,omitempty"` + RepeatedSint32 []int32 `protobuf:"zigzag32,35,rep,packed,name=repeated_sint32,json=repeatedSint32,proto3" json:"repeated_sint32,omitempty"` + RepeatedSint64 []int64 `protobuf:"zigzag64,36,rep,packed,name=repeated_sint64,json=repeatedSint64,proto3" json:"repeated_sint64,omitempty"` + RepeatedFixed32 []uint32 `protobuf:"fixed32,37,rep,packed,name=repeated_fixed32,json=repeatedFixed32,proto3" json:"repeated_fixed32,omitempty"` + RepeatedFixed64 []uint64 `protobuf:"fixed64,38,rep,packed,name=repeated_fixed64,json=repeatedFixed64,proto3" json:"repeated_fixed64,omitempty"` + RepeatedSfixed32 []int32 `protobuf:"fixed32,39,rep,packed,name=repeated_sfixed32,json=repeatedSfixed32,proto3" json:"repeated_sfixed32,omitempty"` + RepeatedSfixed64 []int64 `protobuf:"fixed64,40,rep,packed,name=repeated_sfixed64,json=repeatedSfixed64,proto3" json:"repeated_sfixed64,omitempty"` + RepeatedFloat []float32 `protobuf:"fixed32,41,rep,packed,name=repeated_float,json=repeatedFloat,proto3" json:"repeated_float,omitempty"` + RepeatedDouble []float64 `protobuf:"fixed64,42,rep,packed,name=repeated_double,json=repeatedDouble,proto3" json:"repeated_double,omitempty"` + RepeatedBool []bool `protobuf:"varint,43,rep,packed,name=repeated_bool,json=repeatedBool,proto3" json:"repeated_bool,omitempty"` + RepeatedString []string `protobuf:"bytes,44,rep,name=repeated_string,json=repeatedString,proto3" json:"repeated_string,omitempty"` + RepeatedBytes [][]byte `protobuf:"bytes,45,rep,name=repeated_bytes,json=repeatedBytes,proto3" json:"repeated_bytes,omitempty"` + RepeatedNestedMessage []*TestAllTypes_NestedMessage `protobuf:"bytes,51,rep,name=repeated_nested_message,json=repeatedNestedMessage,proto3" json:"repeated_nested_message,omitempty"` + RepeatedNestedEnum []TestAllTypes_NestedEnum `protobuf:"varint,52,rep,packed,name=repeated_nested_enum,json=repeatedNestedEnum,proto3,enum=cel.expr.conformance.proto3.TestAllTypes_NestedEnum" json:"repeated_nested_enum,omitempty"` + RepeatedStringPiece []string `protobuf:"bytes,53,rep,name=repeated_string_piece,json=repeatedStringPiece,proto3" json:"repeated_string_piece,omitempty"` + RepeatedCord []string `protobuf:"bytes,54,rep,name=repeated_cord,json=repeatedCord,proto3" json:"repeated_cord,omitempty"` + RepeatedLazyMessage []*TestAllTypes_NestedMessage `protobuf:"bytes,55,rep,name=repeated_lazy_message,json=repeatedLazyMessage,proto3" json:"repeated_lazy_message,omitempty"` + RepeatedAny []*anypb.Any `protobuf:"bytes,120,rep,name=repeated_any,json=repeatedAny,proto3" json:"repeated_any,omitempty"` + RepeatedDuration []*durationpb.Duration `protobuf:"bytes,121,rep,name=repeated_duration,json=repeatedDuration,proto3" json:"repeated_duration,omitempty"` + RepeatedTimestamp []*timestamppb.Timestamp `protobuf:"bytes,122,rep,name=repeated_timestamp,json=repeatedTimestamp,proto3" json:"repeated_timestamp,omitempty"` + RepeatedStruct []*structpb.Struct `protobuf:"bytes,123,rep,name=repeated_struct,json=repeatedStruct,proto3" json:"repeated_struct,omitempty"` + RepeatedValue []*structpb.Value `protobuf:"bytes,124,rep,name=repeated_value,json=repeatedValue,proto3" json:"repeated_value,omitempty"` + RepeatedInt64Wrapper []*wrapperspb.Int64Value `protobuf:"bytes,125,rep,name=repeated_int64_wrapper,json=repeatedInt64Wrapper,proto3" json:"repeated_int64_wrapper,omitempty"` + RepeatedInt32Wrapper []*wrapperspb.Int32Value `protobuf:"bytes,126,rep,name=repeated_int32_wrapper,json=repeatedInt32Wrapper,proto3" json:"repeated_int32_wrapper,omitempty"` + RepeatedDoubleWrapper []*wrapperspb.DoubleValue `protobuf:"bytes,127,rep,name=repeated_double_wrapper,json=repeatedDoubleWrapper,proto3" json:"repeated_double_wrapper,omitempty"` + RepeatedFloatWrapper []*wrapperspb.FloatValue `protobuf:"bytes,128,rep,name=repeated_float_wrapper,json=repeatedFloatWrapper,proto3" json:"repeated_float_wrapper,omitempty"` + RepeatedUint64Wrapper []*wrapperspb.UInt64Value `protobuf:"bytes,129,rep,name=repeated_uint64_wrapper,json=repeatedUint64Wrapper,proto3" json:"repeated_uint64_wrapper,omitempty"` + RepeatedUint32Wrapper []*wrapperspb.UInt32Value `protobuf:"bytes,130,rep,name=repeated_uint32_wrapper,json=repeatedUint32Wrapper,proto3" json:"repeated_uint32_wrapper,omitempty"` + RepeatedStringWrapper []*wrapperspb.StringValue `protobuf:"bytes,131,rep,name=repeated_string_wrapper,json=repeatedStringWrapper,proto3" json:"repeated_string_wrapper,omitempty"` + RepeatedBoolWrapper []*wrapperspb.BoolValue `protobuf:"bytes,132,rep,name=repeated_bool_wrapper,json=repeatedBoolWrapper,proto3" json:"repeated_bool_wrapper,omitempty"` + RepeatedBytesWrapper []*wrapperspb.BytesValue `protobuf:"bytes,133,rep,name=repeated_bytes_wrapper,json=repeatedBytesWrapper,proto3" json:"repeated_bytes_wrapper,omitempty"` + RepeatedListValue []*structpb.ListValue `protobuf:"bytes,134,rep,name=repeated_list_value,json=repeatedListValue,proto3" json:"repeated_list_value,omitempty"` + RepeatedNullValue []structpb.NullValue `protobuf:"varint,135,rep,packed,name=repeated_null_value,json=repeatedNullValue,proto3,enum=google.protobuf.NullValue" json:"repeated_null_value,omitempty"` + MapInt64NestedType map[int64]*NestedTestAllTypes `protobuf:"bytes,62,rep,name=map_int64_nested_type,json=mapInt64NestedType,proto3" json:"map_int64_nested_type,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapBoolBool map[bool]bool `protobuf:"bytes,63,rep,name=map_bool_bool,json=mapBoolBool,proto3" json:"map_bool_bool,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MapBoolString map[bool]string `protobuf:"bytes,64,rep,name=map_bool_string,json=mapBoolString,proto3" json:"map_bool_string,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapBoolBytes map[bool][]byte `protobuf:"bytes,65,rep,name=map_bool_bytes,json=mapBoolBytes,proto3" json:"map_bool_bytes,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapBoolInt32 map[bool]int32 `protobuf:"bytes,66,rep,name=map_bool_int32,json=mapBoolInt32,proto3" json:"map_bool_int32,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MapBoolInt64 map[bool]int64 `protobuf:"bytes,67,rep,name=map_bool_int64,json=mapBoolInt64,proto3" json:"map_bool_int64,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MapBoolUint32 map[bool]uint32 `protobuf:"bytes,68,rep,name=map_bool_uint32,json=mapBoolUint32,proto3" json:"map_bool_uint32,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MapBoolUint64 map[bool]uint64 `protobuf:"bytes,69,rep,name=map_bool_uint64,json=mapBoolUint64,proto3" json:"map_bool_uint64,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MapBoolFloat map[bool]float32 `protobuf:"bytes,70,rep,name=map_bool_float,json=mapBoolFloat,proto3" json:"map_bool_float,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + MapBoolDouble map[bool]float64 `protobuf:"bytes,71,rep,name=map_bool_double,json=mapBoolDouble,proto3" json:"map_bool_double,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + MapBoolEnum map[bool]TestAllTypes_NestedEnum `protobuf:"bytes,72,rep,name=map_bool_enum,json=mapBoolEnum,proto3" json:"map_bool_enum,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=cel.expr.conformance.proto3.TestAllTypes_NestedEnum"` + MapBoolMessage map[bool]*TestAllTypes_NestedMessage `protobuf:"bytes,73,rep,name=map_bool_message,json=mapBoolMessage,proto3" json:"map_bool_message,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapBoolDuration map[bool]*durationpb.Duration `protobuf:"bytes,228,rep,name=map_bool_duration,json=mapBoolDuration,proto3" json:"map_bool_duration,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapBoolTimestamp map[bool]*timestamppb.Timestamp `protobuf:"bytes,229,rep,name=map_bool_timestamp,json=mapBoolTimestamp,proto3" json:"map_bool_timestamp,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapBoolNullValue map[bool]structpb.NullValue `protobuf:"bytes,230,rep,name=map_bool_null_value,json=mapBoolNullValue,proto3" json:"map_bool_null_value,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=google.protobuf.NullValue"` + MapBoolAny map[bool]*anypb.Any `protobuf:"bytes,246,rep,name=map_bool_any,json=mapBoolAny,proto3" json:"map_bool_any,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapBoolStruct map[bool]*structpb.Struct `protobuf:"bytes,247,rep,name=map_bool_struct,json=mapBoolStruct,proto3" json:"map_bool_struct,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapBoolValue map[bool]*structpb.Value `protobuf:"bytes,248,rep,name=map_bool_value,json=mapBoolValue,proto3" json:"map_bool_value,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapBoolListValue map[bool]*structpb.ListValue `protobuf:"bytes,249,rep,name=map_bool_list_value,json=mapBoolListValue,proto3" json:"map_bool_list_value,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapBoolInt64Wrapper map[bool]*wrapperspb.Int64Value `protobuf:"bytes,250,rep,name=map_bool_int64_wrapper,json=mapBoolInt64Wrapper,proto3" json:"map_bool_int64_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapBoolInt32Wrapper map[bool]*wrapperspb.Int32Value `protobuf:"bytes,251,rep,name=map_bool_int32_wrapper,json=mapBoolInt32Wrapper,proto3" json:"map_bool_int32_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapBoolDoubleWrapper map[bool]*wrapperspb.DoubleValue `protobuf:"bytes,252,rep,name=map_bool_double_wrapper,json=mapBoolDoubleWrapper,proto3" json:"map_bool_double_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapBoolFloatWrapper map[bool]*wrapperspb.FloatValue `protobuf:"bytes,253,rep,name=map_bool_float_wrapper,json=mapBoolFloatWrapper,proto3" json:"map_bool_float_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapBoolUint64Wrapper map[bool]*wrapperspb.UInt64Value `protobuf:"bytes,254,rep,name=map_bool_uint64_wrapper,json=mapBoolUint64Wrapper,proto3" json:"map_bool_uint64_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapBoolUint32Wrapper map[bool]*wrapperspb.UInt32Value `protobuf:"bytes,255,rep,name=map_bool_uint32_wrapper,json=mapBoolUint32Wrapper,proto3" json:"map_bool_uint32_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapBoolStringWrapper map[bool]*wrapperspb.StringValue `protobuf:"bytes,256,rep,name=map_bool_string_wrapper,json=mapBoolStringWrapper,proto3" json:"map_bool_string_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapBoolBoolWrapper map[bool]*wrapperspb.BoolValue `protobuf:"bytes,257,rep,name=map_bool_bool_wrapper,json=mapBoolBoolWrapper,proto3" json:"map_bool_bool_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapBoolBytesWrapper map[bool]*wrapperspb.BytesValue `protobuf:"bytes,258,rep,name=map_bool_bytes_wrapper,json=mapBoolBytesWrapper,proto3" json:"map_bool_bytes_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapInt32Bool map[int32]bool `protobuf:"bytes,74,rep,name=map_int32_bool,json=mapInt32Bool,proto3" json:"map_int32_bool,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MapInt32String map[int32]string `protobuf:"bytes,75,rep,name=map_int32_string,json=mapInt32String,proto3" json:"map_int32_string,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapInt32Bytes map[int32][]byte `protobuf:"bytes,76,rep,name=map_int32_bytes,json=mapInt32Bytes,proto3" json:"map_int32_bytes,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapInt32Int32 map[int32]int32 `protobuf:"bytes,77,rep,name=map_int32_int32,json=mapInt32Int32,proto3" json:"map_int32_int32,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MapInt32Int64 map[int32]int64 `protobuf:"bytes,78,rep,name=map_int32_int64,json=mapInt32Int64,proto3" json:"map_int32_int64,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MapInt32Uint32 map[int32]uint32 `protobuf:"bytes,79,rep,name=map_int32_uint32,json=mapInt32Uint32,proto3" json:"map_int32_uint32,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MapInt32Uint64 map[int32]uint64 `protobuf:"bytes,80,rep,name=map_int32_uint64,json=mapInt32Uint64,proto3" json:"map_int32_uint64,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MapInt32Float map[int32]float32 `protobuf:"bytes,81,rep,name=map_int32_float,json=mapInt32Float,proto3" json:"map_int32_float,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + MapInt32Double map[int32]float64 `protobuf:"bytes,82,rep,name=map_int32_double,json=mapInt32Double,proto3" json:"map_int32_double,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + MapInt32Enum map[int32]TestAllTypes_NestedEnum `protobuf:"bytes,83,rep,name=map_int32_enum,json=mapInt32Enum,proto3" json:"map_int32_enum,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=cel.expr.conformance.proto3.TestAllTypes_NestedEnum"` + MapInt32Message map[int32]*TestAllTypes_NestedMessage `protobuf:"bytes,84,rep,name=map_int32_message,json=mapInt32Message,proto3" json:"map_int32_message,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapInt32Duration map[int32]*durationpb.Duration `protobuf:"bytes,231,rep,name=map_int32_duration,json=mapInt32Duration,proto3" json:"map_int32_duration,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapInt32Timestamp map[int32]*timestamppb.Timestamp `protobuf:"bytes,232,rep,name=map_int32_timestamp,json=mapInt32Timestamp,proto3" json:"map_int32_timestamp,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapInt32NullValue map[int32]structpb.NullValue `protobuf:"bytes,233,rep,name=map_int32_null_value,json=mapInt32NullValue,proto3" json:"map_int32_null_value,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=google.protobuf.NullValue"` + MapInt32Any map[int32]*anypb.Any `protobuf:"bytes,259,rep,name=map_int32_any,json=mapInt32Any,proto3" json:"map_int32_any,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapInt32Struct map[int32]*structpb.Struct `protobuf:"bytes,260,rep,name=map_int32_struct,json=mapInt32Struct,proto3" json:"map_int32_struct,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapInt32Value map[int32]*structpb.Value `protobuf:"bytes,261,rep,name=map_int32_value,json=mapInt32Value,proto3" json:"map_int32_value,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapInt32ListValue map[int32]*structpb.ListValue `protobuf:"bytes,262,rep,name=map_int32_list_value,json=mapInt32ListValue,proto3" json:"map_int32_list_value,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapInt32Int64Wrapper map[int32]*wrapperspb.Int64Value `protobuf:"bytes,263,rep,name=map_int32_int64_wrapper,json=mapInt32Int64Wrapper,proto3" json:"map_int32_int64_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapInt32Int32Wrapper map[int32]*wrapperspb.Int32Value `protobuf:"bytes,264,rep,name=map_int32_int32_wrapper,json=mapInt32Int32Wrapper,proto3" json:"map_int32_int32_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapInt32DoubleWrapper map[int32]*wrapperspb.DoubleValue `protobuf:"bytes,265,rep,name=map_int32_double_wrapper,json=mapInt32DoubleWrapper,proto3" json:"map_int32_double_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapInt32FloatWrapper map[int32]*wrapperspb.FloatValue `protobuf:"bytes,266,rep,name=map_int32_float_wrapper,json=mapInt32FloatWrapper,proto3" json:"map_int32_float_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapInt32Uint64Wrapper map[int32]*wrapperspb.UInt64Value `protobuf:"bytes,267,rep,name=map_int32_uint64_wrapper,json=mapInt32Uint64Wrapper,proto3" json:"map_int32_uint64_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapInt32Uint32Wrapper map[int32]*wrapperspb.UInt32Value `protobuf:"bytes,268,rep,name=map_int32_uint32_wrapper,json=mapInt32Uint32Wrapper,proto3" json:"map_int32_uint32_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapInt32StringWrapper map[int32]*wrapperspb.StringValue `protobuf:"bytes,269,rep,name=map_int32_string_wrapper,json=mapInt32StringWrapper,proto3" json:"map_int32_string_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapInt32BoolWrapper map[int32]*wrapperspb.BoolValue `protobuf:"bytes,270,rep,name=map_int32_bool_wrapper,json=mapInt32BoolWrapper,proto3" json:"map_int32_bool_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapInt32BytesWrapper map[int32]*wrapperspb.BytesValue `protobuf:"bytes,271,rep,name=map_int32_bytes_wrapper,json=mapInt32BytesWrapper,proto3" json:"map_int32_bytes_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapInt64Bool map[int64]bool `protobuf:"bytes,85,rep,name=map_int64_bool,json=mapInt64Bool,proto3" json:"map_int64_bool,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MapInt64String map[int64]string `protobuf:"bytes,86,rep,name=map_int64_string,json=mapInt64String,proto3" json:"map_int64_string,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapInt64Bytes map[int64][]byte `protobuf:"bytes,87,rep,name=map_int64_bytes,json=mapInt64Bytes,proto3" json:"map_int64_bytes,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapInt64Int32 map[int64]int32 `protobuf:"bytes,88,rep,name=map_int64_int32,json=mapInt64Int32,proto3" json:"map_int64_int32,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MapInt64Int64 map[int64]int64 `protobuf:"bytes,89,rep,name=map_int64_int64,json=mapInt64Int64,proto3" json:"map_int64_int64,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MapInt64Uint32 map[int64]uint32 `protobuf:"bytes,90,rep,name=map_int64_uint32,json=mapInt64Uint32,proto3" json:"map_int64_uint32,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MapInt64Uint64 map[int64]uint64 `protobuf:"bytes,91,rep,name=map_int64_uint64,json=mapInt64Uint64,proto3" json:"map_int64_uint64,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MapInt64Float map[int64]float32 `protobuf:"bytes,92,rep,name=map_int64_float,json=mapInt64Float,proto3" json:"map_int64_float,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + MapInt64Double map[int64]float64 `protobuf:"bytes,93,rep,name=map_int64_double,json=mapInt64Double,proto3" json:"map_int64_double,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + MapInt64Enum map[int64]TestAllTypes_NestedEnum `protobuf:"bytes,94,rep,name=map_int64_enum,json=mapInt64Enum,proto3" json:"map_int64_enum,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=cel.expr.conformance.proto3.TestAllTypes_NestedEnum"` + MapInt64Message map[int64]*TestAllTypes_NestedMessage `protobuf:"bytes,95,rep,name=map_int64_message,json=mapInt64Message,proto3" json:"map_int64_message,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapInt64Duration map[int64]*durationpb.Duration `protobuf:"bytes,234,rep,name=map_int64_duration,json=mapInt64Duration,proto3" json:"map_int64_duration,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapInt64Timestamp map[int64]*timestamppb.Timestamp `protobuf:"bytes,235,rep,name=map_int64_timestamp,json=mapInt64Timestamp,proto3" json:"map_int64_timestamp,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapInt64NullValue map[int64]structpb.NullValue `protobuf:"bytes,236,rep,name=map_int64_null_value,json=mapInt64NullValue,proto3" json:"map_int64_null_value,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=google.protobuf.NullValue"` + MapInt64Any map[int64]*anypb.Any `protobuf:"bytes,272,rep,name=map_int64_any,json=mapInt64Any,proto3" json:"map_int64_any,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapInt64Struct map[int64]*structpb.Struct `protobuf:"bytes,273,rep,name=map_int64_struct,json=mapInt64Struct,proto3" json:"map_int64_struct,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapInt64Value map[int64]*structpb.Value `protobuf:"bytes,274,rep,name=map_int64_value,json=mapInt64Value,proto3" json:"map_int64_value,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapInt64ListValue map[int64]*structpb.ListValue `protobuf:"bytes,275,rep,name=map_int64_list_value,json=mapInt64ListValue,proto3" json:"map_int64_list_value,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapInt64Int64Wrapper map[int64]*wrapperspb.Int64Value `protobuf:"bytes,276,rep,name=map_int64_int64_wrapper,json=mapInt64Int64Wrapper,proto3" json:"map_int64_int64_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapInt64Int32Wrapper map[int64]*wrapperspb.Int32Value `protobuf:"bytes,277,rep,name=map_int64_int32_wrapper,json=mapInt64Int32Wrapper,proto3" json:"map_int64_int32_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapInt64DoubleWrapper map[int64]*wrapperspb.DoubleValue `protobuf:"bytes,278,rep,name=map_int64_double_wrapper,json=mapInt64DoubleWrapper,proto3" json:"map_int64_double_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapInt64FloatWrapper map[int64]*wrapperspb.FloatValue `protobuf:"bytes,279,rep,name=map_int64_float_wrapper,json=mapInt64FloatWrapper,proto3" json:"map_int64_float_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapInt64Uint64Wrapper map[int64]*wrapperspb.UInt64Value `protobuf:"bytes,280,rep,name=map_int64_uint64_wrapper,json=mapInt64Uint64Wrapper,proto3" json:"map_int64_uint64_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapInt64Uint32Wrapper map[int64]*wrapperspb.UInt32Value `protobuf:"bytes,281,rep,name=map_int64_uint32_wrapper,json=mapInt64Uint32Wrapper,proto3" json:"map_int64_uint32_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapInt64StringWrapper map[int64]*wrapperspb.StringValue `protobuf:"bytes,282,rep,name=map_int64_string_wrapper,json=mapInt64StringWrapper,proto3" json:"map_int64_string_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapInt64BoolWrapper map[int64]*wrapperspb.BoolValue `protobuf:"bytes,283,rep,name=map_int64_bool_wrapper,json=mapInt64BoolWrapper,proto3" json:"map_int64_bool_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapInt64BytesWrapper map[int64]*wrapperspb.BytesValue `protobuf:"bytes,284,rep,name=map_int64_bytes_wrapper,json=mapInt64BytesWrapper,proto3" json:"map_int64_bytes_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapUint32Bool map[uint32]bool `protobuf:"bytes,96,rep,name=map_uint32_bool,json=mapUint32Bool,proto3" json:"map_uint32_bool,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MapUint32String map[uint32]string `protobuf:"bytes,97,rep,name=map_uint32_string,json=mapUint32String,proto3" json:"map_uint32_string,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapUint32Bytes map[uint32][]byte `protobuf:"bytes,98,rep,name=map_uint32_bytes,json=mapUint32Bytes,proto3" json:"map_uint32_bytes,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapUint32Int32 map[uint32]int32 `protobuf:"bytes,99,rep,name=map_uint32_int32,json=mapUint32Int32,proto3" json:"map_uint32_int32,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MapUint32Int64 map[uint32]int64 `protobuf:"bytes,200,rep,name=map_uint32_int64,json=mapUint32Int64,proto3" json:"map_uint32_int64,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MapUint32Uint32 map[uint32]uint32 `protobuf:"bytes,201,rep,name=map_uint32_uint32,json=mapUint32Uint32,proto3" json:"map_uint32_uint32,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MapUint32Uint64 map[uint32]uint64 `protobuf:"bytes,202,rep,name=map_uint32_uint64,json=mapUint32Uint64,proto3" json:"map_uint32_uint64,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MapUint32Float map[uint32]float32 `protobuf:"bytes,203,rep,name=map_uint32_float,json=mapUint32Float,proto3" json:"map_uint32_float,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + MapUint32Double map[uint32]float64 `protobuf:"bytes,204,rep,name=map_uint32_double,json=mapUint32Double,proto3" json:"map_uint32_double,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + MapUint32Enum map[uint32]TestAllTypes_NestedEnum `protobuf:"bytes,205,rep,name=map_uint32_enum,json=mapUint32Enum,proto3" json:"map_uint32_enum,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=cel.expr.conformance.proto3.TestAllTypes_NestedEnum"` + MapUint32Message map[uint32]*TestAllTypes_NestedMessage `protobuf:"bytes,206,rep,name=map_uint32_message,json=mapUint32Message,proto3" json:"map_uint32_message,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapUint32Duration map[uint32]*durationpb.Duration `protobuf:"bytes,237,rep,name=map_uint32_duration,json=mapUint32Duration,proto3" json:"map_uint32_duration,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapUint32Timestamp map[uint32]*timestamppb.Timestamp `protobuf:"bytes,238,rep,name=map_uint32_timestamp,json=mapUint32Timestamp,proto3" json:"map_uint32_timestamp,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapUint32NullValue map[uint32]structpb.NullValue `protobuf:"bytes,239,rep,name=map_uint32_null_value,json=mapUint32NullValue,proto3" json:"map_uint32_null_value,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=google.protobuf.NullValue"` + MapUint32Any map[uint32]*anypb.Any `protobuf:"bytes,285,rep,name=map_uint32_any,json=mapUint32Any,proto3" json:"map_uint32_any,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapUint32Struct map[uint32]*structpb.Struct `protobuf:"bytes,286,rep,name=map_uint32_struct,json=mapUint32Struct,proto3" json:"map_uint32_struct,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapUint32Value map[uint32]*structpb.Value `protobuf:"bytes,287,rep,name=map_uint32_value,json=mapUint32Value,proto3" json:"map_uint32_value,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapUint32ListValue map[uint32]*structpb.ListValue `protobuf:"bytes,288,rep,name=map_uint32_list_value,json=mapUint32ListValue,proto3" json:"map_uint32_list_value,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapUint32Int64Wrapper map[uint32]*wrapperspb.Int64Value `protobuf:"bytes,289,rep,name=map_uint32_int64_wrapper,json=mapUint32Int64Wrapper,proto3" json:"map_uint32_int64_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapUint32Int32Wrapper map[uint32]*wrapperspb.Int32Value `protobuf:"bytes,290,rep,name=map_uint32_int32_wrapper,json=mapUint32Int32Wrapper,proto3" json:"map_uint32_int32_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapUint32DoubleWrapper map[uint32]*wrapperspb.DoubleValue `protobuf:"bytes,291,rep,name=map_uint32_double_wrapper,json=mapUint32DoubleWrapper,proto3" json:"map_uint32_double_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapUint32FloatWrapper map[uint32]*wrapperspb.FloatValue `protobuf:"bytes,292,rep,name=map_uint32_float_wrapper,json=mapUint32FloatWrapper,proto3" json:"map_uint32_float_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapUint32Uint64Wrapper map[uint32]*wrapperspb.UInt64Value `protobuf:"bytes,293,rep,name=map_uint32_uint64_wrapper,json=mapUint32Uint64Wrapper,proto3" json:"map_uint32_uint64_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapUint32Uint32Wrapper map[uint32]*wrapperspb.UInt32Value `protobuf:"bytes,294,rep,name=map_uint32_uint32_wrapper,json=mapUint32Uint32Wrapper,proto3" json:"map_uint32_uint32_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapUint32StringWrapper map[uint32]*wrapperspb.StringValue `protobuf:"bytes,295,rep,name=map_uint32_string_wrapper,json=mapUint32StringWrapper,proto3" json:"map_uint32_string_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapUint32BoolWrapper map[uint32]*wrapperspb.BoolValue `protobuf:"bytes,296,rep,name=map_uint32_bool_wrapper,json=mapUint32BoolWrapper,proto3" json:"map_uint32_bool_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapUint32BytesWrapper map[uint32]*wrapperspb.BytesValue `protobuf:"bytes,297,rep,name=map_uint32_bytes_wrapper,json=mapUint32BytesWrapper,proto3" json:"map_uint32_bytes_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapUint64Bool map[uint64]bool `protobuf:"bytes,207,rep,name=map_uint64_bool,json=mapUint64Bool,proto3" json:"map_uint64_bool,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MapUint64String map[uint64]string `protobuf:"bytes,208,rep,name=map_uint64_string,json=mapUint64String,proto3" json:"map_uint64_string,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapUint64Bytes map[uint64][]byte `protobuf:"bytes,209,rep,name=map_uint64_bytes,json=mapUint64Bytes,proto3" json:"map_uint64_bytes,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapUint64Int32 map[uint64]int32 `protobuf:"bytes,210,rep,name=map_uint64_int32,json=mapUint64Int32,proto3" json:"map_uint64_int32,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MapUint64Int64 map[uint64]int64 `protobuf:"bytes,211,rep,name=map_uint64_int64,json=mapUint64Int64,proto3" json:"map_uint64_int64,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MapUint64Uint32 map[uint64]uint32 `protobuf:"bytes,212,rep,name=map_uint64_uint32,json=mapUint64Uint32,proto3" json:"map_uint64_uint32,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MapUint64Uint64 map[uint64]uint64 `protobuf:"bytes,213,rep,name=map_uint64_uint64,json=mapUint64Uint64,proto3" json:"map_uint64_uint64,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MapUint64Float map[uint64]float32 `protobuf:"bytes,214,rep,name=map_uint64_float,json=mapUint64Float,proto3" json:"map_uint64_float,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + MapUint64Double map[uint64]float64 `protobuf:"bytes,215,rep,name=map_uint64_double,json=mapUint64Double,proto3" json:"map_uint64_double,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + MapUint64Enum map[uint64]TestAllTypes_NestedEnum `protobuf:"bytes,216,rep,name=map_uint64_enum,json=mapUint64Enum,proto3" json:"map_uint64_enum,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=cel.expr.conformance.proto3.TestAllTypes_NestedEnum"` + MapUint64Message map[uint64]*TestAllTypes_NestedMessage `protobuf:"bytes,217,rep,name=map_uint64_message,json=mapUint64Message,proto3" json:"map_uint64_message,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapUint64Duration map[uint64]*durationpb.Duration `protobuf:"bytes,240,rep,name=map_uint64_duration,json=mapUint64Duration,proto3" json:"map_uint64_duration,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapUint64Timestamp map[uint64]*timestamppb.Timestamp `protobuf:"bytes,241,rep,name=map_uint64_timestamp,json=mapUint64Timestamp,proto3" json:"map_uint64_timestamp,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapUint64NullValue map[uint64]structpb.NullValue `protobuf:"bytes,242,rep,name=map_uint64_null_value,json=mapUint64NullValue,proto3" json:"map_uint64_null_value,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=google.protobuf.NullValue"` + MapUint64Any map[uint64]*anypb.Any `protobuf:"bytes,298,rep,name=map_uint64_any,json=mapUint64Any,proto3" json:"map_uint64_any,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapUint64Struct map[uint64]*structpb.Struct `protobuf:"bytes,299,rep,name=map_uint64_struct,json=mapUint64Struct,proto3" json:"map_uint64_struct,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapUint64Value map[uint64]*structpb.Value `protobuf:"bytes,300,rep,name=map_uint64_value,json=mapUint64Value,proto3" json:"map_uint64_value,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapUint64ListValue map[uint64]*structpb.ListValue `protobuf:"bytes,301,rep,name=map_uint64_list_value,json=mapUint64ListValue,proto3" json:"map_uint64_list_value,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapUint64Int64Wrapper map[uint64]*wrapperspb.Int64Value `protobuf:"bytes,302,rep,name=map_uint64_int64_wrapper,json=mapUint64Int64Wrapper,proto3" json:"map_uint64_int64_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapUint64Int32Wrapper map[uint64]*wrapperspb.Int32Value `protobuf:"bytes,303,rep,name=map_uint64_int32_wrapper,json=mapUint64Int32Wrapper,proto3" json:"map_uint64_int32_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapUint64DoubleWrapper map[uint64]*wrapperspb.DoubleValue `protobuf:"bytes,304,rep,name=map_uint64_double_wrapper,json=mapUint64DoubleWrapper,proto3" json:"map_uint64_double_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapUint64FloatWrapper map[uint64]*wrapperspb.FloatValue `protobuf:"bytes,305,rep,name=map_uint64_float_wrapper,json=mapUint64FloatWrapper,proto3" json:"map_uint64_float_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapUint64Uint64Wrapper map[uint64]*wrapperspb.UInt64Value `protobuf:"bytes,306,rep,name=map_uint64_uint64_wrapper,json=mapUint64Uint64Wrapper,proto3" json:"map_uint64_uint64_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapUint64Uint32Wrapper map[uint64]*wrapperspb.UInt32Value `protobuf:"bytes,307,rep,name=map_uint64_uint32_wrapper,json=mapUint64Uint32Wrapper,proto3" json:"map_uint64_uint32_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapUint64StringWrapper map[uint64]*wrapperspb.StringValue `protobuf:"bytes,308,rep,name=map_uint64_string_wrapper,json=mapUint64StringWrapper,proto3" json:"map_uint64_string_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapUint64BoolWrapper map[uint64]*wrapperspb.BoolValue `protobuf:"bytes,309,rep,name=map_uint64_bool_wrapper,json=mapUint64BoolWrapper,proto3" json:"map_uint64_bool_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapUint64BytesWrapper map[uint64]*wrapperspb.BytesValue `protobuf:"bytes,310,rep,name=map_uint64_bytes_wrapper,json=mapUint64BytesWrapper,proto3" json:"map_uint64_bytes_wrapper,omitempty" protobuf_key:"varint,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapStringBool map[string]bool `protobuf:"bytes,218,rep,name=map_string_bool,json=mapStringBool,proto3" json:"map_string_bool,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MapStringString map[string]string `protobuf:"bytes,61,rep,name=map_string_string,json=mapStringString,proto3" json:"map_string_string,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapStringBytes map[string][]byte `protobuf:"bytes,219,rep,name=map_string_bytes,json=mapStringBytes,proto3" json:"map_string_bytes,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapStringInt32 map[string]int32 `protobuf:"bytes,220,rep,name=map_string_int32,json=mapStringInt32,proto3" json:"map_string_int32,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MapStringInt64 map[string]int64 `protobuf:"bytes,221,rep,name=map_string_int64,json=mapStringInt64,proto3" json:"map_string_int64,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MapStringUint32 map[string]uint32 `protobuf:"bytes,222,rep,name=map_string_uint32,json=mapStringUint32,proto3" json:"map_string_uint32,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MapStringUint64 map[string]uint64 `protobuf:"bytes,223,rep,name=map_string_uint64,json=mapStringUint64,proto3" json:"map_string_uint64,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` + MapStringFloat map[string]float32 `protobuf:"bytes,224,rep,name=map_string_float,json=mapStringFloat,proto3" json:"map_string_float,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"` + MapStringDouble map[string]float64 `protobuf:"bytes,225,rep,name=map_string_double,json=mapStringDouble,proto3" json:"map_string_double,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed64,2,opt,name=value"` + MapStringEnum map[string]TestAllTypes_NestedEnum `protobuf:"bytes,226,rep,name=map_string_enum,json=mapStringEnum,proto3" json:"map_string_enum,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=cel.expr.conformance.proto3.TestAllTypes_NestedEnum"` + MapStringMessage map[string]*TestAllTypes_NestedMessage `protobuf:"bytes,227,rep,name=map_string_message,json=mapStringMessage,proto3" json:"map_string_message,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapStringDuration map[string]*durationpb.Duration `protobuf:"bytes,243,rep,name=map_string_duration,json=mapStringDuration,proto3" json:"map_string_duration,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapStringTimestamp map[string]*timestamppb.Timestamp `protobuf:"bytes,244,rep,name=map_string_timestamp,json=mapStringTimestamp,proto3" json:"map_string_timestamp,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapStringNullValue map[string]structpb.NullValue `protobuf:"bytes,245,rep,name=map_string_null_value,json=mapStringNullValue,proto3" json:"map_string_null_value,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value,enum=google.protobuf.NullValue"` + MapStringAny map[string]*anypb.Any `protobuf:"bytes,311,rep,name=map_string_any,json=mapStringAny,proto3" json:"map_string_any,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapStringStruct map[string]*structpb.Struct `protobuf:"bytes,312,rep,name=map_string_struct,json=mapStringStruct,proto3" json:"map_string_struct,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapStringValue map[string]*structpb.Value `protobuf:"bytes,313,rep,name=map_string_value,json=mapStringValue,proto3" json:"map_string_value,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapStringListValue map[string]*structpb.ListValue `protobuf:"bytes,314,rep,name=map_string_list_value,json=mapStringListValue,proto3" json:"map_string_list_value,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapStringInt64Wrapper map[string]*wrapperspb.Int64Value `protobuf:"bytes,315,rep,name=map_string_int64_wrapper,json=mapStringInt64Wrapper,proto3" json:"map_string_int64_wrapper,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapStringInt32Wrapper map[string]*wrapperspb.Int32Value `protobuf:"bytes,316,rep,name=map_string_int32_wrapper,json=mapStringInt32Wrapper,proto3" json:"map_string_int32_wrapper,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapStringDoubleWrapper map[string]*wrapperspb.DoubleValue `protobuf:"bytes,317,rep,name=map_string_double_wrapper,json=mapStringDoubleWrapper,proto3" json:"map_string_double_wrapper,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapStringFloatWrapper map[string]*wrapperspb.FloatValue `protobuf:"bytes,318,rep,name=map_string_float_wrapper,json=mapStringFloatWrapper,proto3" json:"map_string_float_wrapper,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapStringUint64Wrapper map[string]*wrapperspb.UInt64Value `protobuf:"bytes,319,rep,name=map_string_uint64_wrapper,json=mapStringUint64Wrapper,proto3" json:"map_string_uint64_wrapper,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapStringUint32Wrapper map[string]*wrapperspb.UInt32Value `protobuf:"bytes,320,rep,name=map_string_uint32_wrapper,json=mapStringUint32Wrapper,proto3" json:"map_string_uint32_wrapper,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapStringStringWrapper map[string]*wrapperspb.StringValue `protobuf:"bytes,321,rep,name=map_string_string_wrapper,json=mapStringStringWrapper,proto3" json:"map_string_string_wrapper,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapStringBoolWrapper map[string]*wrapperspb.BoolValue `protobuf:"bytes,322,rep,name=map_string_bool_wrapper,json=mapStringBoolWrapper,proto3" json:"map_string_bool_wrapper,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + MapStringBytesWrapper map[string]*wrapperspb.BytesValue `protobuf:"bytes,323,rep,name=map_string_bytes_wrapper,json=mapStringBytesWrapper,proto3" json:"map_string_bytes_wrapper,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // Types that are valid to be assigned to Kind: + // + // *TestAllTypes_OneofType + // *TestAllTypes_OneofMsg + // *TestAllTypes_OneofBool + Kind isTestAllTypes_Kind `protobuf_oneof:"kind"` + As bool `protobuf:"varint,500,opt,name=as,proto3" json:"as,omitempty"` + Break bool `protobuf:"varint,501,opt,name=break,proto3" json:"break,omitempty"` + Const bool `protobuf:"varint,502,opt,name=const,proto3" json:"const,omitempty"` + Continue bool `protobuf:"varint,503,opt,name=continue,proto3" json:"continue,omitempty"` + Else bool `protobuf:"varint,504,opt,name=else,proto3" json:"else,omitempty"` + For bool `protobuf:"varint,505,opt,name=for,proto3" json:"for,omitempty"` + Function bool `protobuf:"varint,506,opt,name=function,proto3" json:"function,omitempty"` + If bool `protobuf:"varint,507,opt,name=if,proto3" json:"if,omitempty"` + Import bool `protobuf:"varint,508,opt,name=import,proto3" json:"import,omitempty"` + Let bool `protobuf:"varint,509,opt,name=let,proto3" json:"let,omitempty"` + Loop bool `protobuf:"varint,510,opt,name=loop,proto3" json:"loop,omitempty"` + Package bool `protobuf:"varint,511,opt,name=package,proto3" json:"package,omitempty"` + Namespace bool `protobuf:"varint,512,opt,name=namespace,proto3" json:"namespace,omitempty"` + Return bool `protobuf:"varint,513,opt,name=return,proto3" json:"return,omitempty"` + Var bool `protobuf:"varint,514,opt,name=var,proto3" json:"var,omitempty"` + Void bool `protobuf:"varint,515,opt,name=void,proto3" json:"void,omitempty"` + While bool `protobuf:"varint,516,opt,name=while,proto3" json:"while,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TestAllTypes) Reset() { + *x = TestAllTypes{} + mi := &file_cel_expr_conformance_proto3_test_all_types_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TestAllTypes) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestAllTypes) ProtoMessage() {} + +func (x *TestAllTypes) ProtoReflect() protoreflect.Message { + mi := &file_cel_expr_conformance_proto3_test_all_types_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 TestAllTypes.ProtoReflect.Descriptor instead. +func (*TestAllTypes) Descriptor() ([]byte, []int) { + return file_cel_expr_conformance_proto3_test_all_types_proto_rawDescGZIP(), []int{0} +} + +func (x *TestAllTypes) GetSingleInt32() int32 { + if x != nil { + return x.SingleInt32 + } + return 0 +} + +func (x *TestAllTypes) GetSingleInt64() int64 { + if x != nil { + return x.SingleInt64 + } + return 0 +} + +func (x *TestAllTypes) GetSingleUint32() uint32 { + if x != nil { + return x.SingleUint32 + } + return 0 +} + +func (x *TestAllTypes) GetSingleUint64() uint64 { + if x != nil { + return x.SingleUint64 + } + return 0 +} + +func (x *TestAllTypes) GetSingleSint32() int32 { + if x != nil { + return x.SingleSint32 + } + return 0 +} + +func (x *TestAllTypes) GetSingleSint64() int64 { + if x != nil { + return x.SingleSint64 + } + return 0 +} + +func (x *TestAllTypes) GetSingleFixed32() uint32 { + if x != nil { + return x.SingleFixed32 + } + return 0 +} + +func (x *TestAllTypes) GetSingleFixed64() uint64 { + if x != nil { + return x.SingleFixed64 + } + return 0 +} + +func (x *TestAllTypes) GetSingleSfixed32() int32 { + if x != nil { + return x.SingleSfixed32 + } + return 0 +} + +func (x *TestAllTypes) GetSingleSfixed64() int64 { + if x != nil { + return x.SingleSfixed64 + } + return 0 +} + +func (x *TestAllTypes) GetSingleFloat() float32 { + if x != nil { + return x.SingleFloat + } + return 0 +} + +func (x *TestAllTypes) GetSingleDouble() float64 { + if x != nil { + return x.SingleDouble + } + return 0 +} + +func (x *TestAllTypes) GetSingleBool() bool { + if x != nil { + return x.SingleBool + } + return false +} + +func (x *TestAllTypes) GetSingleString() string { + if x != nil { + return x.SingleString + } + return "" +} + +func (x *TestAllTypes) GetSingleBytes() []byte { + if x != nil { + return x.SingleBytes + } + return nil +} + +func (x *TestAllTypes) GetOptionalBool() bool { + if x != nil && x.OptionalBool != nil { + return *x.OptionalBool + } + return false +} + +func (x *TestAllTypes) GetOptionalString() string { + if x != nil && x.OptionalString != nil { + return *x.OptionalString + } + return "" +} + +func (x *TestAllTypes) GetIn() bool { + if x != nil { + return x.In + } + return false +} + +func (x *TestAllTypes) GetSingleAny() *anypb.Any { + if x != nil { + return x.SingleAny + } + return nil +} + +func (x *TestAllTypes) GetSingleDuration() *durationpb.Duration { + if x != nil { + return x.SingleDuration + } + return nil +} + +func (x *TestAllTypes) GetSingleTimestamp() *timestamppb.Timestamp { + if x != nil { + return x.SingleTimestamp + } + return nil +} + +func (x *TestAllTypes) GetSingleStruct() *structpb.Struct { + if x != nil { + return x.SingleStruct + } + return nil +} + +func (x *TestAllTypes) GetSingleValue() *structpb.Value { + if x != nil { + return x.SingleValue + } + return nil +} + +func (x *TestAllTypes) GetSingleInt64Wrapper() *wrapperspb.Int64Value { + if x != nil { + return x.SingleInt64Wrapper + } + return nil +} + +func (x *TestAllTypes) GetSingleInt32Wrapper() *wrapperspb.Int32Value { + if x != nil { + return x.SingleInt32Wrapper + } + return nil +} + +func (x *TestAllTypes) GetSingleDoubleWrapper() *wrapperspb.DoubleValue { + if x != nil { + return x.SingleDoubleWrapper + } + return nil +} + +func (x *TestAllTypes) GetSingleFloatWrapper() *wrapperspb.FloatValue { + if x != nil { + return x.SingleFloatWrapper + } + return nil +} + +func (x *TestAllTypes) GetSingleUint64Wrapper() *wrapperspb.UInt64Value { + if x != nil { + return x.SingleUint64Wrapper + } + return nil +} + +func (x *TestAllTypes) GetSingleUint32Wrapper() *wrapperspb.UInt32Value { + if x != nil { + return x.SingleUint32Wrapper + } + return nil +} + +func (x *TestAllTypes) GetSingleStringWrapper() *wrapperspb.StringValue { + if x != nil { + return x.SingleStringWrapper + } + return nil +} + +func (x *TestAllTypes) GetSingleBoolWrapper() *wrapperspb.BoolValue { + if x != nil { + return x.SingleBoolWrapper + } + return nil +} + +func (x *TestAllTypes) GetSingleBytesWrapper() *wrapperspb.BytesValue { + if x != nil { + return x.SingleBytesWrapper + } + return nil +} + +func (x *TestAllTypes) GetListValue() *structpb.ListValue { + if x != nil { + return x.ListValue + } + return nil +} + +func (x *TestAllTypes) GetNullValue() structpb.NullValue { + if x != nil { + return x.NullValue + } + return structpb.NullValue(0) +} + +func (x *TestAllTypes) GetOptionalNullValue() structpb.NullValue { + if x != nil && x.OptionalNullValue != nil { + return *x.OptionalNullValue + } + return structpb.NullValue(0) +} + +func (x *TestAllTypes) GetFieldMask() *fieldmaskpb.FieldMask { + if x != nil { + return x.FieldMask + } + return nil +} + +func (x *TestAllTypes) GetEmpty() *emptypb.Empty { + if x != nil { + return x.Empty + } + return nil +} + +func (x *TestAllTypes) GetNestedType() isTestAllTypes_NestedType { + if x != nil { + return x.NestedType + } + return nil +} + +func (x *TestAllTypes) GetSingleNestedMessage() *TestAllTypes_NestedMessage { + if x != nil { + if x, ok := x.NestedType.(*TestAllTypes_SingleNestedMessage); ok { + return x.SingleNestedMessage + } + } + return nil +} + +func (x *TestAllTypes) GetSingleNestedEnum() TestAllTypes_NestedEnum { + if x != nil { + if x, ok := x.NestedType.(*TestAllTypes_SingleNestedEnum); ok { + return x.SingleNestedEnum + } + } + return TestAllTypes_FOO +} + +func (x *TestAllTypes) GetStandaloneMessage() *TestAllTypes_NestedMessage { + if x != nil { + return x.StandaloneMessage + } + return nil +} + +func (x *TestAllTypes) GetStandaloneEnum() TestAllTypes_NestedEnum { + if x != nil { + return x.StandaloneEnum + } + return TestAllTypes_FOO +} + +func (x *TestAllTypes) GetRepeatedInt32() []int32 { + if x != nil { + return x.RepeatedInt32 + } + return nil +} + +func (x *TestAllTypes) GetRepeatedInt64() []int64 { + if x != nil { + return x.RepeatedInt64 + } + return nil +} + +func (x *TestAllTypes) GetRepeatedUint32() []uint32 { + if x != nil { + return x.RepeatedUint32 + } + return nil +} + +func (x *TestAllTypes) GetRepeatedUint64() []uint64 { + if x != nil { + return x.RepeatedUint64 + } + return nil +} + +func (x *TestAllTypes) GetRepeatedSint32() []int32 { + if x != nil { + return x.RepeatedSint32 + } + return nil +} + +func (x *TestAllTypes) GetRepeatedSint64() []int64 { + if x != nil { + return x.RepeatedSint64 + } + return nil +} + +func (x *TestAllTypes) GetRepeatedFixed32() []uint32 { + if x != nil { + return x.RepeatedFixed32 + } + return nil +} + +func (x *TestAllTypes) GetRepeatedFixed64() []uint64 { + if x != nil { + return x.RepeatedFixed64 + } + return nil +} + +func (x *TestAllTypes) GetRepeatedSfixed32() []int32 { + if x != nil { + return x.RepeatedSfixed32 + } + return nil +} + +func (x *TestAllTypes) GetRepeatedSfixed64() []int64 { + if x != nil { + return x.RepeatedSfixed64 + } + return nil +} + +func (x *TestAllTypes) GetRepeatedFloat() []float32 { + if x != nil { + return x.RepeatedFloat + } + return nil +} + +func (x *TestAllTypes) GetRepeatedDouble() []float64 { + if x != nil { + return x.RepeatedDouble + } + return nil +} + +func (x *TestAllTypes) GetRepeatedBool() []bool { + if x != nil { + return x.RepeatedBool + } + return nil +} + +func (x *TestAllTypes) GetRepeatedString() []string { + if x != nil { + return x.RepeatedString + } + return nil +} + +func (x *TestAllTypes) GetRepeatedBytes() [][]byte { + if x != nil { + return x.RepeatedBytes + } + return nil +} + +func (x *TestAllTypes) GetRepeatedNestedMessage() []*TestAllTypes_NestedMessage { + if x != nil { + return x.RepeatedNestedMessage + } + return nil +} + +func (x *TestAllTypes) GetRepeatedNestedEnum() []TestAllTypes_NestedEnum { + if x != nil { + return x.RepeatedNestedEnum + } + return nil +} + +func (x *TestAllTypes) GetRepeatedStringPiece() []string { + if x != nil { + return x.RepeatedStringPiece + } + return nil +} + +func (x *TestAllTypes) GetRepeatedCord() []string { + if x != nil { + return x.RepeatedCord + } + return nil +} + +func (x *TestAllTypes) GetRepeatedLazyMessage() []*TestAllTypes_NestedMessage { + if x != nil { + return x.RepeatedLazyMessage + } + return nil +} + +func (x *TestAllTypes) GetRepeatedAny() []*anypb.Any { + if x != nil { + return x.RepeatedAny + } + return nil +} + +func (x *TestAllTypes) GetRepeatedDuration() []*durationpb.Duration { + if x != nil { + return x.RepeatedDuration + } + return nil +} + +func (x *TestAllTypes) GetRepeatedTimestamp() []*timestamppb.Timestamp { + if x != nil { + return x.RepeatedTimestamp + } + return nil +} + +func (x *TestAllTypes) GetRepeatedStruct() []*structpb.Struct { + if x != nil { + return x.RepeatedStruct + } + return nil +} + +func (x *TestAllTypes) GetRepeatedValue() []*structpb.Value { + if x != nil { + return x.RepeatedValue + } + return nil +} + +func (x *TestAllTypes) GetRepeatedInt64Wrapper() []*wrapperspb.Int64Value { + if x != nil { + return x.RepeatedInt64Wrapper + } + return nil +} + +func (x *TestAllTypes) GetRepeatedInt32Wrapper() []*wrapperspb.Int32Value { + if x != nil { + return x.RepeatedInt32Wrapper + } + return nil +} + +func (x *TestAllTypes) GetRepeatedDoubleWrapper() []*wrapperspb.DoubleValue { + if x != nil { + return x.RepeatedDoubleWrapper + } + return nil +} + +func (x *TestAllTypes) GetRepeatedFloatWrapper() []*wrapperspb.FloatValue { + if x != nil { + return x.RepeatedFloatWrapper + } + return nil +} + +func (x *TestAllTypes) GetRepeatedUint64Wrapper() []*wrapperspb.UInt64Value { + if x != nil { + return x.RepeatedUint64Wrapper + } + return nil +} + +func (x *TestAllTypes) GetRepeatedUint32Wrapper() []*wrapperspb.UInt32Value { + if x != nil { + return x.RepeatedUint32Wrapper + } + return nil +} + +func (x *TestAllTypes) GetRepeatedStringWrapper() []*wrapperspb.StringValue { + if x != nil { + return x.RepeatedStringWrapper + } + return nil +} + +func (x *TestAllTypes) GetRepeatedBoolWrapper() []*wrapperspb.BoolValue { + if x != nil { + return x.RepeatedBoolWrapper + } + return nil +} + +func (x *TestAllTypes) GetRepeatedBytesWrapper() []*wrapperspb.BytesValue { + if x != nil { + return x.RepeatedBytesWrapper + } + return nil +} + +func (x *TestAllTypes) GetRepeatedListValue() []*structpb.ListValue { + if x != nil { + return x.RepeatedListValue + } + return nil +} + +func (x *TestAllTypes) GetRepeatedNullValue() []structpb.NullValue { + if x != nil { + return x.RepeatedNullValue + } + return nil +} + +func (x *TestAllTypes) GetMapInt64NestedType() map[int64]*NestedTestAllTypes { + if x != nil { + return x.MapInt64NestedType + } + return nil +} + +func (x *TestAllTypes) GetMapBoolBool() map[bool]bool { + if x != nil { + return x.MapBoolBool + } + return nil +} + +func (x *TestAllTypes) GetMapBoolString() map[bool]string { + if x != nil { + return x.MapBoolString + } + return nil +} + +func (x *TestAllTypes) GetMapBoolBytes() map[bool][]byte { + if x != nil { + return x.MapBoolBytes + } + return nil +} + +func (x *TestAllTypes) GetMapBoolInt32() map[bool]int32 { + if x != nil { + return x.MapBoolInt32 + } + return nil +} + +func (x *TestAllTypes) GetMapBoolInt64() map[bool]int64 { + if x != nil { + return x.MapBoolInt64 + } + return nil +} + +func (x *TestAllTypes) GetMapBoolUint32() map[bool]uint32 { + if x != nil { + return x.MapBoolUint32 + } + return nil +} + +func (x *TestAllTypes) GetMapBoolUint64() map[bool]uint64 { + if x != nil { + return x.MapBoolUint64 + } + return nil +} + +func (x *TestAllTypes) GetMapBoolFloat() map[bool]float32 { + if x != nil { + return x.MapBoolFloat + } + return nil +} + +func (x *TestAllTypes) GetMapBoolDouble() map[bool]float64 { + if x != nil { + return x.MapBoolDouble + } + return nil +} + +func (x *TestAllTypes) GetMapBoolEnum() map[bool]TestAllTypes_NestedEnum { + if x != nil { + return x.MapBoolEnum + } + return nil +} + +func (x *TestAllTypes) GetMapBoolMessage() map[bool]*TestAllTypes_NestedMessage { + if x != nil { + return x.MapBoolMessage + } + return nil +} + +func (x *TestAllTypes) GetMapBoolDuration() map[bool]*durationpb.Duration { + if x != nil { + return x.MapBoolDuration + } + return nil +} + +func (x *TestAllTypes) GetMapBoolTimestamp() map[bool]*timestamppb.Timestamp { + if x != nil { + return x.MapBoolTimestamp + } + return nil +} + +func (x *TestAllTypes) GetMapBoolNullValue() map[bool]structpb.NullValue { + if x != nil { + return x.MapBoolNullValue + } + return nil +} + +func (x *TestAllTypes) GetMapBoolAny() map[bool]*anypb.Any { + if x != nil { + return x.MapBoolAny + } + return nil +} + +func (x *TestAllTypes) GetMapBoolStruct() map[bool]*structpb.Struct { + if x != nil { + return x.MapBoolStruct + } + return nil +} + +func (x *TestAllTypes) GetMapBoolValue() map[bool]*structpb.Value { + if x != nil { + return x.MapBoolValue + } + return nil +} + +func (x *TestAllTypes) GetMapBoolListValue() map[bool]*structpb.ListValue { + if x != nil { + return x.MapBoolListValue + } + return nil +} + +func (x *TestAllTypes) GetMapBoolInt64Wrapper() map[bool]*wrapperspb.Int64Value { + if x != nil { + return x.MapBoolInt64Wrapper + } + return nil +} + +func (x *TestAllTypes) GetMapBoolInt32Wrapper() map[bool]*wrapperspb.Int32Value { + if x != nil { + return x.MapBoolInt32Wrapper + } + return nil +} + +func (x *TestAllTypes) GetMapBoolDoubleWrapper() map[bool]*wrapperspb.DoubleValue { + if x != nil { + return x.MapBoolDoubleWrapper + } + return nil +} + +func (x *TestAllTypes) GetMapBoolFloatWrapper() map[bool]*wrapperspb.FloatValue { + if x != nil { + return x.MapBoolFloatWrapper + } + return nil +} + +func (x *TestAllTypes) GetMapBoolUint64Wrapper() map[bool]*wrapperspb.UInt64Value { + if x != nil { + return x.MapBoolUint64Wrapper + } + return nil +} + +func (x *TestAllTypes) GetMapBoolUint32Wrapper() map[bool]*wrapperspb.UInt32Value { + if x != nil { + return x.MapBoolUint32Wrapper + } + return nil +} + +func (x *TestAllTypes) GetMapBoolStringWrapper() map[bool]*wrapperspb.StringValue { + if x != nil { + return x.MapBoolStringWrapper + } + return nil +} + +func (x *TestAllTypes) GetMapBoolBoolWrapper() map[bool]*wrapperspb.BoolValue { + if x != nil { + return x.MapBoolBoolWrapper + } + return nil +} + +func (x *TestAllTypes) GetMapBoolBytesWrapper() map[bool]*wrapperspb.BytesValue { + if x != nil { + return x.MapBoolBytesWrapper + } + return nil +} + +func (x *TestAllTypes) GetMapInt32Bool() map[int32]bool { + if x != nil { + return x.MapInt32Bool + } + return nil +} + +func (x *TestAllTypes) GetMapInt32String() map[int32]string { + if x != nil { + return x.MapInt32String + } + return nil +} + +func (x *TestAllTypes) GetMapInt32Bytes() map[int32][]byte { + if x != nil { + return x.MapInt32Bytes + } + return nil +} + +func (x *TestAllTypes) GetMapInt32Int32() map[int32]int32 { + if x != nil { + return x.MapInt32Int32 + } + return nil +} + +func (x *TestAllTypes) GetMapInt32Int64() map[int32]int64 { + if x != nil { + return x.MapInt32Int64 + } + return nil +} + +func (x *TestAllTypes) GetMapInt32Uint32() map[int32]uint32 { + if x != nil { + return x.MapInt32Uint32 + } + return nil +} + +func (x *TestAllTypes) GetMapInt32Uint64() map[int32]uint64 { + if x != nil { + return x.MapInt32Uint64 + } + return nil +} + +func (x *TestAllTypes) GetMapInt32Float() map[int32]float32 { + if x != nil { + return x.MapInt32Float + } + return nil +} + +func (x *TestAllTypes) GetMapInt32Double() map[int32]float64 { + if x != nil { + return x.MapInt32Double + } + return nil +} + +func (x *TestAllTypes) GetMapInt32Enum() map[int32]TestAllTypes_NestedEnum { + if x != nil { + return x.MapInt32Enum + } + return nil +} + +func (x *TestAllTypes) GetMapInt32Message() map[int32]*TestAllTypes_NestedMessage { + if x != nil { + return x.MapInt32Message + } + return nil +} + +func (x *TestAllTypes) GetMapInt32Duration() map[int32]*durationpb.Duration { + if x != nil { + return x.MapInt32Duration + } + return nil +} + +func (x *TestAllTypes) GetMapInt32Timestamp() map[int32]*timestamppb.Timestamp { + if x != nil { + return x.MapInt32Timestamp + } + return nil +} + +func (x *TestAllTypes) GetMapInt32NullValue() map[int32]structpb.NullValue { + if x != nil { + return x.MapInt32NullValue + } + return nil +} + +func (x *TestAllTypes) GetMapInt32Any() map[int32]*anypb.Any { + if x != nil { + return x.MapInt32Any + } + return nil +} + +func (x *TestAllTypes) GetMapInt32Struct() map[int32]*structpb.Struct { + if x != nil { + return x.MapInt32Struct + } + return nil +} + +func (x *TestAllTypes) GetMapInt32Value() map[int32]*structpb.Value { + if x != nil { + return x.MapInt32Value + } + return nil +} + +func (x *TestAllTypes) GetMapInt32ListValue() map[int32]*structpb.ListValue { + if x != nil { + return x.MapInt32ListValue + } + return nil +} + +func (x *TestAllTypes) GetMapInt32Int64Wrapper() map[int32]*wrapperspb.Int64Value { + if x != nil { + return x.MapInt32Int64Wrapper + } + return nil +} + +func (x *TestAllTypes) GetMapInt32Int32Wrapper() map[int32]*wrapperspb.Int32Value { + if x != nil { + return x.MapInt32Int32Wrapper + } + return nil +} + +func (x *TestAllTypes) GetMapInt32DoubleWrapper() map[int32]*wrapperspb.DoubleValue { + if x != nil { + return x.MapInt32DoubleWrapper + } + return nil +} + +func (x *TestAllTypes) GetMapInt32FloatWrapper() map[int32]*wrapperspb.FloatValue { + if x != nil { + return x.MapInt32FloatWrapper + } + return nil +} + +func (x *TestAllTypes) GetMapInt32Uint64Wrapper() map[int32]*wrapperspb.UInt64Value { + if x != nil { + return x.MapInt32Uint64Wrapper + } + return nil +} + +func (x *TestAllTypes) GetMapInt32Uint32Wrapper() map[int32]*wrapperspb.UInt32Value { + if x != nil { + return x.MapInt32Uint32Wrapper + } + return nil +} + +func (x *TestAllTypes) GetMapInt32StringWrapper() map[int32]*wrapperspb.StringValue { + if x != nil { + return x.MapInt32StringWrapper + } + return nil +} + +func (x *TestAllTypes) GetMapInt32BoolWrapper() map[int32]*wrapperspb.BoolValue { + if x != nil { + return x.MapInt32BoolWrapper + } + return nil +} + +func (x *TestAllTypes) GetMapInt32BytesWrapper() map[int32]*wrapperspb.BytesValue { + if x != nil { + return x.MapInt32BytesWrapper + } + return nil +} + +func (x *TestAllTypes) GetMapInt64Bool() map[int64]bool { + if x != nil { + return x.MapInt64Bool + } + return nil +} + +func (x *TestAllTypes) GetMapInt64String() map[int64]string { + if x != nil { + return x.MapInt64String + } + return nil +} + +func (x *TestAllTypes) GetMapInt64Bytes() map[int64][]byte { + if x != nil { + return x.MapInt64Bytes + } + return nil +} + +func (x *TestAllTypes) GetMapInt64Int32() map[int64]int32 { + if x != nil { + return x.MapInt64Int32 + } + return nil +} + +func (x *TestAllTypes) GetMapInt64Int64() map[int64]int64 { + if x != nil { + return x.MapInt64Int64 + } + return nil +} + +func (x *TestAllTypes) GetMapInt64Uint32() map[int64]uint32 { + if x != nil { + return x.MapInt64Uint32 + } + return nil +} + +func (x *TestAllTypes) GetMapInt64Uint64() map[int64]uint64 { + if x != nil { + return x.MapInt64Uint64 + } + return nil +} + +func (x *TestAllTypes) GetMapInt64Float() map[int64]float32 { + if x != nil { + return x.MapInt64Float + } + return nil +} + +func (x *TestAllTypes) GetMapInt64Double() map[int64]float64 { + if x != nil { + return x.MapInt64Double + } + return nil +} + +func (x *TestAllTypes) GetMapInt64Enum() map[int64]TestAllTypes_NestedEnum { + if x != nil { + return x.MapInt64Enum + } + return nil +} + +func (x *TestAllTypes) GetMapInt64Message() map[int64]*TestAllTypes_NestedMessage { + if x != nil { + return x.MapInt64Message + } + return nil +} + +func (x *TestAllTypes) GetMapInt64Duration() map[int64]*durationpb.Duration { + if x != nil { + return x.MapInt64Duration + } + return nil +} + +func (x *TestAllTypes) GetMapInt64Timestamp() map[int64]*timestamppb.Timestamp { + if x != nil { + return x.MapInt64Timestamp + } + return nil +} + +func (x *TestAllTypes) GetMapInt64NullValue() map[int64]structpb.NullValue { + if x != nil { + return x.MapInt64NullValue + } + return nil +} + +func (x *TestAllTypes) GetMapInt64Any() map[int64]*anypb.Any { + if x != nil { + return x.MapInt64Any + } + return nil +} + +func (x *TestAllTypes) GetMapInt64Struct() map[int64]*structpb.Struct { + if x != nil { + return x.MapInt64Struct + } + return nil +} + +func (x *TestAllTypes) GetMapInt64Value() map[int64]*structpb.Value { + if x != nil { + return x.MapInt64Value + } + return nil +} + +func (x *TestAllTypes) GetMapInt64ListValue() map[int64]*structpb.ListValue { + if x != nil { + return x.MapInt64ListValue + } + return nil +} + +func (x *TestAllTypes) GetMapInt64Int64Wrapper() map[int64]*wrapperspb.Int64Value { + if x != nil { + return x.MapInt64Int64Wrapper + } + return nil +} + +func (x *TestAllTypes) GetMapInt64Int32Wrapper() map[int64]*wrapperspb.Int32Value { + if x != nil { + return x.MapInt64Int32Wrapper + } + return nil +} + +func (x *TestAllTypes) GetMapInt64DoubleWrapper() map[int64]*wrapperspb.DoubleValue { + if x != nil { + return x.MapInt64DoubleWrapper + } + return nil +} + +func (x *TestAllTypes) GetMapInt64FloatWrapper() map[int64]*wrapperspb.FloatValue { + if x != nil { + return x.MapInt64FloatWrapper + } + return nil +} + +func (x *TestAllTypes) GetMapInt64Uint64Wrapper() map[int64]*wrapperspb.UInt64Value { + if x != nil { + return x.MapInt64Uint64Wrapper + } + return nil +} + +func (x *TestAllTypes) GetMapInt64Uint32Wrapper() map[int64]*wrapperspb.UInt32Value { + if x != nil { + return x.MapInt64Uint32Wrapper + } + return nil +} + +func (x *TestAllTypes) GetMapInt64StringWrapper() map[int64]*wrapperspb.StringValue { + if x != nil { + return x.MapInt64StringWrapper + } + return nil +} + +func (x *TestAllTypes) GetMapInt64BoolWrapper() map[int64]*wrapperspb.BoolValue { + if x != nil { + return x.MapInt64BoolWrapper + } + return nil +} + +func (x *TestAllTypes) GetMapInt64BytesWrapper() map[int64]*wrapperspb.BytesValue { + if x != nil { + return x.MapInt64BytesWrapper + } + return nil +} + +func (x *TestAllTypes) GetMapUint32Bool() map[uint32]bool { + if x != nil { + return x.MapUint32Bool + } + return nil +} + +func (x *TestAllTypes) GetMapUint32String() map[uint32]string { + if x != nil { + return x.MapUint32String + } + return nil +} + +func (x *TestAllTypes) GetMapUint32Bytes() map[uint32][]byte { + if x != nil { + return x.MapUint32Bytes + } + return nil +} + +func (x *TestAllTypes) GetMapUint32Int32() map[uint32]int32 { + if x != nil { + return x.MapUint32Int32 + } + return nil +} + +func (x *TestAllTypes) GetMapUint32Int64() map[uint32]int64 { + if x != nil { + return x.MapUint32Int64 + } + return nil +} + +func (x *TestAllTypes) GetMapUint32Uint32() map[uint32]uint32 { + if x != nil { + return x.MapUint32Uint32 + } + return nil +} + +func (x *TestAllTypes) GetMapUint32Uint64() map[uint32]uint64 { + if x != nil { + return x.MapUint32Uint64 + } + return nil +} + +func (x *TestAllTypes) GetMapUint32Float() map[uint32]float32 { + if x != nil { + return x.MapUint32Float + } + return nil +} + +func (x *TestAllTypes) GetMapUint32Double() map[uint32]float64 { + if x != nil { + return x.MapUint32Double + } + return nil +} + +func (x *TestAllTypes) GetMapUint32Enum() map[uint32]TestAllTypes_NestedEnum { + if x != nil { + return x.MapUint32Enum + } + return nil +} + +func (x *TestAllTypes) GetMapUint32Message() map[uint32]*TestAllTypes_NestedMessage { + if x != nil { + return x.MapUint32Message + } + return nil +} + +func (x *TestAllTypes) GetMapUint32Duration() map[uint32]*durationpb.Duration { + if x != nil { + return x.MapUint32Duration + } + return nil +} + +func (x *TestAllTypes) GetMapUint32Timestamp() map[uint32]*timestamppb.Timestamp { + if x != nil { + return x.MapUint32Timestamp + } + return nil +} + +func (x *TestAllTypes) GetMapUint32NullValue() map[uint32]structpb.NullValue { + if x != nil { + return x.MapUint32NullValue + } + return nil +} + +func (x *TestAllTypes) GetMapUint32Any() map[uint32]*anypb.Any { + if x != nil { + return x.MapUint32Any + } + return nil +} + +func (x *TestAllTypes) GetMapUint32Struct() map[uint32]*structpb.Struct { + if x != nil { + return x.MapUint32Struct + } + return nil +} + +func (x *TestAllTypes) GetMapUint32Value() map[uint32]*structpb.Value { + if x != nil { + return x.MapUint32Value + } + return nil +} + +func (x *TestAllTypes) GetMapUint32ListValue() map[uint32]*structpb.ListValue { + if x != nil { + return x.MapUint32ListValue + } + return nil +} + +func (x *TestAllTypes) GetMapUint32Int64Wrapper() map[uint32]*wrapperspb.Int64Value { + if x != nil { + return x.MapUint32Int64Wrapper + } + return nil +} + +func (x *TestAllTypes) GetMapUint32Int32Wrapper() map[uint32]*wrapperspb.Int32Value { + if x != nil { + return x.MapUint32Int32Wrapper + } + return nil +} + +func (x *TestAllTypes) GetMapUint32DoubleWrapper() map[uint32]*wrapperspb.DoubleValue { + if x != nil { + return x.MapUint32DoubleWrapper + } + return nil +} + +func (x *TestAllTypes) GetMapUint32FloatWrapper() map[uint32]*wrapperspb.FloatValue { + if x != nil { + return x.MapUint32FloatWrapper + } + return nil +} + +func (x *TestAllTypes) GetMapUint32Uint64Wrapper() map[uint32]*wrapperspb.UInt64Value { + if x != nil { + return x.MapUint32Uint64Wrapper + } + return nil +} + +func (x *TestAllTypes) GetMapUint32Uint32Wrapper() map[uint32]*wrapperspb.UInt32Value { + if x != nil { + return x.MapUint32Uint32Wrapper + } + return nil +} + +func (x *TestAllTypes) GetMapUint32StringWrapper() map[uint32]*wrapperspb.StringValue { + if x != nil { + return x.MapUint32StringWrapper + } + return nil +} + +func (x *TestAllTypes) GetMapUint32BoolWrapper() map[uint32]*wrapperspb.BoolValue { + if x != nil { + return x.MapUint32BoolWrapper + } + return nil +} + +func (x *TestAllTypes) GetMapUint32BytesWrapper() map[uint32]*wrapperspb.BytesValue { + if x != nil { + return x.MapUint32BytesWrapper + } + return nil +} + +func (x *TestAllTypes) GetMapUint64Bool() map[uint64]bool { + if x != nil { + return x.MapUint64Bool + } + return nil +} + +func (x *TestAllTypes) GetMapUint64String() map[uint64]string { + if x != nil { + return x.MapUint64String + } + return nil +} + +func (x *TestAllTypes) GetMapUint64Bytes() map[uint64][]byte { + if x != nil { + return x.MapUint64Bytes + } + return nil +} + +func (x *TestAllTypes) GetMapUint64Int32() map[uint64]int32 { + if x != nil { + return x.MapUint64Int32 + } + return nil +} + +func (x *TestAllTypes) GetMapUint64Int64() map[uint64]int64 { + if x != nil { + return x.MapUint64Int64 + } + return nil +} + +func (x *TestAllTypes) GetMapUint64Uint32() map[uint64]uint32 { + if x != nil { + return x.MapUint64Uint32 + } + return nil +} + +func (x *TestAllTypes) GetMapUint64Uint64() map[uint64]uint64 { + if x != nil { + return x.MapUint64Uint64 + } + return nil +} + +func (x *TestAllTypes) GetMapUint64Float() map[uint64]float32 { + if x != nil { + return x.MapUint64Float + } + return nil +} + +func (x *TestAllTypes) GetMapUint64Double() map[uint64]float64 { + if x != nil { + return x.MapUint64Double + } + return nil +} + +func (x *TestAllTypes) GetMapUint64Enum() map[uint64]TestAllTypes_NestedEnum { + if x != nil { + return x.MapUint64Enum + } + return nil +} + +func (x *TestAllTypes) GetMapUint64Message() map[uint64]*TestAllTypes_NestedMessage { + if x != nil { + return x.MapUint64Message + } + return nil +} + +func (x *TestAllTypes) GetMapUint64Duration() map[uint64]*durationpb.Duration { + if x != nil { + return x.MapUint64Duration + } + return nil +} + +func (x *TestAllTypes) GetMapUint64Timestamp() map[uint64]*timestamppb.Timestamp { + if x != nil { + return x.MapUint64Timestamp + } + return nil +} + +func (x *TestAllTypes) GetMapUint64NullValue() map[uint64]structpb.NullValue { + if x != nil { + return x.MapUint64NullValue + } + return nil +} + +func (x *TestAllTypes) GetMapUint64Any() map[uint64]*anypb.Any { + if x != nil { + return x.MapUint64Any + } + return nil +} + +func (x *TestAllTypes) GetMapUint64Struct() map[uint64]*structpb.Struct { + if x != nil { + return x.MapUint64Struct + } + return nil +} + +func (x *TestAllTypes) GetMapUint64Value() map[uint64]*structpb.Value { + if x != nil { + return x.MapUint64Value + } + return nil +} + +func (x *TestAllTypes) GetMapUint64ListValue() map[uint64]*structpb.ListValue { + if x != nil { + return x.MapUint64ListValue + } + return nil +} + +func (x *TestAllTypes) GetMapUint64Int64Wrapper() map[uint64]*wrapperspb.Int64Value { + if x != nil { + return x.MapUint64Int64Wrapper + } + return nil +} + +func (x *TestAllTypes) GetMapUint64Int32Wrapper() map[uint64]*wrapperspb.Int32Value { + if x != nil { + return x.MapUint64Int32Wrapper + } + return nil +} + +func (x *TestAllTypes) GetMapUint64DoubleWrapper() map[uint64]*wrapperspb.DoubleValue { + if x != nil { + return x.MapUint64DoubleWrapper + } + return nil +} + +func (x *TestAllTypes) GetMapUint64FloatWrapper() map[uint64]*wrapperspb.FloatValue { + if x != nil { + return x.MapUint64FloatWrapper + } + return nil +} + +func (x *TestAllTypes) GetMapUint64Uint64Wrapper() map[uint64]*wrapperspb.UInt64Value { + if x != nil { + return x.MapUint64Uint64Wrapper + } + return nil +} + +func (x *TestAllTypes) GetMapUint64Uint32Wrapper() map[uint64]*wrapperspb.UInt32Value { + if x != nil { + return x.MapUint64Uint32Wrapper + } + return nil +} + +func (x *TestAllTypes) GetMapUint64StringWrapper() map[uint64]*wrapperspb.StringValue { + if x != nil { + return x.MapUint64StringWrapper + } + return nil +} + +func (x *TestAllTypes) GetMapUint64BoolWrapper() map[uint64]*wrapperspb.BoolValue { + if x != nil { + return x.MapUint64BoolWrapper + } + return nil +} + +func (x *TestAllTypes) GetMapUint64BytesWrapper() map[uint64]*wrapperspb.BytesValue { + if x != nil { + return x.MapUint64BytesWrapper + } + return nil +} + +func (x *TestAllTypes) GetMapStringBool() map[string]bool { + if x != nil { + return x.MapStringBool + } + return nil +} + +func (x *TestAllTypes) GetMapStringString() map[string]string { + if x != nil { + return x.MapStringString + } + return nil +} + +func (x *TestAllTypes) GetMapStringBytes() map[string][]byte { + if x != nil { + return x.MapStringBytes + } + return nil +} + +func (x *TestAllTypes) GetMapStringInt32() map[string]int32 { + if x != nil { + return x.MapStringInt32 + } + return nil +} + +func (x *TestAllTypes) GetMapStringInt64() map[string]int64 { + if x != nil { + return x.MapStringInt64 + } + return nil +} + +func (x *TestAllTypes) GetMapStringUint32() map[string]uint32 { + if x != nil { + return x.MapStringUint32 + } + return nil +} + +func (x *TestAllTypes) GetMapStringUint64() map[string]uint64 { + if x != nil { + return x.MapStringUint64 + } + return nil +} + +func (x *TestAllTypes) GetMapStringFloat() map[string]float32 { + if x != nil { + return x.MapStringFloat + } + return nil +} + +func (x *TestAllTypes) GetMapStringDouble() map[string]float64 { + if x != nil { + return x.MapStringDouble + } + return nil +} + +func (x *TestAllTypes) GetMapStringEnum() map[string]TestAllTypes_NestedEnum { + if x != nil { + return x.MapStringEnum + } + return nil +} + +func (x *TestAllTypes) GetMapStringMessage() map[string]*TestAllTypes_NestedMessage { + if x != nil { + return x.MapStringMessage + } + return nil +} + +func (x *TestAllTypes) GetMapStringDuration() map[string]*durationpb.Duration { + if x != nil { + return x.MapStringDuration + } + return nil +} + +func (x *TestAllTypes) GetMapStringTimestamp() map[string]*timestamppb.Timestamp { + if x != nil { + return x.MapStringTimestamp + } + return nil +} + +func (x *TestAllTypes) GetMapStringNullValue() map[string]structpb.NullValue { + if x != nil { + return x.MapStringNullValue + } + return nil +} + +func (x *TestAllTypes) GetMapStringAny() map[string]*anypb.Any { + if x != nil { + return x.MapStringAny + } + return nil +} + +func (x *TestAllTypes) GetMapStringStruct() map[string]*structpb.Struct { + if x != nil { + return x.MapStringStruct + } + return nil +} + +func (x *TestAllTypes) GetMapStringValue() map[string]*structpb.Value { + if x != nil { + return x.MapStringValue + } + return nil +} + +func (x *TestAllTypes) GetMapStringListValue() map[string]*structpb.ListValue { + if x != nil { + return x.MapStringListValue + } + return nil +} + +func (x *TestAllTypes) GetMapStringInt64Wrapper() map[string]*wrapperspb.Int64Value { + if x != nil { + return x.MapStringInt64Wrapper + } + return nil +} + +func (x *TestAllTypes) GetMapStringInt32Wrapper() map[string]*wrapperspb.Int32Value { + if x != nil { + return x.MapStringInt32Wrapper + } + return nil +} + +func (x *TestAllTypes) GetMapStringDoubleWrapper() map[string]*wrapperspb.DoubleValue { + if x != nil { + return x.MapStringDoubleWrapper + } + return nil +} + +func (x *TestAllTypes) GetMapStringFloatWrapper() map[string]*wrapperspb.FloatValue { + if x != nil { + return x.MapStringFloatWrapper + } + return nil +} + +func (x *TestAllTypes) GetMapStringUint64Wrapper() map[string]*wrapperspb.UInt64Value { + if x != nil { + return x.MapStringUint64Wrapper + } + return nil +} + +func (x *TestAllTypes) GetMapStringUint32Wrapper() map[string]*wrapperspb.UInt32Value { + if x != nil { + return x.MapStringUint32Wrapper + } + return nil +} + +func (x *TestAllTypes) GetMapStringStringWrapper() map[string]*wrapperspb.StringValue { + if x != nil { + return x.MapStringStringWrapper + } + return nil +} + +func (x *TestAllTypes) GetMapStringBoolWrapper() map[string]*wrapperspb.BoolValue { + if x != nil { + return x.MapStringBoolWrapper + } + return nil +} + +func (x *TestAllTypes) GetMapStringBytesWrapper() map[string]*wrapperspb.BytesValue { + if x != nil { + return x.MapStringBytesWrapper + } + return nil +} + +func (x *TestAllTypes) GetKind() isTestAllTypes_Kind { + if x != nil { + return x.Kind + } + return nil +} + +func (x *TestAllTypes) GetOneofType() *NestedTestAllTypes { + if x != nil { + if x, ok := x.Kind.(*TestAllTypes_OneofType); ok { + return x.OneofType + } + } + return nil +} + +func (x *TestAllTypes) GetOneofMsg() *TestAllTypes_NestedMessage { + if x != nil { + if x, ok := x.Kind.(*TestAllTypes_OneofMsg); ok { + return x.OneofMsg + } + } + return nil +} + +func (x *TestAllTypes) GetOneofBool() bool { + if x != nil { + if x, ok := x.Kind.(*TestAllTypes_OneofBool); ok { + return x.OneofBool + } + } + return false +} + +func (x *TestAllTypes) GetAs() bool { + if x != nil { + return x.As + } + return false +} + +func (x *TestAllTypes) GetBreak() bool { + if x != nil { + return x.Break + } + return false +} + +func (x *TestAllTypes) GetConst() bool { + if x != nil { + return x.Const + } + return false +} + +func (x *TestAllTypes) GetContinue() bool { + if x != nil { + return x.Continue + } + return false +} + +func (x *TestAllTypes) GetElse() bool { + if x != nil { + return x.Else + } + return false +} + +func (x *TestAllTypes) GetFor() bool { + if x != nil { + return x.For + } + return false +} + +func (x *TestAllTypes) GetFunction() bool { + if x != nil { + return x.Function + } + return false +} + +func (x *TestAllTypes) GetIf() bool { + if x != nil { + return x.If + } + return false +} + +func (x *TestAllTypes) GetImport() bool { + if x != nil { + return x.Import + } + return false +} + +func (x *TestAllTypes) GetLet() bool { + if x != nil { + return x.Let + } + return false +} + +func (x *TestAllTypes) GetLoop() bool { + if x != nil { + return x.Loop + } + return false +} + +func (x *TestAllTypes) GetPackage() bool { + if x != nil { + return x.Package + } + return false +} + +func (x *TestAllTypes) GetNamespace() bool { + if x != nil { + return x.Namespace + } + return false +} + +func (x *TestAllTypes) GetReturn() bool { + if x != nil { + return x.Return + } + return false +} + +func (x *TestAllTypes) GetVar() bool { + if x != nil { + return x.Var + } + return false +} + +func (x *TestAllTypes) GetVoid() bool { + if x != nil { + return x.Void + } + return false +} + +func (x *TestAllTypes) GetWhile() bool { + if x != nil { + return x.While + } + return false +} + +type isTestAllTypes_NestedType interface { + isTestAllTypes_NestedType() +} + +type TestAllTypes_SingleNestedMessage struct { + SingleNestedMessage *TestAllTypes_NestedMessage `protobuf:"bytes,21,opt,name=single_nested_message,json=singleNestedMessage,proto3,oneof"` +} + +type TestAllTypes_SingleNestedEnum struct { + SingleNestedEnum TestAllTypes_NestedEnum `protobuf:"varint,22,opt,name=single_nested_enum,json=singleNestedEnum,proto3,enum=cel.expr.conformance.proto3.TestAllTypes_NestedEnum,oneof"` +} + +func (*TestAllTypes_SingleNestedMessage) isTestAllTypes_NestedType() {} + +func (*TestAllTypes_SingleNestedEnum) isTestAllTypes_NestedType() {} + +type isTestAllTypes_Kind interface { + isTestAllTypes_Kind() +} + +type TestAllTypes_OneofType struct { + OneofType *NestedTestAllTypes `protobuf:"bytes,400,opt,name=oneof_type,json=oneofType,proto3,oneof"` +} + +type TestAllTypes_OneofMsg struct { + OneofMsg *TestAllTypes_NestedMessage `protobuf:"bytes,401,opt,name=oneof_msg,json=oneofMsg,proto3,oneof"` +} + +type TestAllTypes_OneofBool struct { + OneofBool bool `protobuf:"varint,402,opt,name=oneof_bool,json=oneofBool,proto3,oneof"` +} + +func (*TestAllTypes_OneofType) isTestAllTypes_Kind() {} + +func (*TestAllTypes_OneofMsg) isTestAllTypes_Kind() {} + +func (*TestAllTypes_OneofBool) isTestAllTypes_Kind() {} + +type NestedTestAllTypes struct { + state protoimpl.MessageState `protogen:"open.v1"` + Child *NestedTestAllTypes `protobuf:"bytes,1,opt,name=child,proto3" json:"child,omitempty"` + Payload *TestAllTypes `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *NestedTestAllTypes) Reset() { + *x = NestedTestAllTypes{} + mi := &file_cel_expr_conformance_proto3_test_all_types_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *NestedTestAllTypes) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NestedTestAllTypes) ProtoMessage() {} + +func (x *NestedTestAllTypes) ProtoReflect() protoreflect.Message { + mi := &file_cel_expr_conformance_proto3_test_all_types_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 NestedTestAllTypes.ProtoReflect.Descriptor instead. +func (*NestedTestAllTypes) Descriptor() ([]byte, []int) { + return file_cel_expr_conformance_proto3_test_all_types_proto_rawDescGZIP(), []int{1} +} + +func (x *NestedTestAllTypes) GetChild() *NestedTestAllTypes { + if x != nil { + return x.Child + } + return nil +} + +func (x *NestedTestAllTypes) GetPayload() *TestAllTypes { + if x != nil { + return x.Payload + } + return nil +} + +type TestAllTypes_NestedMessage struct { + state protoimpl.MessageState `protogen:"open.v1"` + Bb int32 `protobuf:"varint,1,opt,name=bb,proto3" json:"bb,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TestAllTypes_NestedMessage) Reset() { + *x = TestAllTypes_NestedMessage{} + mi := &file_cel_expr_conformance_proto3_test_all_types_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TestAllTypes_NestedMessage) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TestAllTypes_NestedMessage) ProtoMessage() {} + +func (x *TestAllTypes_NestedMessage) ProtoReflect() protoreflect.Message { + mi := &file_cel_expr_conformance_proto3_test_all_types_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 TestAllTypes_NestedMessage.ProtoReflect.Descriptor instead. +func (*TestAllTypes_NestedMessage) Descriptor() ([]byte, []int) { + return file_cel_expr_conformance_proto3_test_all_types_proto_rawDescGZIP(), []int{0, 0} +} + +func (x *TestAllTypes_NestedMessage) GetBb() int32 { + if x != nil { + return x.Bb + } + return 0 +} + +var File_cel_expr_conformance_proto3_test_all_types_proto protoreflect.FileDescriptor + +const file_cel_expr_conformance_proto3_test_all_types_proto_rawDesc = "" + + "\n" + + "0cel/expr/conformance/proto3/test_all_types.proto\x12\x1bcel.expr.conformance.proto3\x1a\x19google/protobuf/any.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\xa5\xae\x02\n" + + "\fTestAllTypes\x12!\n" + + "\fsingle_int32\x18\x01 \x01(\x05R\vsingleInt32\x12!\n" + + "\fsingle_int64\x18\x02 \x01(\x03R\vsingleInt64\x12#\n" + + "\rsingle_uint32\x18\x03 \x01(\rR\fsingleUint32\x12#\n" + + "\rsingle_uint64\x18\x04 \x01(\x04R\fsingleUint64\x12#\n" + + "\rsingle_sint32\x18\x05 \x01(\x11R\fsingleSint32\x12#\n" + + "\rsingle_sint64\x18\x06 \x01(\x12R\fsingleSint64\x12%\n" + + "\x0esingle_fixed32\x18\a \x01(\aR\rsingleFixed32\x12%\n" + + "\x0esingle_fixed64\x18\b \x01(\x06R\rsingleFixed64\x12'\n" + + "\x0fsingle_sfixed32\x18\t \x01(\x0fR\x0esingleSfixed32\x12'\n" + + "\x0fsingle_sfixed64\x18\n" + + " \x01(\x10R\x0esingleSfixed64\x12!\n" + + "\fsingle_float\x18\v \x01(\x02R\vsingleFloat\x12#\n" + + "\rsingle_double\x18\f \x01(\x01R\fsingleDouble\x12\x1f\n" + + "\vsingle_bool\x18\r \x01(\bR\n" + + "singleBool\x12#\n" + + "\rsingle_string\x18\x0e \x01(\tR\fsingleString\x12!\n" + + "\fsingle_bytes\x18\x0f \x01(\fR\vsingleBytes\x12(\n" + + "\roptional_bool\x18\x10 \x01(\bH\x02R\foptionalBool\x88\x01\x01\x12,\n" + + "\x0foptional_string\x18\x11 \x01(\tH\x03R\x0eoptionalString\x88\x01\x01\x12\x0e\n" + + "\x02in\x18\x12 \x01(\bR\x02in\x123\n" + + "\n" + + "single_any\x18d \x01(\v2\x14.google.protobuf.AnyR\tsingleAny\x12B\n" + + "\x0fsingle_duration\x18e \x01(\v2\x19.google.protobuf.DurationR\x0esingleDuration\x12E\n" + + "\x10single_timestamp\x18f \x01(\v2\x1a.google.protobuf.TimestampR\x0fsingleTimestamp\x12<\n" + + "\rsingle_struct\x18g \x01(\v2\x17.google.protobuf.StructR\fsingleStruct\x129\n" + + "\fsingle_value\x18h \x01(\v2\x16.google.protobuf.ValueR\vsingleValue\x12M\n" + + "\x14single_int64_wrapper\x18i \x01(\v2\x1b.google.protobuf.Int64ValueR\x12singleInt64Wrapper\x12M\n" + + "\x14single_int32_wrapper\x18j \x01(\v2\x1b.google.protobuf.Int32ValueR\x12singleInt32Wrapper\x12P\n" + + "\x15single_double_wrapper\x18k \x01(\v2\x1c.google.protobuf.DoubleValueR\x13singleDoubleWrapper\x12M\n" + + "\x14single_float_wrapper\x18l \x01(\v2\x1b.google.protobuf.FloatValueR\x12singleFloatWrapper\x12P\n" + + "\x15single_uint64_wrapper\x18m \x01(\v2\x1c.google.protobuf.UInt64ValueR\x13singleUint64Wrapper\x12P\n" + + "\x15single_uint32_wrapper\x18n \x01(\v2\x1c.google.protobuf.UInt32ValueR\x13singleUint32Wrapper\x12P\n" + + "\x15single_string_wrapper\x18o \x01(\v2\x1c.google.protobuf.StringValueR\x13singleStringWrapper\x12J\n" + + "\x13single_bool_wrapper\x18p \x01(\v2\x1a.google.protobuf.BoolValueR\x11singleBoolWrapper\x12M\n" + + "\x14single_bytes_wrapper\x18q \x01(\v2\x1b.google.protobuf.BytesValueR\x12singleBytesWrapper\x129\n" + + "\n" + + "list_value\x18r \x01(\v2\x1a.google.protobuf.ListValueR\tlistValue\x129\n" + + "\n" + + "null_value\x18s \x01(\x0e2\x1a.google.protobuf.NullValueR\tnullValue\x12O\n" + + "\x13optional_null_value\x18t \x01(\x0e2\x1a.google.protobuf.NullValueH\x04R\x11optionalNullValue\x88\x01\x01\x129\n" + + "\n" + + "field_mask\x18u \x01(\v2\x1a.google.protobuf.FieldMaskR\tfieldMask\x12,\n" + + "\x05empty\x18v \x01(\v2\x16.google.protobuf.EmptyR\x05empty\x12m\n" + + "\x15single_nested_message\x18\x15 \x01(\v27.cel.expr.conformance.proto3.TestAllTypes.NestedMessageH\x00R\x13singleNestedMessage\x12d\n" + + "\x12single_nested_enum\x18\x16 \x01(\x0e24.cel.expr.conformance.proto3.TestAllTypes.NestedEnumH\x00R\x10singleNestedEnum\x12f\n" + + "\x12standalone_message\x18\x17 \x01(\v27.cel.expr.conformance.proto3.TestAllTypes.NestedMessageR\x11standaloneMessage\x12]\n" + + "\x0fstandalone_enum\x18\x18 \x01(\x0e24.cel.expr.conformance.proto3.TestAllTypes.NestedEnumR\x0estandaloneEnum\x12%\n" + + "\x0erepeated_int32\x18\x1f \x03(\x05R\rrepeatedInt32\x12%\n" + + "\x0erepeated_int64\x18 \x03(\x03R\rrepeatedInt64\x12'\n" + + "\x0frepeated_uint32\x18! \x03(\rR\x0erepeatedUint32\x12'\n" + + "\x0frepeated_uint64\x18\" \x03(\x04R\x0erepeatedUint64\x12'\n" + + "\x0frepeated_sint32\x18# \x03(\x11R\x0erepeatedSint32\x12'\n" + + "\x0frepeated_sint64\x18$ \x03(\x12R\x0erepeatedSint64\x12)\n" + + "\x10repeated_fixed32\x18% \x03(\aR\x0frepeatedFixed32\x12)\n" + + "\x10repeated_fixed64\x18& \x03(\x06R\x0frepeatedFixed64\x12+\n" + + "\x11repeated_sfixed32\x18' \x03(\x0fR\x10repeatedSfixed32\x12+\n" + + "\x11repeated_sfixed64\x18( \x03(\x10R\x10repeatedSfixed64\x12%\n" + + "\x0erepeated_float\x18) \x03(\x02R\rrepeatedFloat\x12'\n" + + "\x0frepeated_double\x18* \x03(\x01R\x0erepeatedDouble\x12#\n" + + "\rrepeated_bool\x18+ \x03(\bR\frepeatedBool\x12'\n" + + "\x0frepeated_string\x18, \x03(\tR\x0erepeatedString\x12%\n" + + "\x0erepeated_bytes\x18- \x03(\fR\rrepeatedBytes\x12o\n" + + "\x17repeated_nested_message\x183 \x03(\v27.cel.expr.conformance.proto3.TestAllTypes.NestedMessageR\x15repeatedNestedMessage\x12f\n" + + "\x14repeated_nested_enum\x184 \x03(\x0e24.cel.expr.conformance.proto3.TestAllTypes.NestedEnumR\x12repeatedNestedEnum\x126\n" + + "\x15repeated_string_piece\x185 \x03(\tB\x02\b\x02R\x13repeatedStringPiece\x12'\n" + + "\rrepeated_cord\x186 \x03(\tB\x02\b\x01R\frepeatedCord\x12k\n" + + "\x15repeated_lazy_message\x187 \x03(\v27.cel.expr.conformance.proto3.TestAllTypes.NestedMessageR\x13repeatedLazyMessage\x127\n" + + "\frepeated_any\x18x \x03(\v2\x14.google.protobuf.AnyR\vrepeatedAny\x12F\n" + + "\x11repeated_duration\x18y \x03(\v2\x19.google.protobuf.DurationR\x10repeatedDuration\x12I\n" + + "\x12repeated_timestamp\x18z \x03(\v2\x1a.google.protobuf.TimestampR\x11repeatedTimestamp\x12@\n" + + "\x0frepeated_struct\x18{ \x03(\v2\x17.google.protobuf.StructR\x0erepeatedStruct\x12=\n" + + "\x0erepeated_value\x18| \x03(\v2\x16.google.protobuf.ValueR\rrepeatedValue\x12Q\n" + + "\x16repeated_int64_wrapper\x18} \x03(\v2\x1b.google.protobuf.Int64ValueR\x14repeatedInt64Wrapper\x12Q\n" + + "\x16repeated_int32_wrapper\x18~ \x03(\v2\x1b.google.protobuf.Int32ValueR\x14repeatedInt32Wrapper\x12T\n" + + "\x17repeated_double_wrapper\x18\x7f \x03(\v2\x1c.google.protobuf.DoubleValueR\x15repeatedDoubleWrapper\x12R\n" + + "\x16repeated_float_wrapper\x18\x80\x01 \x03(\v2\x1b.google.protobuf.FloatValueR\x14repeatedFloatWrapper\x12U\n" + + "\x17repeated_uint64_wrapper\x18\x81\x01 \x03(\v2\x1c.google.protobuf.UInt64ValueR\x15repeatedUint64Wrapper\x12U\n" + + "\x17repeated_uint32_wrapper\x18\x82\x01 \x03(\v2\x1c.google.protobuf.UInt32ValueR\x15repeatedUint32Wrapper\x12U\n" + + "\x17repeated_string_wrapper\x18\x83\x01 \x03(\v2\x1c.google.protobuf.StringValueR\x15repeatedStringWrapper\x12O\n" + + "\x15repeated_bool_wrapper\x18\x84\x01 \x03(\v2\x1a.google.protobuf.BoolValueR\x13repeatedBoolWrapper\x12R\n" + + "\x16repeated_bytes_wrapper\x18\x85\x01 \x03(\v2\x1b.google.protobuf.BytesValueR\x14repeatedBytesWrapper\x12K\n" + + "\x13repeated_list_value\x18\x86\x01 \x03(\v2\x1a.google.protobuf.ListValueR\x11repeatedListValue\x12K\n" + + "\x13repeated_null_value\x18\x87\x01 \x03(\x0e2\x1a.google.protobuf.NullValueR\x11repeatedNullValue\x12t\n" + + "\x15map_int64_nested_type\x18> \x03(\v2A.cel.expr.conformance.proto3.TestAllTypes.MapInt64NestedTypeEntryR\x12mapInt64NestedType\x12^\n" + + "\rmap_bool_bool\x18? \x03(\v2:.cel.expr.conformance.proto3.TestAllTypes.MapBoolBoolEntryR\vmapBoolBool\x12d\n" + + "\x0fmap_bool_string\x18@ \x03(\v2<.cel.expr.conformance.proto3.TestAllTypes.MapBoolStringEntryR\rmapBoolString\x12a\n" + + "\x0emap_bool_bytes\x18A \x03(\v2;.cel.expr.conformance.proto3.TestAllTypes.MapBoolBytesEntryR\fmapBoolBytes\x12a\n" + + "\x0emap_bool_int32\x18B \x03(\v2;.cel.expr.conformance.proto3.TestAllTypes.MapBoolInt32EntryR\fmapBoolInt32\x12a\n" + + "\x0emap_bool_int64\x18C \x03(\v2;.cel.expr.conformance.proto3.TestAllTypes.MapBoolInt64EntryR\fmapBoolInt64\x12d\n" + + "\x0fmap_bool_uint32\x18D \x03(\v2<.cel.expr.conformance.proto3.TestAllTypes.MapBoolUint32EntryR\rmapBoolUint32\x12d\n" + + "\x0fmap_bool_uint64\x18E \x03(\v2<.cel.expr.conformance.proto3.TestAllTypes.MapBoolUint64EntryR\rmapBoolUint64\x12a\n" + + "\x0emap_bool_float\x18F \x03(\v2;.cel.expr.conformance.proto3.TestAllTypes.MapBoolFloatEntryR\fmapBoolFloat\x12d\n" + + "\x0fmap_bool_double\x18G \x03(\v2<.cel.expr.conformance.proto3.TestAllTypes.MapBoolDoubleEntryR\rmapBoolDouble\x12^\n" + + "\rmap_bool_enum\x18H \x03(\v2:.cel.expr.conformance.proto3.TestAllTypes.MapBoolEnumEntryR\vmapBoolEnum\x12g\n" + + "\x10map_bool_message\x18I \x03(\v2=.cel.expr.conformance.proto3.TestAllTypes.MapBoolMessageEntryR\x0emapBoolMessage\x12k\n" + + "\x11map_bool_duration\x18\xe4\x01 \x03(\v2>.cel.expr.conformance.proto3.TestAllTypes.MapBoolDurationEntryR\x0fmapBoolDuration\x12n\n" + + "\x12map_bool_timestamp\x18\xe5\x01 \x03(\v2?.cel.expr.conformance.proto3.TestAllTypes.MapBoolTimestampEntryR\x10mapBoolTimestamp\x12o\n" + + "\x13map_bool_null_value\x18\xe6\x01 \x03(\v2?.cel.expr.conformance.proto3.TestAllTypes.MapBoolNullValueEntryR\x10mapBoolNullValue\x12\\\n" + + "\fmap_bool_any\x18\xf6\x01 \x03(\v29.cel.expr.conformance.proto3.TestAllTypes.MapBoolAnyEntryR\n" + + "mapBoolAny\x12e\n" + + "\x0fmap_bool_struct\x18\xf7\x01 \x03(\v2<.cel.expr.conformance.proto3.TestAllTypes.MapBoolStructEntryR\rmapBoolStruct\x12b\n" + + "\x0emap_bool_value\x18\xf8\x01 \x03(\v2;.cel.expr.conformance.proto3.TestAllTypes.MapBoolValueEntryR\fmapBoolValue\x12o\n" + + "\x13map_bool_list_value\x18\xf9\x01 \x03(\v2?.cel.expr.conformance.proto3.TestAllTypes.MapBoolListValueEntryR\x10mapBoolListValue\x12x\n" + + "\x16map_bool_int64_wrapper\x18\xfa\x01 \x03(\v2B.cel.expr.conformance.proto3.TestAllTypes.MapBoolInt64WrapperEntryR\x13mapBoolInt64Wrapper\x12x\n" + + "\x16map_bool_int32_wrapper\x18\xfb\x01 \x03(\v2B.cel.expr.conformance.proto3.TestAllTypes.MapBoolInt32WrapperEntryR\x13mapBoolInt32Wrapper\x12{\n" + + "\x17map_bool_double_wrapper\x18\xfc\x01 \x03(\v2C.cel.expr.conformance.proto3.TestAllTypes.MapBoolDoubleWrapperEntryR\x14mapBoolDoubleWrapper\x12x\n" + + "\x16map_bool_float_wrapper\x18\xfd\x01 \x03(\v2B.cel.expr.conformance.proto3.TestAllTypes.MapBoolFloatWrapperEntryR\x13mapBoolFloatWrapper\x12{\n" + + "\x17map_bool_uint64_wrapper\x18\xfe\x01 \x03(\v2C.cel.expr.conformance.proto3.TestAllTypes.MapBoolUint64WrapperEntryR\x14mapBoolUint64Wrapper\x12{\n" + + "\x17map_bool_uint32_wrapper\x18\xff\x01 \x03(\v2C.cel.expr.conformance.proto3.TestAllTypes.MapBoolUint32WrapperEntryR\x14mapBoolUint32Wrapper\x12{\n" + + "\x17map_bool_string_wrapper\x18\x80\x02 \x03(\v2C.cel.expr.conformance.proto3.TestAllTypes.MapBoolStringWrapperEntryR\x14mapBoolStringWrapper\x12u\n" + + "\x15map_bool_bool_wrapper\x18\x81\x02 \x03(\v2A.cel.expr.conformance.proto3.TestAllTypes.MapBoolBoolWrapperEntryR\x12mapBoolBoolWrapper\x12x\n" + + "\x16map_bool_bytes_wrapper\x18\x82\x02 \x03(\v2B.cel.expr.conformance.proto3.TestAllTypes.MapBoolBytesWrapperEntryR\x13mapBoolBytesWrapper\x12a\n" + + "\x0emap_int32_bool\x18J \x03(\v2;.cel.expr.conformance.proto3.TestAllTypes.MapInt32BoolEntryR\fmapInt32Bool\x12g\n" + + "\x10map_int32_string\x18K \x03(\v2=.cel.expr.conformance.proto3.TestAllTypes.MapInt32StringEntryR\x0emapInt32String\x12d\n" + + "\x0fmap_int32_bytes\x18L \x03(\v2<.cel.expr.conformance.proto3.TestAllTypes.MapInt32BytesEntryR\rmapInt32Bytes\x12d\n" + + "\x0fmap_int32_int32\x18M \x03(\v2<.cel.expr.conformance.proto3.TestAllTypes.MapInt32Int32EntryR\rmapInt32Int32\x12d\n" + + "\x0fmap_int32_int64\x18N \x03(\v2<.cel.expr.conformance.proto3.TestAllTypes.MapInt32Int64EntryR\rmapInt32Int64\x12g\n" + + "\x10map_int32_uint32\x18O \x03(\v2=.cel.expr.conformance.proto3.TestAllTypes.MapInt32Uint32EntryR\x0emapInt32Uint32\x12g\n" + + "\x10map_int32_uint64\x18P \x03(\v2=.cel.expr.conformance.proto3.TestAllTypes.MapInt32Uint64EntryR\x0emapInt32Uint64\x12d\n" + + "\x0fmap_int32_float\x18Q \x03(\v2<.cel.expr.conformance.proto3.TestAllTypes.MapInt32FloatEntryR\rmapInt32Float\x12g\n" + + "\x10map_int32_double\x18R \x03(\v2=.cel.expr.conformance.proto3.TestAllTypes.MapInt32DoubleEntryR\x0emapInt32Double\x12a\n" + + "\x0emap_int32_enum\x18S \x03(\v2;.cel.expr.conformance.proto3.TestAllTypes.MapInt32EnumEntryR\fmapInt32Enum\x12j\n" + + "\x11map_int32_message\x18T \x03(\v2>.cel.expr.conformance.proto3.TestAllTypes.MapInt32MessageEntryR\x0fmapInt32Message\x12n\n" + + "\x12map_int32_duration\x18\xe7\x01 \x03(\v2?.cel.expr.conformance.proto3.TestAllTypes.MapInt32DurationEntryR\x10mapInt32Duration\x12q\n" + + "\x13map_int32_timestamp\x18\xe8\x01 \x03(\v2@.cel.expr.conformance.proto3.TestAllTypes.MapInt32TimestampEntryR\x11mapInt32Timestamp\x12r\n" + + "\x14map_int32_null_value\x18\xe9\x01 \x03(\v2@.cel.expr.conformance.proto3.TestAllTypes.MapInt32NullValueEntryR\x11mapInt32NullValue\x12_\n" + + "\rmap_int32_any\x18\x83\x02 \x03(\v2:.cel.expr.conformance.proto3.TestAllTypes.MapInt32AnyEntryR\vmapInt32Any\x12h\n" + + "\x10map_int32_struct\x18\x84\x02 \x03(\v2=.cel.expr.conformance.proto3.TestAllTypes.MapInt32StructEntryR\x0emapInt32Struct\x12e\n" + + "\x0fmap_int32_value\x18\x85\x02 \x03(\v2<.cel.expr.conformance.proto3.TestAllTypes.MapInt32ValueEntryR\rmapInt32Value\x12r\n" + + "\x14map_int32_list_value\x18\x86\x02 \x03(\v2@.cel.expr.conformance.proto3.TestAllTypes.MapInt32ListValueEntryR\x11mapInt32ListValue\x12{\n" + + "\x17map_int32_int64_wrapper\x18\x87\x02 \x03(\v2C.cel.expr.conformance.proto3.TestAllTypes.MapInt32Int64WrapperEntryR\x14mapInt32Int64Wrapper\x12{\n" + + "\x17map_int32_int32_wrapper\x18\x88\x02 \x03(\v2C.cel.expr.conformance.proto3.TestAllTypes.MapInt32Int32WrapperEntryR\x14mapInt32Int32Wrapper\x12~\n" + + "\x18map_int32_double_wrapper\x18\x89\x02 \x03(\v2D.cel.expr.conformance.proto3.TestAllTypes.MapInt32DoubleWrapperEntryR\x15mapInt32DoubleWrapper\x12{\n" + + "\x17map_int32_float_wrapper\x18\x8a\x02 \x03(\v2C.cel.expr.conformance.proto3.TestAllTypes.MapInt32FloatWrapperEntryR\x14mapInt32FloatWrapper\x12~\n" + + "\x18map_int32_uint64_wrapper\x18\x8b\x02 \x03(\v2D.cel.expr.conformance.proto3.TestAllTypes.MapInt32Uint64WrapperEntryR\x15mapInt32Uint64Wrapper\x12~\n" + + "\x18map_int32_uint32_wrapper\x18\x8c\x02 \x03(\v2D.cel.expr.conformance.proto3.TestAllTypes.MapInt32Uint32WrapperEntryR\x15mapInt32Uint32Wrapper\x12~\n" + + "\x18map_int32_string_wrapper\x18\x8d\x02 \x03(\v2D.cel.expr.conformance.proto3.TestAllTypes.MapInt32StringWrapperEntryR\x15mapInt32StringWrapper\x12x\n" + + "\x16map_int32_bool_wrapper\x18\x8e\x02 \x03(\v2B.cel.expr.conformance.proto3.TestAllTypes.MapInt32BoolWrapperEntryR\x13mapInt32BoolWrapper\x12{\n" + + "\x17map_int32_bytes_wrapper\x18\x8f\x02 \x03(\v2C.cel.expr.conformance.proto3.TestAllTypes.MapInt32BytesWrapperEntryR\x14mapInt32BytesWrapper\x12a\n" + + "\x0emap_int64_bool\x18U \x03(\v2;.cel.expr.conformance.proto3.TestAllTypes.MapInt64BoolEntryR\fmapInt64Bool\x12g\n" + + "\x10map_int64_string\x18V \x03(\v2=.cel.expr.conformance.proto3.TestAllTypes.MapInt64StringEntryR\x0emapInt64String\x12d\n" + + "\x0fmap_int64_bytes\x18W \x03(\v2<.cel.expr.conformance.proto3.TestAllTypes.MapInt64BytesEntryR\rmapInt64Bytes\x12d\n" + + "\x0fmap_int64_int32\x18X \x03(\v2<.cel.expr.conformance.proto3.TestAllTypes.MapInt64Int32EntryR\rmapInt64Int32\x12d\n" + + "\x0fmap_int64_int64\x18Y \x03(\v2<.cel.expr.conformance.proto3.TestAllTypes.MapInt64Int64EntryR\rmapInt64Int64\x12g\n" + + "\x10map_int64_uint32\x18Z \x03(\v2=.cel.expr.conformance.proto3.TestAllTypes.MapInt64Uint32EntryR\x0emapInt64Uint32\x12g\n" + + "\x10map_int64_uint64\x18[ \x03(\v2=.cel.expr.conformance.proto3.TestAllTypes.MapInt64Uint64EntryR\x0emapInt64Uint64\x12d\n" + + "\x0fmap_int64_float\x18\\ \x03(\v2<.cel.expr.conformance.proto3.TestAllTypes.MapInt64FloatEntryR\rmapInt64Float\x12g\n" + + "\x10map_int64_double\x18] \x03(\v2=.cel.expr.conformance.proto3.TestAllTypes.MapInt64DoubleEntryR\x0emapInt64Double\x12a\n" + + "\x0emap_int64_enum\x18^ \x03(\v2;.cel.expr.conformance.proto3.TestAllTypes.MapInt64EnumEntryR\fmapInt64Enum\x12j\n" + + "\x11map_int64_message\x18_ \x03(\v2>.cel.expr.conformance.proto3.TestAllTypes.MapInt64MessageEntryR\x0fmapInt64Message\x12n\n" + + "\x12map_int64_duration\x18\xea\x01 \x03(\v2?.cel.expr.conformance.proto3.TestAllTypes.MapInt64DurationEntryR\x10mapInt64Duration\x12q\n" + + "\x13map_int64_timestamp\x18\xeb\x01 \x03(\v2@.cel.expr.conformance.proto3.TestAllTypes.MapInt64TimestampEntryR\x11mapInt64Timestamp\x12r\n" + + "\x14map_int64_null_value\x18\xec\x01 \x03(\v2@.cel.expr.conformance.proto3.TestAllTypes.MapInt64NullValueEntryR\x11mapInt64NullValue\x12_\n" + + "\rmap_int64_any\x18\x90\x02 \x03(\v2:.cel.expr.conformance.proto3.TestAllTypes.MapInt64AnyEntryR\vmapInt64Any\x12h\n" + + "\x10map_int64_struct\x18\x91\x02 \x03(\v2=.cel.expr.conformance.proto3.TestAllTypes.MapInt64StructEntryR\x0emapInt64Struct\x12e\n" + + "\x0fmap_int64_value\x18\x92\x02 \x03(\v2<.cel.expr.conformance.proto3.TestAllTypes.MapInt64ValueEntryR\rmapInt64Value\x12r\n" + + "\x14map_int64_list_value\x18\x93\x02 \x03(\v2@.cel.expr.conformance.proto3.TestAllTypes.MapInt64ListValueEntryR\x11mapInt64ListValue\x12{\n" + + "\x17map_int64_int64_wrapper\x18\x94\x02 \x03(\v2C.cel.expr.conformance.proto3.TestAllTypes.MapInt64Int64WrapperEntryR\x14mapInt64Int64Wrapper\x12{\n" + + "\x17map_int64_int32_wrapper\x18\x95\x02 \x03(\v2C.cel.expr.conformance.proto3.TestAllTypes.MapInt64Int32WrapperEntryR\x14mapInt64Int32Wrapper\x12~\n" + + "\x18map_int64_double_wrapper\x18\x96\x02 \x03(\v2D.cel.expr.conformance.proto3.TestAllTypes.MapInt64DoubleWrapperEntryR\x15mapInt64DoubleWrapper\x12{\n" + + "\x17map_int64_float_wrapper\x18\x97\x02 \x03(\v2C.cel.expr.conformance.proto3.TestAllTypes.MapInt64FloatWrapperEntryR\x14mapInt64FloatWrapper\x12~\n" + + "\x18map_int64_uint64_wrapper\x18\x98\x02 \x03(\v2D.cel.expr.conformance.proto3.TestAllTypes.MapInt64Uint64WrapperEntryR\x15mapInt64Uint64Wrapper\x12~\n" + + "\x18map_int64_uint32_wrapper\x18\x99\x02 \x03(\v2D.cel.expr.conformance.proto3.TestAllTypes.MapInt64Uint32WrapperEntryR\x15mapInt64Uint32Wrapper\x12~\n" + + "\x18map_int64_string_wrapper\x18\x9a\x02 \x03(\v2D.cel.expr.conformance.proto3.TestAllTypes.MapInt64StringWrapperEntryR\x15mapInt64StringWrapper\x12x\n" + + "\x16map_int64_bool_wrapper\x18\x9b\x02 \x03(\v2B.cel.expr.conformance.proto3.TestAllTypes.MapInt64BoolWrapperEntryR\x13mapInt64BoolWrapper\x12{\n" + + "\x17map_int64_bytes_wrapper\x18\x9c\x02 \x03(\v2C.cel.expr.conformance.proto3.TestAllTypes.MapInt64BytesWrapperEntryR\x14mapInt64BytesWrapper\x12d\n" + + "\x0fmap_uint32_bool\x18` \x03(\v2<.cel.expr.conformance.proto3.TestAllTypes.MapUint32BoolEntryR\rmapUint32Bool\x12j\n" + + "\x11map_uint32_string\x18a \x03(\v2>.cel.expr.conformance.proto3.TestAllTypes.MapUint32StringEntryR\x0fmapUint32String\x12g\n" + + "\x10map_uint32_bytes\x18b \x03(\v2=.cel.expr.conformance.proto3.TestAllTypes.MapUint32BytesEntryR\x0emapUint32Bytes\x12g\n" + + "\x10map_uint32_int32\x18c \x03(\v2=.cel.expr.conformance.proto3.TestAllTypes.MapUint32Int32EntryR\x0emapUint32Int32\x12h\n" + + "\x10map_uint32_int64\x18\xc8\x01 \x03(\v2=.cel.expr.conformance.proto3.TestAllTypes.MapUint32Int64EntryR\x0emapUint32Int64\x12k\n" + + "\x11map_uint32_uint32\x18\xc9\x01 \x03(\v2>.cel.expr.conformance.proto3.TestAllTypes.MapUint32Uint32EntryR\x0fmapUint32Uint32\x12k\n" + + "\x11map_uint32_uint64\x18\xca\x01 \x03(\v2>.cel.expr.conformance.proto3.TestAllTypes.MapUint32Uint64EntryR\x0fmapUint32Uint64\x12h\n" + + "\x10map_uint32_float\x18\xcb\x01 \x03(\v2=.cel.expr.conformance.proto3.TestAllTypes.MapUint32FloatEntryR\x0emapUint32Float\x12k\n" + + "\x11map_uint32_double\x18\xcc\x01 \x03(\v2>.cel.expr.conformance.proto3.TestAllTypes.MapUint32DoubleEntryR\x0fmapUint32Double\x12e\n" + + "\x0fmap_uint32_enum\x18\xcd\x01 \x03(\v2<.cel.expr.conformance.proto3.TestAllTypes.MapUint32EnumEntryR\rmapUint32Enum\x12n\n" + + "\x12map_uint32_message\x18\xce\x01 \x03(\v2?.cel.expr.conformance.proto3.TestAllTypes.MapUint32MessageEntryR\x10mapUint32Message\x12q\n" + + "\x13map_uint32_duration\x18\xed\x01 \x03(\v2@.cel.expr.conformance.proto3.TestAllTypes.MapUint32DurationEntryR\x11mapUint32Duration\x12t\n" + + "\x14map_uint32_timestamp\x18\xee\x01 \x03(\v2A.cel.expr.conformance.proto3.TestAllTypes.MapUint32TimestampEntryR\x12mapUint32Timestamp\x12u\n" + + "\x15map_uint32_null_value\x18\xef\x01 \x03(\v2A.cel.expr.conformance.proto3.TestAllTypes.MapUint32NullValueEntryR\x12mapUint32NullValue\x12b\n" + + "\x0emap_uint32_any\x18\x9d\x02 \x03(\v2;.cel.expr.conformance.proto3.TestAllTypes.MapUint32AnyEntryR\fmapUint32Any\x12k\n" + + "\x11map_uint32_struct\x18\x9e\x02 \x03(\v2>.cel.expr.conformance.proto3.TestAllTypes.MapUint32StructEntryR\x0fmapUint32Struct\x12h\n" + + "\x10map_uint32_value\x18\x9f\x02 \x03(\v2=.cel.expr.conformance.proto3.TestAllTypes.MapUint32ValueEntryR\x0emapUint32Value\x12u\n" + + "\x15map_uint32_list_value\x18\xa0\x02 \x03(\v2A.cel.expr.conformance.proto3.TestAllTypes.MapUint32ListValueEntryR\x12mapUint32ListValue\x12~\n" + + "\x18map_uint32_int64_wrapper\x18\xa1\x02 \x03(\v2D.cel.expr.conformance.proto3.TestAllTypes.MapUint32Int64WrapperEntryR\x15mapUint32Int64Wrapper\x12~\n" + + "\x18map_uint32_int32_wrapper\x18\xa2\x02 \x03(\v2D.cel.expr.conformance.proto3.TestAllTypes.MapUint32Int32WrapperEntryR\x15mapUint32Int32Wrapper\x12\x81\x01\n" + + "\x19map_uint32_double_wrapper\x18\xa3\x02 \x03(\v2E.cel.expr.conformance.proto3.TestAllTypes.MapUint32DoubleWrapperEntryR\x16mapUint32DoubleWrapper\x12~\n" + + "\x18map_uint32_float_wrapper\x18\xa4\x02 \x03(\v2D.cel.expr.conformance.proto3.TestAllTypes.MapUint32FloatWrapperEntryR\x15mapUint32FloatWrapper\x12\x81\x01\n" + + "\x19map_uint32_uint64_wrapper\x18\xa5\x02 \x03(\v2E.cel.expr.conformance.proto3.TestAllTypes.MapUint32Uint64WrapperEntryR\x16mapUint32Uint64Wrapper\x12\x81\x01\n" + + "\x19map_uint32_uint32_wrapper\x18\xa6\x02 \x03(\v2E.cel.expr.conformance.proto3.TestAllTypes.MapUint32Uint32WrapperEntryR\x16mapUint32Uint32Wrapper\x12\x81\x01\n" + + "\x19map_uint32_string_wrapper\x18\xa7\x02 \x03(\v2E.cel.expr.conformance.proto3.TestAllTypes.MapUint32StringWrapperEntryR\x16mapUint32StringWrapper\x12{\n" + + "\x17map_uint32_bool_wrapper\x18\xa8\x02 \x03(\v2C.cel.expr.conformance.proto3.TestAllTypes.MapUint32BoolWrapperEntryR\x14mapUint32BoolWrapper\x12~\n" + + "\x18map_uint32_bytes_wrapper\x18\xa9\x02 \x03(\v2D.cel.expr.conformance.proto3.TestAllTypes.MapUint32BytesWrapperEntryR\x15mapUint32BytesWrapper\x12e\n" + + "\x0fmap_uint64_bool\x18\xcf\x01 \x03(\v2<.cel.expr.conformance.proto3.TestAllTypes.MapUint64BoolEntryR\rmapUint64Bool\x12k\n" + + "\x11map_uint64_string\x18\xd0\x01 \x03(\v2>.cel.expr.conformance.proto3.TestAllTypes.MapUint64StringEntryR\x0fmapUint64String\x12h\n" + + "\x10map_uint64_bytes\x18\xd1\x01 \x03(\v2=.cel.expr.conformance.proto3.TestAllTypes.MapUint64BytesEntryR\x0emapUint64Bytes\x12h\n" + + "\x10map_uint64_int32\x18\xd2\x01 \x03(\v2=.cel.expr.conformance.proto3.TestAllTypes.MapUint64Int32EntryR\x0emapUint64Int32\x12h\n" + + "\x10map_uint64_int64\x18\xd3\x01 \x03(\v2=.cel.expr.conformance.proto3.TestAllTypes.MapUint64Int64EntryR\x0emapUint64Int64\x12k\n" + + "\x11map_uint64_uint32\x18\xd4\x01 \x03(\v2>.cel.expr.conformance.proto3.TestAllTypes.MapUint64Uint32EntryR\x0fmapUint64Uint32\x12k\n" + + "\x11map_uint64_uint64\x18\xd5\x01 \x03(\v2>.cel.expr.conformance.proto3.TestAllTypes.MapUint64Uint64EntryR\x0fmapUint64Uint64\x12h\n" + + "\x10map_uint64_float\x18\xd6\x01 \x03(\v2=.cel.expr.conformance.proto3.TestAllTypes.MapUint64FloatEntryR\x0emapUint64Float\x12k\n" + + "\x11map_uint64_double\x18\xd7\x01 \x03(\v2>.cel.expr.conformance.proto3.TestAllTypes.MapUint64DoubleEntryR\x0fmapUint64Double\x12e\n" + + "\x0fmap_uint64_enum\x18\xd8\x01 \x03(\v2<.cel.expr.conformance.proto3.TestAllTypes.MapUint64EnumEntryR\rmapUint64Enum\x12n\n" + + "\x12map_uint64_message\x18\xd9\x01 \x03(\v2?.cel.expr.conformance.proto3.TestAllTypes.MapUint64MessageEntryR\x10mapUint64Message\x12q\n" + + "\x13map_uint64_duration\x18\xf0\x01 \x03(\v2@.cel.expr.conformance.proto3.TestAllTypes.MapUint64DurationEntryR\x11mapUint64Duration\x12t\n" + + "\x14map_uint64_timestamp\x18\xf1\x01 \x03(\v2A.cel.expr.conformance.proto3.TestAllTypes.MapUint64TimestampEntryR\x12mapUint64Timestamp\x12u\n" + + "\x15map_uint64_null_value\x18\xf2\x01 \x03(\v2A.cel.expr.conformance.proto3.TestAllTypes.MapUint64NullValueEntryR\x12mapUint64NullValue\x12b\n" + + "\x0emap_uint64_any\x18\xaa\x02 \x03(\v2;.cel.expr.conformance.proto3.TestAllTypes.MapUint64AnyEntryR\fmapUint64Any\x12k\n" + + "\x11map_uint64_struct\x18\xab\x02 \x03(\v2>.cel.expr.conformance.proto3.TestAllTypes.MapUint64StructEntryR\x0fmapUint64Struct\x12h\n" + + "\x10map_uint64_value\x18\xac\x02 \x03(\v2=.cel.expr.conformance.proto3.TestAllTypes.MapUint64ValueEntryR\x0emapUint64Value\x12u\n" + + "\x15map_uint64_list_value\x18\xad\x02 \x03(\v2A.cel.expr.conformance.proto3.TestAllTypes.MapUint64ListValueEntryR\x12mapUint64ListValue\x12~\n" + + "\x18map_uint64_int64_wrapper\x18\xae\x02 \x03(\v2D.cel.expr.conformance.proto3.TestAllTypes.MapUint64Int64WrapperEntryR\x15mapUint64Int64Wrapper\x12~\n" + + "\x18map_uint64_int32_wrapper\x18\xaf\x02 \x03(\v2D.cel.expr.conformance.proto3.TestAllTypes.MapUint64Int32WrapperEntryR\x15mapUint64Int32Wrapper\x12\x81\x01\n" + + "\x19map_uint64_double_wrapper\x18\xb0\x02 \x03(\v2E.cel.expr.conformance.proto3.TestAllTypes.MapUint64DoubleWrapperEntryR\x16mapUint64DoubleWrapper\x12~\n" + + "\x18map_uint64_float_wrapper\x18\xb1\x02 \x03(\v2D.cel.expr.conformance.proto3.TestAllTypes.MapUint64FloatWrapperEntryR\x15mapUint64FloatWrapper\x12\x81\x01\n" + + "\x19map_uint64_uint64_wrapper\x18\xb2\x02 \x03(\v2E.cel.expr.conformance.proto3.TestAllTypes.MapUint64Uint64WrapperEntryR\x16mapUint64Uint64Wrapper\x12\x81\x01\n" + + "\x19map_uint64_uint32_wrapper\x18\xb3\x02 \x03(\v2E.cel.expr.conformance.proto3.TestAllTypes.MapUint64Uint32WrapperEntryR\x16mapUint64Uint32Wrapper\x12\x81\x01\n" + + "\x19map_uint64_string_wrapper\x18\xb4\x02 \x03(\v2E.cel.expr.conformance.proto3.TestAllTypes.MapUint64StringWrapperEntryR\x16mapUint64StringWrapper\x12{\n" + + "\x17map_uint64_bool_wrapper\x18\xb5\x02 \x03(\v2C.cel.expr.conformance.proto3.TestAllTypes.MapUint64BoolWrapperEntryR\x14mapUint64BoolWrapper\x12~\n" + + "\x18map_uint64_bytes_wrapper\x18\xb6\x02 \x03(\v2D.cel.expr.conformance.proto3.TestAllTypes.MapUint64BytesWrapperEntryR\x15mapUint64BytesWrapper\x12e\n" + + "\x0fmap_string_bool\x18\xda\x01 \x03(\v2<.cel.expr.conformance.proto3.TestAllTypes.MapStringBoolEntryR\rmapStringBool\x12j\n" + + "\x11map_string_string\x18= \x03(\v2>.cel.expr.conformance.proto3.TestAllTypes.MapStringStringEntryR\x0fmapStringString\x12h\n" + + "\x10map_string_bytes\x18\xdb\x01 \x03(\v2=.cel.expr.conformance.proto3.TestAllTypes.MapStringBytesEntryR\x0emapStringBytes\x12h\n" + + "\x10map_string_int32\x18\xdc\x01 \x03(\v2=.cel.expr.conformance.proto3.TestAllTypes.MapStringInt32EntryR\x0emapStringInt32\x12h\n" + + "\x10map_string_int64\x18\xdd\x01 \x03(\v2=.cel.expr.conformance.proto3.TestAllTypes.MapStringInt64EntryR\x0emapStringInt64\x12k\n" + + "\x11map_string_uint32\x18\xde\x01 \x03(\v2>.cel.expr.conformance.proto3.TestAllTypes.MapStringUint32EntryR\x0fmapStringUint32\x12k\n" + + "\x11map_string_uint64\x18\xdf\x01 \x03(\v2>.cel.expr.conformance.proto3.TestAllTypes.MapStringUint64EntryR\x0fmapStringUint64\x12h\n" + + "\x10map_string_float\x18\xe0\x01 \x03(\v2=.cel.expr.conformance.proto3.TestAllTypes.MapStringFloatEntryR\x0emapStringFloat\x12k\n" + + "\x11map_string_double\x18\xe1\x01 \x03(\v2>.cel.expr.conformance.proto3.TestAllTypes.MapStringDoubleEntryR\x0fmapStringDouble\x12e\n" + + "\x0fmap_string_enum\x18\xe2\x01 \x03(\v2<.cel.expr.conformance.proto3.TestAllTypes.MapStringEnumEntryR\rmapStringEnum\x12n\n" + + "\x12map_string_message\x18\xe3\x01 \x03(\v2?.cel.expr.conformance.proto3.TestAllTypes.MapStringMessageEntryR\x10mapStringMessage\x12q\n" + + "\x13map_string_duration\x18\xf3\x01 \x03(\v2@.cel.expr.conformance.proto3.TestAllTypes.MapStringDurationEntryR\x11mapStringDuration\x12t\n" + + "\x14map_string_timestamp\x18\xf4\x01 \x03(\v2A.cel.expr.conformance.proto3.TestAllTypes.MapStringTimestampEntryR\x12mapStringTimestamp\x12u\n" + + "\x15map_string_null_value\x18\xf5\x01 \x03(\v2A.cel.expr.conformance.proto3.TestAllTypes.MapStringNullValueEntryR\x12mapStringNullValue\x12b\n" + + "\x0emap_string_any\x18\xb7\x02 \x03(\v2;.cel.expr.conformance.proto3.TestAllTypes.MapStringAnyEntryR\fmapStringAny\x12k\n" + + "\x11map_string_struct\x18\xb8\x02 \x03(\v2>.cel.expr.conformance.proto3.TestAllTypes.MapStringStructEntryR\x0fmapStringStruct\x12h\n" + + "\x10map_string_value\x18\xb9\x02 \x03(\v2=.cel.expr.conformance.proto3.TestAllTypes.MapStringValueEntryR\x0emapStringValue\x12u\n" + + "\x15map_string_list_value\x18\xba\x02 \x03(\v2A.cel.expr.conformance.proto3.TestAllTypes.MapStringListValueEntryR\x12mapStringListValue\x12~\n" + + "\x18map_string_int64_wrapper\x18\xbb\x02 \x03(\v2D.cel.expr.conformance.proto3.TestAllTypes.MapStringInt64WrapperEntryR\x15mapStringInt64Wrapper\x12~\n" + + "\x18map_string_int32_wrapper\x18\xbc\x02 \x03(\v2D.cel.expr.conformance.proto3.TestAllTypes.MapStringInt32WrapperEntryR\x15mapStringInt32Wrapper\x12\x81\x01\n" + + "\x19map_string_double_wrapper\x18\xbd\x02 \x03(\v2E.cel.expr.conformance.proto3.TestAllTypes.MapStringDoubleWrapperEntryR\x16mapStringDoubleWrapper\x12~\n" + + "\x18map_string_float_wrapper\x18\xbe\x02 \x03(\v2D.cel.expr.conformance.proto3.TestAllTypes.MapStringFloatWrapperEntryR\x15mapStringFloatWrapper\x12\x81\x01\n" + + "\x19map_string_uint64_wrapper\x18\xbf\x02 \x03(\v2E.cel.expr.conformance.proto3.TestAllTypes.MapStringUint64WrapperEntryR\x16mapStringUint64Wrapper\x12\x81\x01\n" + + "\x19map_string_uint32_wrapper\x18\xc0\x02 \x03(\v2E.cel.expr.conformance.proto3.TestAllTypes.MapStringUint32WrapperEntryR\x16mapStringUint32Wrapper\x12\x81\x01\n" + + "\x19map_string_string_wrapper\x18\xc1\x02 \x03(\v2E.cel.expr.conformance.proto3.TestAllTypes.MapStringStringWrapperEntryR\x16mapStringStringWrapper\x12{\n" + + "\x17map_string_bool_wrapper\x18\xc2\x02 \x03(\v2C.cel.expr.conformance.proto3.TestAllTypes.MapStringBoolWrapperEntryR\x14mapStringBoolWrapper\x12~\n" + + "\x18map_string_bytes_wrapper\x18\xc3\x02 \x03(\v2D.cel.expr.conformance.proto3.TestAllTypes.MapStringBytesWrapperEntryR\x15mapStringBytesWrapper\x12Q\n" + + "\n" + + "oneof_type\x18\x90\x03 \x01(\v2/.cel.expr.conformance.proto3.NestedTestAllTypesH\x01R\toneofType\x12W\n" + + "\toneof_msg\x18\x91\x03 \x01(\v27.cel.expr.conformance.proto3.TestAllTypes.NestedMessageH\x01R\boneofMsg\x12 \n" + + "\n" + + "oneof_bool\x18\x92\x03 \x01(\bH\x01R\toneofBool\x12\x0f\n" + + "\x02as\x18\xf4\x03 \x01(\bR\x02as\x12\x15\n" + + "\x05break\x18\xf5\x03 \x01(\bR\x05break\x12\x15\n" + + "\x05const\x18\xf6\x03 \x01(\bR\x05const\x12\x1b\n" + + "\bcontinue\x18\xf7\x03 \x01(\bR\bcontinue\x12\x13\n" + + "\x04else\x18\xf8\x03 \x01(\bR\x04else\x12\x11\n" + + "\x03for\x18\xf9\x03 \x01(\bR\x03for\x12\x1b\n" + + "\bfunction\x18\xfa\x03 \x01(\bR\bfunction\x12\x0f\n" + + "\x02if\x18\xfb\x03 \x01(\bR\x02if\x12\x17\n" + + "\x06import\x18\xfc\x03 \x01(\bR\x06import\x12\x11\n" + + "\x03let\x18\xfd\x03 \x01(\bR\x03let\x12\x13\n" + + "\x04loop\x18\xfe\x03 \x01(\bR\x04loop\x12\x19\n" + + "\apackage\x18\xff\x03 \x01(\bR\apackage\x12\x1d\n" + + "\tnamespace\x18\x80\x04 \x01(\bR\tnamespace\x12\x17\n" + + "\x06return\x18\x81\x04 \x01(\bR\x06return\x12\x11\n" + + "\x03var\x18\x82\x04 \x01(\bR\x03var\x12\x13\n" + + "\x04void\x18\x83\x04 \x01(\bR\x04void\x12\x15\n" + + "\x05while\x18\x84\x04 \x01(\bR\x05while\x1a\x1f\n" + + "\rNestedMessage\x12\x0e\n" + + "\x02bb\x18\x01 \x01(\x05R\x02bb\x1av\n" + + "\x17MapInt64NestedTypeEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x03R\x03key\x12E\n" + + "\x05value\x18\x02 \x01(\v2/.cel.expr.conformance.proto3.NestedTestAllTypesR\x05value:\x028\x01\x1a>\n" + + "\x10MapBoolBoolEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\bR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\bR\x05value:\x028\x01\x1a@\n" + + "\x12MapBoolStringEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\bR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1a?\n" + + "\x11MapBoolBytesEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\bR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\fR\x05value:\x028\x01\x1a?\n" + + "\x11MapBoolInt32Entry\x12\x10\n" + + "\x03key\x18\x01 \x01(\bR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\x05R\x05value:\x028\x01\x1a?\n" + + "\x11MapBoolInt64Entry\x12\x10\n" + + "\x03key\x18\x01 \x01(\bR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\x03R\x05value:\x028\x01\x1a@\n" + + "\x12MapBoolUint32Entry\x12\x10\n" + + "\x03key\x18\x01 \x01(\bR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\rR\x05value:\x028\x01\x1a@\n" + + "\x12MapBoolUint64Entry\x12\x10\n" + + "\x03key\x18\x01 \x01(\bR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\x04R\x05value:\x028\x01\x1a?\n" + + "\x11MapBoolFloatEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\bR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\x02R\x05value:\x028\x01\x1a@\n" + + "\x12MapBoolDoubleEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\bR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\x01R\x05value:\x028\x01\x1at\n" + + "\x10MapBoolEnumEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\bR\x03key\x12J\n" + + "\x05value\x18\x02 \x01(\x0e24.cel.expr.conformance.proto3.TestAllTypes.NestedEnumR\x05value:\x028\x01\x1az\n" + + "\x13MapBoolMessageEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\bR\x03key\x12M\n" + + "\x05value\x18\x02 \x01(\v27.cel.expr.conformance.proto3.TestAllTypes.NestedMessageR\x05value:\x028\x01\x1a]\n" + + "\x14MapBoolDurationEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\bR\x03key\x12/\n" + + "\x05value\x18\x02 \x01(\v2\x19.google.protobuf.DurationR\x05value:\x028\x01\x1a_\n" + + "\x15MapBoolTimestampEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\bR\x03key\x120\n" + + "\x05value\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\x05value:\x028\x01\x1a_\n" + + "\x15MapBoolNullValueEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\bR\x03key\x120\n" + + "\x05value\x18\x02 \x01(\x0e2\x1a.google.protobuf.NullValueR\x05value:\x028\x01\x1aS\n" + + "\x0fMapBoolAnyEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\bR\x03key\x12*\n" + + "\x05value\x18\x02 \x01(\v2\x14.google.protobuf.AnyR\x05value:\x028\x01\x1aY\n" + + "\x12MapBoolStructEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\bR\x03key\x12-\n" + + "\x05value\x18\x02 \x01(\v2\x17.google.protobuf.StructR\x05value:\x028\x01\x1aW\n" + + "\x11MapBoolValueEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\bR\x03key\x12,\n" + + "\x05value\x18\x02 \x01(\v2\x16.google.protobuf.ValueR\x05value:\x028\x01\x1a_\n" + + "\x15MapBoolListValueEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\bR\x03key\x120\n" + + "\x05value\x18\x02 \x01(\v2\x1a.google.protobuf.ListValueR\x05value:\x028\x01\x1ac\n" + + "\x18MapBoolInt64WrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\bR\x03key\x121\n" + + "\x05value\x18\x02 \x01(\v2\x1b.google.protobuf.Int64ValueR\x05value:\x028\x01\x1ac\n" + + "\x18MapBoolInt32WrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\bR\x03key\x121\n" + + "\x05value\x18\x02 \x01(\v2\x1b.google.protobuf.Int32ValueR\x05value:\x028\x01\x1ae\n" + + "\x19MapBoolDoubleWrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\bR\x03key\x122\n" + + "\x05value\x18\x02 \x01(\v2\x1c.google.protobuf.DoubleValueR\x05value:\x028\x01\x1ac\n" + + "\x18MapBoolFloatWrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\bR\x03key\x121\n" + + "\x05value\x18\x02 \x01(\v2\x1b.google.protobuf.FloatValueR\x05value:\x028\x01\x1ae\n" + + "\x19MapBoolUint64WrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\bR\x03key\x122\n" + + "\x05value\x18\x02 \x01(\v2\x1c.google.protobuf.UInt64ValueR\x05value:\x028\x01\x1ae\n" + + "\x19MapBoolUint32WrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\bR\x03key\x122\n" + + "\x05value\x18\x02 \x01(\v2\x1c.google.protobuf.UInt32ValueR\x05value:\x028\x01\x1ae\n" + + "\x19MapBoolStringWrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\bR\x03key\x122\n" + + "\x05value\x18\x02 \x01(\v2\x1c.google.protobuf.StringValueR\x05value:\x028\x01\x1aa\n" + + "\x17MapBoolBoolWrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\bR\x03key\x120\n" + + "\x05value\x18\x02 \x01(\v2\x1a.google.protobuf.BoolValueR\x05value:\x028\x01\x1ac\n" + + "\x18MapBoolBytesWrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\bR\x03key\x121\n" + + "\x05value\x18\x02 \x01(\v2\x1b.google.protobuf.BytesValueR\x05value:\x028\x01\x1a?\n" + + "\x11MapInt32BoolEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\bR\x05value:\x028\x01\x1aA\n" + + "\x13MapInt32StringEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1a@\n" + + "\x12MapInt32BytesEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\fR\x05value:\x028\x01\x1a@\n" + + "\x12MapInt32Int32Entry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\x05R\x05value:\x028\x01\x1a@\n" + + "\x12MapInt32Int64Entry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\x03R\x05value:\x028\x01\x1aA\n" + + "\x13MapInt32Uint32Entry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\rR\x05value:\x028\x01\x1aA\n" + + "\x13MapInt32Uint64Entry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\x04R\x05value:\x028\x01\x1a@\n" + + "\x12MapInt32FloatEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\x02R\x05value:\x028\x01\x1aA\n" + + "\x13MapInt32DoubleEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x05R\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\x01R\x05value:\x028\x01\x1au\n" + + "\x11MapInt32EnumEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x05R\x03key\x12J\n" + + "\x05value\x18\x02 \x01(\x0e24.cel.expr.conformance.proto3.TestAllTypes.NestedEnumR\x05value:\x028\x01\x1a{\n" + + "\x14MapInt32MessageEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x05R\x03key\x12M\n" + + "\x05value\x18\x02 \x01(\v27.cel.expr.conformance.proto3.TestAllTypes.NestedMessageR\x05value:\x028\x01\x1a^\n" + + "\x15MapInt32DurationEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x05R\x03key\x12/\n" + + "\x05value\x18\x02 \x01(\v2\x19.google.protobuf.DurationR\x05value:\x028\x01\x1a`\n" + + "\x16MapInt32TimestampEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x05R\x03key\x120\n" + + "\x05value\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\x05value:\x028\x01\x1a`\n" + + "\x16MapInt32NullValueEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x05R\x03key\x120\n" + + "\x05value\x18\x02 \x01(\x0e2\x1a.google.protobuf.NullValueR\x05value:\x028\x01\x1aT\n" + + "\x10MapInt32AnyEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x05R\x03key\x12*\n" + + "\x05value\x18\x02 \x01(\v2\x14.google.protobuf.AnyR\x05value:\x028\x01\x1aZ\n" + + "\x13MapInt32StructEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x05R\x03key\x12-\n" + + "\x05value\x18\x02 \x01(\v2\x17.google.protobuf.StructR\x05value:\x028\x01\x1aX\n" + + "\x12MapInt32ValueEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x05R\x03key\x12,\n" + + "\x05value\x18\x02 \x01(\v2\x16.google.protobuf.ValueR\x05value:\x028\x01\x1a`\n" + + "\x16MapInt32ListValueEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x05R\x03key\x120\n" + + "\x05value\x18\x02 \x01(\v2\x1a.google.protobuf.ListValueR\x05value:\x028\x01\x1ad\n" + + "\x19MapInt32Int64WrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x05R\x03key\x121\n" + + "\x05value\x18\x02 \x01(\v2\x1b.google.protobuf.Int64ValueR\x05value:\x028\x01\x1ad\n" + + "\x19MapInt32Int32WrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x05R\x03key\x121\n" + + "\x05value\x18\x02 \x01(\v2\x1b.google.protobuf.Int32ValueR\x05value:\x028\x01\x1af\n" + + "\x1aMapInt32DoubleWrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x05R\x03key\x122\n" + + "\x05value\x18\x02 \x01(\v2\x1c.google.protobuf.DoubleValueR\x05value:\x028\x01\x1ad\n" + + "\x19MapInt32FloatWrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x05R\x03key\x121\n" + + "\x05value\x18\x02 \x01(\v2\x1b.google.protobuf.FloatValueR\x05value:\x028\x01\x1af\n" + + "\x1aMapInt32Uint64WrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x05R\x03key\x122\n" + + "\x05value\x18\x02 \x01(\v2\x1c.google.protobuf.UInt64ValueR\x05value:\x028\x01\x1af\n" + + "\x1aMapInt32Uint32WrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x05R\x03key\x122\n" + + "\x05value\x18\x02 \x01(\v2\x1c.google.protobuf.UInt32ValueR\x05value:\x028\x01\x1af\n" + + "\x1aMapInt32StringWrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x05R\x03key\x122\n" + + "\x05value\x18\x02 \x01(\v2\x1c.google.protobuf.StringValueR\x05value:\x028\x01\x1ab\n" + + "\x18MapInt32BoolWrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x05R\x03key\x120\n" + + "\x05value\x18\x02 \x01(\v2\x1a.google.protobuf.BoolValueR\x05value:\x028\x01\x1ad\n" + + "\x19MapInt32BytesWrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x05R\x03key\x121\n" + + "\x05value\x18\x02 \x01(\v2\x1b.google.protobuf.BytesValueR\x05value:\x028\x01\x1a?\n" + + "\x11MapInt64BoolEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x03R\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\bR\x05value:\x028\x01\x1aA\n" + + "\x13MapInt64StringEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x03R\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1a@\n" + + "\x12MapInt64BytesEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x03R\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\fR\x05value:\x028\x01\x1a@\n" + + "\x12MapInt64Int32Entry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x03R\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\x05R\x05value:\x028\x01\x1a@\n" + + "\x12MapInt64Int64Entry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x03R\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\x03R\x05value:\x028\x01\x1aA\n" + + "\x13MapInt64Uint32Entry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x03R\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\rR\x05value:\x028\x01\x1aA\n" + + "\x13MapInt64Uint64Entry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x03R\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\x04R\x05value:\x028\x01\x1a@\n" + + "\x12MapInt64FloatEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x03R\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\x02R\x05value:\x028\x01\x1aA\n" + + "\x13MapInt64DoubleEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x03R\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\x01R\x05value:\x028\x01\x1au\n" + + "\x11MapInt64EnumEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x03R\x03key\x12J\n" + + "\x05value\x18\x02 \x01(\x0e24.cel.expr.conformance.proto3.TestAllTypes.NestedEnumR\x05value:\x028\x01\x1a{\n" + + "\x14MapInt64MessageEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x03R\x03key\x12M\n" + + "\x05value\x18\x02 \x01(\v27.cel.expr.conformance.proto3.TestAllTypes.NestedMessageR\x05value:\x028\x01\x1a^\n" + + "\x15MapInt64DurationEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x03R\x03key\x12/\n" + + "\x05value\x18\x02 \x01(\v2\x19.google.protobuf.DurationR\x05value:\x028\x01\x1a`\n" + + "\x16MapInt64TimestampEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x03R\x03key\x120\n" + + "\x05value\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\x05value:\x028\x01\x1a`\n" + + "\x16MapInt64NullValueEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x03R\x03key\x120\n" + + "\x05value\x18\x02 \x01(\x0e2\x1a.google.protobuf.NullValueR\x05value:\x028\x01\x1aT\n" + + "\x10MapInt64AnyEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x03R\x03key\x12*\n" + + "\x05value\x18\x02 \x01(\v2\x14.google.protobuf.AnyR\x05value:\x028\x01\x1aZ\n" + + "\x13MapInt64StructEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x03R\x03key\x12-\n" + + "\x05value\x18\x02 \x01(\v2\x17.google.protobuf.StructR\x05value:\x028\x01\x1aX\n" + + "\x12MapInt64ValueEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x03R\x03key\x12,\n" + + "\x05value\x18\x02 \x01(\v2\x16.google.protobuf.ValueR\x05value:\x028\x01\x1a`\n" + + "\x16MapInt64ListValueEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x03R\x03key\x120\n" + + "\x05value\x18\x02 \x01(\v2\x1a.google.protobuf.ListValueR\x05value:\x028\x01\x1ad\n" + + "\x19MapInt64Int64WrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x03R\x03key\x121\n" + + "\x05value\x18\x02 \x01(\v2\x1b.google.protobuf.Int64ValueR\x05value:\x028\x01\x1ad\n" + + "\x19MapInt64Int32WrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x03R\x03key\x121\n" + + "\x05value\x18\x02 \x01(\v2\x1b.google.protobuf.Int32ValueR\x05value:\x028\x01\x1af\n" + + "\x1aMapInt64DoubleWrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x03R\x03key\x122\n" + + "\x05value\x18\x02 \x01(\v2\x1c.google.protobuf.DoubleValueR\x05value:\x028\x01\x1ad\n" + + "\x19MapInt64FloatWrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x03R\x03key\x121\n" + + "\x05value\x18\x02 \x01(\v2\x1b.google.protobuf.FloatValueR\x05value:\x028\x01\x1af\n" + + "\x1aMapInt64Uint64WrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x03R\x03key\x122\n" + + "\x05value\x18\x02 \x01(\v2\x1c.google.protobuf.UInt64ValueR\x05value:\x028\x01\x1af\n" + + "\x1aMapInt64Uint32WrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x03R\x03key\x122\n" + + "\x05value\x18\x02 \x01(\v2\x1c.google.protobuf.UInt32ValueR\x05value:\x028\x01\x1af\n" + + "\x1aMapInt64StringWrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x03R\x03key\x122\n" + + "\x05value\x18\x02 \x01(\v2\x1c.google.protobuf.StringValueR\x05value:\x028\x01\x1ab\n" + + "\x18MapInt64BoolWrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x03R\x03key\x120\n" + + "\x05value\x18\x02 \x01(\v2\x1a.google.protobuf.BoolValueR\x05value:\x028\x01\x1ad\n" + + "\x19MapInt64BytesWrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x03R\x03key\x121\n" + + "\x05value\x18\x02 \x01(\v2\x1b.google.protobuf.BytesValueR\x05value:\x028\x01\x1a@\n" + + "\x12MapUint32BoolEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\rR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\bR\x05value:\x028\x01\x1aB\n" + + "\x14MapUint32StringEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\rR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1aA\n" + + "\x13MapUint32BytesEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\rR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\fR\x05value:\x028\x01\x1aA\n" + + "\x13MapUint32Int32Entry\x12\x10\n" + + "\x03key\x18\x01 \x01(\rR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\x05R\x05value:\x028\x01\x1aA\n" + + "\x13MapUint32Int64Entry\x12\x10\n" + + "\x03key\x18\x01 \x01(\rR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\x03R\x05value:\x028\x01\x1aB\n" + + "\x14MapUint32Uint32Entry\x12\x10\n" + + "\x03key\x18\x01 \x01(\rR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\rR\x05value:\x028\x01\x1aB\n" + + "\x14MapUint32Uint64Entry\x12\x10\n" + + "\x03key\x18\x01 \x01(\rR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\x04R\x05value:\x028\x01\x1aA\n" + + "\x13MapUint32FloatEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\rR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\x02R\x05value:\x028\x01\x1aB\n" + + "\x14MapUint32DoubleEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\rR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\x01R\x05value:\x028\x01\x1av\n" + + "\x12MapUint32EnumEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\rR\x03key\x12J\n" + + "\x05value\x18\x02 \x01(\x0e24.cel.expr.conformance.proto3.TestAllTypes.NestedEnumR\x05value:\x028\x01\x1a|\n" + + "\x15MapUint32MessageEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\rR\x03key\x12M\n" + + "\x05value\x18\x02 \x01(\v27.cel.expr.conformance.proto3.TestAllTypes.NestedMessageR\x05value:\x028\x01\x1a_\n" + + "\x16MapUint32DurationEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\rR\x03key\x12/\n" + + "\x05value\x18\x02 \x01(\v2\x19.google.protobuf.DurationR\x05value:\x028\x01\x1aa\n" + + "\x17MapUint32TimestampEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\rR\x03key\x120\n" + + "\x05value\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\x05value:\x028\x01\x1aa\n" + + "\x17MapUint32NullValueEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\rR\x03key\x120\n" + + "\x05value\x18\x02 \x01(\x0e2\x1a.google.protobuf.NullValueR\x05value:\x028\x01\x1aU\n" + + "\x11MapUint32AnyEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\rR\x03key\x12*\n" + + "\x05value\x18\x02 \x01(\v2\x14.google.protobuf.AnyR\x05value:\x028\x01\x1a[\n" + + "\x14MapUint32StructEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\rR\x03key\x12-\n" + + "\x05value\x18\x02 \x01(\v2\x17.google.protobuf.StructR\x05value:\x028\x01\x1aY\n" + + "\x13MapUint32ValueEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\rR\x03key\x12,\n" + + "\x05value\x18\x02 \x01(\v2\x16.google.protobuf.ValueR\x05value:\x028\x01\x1aa\n" + + "\x17MapUint32ListValueEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\rR\x03key\x120\n" + + "\x05value\x18\x02 \x01(\v2\x1a.google.protobuf.ListValueR\x05value:\x028\x01\x1ae\n" + + "\x1aMapUint32Int64WrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\rR\x03key\x121\n" + + "\x05value\x18\x02 \x01(\v2\x1b.google.protobuf.Int64ValueR\x05value:\x028\x01\x1ae\n" + + "\x1aMapUint32Int32WrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\rR\x03key\x121\n" + + "\x05value\x18\x02 \x01(\v2\x1b.google.protobuf.Int32ValueR\x05value:\x028\x01\x1ag\n" + + "\x1bMapUint32DoubleWrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\rR\x03key\x122\n" + + "\x05value\x18\x02 \x01(\v2\x1c.google.protobuf.DoubleValueR\x05value:\x028\x01\x1ae\n" + + "\x1aMapUint32FloatWrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\rR\x03key\x121\n" + + "\x05value\x18\x02 \x01(\v2\x1b.google.protobuf.FloatValueR\x05value:\x028\x01\x1ag\n" + + "\x1bMapUint32Uint64WrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\rR\x03key\x122\n" + + "\x05value\x18\x02 \x01(\v2\x1c.google.protobuf.UInt64ValueR\x05value:\x028\x01\x1ag\n" + + "\x1bMapUint32Uint32WrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\rR\x03key\x122\n" + + "\x05value\x18\x02 \x01(\v2\x1c.google.protobuf.UInt32ValueR\x05value:\x028\x01\x1ag\n" + + "\x1bMapUint32StringWrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\rR\x03key\x122\n" + + "\x05value\x18\x02 \x01(\v2\x1c.google.protobuf.StringValueR\x05value:\x028\x01\x1ac\n" + + "\x19MapUint32BoolWrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\rR\x03key\x120\n" + + "\x05value\x18\x02 \x01(\v2\x1a.google.protobuf.BoolValueR\x05value:\x028\x01\x1ae\n" + + "\x1aMapUint32BytesWrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\rR\x03key\x121\n" + + "\x05value\x18\x02 \x01(\v2\x1b.google.protobuf.BytesValueR\x05value:\x028\x01\x1a@\n" + + "\x12MapUint64BoolEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x04R\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\bR\x05value:\x028\x01\x1aB\n" + + "\x14MapUint64StringEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x04R\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1aA\n" + + "\x13MapUint64BytesEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x04R\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\fR\x05value:\x028\x01\x1aA\n" + + "\x13MapUint64Int32Entry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x04R\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\x05R\x05value:\x028\x01\x1aA\n" + + "\x13MapUint64Int64Entry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x04R\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\x03R\x05value:\x028\x01\x1aB\n" + + "\x14MapUint64Uint32Entry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x04R\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\rR\x05value:\x028\x01\x1aB\n" + + "\x14MapUint64Uint64Entry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x04R\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\x04R\x05value:\x028\x01\x1aA\n" + + "\x13MapUint64FloatEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x04R\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\x02R\x05value:\x028\x01\x1aB\n" + + "\x14MapUint64DoubleEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x04R\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\x01R\x05value:\x028\x01\x1av\n" + + "\x12MapUint64EnumEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x04R\x03key\x12J\n" + + "\x05value\x18\x02 \x01(\x0e24.cel.expr.conformance.proto3.TestAllTypes.NestedEnumR\x05value:\x028\x01\x1a|\n" + + "\x15MapUint64MessageEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x04R\x03key\x12M\n" + + "\x05value\x18\x02 \x01(\v27.cel.expr.conformance.proto3.TestAllTypes.NestedMessageR\x05value:\x028\x01\x1a_\n" + + "\x16MapUint64DurationEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x04R\x03key\x12/\n" + + "\x05value\x18\x02 \x01(\v2\x19.google.protobuf.DurationR\x05value:\x028\x01\x1aa\n" + + "\x17MapUint64TimestampEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x04R\x03key\x120\n" + + "\x05value\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\x05value:\x028\x01\x1aa\n" + + "\x17MapUint64NullValueEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x04R\x03key\x120\n" + + "\x05value\x18\x02 \x01(\x0e2\x1a.google.protobuf.NullValueR\x05value:\x028\x01\x1aU\n" + + "\x11MapUint64AnyEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x04R\x03key\x12*\n" + + "\x05value\x18\x02 \x01(\v2\x14.google.protobuf.AnyR\x05value:\x028\x01\x1a[\n" + + "\x14MapUint64StructEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x04R\x03key\x12-\n" + + "\x05value\x18\x02 \x01(\v2\x17.google.protobuf.StructR\x05value:\x028\x01\x1aY\n" + + "\x13MapUint64ValueEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x04R\x03key\x12,\n" + + "\x05value\x18\x02 \x01(\v2\x16.google.protobuf.ValueR\x05value:\x028\x01\x1aa\n" + + "\x17MapUint64ListValueEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x04R\x03key\x120\n" + + "\x05value\x18\x02 \x01(\v2\x1a.google.protobuf.ListValueR\x05value:\x028\x01\x1ae\n" + + "\x1aMapUint64Int64WrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x04R\x03key\x121\n" + + "\x05value\x18\x02 \x01(\v2\x1b.google.protobuf.Int64ValueR\x05value:\x028\x01\x1ae\n" + + "\x1aMapUint64Int32WrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x04R\x03key\x121\n" + + "\x05value\x18\x02 \x01(\v2\x1b.google.protobuf.Int32ValueR\x05value:\x028\x01\x1ag\n" + + "\x1bMapUint64DoubleWrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x04R\x03key\x122\n" + + "\x05value\x18\x02 \x01(\v2\x1c.google.protobuf.DoubleValueR\x05value:\x028\x01\x1ae\n" + + "\x1aMapUint64FloatWrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x04R\x03key\x121\n" + + "\x05value\x18\x02 \x01(\v2\x1b.google.protobuf.FloatValueR\x05value:\x028\x01\x1ag\n" + + "\x1bMapUint64Uint64WrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x04R\x03key\x122\n" + + "\x05value\x18\x02 \x01(\v2\x1c.google.protobuf.UInt64ValueR\x05value:\x028\x01\x1ag\n" + + "\x1bMapUint64Uint32WrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x04R\x03key\x122\n" + + "\x05value\x18\x02 \x01(\v2\x1c.google.protobuf.UInt32ValueR\x05value:\x028\x01\x1ag\n" + + "\x1bMapUint64StringWrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x04R\x03key\x122\n" + + "\x05value\x18\x02 \x01(\v2\x1c.google.protobuf.StringValueR\x05value:\x028\x01\x1ac\n" + + "\x19MapUint64BoolWrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x04R\x03key\x120\n" + + "\x05value\x18\x02 \x01(\v2\x1a.google.protobuf.BoolValueR\x05value:\x028\x01\x1ae\n" + + "\x1aMapUint64BytesWrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\x04R\x03key\x121\n" + + "\x05value\x18\x02 \x01(\v2\x1b.google.protobuf.BytesValueR\x05value:\x028\x01\x1a@\n" + + "\x12MapStringBoolEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\bR\x05value:\x028\x01\x1aB\n" + + "\x14MapStringStringEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1aA\n" + + "\x13MapStringBytesEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\fR\x05value:\x028\x01\x1aA\n" + + "\x13MapStringInt32Entry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\x05R\x05value:\x028\x01\x1aA\n" + + "\x13MapStringInt64Entry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\x03R\x05value:\x028\x01\x1aB\n" + + "\x14MapStringUint32Entry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\rR\x05value:\x028\x01\x1aB\n" + + "\x14MapStringUint64Entry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\x04R\x05value:\x028\x01\x1aA\n" + + "\x13MapStringFloatEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\x02R\x05value:\x028\x01\x1aB\n" + + "\x14MapStringDoubleEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\x01R\x05value:\x028\x01\x1av\n" + + "\x12MapStringEnumEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12J\n" + + "\x05value\x18\x02 \x01(\x0e24.cel.expr.conformance.proto3.TestAllTypes.NestedEnumR\x05value:\x028\x01\x1a|\n" + + "\x15MapStringMessageEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12M\n" + + "\x05value\x18\x02 \x01(\v27.cel.expr.conformance.proto3.TestAllTypes.NestedMessageR\x05value:\x028\x01\x1a_\n" + + "\x16MapStringDurationEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12/\n" + + "\x05value\x18\x02 \x01(\v2\x19.google.protobuf.DurationR\x05value:\x028\x01\x1aa\n" + + "\x17MapStringTimestampEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x120\n" + + "\x05value\x18\x02 \x01(\v2\x1a.google.protobuf.TimestampR\x05value:\x028\x01\x1aa\n" + + "\x17MapStringNullValueEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x120\n" + + "\x05value\x18\x02 \x01(\x0e2\x1a.google.protobuf.NullValueR\x05value:\x028\x01\x1aU\n" + + "\x11MapStringAnyEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12*\n" + + "\x05value\x18\x02 \x01(\v2\x14.google.protobuf.AnyR\x05value:\x028\x01\x1a[\n" + + "\x14MapStringStructEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12-\n" + + "\x05value\x18\x02 \x01(\v2\x17.google.protobuf.StructR\x05value:\x028\x01\x1aY\n" + + "\x13MapStringValueEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12,\n" + + "\x05value\x18\x02 \x01(\v2\x16.google.protobuf.ValueR\x05value:\x028\x01\x1aa\n" + + "\x17MapStringListValueEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x120\n" + + "\x05value\x18\x02 \x01(\v2\x1a.google.protobuf.ListValueR\x05value:\x028\x01\x1ae\n" + + "\x1aMapStringInt64WrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x121\n" + + "\x05value\x18\x02 \x01(\v2\x1b.google.protobuf.Int64ValueR\x05value:\x028\x01\x1ae\n" + + "\x1aMapStringInt32WrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x121\n" + + "\x05value\x18\x02 \x01(\v2\x1b.google.protobuf.Int32ValueR\x05value:\x028\x01\x1ag\n" + + "\x1bMapStringDoubleWrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x122\n" + + "\x05value\x18\x02 \x01(\v2\x1c.google.protobuf.DoubleValueR\x05value:\x028\x01\x1ae\n" + + "\x1aMapStringFloatWrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x121\n" + + "\x05value\x18\x02 \x01(\v2\x1b.google.protobuf.FloatValueR\x05value:\x028\x01\x1ag\n" + + "\x1bMapStringUint64WrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x122\n" + + "\x05value\x18\x02 \x01(\v2\x1c.google.protobuf.UInt64ValueR\x05value:\x028\x01\x1ag\n" + + "\x1bMapStringUint32WrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x122\n" + + "\x05value\x18\x02 \x01(\v2\x1c.google.protobuf.UInt32ValueR\x05value:\x028\x01\x1ag\n" + + "\x1bMapStringStringWrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x122\n" + + "\x05value\x18\x02 \x01(\v2\x1c.google.protobuf.StringValueR\x05value:\x028\x01\x1ac\n" + + "\x19MapStringBoolWrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x120\n" + + "\x05value\x18\x02 \x01(\v2\x1a.google.protobuf.BoolValueR\x05value:\x028\x01\x1ae\n" + + "\x1aMapStringBytesWrapperEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x121\n" + + "\x05value\x18\x02 \x01(\v2\x1b.google.protobuf.BytesValueR\x05value:\x028\x01\"'\n" + + "\n" + + "NestedEnum\x12\a\n" + + "\x03FOO\x10\x00\x12\a\n" + + "\x03BAR\x10\x01\x12\a\n" + + "\x03BAZ\x10\x02B\r\n" + + "\vnested_typeB\x06\n" + + "\x04kindB\x10\n" + + "\x0e_optional_boolB\x12\n" + + "\x10_optional_stringB\x16\n" + + "\x14_optional_null_value\"\xa0\x01\n" + + "\x12NestedTestAllTypes\x12E\n" + + "\x05child\x18\x01 \x01(\v2/.cel.expr.conformance.proto3.NestedTestAllTypesR\x05child\x12C\n" + + "\apayload\x18\x02 \x01(\v2).cel.expr.conformance.proto3.TestAllTypesR\apayload*'\n" + + "\n" + + "GlobalEnum\x12\a\n" + + "\x03GOO\x10\x00\x12\a\n" + + "\x03GAR\x10\x01\x12\a\n" + + "\x03GAZ\x10\x02BZ\n" + + "\x1fdev.cel.expr.conformance.proto3B\x11TestAllTypesProtoP\x01Z\x1fcel.dev/expr/conformance/proto3\xf8\x01\x01b\x06proto3" + +var ( + file_cel_expr_conformance_proto3_test_all_types_proto_rawDescOnce sync.Once + file_cel_expr_conformance_proto3_test_all_types_proto_rawDescData []byte +) + +func file_cel_expr_conformance_proto3_test_all_types_proto_rawDescGZIP() []byte { + file_cel_expr_conformance_proto3_test_all_types_proto_rawDescOnce.Do(func() { + file_cel_expr_conformance_proto3_test_all_types_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_cel_expr_conformance_proto3_test_all_types_proto_rawDesc), len(file_cel_expr_conformance_proto3_test_all_types_proto_rawDesc))) + }) + return file_cel_expr_conformance_proto3_test_all_types_proto_rawDescData +} + +var file_cel_expr_conformance_proto3_test_all_types_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_cel_expr_conformance_proto3_test_all_types_proto_msgTypes = make([]protoimpl.MessageInfo, 166) +var file_cel_expr_conformance_proto3_test_all_types_proto_goTypes = []any{ + (GlobalEnum)(0), // 0: cel.expr.conformance.proto3.GlobalEnum + (TestAllTypes_NestedEnum)(0), // 1: cel.expr.conformance.proto3.TestAllTypes.NestedEnum + (*TestAllTypes)(nil), // 2: cel.expr.conformance.proto3.TestAllTypes + (*NestedTestAllTypes)(nil), // 3: cel.expr.conformance.proto3.NestedTestAllTypes + (*TestAllTypes_NestedMessage)(nil), // 4: cel.expr.conformance.proto3.TestAllTypes.NestedMessage + nil, // 5: cel.expr.conformance.proto3.TestAllTypes.MapInt64NestedTypeEntry + nil, // 6: cel.expr.conformance.proto3.TestAllTypes.MapBoolBoolEntry + nil, // 7: cel.expr.conformance.proto3.TestAllTypes.MapBoolStringEntry + nil, // 8: cel.expr.conformance.proto3.TestAllTypes.MapBoolBytesEntry + nil, // 9: cel.expr.conformance.proto3.TestAllTypes.MapBoolInt32Entry + nil, // 10: cel.expr.conformance.proto3.TestAllTypes.MapBoolInt64Entry + nil, // 11: cel.expr.conformance.proto3.TestAllTypes.MapBoolUint32Entry + nil, // 12: cel.expr.conformance.proto3.TestAllTypes.MapBoolUint64Entry + nil, // 13: cel.expr.conformance.proto3.TestAllTypes.MapBoolFloatEntry + nil, // 14: cel.expr.conformance.proto3.TestAllTypes.MapBoolDoubleEntry + nil, // 15: cel.expr.conformance.proto3.TestAllTypes.MapBoolEnumEntry + nil, // 16: cel.expr.conformance.proto3.TestAllTypes.MapBoolMessageEntry + nil, // 17: cel.expr.conformance.proto3.TestAllTypes.MapBoolDurationEntry + nil, // 18: cel.expr.conformance.proto3.TestAllTypes.MapBoolTimestampEntry + nil, // 19: cel.expr.conformance.proto3.TestAllTypes.MapBoolNullValueEntry + nil, // 20: cel.expr.conformance.proto3.TestAllTypes.MapBoolAnyEntry + nil, // 21: cel.expr.conformance.proto3.TestAllTypes.MapBoolStructEntry + nil, // 22: cel.expr.conformance.proto3.TestAllTypes.MapBoolValueEntry + nil, // 23: cel.expr.conformance.proto3.TestAllTypes.MapBoolListValueEntry + nil, // 24: cel.expr.conformance.proto3.TestAllTypes.MapBoolInt64WrapperEntry + nil, // 25: cel.expr.conformance.proto3.TestAllTypes.MapBoolInt32WrapperEntry + nil, // 26: cel.expr.conformance.proto3.TestAllTypes.MapBoolDoubleWrapperEntry + nil, // 27: cel.expr.conformance.proto3.TestAllTypes.MapBoolFloatWrapperEntry + nil, // 28: cel.expr.conformance.proto3.TestAllTypes.MapBoolUint64WrapperEntry + nil, // 29: cel.expr.conformance.proto3.TestAllTypes.MapBoolUint32WrapperEntry + nil, // 30: cel.expr.conformance.proto3.TestAllTypes.MapBoolStringWrapperEntry + nil, // 31: cel.expr.conformance.proto3.TestAllTypes.MapBoolBoolWrapperEntry + nil, // 32: cel.expr.conformance.proto3.TestAllTypes.MapBoolBytesWrapperEntry + nil, // 33: cel.expr.conformance.proto3.TestAllTypes.MapInt32BoolEntry + nil, // 34: cel.expr.conformance.proto3.TestAllTypes.MapInt32StringEntry + nil, // 35: cel.expr.conformance.proto3.TestAllTypes.MapInt32BytesEntry + nil, // 36: cel.expr.conformance.proto3.TestAllTypes.MapInt32Int32Entry + nil, // 37: cel.expr.conformance.proto3.TestAllTypes.MapInt32Int64Entry + nil, // 38: cel.expr.conformance.proto3.TestAllTypes.MapInt32Uint32Entry + nil, // 39: cel.expr.conformance.proto3.TestAllTypes.MapInt32Uint64Entry + nil, // 40: cel.expr.conformance.proto3.TestAllTypes.MapInt32FloatEntry + nil, // 41: cel.expr.conformance.proto3.TestAllTypes.MapInt32DoubleEntry + nil, // 42: cel.expr.conformance.proto3.TestAllTypes.MapInt32EnumEntry + nil, // 43: cel.expr.conformance.proto3.TestAllTypes.MapInt32MessageEntry + nil, // 44: cel.expr.conformance.proto3.TestAllTypes.MapInt32DurationEntry + nil, // 45: cel.expr.conformance.proto3.TestAllTypes.MapInt32TimestampEntry + nil, // 46: cel.expr.conformance.proto3.TestAllTypes.MapInt32NullValueEntry + nil, // 47: cel.expr.conformance.proto3.TestAllTypes.MapInt32AnyEntry + nil, // 48: cel.expr.conformance.proto3.TestAllTypes.MapInt32StructEntry + nil, // 49: cel.expr.conformance.proto3.TestAllTypes.MapInt32ValueEntry + nil, // 50: cel.expr.conformance.proto3.TestAllTypes.MapInt32ListValueEntry + nil, // 51: cel.expr.conformance.proto3.TestAllTypes.MapInt32Int64WrapperEntry + nil, // 52: cel.expr.conformance.proto3.TestAllTypes.MapInt32Int32WrapperEntry + nil, // 53: cel.expr.conformance.proto3.TestAllTypes.MapInt32DoubleWrapperEntry + nil, // 54: cel.expr.conformance.proto3.TestAllTypes.MapInt32FloatWrapperEntry + nil, // 55: cel.expr.conformance.proto3.TestAllTypes.MapInt32Uint64WrapperEntry + nil, // 56: cel.expr.conformance.proto3.TestAllTypes.MapInt32Uint32WrapperEntry + nil, // 57: cel.expr.conformance.proto3.TestAllTypes.MapInt32StringWrapperEntry + nil, // 58: cel.expr.conformance.proto3.TestAllTypes.MapInt32BoolWrapperEntry + nil, // 59: cel.expr.conformance.proto3.TestAllTypes.MapInt32BytesWrapperEntry + nil, // 60: cel.expr.conformance.proto3.TestAllTypes.MapInt64BoolEntry + nil, // 61: cel.expr.conformance.proto3.TestAllTypes.MapInt64StringEntry + nil, // 62: cel.expr.conformance.proto3.TestAllTypes.MapInt64BytesEntry + nil, // 63: cel.expr.conformance.proto3.TestAllTypes.MapInt64Int32Entry + nil, // 64: cel.expr.conformance.proto3.TestAllTypes.MapInt64Int64Entry + nil, // 65: cel.expr.conformance.proto3.TestAllTypes.MapInt64Uint32Entry + nil, // 66: cel.expr.conformance.proto3.TestAllTypes.MapInt64Uint64Entry + nil, // 67: cel.expr.conformance.proto3.TestAllTypes.MapInt64FloatEntry + nil, // 68: cel.expr.conformance.proto3.TestAllTypes.MapInt64DoubleEntry + nil, // 69: cel.expr.conformance.proto3.TestAllTypes.MapInt64EnumEntry + nil, // 70: cel.expr.conformance.proto3.TestAllTypes.MapInt64MessageEntry + nil, // 71: cel.expr.conformance.proto3.TestAllTypes.MapInt64DurationEntry + nil, // 72: cel.expr.conformance.proto3.TestAllTypes.MapInt64TimestampEntry + nil, // 73: cel.expr.conformance.proto3.TestAllTypes.MapInt64NullValueEntry + nil, // 74: cel.expr.conformance.proto3.TestAllTypes.MapInt64AnyEntry + nil, // 75: cel.expr.conformance.proto3.TestAllTypes.MapInt64StructEntry + nil, // 76: cel.expr.conformance.proto3.TestAllTypes.MapInt64ValueEntry + nil, // 77: cel.expr.conformance.proto3.TestAllTypes.MapInt64ListValueEntry + nil, // 78: cel.expr.conformance.proto3.TestAllTypes.MapInt64Int64WrapperEntry + nil, // 79: cel.expr.conformance.proto3.TestAllTypes.MapInt64Int32WrapperEntry + nil, // 80: cel.expr.conformance.proto3.TestAllTypes.MapInt64DoubleWrapperEntry + nil, // 81: cel.expr.conformance.proto3.TestAllTypes.MapInt64FloatWrapperEntry + nil, // 82: cel.expr.conformance.proto3.TestAllTypes.MapInt64Uint64WrapperEntry + nil, // 83: cel.expr.conformance.proto3.TestAllTypes.MapInt64Uint32WrapperEntry + nil, // 84: cel.expr.conformance.proto3.TestAllTypes.MapInt64StringWrapperEntry + nil, // 85: cel.expr.conformance.proto3.TestAllTypes.MapInt64BoolWrapperEntry + nil, // 86: cel.expr.conformance.proto3.TestAllTypes.MapInt64BytesWrapperEntry + nil, // 87: cel.expr.conformance.proto3.TestAllTypes.MapUint32BoolEntry + nil, // 88: cel.expr.conformance.proto3.TestAllTypes.MapUint32StringEntry + nil, // 89: cel.expr.conformance.proto3.TestAllTypes.MapUint32BytesEntry + nil, // 90: cel.expr.conformance.proto3.TestAllTypes.MapUint32Int32Entry + nil, // 91: cel.expr.conformance.proto3.TestAllTypes.MapUint32Int64Entry + nil, // 92: cel.expr.conformance.proto3.TestAllTypes.MapUint32Uint32Entry + nil, // 93: cel.expr.conformance.proto3.TestAllTypes.MapUint32Uint64Entry + nil, // 94: cel.expr.conformance.proto3.TestAllTypes.MapUint32FloatEntry + nil, // 95: cel.expr.conformance.proto3.TestAllTypes.MapUint32DoubleEntry + nil, // 96: cel.expr.conformance.proto3.TestAllTypes.MapUint32EnumEntry + nil, // 97: cel.expr.conformance.proto3.TestAllTypes.MapUint32MessageEntry + nil, // 98: cel.expr.conformance.proto3.TestAllTypes.MapUint32DurationEntry + nil, // 99: cel.expr.conformance.proto3.TestAllTypes.MapUint32TimestampEntry + nil, // 100: cel.expr.conformance.proto3.TestAllTypes.MapUint32NullValueEntry + nil, // 101: cel.expr.conformance.proto3.TestAllTypes.MapUint32AnyEntry + nil, // 102: cel.expr.conformance.proto3.TestAllTypes.MapUint32StructEntry + nil, // 103: cel.expr.conformance.proto3.TestAllTypes.MapUint32ValueEntry + nil, // 104: cel.expr.conformance.proto3.TestAllTypes.MapUint32ListValueEntry + nil, // 105: cel.expr.conformance.proto3.TestAllTypes.MapUint32Int64WrapperEntry + nil, // 106: cel.expr.conformance.proto3.TestAllTypes.MapUint32Int32WrapperEntry + nil, // 107: cel.expr.conformance.proto3.TestAllTypes.MapUint32DoubleWrapperEntry + nil, // 108: cel.expr.conformance.proto3.TestAllTypes.MapUint32FloatWrapperEntry + nil, // 109: cel.expr.conformance.proto3.TestAllTypes.MapUint32Uint64WrapperEntry + nil, // 110: cel.expr.conformance.proto3.TestAllTypes.MapUint32Uint32WrapperEntry + nil, // 111: cel.expr.conformance.proto3.TestAllTypes.MapUint32StringWrapperEntry + nil, // 112: cel.expr.conformance.proto3.TestAllTypes.MapUint32BoolWrapperEntry + nil, // 113: cel.expr.conformance.proto3.TestAllTypes.MapUint32BytesWrapperEntry + nil, // 114: cel.expr.conformance.proto3.TestAllTypes.MapUint64BoolEntry + nil, // 115: cel.expr.conformance.proto3.TestAllTypes.MapUint64StringEntry + nil, // 116: cel.expr.conformance.proto3.TestAllTypes.MapUint64BytesEntry + nil, // 117: cel.expr.conformance.proto3.TestAllTypes.MapUint64Int32Entry + nil, // 118: cel.expr.conformance.proto3.TestAllTypes.MapUint64Int64Entry + nil, // 119: cel.expr.conformance.proto3.TestAllTypes.MapUint64Uint32Entry + nil, // 120: cel.expr.conformance.proto3.TestAllTypes.MapUint64Uint64Entry + nil, // 121: cel.expr.conformance.proto3.TestAllTypes.MapUint64FloatEntry + nil, // 122: cel.expr.conformance.proto3.TestAllTypes.MapUint64DoubleEntry + nil, // 123: cel.expr.conformance.proto3.TestAllTypes.MapUint64EnumEntry + nil, // 124: cel.expr.conformance.proto3.TestAllTypes.MapUint64MessageEntry + nil, // 125: cel.expr.conformance.proto3.TestAllTypes.MapUint64DurationEntry + nil, // 126: cel.expr.conformance.proto3.TestAllTypes.MapUint64TimestampEntry + nil, // 127: cel.expr.conformance.proto3.TestAllTypes.MapUint64NullValueEntry + nil, // 128: cel.expr.conformance.proto3.TestAllTypes.MapUint64AnyEntry + nil, // 129: cel.expr.conformance.proto3.TestAllTypes.MapUint64StructEntry + nil, // 130: cel.expr.conformance.proto3.TestAllTypes.MapUint64ValueEntry + nil, // 131: cel.expr.conformance.proto3.TestAllTypes.MapUint64ListValueEntry + nil, // 132: cel.expr.conformance.proto3.TestAllTypes.MapUint64Int64WrapperEntry + nil, // 133: cel.expr.conformance.proto3.TestAllTypes.MapUint64Int32WrapperEntry + nil, // 134: cel.expr.conformance.proto3.TestAllTypes.MapUint64DoubleWrapperEntry + nil, // 135: cel.expr.conformance.proto3.TestAllTypes.MapUint64FloatWrapperEntry + nil, // 136: cel.expr.conformance.proto3.TestAllTypes.MapUint64Uint64WrapperEntry + nil, // 137: cel.expr.conformance.proto3.TestAllTypes.MapUint64Uint32WrapperEntry + nil, // 138: cel.expr.conformance.proto3.TestAllTypes.MapUint64StringWrapperEntry + nil, // 139: cel.expr.conformance.proto3.TestAllTypes.MapUint64BoolWrapperEntry + nil, // 140: cel.expr.conformance.proto3.TestAllTypes.MapUint64BytesWrapperEntry + nil, // 141: cel.expr.conformance.proto3.TestAllTypes.MapStringBoolEntry + nil, // 142: cel.expr.conformance.proto3.TestAllTypes.MapStringStringEntry + nil, // 143: cel.expr.conformance.proto3.TestAllTypes.MapStringBytesEntry + nil, // 144: cel.expr.conformance.proto3.TestAllTypes.MapStringInt32Entry + nil, // 145: cel.expr.conformance.proto3.TestAllTypes.MapStringInt64Entry + nil, // 146: cel.expr.conformance.proto3.TestAllTypes.MapStringUint32Entry + nil, // 147: cel.expr.conformance.proto3.TestAllTypes.MapStringUint64Entry + nil, // 148: cel.expr.conformance.proto3.TestAllTypes.MapStringFloatEntry + nil, // 149: cel.expr.conformance.proto3.TestAllTypes.MapStringDoubleEntry + nil, // 150: cel.expr.conformance.proto3.TestAllTypes.MapStringEnumEntry + nil, // 151: cel.expr.conformance.proto3.TestAllTypes.MapStringMessageEntry + nil, // 152: cel.expr.conformance.proto3.TestAllTypes.MapStringDurationEntry + nil, // 153: cel.expr.conformance.proto3.TestAllTypes.MapStringTimestampEntry + nil, // 154: cel.expr.conformance.proto3.TestAllTypes.MapStringNullValueEntry + nil, // 155: cel.expr.conformance.proto3.TestAllTypes.MapStringAnyEntry + nil, // 156: cel.expr.conformance.proto3.TestAllTypes.MapStringStructEntry + nil, // 157: cel.expr.conformance.proto3.TestAllTypes.MapStringValueEntry + nil, // 158: cel.expr.conformance.proto3.TestAllTypes.MapStringListValueEntry + nil, // 159: cel.expr.conformance.proto3.TestAllTypes.MapStringInt64WrapperEntry + nil, // 160: cel.expr.conformance.proto3.TestAllTypes.MapStringInt32WrapperEntry + nil, // 161: cel.expr.conformance.proto3.TestAllTypes.MapStringDoubleWrapperEntry + nil, // 162: cel.expr.conformance.proto3.TestAllTypes.MapStringFloatWrapperEntry + nil, // 163: cel.expr.conformance.proto3.TestAllTypes.MapStringUint64WrapperEntry + nil, // 164: cel.expr.conformance.proto3.TestAllTypes.MapStringUint32WrapperEntry + nil, // 165: cel.expr.conformance.proto3.TestAllTypes.MapStringStringWrapperEntry + nil, // 166: cel.expr.conformance.proto3.TestAllTypes.MapStringBoolWrapperEntry + nil, // 167: cel.expr.conformance.proto3.TestAllTypes.MapStringBytesWrapperEntry + (*anypb.Any)(nil), // 168: google.protobuf.Any + (*durationpb.Duration)(nil), // 169: google.protobuf.Duration + (*timestamppb.Timestamp)(nil), // 170: google.protobuf.Timestamp + (*structpb.Struct)(nil), // 171: google.protobuf.Struct + (*structpb.Value)(nil), // 172: google.protobuf.Value + (*wrapperspb.Int64Value)(nil), // 173: google.protobuf.Int64Value + (*wrapperspb.Int32Value)(nil), // 174: google.protobuf.Int32Value + (*wrapperspb.DoubleValue)(nil), // 175: google.protobuf.DoubleValue + (*wrapperspb.FloatValue)(nil), // 176: google.protobuf.FloatValue + (*wrapperspb.UInt64Value)(nil), // 177: google.protobuf.UInt64Value + (*wrapperspb.UInt32Value)(nil), // 178: google.protobuf.UInt32Value + (*wrapperspb.StringValue)(nil), // 179: google.protobuf.StringValue + (*wrapperspb.BoolValue)(nil), // 180: google.protobuf.BoolValue + (*wrapperspb.BytesValue)(nil), // 181: google.protobuf.BytesValue + (*structpb.ListValue)(nil), // 182: google.protobuf.ListValue + (structpb.NullValue)(0), // 183: google.protobuf.NullValue + (*fieldmaskpb.FieldMask)(nil), // 184: google.protobuf.FieldMask + (*emptypb.Empty)(nil), // 185: google.protobuf.Empty +} +var file_cel_expr_conformance_proto3_test_all_types_proto_depIdxs = []int32{ + 168, // 0: cel.expr.conformance.proto3.TestAllTypes.single_any:type_name -> google.protobuf.Any + 169, // 1: cel.expr.conformance.proto3.TestAllTypes.single_duration:type_name -> google.protobuf.Duration + 170, // 2: cel.expr.conformance.proto3.TestAllTypes.single_timestamp:type_name -> google.protobuf.Timestamp + 171, // 3: cel.expr.conformance.proto3.TestAllTypes.single_struct:type_name -> google.protobuf.Struct + 172, // 4: cel.expr.conformance.proto3.TestAllTypes.single_value:type_name -> google.protobuf.Value + 173, // 5: cel.expr.conformance.proto3.TestAllTypes.single_int64_wrapper:type_name -> google.protobuf.Int64Value + 174, // 6: cel.expr.conformance.proto3.TestAllTypes.single_int32_wrapper:type_name -> google.protobuf.Int32Value + 175, // 7: cel.expr.conformance.proto3.TestAllTypes.single_double_wrapper:type_name -> google.protobuf.DoubleValue + 176, // 8: cel.expr.conformance.proto3.TestAllTypes.single_float_wrapper:type_name -> google.protobuf.FloatValue + 177, // 9: cel.expr.conformance.proto3.TestAllTypes.single_uint64_wrapper:type_name -> google.protobuf.UInt64Value + 178, // 10: cel.expr.conformance.proto3.TestAllTypes.single_uint32_wrapper:type_name -> google.protobuf.UInt32Value + 179, // 11: cel.expr.conformance.proto3.TestAllTypes.single_string_wrapper:type_name -> google.protobuf.StringValue + 180, // 12: cel.expr.conformance.proto3.TestAllTypes.single_bool_wrapper:type_name -> google.protobuf.BoolValue + 181, // 13: cel.expr.conformance.proto3.TestAllTypes.single_bytes_wrapper:type_name -> google.protobuf.BytesValue + 182, // 14: cel.expr.conformance.proto3.TestAllTypes.list_value:type_name -> google.protobuf.ListValue + 183, // 15: cel.expr.conformance.proto3.TestAllTypes.null_value:type_name -> google.protobuf.NullValue + 183, // 16: cel.expr.conformance.proto3.TestAllTypes.optional_null_value:type_name -> google.protobuf.NullValue + 184, // 17: cel.expr.conformance.proto3.TestAllTypes.field_mask:type_name -> google.protobuf.FieldMask + 185, // 18: cel.expr.conformance.proto3.TestAllTypes.empty:type_name -> google.protobuf.Empty + 4, // 19: cel.expr.conformance.proto3.TestAllTypes.single_nested_message:type_name -> cel.expr.conformance.proto3.TestAllTypes.NestedMessage + 1, // 20: cel.expr.conformance.proto3.TestAllTypes.single_nested_enum:type_name -> cel.expr.conformance.proto3.TestAllTypes.NestedEnum + 4, // 21: cel.expr.conformance.proto3.TestAllTypes.standalone_message:type_name -> cel.expr.conformance.proto3.TestAllTypes.NestedMessage + 1, // 22: cel.expr.conformance.proto3.TestAllTypes.standalone_enum:type_name -> cel.expr.conformance.proto3.TestAllTypes.NestedEnum + 4, // 23: cel.expr.conformance.proto3.TestAllTypes.repeated_nested_message:type_name -> cel.expr.conformance.proto3.TestAllTypes.NestedMessage + 1, // 24: cel.expr.conformance.proto3.TestAllTypes.repeated_nested_enum:type_name -> cel.expr.conformance.proto3.TestAllTypes.NestedEnum + 4, // 25: cel.expr.conformance.proto3.TestAllTypes.repeated_lazy_message:type_name -> cel.expr.conformance.proto3.TestAllTypes.NestedMessage + 168, // 26: cel.expr.conformance.proto3.TestAllTypes.repeated_any:type_name -> google.protobuf.Any + 169, // 27: cel.expr.conformance.proto3.TestAllTypes.repeated_duration:type_name -> google.protobuf.Duration + 170, // 28: cel.expr.conformance.proto3.TestAllTypes.repeated_timestamp:type_name -> google.protobuf.Timestamp + 171, // 29: cel.expr.conformance.proto3.TestAllTypes.repeated_struct:type_name -> google.protobuf.Struct + 172, // 30: cel.expr.conformance.proto3.TestAllTypes.repeated_value:type_name -> google.protobuf.Value + 173, // 31: cel.expr.conformance.proto3.TestAllTypes.repeated_int64_wrapper:type_name -> google.protobuf.Int64Value + 174, // 32: cel.expr.conformance.proto3.TestAllTypes.repeated_int32_wrapper:type_name -> google.protobuf.Int32Value + 175, // 33: cel.expr.conformance.proto3.TestAllTypes.repeated_double_wrapper:type_name -> google.protobuf.DoubleValue + 176, // 34: cel.expr.conformance.proto3.TestAllTypes.repeated_float_wrapper:type_name -> google.protobuf.FloatValue + 177, // 35: cel.expr.conformance.proto3.TestAllTypes.repeated_uint64_wrapper:type_name -> google.protobuf.UInt64Value + 178, // 36: cel.expr.conformance.proto3.TestAllTypes.repeated_uint32_wrapper:type_name -> google.protobuf.UInt32Value + 179, // 37: cel.expr.conformance.proto3.TestAllTypes.repeated_string_wrapper:type_name -> google.protobuf.StringValue + 180, // 38: cel.expr.conformance.proto3.TestAllTypes.repeated_bool_wrapper:type_name -> google.protobuf.BoolValue + 181, // 39: cel.expr.conformance.proto3.TestAllTypes.repeated_bytes_wrapper:type_name -> google.protobuf.BytesValue + 182, // 40: cel.expr.conformance.proto3.TestAllTypes.repeated_list_value:type_name -> google.protobuf.ListValue + 183, // 41: cel.expr.conformance.proto3.TestAllTypes.repeated_null_value:type_name -> google.protobuf.NullValue + 5, // 42: cel.expr.conformance.proto3.TestAllTypes.map_int64_nested_type:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt64NestedTypeEntry + 6, // 43: cel.expr.conformance.proto3.TestAllTypes.map_bool_bool:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapBoolBoolEntry + 7, // 44: cel.expr.conformance.proto3.TestAllTypes.map_bool_string:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapBoolStringEntry + 8, // 45: cel.expr.conformance.proto3.TestAllTypes.map_bool_bytes:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapBoolBytesEntry + 9, // 46: cel.expr.conformance.proto3.TestAllTypes.map_bool_int32:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapBoolInt32Entry + 10, // 47: cel.expr.conformance.proto3.TestAllTypes.map_bool_int64:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapBoolInt64Entry + 11, // 48: cel.expr.conformance.proto3.TestAllTypes.map_bool_uint32:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapBoolUint32Entry + 12, // 49: cel.expr.conformance.proto3.TestAllTypes.map_bool_uint64:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapBoolUint64Entry + 13, // 50: cel.expr.conformance.proto3.TestAllTypes.map_bool_float:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapBoolFloatEntry + 14, // 51: cel.expr.conformance.proto3.TestAllTypes.map_bool_double:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapBoolDoubleEntry + 15, // 52: cel.expr.conformance.proto3.TestAllTypes.map_bool_enum:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapBoolEnumEntry + 16, // 53: cel.expr.conformance.proto3.TestAllTypes.map_bool_message:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapBoolMessageEntry + 17, // 54: cel.expr.conformance.proto3.TestAllTypes.map_bool_duration:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapBoolDurationEntry + 18, // 55: cel.expr.conformance.proto3.TestAllTypes.map_bool_timestamp:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapBoolTimestampEntry + 19, // 56: cel.expr.conformance.proto3.TestAllTypes.map_bool_null_value:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapBoolNullValueEntry + 20, // 57: cel.expr.conformance.proto3.TestAllTypes.map_bool_any:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapBoolAnyEntry + 21, // 58: cel.expr.conformance.proto3.TestAllTypes.map_bool_struct:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapBoolStructEntry + 22, // 59: cel.expr.conformance.proto3.TestAllTypes.map_bool_value:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapBoolValueEntry + 23, // 60: cel.expr.conformance.proto3.TestAllTypes.map_bool_list_value:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapBoolListValueEntry + 24, // 61: cel.expr.conformance.proto3.TestAllTypes.map_bool_int64_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapBoolInt64WrapperEntry + 25, // 62: cel.expr.conformance.proto3.TestAllTypes.map_bool_int32_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapBoolInt32WrapperEntry + 26, // 63: cel.expr.conformance.proto3.TestAllTypes.map_bool_double_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapBoolDoubleWrapperEntry + 27, // 64: cel.expr.conformance.proto3.TestAllTypes.map_bool_float_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapBoolFloatWrapperEntry + 28, // 65: cel.expr.conformance.proto3.TestAllTypes.map_bool_uint64_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapBoolUint64WrapperEntry + 29, // 66: cel.expr.conformance.proto3.TestAllTypes.map_bool_uint32_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapBoolUint32WrapperEntry + 30, // 67: cel.expr.conformance.proto3.TestAllTypes.map_bool_string_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapBoolStringWrapperEntry + 31, // 68: cel.expr.conformance.proto3.TestAllTypes.map_bool_bool_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapBoolBoolWrapperEntry + 32, // 69: cel.expr.conformance.proto3.TestAllTypes.map_bool_bytes_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapBoolBytesWrapperEntry + 33, // 70: cel.expr.conformance.proto3.TestAllTypes.map_int32_bool:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt32BoolEntry + 34, // 71: cel.expr.conformance.proto3.TestAllTypes.map_int32_string:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt32StringEntry + 35, // 72: cel.expr.conformance.proto3.TestAllTypes.map_int32_bytes:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt32BytesEntry + 36, // 73: cel.expr.conformance.proto3.TestAllTypes.map_int32_int32:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt32Int32Entry + 37, // 74: cel.expr.conformance.proto3.TestAllTypes.map_int32_int64:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt32Int64Entry + 38, // 75: cel.expr.conformance.proto3.TestAllTypes.map_int32_uint32:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt32Uint32Entry + 39, // 76: cel.expr.conformance.proto3.TestAllTypes.map_int32_uint64:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt32Uint64Entry + 40, // 77: cel.expr.conformance.proto3.TestAllTypes.map_int32_float:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt32FloatEntry + 41, // 78: cel.expr.conformance.proto3.TestAllTypes.map_int32_double:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt32DoubleEntry + 42, // 79: cel.expr.conformance.proto3.TestAllTypes.map_int32_enum:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt32EnumEntry + 43, // 80: cel.expr.conformance.proto3.TestAllTypes.map_int32_message:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt32MessageEntry + 44, // 81: cel.expr.conformance.proto3.TestAllTypes.map_int32_duration:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt32DurationEntry + 45, // 82: cel.expr.conformance.proto3.TestAllTypes.map_int32_timestamp:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt32TimestampEntry + 46, // 83: cel.expr.conformance.proto3.TestAllTypes.map_int32_null_value:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt32NullValueEntry + 47, // 84: cel.expr.conformance.proto3.TestAllTypes.map_int32_any:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt32AnyEntry + 48, // 85: cel.expr.conformance.proto3.TestAllTypes.map_int32_struct:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt32StructEntry + 49, // 86: cel.expr.conformance.proto3.TestAllTypes.map_int32_value:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt32ValueEntry + 50, // 87: cel.expr.conformance.proto3.TestAllTypes.map_int32_list_value:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt32ListValueEntry + 51, // 88: cel.expr.conformance.proto3.TestAllTypes.map_int32_int64_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt32Int64WrapperEntry + 52, // 89: cel.expr.conformance.proto3.TestAllTypes.map_int32_int32_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt32Int32WrapperEntry + 53, // 90: cel.expr.conformance.proto3.TestAllTypes.map_int32_double_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt32DoubleWrapperEntry + 54, // 91: cel.expr.conformance.proto3.TestAllTypes.map_int32_float_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt32FloatWrapperEntry + 55, // 92: cel.expr.conformance.proto3.TestAllTypes.map_int32_uint64_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt32Uint64WrapperEntry + 56, // 93: cel.expr.conformance.proto3.TestAllTypes.map_int32_uint32_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt32Uint32WrapperEntry + 57, // 94: cel.expr.conformance.proto3.TestAllTypes.map_int32_string_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt32StringWrapperEntry + 58, // 95: cel.expr.conformance.proto3.TestAllTypes.map_int32_bool_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt32BoolWrapperEntry + 59, // 96: cel.expr.conformance.proto3.TestAllTypes.map_int32_bytes_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt32BytesWrapperEntry + 60, // 97: cel.expr.conformance.proto3.TestAllTypes.map_int64_bool:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt64BoolEntry + 61, // 98: cel.expr.conformance.proto3.TestAllTypes.map_int64_string:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt64StringEntry + 62, // 99: cel.expr.conformance.proto3.TestAllTypes.map_int64_bytes:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt64BytesEntry + 63, // 100: cel.expr.conformance.proto3.TestAllTypes.map_int64_int32:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt64Int32Entry + 64, // 101: cel.expr.conformance.proto3.TestAllTypes.map_int64_int64:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt64Int64Entry + 65, // 102: cel.expr.conformance.proto3.TestAllTypes.map_int64_uint32:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt64Uint32Entry + 66, // 103: cel.expr.conformance.proto3.TestAllTypes.map_int64_uint64:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt64Uint64Entry + 67, // 104: cel.expr.conformance.proto3.TestAllTypes.map_int64_float:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt64FloatEntry + 68, // 105: cel.expr.conformance.proto3.TestAllTypes.map_int64_double:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt64DoubleEntry + 69, // 106: cel.expr.conformance.proto3.TestAllTypes.map_int64_enum:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt64EnumEntry + 70, // 107: cel.expr.conformance.proto3.TestAllTypes.map_int64_message:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt64MessageEntry + 71, // 108: cel.expr.conformance.proto3.TestAllTypes.map_int64_duration:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt64DurationEntry + 72, // 109: cel.expr.conformance.proto3.TestAllTypes.map_int64_timestamp:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt64TimestampEntry + 73, // 110: cel.expr.conformance.proto3.TestAllTypes.map_int64_null_value:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt64NullValueEntry + 74, // 111: cel.expr.conformance.proto3.TestAllTypes.map_int64_any:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt64AnyEntry + 75, // 112: cel.expr.conformance.proto3.TestAllTypes.map_int64_struct:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt64StructEntry + 76, // 113: cel.expr.conformance.proto3.TestAllTypes.map_int64_value:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt64ValueEntry + 77, // 114: cel.expr.conformance.proto3.TestAllTypes.map_int64_list_value:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt64ListValueEntry + 78, // 115: cel.expr.conformance.proto3.TestAllTypes.map_int64_int64_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt64Int64WrapperEntry + 79, // 116: cel.expr.conformance.proto3.TestAllTypes.map_int64_int32_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt64Int32WrapperEntry + 80, // 117: cel.expr.conformance.proto3.TestAllTypes.map_int64_double_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt64DoubleWrapperEntry + 81, // 118: cel.expr.conformance.proto3.TestAllTypes.map_int64_float_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt64FloatWrapperEntry + 82, // 119: cel.expr.conformance.proto3.TestAllTypes.map_int64_uint64_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt64Uint64WrapperEntry + 83, // 120: cel.expr.conformance.proto3.TestAllTypes.map_int64_uint32_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt64Uint32WrapperEntry + 84, // 121: cel.expr.conformance.proto3.TestAllTypes.map_int64_string_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt64StringWrapperEntry + 85, // 122: cel.expr.conformance.proto3.TestAllTypes.map_int64_bool_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt64BoolWrapperEntry + 86, // 123: cel.expr.conformance.proto3.TestAllTypes.map_int64_bytes_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapInt64BytesWrapperEntry + 87, // 124: cel.expr.conformance.proto3.TestAllTypes.map_uint32_bool:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint32BoolEntry + 88, // 125: cel.expr.conformance.proto3.TestAllTypes.map_uint32_string:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint32StringEntry + 89, // 126: cel.expr.conformance.proto3.TestAllTypes.map_uint32_bytes:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint32BytesEntry + 90, // 127: cel.expr.conformance.proto3.TestAllTypes.map_uint32_int32:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint32Int32Entry + 91, // 128: cel.expr.conformance.proto3.TestAllTypes.map_uint32_int64:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint32Int64Entry + 92, // 129: cel.expr.conformance.proto3.TestAllTypes.map_uint32_uint32:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint32Uint32Entry + 93, // 130: cel.expr.conformance.proto3.TestAllTypes.map_uint32_uint64:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint32Uint64Entry + 94, // 131: cel.expr.conformance.proto3.TestAllTypes.map_uint32_float:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint32FloatEntry + 95, // 132: cel.expr.conformance.proto3.TestAllTypes.map_uint32_double:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint32DoubleEntry + 96, // 133: cel.expr.conformance.proto3.TestAllTypes.map_uint32_enum:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint32EnumEntry + 97, // 134: cel.expr.conformance.proto3.TestAllTypes.map_uint32_message:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint32MessageEntry + 98, // 135: cel.expr.conformance.proto3.TestAllTypes.map_uint32_duration:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint32DurationEntry + 99, // 136: cel.expr.conformance.proto3.TestAllTypes.map_uint32_timestamp:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint32TimestampEntry + 100, // 137: cel.expr.conformance.proto3.TestAllTypes.map_uint32_null_value:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint32NullValueEntry + 101, // 138: cel.expr.conformance.proto3.TestAllTypes.map_uint32_any:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint32AnyEntry + 102, // 139: cel.expr.conformance.proto3.TestAllTypes.map_uint32_struct:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint32StructEntry + 103, // 140: cel.expr.conformance.proto3.TestAllTypes.map_uint32_value:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint32ValueEntry + 104, // 141: cel.expr.conformance.proto3.TestAllTypes.map_uint32_list_value:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint32ListValueEntry + 105, // 142: cel.expr.conformance.proto3.TestAllTypes.map_uint32_int64_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint32Int64WrapperEntry + 106, // 143: cel.expr.conformance.proto3.TestAllTypes.map_uint32_int32_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint32Int32WrapperEntry + 107, // 144: cel.expr.conformance.proto3.TestAllTypes.map_uint32_double_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint32DoubleWrapperEntry + 108, // 145: cel.expr.conformance.proto3.TestAllTypes.map_uint32_float_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint32FloatWrapperEntry + 109, // 146: cel.expr.conformance.proto3.TestAllTypes.map_uint32_uint64_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint32Uint64WrapperEntry + 110, // 147: cel.expr.conformance.proto3.TestAllTypes.map_uint32_uint32_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint32Uint32WrapperEntry + 111, // 148: cel.expr.conformance.proto3.TestAllTypes.map_uint32_string_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint32StringWrapperEntry + 112, // 149: cel.expr.conformance.proto3.TestAllTypes.map_uint32_bool_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint32BoolWrapperEntry + 113, // 150: cel.expr.conformance.proto3.TestAllTypes.map_uint32_bytes_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint32BytesWrapperEntry + 114, // 151: cel.expr.conformance.proto3.TestAllTypes.map_uint64_bool:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint64BoolEntry + 115, // 152: cel.expr.conformance.proto3.TestAllTypes.map_uint64_string:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint64StringEntry + 116, // 153: cel.expr.conformance.proto3.TestAllTypes.map_uint64_bytes:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint64BytesEntry + 117, // 154: cel.expr.conformance.proto3.TestAllTypes.map_uint64_int32:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint64Int32Entry + 118, // 155: cel.expr.conformance.proto3.TestAllTypes.map_uint64_int64:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint64Int64Entry + 119, // 156: cel.expr.conformance.proto3.TestAllTypes.map_uint64_uint32:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint64Uint32Entry + 120, // 157: cel.expr.conformance.proto3.TestAllTypes.map_uint64_uint64:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint64Uint64Entry + 121, // 158: cel.expr.conformance.proto3.TestAllTypes.map_uint64_float:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint64FloatEntry + 122, // 159: cel.expr.conformance.proto3.TestAllTypes.map_uint64_double:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint64DoubleEntry + 123, // 160: cel.expr.conformance.proto3.TestAllTypes.map_uint64_enum:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint64EnumEntry + 124, // 161: cel.expr.conformance.proto3.TestAllTypes.map_uint64_message:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint64MessageEntry + 125, // 162: cel.expr.conformance.proto3.TestAllTypes.map_uint64_duration:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint64DurationEntry + 126, // 163: cel.expr.conformance.proto3.TestAllTypes.map_uint64_timestamp:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint64TimestampEntry + 127, // 164: cel.expr.conformance.proto3.TestAllTypes.map_uint64_null_value:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint64NullValueEntry + 128, // 165: cel.expr.conformance.proto3.TestAllTypes.map_uint64_any:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint64AnyEntry + 129, // 166: cel.expr.conformance.proto3.TestAllTypes.map_uint64_struct:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint64StructEntry + 130, // 167: cel.expr.conformance.proto3.TestAllTypes.map_uint64_value:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint64ValueEntry + 131, // 168: cel.expr.conformance.proto3.TestAllTypes.map_uint64_list_value:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint64ListValueEntry + 132, // 169: cel.expr.conformance.proto3.TestAllTypes.map_uint64_int64_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint64Int64WrapperEntry + 133, // 170: cel.expr.conformance.proto3.TestAllTypes.map_uint64_int32_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint64Int32WrapperEntry + 134, // 171: cel.expr.conformance.proto3.TestAllTypes.map_uint64_double_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint64DoubleWrapperEntry + 135, // 172: cel.expr.conformance.proto3.TestAllTypes.map_uint64_float_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint64FloatWrapperEntry + 136, // 173: cel.expr.conformance.proto3.TestAllTypes.map_uint64_uint64_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint64Uint64WrapperEntry + 137, // 174: cel.expr.conformance.proto3.TestAllTypes.map_uint64_uint32_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint64Uint32WrapperEntry + 138, // 175: cel.expr.conformance.proto3.TestAllTypes.map_uint64_string_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint64StringWrapperEntry + 139, // 176: cel.expr.conformance.proto3.TestAllTypes.map_uint64_bool_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint64BoolWrapperEntry + 140, // 177: cel.expr.conformance.proto3.TestAllTypes.map_uint64_bytes_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapUint64BytesWrapperEntry + 141, // 178: cel.expr.conformance.proto3.TestAllTypes.map_string_bool:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapStringBoolEntry + 142, // 179: cel.expr.conformance.proto3.TestAllTypes.map_string_string:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapStringStringEntry + 143, // 180: cel.expr.conformance.proto3.TestAllTypes.map_string_bytes:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapStringBytesEntry + 144, // 181: cel.expr.conformance.proto3.TestAllTypes.map_string_int32:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapStringInt32Entry + 145, // 182: cel.expr.conformance.proto3.TestAllTypes.map_string_int64:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapStringInt64Entry + 146, // 183: cel.expr.conformance.proto3.TestAllTypes.map_string_uint32:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapStringUint32Entry + 147, // 184: cel.expr.conformance.proto3.TestAllTypes.map_string_uint64:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapStringUint64Entry + 148, // 185: cel.expr.conformance.proto3.TestAllTypes.map_string_float:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapStringFloatEntry + 149, // 186: cel.expr.conformance.proto3.TestAllTypes.map_string_double:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapStringDoubleEntry + 150, // 187: cel.expr.conformance.proto3.TestAllTypes.map_string_enum:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapStringEnumEntry + 151, // 188: cel.expr.conformance.proto3.TestAllTypes.map_string_message:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapStringMessageEntry + 152, // 189: cel.expr.conformance.proto3.TestAllTypes.map_string_duration:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapStringDurationEntry + 153, // 190: cel.expr.conformance.proto3.TestAllTypes.map_string_timestamp:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapStringTimestampEntry + 154, // 191: cel.expr.conformance.proto3.TestAllTypes.map_string_null_value:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapStringNullValueEntry + 155, // 192: cel.expr.conformance.proto3.TestAllTypes.map_string_any:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapStringAnyEntry + 156, // 193: cel.expr.conformance.proto3.TestAllTypes.map_string_struct:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapStringStructEntry + 157, // 194: cel.expr.conformance.proto3.TestAllTypes.map_string_value:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapStringValueEntry + 158, // 195: cel.expr.conformance.proto3.TestAllTypes.map_string_list_value:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapStringListValueEntry + 159, // 196: cel.expr.conformance.proto3.TestAllTypes.map_string_int64_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapStringInt64WrapperEntry + 160, // 197: cel.expr.conformance.proto3.TestAllTypes.map_string_int32_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapStringInt32WrapperEntry + 161, // 198: cel.expr.conformance.proto3.TestAllTypes.map_string_double_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapStringDoubleWrapperEntry + 162, // 199: cel.expr.conformance.proto3.TestAllTypes.map_string_float_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapStringFloatWrapperEntry + 163, // 200: cel.expr.conformance.proto3.TestAllTypes.map_string_uint64_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapStringUint64WrapperEntry + 164, // 201: cel.expr.conformance.proto3.TestAllTypes.map_string_uint32_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapStringUint32WrapperEntry + 165, // 202: cel.expr.conformance.proto3.TestAllTypes.map_string_string_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapStringStringWrapperEntry + 166, // 203: cel.expr.conformance.proto3.TestAllTypes.map_string_bool_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapStringBoolWrapperEntry + 167, // 204: cel.expr.conformance.proto3.TestAllTypes.map_string_bytes_wrapper:type_name -> cel.expr.conformance.proto3.TestAllTypes.MapStringBytesWrapperEntry + 3, // 205: cel.expr.conformance.proto3.TestAllTypes.oneof_type:type_name -> cel.expr.conformance.proto3.NestedTestAllTypes + 4, // 206: cel.expr.conformance.proto3.TestAllTypes.oneof_msg:type_name -> cel.expr.conformance.proto3.TestAllTypes.NestedMessage + 3, // 207: cel.expr.conformance.proto3.NestedTestAllTypes.child:type_name -> cel.expr.conformance.proto3.NestedTestAllTypes + 2, // 208: cel.expr.conformance.proto3.NestedTestAllTypes.payload:type_name -> cel.expr.conformance.proto3.TestAllTypes + 3, // 209: cel.expr.conformance.proto3.TestAllTypes.MapInt64NestedTypeEntry.value:type_name -> cel.expr.conformance.proto3.NestedTestAllTypes + 1, // 210: cel.expr.conformance.proto3.TestAllTypes.MapBoolEnumEntry.value:type_name -> cel.expr.conformance.proto3.TestAllTypes.NestedEnum + 4, // 211: cel.expr.conformance.proto3.TestAllTypes.MapBoolMessageEntry.value:type_name -> cel.expr.conformance.proto3.TestAllTypes.NestedMessage + 169, // 212: cel.expr.conformance.proto3.TestAllTypes.MapBoolDurationEntry.value:type_name -> google.protobuf.Duration + 170, // 213: cel.expr.conformance.proto3.TestAllTypes.MapBoolTimestampEntry.value:type_name -> google.protobuf.Timestamp + 183, // 214: cel.expr.conformance.proto3.TestAllTypes.MapBoolNullValueEntry.value:type_name -> google.protobuf.NullValue + 168, // 215: cel.expr.conformance.proto3.TestAllTypes.MapBoolAnyEntry.value:type_name -> google.protobuf.Any + 171, // 216: cel.expr.conformance.proto3.TestAllTypes.MapBoolStructEntry.value:type_name -> google.protobuf.Struct + 172, // 217: cel.expr.conformance.proto3.TestAllTypes.MapBoolValueEntry.value:type_name -> google.protobuf.Value + 182, // 218: cel.expr.conformance.proto3.TestAllTypes.MapBoolListValueEntry.value:type_name -> google.protobuf.ListValue + 173, // 219: cel.expr.conformance.proto3.TestAllTypes.MapBoolInt64WrapperEntry.value:type_name -> google.protobuf.Int64Value + 174, // 220: cel.expr.conformance.proto3.TestAllTypes.MapBoolInt32WrapperEntry.value:type_name -> google.protobuf.Int32Value + 175, // 221: cel.expr.conformance.proto3.TestAllTypes.MapBoolDoubleWrapperEntry.value:type_name -> google.protobuf.DoubleValue + 176, // 222: cel.expr.conformance.proto3.TestAllTypes.MapBoolFloatWrapperEntry.value:type_name -> google.protobuf.FloatValue + 177, // 223: cel.expr.conformance.proto3.TestAllTypes.MapBoolUint64WrapperEntry.value:type_name -> google.protobuf.UInt64Value + 178, // 224: cel.expr.conformance.proto3.TestAllTypes.MapBoolUint32WrapperEntry.value:type_name -> google.protobuf.UInt32Value + 179, // 225: cel.expr.conformance.proto3.TestAllTypes.MapBoolStringWrapperEntry.value:type_name -> google.protobuf.StringValue + 180, // 226: cel.expr.conformance.proto3.TestAllTypes.MapBoolBoolWrapperEntry.value:type_name -> google.protobuf.BoolValue + 181, // 227: cel.expr.conformance.proto3.TestAllTypes.MapBoolBytesWrapperEntry.value:type_name -> google.protobuf.BytesValue + 1, // 228: cel.expr.conformance.proto3.TestAllTypes.MapInt32EnumEntry.value:type_name -> cel.expr.conformance.proto3.TestAllTypes.NestedEnum + 4, // 229: cel.expr.conformance.proto3.TestAllTypes.MapInt32MessageEntry.value:type_name -> cel.expr.conformance.proto3.TestAllTypes.NestedMessage + 169, // 230: cel.expr.conformance.proto3.TestAllTypes.MapInt32DurationEntry.value:type_name -> google.protobuf.Duration + 170, // 231: cel.expr.conformance.proto3.TestAllTypes.MapInt32TimestampEntry.value:type_name -> google.protobuf.Timestamp + 183, // 232: cel.expr.conformance.proto3.TestAllTypes.MapInt32NullValueEntry.value:type_name -> google.protobuf.NullValue + 168, // 233: cel.expr.conformance.proto3.TestAllTypes.MapInt32AnyEntry.value:type_name -> google.protobuf.Any + 171, // 234: cel.expr.conformance.proto3.TestAllTypes.MapInt32StructEntry.value:type_name -> google.protobuf.Struct + 172, // 235: cel.expr.conformance.proto3.TestAllTypes.MapInt32ValueEntry.value:type_name -> google.protobuf.Value + 182, // 236: cel.expr.conformance.proto3.TestAllTypes.MapInt32ListValueEntry.value:type_name -> google.protobuf.ListValue + 173, // 237: cel.expr.conformance.proto3.TestAllTypes.MapInt32Int64WrapperEntry.value:type_name -> google.protobuf.Int64Value + 174, // 238: cel.expr.conformance.proto3.TestAllTypes.MapInt32Int32WrapperEntry.value:type_name -> google.protobuf.Int32Value + 175, // 239: cel.expr.conformance.proto3.TestAllTypes.MapInt32DoubleWrapperEntry.value:type_name -> google.protobuf.DoubleValue + 176, // 240: cel.expr.conformance.proto3.TestAllTypes.MapInt32FloatWrapperEntry.value:type_name -> google.protobuf.FloatValue + 177, // 241: cel.expr.conformance.proto3.TestAllTypes.MapInt32Uint64WrapperEntry.value:type_name -> google.protobuf.UInt64Value + 178, // 242: cel.expr.conformance.proto3.TestAllTypes.MapInt32Uint32WrapperEntry.value:type_name -> google.protobuf.UInt32Value + 179, // 243: cel.expr.conformance.proto3.TestAllTypes.MapInt32StringWrapperEntry.value:type_name -> google.protobuf.StringValue + 180, // 244: cel.expr.conformance.proto3.TestAllTypes.MapInt32BoolWrapperEntry.value:type_name -> google.protobuf.BoolValue + 181, // 245: cel.expr.conformance.proto3.TestAllTypes.MapInt32BytesWrapperEntry.value:type_name -> google.protobuf.BytesValue + 1, // 246: cel.expr.conformance.proto3.TestAllTypes.MapInt64EnumEntry.value:type_name -> cel.expr.conformance.proto3.TestAllTypes.NestedEnum + 4, // 247: cel.expr.conformance.proto3.TestAllTypes.MapInt64MessageEntry.value:type_name -> cel.expr.conformance.proto3.TestAllTypes.NestedMessage + 169, // 248: cel.expr.conformance.proto3.TestAllTypes.MapInt64DurationEntry.value:type_name -> google.protobuf.Duration + 170, // 249: cel.expr.conformance.proto3.TestAllTypes.MapInt64TimestampEntry.value:type_name -> google.protobuf.Timestamp + 183, // 250: cel.expr.conformance.proto3.TestAllTypes.MapInt64NullValueEntry.value:type_name -> google.protobuf.NullValue + 168, // 251: cel.expr.conformance.proto3.TestAllTypes.MapInt64AnyEntry.value:type_name -> google.protobuf.Any + 171, // 252: cel.expr.conformance.proto3.TestAllTypes.MapInt64StructEntry.value:type_name -> google.protobuf.Struct + 172, // 253: cel.expr.conformance.proto3.TestAllTypes.MapInt64ValueEntry.value:type_name -> google.protobuf.Value + 182, // 254: cel.expr.conformance.proto3.TestAllTypes.MapInt64ListValueEntry.value:type_name -> google.protobuf.ListValue + 173, // 255: cel.expr.conformance.proto3.TestAllTypes.MapInt64Int64WrapperEntry.value:type_name -> google.protobuf.Int64Value + 174, // 256: cel.expr.conformance.proto3.TestAllTypes.MapInt64Int32WrapperEntry.value:type_name -> google.protobuf.Int32Value + 175, // 257: cel.expr.conformance.proto3.TestAllTypes.MapInt64DoubleWrapperEntry.value:type_name -> google.protobuf.DoubleValue + 176, // 258: cel.expr.conformance.proto3.TestAllTypes.MapInt64FloatWrapperEntry.value:type_name -> google.protobuf.FloatValue + 177, // 259: cel.expr.conformance.proto3.TestAllTypes.MapInt64Uint64WrapperEntry.value:type_name -> google.protobuf.UInt64Value + 178, // 260: cel.expr.conformance.proto3.TestAllTypes.MapInt64Uint32WrapperEntry.value:type_name -> google.protobuf.UInt32Value + 179, // 261: cel.expr.conformance.proto3.TestAllTypes.MapInt64StringWrapperEntry.value:type_name -> google.protobuf.StringValue + 180, // 262: cel.expr.conformance.proto3.TestAllTypes.MapInt64BoolWrapperEntry.value:type_name -> google.protobuf.BoolValue + 181, // 263: cel.expr.conformance.proto3.TestAllTypes.MapInt64BytesWrapperEntry.value:type_name -> google.protobuf.BytesValue + 1, // 264: cel.expr.conformance.proto3.TestAllTypes.MapUint32EnumEntry.value:type_name -> cel.expr.conformance.proto3.TestAllTypes.NestedEnum + 4, // 265: cel.expr.conformance.proto3.TestAllTypes.MapUint32MessageEntry.value:type_name -> cel.expr.conformance.proto3.TestAllTypes.NestedMessage + 169, // 266: cel.expr.conformance.proto3.TestAllTypes.MapUint32DurationEntry.value:type_name -> google.protobuf.Duration + 170, // 267: cel.expr.conformance.proto3.TestAllTypes.MapUint32TimestampEntry.value:type_name -> google.protobuf.Timestamp + 183, // 268: cel.expr.conformance.proto3.TestAllTypes.MapUint32NullValueEntry.value:type_name -> google.protobuf.NullValue + 168, // 269: cel.expr.conformance.proto3.TestAllTypes.MapUint32AnyEntry.value:type_name -> google.protobuf.Any + 171, // 270: cel.expr.conformance.proto3.TestAllTypes.MapUint32StructEntry.value:type_name -> google.protobuf.Struct + 172, // 271: cel.expr.conformance.proto3.TestAllTypes.MapUint32ValueEntry.value:type_name -> google.protobuf.Value + 182, // 272: cel.expr.conformance.proto3.TestAllTypes.MapUint32ListValueEntry.value:type_name -> google.protobuf.ListValue + 173, // 273: cel.expr.conformance.proto3.TestAllTypes.MapUint32Int64WrapperEntry.value:type_name -> google.protobuf.Int64Value + 174, // 274: cel.expr.conformance.proto3.TestAllTypes.MapUint32Int32WrapperEntry.value:type_name -> google.protobuf.Int32Value + 175, // 275: cel.expr.conformance.proto3.TestAllTypes.MapUint32DoubleWrapperEntry.value:type_name -> google.protobuf.DoubleValue + 176, // 276: cel.expr.conformance.proto3.TestAllTypes.MapUint32FloatWrapperEntry.value:type_name -> google.protobuf.FloatValue + 177, // 277: cel.expr.conformance.proto3.TestAllTypes.MapUint32Uint64WrapperEntry.value:type_name -> google.protobuf.UInt64Value + 178, // 278: cel.expr.conformance.proto3.TestAllTypes.MapUint32Uint32WrapperEntry.value:type_name -> google.protobuf.UInt32Value + 179, // 279: cel.expr.conformance.proto3.TestAllTypes.MapUint32StringWrapperEntry.value:type_name -> google.protobuf.StringValue + 180, // 280: cel.expr.conformance.proto3.TestAllTypes.MapUint32BoolWrapperEntry.value:type_name -> google.protobuf.BoolValue + 181, // 281: cel.expr.conformance.proto3.TestAllTypes.MapUint32BytesWrapperEntry.value:type_name -> google.protobuf.BytesValue + 1, // 282: cel.expr.conformance.proto3.TestAllTypes.MapUint64EnumEntry.value:type_name -> cel.expr.conformance.proto3.TestAllTypes.NestedEnum + 4, // 283: cel.expr.conformance.proto3.TestAllTypes.MapUint64MessageEntry.value:type_name -> cel.expr.conformance.proto3.TestAllTypes.NestedMessage + 169, // 284: cel.expr.conformance.proto3.TestAllTypes.MapUint64DurationEntry.value:type_name -> google.protobuf.Duration + 170, // 285: cel.expr.conformance.proto3.TestAllTypes.MapUint64TimestampEntry.value:type_name -> google.protobuf.Timestamp + 183, // 286: cel.expr.conformance.proto3.TestAllTypes.MapUint64NullValueEntry.value:type_name -> google.protobuf.NullValue + 168, // 287: cel.expr.conformance.proto3.TestAllTypes.MapUint64AnyEntry.value:type_name -> google.protobuf.Any + 171, // 288: cel.expr.conformance.proto3.TestAllTypes.MapUint64StructEntry.value:type_name -> google.protobuf.Struct + 172, // 289: cel.expr.conformance.proto3.TestAllTypes.MapUint64ValueEntry.value:type_name -> google.protobuf.Value + 182, // 290: cel.expr.conformance.proto3.TestAllTypes.MapUint64ListValueEntry.value:type_name -> google.protobuf.ListValue + 173, // 291: cel.expr.conformance.proto3.TestAllTypes.MapUint64Int64WrapperEntry.value:type_name -> google.protobuf.Int64Value + 174, // 292: cel.expr.conformance.proto3.TestAllTypes.MapUint64Int32WrapperEntry.value:type_name -> google.protobuf.Int32Value + 175, // 293: cel.expr.conformance.proto3.TestAllTypes.MapUint64DoubleWrapperEntry.value:type_name -> google.protobuf.DoubleValue + 176, // 294: cel.expr.conformance.proto3.TestAllTypes.MapUint64FloatWrapperEntry.value:type_name -> google.protobuf.FloatValue + 177, // 295: cel.expr.conformance.proto3.TestAllTypes.MapUint64Uint64WrapperEntry.value:type_name -> google.protobuf.UInt64Value + 178, // 296: cel.expr.conformance.proto3.TestAllTypes.MapUint64Uint32WrapperEntry.value:type_name -> google.protobuf.UInt32Value + 179, // 297: cel.expr.conformance.proto3.TestAllTypes.MapUint64StringWrapperEntry.value:type_name -> google.protobuf.StringValue + 180, // 298: cel.expr.conformance.proto3.TestAllTypes.MapUint64BoolWrapperEntry.value:type_name -> google.protobuf.BoolValue + 181, // 299: cel.expr.conformance.proto3.TestAllTypes.MapUint64BytesWrapperEntry.value:type_name -> google.protobuf.BytesValue + 1, // 300: cel.expr.conformance.proto3.TestAllTypes.MapStringEnumEntry.value:type_name -> cel.expr.conformance.proto3.TestAllTypes.NestedEnum + 4, // 301: cel.expr.conformance.proto3.TestAllTypes.MapStringMessageEntry.value:type_name -> cel.expr.conformance.proto3.TestAllTypes.NestedMessage + 169, // 302: cel.expr.conformance.proto3.TestAllTypes.MapStringDurationEntry.value:type_name -> google.protobuf.Duration + 170, // 303: cel.expr.conformance.proto3.TestAllTypes.MapStringTimestampEntry.value:type_name -> google.protobuf.Timestamp + 183, // 304: cel.expr.conformance.proto3.TestAllTypes.MapStringNullValueEntry.value:type_name -> google.protobuf.NullValue + 168, // 305: cel.expr.conformance.proto3.TestAllTypes.MapStringAnyEntry.value:type_name -> google.protobuf.Any + 171, // 306: cel.expr.conformance.proto3.TestAllTypes.MapStringStructEntry.value:type_name -> google.protobuf.Struct + 172, // 307: cel.expr.conformance.proto3.TestAllTypes.MapStringValueEntry.value:type_name -> google.protobuf.Value + 182, // 308: cel.expr.conformance.proto3.TestAllTypes.MapStringListValueEntry.value:type_name -> google.protobuf.ListValue + 173, // 309: cel.expr.conformance.proto3.TestAllTypes.MapStringInt64WrapperEntry.value:type_name -> google.protobuf.Int64Value + 174, // 310: cel.expr.conformance.proto3.TestAllTypes.MapStringInt32WrapperEntry.value:type_name -> google.protobuf.Int32Value + 175, // 311: cel.expr.conformance.proto3.TestAllTypes.MapStringDoubleWrapperEntry.value:type_name -> google.protobuf.DoubleValue + 176, // 312: cel.expr.conformance.proto3.TestAllTypes.MapStringFloatWrapperEntry.value:type_name -> google.protobuf.FloatValue + 177, // 313: cel.expr.conformance.proto3.TestAllTypes.MapStringUint64WrapperEntry.value:type_name -> google.protobuf.UInt64Value + 178, // 314: cel.expr.conformance.proto3.TestAllTypes.MapStringUint32WrapperEntry.value:type_name -> google.protobuf.UInt32Value + 179, // 315: cel.expr.conformance.proto3.TestAllTypes.MapStringStringWrapperEntry.value:type_name -> google.protobuf.StringValue + 180, // 316: cel.expr.conformance.proto3.TestAllTypes.MapStringBoolWrapperEntry.value:type_name -> google.protobuf.BoolValue + 181, // 317: cel.expr.conformance.proto3.TestAllTypes.MapStringBytesWrapperEntry.value:type_name -> google.protobuf.BytesValue + 318, // [318:318] is the sub-list for method output_type + 318, // [318:318] is the sub-list for method input_type + 318, // [318:318] is the sub-list for extension type_name + 318, // [318:318] is the sub-list for extension extendee + 0, // [0:318] is the sub-list for field type_name +} + +func init() { file_cel_expr_conformance_proto3_test_all_types_proto_init() } +func file_cel_expr_conformance_proto3_test_all_types_proto_init() { + if File_cel_expr_conformance_proto3_test_all_types_proto != nil { + return + } + file_cel_expr_conformance_proto3_test_all_types_proto_msgTypes[0].OneofWrappers = []any{ + (*TestAllTypes_SingleNestedMessage)(nil), + (*TestAllTypes_SingleNestedEnum)(nil), + (*TestAllTypes_OneofType)(nil), + (*TestAllTypes_OneofMsg)(nil), + (*TestAllTypes_OneofBool)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_cel_expr_conformance_proto3_test_all_types_proto_rawDesc), len(file_cel_expr_conformance_proto3_test_all_types_proto_rawDesc)), + NumEnums: 2, + NumMessages: 166, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_cel_expr_conformance_proto3_test_all_types_proto_goTypes, + DependencyIndexes: file_cel_expr_conformance_proto3_test_all_types_proto_depIdxs, + EnumInfos: file_cel_expr_conformance_proto3_test_all_types_proto_enumTypes, + MessageInfos: file_cel_expr_conformance_proto3_test_all_types_proto_msgTypes, + }.Build() + File_cel_expr_conformance_proto3_test_all_types_proto = out.File + file_cel_expr_conformance_proto3_test_all_types_proto_goTypes = nil + file_cel_expr_conformance_proto3_test_all_types_proto_depIdxs = nil +} diff --git a/vendor/github.com/google/go-cmp/LICENSE b/vendor/github.com/google/go-cmp/LICENSE new file mode 100644 index 000000000..32017f8fa --- /dev/null +++ b/vendor/github.com/google/go-cmp/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2017 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/google/go-cmp/cmp/compare.go b/vendor/github.com/google/go-cmp/cmp/compare.go new file mode 100644 index 000000000..0f5b8a48c --- /dev/null +++ b/vendor/github.com/google/go-cmp/cmp/compare.go @@ -0,0 +1,671 @@ +// Copyright 2017, The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package cmp determines equality of values. +// +// This package is intended to be a more powerful and safer alternative to +// [reflect.DeepEqual] for comparing whether two values are semantically equal. +// It is intended to only be used in tests, as performance is not a goal and +// it may panic if it cannot compare the values. Its propensity towards +// panicking means that its unsuitable for production environments where a +// spurious panic may be fatal. +// +// The primary features of cmp are: +// +// - When the default behavior of equality does not suit the test's needs, +// custom equality functions can override the equality operation. +// For example, an equality function may report floats as equal so long as +// they are within some tolerance of each other. +// +// - Types with an Equal method (e.g., [time.Time.Equal]) may use that method +// to determine equality. This allows package authors to determine +// the equality operation for the types that they define. +// +// - If no custom equality functions are used and no Equal method is defined, +// equality is determined by recursively comparing the primitive kinds on +// both values, much like [reflect.DeepEqual]. Unlike [reflect.DeepEqual], +// unexported fields are not compared by default; they result in panics +// unless suppressed by using an [Ignore] option +// (see [github.com/google/go-cmp/cmp/cmpopts.IgnoreUnexported]) +// or explicitly compared using the [Exporter] option. +package cmp + +import ( + "fmt" + "reflect" + "strings" + + "github.com/google/go-cmp/cmp/internal/diff" + "github.com/google/go-cmp/cmp/internal/function" + "github.com/google/go-cmp/cmp/internal/value" +) + +// TODO(≥go1.18): Use any instead of interface{}. + +// Equal reports whether x and y are equal by recursively applying the +// following rules in the given order to x and y and all of their sub-values: +// +// - Let S be the set of all [Ignore], [Transformer], and [Comparer] options that +// remain after applying all path filters, value filters, and type filters. +// If at least one [Ignore] exists in S, then the comparison is ignored. +// If the number of [Transformer] and [Comparer] options in S is non-zero, +// then Equal panics because it is ambiguous which option to use. +// If S contains a single [Transformer], then use that to transform +// the current values and recursively call Equal on the output values. +// If S contains a single [Comparer], then use that to compare the current values. +// Otherwise, evaluation proceeds to the next rule. +// +// - If the values have an Equal method of the form "(T) Equal(T) bool" or +// "(T) Equal(I) bool" where T is assignable to I, then use the result of +// x.Equal(y) even if x or y is nil. Otherwise, no such method exists and +// evaluation proceeds to the next rule. +// +// - Lastly, try to compare x and y based on their basic kinds. +// Simple kinds like booleans, integers, floats, complex numbers, strings, +// and channels are compared using the equivalent of the == operator in Go. +// Functions are only equal if they are both nil, otherwise they are unequal. +// +// Structs are equal if recursively calling Equal on all fields report equal. +// If a struct contains unexported fields, Equal panics unless an [Ignore] option +// (e.g., [github.com/google/go-cmp/cmp/cmpopts.IgnoreUnexported]) ignores that field +// or the [Exporter] option explicitly permits comparing the unexported field. +// +// Slices are equal if they are both nil or both non-nil, where recursively +// calling Equal on all non-ignored slice or array elements report equal. +// Empty non-nil slices and nil slices are not equal; to equate empty slices, +// consider using [github.com/google/go-cmp/cmp/cmpopts.EquateEmpty]. +// +// Maps are equal if they are both nil or both non-nil, where recursively +// calling Equal on all non-ignored map entries report equal. +// Map keys are equal according to the == operator. +// To use custom comparisons for map keys, consider using +// [github.com/google/go-cmp/cmp/cmpopts.SortMaps]. +// Empty non-nil maps and nil maps are not equal; to equate empty maps, +// consider using [github.com/google/go-cmp/cmp/cmpopts.EquateEmpty]. +// +// Pointers and interfaces are equal if they are both nil or both non-nil, +// where they have the same underlying concrete type and recursively +// calling Equal on the underlying values reports equal. +// +// Before recursing into a pointer, slice element, or map, the current path +// is checked to detect whether the address has already been visited. +// If there is a cycle, then the pointed at values are considered equal +// only if both addresses were previously visited in the same path step. +func Equal(x, y interface{}, opts ...Option) bool { + s := newState(opts) + s.compareAny(rootStep(x, y)) + return s.result.Equal() +} + +// Diff returns a human-readable report of the differences between two values: +// y - x. It returns an empty string if and only if Equal returns true for the +// same input values and options. +// +// The output is displayed as a literal in pseudo-Go syntax. +// At the start of each line, a "-" prefix indicates an element removed from x, +// a "+" prefix to indicates an element added from y, and the lack of a prefix +// indicates an element common to both x and y. If possible, the output +// uses fmt.Stringer.String or error.Error methods to produce more humanly +// readable outputs. In such cases, the string is prefixed with either an +// 's' or 'e' character, respectively, to indicate that the method was called. +// +// Do not depend on this output being stable. If you need the ability to +// programmatically interpret the difference, consider using a custom Reporter. +func Diff(x, y interface{}, opts ...Option) string { + s := newState(opts) + + // Optimization: If there are no other reporters, we can optimize for the + // common case where the result is equal (and thus no reported difference). + // This avoids the expensive construction of a difference tree. + if len(s.reporters) == 0 { + s.compareAny(rootStep(x, y)) + if s.result.Equal() { + return "" + } + s.result = diff.Result{} // Reset results + } + + r := new(defaultReporter) + s.reporters = append(s.reporters, reporter{r}) + s.compareAny(rootStep(x, y)) + d := r.String() + if (d == "") != s.result.Equal() { + panic("inconsistent difference and equality results") + } + return d +} + +// rootStep constructs the first path step. If x and y have differing types, +// then they are stored within an empty interface type. +func rootStep(x, y interface{}) PathStep { + vx := reflect.ValueOf(x) + vy := reflect.ValueOf(y) + + // If the inputs are different types, auto-wrap them in an empty interface + // so that they have the same parent type. + var t reflect.Type + if !vx.IsValid() || !vy.IsValid() || vx.Type() != vy.Type() { + t = anyType + if vx.IsValid() { + vvx := reflect.New(t).Elem() + vvx.Set(vx) + vx = vvx + } + if vy.IsValid() { + vvy := reflect.New(t).Elem() + vvy.Set(vy) + vy = vvy + } + } else { + t = vx.Type() + } + + return &pathStep{t, vx, vy} +} + +type state struct { + // These fields represent the "comparison state". + // Calling statelessCompare must not result in observable changes to these. + result diff.Result // The current result of comparison + curPath Path // The current path in the value tree + curPtrs pointerPath // The current set of visited pointers + reporters []reporter // Optional reporters + + // recChecker checks for infinite cycles applying the same set of + // transformers upon the output of itself. + recChecker recChecker + + // dynChecker triggers pseudo-random checks for option correctness. + // It is safe for statelessCompare to mutate this value. + dynChecker dynChecker + + // These fields, once set by processOption, will not change. + exporters []exporter // List of exporters for structs with unexported fields + opts Options // List of all fundamental and filter options +} + +func newState(opts []Option) *state { + // Always ensure a validator option exists to validate the inputs. + s := &state{opts: Options{validator{}}} + s.curPtrs.Init() + s.processOption(Options(opts)) + return s +} + +func (s *state) processOption(opt Option) { + switch opt := opt.(type) { + case nil: + case Options: + for _, o := range opt { + s.processOption(o) + } + case coreOption: + type filtered interface { + isFiltered() bool + } + if fopt, ok := opt.(filtered); ok && !fopt.isFiltered() { + panic(fmt.Sprintf("cannot use an unfiltered option: %v", opt)) + } + s.opts = append(s.opts, opt) + case exporter: + s.exporters = append(s.exporters, opt) + case reporter: + s.reporters = append(s.reporters, opt) + default: + panic(fmt.Sprintf("unknown option %T", opt)) + } +} + +// statelessCompare compares two values and returns the result. +// This function is stateless in that it does not alter the current result, +// or output to any registered reporters. +func (s *state) statelessCompare(step PathStep) diff.Result { + // We do not save and restore curPath and curPtrs because all of the + // compareX methods should properly push and pop from them. + // It is an implementation bug if the contents of the paths differ from + // when calling this function to when returning from it. + + oldResult, oldReporters := s.result, s.reporters + s.result = diff.Result{} // Reset result + s.reporters = nil // Remove reporters to avoid spurious printouts + s.compareAny(step) + res := s.result + s.result, s.reporters = oldResult, oldReporters + return res +} + +func (s *state) compareAny(step PathStep) { + // Update the path stack. + s.curPath.push(step) + defer s.curPath.pop() + for _, r := range s.reporters { + r.PushStep(step) + defer r.PopStep() + } + s.recChecker.Check(s.curPath) + + // Cycle-detection for slice elements (see NOTE in compareSlice). + t := step.Type() + vx, vy := step.Values() + if si, ok := step.(SliceIndex); ok && si.isSlice && vx.IsValid() && vy.IsValid() { + px, py := vx.Addr(), vy.Addr() + if eq, visited := s.curPtrs.Push(px, py); visited { + s.report(eq, reportByCycle) + return + } + defer s.curPtrs.Pop(px, py) + } + + // Rule 1: Check whether an option applies on this node in the value tree. + if s.tryOptions(t, vx, vy) { + return + } + + // Rule 2: Check whether the type has a valid Equal method. + if s.tryMethod(t, vx, vy) { + return + } + + // Rule 3: Compare based on the underlying kind. + switch t.Kind() { + case reflect.Bool: + s.report(vx.Bool() == vy.Bool(), 0) + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + s.report(vx.Int() == vy.Int(), 0) + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + s.report(vx.Uint() == vy.Uint(), 0) + case reflect.Float32, reflect.Float64: + s.report(vx.Float() == vy.Float(), 0) + case reflect.Complex64, reflect.Complex128: + s.report(vx.Complex() == vy.Complex(), 0) + case reflect.String: + s.report(vx.String() == vy.String(), 0) + case reflect.Chan, reflect.UnsafePointer: + s.report(vx.Pointer() == vy.Pointer(), 0) + case reflect.Func: + s.report(vx.IsNil() && vy.IsNil(), 0) + case reflect.Struct: + s.compareStruct(t, vx, vy) + case reflect.Slice, reflect.Array: + s.compareSlice(t, vx, vy) + case reflect.Map: + s.compareMap(t, vx, vy) + case reflect.Ptr: + s.comparePtr(t, vx, vy) + case reflect.Interface: + s.compareInterface(t, vx, vy) + default: + panic(fmt.Sprintf("%v kind not handled", t.Kind())) + } +} + +func (s *state) tryOptions(t reflect.Type, vx, vy reflect.Value) bool { + // Evaluate all filters and apply the remaining options. + if opt := s.opts.filter(s, t, vx, vy); opt != nil { + opt.apply(s, vx, vy) + return true + } + return false +} + +func (s *state) tryMethod(t reflect.Type, vx, vy reflect.Value) bool { + // Check if this type even has an Equal method. + m, ok := t.MethodByName("Equal") + if !ok || !function.IsType(m.Type, function.EqualAssignable) { + return false + } + + eq := s.callTTBFunc(m.Func, vx, vy) + s.report(eq, reportByMethod) + return true +} + +func (s *state) callTRFunc(f, v reflect.Value, step Transform) reflect.Value { + if !s.dynChecker.Next() { + return f.Call([]reflect.Value{v})[0] + } + + // Run the function twice and ensure that we get the same results back. + // We run in goroutines so that the race detector (if enabled) can detect + // unsafe mutations to the input. + c := make(chan reflect.Value) + go detectRaces(c, f, v) + got := <-c + want := f.Call([]reflect.Value{v})[0] + if step.vx, step.vy = got, want; !s.statelessCompare(step).Equal() { + // To avoid false-positives with non-reflexive equality operations, + // we sanity check whether a value is equal to itself. + if step.vx, step.vy = want, want; !s.statelessCompare(step).Equal() { + return want + } + panic(fmt.Sprintf("non-deterministic function detected: %s", function.NameOf(f))) + } + return want +} + +func (s *state) callTTBFunc(f, x, y reflect.Value) bool { + if !s.dynChecker.Next() { + return f.Call([]reflect.Value{x, y})[0].Bool() + } + + // Swapping the input arguments is sufficient to check that + // f is symmetric and deterministic. + // We run in goroutines so that the race detector (if enabled) can detect + // unsafe mutations to the input. + c := make(chan reflect.Value) + go detectRaces(c, f, y, x) + got := <-c + want := f.Call([]reflect.Value{x, y})[0].Bool() + if !got.IsValid() || got.Bool() != want { + panic(fmt.Sprintf("non-deterministic or non-symmetric function detected: %s", function.NameOf(f))) + } + return want +} + +func detectRaces(c chan<- reflect.Value, f reflect.Value, vs ...reflect.Value) { + var ret reflect.Value + defer func() { + recover() // Ignore panics, let the other call to f panic instead + c <- ret + }() + ret = f.Call(vs)[0] +} + +func (s *state) compareStruct(t reflect.Type, vx, vy reflect.Value) { + var addr bool + var vax, vay reflect.Value // Addressable versions of vx and vy + + var mayForce, mayForceInit bool + step := StructField{&structField{}} + for i := 0; i < t.NumField(); i++ { + step.typ = t.Field(i).Type + step.vx = vx.Field(i) + step.vy = vy.Field(i) + step.name = t.Field(i).Name + step.idx = i + step.unexported = !isExported(step.name) + if step.unexported { + if step.name == "_" { + continue + } + // Defer checking of unexported fields until later to give an + // Ignore a chance to ignore the field. + if !vax.IsValid() || !vay.IsValid() { + // For retrieveUnexportedField to work, the parent struct must + // be addressable. Create a new copy of the values if + // necessary to make them addressable. + addr = vx.CanAddr() || vy.CanAddr() + vax = makeAddressable(vx) + vay = makeAddressable(vy) + } + if !mayForceInit { + for _, xf := range s.exporters { + mayForce = mayForce || xf(t) + } + mayForceInit = true + } + step.mayForce = mayForce + step.paddr = addr + step.pvx = vax + step.pvy = vay + step.field = t.Field(i) + } + s.compareAny(step) + } +} + +func (s *state) compareSlice(t reflect.Type, vx, vy reflect.Value) { + isSlice := t.Kind() == reflect.Slice + if isSlice && (vx.IsNil() || vy.IsNil()) { + s.report(vx.IsNil() && vy.IsNil(), 0) + return + } + + // NOTE: It is incorrect to call curPtrs.Push on the slice header pointer + // since slices represents a list of pointers, rather than a single pointer. + // The pointer checking logic must be handled on a per-element basis + // in compareAny. + // + // A slice header (see reflect.SliceHeader) in Go is a tuple of a starting + // pointer P, a length N, and a capacity C. Supposing each slice element has + // a memory size of M, then the slice is equivalent to the list of pointers: + // [P+i*M for i in range(N)] + // + // For example, v[:0] and v[:1] are slices with the same starting pointer, + // but they are clearly different values. Using the slice pointer alone + // violates the assumption that equal pointers implies equal values. + + step := SliceIndex{&sliceIndex{pathStep: pathStep{typ: t.Elem()}, isSlice: isSlice}} + withIndexes := func(ix, iy int) SliceIndex { + if ix >= 0 { + step.vx, step.xkey = vx.Index(ix), ix + } else { + step.vx, step.xkey = reflect.Value{}, -1 + } + if iy >= 0 { + step.vy, step.ykey = vy.Index(iy), iy + } else { + step.vy, step.ykey = reflect.Value{}, -1 + } + return step + } + + // Ignore options are able to ignore missing elements in a slice. + // However, detecting these reliably requires an optimal differencing + // algorithm, for which diff.Difference is not. + // + // Instead, we first iterate through both slices to detect which elements + // would be ignored if standing alone. The index of non-discarded elements + // are stored in a separate slice, which diffing is then performed on. + var indexesX, indexesY []int + var ignoredX, ignoredY []bool + for ix := 0; ix < vx.Len(); ix++ { + ignored := s.statelessCompare(withIndexes(ix, -1)).NumDiff == 0 + if !ignored { + indexesX = append(indexesX, ix) + } + ignoredX = append(ignoredX, ignored) + } + for iy := 0; iy < vy.Len(); iy++ { + ignored := s.statelessCompare(withIndexes(-1, iy)).NumDiff == 0 + if !ignored { + indexesY = append(indexesY, iy) + } + ignoredY = append(ignoredY, ignored) + } + + // Compute an edit-script for slices vx and vy (excluding ignored elements). + edits := diff.Difference(len(indexesX), len(indexesY), func(ix, iy int) diff.Result { + return s.statelessCompare(withIndexes(indexesX[ix], indexesY[iy])) + }) + + // Replay the ignore-scripts and the edit-script. + var ix, iy int + for ix < vx.Len() || iy < vy.Len() { + var e diff.EditType + switch { + case ix < len(ignoredX) && ignoredX[ix]: + e = diff.UniqueX + case iy < len(ignoredY) && ignoredY[iy]: + e = diff.UniqueY + default: + e, edits = edits[0], edits[1:] + } + switch e { + case diff.UniqueX: + s.compareAny(withIndexes(ix, -1)) + ix++ + case diff.UniqueY: + s.compareAny(withIndexes(-1, iy)) + iy++ + default: + s.compareAny(withIndexes(ix, iy)) + ix++ + iy++ + } + } +} + +func (s *state) compareMap(t reflect.Type, vx, vy reflect.Value) { + if vx.IsNil() || vy.IsNil() { + s.report(vx.IsNil() && vy.IsNil(), 0) + return + } + + // Cycle-detection for maps. + if eq, visited := s.curPtrs.Push(vx, vy); visited { + s.report(eq, reportByCycle) + return + } + defer s.curPtrs.Pop(vx, vy) + + // We combine and sort the two map keys so that we can perform the + // comparisons in a deterministic order. + step := MapIndex{&mapIndex{pathStep: pathStep{typ: t.Elem()}}} + for _, k := range value.SortKeys(append(vx.MapKeys(), vy.MapKeys()...)) { + step.vx = vx.MapIndex(k) + step.vy = vy.MapIndex(k) + step.key = k + if !step.vx.IsValid() && !step.vy.IsValid() { + // It is possible for both vx and vy to be invalid if the + // key contained a NaN value in it. + // + // Even with the ability to retrieve NaN keys in Go 1.12, + // there still isn't a sensible way to compare the values since + // a NaN key may map to multiple unordered values. + // The most reasonable way to compare NaNs would be to compare the + // set of values. However, this is impossible to do efficiently + // since set equality is provably an O(n^2) operation given only + // an Equal function. If we had a Less function or Hash function, + // this could be done in O(n*log(n)) or O(n), respectively. + // + // Rather than adding complex logic to deal with NaNs, make it + // the user's responsibility to compare such obscure maps. + const help = "consider providing a Comparer to compare the map" + panic(fmt.Sprintf("%#v has map key with NaNs\n%s", s.curPath, help)) + } + s.compareAny(step) + } +} + +func (s *state) comparePtr(t reflect.Type, vx, vy reflect.Value) { + if vx.IsNil() || vy.IsNil() { + s.report(vx.IsNil() && vy.IsNil(), 0) + return + } + + // Cycle-detection for pointers. + if eq, visited := s.curPtrs.Push(vx, vy); visited { + s.report(eq, reportByCycle) + return + } + defer s.curPtrs.Pop(vx, vy) + + vx, vy = vx.Elem(), vy.Elem() + s.compareAny(Indirect{&indirect{pathStep{t.Elem(), vx, vy}}}) +} + +func (s *state) compareInterface(t reflect.Type, vx, vy reflect.Value) { + if vx.IsNil() || vy.IsNil() { + s.report(vx.IsNil() && vy.IsNil(), 0) + return + } + vx, vy = vx.Elem(), vy.Elem() + if vx.Type() != vy.Type() { + s.report(false, 0) + return + } + s.compareAny(TypeAssertion{&typeAssertion{pathStep{vx.Type(), vx, vy}}}) +} + +func (s *state) report(eq bool, rf resultFlags) { + if rf&reportByIgnore == 0 { + if eq { + s.result.NumSame++ + rf |= reportEqual + } else { + s.result.NumDiff++ + rf |= reportUnequal + } + } + for _, r := range s.reporters { + r.Report(Result{flags: rf}) + } +} + +// recChecker tracks the state needed to periodically perform checks that +// user provided transformers are not stuck in an infinitely recursive cycle. +type recChecker struct{ next int } + +// Check scans the Path for any recursive transformers and panics when any +// recursive transformers are detected. Note that the presence of a +// recursive Transformer does not necessarily imply an infinite cycle. +// As such, this check only activates after some minimal number of path steps. +func (rc *recChecker) Check(p Path) { + const minLen = 1 << 16 + if rc.next == 0 { + rc.next = minLen + } + if len(p) < rc.next { + return + } + rc.next <<= 1 + + // Check whether the same transformer has appeared at least twice. + var ss []string + m := map[Option]int{} + for _, ps := range p { + if t, ok := ps.(Transform); ok { + t := t.Option() + if m[t] == 1 { // Transformer was used exactly once before + tf := t.(*transformer).fnc.Type() + ss = append(ss, fmt.Sprintf("%v: %v => %v", t, tf.In(0), tf.Out(0))) + } + m[t]++ + } + } + if len(ss) > 0 { + const warning = "recursive set of Transformers detected" + const help = "consider using cmpopts.AcyclicTransformer" + set := strings.Join(ss, "\n\t") + panic(fmt.Sprintf("%s:\n\t%s\n%s", warning, set, help)) + } +} + +// dynChecker tracks the state needed to periodically perform checks that +// user provided functions are symmetric and deterministic. +// The zero value is safe for immediate use. +type dynChecker struct{ curr, next int } + +// Next increments the state and reports whether a check should be performed. +// +// Checks occur every Nth function call, where N is a triangular number: +// +// 0 1 3 6 10 15 21 28 36 45 55 66 78 91 105 120 136 153 171 190 ... +// +// See https://en.wikipedia.org/wiki/Triangular_number +// +// This sequence ensures that the cost of checks drops significantly as +// the number of functions calls grows larger. +func (dc *dynChecker) Next() bool { + ok := dc.curr == dc.next + if ok { + dc.curr = 0 + dc.next++ + } + dc.curr++ + return ok +} + +// makeAddressable returns a value that is always addressable. +// It returns the input verbatim if it is already addressable, +// otherwise it creates a new value and returns an addressable copy. +func makeAddressable(v reflect.Value) reflect.Value { + if v.CanAddr() { + return v + } + vc := reflect.New(v.Type()).Elem() + vc.Set(v) + return vc +} diff --git a/vendor/github.com/google/go-cmp/cmp/export.go b/vendor/github.com/google/go-cmp/cmp/export.go new file mode 100644 index 000000000..29f82fe6b --- /dev/null +++ b/vendor/github.com/google/go-cmp/cmp/export.go @@ -0,0 +1,31 @@ +// Copyright 2017, The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package cmp + +import ( + "reflect" + "unsafe" +) + +// retrieveUnexportedField uses unsafe to forcibly retrieve any field from +// a struct such that the value has read-write permissions. +// +// The parent struct, v, must be addressable, while f must be a StructField +// describing the field to retrieve. If addr is false, +// then the returned value will be shallowed copied to be non-addressable. +func retrieveUnexportedField(v reflect.Value, f reflect.StructField, addr bool) reflect.Value { + ve := reflect.NewAt(f.Type, unsafe.Pointer(uintptr(unsafe.Pointer(v.UnsafeAddr()))+f.Offset)).Elem() + if !addr { + // A field is addressable if and only if the struct is addressable. + // If the original parent value was not addressable, shallow copy the + // value to make it non-addressable to avoid leaking an implementation + // detail of how forcibly exporting a field works. + if ve.Kind() == reflect.Interface && ve.IsNil() { + return reflect.Zero(f.Type) + } + return reflect.ValueOf(ve.Interface()).Convert(f.Type) + } + return ve +} diff --git a/vendor/github.com/google/go-cmp/cmp/internal/diff/debug_disable.go b/vendor/github.com/google/go-cmp/cmp/internal/diff/debug_disable.go new file mode 100644 index 000000000..36062a604 --- /dev/null +++ b/vendor/github.com/google/go-cmp/cmp/internal/diff/debug_disable.go @@ -0,0 +1,18 @@ +// Copyright 2017, The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build !cmp_debug +// +build !cmp_debug + +package diff + +var debug debugger + +type debugger struct{} + +func (debugger) Begin(_, _ int, f EqualFunc, _, _ *EditScript) EqualFunc { + return f +} +func (debugger) Update() {} +func (debugger) Finish() {} diff --git a/vendor/github.com/google/go-cmp/cmp/internal/diff/debug_enable.go b/vendor/github.com/google/go-cmp/cmp/internal/diff/debug_enable.go new file mode 100644 index 000000000..a3b97a1ad --- /dev/null +++ b/vendor/github.com/google/go-cmp/cmp/internal/diff/debug_enable.go @@ -0,0 +1,123 @@ +// Copyright 2017, The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +//go:build cmp_debug +// +build cmp_debug + +package diff + +import ( + "fmt" + "strings" + "sync" + "time" +) + +// The algorithm can be seen running in real-time by enabling debugging: +// go test -tags=cmp_debug -v +// +// Example output: +// === RUN TestDifference/#34 +// ┌───────────────────────────────┐ +// │ \ · · · · · · · · · · · · · · │ +// │ · # · · · · · · · · · · · · · │ +// │ · \ · · · · · · · · · · · · · │ +// │ · · \ · · · · · · · · · · · · │ +// │ · · · X # · · · · · · · · · · │ +// │ · · · # \ · · · · · · · · · · │ +// │ · · · · · # # · · · · · · · · │ +// │ · · · · · # \ · · · · · · · · │ +// │ · · · · · · · \ · · · · · · · │ +// │ · · · · · · · · \ · · · · · · │ +// │ · · · · · · · · · \ · · · · · │ +// │ · · · · · · · · · · \ · · # · │ +// │ · · · · · · · · · · · \ # # · │ +// │ · · · · · · · · · · · # # # · │ +// │ · · · · · · · · · · # # # # · │ +// │ · · · · · · · · · # # # # # · │ +// │ · · · · · · · · · · · · · · \ │ +// └───────────────────────────────┘ +// [.Y..M.XY......YXYXY.|] +// +// The grid represents the edit-graph where the horizontal axis represents +// list X and the vertical axis represents list Y. The start of the two lists +// is the top-left, while the ends are the bottom-right. The '·' represents +// an unexplored node in the graph. The '\' indicates that the two symbols +// from list X and Y are equal. The 'X' indicates that two symbols are similar +// (but not exactly equal) to each other. The '#' indicates that the two symbols +// are different (and not similar). The algorithm traverses this graph trying to +// make the paths starting in the top-left and the bottom-right connect. +// +// The series of '.', 'X', 'Y', and 'M' characters at the bottom represents +// the currently established path from the forward and reverse searches, +// separated by a '|' character. + +const ( + updateDelay = 100 * time.Millisecond + finishDelay = 500 * time.Millisecond + ansiTerminal = true // ANSI escape codes used to move terminal cursor +) + +var debug debugger + +type debugger struct { + sync.Mutex + p1, p2 EditScript + fwdPath, revPath *EditScript + grid []byte + lines int +} + +func (dbg *debugger) Begin(nx, ny int, f EqualFunc, p1, p2 *EditScript) EqualFunc { + dbg.Lock() + dbg.fwdPath, dbg.revPath = p1, p2 + top := "┌─" + strings.Repeat("──", nx) + "┐\n" + row := "│ " + strings.Repeat("· ", nx) + "│\n" + btm := "└─" + strings.Repeat("──", nx) + "┘\n" + dbg.grid = []byte(top + strings.Repeat(row, ny) + btm) + dbg.lines = strings.Count(dbg.String(), "\n") + fmt.Print(dbg) + + // Wrap the EqualFunc so that we can intercept each result. + return func(ix, iy int) (r Result) { + cell := dbg.grid[len(top)+iy*len(row):][len("│ ")+len("· ")*ix:][:len("·")] + for i := range cell { + cell[i] = 0 // Zero out the multiple bytes of UTF-8 middle-dot + } + switch r = f(ix, iy); { + case r.Equal(): + cell[0] = '\\' + case r.Similar(): + cell[0] = 'X' + default: + cell[0] = '#' + } + return + } +} + +func (dbg *debugger) Update() { + dbg.print(updateDelay) +} + +func (dbg *debugger) Finish() { + dbg.print(finishDelay) + dbg.Unlock() +} + +func (dbg *debugger) String() string { + dbg.p1, dbg.p2 = *dbg.fwdPath, dbg.p2[:0] + for i := len(*dbg.revPath) - 1; i >= 0; i-- { + dbg.p2 = append(dbg.p2, (*dbg.revPath)[i]) + } + return fmt.Sprintf("%s[%v|%v]\n\n", dbg.grid, dbg.p1, dbg.p2) +} + +func (dbg *debugger) print(d time.Duration) { + if ansiTerminal { + fmt.Printf("\x1b[%dA", dbg.lines) // Reset terminal cursor + } + fmt.Print(dbg) + time.Sleep(d) +} diff --git a/vendor/github.com/google/go-cmp/cmp/internal/diff/diff.go b/vendor/github.com/google/go-cmp/cmp/internal/diff/diff.go new file mode 100644 index 000000000..a248e5436 --- /dev/null +++ b/vendor/github.com/google/go-cmp/cmp/internal/diff/diff.go @@ -0,0 +1,402 @@ +// Copyright 2017, The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package diff implements an algorithm for producing edit-scripts. +// The edit-script is a sequence of operations needed to transform one list +// of symbols into another (or vice-versa). The edits allowed are insertions, +// deletions, and modifications. The summation of all edits is called the +// Levenshtein distance as this problem is well-known in computer science. +// +// This package prioritizes performance over accuracy. That is, the run time +// is more important than obtaining a minimal Levenshtein distance. +package diff + +import ( + "math/rand" + "time" + + "github.com/google/go-cmp/cmp/internal/flags" +) + +// EditType represents a single operation within an edit-script. +type EditType uint8 + +const ( + // Identity indicates that a symbol pair is identical in both list X and Y. + Identity EditType = iota + // UniqueX indicates that a symbol only exists in X and not Y. + UniqueX + // UniqueY indicates that a symbol only exists in Y and not X. + UniqueY + // Modified indicates that a symbol pair is a modification of each other. + Modified +) + +// EditScript represents the series of differences between two lists. +type EditScript []EditType + +// String returns a human-readable string representing the edit-script where +// Identity, UniqueX, UniqueY, and Modified are represented by the +// '.', 'X', 'Y', and 'M' characters, respectively. +func (es EditScript) String() string { + b := make([]byte, len(es)) + for i, e := range es { + switch e { + case Identity: + b[i] = '.' + case UniqueX: + b[i] = 'X' + case UniqueY: + b[i] = 'Y' + case Modified: + b[i] = 'M' + default: + panic("invalid edit-type") + } + } + return string(b) +} + +// stats returns a histogram of the number of each type of edit operation. +func (es EditScript) stats() (s struct{ NI, NX, NY, NM int }) { + for _, e := range es { + switch e { + case Identity: + s.NI++ + case UniqueX: + s.NX++ + case UniqueY: + s.NY++ + case Modified: + s.NM++ + default: + panic("invalid edit-type") + } + } + return +} + +// Dist is the Levenshtein distance and is guaranteed to be 0 if and only if +// lists X and Y are equal. +func (es EditScript) Dist() int { return len(es) - es.stats().NI } + +// LenX is the length of the X list. +func (es EditScript) LenX() int { return len(es) - es.stats().NY } + +// LenY is the length of the Y list. +func (es EditScript) LenY() int { return len(es) - es.stats().NX } + +// EqualFunc reports whether the symbols at indexes ix and iy are equal. +// When called by Difference, the index is guaranteed to be within nx and ny. +type EqualFunc func(ix int, iy int) Result + +// Result is the result of comparison. +// NumSame is the number of sub-elements that are equal. +// NumDiff is the number of sub-elements that are not equal. +type Result struct{ NumSame, NumDiff int } + +// BoolResult returns a Result that is either Equal or not Equal. +func BoolResult(b bool) Result { + if b { + return Result{NumSame: 1} // Equal, Similar + } else { + return Result{NumDiff: 2} // Not Equal, not Similar + } +} + +// Equal indicates whether the symbols are equal. Two symbols are equal +// if and only if NumDiff == 0. If Equal, then they are also Similar. +func (r Result) Equal() bool { return r.NumDiff == 0 } + +// Similar indicates whether two symbols are similar and may be represented +// by using the Modified type. As a special case, we consider binary comparisons +// (i.e., those that return Result{1, 0} or Result{0, 1}) to be similar. +// +// The exact ratio of NumSame to NumDiff to determine similarity may change. +func (r Result) Similar() bool { + // Use NumSame+1 to offset NumSame so that binary comparisons are similar. + return r.NumSame+1 >= r.NumDiff +} + +var randBool = rand.New(rand.NewSource(time.Now().Unix())).Intn(2) == 0 + +// Difference reports whether two lists of lengths nx and ny are equal +// given the definition of equality provided as f. +// +// This function returns an edit-script, which is a sequence of operations +// needed to convert one list into the other. The following invariants for +// the edit-script are maintained: +// - eq == (es.Dist()==0) +// - nx == es.LenX() +// - ny == es.LenY() +// +// This algorithm is not guaranteed to be an optimal solution (i.e., one that +// produces an edit-script with a minimal Levenshtein distance). This algorithm +// favors performance over optimality. The exact output is not guaranteed to +// be stable and may change over time. +func Difference(nx, ny int, f EqualFunc) (es EditScript) { + // This algorithm is based on traversing what is known as an "edit-graph". + // See Figure 1 from "An O(ND) Difference Algorithm and Its Variations" + // by Eugene W. Myers. Since D can be as large as N itself, this is + // effectively O(N^2). Unlike the algorithm from that paper, we are not + // interested in the optimal path, but at least some "decent" path. + // + // For example, let X and Y be lists of symbols: + // X = [A B C A B B A] + // Y = [C B A B A C] + // + // The edit-graph can be drawn as the following: + // A B C A B B A + // ┌─────────────┐ + // C │_|_|\|_|_|_|_│ 0 + // B │_|\|_|_|\|\|_│ 1 + // A │\|_|_|\|_|_|\│ 2 + // B │_|\|_|_|\|\|_│ 3 + // A │\|_|_|\|_|_|\│ 4 + // C │ | |\| | | | │ 5 + // └─────────────┘ 6 + // 0 1 2 3 4 5 6 7 + // + // List X is written along the horizontal axis, while list Y is written + // along the vertical axis. At any point on this grid, if the symbol in + // list X matches the corresponding symbol in list Y, then a '\' is drawn. + // The goal of any minimal edit-script algorithm is to find a path from the + // top-left corner to the bottom-right corner, while traveling through the + // fewest horizontal or vertical edges. + // A horizontal edge is equivalent to inserting a symbol from list X. + // A vertical edge is equivalent to inserting a symbol from list Y. + // A diagonal edge is equivalent to a matching symbol between both X and Y. + + // Invariants: + // - 0 ≤ fwdPath.X ≤ (fwdFrontier.X, revFrontier.X) ≤ revPath.X ≤ nx + // - 0 ≤ fwdPath.Y ≤ (fwdFrontier.Y, revFrontier.Y) ≤ revPath.Y ≤ ny + // + // In general: + // - fwdFrontier.X < revFrontier.X + // - fwdFrontier.Y < revFrontier.Y + // + // Unless, it is time for the algorithm to terminate. + fwdPath := path{+1, point{0, 0}, make(EditScript, 0, (nx+ny)/2)} + revPath := path{-1, point{nx, ny}, make(EditScript, 0)} + fwdFrontier := fwdPath.point // Forward search frontier + revFrontier := revPath.point // Reverse search frontier + + // Search budget bounds the cost of searching for better paths. + // The longest sequence of non-matching symbols that can be tolerated is + // approximately the square-root of the search budget. + searchBudget := 4 * (nx + ny) // O(n) + + // Running the tests with the "cmp_debug" build tag prints a visualization + // of the algorithm running in real-time. This is educational for + // understanding how the algorithm works. See debug_enable.go. + f = debug.Begin(nx, ny, f, &fwdPath.es, &revPath.es) + + // The algorithm below is a greedy, meet-in-the-middle algorithm for + // computing sub-optimal edit-scripts between two lists. + // + // The algorithm is approximately as follows: + // - Searching for differences switches back-and-forth between + // a search that starts at the beginning (the top-left corner), and + // a search that starts at the end (the bottom-right corner). + // The goal of the search is connect with the search + // from the opposite corner. + // - As we search, we build a path in a greedy manner, + // where the first match seen is added to the path (this is sub-optimal, + // but provides a decent result in practice). When matches are found, + // we try the next pair of symbols in the lists and follow all matches + // as far as possible. + // - When searching for matches, we search along a diagonal going through + // through the "frontier" point. If no matches are found, + // we advance the frontier towards the opposite corner. + // - This algorithm terminates when either the X coordinates or the + // Y coordinates of the forward and reverse frontier points ever intersect. + + // This algorithm is correct even if searching only in the forward direction + // or in the reverse direction. We do both because it is commonly observed + // that two lists commonly differ because elements were added to the front + // or end of the other list. + // + // Non-deterministically start with either the forward or reverse direction + // to introduce some deliberate instability so that we have the flexibility + // to change this algorithm in the future. + if flags.Deterministic || randBool { + goto forwardSearch + } else { + goto reverseSearch + } + +forwardSearch: + { + // Forward search from the beginning. + if fwdFrontier.X >= revFrontier.X || fwdFrontier.Y >= revFrontier.Y || searchBudget == 0 { + goto finishSearch + } + for stop1, stop2, i := false, false, 0; !(stop1 && stop2) && searchBudget > 0; i++ { + // Search in a diagonal pattern for a match. + z := zigzag(i) + p := point{fwdFrontier.X + z, fwdFrontier.Y - z} + switch { + case p.X >= revPath.X || p.Y < fwdPath.Y: + stop1 = true // Hit top-right corner + case p.Y >= revPath.Y || p.X < fwdPath.X: + stop2 = true // Hit bottom-left corner + case f(p.X, p.Y).Equal(): + // Match found, so connect the path to this point. + fwdPath.connect(p, f) + fwdPath.append(Identity) + // Follow sequence of matches as far as possible. + for fwdPath.X < revPath.X && fwdPath.Y < revPath.Y { + if !f(fwdPath.X, fwdPath.Y).Equal() { + break + } + fwdPath.append(Identity) + } + fwdFrontier = fwdPath.point + stop1, stop2 = true, true + default: + searchBudget-- // Match not found + } + debug.Update() + } + // Advance the frontier towards reverse point. + if revPath.X-fwdFrontier.X >= revPath.Y-fwdFrontier.Y { + fwdFrontier.X++ + } else { + fwdFrontier.Y++ + } + goto reverseSearch + } + +reverseSearch: + { + // Reverse search from the end. + if fwdFrontier.X >= revFrontier.X || fwdFrontier.Y >= revFrontier.Y || searchBudget == 0 { + goto finishSearch + } + for stop1, stop2, i := false, false, 0; !(stop1 && stop2) && searchBudget > 0; i++ { + // Search in a diagonal pattern for a match. + z := zigzag(i) + p := point{revFrontier.X - z, revFrontier.Y + z} + switch { + case fwdPath.X >= p.X || revPath.Y < p.Y: + stop1 = true // Hit bottom-left corner + case fwdPath.Y >= p.Y || revPath.X < p.X: + stop2 = true // Hit top-right corner + case f(p.X-1, p.Y-1).Equal(): + // Match found, so connect the path to this point. + revPath.connect(p, f) + revPath.append(Identity) + // Follow sequence of matches as far as possible. + for fwdPath.X < revPath.X && fwdPath.Y < revPath.Y { + if !f(revPath.X-1, revPath.Y-1).Equal() { + break + } + revPath.append(Identity) + } + revFrontier = revPath.point + stop1, stop2 = true, true + default: + searchBudget-- // Match not found + } + debug.Update() + } + // Advance the frontier towards forward point. + if revFrontier.X-fwdPath.X >= revFrontier.Y-fwdPath.Y { + revFrontier.X-- + } else { + revFrontier.Y-- + } + goto forwardSearch + } + +finishSearch: + // Join the forward and reverse paths and then append the reverse path. + fwdPath.connect(revPath.point, f) + for i := len(revPath.es) - 1; i >= 0; i-- { + t := revPath.es[i] + revPath.es = revPath.es[:i] + fwdPath.append(t) + } + debug.Finish() + return fwdPath.es +} + +type path struct { + dir int // +1 if forward, -1 if reverse + point // Leading point of the EditScript path + es EditScript +} + +// connect appends any necessary Identity, Modified, UniqueX, or UniqueY types +// to the edit-script to connect p.point to dst. +func (p *path) connect(dst point, f EqualFunc) { + if p.dir > 0 { + // Connect in forward direction. + for dst.X > p.X && dst.Y > p.Y { + switch r := f(p.X, p.Y); { + case r.Equal(): + p.append(Identity) + case r.Similar(): + p.append(Modified) + case dst.X-p.X >= dst.Y-p.Y: + p.append(UniqueX) + default: + p.append(UniqueY) + } + } + for dst.X > p.X { + p.append(UniqueX) + } + for dst.Y > p.Y { + p.append(UniqueY) + } + } else { + // Connect in reverse direction. + for p.X > dst.X && p.Y > dst.Y { + switch r := f(p.X-1, p.Y-1); { + case r.Equal(): + p.append(Identity) + case r.Similar(): + p.append(Modified) + case p.Y-dst.Y >= p.X-dst.X: + p.append(UniqueY) + default: + p.append(UniqueX) + } + } + for p.X > dst.X { + p.append(UniqueX) + } + for p.Y > dst.Y { + p.append(UniqueY) + } + } +} + +func (p *path) append(t EditType) { + p.es = append(p.es, t) + switch t { + case Identity, Modified: + p.add(p.dir, p.dir) + case UniqueX: + p.add(p.dir, 0) + case UniqueY: + p.add(0, p.dir) + } + debug.Update() +} + +type point struct{ X, Y int } + +func (p *point) add(dx, dy int) { p.X += dx; p.Y += dy } + +// zigzag maps a consecutive sequence of integers to a zig-zag sequence. +// +// [0 1 2 3 4 5 ...] => [0 -1 +1 -2 +2 ...] +func zigzag(x int) int { + if x&1 != 0 { + x = ^x + } + return x >> 1 +} diff --git a/vendor/github.com/google/go-cmp/cmp/internal/flags/flags.go b/vendor/github.com/google/go-cmp/cmp/internal/flags/flags.go new file mode 100644 index 000000000..d8e459c9b --- /dev/null +++ b/vendor/github.com/google/go-cmp/cmp/internal/flags/flags.go @@ -0,0 +1,9 @@ +// Copyright 2019, The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package flags + +// Deterministic controls whether the output of Diff should be deterministic. +// This is only used for testing. +var Deterministic bool diff --git a/vendor/github.com/google/go-cmp/cmp/internal/function/func.go b/vendor/github.com/google/go-cmp/cmp/internal/function/func.go new file mode 100644 index 000000000..def01a6be --- /dev/null +++ b/vendor/github.com/google/go-cmp/cmp/internal/function/func.go @@ -0,0 +1,106 @@ +// Copyright 2017, The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package function provides functionality for identifying function types. +package function + +import ( + "reflect" + "regexp" + "runtime" + "strings" +) + +type funcType int + +const ( + _ funcType = iota + + tbFunc // func(T) bool + ttbFunc // func(T, T) bool + ttiFunc // func(T, T) int + trbFunc // func(T, R) bool + tibFunc // func(T, I) bool + trFunc // func(T) R + + Equal = ttbFunc // func(T, T) bool + EqualAssignable = tibFunc // func(T, I) bool; encapsulates func(T, T) bool + Transformer = trFunc // func(T) R + ValueFilter = ttbFunc // func(T, T) bool + Less = ttbFunc // func(T, T) bool + Compare = ttiFunc // func(T, T) int + ValuePredicate = tbFunc // func(T) bool + KeyValuePredicate = trbFunc // func(T, R) bool +) + +var boolType = reflect.TypeOf(true) +var intType = reflect.TypeOf(0) + +// IsType reports whether the reflect.Type is of the specified function type. +func IsType(t reflect.Type, ft funcType) bool { + if t == nil || t.Kind() != reflect.Func || t.IsVariadic() { + return false + } + ni, no := t.NumIn(), t.NumOut() + switch ft { + case tbFunc: // func(T) bool + if ni == 1 && no == 1 && t.Out(0) == boolType { + return true + } + case ttbFunc: // func(T, T) bool + if ni == 2 && no == 1 && t.In(0) == t.In(1) && t.Out(0) == boolType { + return true + } + case ttiFunc: // func(T, T) int + if ni == 2 && no == 1 && t.In(0) == t.In(1) && t.Out(0) == intType { + return true + } + case trbFunc: // func(T, R) bool + if ni == 2 && no == 1 && t.Out(0) == boolType { + return true + } + case tibFunc: // func(T, I) bool + if ni == 2 && no == 1 && t.In(0).AssignableTo(t.In(1)) && t.Out(0) == boolType { + return true + } + case trFunc: // func(T) R + if ni == 1 && no == 1 { + return true + } + } + return false +} + +var lastIdentRx = regexp.MustCompile(`[_\p{L}][_\p{L}\p{N}]*$`) + +// NameOf returns the name of the function value. +func NameOf(v reflect.Value) string { + fnc := runtime.FuncForPC(v.Pointer()) + if fnc == nil { + return "" + } + fullName := fnc.Name() // e.g., "long/path/name/mypkg.(*MyType).(long/path/name/mypkg.myMethod)-fm" + + // Method closures have a "-fm" suffix. + fullName = strings.TrimSuffix(fullName, "-fm") + + var name string + for len(fullName) > 0 { + inParen := strings.HasSuffix(fullName, ")") + fullName = strings.TrimSuffix(fullName, ")") + + s := lastIdentRx.FindString(fullName) + if s == "" { + break + } + name = s + "." + name + fullName = strings.TrimSuffix(fullName, s) + + if i := strings.LastIndexByte(fullName, '('); inParen && i >= 0 { + fullName = fullName[:i] + } + fullName = strings.TrimSuffix(fullName, ".") + } + return strings.TrimSuffix(name, ".") +} diff --git a/vendor/github.com/google/go-cmp/cmp/internal/value/name.go b/vendor/github.com/google/go-cmp/cmp/internal/value/name.go new file mode 100644 index 000000000..7b498bb2c --- /dev/null +++ b/vendor/github.com/google/go-cmp/cmp/internal/value/name.go @@ -0,0 +1,164 @@ +// Copyright 2020, The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package value + +import ( + "reflect" + "strconv" +) + +var anyType = reflect.TypeOf((*interface{})(nil)).Elem() + +// TypeString is nearly identical to reflect.Type.String, +// but has an additional option to specify that full type names be used. +func TypeString(t reflect.Type, qualified bool) string { + return string(appendTypeName(nil, t, qualified, false)) +} + +func appendTypeName(b []byte, t reflect.Type, qualified, elideFunc bool) []byte { + // BUG: Go reflection provides no way to disambiguate two named types + // of the same name and within the same package, + // but declared within the namespace of different functions. + + // Use the "any" alias instead of "interface{}" for better readability. + if t == anyType { + return append(b, "any"...) + } + + // Named type. + if t.Name() != "" { + if qualified && t.PkgPath() != "" { + b = append(b, '"') + b = append(b, t.PkgPath()...) + b = append(b, '"') + b = append(b, '.') + b = append(b, t.Name()...) + } else { + b = append(b, t.String()...) + } + return b + } + + // Unnamed type. + switch k := t.Kind(); k { + case reflect.Bool, reflect.String, reflect.UnsafePointer, + reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, + reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr, + reflect.Float32, reflect.Float64, reflect.Complex64, reflect.Complex128: + b = append(b, k.String()...) + case reflect.Chan: + if t.ChanDir() == reflect.RecvDir { + b = append(b, "<-"...) + } + b = append(b, "chan"...) + if t.ChanDir() == reflect.SendDir { + b = append(b, "<-"...) + } + b = append(b, ' ') + b = appendTypeName(b, t.Elem(), qualified, false) + case reflect.Func: + if !elideFunc { + b = append(b, "func"...) + } + b = append(b, '(') + for i := 0; i < t.NumIn(); i++ { + if i > 0 { + b = append(b, ", "...) + } + if i == t.NumIn()-1 && t.IsVariadic() { + b = append(b, "..."...) + b = appendTypeName(b, t.In(i).Elem(), qualified, false) + } else { + b = appendTypeName(b, t.In(i), qualified, false) + } + } + b = append(b, ')') + switch t.NumOut() { + case 0: + // Do nothing + case 1: + b = append(b, ' ') + b = appendTypeName(b, t.Out(0), qualified, false) + default: + b = append(b, " ("...) + for i := 0; i < t.NumOut(); i++ { + if i > 0 { + b = append(b, ", "...) + } + b = appendTypeName(b, t.Out(i), qualified, false) + } + b = append(b, ')') + } + case reflect.Struct: + b = append(b, "struct{ "...) + for i := 0; i < t.NumField(); i++ { + if i > 0 { + b = append(b, "; "...) + } + sf := t.Field(i) + if !sf.Anonymous { + if qualified && sf.PkgPath != "" { + b = append(b, '"') + b = append(b, sf.PkgPath...) + b = append(b, '"') + b = append(b, '.') + } + b = append(b, sf.Name...) + b = append(b, ' ') + } + b = appendTypeName(b, sf.Type, qualified, false) + if sf.Tag != "" { + b = append(b, ' ') + b = strconv.AppendQuote(b, string(sf.Tag)) + } + } + if b[len(b)-1] == ' ' { + b = b[:len(b)-1] + } else { + b = append(b, ' ') + } + b = append(b, '}') + case reflect.Slice, reflect.Array: + b = append(b, '[') + if k == reflect.Array { + b = strconv.AppendUint(b, uint64(t.Len()), 10) + } + b = append(b, ']') + b = appendTypeName(b, t.Elem(), qualified, false) + case reflect.Map: + b = append(b, "map["...) + b = appendTypeName(b, t.Key(), qualified, false) + b = append(b, ']') + b = appendTypeName(b, t.Elem(), qualified, false) + case reflect.Ptr: + b = append(b, '*') + b = appendTypeName(b, t.Elem(), qualified, false) + case reflect.Interface: + b = append(b, "interface{ "...) + for i := 0; i < t.NumMethod(); i++ { + if i > 0 { + b = append(b, "; "...) + } + m := t.Method(i) + if qualified && m.PkgPath != "" { + b = append(b, '"') + b = append(b, m.PkgPath...) + b = append(b, '"') + b = append(b, '.') + } + b = append(b, m.Name...) + b = appendTypeName(b, m.Type, qualified, true) + } + if b[len(b)-1] == ' ' { + b = b[:len(b)-1] + } else { + b = append(b, ' ') + } + b = append(b, '}') + default: + panic("invalid kind: " + k.String()) + } + return b +} diff --git a/vendor/github.com/google/go-cmp/cmp/internal/value/pointer.go b/vendor/github.com/google/go-cmp/cmp/internal/value/pointer.go new file mode 100644 index 000000000..e5dfff69a --- /dev/null +++ b/vendor/github.com/google/go-cmp/cmp/internal/value/pointer.go @@ -0,0 +1,34 @@ +// Copyright 2018, The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package value + +import ( + "reflect" + "unsafe" +) + +// Pointer is an opaque typed pointer and is guaranteed to be comparable. +type Pointer struct { + p unsafe.Pointer + t reflect.Type +} + +// PointerOf returns a Pointer from v, which must be a +// reflect.Ptr, reflect.Slice, or reflect.Map. +func PointerOf(v reflect.Value) Pointer { + // The proper representation of a pointer is unsafe.Pointer, + // which is necessary if the GC ever uses a moving collector. + return Pointer{unsafe.Pointer(v.Pointer()), v.Type()} +} + +// IsNil reports whether the pointer is nil. +func (p Pointer) IsNil() bool { + return p.p == nil +} + +// Uintptr returns the pointer as a uintptr. +func (p Pointer) Uintptr() uintptr { + return uintptr(p.p) +} diff --git a/vendor/github.com/google/go-cmp/cmp/internal/value/sort.go b/vendor/github.com/google/go-cmp/cmp/internal/value/sort.go new file mode 100644 index 000000000..98533b036 --- /dev/null +++ b/vendor/github.com/google/go-cmp/cmp/internal/value/sort.go @@ -0,0 +1,106 @@ +// Copyright 2017, The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package value + +import ( + "fmt" + "math" + "reflect" + "sort" +) + +// SortKeys sorts a list of map keys, deduplicating keys if necessary. +// The type of each value must be comparable. +func SortKeys(vs []reflect.Value) []reflect.Value { + if len(vs) == 0 { + return vs + } + + // Sort the map keys. + sort.SliceStable(vs, func(i, j int) bool { return isLess(vs[i], vs[j]) }) + + // Deduplicate keys (fails for NaNs). + vs2 := vs[:1] + for _, v := range vs[1:] { + if isLess(vs2[len(vs2)-1], v) { + vs2 = append(vs2, v) + } + } + return vs2 +} + +// isLess is a generic function for sorting arbitrary map keys. +// The inputs must be of the same type and must be comparable. +func isLess(x, y reflect.Value) bool { + switch x.Type().Kind() { + case reflect.Bool: + return !x.Bool() && y.Bool() + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return x.Int() < y.Int() + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + return x.Uint() < y.Uint() + case reflect.Float32, reflect.Float64: + // NOTE: This does not sort -0 as less than +0 + // since Go maps treat -0 and +0 as equal keys. + fx, fy := x.Float(), y.Float() + return fx < fy || math.IsNaN(fx) && !math.IsNaN(fy) + case reflect.Complex64, reflect.Complex128: + cx, cy := x.Complex(), y.Complex() + rx, ix, ry, iy := real(cx), imag(cx), real(cy), imag(cy) + if rx == ry || (math.IsNaN(rx) && math.IsNaN(ry)) { + return ix < iy || math.IsNaN(ix) && !math.IsNaN(iy) + } + return rx < ry || math.IsNaN(rx) && !math.IsNaN(ry) + case reflect.Ptr, reflect.UnsafePointer, reflect.Chan: + return x.Pointer() < y.Pointer() + case reflect.String: + return x.String() < y.String() + case reflect.Array: + for i := 0; i < x.Len(); i++ { + if isLess(x.Index(i), y.Index(i)) { + return true + } + if isLess(y.Index(i), x.Index(i)) { + return false + } + } + return false + case reflect.Struct: + for i := 0; i < x.NumField(); i++ { + if isLess(x.Field(i), y.Field(i)) { + return true + } + if isLess(y.Field(i), x.Field(i)) { + return false + } + } + return false + case reflect.Interface: + vx, vy := x.Elem(), y.Elem() + if !vx.IsValid() || !vy.IsValid() { + return !vx.IsValid() && vy.IsValid() + } + tx, ty := vx.Type(), vy.Type() + if tx == ty { + return isLess(x.Elem(), y.Elem()) + } + if tx.Kind() != ty.Kind() { + return vx.Kind() < vy.Kind() + } + if tx.String() != ty.String() { + return tx.String() < ty.String() + } + if tx.PkgPath() != ty.PkgPath() { + return tx.PkgPath() < ty.PkgPath() + } + // This can happen in rare situations, so we fallback to just comparing + // the unique pointer for a reflect.Type. This guarantees deterministic + // ordering within a program, but it is obviously not stable. + return reflect.ValueOf(vx.Type()).Pointer() < reflect.ValueOf(vy.Type()).Pointer() + default: + // Must be Func, Map, or Slice; which are not comparable. + panic(fmt.Sprintf("%T is not comparable", x.Type())) + } +} diff --git a/vendor/github.com/google/go-cmp/cmp/options.go b/vendor/github.com/google/go-cmp/cmp/options.go new file mode 100644 index 000000000..ba3fce81f --- /dev/null +++ b/vendor/github.com/google/go-cmp/cmp/options.go @@ -0,0 +1,562 @@ +// Copyright 2017, The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package cmp + +import ( + "fmt" + "reflect" + "regexp" + "strings" + + "github.com/google/go-cmp/cmp/internal/function" +) + +// Option configures for specific behavior of [Equal] and [Diff]. In particular, +// the fundamental Option functions ([Ignore], [Transformer], and [Comparer]), +// configure how equality is determined. +// +// The fundamental options may be composed with filters ([FilterPath] and +// [FilterValues]) to control the scope over which they are applied. +// +// The [github.com/google/go-cmp/cmp/cmpopts] package provides helper functions +// for creating options that may be used with [Equal] and [Diff]. +type Option interface { + // filter applies all filters and returns the option that remains. + // Each option may only read s.curPath and call s.callTTBFunc. + // + // An Options is returned only if multiple comparers or transformers + // can apply simultaneously and will only contain values of those types + // or sub-Options containing values of those types. + filter(s *state, t reflect.Type, vx, vy reflect.Value) applicableOption +} + +// applicableOption represents the following types: +// +// Fundamental: ignore | validator | *comparer | *transformer +// Grouping: Options +type applicableOption interface { + Option + + // apply executes the option, which may mutate s or panic. + apply(s *state, vx, vy reflect.Value) +} + +// coreOption represents the following types: +// +// Fundamental: ignore | validator | *comparer | *transformer +// Filters: *pathFilter | *valuesFilter +type coreOption interface { + Option + isCore() +} + +type core struct{} + +func (core) isCore() {} + +// Options is a list of [Option] values that also satisfies the [Option] interface. +// Helper comparison packages may return an Options value when packing multiple +// [Option] values into a single [Option]. When this package processes an Options, +// it will be implicitly expanded into a flat list. +// +// Applying a filter on an Options is equivalent to applying that same filter +// on all individual options held within. +type Options []Option + +func (opts Options) filter(s *state, t reflect.Type, vx, vy reflect.Value) (out applicableOption) { + for _, opt := range opts { + switch opt := opt.filter(s, t, vx, vy); opt.(type) { + case ignore: + return ignore{} // Only ignore can short-circuit evaluation + case validator: + out = validator{} // Takes precedence over comparer or transformer + case *comparer, *transformer, Options: + switch out.(type) { + case nil: + out = opt + case validator: + // Keep validator + case *comparer, *transformer, Options: + out = Options{out, opt} // Conflicting comparers or transformers + } + } + } + return out +} + +func (opts Options) apply(s *state, _, _ reflect.Value) { + const warning = "ambiguous set of applicable options" + const help = "consider using filters to ensure at most one Comparer or Transformer may apply" + var ss []string + for _, opt := range flattenOptions(nil, opts) { + ss = append(ss, fmt.Sprint(opt)) + } + set := strings.Join(ss, "\n\t") + panic(fmt.Sprintf("%s at %#v:\n\t%s\n%s", warning, s.curPath, set, help)) +} + +func (opts Options) String() string { + var ss []string + for _, opt := range opts { + ss = append(ss, fmt.Sprint(opt)) + } + return fmt.Sprintf("Options{%s}", strings.Join(ss, ", ")) +} + +// FilterPath returns a new [Option] where opt is only evaluated if filter f +// returns true for the current [Path] in the value tree. +// +// This filter is called even if a slice element or map entry is missing and +// provides an opportunity to ignore such cases. The filter function must be +// symmetric such that the filter result is identical regardless of whether the +// missing value is from x or y. +// +// The option passed in may be an [Ignore], [Transformer], [Comparer], [Options], or +// a previously filtered [Option]. +func FilterPath(f func(Path) bool, opt Option) Option { + if f == nil { + panic("invalid path filter function") + } + if opt := normalizeOption(opt); opt != nil { + return &pathFilter{fnc: f, opt: opt} + } + return nil +} + +type pathFilter struct { + core + fnc func(Path) bool + opt Option +} + +func (f pathFilter) filter(s *state, t reflect.Type, vx, vy reflect.Value) applicableOption { + if f.fnc(s.curPath) { + return f.opt.filter(s, t, vx, vy) + } + return nil +} + +func (f pathFilter) String() string { + return fmt.Sprintf("FilterPath(%s, %v)", function.NameOf(reflect.ValueOf(f.fnc)), f.opt) +} + +// FilterValues returns a new [Option] where opt is only evaluated if filter f, +// which is a function of the form "func(T, T) bool", returns true for the +// current pair of values being compared. If either value is invalid or +// the type of the values is not assignable to T, then this filter implicitly +// returns false. +// +// The filter function must be +// symmetric (i.e., agnostic to the order of the inputs) and +// deterministic (i.e., produces the same result when given the same inputs). +// If T is an interface, it is possible that f is called with two values with +// different concrete types that both implement T. +// +// The option passed in may be an [Ignore], [Transformer], [Comparer], [Options], or +// a previously filtered [Option]. +func FilterValues(f interface{}, opt Option) Option { + v := reflect.ValueOf(f) + if !function.IsType(v.Type(), function.ValueFilter) || v.IsNil() { + panic(fmt.Sprintf("invalid values filter function: %T", f)) + } + if opt := normalizeOption(opt); opt != nil { + vf := &valuesFilter{fnc: v, opt: opt} + if ti := v.Type().In(0); ti.Kind() != reflect.Interface || ti.NumMethod() > 0 { + vf.typ = ti + } + return vf + } + return nil +} + +type valuesFilter struct { + core + typ reflect.Type // T + fnc reflect.Value // func(T, T) bool + opt Option +} + +func (f valuesFilter) filter(s *state, t reflect.Type, vx, vy reflect.Value) applicableOption { + if !vx.IsValid() || !vx.CanInterface() || !vy.IsValid() || !vy.CanInterface() { + return nil + } + if (f.typ == nil || t.AssignableTo(f.typ)) && s.callTTBFunc(f.fnc, vx, vy) { + return f.opt.filter(s, t, vx, vy) + } + return nil +} + +func (f valuesFilter) String() string { + return fmt.Sprintf("FilterValues(%s, %v)", function.NameOf(f.fnc), f.opt) +} + +// Ignore is an [Option] that causes all comparisons to be ignored. +// This value is intended to be combined with [FilterPath] or [FilterValues]. +// It is an error to pass an unfiltered Ignore option to [Equal]. +func Ignore() Option { return ignore{} } + +type ignore struct{ core } + +func (ignore) isFiltered() bool { return false } +func (ignore) filter(_ *state, _ reflect.Type, _, _ reflect.Value) applicableOption { return ignore{} } +func (ignore) apply(s *state, _, _ reflect.Value) { s.report(true, reportByIgnore) } +func (ignore) String() string { return "Ignore()" } + +// validator is a sentinel Option type to indicate that some options could not +// be evaluated due to unexported fields, missing slice elements, or +// missing map entries. Both values are validator only for unexported fields. +type validator struct{ core } + +func (validator) filter(_ *state, _ reflect.Type, vx, vy reflect.Value) applicableOption { + if !vx.IsValid() || !vy.IsValid() { + return validator{} + } + if !vx.CanInterface() || !vy.CanInterface() { + return validator{} + } + return nil +} +func (validator) apply(s *state, vx, vy reflect.Value) { + // Implies missing slice element or map entry. + if !vx.IsValid() || !vy.IsValid() { + s.report(vx.IsValid() == vy.IsValid(), 0) + return + } + + // Unable to Interface implies unexported field without visibility access. + if !vx.CanInterface() || !vy.CanInterface() { + help := "consider using a custom Comparer; if you control the implementation of type, you can also consider using an Exporter, AllowUnexported, or cmpopts.IgnoreUnexported" + var name string + if t := s.curPath.Index(-2).Type(); t.Name() != "" { + // Named type with unexported fields. + name = fmt.Sprintf("%q.%v", t.PkgPath(), t.Name()) // e.g., "path/to/package".MyType + isProtoMessage := func(t reflect.Type) bool { + m, ok := reflect.PointerTo(t).MethodByName("ProtoReflect") + return ok && m.Type.NumIn() == 1 && m.Type.NumOut() == 1 && + m.Type.Out(0).PkgPath() == "google.golang.org/protobuf/reflect/protoreflect" && + m.Type.Out(0).Name() == "Message" + } + if isProtoMessage(t) { + help = `consider using "google.golang.org/protobuf/testing/protocmp".Transform to compare proto.Message types` + } else if _, ok := reflect.New(t).Interface().(error); ok { + help = "consider using cmpopts.EquateErrors to compare error values" + } else if t.Comparable() { + help = "consider using cmpopts.EquateComparable to compare comparable Go types" + } + } else { + // Unnamed type with unexported fields. Derive PkgPath from field. + var pkgPath string + for i := 0; i < t.NumField() && pkgPath == ""; i++ { + pkgPath = t.Field(i).PkgPath + } + name = fmt.Sprintf("%q.(%v)", pkgPath, t.String()) // e.g., "path/to/package".(struct { a int }) + } + panic(fmt.Sprintf("cannot handle unexported field at %#v:\n\t%v\n%s", s.curPath, name, help)) + } + + panic("not reachable") +} + +// identRx represents a valid identifier according to the Go specification. +const identRx = `[_\p{L}][_\p{L}\p{N}]*` + +var identsRx = regexp.MustCompile(`^` + identRx + `(\.` + identRx + `)*$`) + +// Transformer returns an [Option] that applies a transformation function that +// converts values of a certain type into that of another. +// +// The transformer f must be a function "func(T) R" that converts values of +// type T to those of type R and is implicitly filtered to input values +// assignable to T. The transformer must not mutate T in any way. +// +// To help prevent some cases of infinite recursive cycles applying the +// same transform to the output of itself (e.g., in the case where the +// input and output types are the same), an implicit filter is added such that +// a transformer is applicable only if that exact transformer is not already +// in the tail of the [Path] since the last non-[Transform] step. +// For situations where the implicit filter is still insufficient, +// consider using [github.com/google/go-cmp/cmp/cmpopts.AcyclicTransformer], +// which adds a filter to prevent the transformer from +// being recursively applied upon itself. +// +// The name is a user provided label that is used as the [Transform.Name] in the +// transformation [PathStep] (and eventually shown in the [Diff] output). +// The name must be a valid identifier or qualified identifier in Go syntax. +// If empty, an arbitrary name is used. +func Transformer(name string, f interface{}) Option { + v := reflect.ValueOf(f) + if !function.IsType(v.Type(), function.Transformer) || v.IsNil() { + panic(fmt.Sprintf("invalid transformer function: %T", f)) + } + if name == "" { + name = function.NameOf(v) + if !identsRx.MatchString(name) { + name = "λ" // Lambda-symbol as placeholder name + } + } else if !identsRx.MatchString(name) { + panic(fmt.Sprintf("invalid name: %q", name)) + } + tr := &transformer{name: name, fnc: reflect.ValueOf(f)} + if ti := v.Type().In(0); ti.Kind() != reflect.Interface || ti.NumMethod() > 0 { + tr.typ = ti + } + return tr +} + +type transformer struct { + core + name string + typ reflect.Type // T + fnc reflect.Value // func(T) R +} + +func (tr *transformer) isFiltered() bool { return tr.typ != nil } + +func (tr *transformer) filter(s *state, t reflect.Type, _, _ reflect.Value) applicableOption { + for i := len(s.curPath) - 1; i >= 0; i-- { + if t, ok := s.curPath[i].(Transform); !ok { + break // Hit most recent non-Transform step + } else if tr == t.trans { + return nil // Cannot directly use same Transform + } + } + if tr.typ == nil || t.AssignableTo(tr.typ) { + return tr + } + return nil +} + +func (tr *transformer) apply(s *state, vx, vy reflect.Value) { + step := Transform{&transform{pathStep{typ: tr.fnc.Type().Out(0)}, tr}} + vvx := s.callTRFunc(tr.fnc, vx, step) + vvy := s.callTRFunc(tr.fnc, vy, step) + step.vx, step.vy = vvx, vvy + s.compareAny(step) +} + +func (tr transformer) String() string { + return fmt.Sprintf("Transformer(%s, %s)", tr.name, function.NameOf(tr.fnc)) +} + +// Comparer returns an [Option] that determines whether two values are equal +// to each other. +// +// The comparer f must be a function "func(T, T) bool" and is implicitly +// filtered to input values assignable to T. If T is an interface, it is +// possible that f is called with two values of different concrete types that +// both implement T. +// +// The equality function must be: +// - Symmetric: equal(x, y) == equal(y, x) +// - Deterministic: equal(x, y) == equal(x, y) +// - Pure: equal(x, y) does not modify x or y +func Comparer(f interface{}) Option { + v := reflect.ValueOf(f) + if !function.IsType(v.Type(), function.Equal) || v.IsNil() { + panic(fmt.Sprintf("invalid comparer function: %T", f)) + } + cm := &comparer{fnc: v} + if ti := v.Type().In(0); ti.Kind() != reflect.Interface || ti.NumMethod() > 0 { + cm.typ = ti + } + return cm +} + +type comparer struct { + core + typ reflect.Type // T + fnc reflect.Value // func(T, T) bool +} + +func (cm *comparer) isFiltered() bool { return cm.typ != nil } + +func (cm *comparer) filter(_ *state, t reflect.Type, _, _ reflect.Value) applicableOption { + if cm.typ == nil || t.AssignableTo(cm.typ) { + return cm + } + return nil +} + +func (cm *comparer) apply(s *state, vx, vy reflect.Value) { + eq := s.callTTBFunc(cm.fnc, vx, vy) + s.report(eq, reportByFunc) +} + +func (cm comparer) String() string { + return fmt.Sprintf("Comparer(%s)", function.NameOf(cm.fnc)) +} + +// Exporter returns an [Option] that specifies whether [Equal] is allowed to +// introspect into the unexported fields of certain struct types. +// +// Users of this option must understand that comparing on unexported fields +// from external packages is not safe since changes in the internal +// implementation of some external package may cause the result of [Equal] +// to unexpectedly change. However, it may be valid to use this option on types +// defined in an internal package where the semantic meaning of an unexported +// field is in the control of the user. +// +// In many cases, a custom [Comparer] should be used instead that defines +// equality as a function of the public API of a type rather than the underlying +// unexported implementation. +// +// For example, the [reflect.Type] documentation defines equality to be determined +// by the == operator on the interface (essentially performing a shallow pointer +// comparison) and most attempts to compare *[regexp.Regexp] types are interested +// in only checking that the regular expression strings are equal. +// Both of these are accomplished using [Comparer] options: +// +// Comparer(func(x, y reflect.Type) bool { return x == y }) +// Comparer(func(x, y *regexp.Regexp) bool { return x.String() == y.String() }) +// +// In other cases, the [github.com/google/go-cmp/cmp/cmpopts.IgnoreUnexported] +// option can be used to ignore all unexported fields on specified struct types. +func Exporter(f func(reflect.Type) bool) Option { + return exporter(f) +} + +type exporter func(reflect.Type) bool + +func (exporter) filter(_ *state, _ reflect.Type, _, _ reflect.Value) applicableOption { + panic("not implemented") +} + +// AllowUnexported returns an [Option] that allows [Equal] to forcibly introspect +// unexported fields of the specified struct types. +// +// See [Exporter] for the proper use of this option. +func AllowUnexported(types ...interface{}) Option { + m := make(map[reflect.Type]bool) + for _, typ := range types { + t := reflect.TypeOf(typ) + if t.Kind() != reflect.Struct { + panic(fmt.Sprintf("invalid struct type: %T", typ)) + } + m[t] = true + } + return exporter(func(t reflect.Type) bool { return m[t] }) +} + +// Result represents the comparison result for a single node and +// is provided by cmp when calling Report (see [Reporter]). +type Result struct { + _ [0]func() // Make Result incomparable + flags resultFlags +} + +// Equal reports whether the node was determined to be equal or not. +// As a special case, ignored nodes are considered equal. +func (r Result) Equal() bool { + return r.flags&(reportEqual|reportByIgnore) != 0 +} + +// ByIgnore reports whether the node is equal because it was ignored. +// This never reports true if [Result.Equal] reports false. +func (r Result) ByIgnore() bool { + return r.flags&reportByIgnore != 0 +} + +// ByMethod reports whether the Equal method determined equality. +func (r Result) ByMethod() bool { + return r.flags&reportByMethod != 0 +} + +// ByFunc reports whether a [Comparer] function determined equality. +func (r Result) ByFunc() bool { + return r.flags&reportByFunc != 0 +} + +// ByCycle reports whether a reference cycle was detected. +func (r Result) ByCycle() bool { + return r.flags&reportByCycle != 0 +} + +type resultFlags uint + +const ( + _ resultFlags = (1 << iota) / 2 + + reportEqual + reportUnequal + reportByIgnore + reportByMethod + reportByFunc + reportByCycle +) + +// Reporter is an [Option] that can be passed to [Equal]. When [Equal] traverses +// the value trees, it calls PushStep as it descends into each node in the +// tree and PopStep as it ascend out of the node. The leaves of the tree are +// either compared (determined to be equal or not equal) or ignored and reported +// as such by calling the Report method. +func Reporter(r interface { + // PushStep is called when a tree-traversal operation is performed. + // The PathStep itself is only valid until the step is popped. + // The PathStep.Values are valid for the duration of the entire traversal + // and must not be mutated. + // + // Equal always calls PushStep at the start to provide an operation-less + // PathStep used to report the root values. + // + // Within a slice, the exact set of inserted, removed, or modified elements + // is unspecified and may change in future implementations. + // The entries of a map are iterated through in an unspecified order. + PushStep(PathStep) + + // Report is called exactly once on leaf nodes to report whether the + // comparison identified the node as equal, unequal, or ignored. + // A leaf node is one that is immediately preceded by and followed by + // a pair of PushStep and PopStep calls. + Report(Result) + + // PopStep ascends back up the value tree. + // There is always a matching pop call for every push call. + PopStep() +}) Option { + return reporter{r} +} + +type reporter struct{ reporterIface } +type reporterIface interface { + PushStep(PathStep) + Report(Result) + PopStep() +} + +func (reporter) filter(_ *state, _ reflect.Type, _, _ reflect.Value) applicableOption { + panic("not implemented") +} + +// normalizeOption normalizes the input options such that all Options groups +// are flattened and groups with a single element are reduced to that element. +// Only coreOptions and Options containing coreOptions are allowed. +func normalizeOption(src Option) Option { + switch opts := flattenOptions(nil, Options{src}); len(opts) { + case 0: + return nil + case 1: + return opts[0] + default: + return opts + } +} + +// flattenOptions copies all options in src to dst as a flat list. +// Only coreOptions and Options containing coreOptions are allowed. +func flattenOptions(dst, src Options) Options { + for _, opt := range src { + switch opt := opt.(type) { + case nil: + continue + case Options: + dst = flattenOptions(dst, opt) + case coreOption: + dst = append(dst, opt) + default: + panic(fmt.Sprintf("invalid option type: %T", opt)) + } + } + return dst +} diff --git a/vendor/github.com/google/go-cmp/cmp/path.go b/vendor/github.com/google/go-cmp/cmp/path.go new file mode 100644 index 000000000..c3c145642 --- /dev/null +++ b/vendor/github.com/google/go-cmp/cmp/path.go @@ -0,0 +1,390 @@ +// Copyright 2017, The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package cmp + +import ( + "fmt" + "reflect" + "strings" + "unicode" + "unicode/utf8" + + "github.com/google/go-cmp/cmp/internal/value" +) + +// Path is a list of [PathStep] describing the sequence of operations to get +// from some root type to the current position in the value tree. +// The first Path element is always an operation-less [PathStep] that exists +// simply to identify the initial type. +// +// When traversing structs with embedded structs, the embedded struct will +// always be accessed as a field before traversing the fields of the +// embedded struct themselves. That is, an exported field from the +// embedded struct will never be accessed directly from the parent struct. +type Path []PathStep + +// PathStep is a union-type for specific operations to traverse +// a value's tree structure. Users of this package never need to implement +// these types as values of this type will be returned by this package. +// +// Implementations of this interface: +// - [StructField] +// - [SliceIndex] +// - [MapIndex] +// - [Indirect] +// - [TypeAssertion] +// - [Transform] +type PathStep interface { + String() string + + // Type is the resulting type after performing the path step. + Type() reflect.Type + + // Values is the resulting values after performing the path step. + // The type of each valid value is guaranteed to be identical to Type. + // + // In some cases, one or both may be invalid or have restrictions: + // - For StructField, both are not interface-able if the current field + // is unexported and the struct type is not explicitly permitted by + // an Exporter to traverse unexported fields. + // - For SliceIndex, one may be invalid if an element is missing from + // either the x or y slice. + // - For MapIndex, one may be invalid if an entry is missing from + // either the x or y map. + // + // The provided values must not be mutated. + Values() (vx, vy reflect.Value) +} + +var ( + _ PathStep = StructField{} + _ PathStep = SliceIndex{} + _ PathStep = MapIndex{} + _ PathStep = Indirect{} + _ PathStep = TypeAssertion{} + _ PathStep = Transform{} +) + +func (pa *Path) push(s PathStep) { + *pa = append(*pa, s) +} + +func (pa *Path) pop() { + *pa = (*pa)[:len(*pa)-1] +} + +// Last returns the last [PathStep] in the Path. +// If the path is empty, this returns a non-nil [PathStep] +// that reports a nil [PathStep.Type]. +func (pa Path) Last() PathStep { + return pa.Index(-1) +} + +// Index returns the ith step in the Path and supports negative indexing. +// A negative index starts counting from the tail of the Path such that -1 +// refers to the last step, -2 refers to the second-to-last step, and so on. +// If index is invalid, this returns a non-nil [PathStep] +// that reports a nil [PathStep.Type]. +func (pa Path) Index(i int) PathStep { + if i < 0 { + i = len(pa) + i + } + if i < 0 || i >= len(pa) { + return pathStep{} + } + return pa[i] +} + +// String returns the simplified path to a node. +// The simplified path only contains struct field accesses. +// +// For example: +// +// MyMap.MySlices.MyField +func (pa Path) String() string { + var ss []string + for _, s := range pa { + if _, ok := s.(StructField); ok { + ss = append(ss, s.String()) + } + } + return strings.TrimPrefix(strings.Join(ss, ""), ".") +} + +// GoString returns the path to a specific node using Go syntax. +// +// For example: +// +// (*root.MyMap["key"].(*mypkg.MyStruct).MySlices)[2][3].MyField +func (pa Path) GoString() string { + var ssPre, ssPost []string + var numIndirect int + for i, s := range pa { + var nextStep PathStep + if i+1 < len(pa) { + nextStep = pa[i+1] + } + switch s := s.(type) { + case Indirect: + numIndirect++ + pPre, pPost := "(", ")" + switch nextStep.(type) { + case Indirect: + continue // Next step is indirection, so let them batch up + case StructField: + numIndirect-- // Automatic indirection on struct fields + case nil: + pPre, pPost = "", "" // Last step; no need for parenthesis + } + if numIndirect > 0 { + ssPre = append(ssPre, pPre+strings.Repeat("*", numIndirect)) + ssPost = append(ssPost, pPost) + } + numIndirect = 0 + continue + case Transform: + ssPre = append(ssPre, s.trans.name+"(") + ssPost = append(ssPost, ")") + continue + } + ssPost = append(ssPost, s.String()) + } + for i, j := 0, len(ssPre)-1; i < j; i, j = i+1, j-1 { + ssPre[i], ssPre[j] = ssPre[j], ssPre[i] + } + return strings.Join(ssPre, "") + strings.Join(ssPost, "") +} + +type pathStep struct { + typ reflect.Type + vx, vy reflect.Value +} + +func (ps pathStep) Type() reflect.Type { return ps.typ } +func (ps pathStep) Values() (vx, vy reflect.Value) { return ps.vx, ps.vy } +func (ps pathStep) String() string { + if ps.typ == nil { + return "" + } + s := value.TypeString(ps.typ, false) + if s == "" || strings.ContainsAny(s, "{}\n") { + return "root" // Type too simple or complex to print + } + return fmt.Sprintf("{%s}", s) +} + +// StructField is a [PathStep] that represents a struct field access +// on a field called [StructField.Name]. +type StructField struct{ *structField } +type structField struct { + pathStep + name string + idx int + + // These fields are used for forcibly accessing an unexported field. + // pvx, pvy, and field are only valid if unexported is true. + unexported bool + mayForce bool // Forcibly allow visibility + paddr bool // Was parent addressable? + pvx, pvy reflect.Value // Parent values (always addressable) + field reflect.StructField // Field information +} + +func (sf StructField) Type() reflect.Type { return sf.typ } +func (sf StructField) Values() (vx, vy reflect.Value) { + if !sf.unexported { + return sf.vx, sf.vy // CanInterface reports true + } + + // Forcibly obtain read-write access to an unexported struct field. + if sf.mayForce { + vx = retrieveUnexportedField(sf.pvx, sf.field, sf.paddr) + vy = retrieveUnexportedField(sf.pvy, sf.field, sf.paddr) + return vx, vy // CanInterface reports true + } + return sf.vx, sf.vy // CanInterface reports false +} +func (sf StructField) String() string { return fmt.Sprintf(".%s", sf.name) } + +// Name is the field name. +func (sf StructField) Name() string { return sf.name } + +// Index is the index of the field in the parent struct type. +// See [reflect.Type.Field]. +func (sf StructField) Index() int { return sf.idx } + +// SliceIndex is a [PathStep] that represents an index operation on +// a slice or array at some index [SliceIndex.Key]. +type SliceIndex struct{ *sliceIndex } +type sliceIndex struct { + pathStep + xkey, ykey int + isSlice bool // False for reflect.Array +} + +func (si SliceIndex) Type() reflect.Type { return si.typ } +func (si SliceIndex) Values() (vx, vy reflect.Value) { return si.vx, si.vy } +func (si SliceIndex) String() string { + switch { + case si.xkey == si.ykey: + return fmt.Sprintf("[%d]", si.xkey) + case si.ykey == -1: + // [5->?] means "I don't know where X[5] went" + return fmt.Sprintf("[%d->?]", si.xkey) + case si.xkey == -1: + // [?->3] means "I don't know where Y[3] came from" + return fmt.Sprintf("[?->%d]", si.ykey) + default: + // [5->3] means "X[5] moved to Y[3]" + return fmt.Sprintf("[%d->%d]", si.xkey, si.ykey) + } +} + +// Key is the index key; it may return -1 if in a split state +func (si SliceIndex) Key() int { + if si.xkey != si.ykey { + return -1 + } + return si.xkey +} + +// SplitKeys are the indexes for indexing into slices in the +// x and y values, respectively. These indexes may differ due to the +// insertion or removal of an element in one of the slices, causing +// all of the indexes to be shifted. If an index is -1, then that +// indicates that the element does not exist in the associated slice. +// +// [SliceIndex.Key] is guaranteed to return -1 if and only if the indexes +// returned by SplitKeys are not the same. SplitKeys will never return -1 for +// both indexes. +func (si SliceIndex) SplitKeys() (ix, iy int) { return si.xkey, si.ykey } + +// MapIndex is a [PathStep] that represents an index operation on a map at some index Key. +type MapIndex struct{ *mapIndex } +type mapIndex struct { + pathStep + key reflect.Value +} + +func (mi MapIndex) Type() reflect.Type { return mi.typ } +func (mi MapIndex) Values() (vx, vy reflect.Value) { return mi.vx, mi.vy } +func (mi MapIndex) String() string { return fmt.Sprintf("[%#v]", mi.key) } + +// Key is the value of the map key. +func (mi MapIndex) Key() reflect.Value { return mi.key } + +// Indirect is a [PathStep] that represents pointer indirection on the parent type. +type Indirect struct{ *indirect } +type indirect struct { + pathStep +} + +func (in Indirect) Type() reflect.Type { return in.typ } +func (in Indirect) Values() (vx, vy reflect.Value) { return in.vx, in.vy } +func (in Indirect) String() string { return "*" } + +// TypeAssertion is a [PathStep] that represents a type assertion on an interface. +type TypeAssertion struct{ *typeAssertion } +type typeAssertion struct { + pathStep +} + +func (ta TypeAssertion) Type() reflect.Type { return ta.typ } +func (ta TypeAssertion) Values() (vx, vy reflect.Value) { return ta.vx, ta.vy } +func (ta TypeAssertion) String() string { return fmt.Sprintf(".(%v)", value.TypeString(ta.typ, false)) } + +// Transform is a [PathStep] that represents a transformation +// from the parent type to the current type. +type Transform struct{ *transform } +type transform struct { + pathStep + trans *transformer +} + +func (tf Transform) Type() reflect.Type { return tf.typ } +func (tf Transform) Values() (vx, vy reflect.Value) { return tf.vx, tf.vy } +func (tf Transform) String() string { return fmt.Sprintf("%s()", tf.trans.name) } + +// Name is the name of the [Transformer]. +func (tf Transform) Name() string { return tf.trans.name } + +// Func is the function pointer to the transformer function. +func (tf Transform) Func() reflect.Value { return tf.trans.fnc } + +// Option returns the originally constructed [Transformer] option. +// The == operator can be used to detect the exact option used. +func (tf Transform) Option() Option { return tf.trans } + +// pointerPath represents a dual-stack of pointers encountered when +// recursively traversing the x and y values. This data structure supports +// detection of cycles and determining whether the cycles are equal. +// In Go, cycles can occur via pointers, slices, and maps. +// +// The pointerPath uses a map to represent a stack; where descension into a +// pointer pushes the address onto the stack, and ascension from a pointer +// pops the address from the stack. Thus, when traversing into a pointer from +// reflect.Ptr, reflect.Slice element, or reflect.Map, we can detect cycles +// by checking whether the pointer has already been visited. The cycle detection +// uses a separate stack for the x and y values. +// +// If a cycle is detected we need to determine whether the two pointers +// should be considered equal. The definition of equality chosen by Equal +// requires two graphs to have the same structure. To determine this, both the +// x and y values must have a cycle where the previous pointers were also +// encountered together as a pair. +// +// Semantically, this is equivalent to augmenting Indirect, SliceIndex, and +// MapIndex with pointer information for the x and y values. +// Suppose px and py are two pointers to compare, we then search the +// Path for whether px was ever encountered in the Path history of x, and +// similarly so with py. If either side has a cycle, the comparison is only +// equal if both px and py have a cycle resulting from the same PathStep. +// +// Using a map as a stack is more performant as we can perform cycle detection +// in O(1) instead of O(N) where N is len(Path). +type pointerPath struct { + // mx is keyed by x pointers, where the value is the associated y pointer. + mx map[value.Pointer]value.Pointer + // my is keyed by y pointers, where the value is the associated x pointer. + my map[value.Pointer]value.Pointer +} + +func (p *pointerPath) Init() { + p.mx = make(map[value.Pointer]value.Pointer) + p.my = make(map[value.Pointer]value.Pointer) +} + +// Push indicates intent to descend into pointers vx and vy where +// visited reports whether either has been seen before. If visited before, +// equal reports whether both pointers were encountered together. +// Pop must be called if and only if the pointers were never visited. +// +// The pointers vx and vy must be a reflect.Ptr, reflect.Slice, or reflect.Map +// and be non-nil. +func (p pointerPath) Push(vx, vy reflect.Value) (equal, visited bool) { + px := value.PointerOf(vx) + py := value.PointerOf(vy) + _, ok1 := p.mx[px] + _, ok2 := p.my[py] + if ok1 || ok2 { + equal = p.mx[px] == py && p.my[py] == px // Pointers paired together + return equal, true + } + p.mx[px] = py + p.my[py] = px + return false, false +} + +// Pop ascends from pointers vx and vy. +func (p pointerPath) Pop(vx, vy reflect.Value) { + delete(p.mx, value.PointerOf(vx)) + delete(p.my, value.PointerOf(vy)) +} + +// isExported reports whether the identifier is exported. +func isExported(id string) bool { + r, _ := utf8.DecodeRuneInString(id) + return unicode.IsUpper(r) +} diff --git a/vendor/github.com/google/go-cmp/cmp/report.go b/vendor/github.com/google/go-cmp/cmp/report.go new file mode 100644 index 000000000..f43cd12eb --- /dev/null +++ b/vendor/github.com/google/go-cmp/cmp/report.go @@ -0,0 +1,54 @@ +// Copyright 2017, The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package cmp + +// defaultReporter implements the reporter interface. +// +// As Equal serially calls the PushStep, Report, and PopStep methods, the +// defaultReporter constructs a tree-based representation of the compared value +// and the result of each comparison (see valueNode). +// +// When the String method is called, the FormatDiff method transforms the +// valueNode tree into a textNode tree, which is a tree-based representation +// of the textual output (see textNode). +// +// Lastly, the textNode.String method produces the final report as a string. +type defaultReporter struct { + root *valueNode + curr *valueNode +} + +func (r *defaultReporter) PushStep(ps PathStep) { + r.curr = r.curr.PushStep(ps) + if r.root == nil { + r.root = r.curr + } +} +func (r *defaultReporter) Report(rs Result) { + r.curr.Report(rs) +} +func (r *defaultReporter) PopStep() { + r.curr = r.curr.PopStep() +} + +// String provides a full report of the differences detected as a structured +// literal in pseudo-Go syntax. String may only be called after the entire tree +// has been traversed. +func (r *defaultReporter) String() string { + assert(r.root != nil && r.curr == nil) + if r.root.NumDiff == 0 { + return "" + } + ptrs := new(pointerReferences) + text := formatOptions{}.FormatDiff(r.root, ptrs) + resolveReferences(text) + return text.String() +} + +func assert(ok bool) { + if !ok { + panic("assertion failure") + } +} diff --git a/vendor/github.com/google/go-cmp/cmp/report_compare.go b/vendor/github.com/google/go-cmp/cmp/report_compare.go new file mode 100644 index 000000000..2050bf6b4 --- /dev/null +++ b/vendor/github.com/google/go-cmp/cmp/report_compare.go @@ -0,0 +1,433 @@ +// Copyright 2019, The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package cmp + +import ( + "fmt" + "reflect" +) + +// numContextRecords is the number of surrounding equal records to print. +const numContextRecords = 2 + +type diffMode byte + +const ( + diffUnknown diffMode = 0 + diffIdentical diffMode = ' ' + diffRemoved diffMode = '-' + diffInserted diffMode = '+' +) + +type typeMode int + +const ( + // emitType always prints the type. + emitType typeMode = iota + // elideType never prints the type. + elideType + // autoType prints the type only for composite kinds + // (i.e., structs, slices, arrays, and maps). + autoType +) + +type formatOptions struct { + // DiffMode controls the output mode of FormatDiff. + // + // If diffUnknown, then produce a diff of the x and y values. + // If diffIdentical, then emit values as if they were equal. + // If diffRemoved, then only emit x values (ignoring y values). + // If diffInserted, then only emit y values (ignoring x values). + DiffMode diffMode + + // TypeMode controls whether to print the type for the current node. + // + // As a general rule of thumb, we always print the type of the next node + // after an interface, and always elide the type of the next node after + // a slice or map node. + TypeMode typeMode + + // formatValueOptions are options specific to printing reflect.Values. + formatValueOptions +} + +func (opts formatOptions) WithDiffMode(d diffMode) formatOptions { + opts.DiffMode = d + return opts +} +func (opts formatOptions) WithTypeMode(t typeMode) formatOptions { + opts.TypeMode = t + return opts +} +func (opts formatOptions) WithVerbosity(level int) formatOptions { + opts.VerbosityLevel = level + opts.LimitVerbosity = true + return opts +} +func (opts formatOptions) verbosity() uint { + switch { + case opts.VerbosityLevel < 0: + return 0 + case opts.VerbosityLevel > 16: + return 16 // some reasonable maximum to avoid shift overflow + default: + return uint(opts.VerbosityLevel) + } +} + +const maxVerbosityPreset = 6 + +// verbosityPreset modifies the verbosity settings given an index +// between 0 and maxVerbosityPreset, inclusive. +func verbosityPreset(opts formatOptions, i int) formatOptions { + opts.VerbosityLevel = int(opts.verbosity()) + 2*i + if i > 0 { + opts.AvoidStringer = true + } + if i >= maxVerbosityPreset { + opts.PrintAddresses = true + opts.QualifiedNames = true + } + return opts +} + +// FormatDiff converts a valueNode tree into a textNode tree, where the later +// is a textual representation of the differences detected in the former. +func (opts formatOptions) FormatDiff(v *valueNode, ptrs *pointerReferences) (out textNode) { + if opts.DiffMode == diffIdentical { + opts = opts.WithVerbosity(1) + } else if opts.verbosity() < 3 { + opts = opts.WithVerbosity(3) + } + + // Check whether we have specialized formatting for this node. + // This is not necessary, but helpful for producing more readable outputs. + if opts.CanFormatDiffSlice(v) { + return opts.FormatDiffSlice(v) + } + + var parentKind reflect.Kind + if v.parent != nil && v.parent.TransformerName == "" { + parentKind = v.parent.Type.Kind() + } + + // For leaf nodes, format the value based on the reflect.Values alone. + // As a special case, treat equal []byte as a leaf nodes. + isBytes := v.Type.Kind() == reflect.Slice && v.Type.Elem() == byteType + isEqualBytes := isBytes && v.NumDiff+v.NumIgnored+v.NumTransformed == 0 + if v.MaxDepth == 0 || isEqualBytes { + switch opts.DiffMode { + case diffUnknown, diffIdentical: + // Format Equal. + if v.NumDiff == 0 { + outx := opts.FormatValue(v.ValueX, parentKind, ptrs) + outy := opts.FormatValue(v.ValueY, parentKind, ptrs) + if v.NumIgnored > 0 && v.NumSame == 0 { + return textEllipsis + } else if outx.Len() < outy.Len() { + return outx + } else { + return outy + } + } + + // Format unequal. + assert(opts.DiffMode == diffUnknown) + var list textList + outx := opts.WithTypeMode(elideType).FormatValue(v.ValueX, parentKind, ptrs) + outy := opts.WithTypeMode(elideType).FormatValue(v.ValueY, parentKind, ptrs) + for i := 0; i <= maxVerbosityPreset && outx != nil && outy != nil && outx.Equal(outy); i++ { + opts2 := verbosityPreset(opts, i).WithTypeMode(elideType) + outx = opts2.FormatValue(v.ValueX, parentKind, ptrs) + outy = opts2.FormatValue(v.ValueY, parentKind, ptrs) + } + if outx != nil { + list = append(list, textRecord{Diff: '-', Value: outx}) + } + if outy != nil { + list = append(list, textRecord{Diff: '+', Value: outy}) + } + return opts.WithTypeMode(emitType).FormatType(v.Type, list) + case diffRemoved: + return opts.FormatValue(v.ValueX, parentKind, ptrs) + case diffInserted: + return opts.FormatValue(v.ValueY, parentKind, ptrs) + default: + panic("invalid diff mode") + } + } + + // Register slice element to support cycle detection. + if parentKind == reflect.Slice { + ptrRefs := ptrs.PushPair(v.ValueX, v.ValueY, opts.DiffMode, true) + defer ptrs.Pop() + defer func() { out = wrapTrunkReferences(ptrRefs, out) }() + } + + // Descend into the child value node. + if v.TransformerName != "" { + out := opts.WithTypeMode(emitType).FormatDiff(v.Value, ptrs) + out = &textWrap{Prefix: "Inverse(" + v.TransformerName + ", ", Value: out, Suffix: ")"} + return opts.FormatType(v.Type, out) + } else { + switch k := v.Type.Kind(); k { + case reflect.Struct, reflect.Array, reflect.Slice: + out = opts.formatDiffList(v.Records, k, ptrs) + out = opts.FormatType(v.Type, out) + case reflect.Map: + // Register map to support cycle detection. + ptrRefs := ptrs.PushPair(v.ValueX, v.ValueY, opts.DiffMode, false) + defer ptrs.Pop() + + out = opts.formatDiffList(v.Records, k, ptrs) + out = wrapTrunkReferences(ptrRefs, out) + out = opts.FormatType(v.Type, out) + case reflect.Ptr: + // Register pointer to support cycle detection. + ptrRefs := ptrs.PushPair(v.ValueX, v.ValueY, opts.DiffMode, false) + defer ptrs.Pop() + + out = opts.FormatDiff(v.Value, ptrs) + out = wrapTrunkReferences(ptrRefs, out) + out = &textWrap{Prefix: "&", Value: out} + case reflect.Interface: + out = opts.WithTypeMode(emitType).FormatDiff(v.Value, ptrs) + default: + panic(fmt.Sprintf("%v cannot have children", k)) + } + return out + } +} + +func (opts formatOptions) formatDiffList(recs []reportRecord, k reflect.Kind, ptrs *pointerReferences) textNode { + // Derive record name based on the data structure kind. + var name string + var formatKey func(reflect.Value) string + switch k { + case reflect.Struct: + name = "field" + opts = opts.WithTypeMode(autoType) + formatKey = func(v reflect.Value) string { return v.String() } + case reflect.Slice, reflect.Array: + name = "element" + opts = opts.WithTypeMode(elideType) + formatKey = func(reflect.Value) string { return "" } + case reflect.Map: + name = "entry" + opts = opts.WithTypeMode(elideType) + formatKey = func(v reflect.Value) string { return formatMapKey(v, false, ptrs) } + } + + maxLen := -1 + if opts.LimitVerbosity { + if opts.DiffMode == diffIdentical { + maxLen = ((1 << opts.verbosity()) >> 1) << 2 // 0, 4, 8, 16, 32, etc... + } else { + maxLen = (1 << opts.verbosity()) << 1 // 2, 4, 8, 16, 32, 64, etc... + } + opts.VerbosityLevel-- + } + + // Handle unification. + switch opts.DiffMode { + case diffIdentical, diffRemoved, diffInserted: + var list textList + var deferredEllipsis bool // Add final "..." to indicate records were dropped + for _, r := range recs { + if len(list) == maxLen { + deferredEllipsis = true + break + } + + // Elide struct fields that are zero value. + if k == reflect.Struct { + var isZero bool + switch opts.DiffMode { + case diffIdentical: + isZero = r.Value.ValueX.IsZero() || r.Value.ValueY.IsZero() + case diffRemoved: + isZero = r.Value.ValueX.IsZero() + case diffInserted: + isZero = r.Value.ValueY.IsZero() + } + if isZero { + continue + } + } + // Elide ignored nodes. + if r.Value.NumIgnored > 0 && r.Value.NumSame+r.Value.NumDiff == 0 { + deferredEllipsis = !(k == reflect.Slice || k == reflect.Array) + if !deferredEllipsis { + list.AppendEllipsis(diffStats{}) + } + continue + } + if out := opts.FormatDiff(r.Value, ptrs); out != nil { + list = append(list, textRecord{Key: formatKey(r.Key), Value: out}) + } + } + if deferredEllipsis { + list.AppendEllipsis(diffStats{}) + } + return &textWrap{Prefix: "{", Value: list, Suffix: "}"} + case diffUnknown: + default: + panic("invalid diff mode") + } + + // Handle differencing. + var numDiffs int + var list textList + var keys []reflect.Value // invariant: len(list) == len(keys) + groups := coalesceAdjacentRecords(name, recs) + maxGroup := diffStats{Name: name} + for i, ds := range groups { + if maxLen >= 0 && numDiffs >= maxLen { + maxGroup = maxGroup.Append(ds) + continue + } + + // Handle equal records. + if ds.NumDiff() == 0 { + // Compute the number of leading and trailing records to print. + var numLo, numHi int + numEqual := ds.NumIgnored + ds.NumIdentical + for numLo < numContextRecords && numLo+numHi < numEqual && i != 0 { + if r := recs[numLo].Value; r.NumIgnored > 0 && r.NumSame+r.NumDiff == 0 { + break + } + numLo++ + } + for numHi < numContextRecords && numLo+numHi < numEqual && i != len(groups)-1 { + if r := recs[numEqual-numHi-1].Value; r.NumIgnored > 0 && r.NumSame+r.NumDiff == 0 { + break + } + numHi++ + } + if numEqual-(numLo+numHi) == 1 && ds.NumIgnored == 0 { + numHi++ // Avoid pointless coalescing of a single equal record + } + + // Format the equal values. + for _, r := range recs[:numLo] { + out := opts.WithDiffMode(diffIdentical).FormatDiff(r.Value, ptrs) + list = append(list, textRecord{Key: formatKey(r.Key), Value: out}) + keys = append(keys, r.Key) + } + if numEqual > numLo+numHi { + ds.NumIdentical -= numLo + numHi + list.AppendEllipsis(ds) + for len(keys) < len(list) { + keys = append(keys, reflect.Value{}) + } + } + for _, r := range recs[numEqual-numHi : numEqual] { + out := opts.WithDiffMode(diffIdentical).FormatDiff(r.Value, ptrs) + list = append(list, textRecord{Key: formatKey(r.Key), Value: out}) + keys = append(keys, r.Key) + } + recs = recs[numEqual:] + continue + } + + // Handle unequal records. + for _, r := range recs[:ds.NumDiff()] { + switch { + case opts.CanFormatDiffSlice(r.Value): + out := opts.FormatDiffSlice(r.Value) + list = append(list, textRecord{Key: formatKey(r.Key), Value: out}) + keys = append(keys, r.Key) + case r.Value.NumChildren == r.Value.MaxDepth: + outx := opts.WithDiffMode(diffRemoved).FormatDiff(r.Value, ptrs) + outy := opts.WithDiffMode(diffInserted).FormatDiff(r.Value, ptrs) + for i := 0; i <= maxVerbosityPreset && outx != nil && outy != nil && outx.Equal(outy); i++ { + opts2 := verbosityPreset(opts, i) + outx = opts2.WithDiffMode(diffRemoved).FormatDiff(r.Value, ptrs) + outy = opts2.WithDiffMode(diffInserted).FormatDiff(r.Value, ptrs) + } + if outx != nil { + list = append(list, textRecord{Diff: diffRemoved, Key: formatKey(r.Key), Value: outx}) + keys = append(keys, r.Key) + } + if outy != nil { + list = append(list, textRecord{Diff: diffInserted, Key: formatKey(r.Key), Value: outy}) + keys = append(keys, r.Key) + } + default: + out := opts.FormatDiff(r.Value, ptrs) + list = append(list, textRecord{Key: formatKey(r.Key), Value: out}) + keys = append(keys, r.Key) + } + } + recs = recs[ds.NumDiff():] + numDiffs += ds.NumDiff() + } + if maxGroup.IsZero() { + assert(len(recs) == 0) + } else { + list.AppendEllipsis(maxGroup) + for len(keys) < len(list) { + keys = append(keys, reflect.Value{}) + } + } + assert(len(list) == len(keys)) + + // For maps, the default formatting logic uses fmt.Stringer which may + // produce ambiguous output. Avoid calling String to disambiguate. + if k == reflect.Map { + var ambiguous bool + seenKeys := map[string]reflect.Value{} + for i, currKey := range keys { + if currKey.IsValid() { + strKey := list[i].Key + prevKey, seen := seenKeys[strKey] + if seen && prevKey.CanInterface() && currKey.CanInterface() { + ambiguous = prevKey.Interface() != currKey.Interface() + if ambiguous { + break + } + } + seenKeys[strKey] = currKey + } + } + if ambiguous { + for i, k := range keys { + if k.IsValid() { + list[i].Key = formatMapKey(k, true, ptrs) + } + } + } + } + + return &textWrap{Prefix: "{", Value: list, Suffix: "}"} +} + +// coalesceAdjacentRecords coalesces the list of records into groups of +// adjacent equal, or unequal counts. +func coalesceAdjacentRecords(name string, recs []reportRecord) (groups []diffStats) { + var prevCase int // Arbitrary index into which case last occurred + lastStats := func(i int) *diffStats { + if prevCase != i { + groups = append(groups, diffStats{Name: name}) + prevCase = i + } + return &groups[len(groups)-1] + } + for _, r := range recs { + switch rv := r.Value; { + case rv.NumIgnored > 0 && rv.NumSame+rv.NumDiff == 0: + lastStats(1).NumIgnored++ + case rv.NumDiff == 0: + lastStats(1).NumIdentical++ + case rv.NumDiff > 0 && !rv.ValueY.IsValid(): + lastStats(2).NumRemoved++ + case rv.NumDiff > 0 && !rv.ValueX.IsValid(): + lastStats(2).NumInserted++ + default: + lastStats(2).NumModified++ + } + } + return groups +} diff --git a/vendor/github.com/google/go-cmp/cmp/report_references.go b/vendor/github.com/google/go-cmp/cmp/report_references.go new file mode 100644 index 000000000..be31b33a9 --- /dev/null +++ b/vendor/github.com/google/go-cmp/cmp/report_references.go @@ -0,0 +1,264 @@ +// Copyright 2020, The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package cmp + +import ( + "fmt" + "reflect" + "strings" + + "github.com/google/go-cmp/cmp/internal/flags" + "github.com/google/go-cmp/cmp/internal/value" +) + +const ( + pointerDelimPrefix = "⟪" + pointerDelimSuffix = "⟫" +) + +// formatPointer prints the address of the pointer. +func formatPointer(p value.Pointer, withDelims bool) string { + v := p.Uintptr() + if flags.Deterministic { + v = 0xdeadf00f // Only used for stable testing purposes + } + if withDelims { + return pointerDelimPrefix + formatHex(uint64(v)) + pointerDelimSuffix + } + return formatHex(uint64(v)) +} + +// pointerReferences is a stack of pointers visited so far. +type pointerReferences [][2]value.Pointer + +func (ps *pointerReferences) PushPair(vx, vy reflect.Value, d diffMode, deref bool) (pp [2]value.Pointer) { + if deref && vx.IsValid() { + vx = vx.Addr() + } + if deref && vy.IsValid() { + vy = vy.Addr() + } + switch d { + case diffUnknown, diffIdentical: + pp = [2]value.Pointer{value.PointerOf(vx), value.PointerOf(vy)} + case diffRemoved: + pp = [2]value.Pointer{value.PointerOf(vx), value.Pointer{}} + case diffInserted: + pp = [2]value.Pointer{value.Pointer{}, value.PointerOf(vy)} + } + *ps = append(*ps, pp) + return pp +} + +func (ps *pointerReferences) Push(v reflect.Value) (p value.Pointer, seen bool) { + p = value.PointerOf(v) + for _, pp := range *ps { + if p == pp[0] || p == pp[1] { + return p, true + } + } + *ps = append(*ps, [2]value.Pointer{p, p}) + return p, false +} + +func (ps *pointerReferences) Pop() { + *ps = (*ps)[:len(*ps)-1] +} + +// trunkReferences is metadata for a textNode indicating that the sub-tree +// represents the value for either pointer in a pair of references. +type trunkReferences struct{ pp [2]value.Pointer } + +// trunkReference is metadata for a textNode indicating that the sub-tree +// represents the value for the given pointer reference. +type trunkReference struct{ p value.Pointer } + +// leafReference is metadata for a textNode indicating that the value is +// truncated as it refers to another part of the tree (i.e., a trunk). +type leafReference struct{ p value.Pointer } + +func wrapTrunkReferences(pp [2]value.Pointer, s textNode) textNode { + switch { + case pp[0].IsNil(): + return &textWrap{Value: s, Metadata: trunkReference{pp[1]}} + case pp[1].IsNil(): + return &textWrap{Value: s, Metadata: trunkReference{pp[0]}} + case pp[0] == pp[1]: + return &textWrap{Value: s, Metadata: trunkReference{pp[0]}} + default: + return &textWrap{Value: s, Metadata: trunkReferences{pp}} + } +} +func wrapTrunkReference(p value.Pointer, printAddress bool, s textNode) textNode { + var prefix string + if printAddress { + prefix = formatPointer(p, true) + } + return &textWrap{Prefix: prefix, Value: s, Metadata: trunkReference{p}} +} +func makeLeafReference(p value.Pointer, printAddress bool) textNode { + out := &textWrap{Prefix: "(", Value: textEllipsis, Suffix: ")"} + var prefix string + if printAddress { + prefix = formatPointer(p, true) + } + return &textWrap{Prefix: prefix, Value: out, Metadata: leafReference{p}} +} + +// resolveReferences walks the textNode tree searching for any leaf reference +// metadata and resolves each against the corresponding trunk references. +// Since pointer addresses in memory are not particularly readable to the user, +// it replaces each pointer value with an arbitrary and unique reference ID. +func resolveReferences(s textNode) { + var walkNodes func(textNode, func(textNode)) + walkNodes = func(s textNode, f func(textNode)) { + f(s) + switch s := s.(type) { + case *textWrap: + walkNodes(s.Value, f) + case textList: + for _, r := range s { + walkNodes(r.Value, f) + } + } + } + + // Collect all trunks and leaves with reference metadata. + var trunks, leaves []*textWrap + walkNodes(s, func(s textNode) { + if s, ok := s.(*textWrap); ok { + switch s.Metadata.(type) { + case leafReference: + leaves = append(leaves, s) + case trunkReference, trunkReferences: + trunks = append(trunks, s) + } + } + }) + + // No leaf references to resolve. + if len(leaves) == 0 { + return + } + + // Collect the set of all leaf references to resolve. + leafPtrs := make(map[value.Pointer]bool) + for _, leaf := range leaves { + leafPtrs[leaf.Metadata.(leafReference).p] = true + } + + // Collect the set of trunk pointers that are always paired together. + // This allows us to assign a single ID to both pointers for brevity. + // If a pointer in a pair ever occurs by itself or as a different pair, + // then the pair is broken. + pairedTrunkPtrs := make(map[value.Pointer]value.Pointer) + unpair := func(p value.Pointer) { + if !pairedTrunkPtrs[p].IsNil() { + pairedTrunkPtrs[pairedTrunkPtrs[p]] = value.Pointer{} // invalidate other half + } + pairedTrunkPtrs[p] = value.Pointer{} // invalidate this half + } + for _, trunk := range trunks { + switch p := trunk.Metadata.(type) { + case trunkReference: + unpair(p.p) // standalone pointer cannot be part of a pair + case trunkReferences: + p0, ok0 := pairedTrunkPtrs[p.pp[0]] + p1, ok1 := pairedTrunkPtrs[p.pp[1]] + switch { + case !ok0 && !ok1: + // Register the newly seen pair. + pairedTrunkPtrs[p.pp[0]] = p.pp[1] + pairedTrunkPtrs[p.pp[1]] = p.pp[0] + case ok0 && ok1 && p0 == p.pp[1] && p1 == p.pp[0]: + // Exact pair already seen; do nothing. + default: + // Pair conflicts with some other pair; break all pairs. + unpair(p.pp[0]) + unpair(p.pp[1]) + } + } + } + + // Correlate each pointer referenced by leaves to a unique identifier, + // and print the IDs for each trunk that matches those pointers. + var nextID uint + ptrIDs := make(map[value.Pointer]uint) + newID := func() uint { + id := nextID + nextID++ + return id + } + for _, trunk := range trunks { + switch p := trunk.Metadata.(type) { + case trunkReference: + if print := leafPtrs[p.p]; print { + id, ok := ptrIDs[p.p] + if !ok { + id = newID() + ptrIDs[p.p] = id + } + trunk.Prefix = updateReferencePrefix(trunk.Prefix, formatReference(id)) + } + case trunkReferences: + print0 := leafPtrs[p.pp[0]] + print1 := leafPtrs[p.pp[1]] + if print0 || print1 { + id0, ok0 := ptrIDs[p.pp[0]] + id1, ok1 := ptrIDs[p.pp[1]] + isPair := pairedTrunkPtrs[p.pp[0]] == p.pp[1] && pairedTrunkPtrs[p.pp[1]] == p.pp[0] + if isPair { + var id uint + assert(ok0 == ok1) // must be seen together or not at all + if ok0 { + assert(id0 == id1) // must have the same ID + id = id0 + } else { + id = newID() + ptrIDs[p.pp[0]] = id + ptrIDs[p.pp[1]] = id + } + trunk.Prefix = updateReferencePrefix(trunk.Prefix, formatReference(id)) + } else { + if print0 && !ok0 { + id0 = newID() + ptrIDs[p.pp[0]] = id0 + } + if print1 && !ok1 { + id1 = newID() + ptrIDs[p.pp[1]] = id1 + } + switch { + case print0 && print1: + trunk.Prefix = updateReferencePrefix(trunk.Prefix, formatReference(id0)+","+formatReference(id1)) + case print0: + trunk.Prefix = updateReferencePrefix(trunk.Prefix, formatReference(id0)) + case print1: + trunk.Prefix = updateReferencePrefix(trunk.Prefix, formatReference(id1)) + } + } + } + } + } + + // Update all leaf references with the unique identifier. + for _, leaf := range leaves { + if id, ok := ptrIDs[leaf.Metadata.(leafReference).p]; ok { + leaf.Prefix = updateReferencePrefix(leaf.Prefix, formatReference(id)) + } + } +} + +func formatReference(id uint) string { + return fmt.Sprintf("ref#%d", id) +} + +func updateReferencePrefix(prefix, ref string) string { + if prefix == "" { + return pointerDelimPrefix + ref + pointerDelimSuffix + } + suffix := strings.TrimPrefix(prefix, pointerDelimPrefix) + return pointerDelimPrefix + ref + ": " + suffix +} diff --git a/vendor/github.com/google/go-cmp/cmp/report_reflect.go b/vendor/github.com/google/go-cmp/cmp/report_reflect.go new file mode 100644 index 000000000..e39f42284 --- /dev/null +++ b/vendor/github.com/google/go-cmp/cmp/report_reflect.go @@ -0,0 +1,414 @@ +// Copyright 2019, The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package cmp + +import ( + "bytes" + "fmt" + "reflect" + "strconv" + "strings" + "unicode" + "unicode/utf8" + + "github.com/google/go-cmp/cmp/internal/value" +) + +var ( + anyType = reflect.TypeOf((*interface{})(nil)).Elem() + stringType = reflect.TypeOf((*string)(nil)).Elem() + bytesType = reflect.TypeOf((*[]byte)(nil)).Elem() + byteType = reflect.TypeOf((*byte)(nil)).Elem() +) + +type formatValueOptions struct { + // AvoidStringer controls whether to avoid calling custom stringer + // methods like error.Error or fmt.Stringer.String. + AvoidStringer bool + + // PrintAddresses controls whether to print the address of all pointers, + // slice elements, and maps. + PrintAddresses bool + + // QualifiedNames controls whether FormatType uses the fully qualified name + // (including the full package path as opposed to just the package name). + QualifiedNames bool + + // VerbosityLevel controls the amount of output to produce. + // A higher value produces more output. A value of zero or lower produces + // no output (represented using an ellipsis). + // If LimitVerbosity is false, then the level is treated as infinite. + VerbosityLevel int + + // LimitVerbosity specifies that formatting should respect VerbosityLevel. + LimitVerbosity bool +} + +// FormatType prints the type as if it were wrapping s. +// This may return s as-is depending on the current type and TypeMode mode. +func (opts formatOptions) FormatType(t reflect.Type, s textNode) textNode { + // Check whether to emit the type or not. + switch opts.TypeMode { + case autoType: + switch t.Kind() { + case reflect.Struct, reflect.Slice, reflect.Array, reflect.Map: + if s.Equal(textNil) { + return s + } + default: + return s + } + if opts.DiffMode == diffIdentical { + return s // elide type for identical nodes + } + case elideType: + return s + } + + // Determine the type label, applying special handling for unnamed types. + typeName := value.TypeString(t, opts.QualifiedNames) + if t.Name() == "" { + // According to Go grammar, certain type literals contain symbols that + // do not strongly bind to the next lexicographical token (e.g., *T). + switch t.Kind() { + case reflect.Chan, reflect.Func, reflect.Ptr: + typeName = "(" + typeName + ")" + } + } + return &textWrap{Prefix: typeName, Value: wrapParens(s)} +} + +// wrapParens wraps s with a set of parenthesis, but avoids it if the +// wrapped node itself is already surrounded by a pair of parenthesis or braces. +// It handles unwrapping one level of pointer-reference nodes. +func wrapParens(s textNode) textNode { + var refNode *textWrap + if s2, ok := s.(*textWrap); ok { + // Unwrap a single pointer reference node. + switch s2.Metadata.(type) { + case leafReference, trunkReference, trunkReferences: + refNode = s2 + if s3, ok := refNode.Value.(*textWrap); ok { + s2 = s3 + } + } + + // Already has delimiters that make parenthesis unnecessary. + hasParens := strings.HasPrefix(s2.Prefix, "(") && strings.HasSuffix(s2.Suffix, ")") + hasBraces := strings.HasPrefix(s2.Prefix, "{") && strings.HasSuffix(s2.Suffix, "}") + if hasParens || hasBraces { + return s + } + } + if refNode != nil { + refNode.Value = &textWrap{Prefix: "(", Value: refNode.Value, Suffix: ")"} + return s + } + return &textWrap{Prefix: "(", Value: s, Suffix: ")"} +} + +// FormatValue prints the reflect.Value, taking extra care to avoid descending +// into pointers already in ptrs. As pointers are visited, ptrs is also updated. +func (opts formatOptions) FormatValue(v reflect.Value, parentKind reflect.Kind, ptrs *pointerReferences) (out textNode) { + if !v.IsValid() { + return nil + } + t := v.Type() + + // Check slice element for cycles. + if parentKind == reflect.Slice { + ptrRef, visited := ptrs.Push(v.Addr()) + if visited { + return makeLeafReference(ptrRef, false) + } + defer ptrs.Pop() + defer func() { out = wrapTrunkReference(ptrRef, false, out) }() + } + + // Check whether there is an Error or String method to call. + if !opts.AvoidStringer && v.CanInterface() { + // Avoid calling Error or String methods on nil receivers since many + // implementations crash when doing so. + if (t.Kind() != reflect.Ptr && t.Kind() != reflect.Interface) || !v.IsNil() { + var prefix, strVal string + func() { + // Swallow and ignore any panics from String or Error. + defer func() { recover() }() + switch v := v.Interface().(type) { + case error: + strVal = v.Error() + prefix = "e" + case fmt.Stringer: + strVal = v.String() + prefix = "s" + } + }() + if prefix != "" { + return opts.formatString(prefix, strVal) + } + } + } + + // Check whether to explicitly wrap the result with the type. + var skipType bool + defer func() { + if !skipType { + out = opts.FormatType(t, out) + } + }() + + switch t.Kind() { + case reflect.Bool: + return textLine(fmt.Sprint(v.Bool())) + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return textLine(fmt.Sprint(v.Int())) + case reflect.Uint, reflect.Uint16, reflect.Uint32, reflect.Uint64: + return textLine(fmt.Sprint(v.Uint())) + case reflect.Uint8: + if parentKind == reflect.Slice || parentKind == reflect.Array { + return textLine(formatHex(v.Uint())) + } + return textLine(fmt.Sprint(v.Uint())) + case reflect.Uintptr: + return textLine(formatHex(v.Uint())) + case reflect.Float32, reflect.Float64: + return textLine(fmt.Sprint(v.Float())) + case reflect.Complex64, reflect.Complex128: + return textLine(fmt.Sprint(v.Complex())) + case reflect.String: + return opts.formatString("", v.String()) + case reflect.UnsafePointer, reflect.Chan, reflect.Func: + return textLine(formatPointer(value.PointerOf(v), true)) + case reflect.Struct: + var list textList + v := makeAddressable(v) // needed for retrieveUnexportedField + maxLen := v.NumField() + if opts.LimitVerbosity { + maxLen = ((1 << opts.verbosity()) >> 1) << 2 // 0, 4, 8, 16, 32, etc... + opts.VerbosityLevel-- + } + for i := 0; i < v.NumField(); i++ { + vv := v.Field(i) + if vv.IsZero() { + continue // Elide fields with zero values + } + if len(list) == maxLen { + list.AppendEllipsis(diffStats{}) + break + } + sf := t.Field(i) + if !isExported(sf.Name) { + vv = retrieveUnexportedField(v, sf, true) + } + s := opts.WithTypeMode(autoType).FormatValue(vv, t.Kind(), ptrs) + list = append(list, textRecord{Key: sf.Name, Value: s}) + } + return &textWrap{Prefix: "{", Value: list, Suffix: "}"} + case reflect.Slice: + if v.IsNil() { + return textNil + } + + // Check whether this is a []byte of text data. + if t.Elem() == byteType { + b := v.Bytes() + isPrintSpace := func(r rune) bool { return unicode.IsPrint(r) || unicode.IsSpace(r) } + if len(b) > 0 && utf8.Valid(b) && len(bytes.TrimFunc(b, isPrintSpace)) == 0 { + out = opts.formatString("", string(b)) + skipType = true + return opts.FormatType(t, out) + } + } + + fallthrough + case reflect.Array: + maxLen := v.Len() + if opts.LimitVerbosity { + maxLen = ((1 << opts.verbosity()) >> 1) << 2 // 0, 4, 8, 16, 32, etc... + opts.VerbosityLevel-- + } + var list textList + for i := 0; i < v.Len(); i++ { + if len(list) == maxLen { + list.AppendEllipsis(diffStats{}) + break + } + s := opts.WithTypeMode(elideType).FormatValue(v.Index(i), t.Kind(), ptrs) + list = append(list, textRecord{Value: s}) + } + + out = &textWrap{Prefix: "{", Value: list, Suffix: "}"} + if t.Kind() == reflect.Slice && opts.PrintAddresses { + header := fmt.Sprintf("ptr:%v, len:%d, cap:%d", formatPointer(value.PointerOf(v), false), v.Len(), v.Cap()) + out = &textWrap{Prefix: pointerDelimPrefix + header + pointerDelimSuffix, Value: out} + } + return out + case reflect.Map: + if v.IsNil() { + return textNil + } + + // Check pointer for cycles. + ptrRef, visited := ptrs.Push(v) + if visited { + return makeLeafReference(ptrRef, opts.PrintAddresses) + } + defer ptrs.Pop() + + maxLen := v.Len() + if opts.LimitVerbosity { + maxLen = ((1 << opts.verbosity()) >> 1) << 2 // 0, 4, 8, 16, 32, etc... + opts.VerbosityLevel-- + } + var list textList + for _, k := range value.SortKeys(v.MapKeys()) { + if len(list) == maxLen { + list.AppendEllipsis(diffStats{}) + break + } + sk := formatMapKey(k, false, ptrs) + sv := opts.WithTypeMode(elideType).FormatValue(v.MapIndex(k), t.Kind(), ptrs) + list = append(list, textRecord{Key: sk, Value: sv}) + } + + out = &textWrap{Prefix: "{", Value: list, Suffix: "}"} + out = wrapTrunkReference(ptrRef, opts.PrintAddresses, out) + return out + case reflect.Ptr: + if v.IsNil() { + return textNil + } + + // Check pointer for cycles. + ptrRef, visited := ptrs.Push(v) + if visited { + out = makeLeafReference(ptrRef, opts.PrintAddresses) + return &textWrap{Prefix: "&", Value: out} + } + defer ptrs.Pop() + + // Skip the name only if this is an unnamed pointer type. + // Otherwise taking the address of a value does not reproduce + // the named pointer type. + if v.Type().Name() == "" { + skipType = true // Let the underlying value print the type instead + } + out = opts.FormatValue(v.Elem(), t.Kind(), ptrs) + out = wrapTrunkReference(ptrRef, opts.PrintAddresses, out) + out = &textWrap{Prefix: "&", Value: out} + return out + case reflect.Interface: + if v.IsNil() { + return textNil + } + // Interfaces accept different concrete types, + // so configure the underlying value to explicitly print the type. + return opts.WithTypeMode(emitType).FormatValue(v.Elem(), t.Kind(), ptrs) + default: + panic(fmt.Sprintf("%v kind not handled", v.Kind())) + } +} + +func (opts formatOptions) formatString(prefix, s string) textNode { + maxLen := len(s) + maxLines := strings.Count(s, "\n") + 1 + if opts.LimitVerbosity { + maxLen = (1 << opts.verbosity()) << 5 // 32, 64, 128, 256, etc... + maxLines = (1 << opts.verbosity()) << 2 // 4, 8, 16, 32, 64, etc... + } + + // For multiline strings, use the triple-quote syntax, + // but only use it when printing removed or inserted nodes since + // we only want the extra verbosity for those cases. + lines := strings.Split(strings.TrimSuffix(s, "\n"), "\n") + isTripleQuoted := len(lines) >= 4 && (opts.DiffMode == '-' || opts.DiffMode == '+') + for i := 0; i < len(lines) && isTripleQuoted; i++ { + lines[i] = strings.TrimPrefix(strings.TrimSuffix(lines[i], "\r"), "\r") // trim leading/trailing carriage returns for legacy Windows endline support + isPrintable := func(r rune) bool { + return unicode.IsPrint(r) || r == '\t' // specially treat tab as printable + } + line := lines[i] + isTripleQuoted = !strings.HasPrefix(strings.TrimPrefix(line, prefix), `"""`) && !strings.HasPrefix(line, "...") && strings.TrimFunc(line, isPrintable) == "" && len(line) <= maxLen + } + if isTripleQuoted { + var list textList + list = append(list, textRecord{Diff: opts.DiffMode, Value: textLine(prefix + `"""`), ElideComma: true}) + for i, line := range lines { + if numElided := len(lines) - i; i == maxLines-1 && numElided > 1 { + comment := commentString(fmt.Sprintf("%d elided lines", numElided)) + list = append(list, textRecord{Diff: opts.DiffMode, Value: textEllipsis, ElideComma: true, Comment: comment}) + break + } + list = append(list, textRecord{Diff: opts.DiffMode, Value: textLine(line), ElideComma: true}) + } + list = append(list, textRecord{Diff: opts.DiffMode, Value: textLine(prefix + `"""`), ElideComma: true}) + return &textWrap{Prefix: "(", Value: list, Suffix: ")"} + } + + // Format the string as a single-line quoted string. + if len(s) > maxLen+len(textEllipsis) { + return textLine(prefix + formatString(s[:maxLen]) + string(textEllipsis)) + } + return textLine(prefix + formatString(s)) +} + +// formatMapKey formats v as if it were a map key. +// The result is guaranteed to be a single line. +func formatMapKey(v reflect.Value, disambiguate bool, ptrs *pointerReferences) string { + var opts formatOptions + opts.DiffMode = diffIdentical + opts.TypeMode = elideType + opts.PrintAddresses = disambiguate + opts.AvoidStringer = disambiguate + opts.QualifiedNames = disambiguate + opts.VerbosityLevel = maxVerbosityPreset + opts.LimitVerbosity = true + s := opts.FormatValue(v, reflect.Map, ptrs).String() + return strings.TrimSpace(s) +} + +// formatString prints s as a double-quoted or backtick-quoted string. +func formatString(s string) string { + // Use quoted string if it the same length as a raw string literal. + // Otherwise, attempt to use the raw string form. + qs := strconv.Quote(s) + if len(qs) == 1+len(s)+1 { + return qs + } + + // Disallow newlines to ensure output is a single line. + // Only allow printable runes for readability purposes. + rawInvalid := func(r rune) bool { + return r == '`' || r == '\n' || !(unicode.IsPrint(r) || r == '\t') + } + if utf8.ValidString(s) && strings.IndexFunc(s, rawInvalid) < 0 { + return "`" + s + "`" + } + return qs +} + +// formatHex prints u as a hexadecimal integer in Go notation. +func formatHex(u uint64) string { + var f string + switch { + case u <= 0xff: + f = "0x%02x" + case u <= 0xffff: + f = "0x%04x" + case u <= 0xffffff: + f = "0x%06x" + case u <= 0xffffffff: + f = "0x%08x" + case u <= 0xffffffffff: + f = "0x%010x" + case u <= 0xffffffffffff: + f = "0x%012x" + case u <= 0xffffffffffffff: + f = "0x%014x" + case u <= 0xffffffffffffffff: + f = "0x%016x" + } + return fmt.Sprintf(f, u) +} diff --git a/vendor/github.com/google/go-cmp/cmp/report_slices.go b/vendor/github.com/google/go-cmp/cmp/report_slices.go new file mode 100644 index 000000000..23e444f62 --- /dev/null +++ b/vendor/github.com/google/go-cmp/cmp/report_slices.go @@ -0,0 +1,614 @@ +// Copyright 2019, The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package cmp + +import ( + "bytes" + "fmt" + "math" + "reflect" + "strconv" + "strings" + "unicode" + "unicode/utf8" + + "github.com/google/go-cmp/cmp/internal/diff" +) + +// CanFormatDiffSlice reports whether we support custom formatting for nodes +// that are slices of primitive kinds or strings. +func (opts formatOptions) CanFormatDiffSlice(v *valueNode) bool { + switch { + case opts.DiffMode != diffUnknown: + return false // Must be formatting in diff mode + case v.NumDiff == 0: + return false // No differences detected + case !v.ValueX.IsValid() || !v.ValueY.IsValid(): + return false // Both values must be valid + case v.NumIgnored > 0: + return false // Some ignore option was used + case v.NumTransformed > 0: + return false // Some transform option was used + case v.NumCompared > 1: + return false // More than one comparison was used + case v.NumCompared == 1 && v.Type.Name() != "": + // The need for cmp to check applicability of options on every element + // in a slice is a significant performance detriment for large []byte. + // The workaround is to specify Comparer(bytes.Equal), + // which enables cmp to compare []byte more efficiently. + // If they differ, we still want to provide batched diffing. + // The logic disallows named types since they tend to have their own + // String method, with nicer formatting than what this provides. + return false + } + + // Check whether this is an interface with the same concrete types. + t := v.Type + vx, vy := v.ValueX, v.ValueY + if t.Kind() == reflect.Interface && !vx.IsNil() && !vy.IsNil() && vx.Elem().Type() == vy.Elem().Type() { + vx, vy = vx.Elem(), vy.Elem() + t = vx.Type() + } + + // Check whether we provide specialized diffing for this type. + switch t.Kind() { + case reflect.String: + case reflect.Array, reflect.Slice: + // Only slices of primitive types have specialized handling. + switch t.Elem().Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, + reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr, + reflect.Bool, reflect.Float32, reflect.Float64, reflect.Complex64, reflect.Complex128: + default: + return false + } + + // Both slice values have to be non-empty. + if t.Kind() == reflect.Slice && (vx.Len() == 0 || vy.Len() == 0) { + return false + } + + // If a sufficient number of elements already differ, + // use specialized formatting even if length requirement is not met. + if v.NumDiff > v.NumSame { + return true + } + default: + return false + } + + // Use specialized string diffing for longer slices or strings. + const minLength = 32 + return vx.Len() >= minLength && vy.Len() >= minLength +} + +// FormatDiffSlice prints a diff for the slices (or strings) represented by v. +// This provides custom-tailored logic to make printing of differences in +// textual strings and slices of primitive kinds more readable. +func (opts formatOptions) FormatDiffSlice(v *valueNode) textNode { + assert(opts.DiffMode == diffUnknown) + t, vx, vy := v.Type, v.ValueX, v.ValueY + if t.Kind() == reflect.Interface { + vx, vy = vx.Elem(), vy.Elem() + t = vx.Type() + opts = opts.WithTypeMode(emitType) + } + + // Auto-detect the type of the data. + var sx, sy string + var ssx, ssy []string + var isString, isMostlyText, isPureLinedText, isBinary bool + switch { + case t.Kind() == reflect.String: + sx, sy = vx.String(), vy.String() + isString = true + case t.Kind() == reflect.Slice && t.Elem() == byteType: + sx, sy = string(vx.Bytes()), string(vy.Bytes()) + isString = true + case t.Kind() == reflect.Array: + // Arrays need to be addressable for slice operations to work. + vx2, vy2 := reflect.New(t).Elem(), reflect.New(t).Elem() + vx2.Set(vx) + vy2.Set(vy) + vx, vy = vx2, vy2 + } + if isString { + var numTotalRunes, numValidRunes, numLines, lastLineIdx, maxLineLen int + for i, r := range sx + sy { + numTotalRunes++ + if (unicode.IsPrint(r) || unicode.IsSpace(r)) && r != utf8.RuneError { + numValidRunes++ + } + if r == '\n' { + if maxLineLen < i-lastLineIdx { + maxLineLen = i - lastLineIdx + } + lastLineIdx = i + 1 + numLines++ + } + } + isPureText := numValidRunes == numTotalRunes + isMostlyText = float64(numValidRunes) > math.Floor(0.90*float64(numTotalRunes)) + isPureLinedText = isPureText && numLines >= 4 && maxLineLen <= 1024 + isBinary = !isMostlyText + + // Avoid diffing by lines if it produces a significantly more complex + // edit script than diffing by bytes. + if isPureLinedText { + ssx = strings.Split(sx, "\n") + ssy = strings.Split(sy, "\n") + esLines := diff.Difference(len(ssx), len(ssy), func(ix, iy int) diff.Result { + return diff.BoolResult(ssx[ix] == ssy[iy]) + }) + esBytes := diff.Difference(len(sx), len(sy), func(ix, iy int) diff.Result { + return diff.BoolResult(sx[ix] == sy[iy]) + }) + efficiencyLines := float64(esLines.Dist()) / float64(len(esLines)) + efficiencyBytes := float64(esBytes.Dist()) / float64(len(esBytes)) + quotedLength := len(strconv.Quote(sx + sy)) + unquotedLength := len(sx) + len(sy) + escapeExpansionRatio := float64(quotedLength) / float64(unquotedLength) + isPureLinedText = efficiencyLines < 4*efficiencyBytes || escapeExpansionRatio > 1.1 + } + } + + // Format the string into printable records. + var list textList + var delim string + switch { + // If the text appears to be multi-lined text, + // then perform differencing across individual lines. + case isPureLinedText: + list = opts.formatDiffSlice( + reflect.ValueOf(ssx), reflect.ValueOf(ssy), 1, "line", + func(v reflect.Value, d diffMode) textRecord { + s := formatString(v.Index(0).String()) + return textRecord{Diff: d, Value: textLine(s)} + }, + ) + delim = "\n" + + // If possible, use a custom triple-quote (""") syntax for printing + // differences in a string literal. This format is more readable, + // but has edge-cases where differences are visually indistinguishable. + // This format is avoided under the following conditions: + // - A line starts with `"""` + // - A line starts with "..." + // - A line contains non-printable characters + // - Adjacent different lines differ only by whitespace + // + // For example: + // + // """ + // ... // 3 identical lines + // foo + // bar + // - baz + // + BAZ + // """ + isTripleQuoted := true + prevRemoveLines := map[string]bool{} + prevInsertLines := map[string]bool{} + var list2 textList + list2 = append(list2, textRecord{Value: textLine(`"""`), ElideComma: true}) + for _, r := range list { + if !r.Value.Equal(textEllipsis) { + line, _ := strconv.Unquote(string(r.Value.(textLine))) + line = strings.TrimPrefix(strings.TrimSuffix(line, "\r"), "\r") // trim leading/trailing carriage returns for legacy Windows endline support + normLine := strings.Map(func(r rune) rune { + if unicode.IsSpace(r) { + return -1 // drop whitespace to avoid visually indistinguishable output + } + return r + }, line) + isPrintable := func(r rune) bool { + return unicode.IsPrint(r) || r == '\t' // specially treat tab as printable + } + isTripleQuoted = !strings.HasPrefix(line, `"""`) && !strings.HasPrefix(line, "...") && strings.TrimFunc(line, isPrintable) == "" + switch r.Diff { + case diffRemoved: + isTripleQuoted = isTripleQuoted && !prevInsertLines[normLine] + prevRemoveLines[normLine] = true + case diffInserted: + isTripleQuoted = isTripleQuoted && !prevRemoveLines[normLine] + prevInsertLines[normLine] = true + } + if !isTripleQuoted { + break + } + r.Value = textLine(line) + r.ElideComma = true + } + if !(r.Diff == diffRemoved || r.Diff == diffInserted) { // start a new non-adjacent difference group + prevRemoveLines = map[string]bool{} + prevInsertLines = map[string]bool{} + } + list2 = append(list2, r) + } + if r := list2[len(list2)-1]; r.Diff == diffIdentical && len(r.Value.(textLine)) == 0 { + list2 = list2[:len(list2)-1] // elide single empty line at the end + } + list2 = append(list2, textRecord{Value: textLine(`"""`), ElideComma: true}) + if isTripleQuoted { + var out textNode = &textWrap{Prefix: "(", Value: list2, Suffix: ")"} + switch t.Kind() { + case reflect.String: + if t != stringType { + out = opts.FormatType(t, out) + } + case reflect.Slice: + // Always emit type for slices since the triple-quote syntax + // looks like a string (not a slice). + opts = opts.WithTypeMode(emitType) + out = opts.FormatType(t, out) + } + return out + } + + // If the text appears to be single-lined text, + // then perform differencing in approximately fixed-sized chunks. + // The output is printed as quoted strings. + case isMostlyText: + list = opts.formatDiffSlice( + reflect.ValueOf(sx), reflect.ValueOf(sy), 64, "byte", + func(v reflect.Value, d diffMode) textRecord { + s := formatString(v.String()) + return textRecord{Diff: d, Value: textLine(s)} + }, + ) + + // If the text appears to be binary data, + // then perform differencing in approximately fixed-sized chunks. + // The output is inspired by hexdump. + case isBinary: + list = opts.formatDiffSlice( + reflect.ValueOf(sx), reflect.ValueOf(sy), 16, "byte", + func(v reflect.Value, d diffMode) textRecord { + var ss []string + for i := 0; i < v.Len(); i++ { + ss = append(ss, formatHex(v.Index(i).Uint())) + } + s := strings.Join(ss, ", ") + comment := commentString(fmt.Sprintf("%c|%v|", d, formatASCII(v.String()))) + return textRecord{Diff: d, Value: textLine(s), Comment: comment} + }, + ) + + // For all other slices of primitive types, + // then perform differencing in approximately fixed-sized chunks. + // The size of each chunk depends on the width of the element kind. + default: + var chunkSize int + if t.Elem().Kind() == reflect.Bool { + chunkSize = 16 + } else { + switch t.Elem().Bits() { + case 8: + chunkSize = 16 + case 16: + chunkSize = 12 + case 32: + chunkSize = 8 + default: + chunkSize = 8 + } + } + list = opts.formatDiffSlice( + vx, vy, chunkSize, t.Elem().Kind().String(), + func(v reflect.Value, d diffMode) textRecord { + var ss []string + for i := 0; i < v.Len(); i++ { + switch t.Elem().Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + ss = append(ss, fmt.Sprint(v.Index(i).Int())) + case reflect.Uint, reflect.Uint16, reflect.Uint32, reflect.Uint64: + ss = append(ss, fmt.Sprint(v.Index(i).Uint())) + case reflect.Uint8, reflect.Uintptr: + ss = append(ss, formatHex(v.Index(i).Uint())) + case reflect.Bool, reflect.Float32, reflect.Float64, reflect.Complex64, reflect.Complex128: + ss = append(ss, fmt.Sprint(v.Index(i).Interface())) + } + } + s := strings.Join(ss, ", ") + return textRecord{Diff: d, Value: textLine(s)} + }, + ) + } + + // Wrap the output with appropriate type information. + var out textNode = &textWrap{Prefix: "{", Value: list, Suffix: "}"} + if !isMostlyText { + // The "{...}" byte-sequence literal is not valid Go syntax for strings. + // Emit the type for extra clarity (e.g. "string{...}"). + if t.Kind() == reflect.String { + opts = opts.WithTypeMode(emitType) + } + return opts.FormatType(t, out) + } + switch t.Kind() { + case reflect.String: + out = &textWrap{Prefix: "strings.Join(", Value: out, Suffix: fmt.Sprintf(", %q)", delim)} + if t != stringType { + out = opts.FormatType(t, out) + } + case reflect.Slice: + out = &textWrap{Prefix: "bytes.Join(", Value: out, Suffix: fmt.Sprintf(", %q)", delim)} + if t != bytesType { + out = opts.FormatType(t, out) + } + } + return out +} + +// formatASCII formats s as an ASCII string. +// This is useful for printing binary strings in a semi-legible way. +func formatASCII(s string) string { + b := bytes.Repeat([]byte{'.'}, len(s)) + for i := 0; i < len(s); i++ { + if ' ' <= s[i] && s[i] <= '~' { + b[i] = s[i] + } + } + return string(b) +} + +func (opts formatOptions) formatDiffSlice( + vx, vy reflect.Value, chunkSize int, name string, + makeRec func(reflect.Value, diffMode) textRecord, +) (list textList) { + eq := func(ix, iy int) bool { + return vx.Index(ix).Interface() == vy.Index(iy).Interface() + } + es := diff.Difference(vx.Len(), vy.Len(), func(ix, iy int) diff.Result { + return diff.BoolResult(eq(ix, iy)) + }) + + appendChunks := func(v reflect.Value, d diffMode) int { + n0 := v.Len() + for v.Len() > 0 { + n := chunkSize + if n > v.Len() { + n = v.Len() + } + list = append(list, makeRec(v.Slice(0, n), d)) + v = v.Slice(n, v.Len()) + } + return n0 - v.Len() + } + + var numDiffs int + maxLen := -1 + if opts.LimitVerbosity { + maxLen = (1 << opts.verbosity()) << 2 // 4, 8, 16, 32, 64, etc... + opts.VerbosityLevel-- + } + + groups := coalesceAdjacentEdits(name, es) + groups = coalesceInterveningIdentical(groups, chunkSize/4) + groups = cleanupSurroundingIdentical(groups, eq) + maxGroup := diffStats{Name: name} + for i, ds := range groups { + if maxLen >= 0 && numDiffs >= maxLen { + maxGroup = maxGroup.Append(ds) + continue + } + + // Print equal. + if ds.NumDiff() == 0 { + // Compute the number of leading and trailing equal bytes to print. + var numLo, numHi int + numEqual := ds.NumIgnored + ds.NumIdentical + for numLo < chunkSize*numContextRecords && numLo+numHi < numEqual && i != 0 { + numLo++ + } + for numHi < chunkSize*numContextRecords && numLo+numHi < numEqual && i != len(groups)-1 { + numHi++ + } + if numEqual-(numLo+numHi) <= chunkSize && ds.NumIgnored == 0 { + numHi = numEqual - numLo // Avoid pointless coalescing of single equal row + } + + // Print the equal bytes. + appendChunks(vx.Slice(0, numLo), diffIdentical) + if numEqual > numLo+numHi { + ds.NumIdentical -= numLo + numHi + list.AppendEllipsis(ds) + } + appendChunks(vx.Slice(numEqual-numHi, numEqual), diffIdentical) + vx = vx.Slice(numEqual, vx.Len()) + vy = vy.Slice(numEqual, vy.Len()) + continue + } + + // Print unequal. + len0 := len(list) + nx := appendChunks(vx.Slice(0, ds.NumIdentical+ds.NumRemoved+ds.NumModified), diffRemoved) + vx = vx.Slice(nx, vx.Len()) + ny := appendChunks(vy.Slice(0, ds.NumIdentical+ds.NumInserted+ds.NumModified), diffInserted) + vy = vy.Slice(ny, vy.Len()) + numDiffs += len(list) - len0 + } + if maxGroup.IsZero() { + assert(vx.Len() == 0 && vy.Len() == 0) + } else { + list.AppendEllipsis(maxGroup) + } + return list +} + +// coalesceAdjacentEdits coalesces the list of edits into groups of adjacent +// equal or unequal counts. +// +// Example: +// +// Input: "..XXY...Y" +// Output: [ +// {NumIdentical: 2}, +// {NumRemoved: 2, NumInserted 1}, +// {NumIdentical: 3}, +// {NumInserted: 1}, +// ] +func coalesceAdjacentEdits(name string, es diff.EditScript) (groups []diffStats) { + var prevMode byte + lastStats := func(mode byte) *diffStats { + if prevMode != mode { + groups = append(groups, diffStats{Name: name}) + prevMode = mode + } + return &groups[len(groups)-1] + } + for _, e := range es { + switch e { + case diff.Identity: + lastStats('=').NumIdentical++ + case diff.UniqueX: + lastStats('!').NumRemoved++ + case diff.UniqueY: + lastStats('!').NumInserted++ + case diff.Modified: + lastStats('!').NumModified++ + } + } + return groups +} + +// coalesceInterveningIdentical coalesces sufficiently short (<= windowSize) +// equal groups into adjacent unequal groups that currently result in a +// dual inserted/removed printout. This acts as a high-pass filter to smooth +// out high-frequency changes within the windowSize. +// +// Example: +// +// WindowSize: 16, +// Input: [ +// {NumIdentical: 61}, // group 0 +// {NumRemoved: 3, NumInserted: 1}, // group 1 +// {NumIdentical: 6}, // ├── coalesce +// {NumInserted: 2}, // ├── coalesce +// {NumIdentical: 1}, // ├── coalesce +// {NumRemoved: 9}, // └── coalesce +// {NumIdentical: 64}, // group 2 +// {NumRemoved: 3, NumInserted: 1}, // group 3 +// {NumIdentical: 6}, // ├── coalesce +// {NumInserted: 2}, // ├── coalesce +// {NumIdentical: 1}, // ├── coalesce +// {NumRemoved: 7}, // ├── coalesce +// {NumIdentical: 1}, // ├── coalesce +// {NumRemoved: 2}, // └── coalesce +// {NumIdentical: 63}, // group 4 +// ] +// Output: [ +// {NumIdentical: 61}, +// {NumIdentical: 7, NumRemoved: 12, NumInserted: 3}, +// {NumIdentical: 64}, +// {NumIdentical: 8, NumRemoved: 12, NumInserted: 3}, +// {NumIdentical: 63}, +// ] +func coalesceInterveningIdentical(groups []diffStats, windowSize int) []diffStats { + groups, groupsOrig := groups[:0], groups + for i, ds := range groupsOrig { + if len(groups) >= 2 && ds.NumDiff() > 0 { + prev := &groups[len(groups)-2] // Unequal group + curr := &groups[len(groups)-1] // Equal group + next := &groupsOrig[i] // Unequal group + hadX, hadY := prev.NumRemoved > 0, prev.NumInserted > 0 + hasX, hasY := next.NumRemoved > 0, next.NumInserted > 0 + if ((hadX || hasX) && (hadY || hasY)) && curr.NumIdentical <= windowSize { + *prev = prev.Append(*curr).Append(*next) + groups = groups[:len(groups)-1] // Truncate off equal group + continue + } + } + groups = append(groups, ds) + } + return groups +} + +// cleanupSurroundingIdentical scans through all unequal groups, and +// moves any leading sequence of equal elements to the preceding equal group and +// moves and trailing sequence of equal elements to the succeeding equal group. +// +// This is necessary since coalesceInterveningIdentical may coalesce edit groups +// together such that leading/trailing spans of equal elements becomes possible. +// Note that this can occur even with an optimal diffing algorithm. +// +// Example: +// +// Input: [ +// {NumIdentical: 61}, +// {NumIdentical: 1 , NumRemoved: 11, NumInserted: 2}, // assume 3 leading identical elements +// {NumIdentical: 67}, +// {NumIdentical: 7, NumRemoved: 12, NumInserted: 3}, // assume 10 trailing identical elements +// {NumIdentical: 54}, +// ] +// Output: [ +// {NumIdentical: 64}, // incremented by 3 +// {NumRemoved: 9}, +// {NumIdentical: 67}, +// {NumRemoved: 9}, +// {NumIdentical: 64}, // incremented by 10 +// ] +func cleanupSurroundingIdentical(groups []diffStats, eq func(i, j int) bool) []diffStats { + var ix, iy int // indexes into sequence x and y + for i, ds := range groups { + // Handle equal group. + if ds.NumDiff() == 0 { + ix += ds.NumIdentical + iy += ds.NumIdentical + continue + } + + // Handle unequal group. + nx := ds.NumIdentical + ds.NumRemoved + ds.NumModified + ny := ds.NumIdentical + ds.NumInserted + ds.NumModified + var numLeadingIdentical, numTrailingIdentical int + for j := 0; j < nx && j < ny && eq(ix+j, iy+j); j++ { + numLeadingIdentical++ + } + for j := 0; j < nx && j < ny && eq(ix+nx-1-j, iy+ny-1-j); j++ { + numTrailingIdentical++ + } + if numIdentical := numLeadingIdentical + numTrailingIdentical; numIdentical > 0 { + if numLeadingIdentical > 0 { + // Remove leading identical span from this group and + // insert it into the preceding group. + if i-1 >= 0 { + groups[i-1].NumIdentical += numLeadingIdentical + } else { + // No preceding group exists, so prepend a new group, + // but do so after we finish iterating over all groups. + defer func() { + groups = append([]diffStats{{Name: groups[0].Name, NumIdentical: numLeadingIdentical}}, groups...) + }() + } + // Increment indexes since the preceding group would have handled this. + ix += numLeadingIdentical + iy += numLeadingIdentical + } + if numTrailingIdentical > 0 { + // Remove trailing identical span from this group and + // insert it into the succeeding group. + if i+1 < len(groups) { + groups[i+1].NumIdentical += numTrailingIdentical + } else { + // No succeeding group exists, so append a new group, + // but do so after we finish iterating over all groups. + defer func() { + groups = append(groups, diffStats{Name: groups[len(groups)-1].Name, NumIdentical: numTrailingIdentical}) + }() + } + // Do not increment indexes since the succeeding group will handle this. + } + + // Update this group since some identical elements were removed. + nx -= numIdentical + ny -= numIdentical + groups[i] = diffStats{Name: ds.Name, NumRemoved: nx, NumInserted: ny} + } + ix += nx + iy += ny + } + return groups +} diff --git a/vendor/github.com/google/go-cmp/cmp/report_text.go b/vendor/github.com/google/go-cmp/cmp/report_text.go new file mode 100644 index 000000000..388fcf571 --- /dev/null +++ b/vendor/github.com/google/go-cmp/cmp/report_text.go @@ -0,0 +1,432 @@ +// Copyright 2019, The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package cmp + +import ( + "bytes" + "fmt" + "math/rand" + "strings" + "time" + "unicode/utf8" + + "github.com/google/go-cmp/cmp/internal/flags" +) + +var randBool = rand.New(rand.NewSource(time.Now().Unix())).Intn(2) == 0 + +const maxColumnLength = 80 + +type indentMode int + +func (n indentMode) appendIndent(b []byte, d diffMode) []byte { + // The output of Diff is documented as being unstable to provide future + // flexibility in changing the output for more humanly readable reports. + // This logic intentionally introduces instability to the exact output + // so that users can detect accidental reliance on stability early on, + // rather than much later when an actual change to the format occurs. + if flags.Deterministic || randBool { + // Use regular spaces (U+0020). + switch d { + case diffUnknown, diffIdentical: + b = append(b, " "...) + case diffRemoved: + b = append(b, "- "...) + case diffInserted: + b = append(b, "+ "...) + } + } else { + // Use non-breaking spaces (U+00a0). + switch d { + case diffUnknown, diffIdentical: + b = append(b, "  "...) + case diffRemoved: + b = append(b, "- "...) + case diffInserted: + b = append(b, "+ "...) + } + } + return repeatCount(n).appendChar(b, '\t') +} + +type repeatCount int + +func (n repeatCount) appendChar(b []byte, c byte) []byte { + for ; n > 0; n-- { + b = append(b, c) + } + return b +} + +// textNode is a simplified tree-based representation of structured text. +// Possible node types are textWrap, textList, or textLine. +type textNode interface { + // Len reports the length in bytes of a single-line version of the tree. + // Nested textRecord.Diff and textRecord.Comment fields are ignored. + Len() int + // Equal reports whether the two trees are structurally identical. + // Nested textRecord.Diff and textRecord.Comment fields are compared. + Equal(textNode) bool + // String returns the string representation of the text tree. + // It is not guaranteed that len(x.String()) == x.Len(), + // nor that x.String() == y.String() implies that x.Equal(y). + String() string + + // formatCompactTo formats the contents of the tree as a single-line string + // to the provided buffer. Any nested textRecord.Diff and textRecord.Comment + // fields are ignored. + // + // However, not all nodes in the tree should be collapsed as a single-line. + // If a node can be collapsed as a single-line, it is replaced by a textLine + // node. Since the top-level node cannot replace itself, this also returns + // the current node itself. + // + // This does not mutate the receiver. + formatCompactTo([]byte, diffMode) ([]byte, textNode) + // formatExpandedTo formats the contents of the tree as a multi-line string + // to the provided buffer. In order for column alignment to operate well, + // formatCompactTo must be called before calling formatExpandedTo. + formatExpandedTo([]byte, diffMode, indentMode) []byte +} + +// textWrap is a wrapper that concatenates a prefix and/or a suffix +// to the underlying node. +type textWrap struct { + Prefix string // e.g., "bytes.Buffer{" + Value textNode // textWrap | textList | textLine + Suffix string // e.g., "}" + Metadata interface{} // arbitrary metadata; has no effect on formatting +} + +func (s *textWrap) Len() int { + return len(s.Prefix) + s.Value.Len() + len(s.Suffix) +} +func (s1 *textWrap) Equal(s2 textNode) bool { + if s2, ok := s2.(*textWrap); ok { + return s1.Prefix == s2.Prefix && s1.Value.Equal(s2.Value) && s1.Suffix == s2.Suffix + } + return false +} +func (s *textWrap) String() string { + var d diffMode + var n indentMode + _, s2 := s.formatCompactTo(nil, d) + b := n.appendIndent(nil, d) // Leading indent + b = s2.formatExpandedTo(b, d, n) // Main body + b = append(b, '\n') // Trailing newline + return string(b) +} +func (s *textWrap) formatCompactTo(b []byte, d diffMode) ([]byte, textNode) { + n0 := len(b) // Original buffer length + b = append(b, s.Prefix...) + b, s.Value = s.Value.formatCompactTo(b, d) + b = append(b, s.Suffix...) + if _, ok := s.Value.(textLine); ok { + return b, textLine(b[n0:]) + } + return b, s +} +func (s *textWrap) formatExpandedTo(b []byte, d diffMode, n indentMode) []byte { + b = append(b, s.Prefix...) + b = s.Value.formatExpandedTo(b, d, n) + b = append(b, s.Suffix...) + return b +} + +// textList is a comma-separated list of textWrap or textLine nodes. +// The list may be formatted as multi-lines or single-line at the discretion +// of the textList.formatCompactTo method. +type textList []textRecord +type textRecord struct { + Diff diffMode // e.g., 0 or '-' or '+' + Key string // e.g., "MyField" + Value textNode // textWrap | textLine + ElideComma bool // avoid trailing comma + Comment fmt.Stringer // e.g., "6 identical fields" +} + +// AppendEllipsis appends a new ellipsis node to the list if none already +// exists at the end. If cs is non-zero it coalesces the statistics with the +// previous diffStats. +func (s *textList) AppendEllipsis(ds diffStats) { + hasStats := !ds.IsZero() + if len(*s) == 0 || !(*s)[len(*s)-1].Value.Equal(textEllipsis) { + if hasStats { + *s = append(*s, textRecord{Value: textEllipsis, ElideComma: true, Comment: ds}) + } else { + *s = append(*s, textRecord{Value: textEllipsis, ElideComma: true}) + } + return + } + if hasStats { + (*s)[len(*s)-1].Comment = (*s)[len(*s)-1].Comment.(diffStats).Append(ds) + } +} + +func (s textList) Len() (n int) { + for i, r := range s { + n += len(r.Key) + if r.Key != "" { + n += len(": ") + } + n += r.Value.Len() + if i < len(s)-1 { + n += len(", ") + } + } + return n +} + +func (s1 textList) Equal(s2 textNode) bool { + if s2, ok := s2.(textList); ok { + if len(s1) != len(s2) { + return false + } + for i := range s1 { + r1, r2 := s1[i], s2[i] + if !(r1.Diff == r2.Diff && r1.Key == r2.Key && r1.Value.Equal(r2.Value) && r1.Comment == r2.Comment) { + return false + } + } + return true + } + return false +} + +func (s textList) String() string { + return (&textWrap{Prefix: "{", Value: s, Suffix: "}"}).String() +} + +func (s textList) formatCompactTo(b []byte, d diffMode) ([]byte, textNode) { + s = append(textList(nil), s...) // Avoid mutating original + + // Determine whether we can collapse this list as a single line. + n0 := len(b) // Original buffer length + var multiLine bool + for i, r := range s { + if r.Diff == diffInserted || r.Diff == diffRemoved { + multiLine = true + } + b = append(b, r.Key...) + if r.Key != "" { + b = append(b, ": "...) + } + b, s[i].Value = r.Value.formatCompactTo(b, d|r.Diff) + if _, ok := s[i].Value.(textLine); !ok { + multiLine = true + } + if r.Comment != nil { + multiLine = true + } + if i < len(s)-1 { + b = append(b, ", "...) + } + } + // Force multi-lined output when printing a removed/inserted node that + // is sufficiently long. + if (d == diffInserted || d == diffRemoved) && len(b[n0:]) > maxColumnLength { + multiLine = true + } + if !multiLine { + return b, textLine(b[n0:]) + } + return b, s +} + +func (s textList) formatExpandedTo(b []byte, d diffMode, n indentMode) []byte { + alignKeyLens := s.alignLens( + func(r textRecord) bool { + _, isLine := r.Value.(textLine) + return r.Key == "" || !isLine + }, + func(r textRecord) int { return utf8.RuneCountInString(r.Key) }, + ) + alignValueLens := s.alignLens( + func(r textRecord) bool { + _, isLine := r.Value.(textLine) + return !isLine || r.Value.Equal(textEllipsis) || r.Comment == nil + }, + func(r textRecord) int { return utf8.RuneCount(r.Value.(textLine)) }, + ) + + // Format lists of simple lists in a batched form. + // If the list is sequence of only textLine values, + // then batch multiple values on a single line. + var isSimple bool + for _, r := range s { + _, isLine := r.Value.(textLine) + isSimple = r.Diff == 0 && r.Key == "" && isLine && r.Comment == nil + if !isSimple { + break + } + } + if isSimple { + n++ + var batch []byte + emitBatch := func() { + if len(batch) > 0 { + b = n.appendIndent(append(b, '\n'), d) + b = append(b, bytes.TrimRight(batch, " ")...) + batch = batch[:0] + } + } + for _, r := range s { + line := r.Value.(textLine) + if len(batch)+len(line)+len(", ") > maxColumnLength { + emitBatch() + } + batch = append(batch, line...) + batch = append(batch, ", "...) + } + emitBatch() + n-- + return n.appendIndent(append(b, '\n'), d) + } + + // Format the list as a multi-lined output. + n++ + for i, r := range s { + b = n.appendIndent(append(b, '\n'), d|r.Diff) + if r.Key != "" { + b = append(b, r.Key+": "...) + } + b = alignKeyLens[i].appendChar(b, ' ') + + b = r.Value.formatExpandedTo(b, d|r.Diff, n) + if !r.ElideComma { + b = append(b, ',') + } + b = alignValueLens[i].appendChar(b, ' ') + + if r.Comment != nil { + b = append(b, " // "+r.Comment.String()...) + } + } + n-- + + return n.appendIndent(append(b, '\n'), d) +} + +func (s textList) alignLens( + skipFunc func(textRecord) bool, + lenFunc func(textRecord) int, +) []repeatCount { + var startIdx, endIdx, maxLen int + lens := make([]repeatCount, len(s)) + for i, r := range s { + if skipFunc(r) { + for j := startIdx; j < endIdx && j < len(s); j++ { + lens[j] = repeatCount(maxLen - lenFunc(s[j])) + } + startIdx, endIdx, maxLen = i+1, i+1, 0 + } else { + if maxLen < lenFunc(r) { + maxLen = lenFunc(r) + } + endIdx = i + 1 + } + } + for j := startIdx; j < endIdx && j < len(s); j++ { + lens[j] = repeatCount(maxLen - lenFunc(s[j])) + } + return lens +} + +// textLine is a single-line segment of text and is always a leaf node +// in the textNode tree. +type textLine []byte + +var ( + textNil = textLine("nil") + textEllipsis = textLine("...") +) + +func (s textLine) Len() int { + return len(s) +} +func (s1 textLine) Equal(s2 textNode) bool { + if s2, ok := s2.(textLine); ok { + return bytes.Equal([]byte(s1), []byte(s2)) + } + return false +} +func (s textLine) String() string { + return string(s) +} +func (s textLine) formatCompactTo(b []byte, d diffMode) ([]byte, textNode) { + return append(b, s...), s +} +func (s textLine) formatExpandedTo(b []byte, _ diffMode, _ indentMode) []byte { + return append(b, s...) +} + +type diffStats struct { + Name string + NumIgnored int + NumIdentical int + NumRemoved int + NumInserted int + NumModified int +} + +func (s diffStats) IsZero() bool { + s.Name = "" + return s == diffStats{} +} + +func (s diffStats) NumDiff() int { + return s.NumRemoved + s.NumInserted + s.NumModified +} + +func (s diffStats) Append(ds diffStats) diffStats { + assert(s.Name == ds.Name) + s.NumIgnored += ds.NumIgnored + s.NumIdentical += ds.NumIdentical + s.NumRemoved += ds.NumRemoved + s.NumInserted += ds.NumInserted + s.NumModified += ds.NumModified + return s +} + +// String prints a humanly-readable summary of coalesced records. +// +// Example: +// +// diffStats{Name: "Field", NumIgnored: 5}.String() => "5 ignored fields" +func (s diffStats) String() string { + var ss []string + var sum int + labels := [...]string{"ignored", "identical", "removed", "inserted", "modified"} + counts := [...]int{s.NumIgnored, s.NumIdentical, s.NumRemoved, s.NumInserted, s.NumModified} + for i, n := range counts { + if n > 0 { + ss = append(ss, fmt.Sprintf("%d %v", n, labels[i])) + } + sum += n + } + + // Pluralize the name (adjusting for some obscure English grammar rules). + name := s.Name + if sum > 1 { + name += "s" + if strings.HasSuffix(name, "ys") { + name = name[:len(name)-2] + "ies" // e.g., "entrys" => "entries" + } + } + + // Format the list according to English grammar (with Oxford comma). + switch n := len(ss); n { + case 0: + return "" + case 1, 2: + return strings.Join(ss, " and ") + " " + name + default: + return strings.Join(ss[:n-1], ", ") + ", and " + ss[n-1] + " " + name + } +} + +type commentString string + +func (s commentString) String() string { return string(s) } diff --git a/vendor/github.com/google/go-cmp/cmp/report_value.go b/vendor/github.com/google/go-cmp/cmp/report_value.go new file mode 100644 index 000000000..668d470fd --- /dev/null +++ b/vendor/github.com/google/go-cmp/cmp/report_value.go @@ -0,0 +1,121 @@ +// Copyright 2019, The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package cmp + +import "reflect" + +// valueNode represents a single node within a report, which is a +// structured representation of the value tree, containing information +// regarding which nodes are equal or not. +type valueNode struct { + parent *valueNode + + Type reflect.Type + ValueX reflect.Value + ValueY reflect.Value + + // NumSame is the number of leaf nodes that are equal. + // All descendants are equal only if NumDiff is 0. + NumSame int + // NumDiff is the number of leaf nodes that are not equal. + NumDiff int + // NumIgnored is the number of leaf nodes that are ignored. + NumIgnored int + // NumCompared is the number of leaf nodes that were compared + // using an Equal method or Comparer function. + NumCompared int + // NumTransformed is the number of non-leaf nodes that were transformed. + NumTransformed int + // NumChildren is the number of transitive descendants of this node. + // This counts from zero; thus, leaf nodes have no descendants. + NumChildren int + // MaxDepth is the maximum depth of the tree. This counts from zero; + // thus, leaf nodes have a depth of zero. + MaxDepth int + + // Records is a list of struct fields, slice elements, or map entries. + Records []reportRecord // If populated, implies Value is not populated + + // Value is the result of a transformation, pointer indirect, of + // type assertion. + Value *valueNode // If populated, implies Records is not populated + + // TransformerName is the name of the transformer. + TransformerName string // If non-empty, implies Value is populated +} +type reportRecord struct { + Key reflect.Value // Invalid for slice element + Value *valueNode +} + +func (parent *valueNode) PushStep(ps PathStep) (child *valueNode) { + vx, vy := ps.Values() + child = &valueNode{parent: parent, Type: ps.Type(), ValueX: vx, ValueY: vy} + switch s := ps.(type) { + case StructField: + assert(parent.Value == nil) + parent.Records = append(parent.Records, reportRecord{Key: reflect.ValueOf(s.Name()), Value: child}) + case SliceIndex: + assert(parent.Value == nil) + parent.Records = append(parent.Records, reportRecord{Value: child}) + case MapIndex: + assert(parent.Value == nil) + parent.Records = append(parent.Records, reportRecord{Key: s.Key(), Value: child}) + case Indirect: + assert(parent.Value == nil && parent.Records == nil) + parent.Value = child + case TypeAssertion: + assert(parent.Value == nil && parent.Records == nil) + parent.Value = child + case Transform: + assert(parent.Value == nil && parent.Records == nil) + parent.Value = child + parent.TransformerName = s.Name() + parent.NumTransformed++ + default: + assert(parent == nil) // Must be the root step + } + return child +} + +func (r *valueNode) Report(rs Result) { + assert(r.MaxDepth == 0) // May only be called on leaf nodes + + if rs.ByIgnore() { + r.NumIgnored++ + } else { + if rs.Equal() { + r.NumSame++ + } else { + r.NumDiff++ + } + } + assert(r.NumSame+r.NumDiff+r.NumIgnored == 1) + + if rs.ByMethod() { + r.NumCompared++ + } + if rs.ByFunc() { + r.NumCompared++ + } + assert(r.NumCompared <= 1) +} + +func (child *valueNode) PopStep() (parent *valueNode) { + if child.parent == nil { + return nil + } + parent = child.parent + parent.NumSame += child.NumSame + parent.NumDiff += child.NumDiff + parent.NumIgnored += child.NumIgnored + parent.NumCompared += child.NumCompared + parent.NumTransformed += child.NumTransformed + parent.NumChildren += child.NumChildren + 1 + if parent.MaxDepth < child.MaxDepth+1 { + parent.MaxDepth = child.MaxDepth + 1 + } + return parent +} diff --git a/vendor/google.golang.org/protobuf/types/known/fieldmaskpb/field_mask.pb.go b/vendor/google.golang.org/protobuf/types/known/fieldmaskpb/field_mask.pb.go new file mode 100644 index 000000000..91ee89a5c --- /dev/null +++ b/vendor/google.golang.org/protobuf/types/known/fieldmaskpb/field_mask.pb.go @@ -0,0 +1,560 @@ +// Protocol Buffers - Google's data interchange format +// Copyright 2008 Google Inc. All rights reserved. +// https://developers.google.com/protocol-buffers/ +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: google/protobuf/field_mask.proto + +// Package fieldmaskpb contains generated types for google/protobuf/field_mask.proto. +// +// The FieldMask message represents a set of symbolic field paths. +// The paths are specific to some target message type, +// which is not stored within the FieldMask message itself. +// +// # Constructing a FieldMask +// +// The New function is used construct a FieldMask: +// +// var messageType *descriptorpb.DescriptorProto +// fm, err := fieldmaskpb.New(messageType, "field.name", "field.number") +// if err != nil { +// ... // handle error +// } +// ... // make use of fm +// +// The "field.name" and "field.number" paths are valid paths according to the +// google.protobuf.DescriptorProto message. Use of a path that does not correlate +// to valid fields reachable from DescriptorProto would result in an error. +// +// Once a FieldMask message has been constructed, +// the Append method can be used to insert additional paths to the path set: +// +// var messageType *descriptorpb.DescriptorProto +// if err := fm.Append(messageType, "options"); err != nil { +// ... // handle error +// } +// +// # Type checking a FieldMask +// +// In order to verify that a FieldMask represents a set of fields that are +// reachable from some target message type, use the IsValid method: +// +// var messageType *descriptorpb.DescriptorProto +// if fm.IsValid(messageType) { +// ... // make use of fm +// } +// +// IsValid needs to be passed the target message type as an input since the +// FieldMask message itself does not store the message type that the set of paths +// are for. +package fieldmaskpb + +import ( + proto "google.golang.org/protobuf/proto" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sort "sort" + strings "strings" + sync "sync" + unsafe "unsafe" +) + +// `FieldMask` represents a set of symbolic field paths, for example: +// +// paths: "f.a" +// paths: "f.b.d" +// +// Here `f` represents a field in some root message, `a` and `b` +// fields in the message found in `f`, and `d` a field found in the +// message in `f.b`. +// +// Field masks are used to specify a subset of fields that should be +// returned by a get operation or modified by an update operation. +// Field masks also have a custom JSON encoding (see below). +// +// # Field Masks in Projections +// +// When used in the context of a projection, a response message or +// sub-message is filtered by the API to only contain those fields as +// specified in the mask. For example, if the mask in the previous +// example is applied to a response message as follows: +// +// f { +// a : 22 +// b { +// d : 1 +// x : 2 +// } +// y : 13 +// } +// z: 8 +// +// The result will not contain specific values for fields x,y and z +// (their value will be set to the default, and omitted in proto text +// output): +// +// f { +// a : 22 +// b { +// d : 1 +// } +// } +// +// A repeated field is not allowed except at the last position of a +// paths string. +// +// If a FieldMask object is not present in a get operation, the +// operation applies to all fields (as if a FieldMask of all fields +// had been specified). +// +// Note that a field mask does not necessarily apply to the +// top-level response message. In case of a REST get operation, the +// field mask applies directly to the response, but in case of a REST +// list operation, the mask instead applies to each individual message +// in the returned resource list. In case of a REST custom method, +// other definitions may be used. Where the mask applies will be +// clearly documented together with its declaration in the API. In +// any case, the effect on the returned resource/resources is required +// behavior for APIs. +// +// # Field Masks in Update Operations +// +// A field mask in update operations specifies which fields of the +// targeted resource are going to be updated. The API is required +// to only change the values of the fields as specified in the mask +// and leave the others untouched. If a resource is passed in to +// describe the updated values, the API ignores the values of all +// fields not covered by the mask. +// +// If a repeated field is specified for an update operation, new values will +// be appended to the existing repeated field in the target resource. Note that +// a repeated field is only allowed in the last position of a `paths` string. +// +// If a sub-message is specified in the last position of the field mask for an +// update operation, then new value will be merged into the existing sub-message +// in the target resource. +// +// For example, given the target message: +// +// f { +// b { +// d: 1 +// x: 2 +// } +// c: [1] +// } +// +// And an update message: +// +// f { +// b { +// d: 10 +// } +// c: [2] +// } +// +// then if the field mask is: +// +// paths: ["f.b", "f.c"] +// +// then the result will be: +// +// f { +// b { +// d: 10 +// x: 2 +// } +// c: [1, 2] +// } +// +// An implementation may provide options to override this default behavior for +// repeated and message fields. +// +// In order to reset a field's value to the default, the field must +// be in the mask and set to the default value in the provided resource. +// Hence, in order to reset all fields of a resource, provide a default +// instance of the resource and set all fields in the mask, or do +// not provide a mask as described below. +// +// If a field mask is not present on update, the operation applies to +// all fields (as if a field mask of all fields has been specified). +// Note that in the presence of schema evolution, this may mean that +// fields the client does not know and has therefore not filled into +// the request will be reset to their default. If this is unwanted +// behavior, a specific service may require a client to always specify +// a field mask, producing an error if not. +// +// As with get operations, the location of the resource which +// describes the updated values in the request message depends on the +// operation kind. In any case, the effect of the field mask is +// required to be honored by the API. +// +// ## Considerations for HTTP REST +// +// The HTTP kind of an update operation which uses a field mask must +// be set to PATCH instead of PUT in order to satisfy HTTP semantics +// (PUT must only be used for full updates). +// +// # JSON Encoding of Field Masks +// +// In JSON, a field mask is encoded as a single string where paths are +// separated by a comma. Fields name in each path are converted +// to/from lower-camel naming conventions. +// +// As an example, consider the following message declarations: +// +// message Profile { +// User user = 1; +// Photo photo = 2; +// } +// message User { +// string display_name = 1; +// string address = 2; +// } +// +// In proto a field mask for `Profile` may look as such: +// +// mask { +// paths: "user.display_name" +// paths: "photo" +// } +// +// In JSON, the same mask is represented as below: +// +// { +// mask: "user.displayName,photo" +// } +// +// # Field Masks and Oneof Fields +// +// Field masks treat fields in oneofs just as regular fields. Consider the +// following message: +// +// message SampleMessage { +// oneof test_oneof { +// string name = 4; +// SubMessage sub_message = 9; +// } +// } +// +// The field mask can be: +// +// mask { +// paths: "name" +// } +// +// Or: +// +// mask { +// paths: "sub_message" +// } +// +// Note that oneof type names ("test_oneof" in this case) cannot be used in +// paths. +// +// ## Field Mask Verification +// +// The implementation of any API method which has a FieldMask type field in the +// request should verify the included field paths, and return an +// `INVALID_ARGUMENT` error if any path is unmappable. +type FieldMask struct { + state protoimpl.MessageState `protogen:"open.v1"` + // The set of field mask paths. + Paths []string `protobuf:"bytes,1,rep,name=paths,proto3" json:"paths,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +// New constructs a field mask from a list of paths and verifies that +// each one is valid according to the specified message type. +func New(m proto.Message, paths ...string) (*FieldMask, error) { + x := new(FieldMask) + return x, x.Append(m, paths...) +} + +// Union returns the union of all the paths in the input field masks. +func Union(mx *FieldMask, my *FieldMask, ms ...*FieldMask) *FieldMask { + var out []string + out = append(out, mx.GetPaths()...) + out = append(out, my.GetPaths()...) + for _, m := range ms { + out = append(out, m.GetPaths()...) + } + return &FieldMask{Paths: normalizePaths(out)} +} + +// Intersect returns the intersection of all the paths in the input field masks. +func Intersect(mx *FieldMask, my *FieldMask, ms ...*FieldMask) *FieldMask { + var ss1, ss2 []string // reused buffers for performance + intersect := func(out, in []string) []string { + ss1 = normalizePaths(append(ss1[:0], in...)) + ss2 = normalizePaths(append(ss2[:0], out...)) + out = out[:0] + for i1, i2 := 0, 0; i1 < len(ss1) && i2 < len(ss2); { + switch s1, s2 := ss1[i1], ss2[i2]; { + case hasPathPrefix(s1, s2): + out = append(out, s1) + i1++ + case hasPathPrefix(s2, s1): + out = append(out, s2) + i2++ + case lessPath(s1, s2): + i1++ + case lessPath(s2, s1): + i2++ + } + } + return out + } + + out := Union(mx, my, ms...).GetPaths() + out = intersect(out, mx.GetPaths()) + out = intersect(out, my.GetPaths()) + for _, m := range ms { + out = intersect(out, m.GetPaths()) + } + return &FieldMask{Paths: normalizePaths(out)} +} + +// IsValid reports whether all the paths are syntactically valid and +// refer to known fields in the specified message type. +// It reports false for a nil FieldMask. +func (x *FieldMask) IsValid(m proto.Message) bool { + paths := x.GetPaths() + return x != nil && numValidPaths(m, paths) == len(paths) +} + +// Append appends a list of paths to the mask and verifies that each one +// is valid according to the specified message type. +// An invalid path is not appended and breaks insertion of subsequent paths. +func (x *FieldMask) Append(m proto.Message, paths ...string) error { + numValid := numValidPaths(m, paths) + x.Paths = append(x.Paths, paths[:numValid]...) + paths = paths[numValid:] + if len(paths) > 0 { + name := m.ProtoReflect().Descriptor().FullName() + return protoimpl.X.NewError("invalid path %q for message %q", paths[0], name) + } + return nil +} + +func numValidPaths(m proto.Message, paths []string) int { + md0 := m.ProtoReflect().Descriptor() + for i, path := range paths { + md := md0 + if !rangeFields(path, func(field string) bool { + // Search the field within the message. + if md == nil { + return false // not within a message + } + fd := md.Fields().ByName(protoreflect.Name(field)) + // The real field name of a group is the message name. + if fd == nil { + gd := md.Fields().ByName(protoreflect.Name(strings.ToLower(field))) + if gd != nil && gd.Kind() == protoreflect.GroupKind && string(gd.Message().Name()) == field { + fd = gd + } + } else if fd.Kind() == protoreflect.GroupKind && string(fd.Message().Name()) != field { + fd = nil + } + if fd == nil { + return false // message has does not have this field + } + + // Identify the next message to search within. + md = fd.Message() // may be nil + + // Repeated fields are only allowed at the last position. + if fd.IsList() || fd.IsMap() { + md = nil + } + + return true + }) { + return i + } + } + return len(paths) +} + +// Normalize converts the mask to its canonical form where all paths are sorted +// and redundant paths are removed. +func (x *FieldMask) Normalize() { + x.Paths = normalizePaths(x.Paths) +} + +func normalizePaths(paths []string) []string { + sort.Slice(paths, func(i, j int) bool { + return lessPath(paths[i], paths[j]) + }) + + // Elide any path that is a prefix match on the previous. + out := paths[:0] + for _, path := range paths { + if len(out) > 0 && hasPathPrefix(path, out[len(out)-1]) { + continue + } + out = append(out, path) + } + return out +} + +// hasPathPrefix is like strings.HasPrefix, but further checks for either +// an exact matche or that the prefix is delimited by a dot. +func hasPathPrefix(path, prefix string) bool { + return strings.HasPrefix(path, prefix) && (len(path) == len(prefix) || path[len(prefix)] == '.') +} + +// lessPath is a lexicographical comparison where dot is specially treated +// as the smallest symbol. +func lessPath(x, y string) bool { + for i := 0; i < len(x) && i < len(y); i++ { + if x[i] != y[i] { + return (x[i] - '.') < (y[i] - '.') + } + } + return len(x) < len(y) +} + +// rangeFields is like strings.Split(path, "."), but avoids allocations by +// iterating over each field in place and calling a iterator function. +func rangeFields(path string, f func(field string) bool) bool { + for { + var field string + if i := strings.IndexByte(path, '.'); i >= 0 { + field, path = path[:i], path[i:] + } else { + field, path = path, "" + } + + if !f(field) { + return false + } + + if len(path) == 0 { + return true + } + path = strings.TrimPrefix(path, ".") + } +} + +func (x *FieldMask) Reset() { + *x = FieldMask{} + mi := &file_google_protobuf_field_mask_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FieldMask) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FieldMask) ProtoMessage() {} + +func (x *FieldMask) ProtoReflect() protoreflect.Message { + mi := &file_google_protobuf_field_mask_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 FieldMask.ProtoReflect.Descriptor instead. +func (*FieldMask) Descriptor() ([]byte, []int) { + return file_google_protobuf_field_mask_proto_rawDescGZIP(), []int{0} +} + +func (x *FieldMask) GetPaths() []string { + if x != nil { + return x.Paths + } + return nil +} + +var File_google_protobuf_field_mask_proto protoreflect.FileDescriptor + +const file_google_protobuf_field_mask_proto_rawDesc = "" + + "\n" + + " google/protobuf/field_mask.proto\x12\x0fgoogle.protobuf\"!\n" + + "\tFieldMask\x12\x14\n" + + "\x05paths\x18\x01 \x03(\tR\x05pathsB\x85\x01\n" + + "\x13com.google.protobufB\x0eFieldMaskProtoP\x01Z2google.golang.org/protobuf/types/known/fieldmaskpb\xf8\x01\x01\xa2\x02\x03GPB\xaa\x02\x1eGoogle.Protobuf.WellKnownTypesb\x06proto3" + +var ( + file_google_protobuf_field_mask_proto_rawDescOnce sync.Once + file_google_protobuf_field_mask_proto_rawDescData []byte +) + +func file_google_protobuf_field_mask_proto_rawDescGZIP() []byte { + file_google_protobuf_field_mask_proto_rawDescOnce.Do(func() { + file_google_protobuf_field_mask_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_google_protobuf_field_mask_proto_rawDesc), len(file_google_protobuf_field_mask_proto_rawDesc))) + }) + return file_google_protobuf_field_mask_proto_rawDescData +} + +var file_google_protobuf_field_mask_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_google_protobuf_field_mask_proto_goTypes = []any{ + (*FieldMask)(nil), // 0: google.protobuf.FieldMask +} +var file_google_protobuf_field_mask_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_google_protobuf_field_mask_proto_init() } +func file_google_protobuf_field_mask_proto_init() { + if File_google_protobuf_field_mask_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_google_protobuf_field_mask_proto_rawDesc), len(file_google_protobuf_field_mask_proto_rawDesc)), + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_google_protobuf_field_mask_proto_goTypes, + DependencyIndexes: file_google_protobuf_field_mask_proto_depIdxs, + MessageInfos: file_google_protobuf_field_mask_proto_msgTypes, + }.Build() + File_google_protobuf_field_mask_proto = out.File + file_google_protobuf_field_mask_proto_goTypes = nil + file_google_protobuf_field_mask_proto_depIdxs = nil +} diff --git a/vendor/modules.txt b/vendor/modules.txt index 82ec0d0f7..b576652d1 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,9 +1,17 @@ # cel.dev/expr v0.25.1 ## explicit; go 1.23.0 cel.dev/expr +cel.dev/expr/conformance/proto3 # github.com/antlr4-go/antlr/v4 v4.13.1 ## explicit; go 1.22 github.com/antlr4-go/antlr/v4 +# github.com/google/go-cmp v0.7.0 +## explicit; go 1.21 +github.com/google/go-cmp/cmp +github.com/google/go-cmp/cmp/internal/diff +github.com/google/go-cmp/cmp/internal/flags +github.com/google/go-cmp/cmp/internal/function +github.com/google/go-cmp/cmp/internal/value # go.yaml.in/yaml/v3 v3.0.4 ## explicit; go 1.16 go.yaml.in/yaml/v3 @@ -70,6 +78,7 @@ google.golang.org/protobuf/types/gofeaturespb google.golang.org/protobuf/types/known/anypb google.golang.org/protobuf/types/known/durationpb google.golang.org/protobuf/types/known/emptypb +google.golang.org/protobuf/types/known/fieldmaskpb google.golang.org/protobuf/types/known/structpb google.golang.org/protobuf/types/known/timestamppb google.golang.org/protobuf/types/known/wrapperspb From b37382f9b54308b6cf07cb67b3f4f95bd6d425be Mon Sep 17 00:00:00 2001 From: Jonathan Tatum Date: Wed, 11 Mar 2026 21:40:33 +0000 Subject: [PATCH 4/6] Add bazel rule for preserving proto source info --- bazel/BUILD.bazel | 6 +++++ bazel/proto_source_info.bzl | 54 +++++++++++++++++++++++++++++++++++++ cel/BUILD.bazel | 2 +- cel/testdata/BUILD.bazel | 28 ++++++++++++++++--- 4 files changed, 86 insertions(+), 4 deletions(-) create mode 100644 bazel/BUILD.bazel create mode 100644 bazel/proto_source_info.bzl diff --git a/bazel/BUILD.bazel b/bazel/BUILD.bazel new file mode 100644 index 000000000..51e865a84 --- /dev/null +++ b/bazel/BUILD.bazel @@ -0,0 +1,6 @@ +load("@bazel_skylib//:bzl_library.bzl", "bzl_library") + +bzl_library( + name = "proto_source_info", + srcs = ["proto_source_info.bzl"], +) diff --git a/bazel/proto_source_info.bzl b/bazel/proto_source_info.bzl new file mode 100644 index 000000000..d429b4a12 --- /dev/null +++ b/bazel/proto_source_info.bzl @@ -0,0 +1,54 @@ +"""Build rule for preserving source information in proto descriptor sets.""" + +load("@com_google_protobuf//bazel/common:proto_info.bzl", "ProtoInfo") + +def _source_info_proto_descriptor_set(ctx): + """Returns a proto descriptor set with source information preserved.""" + srcs = depset([s for dep in ctx.attr.proto_libs for s in dep[ProtoInfo].direct_sources]) + deps = depset(transitive = [dep[ProtoInfo].transitive_descriptor_sets for dep in ctx.attr.proto_libs]) + + src_files = srcs.to_list() + dep_files = deps.to_list() + + args = ctx.actions.args() + args.add("--descriptor_set_out=" + ctx.outputs.out.path) + args.add("--include_imports") + args.add("--include_source_info=true") + args.add("--proto_path=.") + args.add("--proto_path=" + ctx.configuration.genfiles_dir.path) + args.add("--descriptor_set_in=" + ":".join([d.path for d in dep_files])) + args.add_all(src_files) + + ctx.actions.run( + executable = ctx.executable._protoc, + inputs = src_files + dep_files, + outputs = [ctx.outputs.out], + arguments = [args], + mnemonic = "SourceInfoProtoDescriptorSet", + progress_message = "Generating proto descriptor set with source information for %{label}", + ) + +source_info_proto_descriptor_set = rule( + doc = """ +Rule for generating a proto descriptor set for the transitive dependencies of proto libraries +with source information preserved. + +This can dramatically increase the size of the descriptor set, so only use it +when necessary (e.g. for formatting documentation about a CEL environment). + +Source info is only preserved for input files for each proto_library label in +protolibs. Transitive dependencies are included with source info stripped. +""", + attrs = { + "proto_libs": attr.label_list(providers = [[ProtoInfo]]), + "_protoc": attr.label( + default = "@com_google_protobuf//:protoc", + executable = True, + cfg = "exec", + ), + }, + outputs = { + "out": "%{name}-transitive-descriptor-set-source-info.proto.bin", + }, + implementation = _source_info_proto_descriptor_set, +) diff --git a/cel/BUILD.bazel b/cel/BUILD.bazel index 3a47990c2..46cb26d62 100644 --- a/cel/BUILD.bazel +++ b/cel/BUILD.bazel @@ -81,7 +81,7 @@ go_test( ], embedsrcs = [ "//cel/testdata:prompts", - "//cel/testdata:test_fds_with_source_info-transitive-descriptor-set-source-info.proto.bin", + "//cel/testdata:test_fds_with_source_info", ], deps = [ "//common/operators:go_default_library", diff --git a/cel/testdata/BUILD.bazel b/cel/testdata/BUILD.bazel index d05c25e87..adca84e9d 100644 --- a/cel/testdata/BUILD.bazel +++ b/cel/testdata/BUILD.bazel @@ -1,3 +1,6 @@ +load("@com_google_protobuf//bazel:proto_library.bzl", "proto_library") +load("//bazel:proto_source_info.bzl", "source_info_proto_descriptor_set") + package( default_visibility = ["//visibility:public"], licenses = ["notice"], # Apache 2.0 @@ -22,7 +25,26 @@ filegroup( srcs = glob(["*.prompt.txt"]), ) -exports_files( - ["test_fds_with_source_info-transitive-descriptor-set-source-info.proto.bin"], - visibility = ["//cel:__subpackages__"], +proto_library( + name = "mutant_proto", + srcs = ["mutant.proto"], +) + +proto_library( + name = "team_proto", + srcs = ["team.proto"], + deps = [":mutant_proto"], +) + +source_info_proto_descriptor_set( + name = "test_fds_with_source_info", + proto_libs = [ + ":mutant_proto", + ":team_proto", + ], +) + +source_info_proto_descriptor_set( + name = "test_all_types_fds", + proto_libs = ["@dev_cel_expr//proto/cel/expr/conformance/proto3:test_all_types_proto"], ) From c01a12f6f12a26f0074e75491304f038534539f3 Mon Sep 17 00:00:00 2001 From: Jonathan Tatum Date: Thu, 12 Mar 2026 00:28:35 +0000 Subject: [PATCH 5/6] Respond to feedback: - reformat paths/variables - fix misc go style issues --- cel/fieldpaths.go | 1 + cel/fieldpaths_test.go | 3 -- cel/prompt.go | 46 +++++++++++++--------- cel/prompt_test.go | 4 +- cel/templates/authoring.tmpl | 41 +++++++++++--------- cel/testdata/field_paths.prompt.txt | 60 ++++++++++++++++------------- 6 files changed, 86 insertions(+), 69 deletions(-) diff --git a/cel/fieldpaths.go b/cel/fieldpaths.go index fda88ba04..9b0b69624 100644 --- a/cel/fieldpaths.go +++ b/cel/fieldpaths.go @@ -17,6 +17,7 @@ type fieldPath struct { isLeaf bool } +// Documentation implements the Documentor interface. func (f *fieldPath) Documentation() *common.Doc { return common.NewFieldDoc(f.path, f.celType.String(), f.description) } diff --git a/cel/fieldpaths_test.go b/cel/fieldpaths_test.go index 340237a57..e5f907932 100644 --- a/cel/fieldpaths_test.go +++ b/cel/fieldpaths_test.go @@ -18,9 +18,6 @@ func TestFieldPathsForTestAllTypes(t *testing.T) { p := env.CELTypeProvider() paths := fieldPathsForType(p, "t", ObjectType("cel.expr.conformance.proto3.NestedTestAllTypes")) - if err != nil { - t.Fatalf("fieldPathsForType() failed: %v", err) - } pathStrings := make([]string, 0, len(paths)) for i, path := range paths { t.Logf("path %d: %v", i, path.path) diff --git a/cel/prompt.go b/cel/prompt.go index c3bfef675..09cd5aced 100644 --- a/cel/prompt.go +++ b/cel/prompt.go @@ -115,11 +115,15 @@ type Prompt struct { env *Env } +type promptVariable struct { + *common.Doc + FieldPaths []*common.Doc +} + type promptInst struct { *Prompt - Variables []*common.Doc - FieldPaths []*common.Doc + Variables []*promptVariable Macros []*common.Doc Functions []*common.Doc UserPrompt string @@ -129,26 +133,31 @@ type promptInst struct { // for use with LLM generators. func (p *Prompt) Render(userPrompt string) string { var buffer strings.Builder - vars := make([]*common.Doc, len(p.env.Variables())) + vars := make([]*promptVariable, len(p.env.Variables())) for i, v := range p.env.Variables() { - vars[i] = v.Documentation() - } - sort.SliceStable(vars, func(i, j int) bool { - return vars[i].Name < vars[j].Name - }) - var fieldPaths []*common.Doc - if p.fieldPaths { - for _, v := range p.env.Variables() { - if v.Type().Kind() == types.StructKind { - paths := fieldPathsForType(p.env.CELTypeProvider(), v.Name(), v.Type()) - for _, path := range paths { - fieldPaths = append(fieldPaths, path.Documentation()) - } + vars[i] = &promptVariable{Doc: v.Documentation()} + if p.fieldPaths && v.Type().Kind() == types.StructKind { + var fieldPaths []*common.Doc + + paths := fieldPathsForType(p.env.CELTypeProvider(), v.Name(), v.Type()) + if len(paths) < 2 { + paths = nil + } else { + // First path is the variable which is already documented. + paths = paths[1:] + } + for _, path := range paths { + fieldPaths = append(fieldPaths, path.Documentation()) } + + sort.SliceStable(fieldPaths, func(i, j int) bool { + return fieldPaths[i].Name < fieldPaths[j].Name + }) + vars[i].FieldPaths = fieldPaths } } - sort.SliceStable(fieldPaths, func(i, j int) bool { - return fieldPaths[i].Name < fieldPaths[j].Name + sort.SliceStable(vars, func(i, j int) bool { + return vars[i].Name < vars[j].Name }) macs := make([]*common.Doc, len(p.env.Macros())) for i, m := range p.env.Macros() { @@ -167,7 +176,6 @@ func (p *Prompt) Render(userPrompt string) string { inst := &promptInst{ Prompt: p, Variables: vars, - FieldPaths: fieldPaths, Macros: macs, Functions: funcs, UserPrompt: userPrompt} diff --git a/cel/prompt_test.go b/cel/prompt_test.go index db92619e8..34607d0b5 100644 --- a/cel/prompt_test.go +++ b/cel/prompt_test.go @@ -19,6 +19,7 @@ import ( "sync" "testing" + "github.com/google/cel-go/common" "github.com/google/cel-go/common/env" "github.com/google/go-cmp/cmp" @@ -109,7 +110,8 @@ func TestPromptTemplateFieldPaths(t *testing.T) { { name: "standard_env", envOpts: []EnvOption{ - Variable("team", ObjectType("cel.testdata.Team")), + VariableWithDoc("team", ObjectType("cel.testdata.Team"), + common.MultilineDescription("A team of gifted youngsters")), StdLib(StdLibSubset(env.NewLibrarySubset().SetDisableMacros(true))), }, out: wantFieldPathsPrompt, diff --git a/cel/templates/authoring.tmpl b/cel/templates/authoring.tmpl index d492ccda8..a921df9b0 100644 --- a/cel/templates/authoring.tmpl +++ b/cel/templates/authoring.tmpl @@ -1,10 +1,27 @@ -{{define "variable"}}{{.Name}} is a {{.Type}}{{if .Description}} - -{{range split .Description}} {{.}} +{{define "fieldPath" }} + * path: `{{.Name}}` + type: `{{.Type}}` + {{- if .Description }} + description: +{{range split .Description }} {{.}} {{end}} {{- end -}} {{- end -}} +{{define "variable" -}} +* name: `{{.Name}}` + type: `{{.Type}}` + {{- if .Description}} + description: +{{range split .Description}} {{.}} +{{end -}} +{{- end -}} +{{- if .FieldPaths }} + attributes: +{{- range .FieldPaths }}{{ template "fieldPath" . }}{{end}} +{{- end -}} +{{- end -}} + {{define "macro" -}} {{.Name}} macro{{if .Description}} - {{newlineToSpace .Description}} {{end}} @@ -27,14 +44,6 @@ {{range .Children}}{{template "overload" .}}{{end}} {{- end -}} -{{define "fieldPath" -}} -{{.Name}} is a {{.Type}} -{{if .Description}} -{{range split .Description}} {{.}} -{{ end }} -{{ end -}} -{{- end -}} - {{.Persona}} {{.FormatRules}} @@ -44,15 +53,9 @@ Only use the following variables, macros, and functions in expressions. {{if .Variables}} Variables: -{{range .Variables}}* {{template "variable" .}} -{{end -}} +{{range .Variables -}} +{{template "variable" .}} {{end -}} - -{{if .FieldPaths}} -Field Paths: - -{{range .FieldPaths}}* {{template "fieldPath" .}} -{{- end -}} {{- end -}} {{if .Macros}} diff --git a/cel/testdata/field_paths.prompt.txt b/cel/testdata/field_paths.prompt.txt index 552900a3e..66cebad12 100644 --- a/cel/testdata/field_paths.prompt.txt +++ b/cel/testdata/field_paths.prompt.txt @@ -13,33 +13,39 @@ Only use the following variables, macros, and functions in expressions. Variables: -* team is a cel.testdata.Team - -Field Paths: - -* team is a cel.testdata.Team -* team.members is a list(cel.testdata.Mutant) - - The members of the team. - -* team.members[0].level is a int - - The level of the mutant. - Values from 1 to 10. - -* team.members[0].name is a string - - The display name of the mutant. - -* team.members[0].super_power is a string - - The super power of the mutant. - Matches the IDs in Foo.db. - -* team.name is a string - - The name of the team. - Formated as 'team_<8_digit_hex_number>'. +* name: `team` + type: `cel.testdata.Team` + description: + A team of gifted youngsters + + attributes: + * path: `team.members` + type: `list(cel.testdata.Mutant)` + description: + The members of the team. + + * path: `team.members[0].level` + type: `int` + description: + The level of the mutant. + Values from 1 to 10. + + * path: `team.members[0].name` + type: `string` + description: + The display name of the mutant. + + * path: `team.members[0].super_power` + type: `string` + description: + The super power of the mutant. + Matches the IDs in Foo.db. + + * path: `team.name` + type: `string` + description: + The name of the team. + Formated as 'team_<8_digit_hex_number>'. Functions: From bb93fe27858944be3d74736480e7b200cc41f779 Mon Sep 17 00:00:00 2001 From: Jonathan Tatum Date: Thu, 12 Mar 2026 01:17:54 +0000 Subject: [PATCH 6/6] Seperate documentation lookup from find field type --- cel/fieldpaths.go | 12 +++++++++++- common/types/provider.go | 14 ++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/cel/fieldpaths.go b/cel/fieldpaths.go index 9b0b69624..570fce3a4 100644 --- a/cel/fieldpaths.go +++ b/cel/fieldpaths.go @@ -22,6 +22,12 @@ func (f *fieldPath) Documentation() *common.Doc { return common.NewFieldDoc(f.path, f.celType.String(), f.description) } +type documentationProvider interface { + // FindStructFieldDescription returns documentation for a field if available. + // Returns false if the field could not be found. + FindStructFieldDescription(typeName, fieldName string) (string, bool) +} + type backtrack struct { // provider used to resolve types. provider types.Provider @@ -79,10 +85,14 @@ func (b *backtrack) expandFieldPaths(celType *Type, paths []*fieldPath) []*field continue } b.push(field, celType) + description := "" + if docProvider, ok := b.provider.(documentationProvider); ok { + description, _ = docProvider.FindStructFieldDescription(celType.String(), field) + } path := &fieldPath{ celType: fieldType.Type, path: formatPath(b.path), - description: fieldType.Description, + description: description, isLeaf: false, } paths = append(paths, path) diff --git a/common/types/provider.go b/common/types/provider.go index ebfd66dcb..a7a3f317c 100644 --- a/common/types/provider.go +++ b/common/types/provider.go @@ -257,6 +257,20 @@ func (p *Registry) FindStructFieldType(structType, fieldName string) (*FieldType }, true } +// FindStructFieldDescription returns documentation for a field if available. +// Returns false if the field could not be found. +func (p *Registry) FindStructFieldDescription(structType, fieldName string) (string, bool) { + msgType, found := p.pbdb.DescribeType(structType) + if !found { + return "", false + } + field, found := msgType.FieldByName(fieldName) + if !found { + return "", false + } + return field.Documentation(), true +} + // FindIdent takes a qualified identifier name and returns a ref.Val if one exists. func (p *Registry) FindIdent(identName string) (ref.Val, bool) { if t, found := p.revTypeMap[identName]; found {